/* The baseline artwork is retained; this layer supplies the chapter system. */
:root { --muted:#58665d; --chapter-offset:94px; --link-hover:#a64a20; color-scheme:light; }
html { scroll-behavior:auto; scroll-padding-top:var(--chapter-offset); }
body { transition:background .25s,color .25s; }
html[data-theme="dark"] { --muted:#b0beb3; --link-hover:#f2a272; color-scheme:dark; }
.text-link:hover { color:var(--link-hover); }
/* Box-shadow and filter keyframes repaint every frame on the main thread; keep these accents static. */
.availability b, .career-entry.current::before, .camera-garment { animation:none; }
section[id] { scroll-margin-top:0; }
.hero { min-height:100svh; padding-top:118px; padding-bottom:40px; }
main > .container, footer.container { width:min(1240px,calc(100% - 152px)); }
.logo { letter-spacing:-.035em; }
.hero h1 { font-size:clamp(3.6rem,6.6vw,6.8rem); line-height:1.14; letter-spacing:-.04em; word-spacing:.06em; margin-bottom:32px; }
.section-heading h2, .career-intro h2, .contact-panel h2 { line-height:1.18; letter-spacing:-.035em; word-spacing:.025em; }
.project-body h3, .career-entry h3, .service h3, .lab-card h3 { line-height:1.3; letter-spacing:-.02em; margin-bottom:16px; }
.dashboard-title, .preview-title { line-height:1.25; letter-spacing:-.025em; word-spacing:.025em; }
.project-body p, .service p, .lab-card p { font-size:.9rem; line-height:1.85; }
.process span, .micro-stat strong { letter-spacing:-.015em; }
section.block { position:relative; margin-top:64px; padding-top:64px; padding-bottom:8px; border-top:1px solid var(--line); }
section.block::before, #contact::before { content:""; position:absolute; top:-3px; left:0; width:44px; height:5px; border-radius:8px; background:var(--orange); }
#building, #career, #contact { background:linear-gradient(180deg,var(--surface2),transparent 460px); box-shadow:0 0 0 100vmax var(--surface2); clip-path:inset(0 -100vmax); }
#building, #career { box-shadow:none; }
#contact { position:relative; margin-top:64px; border-top:1px solid var(--line); box-shadow:none; padding-top:48px; }
.contact-panel { margin:0 0 52px; }
.eyebrow { color:var(--forest); }
.contact-panel .eyebrow { color:#bed2c3; }
.scroll-hint { display:inline-flex; gap:20px; align-items:center; min-height:44px; margin-top:15px; color:var(--muted); font-size:.72rem; font-weight:750; }
.scroll-hint span { color:var(--forest); }
.chapter-caption { position:fixed; z-index:90; left:50%; bottom:12px; transform:translateX(-50%); display:flex; gap:12px; align-items:center; padding:7px 14px; border:1px solid var(--line); border-radius:40px; background:var(--surface); color:var(--muted); box-shadow:var(--soft-shadow); font-size:.64rem; font-weight:800; pointer-events:none; }
#chapterCount { color:var(--forest); font-variant-numeric:tabular-nums; }
.top-progress { width:100%; transform:scaleX(0); transform-origin:left; transition:none; }
.rail { display:flex; gap:0; padding:12px 4px; right:18px; }
.rail a { width:36px; height:44px; flex-shrink:0; }
.rail-line { top:34px; bottom:34px; width:2px; background:color-mix(in srgb,var(--forest) 38%,var(--surface)); }
.rail-marker { top:0; left:3px; width:3px; height:20px; box-shadow:none; transition:transform .35s var(--ease); }
.rail a::before { content:attr(data-step); display:grid; place-items:center; width:25px; height:25px; font-size:.56rem; font-weight:800; font-variant-numeric:tabular-nums; color:var(--forest); border-color:var(--line); }
.rail a.active::before { background:var(--ink); color:var(--bg); border-color:var(--ink); transform:none; }
.rail a:hover::before { background:var(--lime); color:#18231e; border-color:var(--forest); transform:none; }
.rail a span { right:43px; }
.case-study { width:100%; margin-top:22px; border-top:1px solid var(--line); }
.case-study summary { min-height:46px; padding-block:14px; cursor:pointer; font-size:.75rem; font-weight:800; }
.case-study p { margin:4px 0 12px; font-size:.8rem; }
.case-study a { text-decoration:underline; text-underline-offset:3px; }
summary:focus-visible { outline:3px solid var(--orange); outline-offset:3px; }
.project-meta { flex-wrap:wrap; }
.project-links a, .footer-links a { min-height:44px; display:inline-flex; align-items:center; }
.text-link { color:var(--ink); }
.reveal, .reveal.visible { opacity:1; transform:none; transition:none; }
.reveal.visible { animation:arrive .28s var(--ease) both; }
@keyframes arrive { from { opacity:.65; transform:translateY(12px); } to { opacity:1; transform:none; } }
.stage-ring, .stage-ring.two, .contact-panel::before, .ticker-track { animation:none; }
.stage-glow { animation:none; }
.dashboard, .float-chip { animation-duration:4s; animation-iteration-count:1; }
.flow-arrow { animation-iteration-count:1; }
.hero h1 .typed-caret { animation-duration:1s; animation-iteration-count:3; }
.ticker-track { width:100%; justify-content:center; flex-wrap:wrap; gap:12px 24px; padding-inline:18px; }
.ticker-track > :nth-child(n+11) { display:none; }
.ticker-track > :nth-child(10) { display:none; }
.ticker-track > span { font-size:.6rem; }
.project-art .art-stamp { background:#ffffffcf; padding:4px 6px; border-radius:4px; max-width:calc(100% - 32px); line-height:1.55; text-align:right; }
.project-art { user-select:none; }
.project-art, .hero-stage { contain:layout style; }
.bars i, .tv-graph i { transform-origin:bottom; }
@keyframes growbar { from { transform:scaleY(0); } to { transform:scaleY(1); } }
button, a, summary { touch-action:manipulation; }
footer { padding-bottom:70px; }
html:not(.js) .filterbar, html:not(.js) .theme-toggle, html:not(.js) .menu-toggle, html:not(.js) .chapter-caption { display:none; }
@media(min-width:1181px) { .chapter-caption { left:auto; right:22px; bottom:22px; transform:none; } }
@media(max-width:900px) {
  main > .container, footer.container { width:calc(100% - 112px); margin-left:24px; margin-right:88px; }
  .hero { padding-top:125px; }
  .hero h1 { font-size:clamp(3.5rem,9vw,6.2rem); }
  .hero-stage { margin-bottom:0; }
}
@media(max-width:650px) {
  :root { --chapter-offset:86px; }
  main > .container, footer.container { width:calc(100% - 80px); margin-left:17px; margin-right:63px; }
  .rail { right:8px; padding-inline:2px; }
  .hero { padding-top:116px; padding-bottom:32px; }
  section.block { margin-top:40px; padding-top:44px; }
  .hero h1 { font-size:clamp(2.5rem,10.6vw,4.25rem); }
  .contact-panel h2 { font-size:clamp(2.2rem,10vw,4rem); }
  .hero-stage { height:365px; }
  .stage-sign { display:none; } /* decorative vertical label would sit on the dark dashboard card */
  .availability { font-size:.6rem; }
  .section-heading h2 { overflow-wrap:break-word; }
  .nav-links { max-height:calc(100dvh - 94px); overflow-y:auto; }
  .ticker-track > b { display:none; }
  .process { justify-content:flex-start; }
  #contact { margin-top:40px; padding-top:32px; }
  .project-meta { letter-spacing:.075em; }
  html:not(.js) .header { position:relative; }
  html:not(.js) .nav { flex-wrap:wrap; height:auto; padding-block:16px; }
  html:not(.js) .nav-links { position:static; visibility:visible; opacity:1; transform:none; order:3; width:100%; flex-direction:row; flex-wrap:wrap; box-shadow:none; }
  html:not(.js) .hero { padding-top:40px; }
}
@media(max-height:540px) {
  .rail { padding-block:6px; top:calc(50% + var(--navH)/2); }
  .rail a { height:clamp(24px,calc((100dvh - var(--navH) - 48px)/7),44px); }
  .rail-line { top:24px; bottom:24px; }
}
@media(max-height:300px) {
  .rail { max-height:calc(100dvh - var(--navH) - 16px); overflow-y:auto; }
}
@media(prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation:none!important; transition:none!important; }
}
@media print {
  .header, .rail, .chapter-caption, .top-progress, .filterbar, .hero-stage, .ticker, .scroll-hint { display:none; }
  .hero { min-height:0; padding-top:0; display:block; }
  main > .container, footer.container { width:100%; margin-inline:0; }
  section.block { margin-top:24px; padding-top:24px; }
  .project-card { break-inside:avoid; box-shadow:none; }
  .project-card.is-hidden { display:block; }
  .career-intro { position:static; }
}
