/* Shared portfolio layout. Loaded after page styles. */
html { color-scheme: dark; scroll-padding-top: 6rem; }
body { padding-top: 68px; }
body, p { opacity: 1; }
.container { width: min(1100px, 92%); }
main { min-height: 65vh; }
main:focus { outline: none; }
section[id], h1, h2, h3 { scroll-margin-top: 6rem; }
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a:hover { opacity: 1; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 5px;
}
p { text-wrap: pretty; }
.nav__links .nav__resume { margin-left: 0.7rem; border-left: 1px solid var(--line); border-radius: 0; color: var(--link); }
.nav__toggle span { flex-shrink: 0; height: 2px; margin: 3px 0; }
.nav__toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.nav__menu .nav__resume { margin-top: 1rem; color: var(--link); }
.text-link { color: var(--link); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.text-link:hover { color: var(--accent); }
.home-intro { padding: 5rem 0 4.5rem; }
.home-intro__grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 6rem; align-items: start; }
.home-intro .eyebrow { margin-bottom: 1.4rem; }
.home-intro h1 { font-size: clamp(2.7rem, 4.5vw, 3.7rem); line-height: 1.12; letter-spacing: -0.04em; margin-bottom: 1.5rem; }
.home-intro__dot { color: var(--link); }
.home-intro__lead { font-size: 1.1rem; line-height: 1.8; max-width: 550px; color: var(--muted); }
.home-intro__actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-top: 2rem; }
.home-intro__actions .text-link { padding-block: 0.5rem; font-size: 0.9rem; }
.home-context { border-left: 1px solid var(--line); padding-left: 2rem; display: grid; gap: 1.5rem; }
.home-context__label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.35rem; }
.home-context p { margin: 0; font-size: 0.94rem; line-height: 1.6; }
.home-context a { color: var(--link); }
.home-context a:hover { text-decoration: underline; text-underline-offset: 4px; }
.home-context .muted { font-size: 0.85rem; }
.work-section { padding: 3.5rem 0; border-top: 1px solid var(--line); }
.work-section h2, .home-more h2 { font-size: 1.4rem; letter-spacing: -0.02em; line-height: 1.4; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.section-heading .text-link { font-size: 0.88rem; }
.work-list { margin-top: 1.4rem; }
.work-item { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 3rem; padding: 2rem 0; border-top: 1px solid var(--line); }
.work-item__title, .work-item__body { min-width: 0; }
.work-item__category { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.5rem; }
.work-item h3 { font-size: 1.2rem; line-height: 1.4; margin-bottom: 0.5rem; }
.work-item__body p { font-size: 1rem; line-height: 1.75; margin-bottom: 1rem; max-width: 650px; }
.work-item__body .work-item__note { font-size: 0.87rem; color: var(--muted); }
.work-item__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.work-item__links a, .section-note a { color: var(--link); font-size: 0.9rem; padding-block: 0.4rem; text-decoration: underline; text-underline-offset: 4px; }
.work-item__links a:hover { color: var(--accent); }
.section-note { margin-top: 1.5rem; font-size: 0.9rem; color: var(--muted); }
.home-more { border-top: 1px solid var(--line); padding: 3rem 0; }
.home-more__grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 3rem; }
.home-more p { color: var(--muted); font-size: 0.95rem; margin-bottom: 1rem; }
.about-details { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; margin-top: 2rem; }
.about-details h3 { font-size: 1rem; }
.plain-list { padding-left: 1.2rem; line-height: 1.9; color: var(--muted); margin-bottom: 1.4rem; }
.about-details p { color: var(--muted); }
.scroll-progress { display: none; }
.fix__repo { color: var(--text); }
.award__when, .metric__label, .project-card__note, .work-card__label, .work-card__cta, .excerpt-tag, .theme-card__num {
  font-family: var(--font); font-size: 0.85rem; text-transform: none; letter-spacing: 0; color: var(--muted);
}
.work-card__cta { color: var(--link); }
.lightbox { overscroll-behavior: contain; }
.lightbox__close, .lightbox__nav { min-width: 44px; min-height: 44px; }
.status-dot { animation: none; }
/* Content is visible without JavaScript and never waits for scroll effects. */
[data-reveal], [data-reveal-children] > * { opacity: 1; transform: none; transition: none; }
@media (min-width: 900px) { .nav__links { display: flex; } .nav__toggle { display: none; } }
@media (max-width: 899px) { .nav__links { display: none; } .nav__toggle { display: flex; } }
@media (max-width: 800px) {
  .container { width: calc(100% - 40px); }
  .home-intro { padding: 3rem 0; }
  .home-intro__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .home-context { border-left: none; border-top: 1px solid var(--line); padding: 1.5rem 0 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
  .work-item, .home-more__grid { grid-template-columns: 180px minmax(0, 1fr); gap: 2rem; }
  .page-hero { padding: 3rem 0 2.5rem; }
}
@media (max-width: 560px) {
  .home-intro h1 { max-width: 12ch; }
  .home-intro__lead { font-size: 1rem; }
  .home-context { grid-template-columns: 1fr; gap: 1.2rem; }
  .home-context > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 0.8rem; }
  .home-context__label { padding-top: 0.15rem; }
  .work-item, .home-more__grid, .about-details { grid-template-columns: 1fr; gap: 0.75rem; }
  .work-item { padding: 1.7rem 0; }
  .work-item__category { margin-bottom: 0.3rem; }
  .work-section { padding: 2.5rem 0; }
  .about-details { gap: 2rem; }
  .oss-stats { grid-template-columns: 1fr; gap: 1.5rem; }
  .oss-stat { flex-direction: row; align-items: center; gap: 1rem; }
  .oss-stat__value { width: 3ch; }
  .section-heading { align-items: center; }
  .section-heading h2 { margin-bottom: 0; }
  .footer__inner { gap: 0.6rem; }
  .footer__inner > .muted { width: 100%; }
  .lightbox__stage { grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 0.35rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Restore the original compact, monochrome home surface. */
body.home-page { min-height: 100svh; display: flex; flex-direction: column; }
.home-page main { flex: 1 0 auto; display: flex; align-items: center; min-height: 0; }
.home-page .home-intro { width: 100%; padding: 3rem 0; }
.home-page .home-intro__grid { display: block; }
.home-page .home-intro h1 { font-size: clamp(2.6rem, 6.5vw, 4.4rem); line-height: 1.04; max-width: 16ch; }
.home-page .home-intro__lead { font-size: 1.08rem; line-height: 1.7; max-width: 33rem; }
.home-page .home-intro__actions { margin-top: 2.4rem; gap: 0.75rem; }
.home-page .footer { flex-shrink: 0; }
.btn { min-height: 44px; }
.nav__links .nav__resume { border-left: none; border-radius: 999px; border: 1px solid var(--line); margin-left: 0.5rem; }
@media (max-width: 560px) { .home-page .home-intro h1 { max-width: 12ch; } }
