:root {
  --color-bg: #FFFFFF;
  --color-surface: #F6F6F4;
  --color-surface-strong: #ECECE8;
  --color-text: #1F1D1A;
  --color-text-muted: #5F5C56;
  --color-line: #D8D7D2;
  --color-placeholder-bg: #FFF1A8;
  --color-placeholder-text: #4A3B00;
  --color-focus: #1F1D1A;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: clamp(1.05rem, 0.98rem + 0.3vw, 1.25rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  --text-2xl: clamp(2.4rem, 1.6rem + 3.3vw, 4.9rem);
  --text-hero: clamp(3.3rem, 2rem + 5.8vw, 7.4rem);
  --leading-tight: 0.98;
  --leading-body: 1.55;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --container: 76rem;
  --gutter: clamp(1.25rem, 0.6rem + 3vw, 3.25rem);
  --header-h: 4.5rem;
  --ease: cubic-bezier(0.22, 0.75, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 20rem;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.home-shell { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; }
h1, h2, h3, p, blockquote { margin-top: 0; }
h1, h2, h3 { color: var(--color-text); font-weight: 450; text-wrap: balance; }
h1, h2 { font-family: var(--font-display); line-height: var(--leading-tight); letter-spacing: -0.035em; }
h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-2xl); }
h3 { margin-bottom: var(--space-3); font-size: var(--text-xl); line-height: 1.08; letter-spacing: -0.02em; }
p { margin-bottom: var(--space-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }
.view-panel h1[tabindex="-1"]:focus-visible,
.view-panel h2[tabindex="-1"]:focus-visible { outline: none; }
::selection { background: var(--color-text); color: var(--color-bg); }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: fixed; z-index: 100; top: -10rem; left: var(--space-4); padding: 0.6rem 1rem; background: var(--color-text); color: var(--color-bg); text-decoration: none; }
.skip-link:focus { top: var(--space-4); }
.eyebrow {
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}
.fine-print, .contact-note { color: var(--color-text-muted); font-size: var(--text-sm); }
.placeholder { padding: 0.1em 0.28em; background: var(--color-placeholder-bg); color: var(--color-placeholder-text); box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.site-header { position: sticky; z-index: 50; top: 0; background: rgb(255 255 255 / 0.94); border-bottom: 1px solid transparent; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.site-header.is-scrolled { border-color: var(--color-line); }
.header-inner { min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); }
.brand, .team-profile-brand {
  display: inline-flex;
  width: auto;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.55em;
  color: var(--color-text);
  font: 650 clamp(0.9rem, 1.15vw, 1.05rem)/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark-name { letter-spacing: 0.16em; }
.wordmark-paren { font-weight: 450; }
.nav-toggle { display: none; min-height: 44px; padding: var(--space-2); border: 0; background: transparent; color: var(--color-text); font: 600 var(--text-sm)/1 var(--font-body); cursor: pointer; align-items: center; gap: var(--space-2); }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 1.5px; background: currentColor; transition: transform 180ms var(--ease), opacity 180ms var(--ease); }
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }
.nav-menu { display: flex; flex-wrap: wrap; gap: var(--space-2) clamp(1rem, 2.2vw, 2rem); }
.nav-menu a { position: relative; display: block; padding-block: var(--space-2); color: var(--color-text); font-size: clamp(var(--text-sm), 1.15vw, var(--text-base)); text-decoration: none; }
.nav-menu a::after { content: ""; position: absolute; right: 0; bottom: 0.3rem; left: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 180ms var(--ease); }
.nav-menu a:hover::after, .nav-menu a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

/* The Home intro scales the network past the window edge for ~1s; clip only
   horizontally so no scrollbar flashes (off-screen parts are invisible anyway). */
.view-stage { min-height: 0; overflow-x: clip; }
.view-panel { padding-block: clamp(3rem, 6vw, 5.5rem); border-top: 1px solid var(--color-line); }
.view-panel:first-child { border-top: 0; }
.js .view-panel.is-active { animation: panel-in 420ms var(--ease) both; }
.compact-layout { display: grid; gap: clamp(2.5rem, 5vw, 5rem); }
.view-heading { max-width: 52rem; }
.view-heading h2 { margin-bottom: var(--space-5); }
.view-heading > p:last-child, .split-heading > p { max-width: 32rem; color: var(--color-text-muted); font-size: var(--text-lg); }
#services .view-heading, #services .view-heading > p:last-child { max-width: none; }
.split-heading { display: grid; max-width: none; gap: var(--space-6); }
.split-heading blockquote { margin: 0; padding-left: var(--space-5); border-left: 1px solid var(--color-text); align-self: end; }
.split-heading blockquote p { font-family: var(--font-display); font-size: var(--text-xl); line-height: 1.25; }
.split-heading blockquote footer { color: var(--color-text-muted); font-size: var(--text-sm); }
.about-heading h2 { font-size: clamp(2.5rem, 4vw, 4.5rem); }
/* "I don't fit into a square, so I create my own circle." Static final state by default. */
.about-aside { align-self: center; }
.square-circle { display: block; width: 8.5rem; height: auto; margin-bottom: var(--space-4); overflow: visible; }
.sc-square, .sc-circle { fill: none; stroke: var(--color-text); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sc-circle-in { opacity: 0; }
.about-intro { max-width: 48rem; margin-top: var(--space-5); color: var(--color-text-muted); font-size: var(--text-lg); }
#about { padding-block: clamp(2rem, 3.5vw, 3.5rem); }
#about .compact-layout { gap: clamp(1.5rem, 3vw, 3rem); }

.home-panel { min-height: calc(100svh - var(--header-h) - 4rem); display: grid; padding-block: clamp(1.5rem, 3vh, 2.75rem); }
.home-layout { min-height: 0; display: grid; align-items: center; gap: clamp(2rem, 5vw, 4.75rem); }
.home-copy { position: relative; z-index: 2; max-width: 37rem; }
.home-copy .eyebrow { margin-bottom: var(--space-5); }
.home-copy h1 { max-width: none; margin-bottom: var(--space-5); font-size: clamp(3.8rem, 5.7vw, 4.9rem); line-height: 0.96; white-space: nowrap; }
.home-lead { max-width: 32rem; color: var(--color-text-muted); font-size: var(--text-lg); line-height: 1.5; }
.home-statement { margin-block: var(--space-5); font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.025em; }
.home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: var(--space-2); padding: 0.8rem 1.25rem; border: 1px solid var(--color-text); color: var(--color-text); font: 650 var(--text-sm)/var(--leading-body) var(--font-body); text-decoration: none; transition: background 160ms, color 160ms, transform 160ms; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--color-text); color: var(--color-bg); }
.button-primary:hover { background: #3B3935; }
.button-quiet { padding-inline: 0; border-color: transparent; }
.network-stage { position: relative; width: min(100%, 34rem); justify-self: end; opacity: 0.84; }
.network-visual { width: 100%; height: auto; overflow: visible; }

.service-list { border-top: 1px solid var(--color-text); }
.service-row { display: grid; gap: var(--space-5); padding-block: var(--space-6); border-bottom: 1px solid var(--color-line); }
.service-row > div { display: flex; align-items: baseline; gap: var(--space-5); }
.service-row h3 { margin: 0; }
.index { color: var(--color-text-muted); font-size: var(--text-xs); }
.service-row > p { color: var(--color-text-muted); }
.services-next { display: grid; gap: var(--space-5); padding-block: var(--space-4) var(--space-2); }
.services-next .eyebrow { margin-bottom: var(--space-2); }
.services-next-title { margin-bottom: var(--space-2); font-family: var(--font-display); font-weight: 450; line-height: 1.15; }
.services-next-copy > p:last-child { color: var(--color-text-muted); }
.services-next-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-6); }

.work-layout { display: grid; gap: clamp(1rem, 2.2vh, 1.5rem); }
#work { padding-block: clamp(1.75rem, 3.5vh, 3rem); }
.work-heading .eyebrow { margin-bottom: var(--space-2); }
.work-heading h2 {
  max-width: none;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.1vw, 3rem);
  font-weight: 450;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.work-heading .eyebrow { margin-bottom: var(--space-2); }
.work-intro { max-width: 42rem; margin: var(--space-2) 0 0; color: var(--color-text-muted); font-size: var(--text-sm); }
.story-list { border-top: 1px solid var(--color-text); }
.story { border-bottom: 1px solid var(--color-line); }
.story summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-1) var(--space-5); padding-block: var(--space-4); cursor: pointer; list-style: none; }
.story summary::-webkit-details-marker { display: none; }
.story-meta { color: var(--color-text-muted); font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; }
.story-index { color: #77746E; letter-spacing: 0; }
.story-title { grid-column: 1; margin: 0; font-family: var(--font-display); font-size: clamp(1.3rem, 1.7vw, 1.55rem); font-weight: 450; }
.story summary:hover .story-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.story-toggle { position: relative; grid-column: 2; grid-row: 1 / span 2; width: 1rem; height: 1rem; color: var(--color-text); }
.story-toggle::before, .story-toggle::after { content: ""; position: absolute; top: 50%; right: 0; left: 0; height: 1px; background: currentColor; }
.story-toggle::after { transform: rotate(90deg); }
.story[open] .story-toggle::after { display: none; }
.story-body { padding-bottom: var(--space-5); }
.story-points { display: grid; gap: var(--space-4); margin: 0; }
.story-points dt { margin-bottom: var(--space-1); font-size: var(--text-xs); font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; }
.story-points dd { margin: 0; max-width: 36rem; color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.5; }
.story-source { margin: var(--space-4) 0 0; color: var(--color-text-muted); font-size: var(--text-xs); }
.story-source a { display: inline-block; padding-block: 0.35rem; color: var(--color-text); }
.work-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4) var(--space-6); }
.work-cta-title { margin-bottom: var(--space-1); font-family: var(--font-display); font-size: var(--text-xl); line-height: 1.15; }
.work-cta p:not(.work-cta-title) { margin: 0; color: var(--color-text-muted); }
.editorial-note { max-width: 40rem; color: var(--color-text-muted); font-size: var(--text-sm); }
.text-link { display: inline-block; padding-block: var(--space-2); font-size: var(--text-sm); font-weight: 650; }

.profile-list { display: grid; border-top: 1px solid var(--color-text); }
.profile { display: flex; flex-direction: column; padding-block: var(--space-6); border-bottom: 1px solid var(--color-line); }
.profile h3 { font-family: var(--font-display); }
.profile p { color: var(--color-text-muted); }
.profile .profile-headline { margin-bottom: var(--space-4); color: var(--color-text); font-size: var(--text-base); font-weight: 650; line-height: 1.4; }
.profile-links { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); margin-top: auto; }
.project-model { display: grid; gap: var(--space-5); padding-top: var(--space-6); border-top: 1px solid var(--color-text); }
.project-model p { margin: 0; }
.project-model strong { display: block; margin-bottom: var(--space-1); }

.contact-panel { display: flex; align-items: center; }
.contact-layout { display: grid; gap: var(--space-7); align-items: center; }
.contact-layout h2 { margin-bottom: 0; }
.contact-visual { width: min(100%, 30rem); margin-top: clamp(1.25rem, 3vh, 2.25rem); color: var(--color-text); }
.contact-visual svg { width: 100%; height: auto; overflow: visible; }
.contact-layout { position: relative; }
/* Fine line joining the untangled scribble to the divider beside it (drawn by main.js). */
.contact-link { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.contact-link path { fill: none; stroke: var(--color-text); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .contact-link.is-drawn path { animation: draw-contact-link 2s var(--ease) forwards; }
.contact-unravel { fill: none; stroke: var(--color-text); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.contact-copy { max-width: 34rem; }
.contact-copy > p:first-child { color: var(--color-text-muted); font-size: var(--text-lg); }
.contact-prompt { margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--color-text); font-weight: 650; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-6); margin-bottom: var(--space-5); }
.contact-note a { display: inline-block; padding-block: 0.2rem; }

.site-footer { align-self: end; border-top: 1px solid var(--color-line); }
.footer-inner { min-height: 4rem; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); color: var(--color-text-muted); font-size: var(--text-xs); }
.footer-inner p { margin: 0; }
.footer-icon { width: 1.6rem; height: 1.6rem; }
.footer-inner a { margin-left: auto; padding-block: var(--space-2); }
.footer-links { display: flex; gap: var(--space-5); margin-left: auto; }
.footer-links a { display: inline-block; margin-left: 0; }

.legal { padding-block: clamp(3rem, 8vw, 7rem); }
.legal .container { max-width: calc(48rem + var(--gutter) * 2); }
.legal h1 { margin-bottom: var(--space-4); font-size: var(--text-2xl); }
.legal h2 { margin: var(--space-7) 0 var(--space-3); font-size: var(--text-xl); }
.legal ul { list-style: disc; padding-left: 1.25rem; margin-bottom: var(--space-4); }
.legal li { margin-bottom: var(--space-2); }
.legal p a { padding-block: 0.2rem; }
.legal-meta { color: var(--color-text-muted); font-size: var(--text-sm); }
.back-link { display: inline-block; margin-top: var(--space-7); font-weight: 650; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.team-profile-shell { min-height: 100svh; background: var(--color-bg); }
.team-profile-page { min-height: 100svh; padding: clamp(0.5rem, 1.5vw, 1.25rem); }
.team-profile-frame { min-height: calc(100svh - clamp(1rem, 3vw, 2.5rem)); display: grid; grid-template-rows: auto 1fr auto; padding-inline: clamp(1rem, 2.2vw, 2rem); border: 1px solid var(--color-line); border-radius: 1.1rem; }
.team-profile-topbar { min-height: clamp(4.5rem, 9vh, 5.75rem); display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); border-bottom: 1px solid var(--color-line); }
/* Team label, then the two arrows: 28px after the label, 16px between arrows. */
.team-profile-nav { display: flex; align-items: center; gap: var(--space-4); }
.team-profile-nav .team-profile-number { margin-right: var(--space-3); white-space: nowrap; }
@media (max-width: 29.99rem) {
  /* Phones: the label and arrows get their own line under the wordmark
     (label left, arrows right), so nothing is squeezed or wrapped. */
  .team-profile-topbar { flex-wrap: wrap; gap: var(--space-2); padding-block: var(--space-3); }
  .team-profile-nav { flex: 1 0 100%; }
  .team-profile-nav .team-profile-number { margin-right: auto; }
}
.team-profile-arrow { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--color-line); border-radius: 50%; color: var(--color-text); font-size: var(--text-base); line-height: 1; text-decoration: none; transition: border-color 160ms; }
.team-profile-arrow:hover { border-color: var(--color-text); }
.team-profile-number { padding-block: var(--space-2); color: var(--color-text-muted); font-size: var(--text-sm); letter-spacing: 0.04em; text-decoration: none; text-transform: uppercase; }
.team-profile-content { min-height: 0; display: grid; gap: clamp(1.5rem, 3vw, 3rem); padding-block: clamp(1.5rem, 3vh, 2.25rem); }
.team-profile-portrait { min-height: 0; margin: 0; overflow: hidden; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: 0.25rem; }
.team-profile-portrait picture { display: contents; }
.team-profile-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; filter: saturate(0.9) contrast(1.01); }
.team-profile-summary { align-self: center; max-width: 39rem; }
.team-profile-role { margin-bottom: var(--space-3); color: var(--color-text-muted); font-size: var(--text-sm); letter-spacing: 0.04em; text-transform: uppercase; }
.team-profile-summary h1 { margin-bottom: var(--space-3); font-family: var(--font-body); font-size: clamp(2rem, 3vw, 3rem); font-weight: 650; letter-spacing: -0.035em; line-height: 1.05; }
.team-profile-tagline { margin-bottom: var(--space-5); color: var(--color-text-muted); font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem); letter-spacing: 0.02em; }
.team-profile-intro { padding-top: var(--space-5); border-top: 1px solid var(--color-line); }
.team-profile-intro p { max-width: 37rem; margin-bottom: var(--space-2); color: var(--color-text-muted); font-size: var(--text-lg); line-height: 1.25; }
.team-experience-trigger { min-height: 44px; padding: var(--space-2) 0; border: 0; background: transparent; color: var(--color-text); font: 650 var(--text-base)/1.3 var(--font-body); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; cursor: pointer; }
.team-profile-footer { min-height: clamp(4.5rem, 9vh, 5.75rem); display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); border-top: 1px solid var(--color-line); }
.team-profile-footer p { margin: 0; color: var(--color-text-muted); font-size: var(--text-sm); letter-spacing: 0.025em; text-transform: uppercase; }
.team-profile-footer a { padding-block: var(--space-2); font-size: var(--text-sm); letter-spacing: 0.04em; text-transform: uppercase; }
.team-experience-dialog { width: min(calc(100% - 2rem), 48rem); max-height: min(86svh, 52rem); padding: 0; border: 1px solid var(--color-line); border-radius: 0.75rem; background: var(--color-bg); color: var(--color-text); box-shadow: 0 1.5rem 5rem rgb(31 29 26 / 0.18); }
.team-experience-dialog::backdrop { background: rgb(31 29 26 / 0.35); backdrop-filter: blur(3px); }
.team-experience-panel { position: relative; padding: clamp(2rem, 6vw, 4.5rem); }
.team-experience-panel h2 { max-width: 15ch; margin-bottom: var(--space-6); font-size: clamp(2rem, 4.5vw, 3.75rem); }
.team-experience-panel > p:not(.eyebrow) { color: var(--color-text-muted); font-size: var(--text-lg); }
.team-experience-panel ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-block: var(--space-6); border-top: 1px solid var(--color-text); }
.team-experience-panel li { padding: var(--space-3) var(--space-3) var(--space-3) 0; border-bottom: 1px solid var(--color-line); color: var(--color-text-muted); }
.team-experience-panel > .eyebrow { padding-right: calc(44px + var(--space-3)); }
.team-experience-close { position: absolute; top: var(--space-4); right: var(--space-4); width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--color-line); border-radius: 50%; background: var(--color-bg); color: var(--color-text); font: 300 1.75rem/1 var(--font-body); cursor: pointer; }
.team-experience-contact { display: inline-block; padding-block: var(--space-2); font-weight: 650; }
/* Without JavaScript the dialog cannot open, so show its content inline instead. */
html:not(.js) .team-experience-trigger,
html:not(.js) .team-experience-close { display: none; }
html:not(.js) .team-experience-dialog { position: static; display: block; margin: var(--space-6) auto; box-shadow: none; max-height: none; }
@media (max-width: 47.99rem) {
  :root { --header-h: 4.25rem; }
  .js .nav-toggle { display: inline-flex; }
  .js .nav-menu { position: absolute; top: var(--header-h); right: 0; left: 0; display: none; flex-direction: column; padding: var(--space-4) var(--gutter) var(--space-6); background: var(--color-bg); border-bottom: 1px solid var(--color-line); }
  .js .nav-menu.is-open { display: flex; }
  .js .nav-menu a { padding-block: var(--space-3); font-size: var(--text-lg); }
  .home-panel { min-height: auto; padding-block: var(--space-6) var(--space-7); }
  .home-layout { gap: var(--space-6); }
  .home-copy h1 { max-width: none; font-size: clamp(2.75rem, 12vw, 3.15rem); line-height: 1; }
  .home-lead { font-size: var(--text-base); }
  .home-statement { margin-block: var(--space-5); }
  .home-actions { gap: var(--space-3) var(--space-5); }
  .network-stage { width: min(100%, 22rem); justify-self: center; margin-top: var(--space-2); opacity: 0.72; }
  #work { padding-block: var(--space-6); }
  .work-heading h2 { font-size: clamp(2rem, 9vw, 2.6rem); }
  .team-profile-frame { display: block; padding-inline: var(--space-4); }
  .team-profile-content { display: flex; flex-direction: column; padding-block: var(--space-5) var(--space-7); }
  .team-profile-portrait { width: 100%; aspect-ratio: 4 / 5; }
  .team-profile-summary { padding-top: var(--space-4); }
  .team-profile-footer { min-height: 5.5rem; flex-wrap: wrap; padding-block: var(--space-4); }
  .team-experience-panel ul { grid-template-columns: 1fr; }
}

@media (max-width: 63.99rem) {
  .home-panel { min-height: auto; }
  .home-layout { min-height: auto; }
  .home-copy { max-width: 42rem; }
  .home-copy h1 { white-space: normal; }
  .network-stage { width: min(100%, 32rem); justify-self: center; }
}

@media (min-width: 40rem) and (max-width: 47.99rem) {
  .about-heading { grid-template-columns: minmax(0, 1.15fr) minmax(15rem, 0.85fr); align-items: center; }
  .about-heading blockquote { align-self: center; }
}

@media (min-width: 48rem) {
  .split-heading { grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr); align-items: end; }
  .about-heading { grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr); align-items: center; }
  .about-heading blockquote { align-self: center; }
  .service-row { grid-template-columns: minmax(14rem, max-content) minmax(0, 1fr); }
  .services-next { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-7); }
  .story-points { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
  .profile-list { grid-template-columns: 1.2fr 1fr 1fr; }
  .profile .profile-headline { min-height: 2.8em; }
  .profile { padding-inline: var(--space-6); border-right: 1px solid var(--color-line); }
  .profile:first-child { padding-left: 0; }
  .profile:last-child { padding-right: 0; border-right: 0; }
  .project-model { grid-template-columns: repeat(3, 1fr); }
  .contact-panel { min-height: 0; }
  .contact-layout { grid-template-columns: 1.2fr 0.8fr; }
  .team-profile-content { grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr); }
}

@media (min-width: 64rem) and (min-height: 42rem) {
  .js body.home-shell { height: 100svh; grid-template-rows: auto minmax(0, 1fr) auto; }
  .js .view-stage { height: 100%; }
  .js .view-panel { height: 100%; min-height: 0; }

  #services { padding-block: clamp(1.25rem, 2.6vh, 2rem) clamp(2rem, 5vh, 3.5rem); }
  #services .compact-layout {
    height: 100%;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: clamp(1rem, 2.2vh, 1.5rem);
  }
  #services .view-heading .eyebrow { margin-bottom: var(--space-2); }
  #services .view-heading h2 { margin-bottom: var(--space-3); font-size: clamp(2.8rem, 4.6vw, 4.5rem); }
  #services .view-heading > p:last-child { margin-bottom: 0; font-size: var(--text-base); }
  #services .service-list { min-height: 0; display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); }
  #services .service-row { align-items: center; padding-block: clamp(0.75rem, 1.8vh, 1.15rem); }
  #services .service-row > p { margin-bottom: 0; line-height: 1.4; }
  .js .home-panel { height: 100%; min-height: 0; align-content: center; }
}

/* When the active view needs more height than the window (set by main.js),
   let it grow and scroll instead of running underneath the footer. */
@media (min-width: 64rem) and (min-height: 42rem) {
  .js body.home-shell.view-overflows { height: auto; min-height: 100svh; }
  .js body.home-shell.view-overflows .view-stage,
  .js body.home-shell.view-overflows .view-panel { height: auto; }
}

@media (min-width: 64rem) {
  .home-layout { grid-template-columns: minmax(0, 0.96fr) minmax(28rem, 1.04fr); }
}

@media (min-width: 48rem) and (max-height: 50rem) {
  #about { padding-block: var(--space-5); }
  #about .compact-layout { gap: 1.25rem; }
  #about .profile { padding-block: 1.25rem; }
  #about .profile h3 { margin-bottom: var(--space-2); }
  #about .profile .profile-headline { margin-bottom: var(--space-3); }
  #about .profile > p:not(.profile-headline) { line-height: 1.45; }
}

@media (min-width: 48rem) and (min-height: 42rem) {
  .team-profile-page { height: 100svh; }
  .team-profile-frame { height: calc(100svh - clamp(1rem, 3vw, 2.5rem)); }
}

@media (prefers-reduced-motion: no-preference) {
  .js .home-panel.is-active .origin-circle { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-origin 0.8s 0.1s var(--ease) forwards; }
  .js .home-panel.is-active .network-lines { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-network 0.9s 0.85s var(--ease) both; }
  .js .home-panel.is-active .network-nodes { opacity: 0; animation: reveal-nodes 0.55s 1.35s var(--ease) forwards; }
  .js .home-panel.is-active .origin-point { opacity: 0; animation: reveal-nodes 0.25s 0.7s linear forwards; }
  .js .home-panel.is-active .network-visual { transform-origin: 37.4% 49%; animation: settle-network 2.25s var(--ease) backwards; }
  .js .home-panel.is-active .home-copy > * { opacity: 0; transform: translateY(0.75rem); animation: reveal-copy 0.6s 1.45s var(--ease) forwards; }
  .js .home-panel.is-active .home-copy > :nth-child(2) { animation-delay: 1.55s; }
  .js .home-panel.is-active .home-copy > :nth-child(3) { animation-delay: 1.65s; }
  .js .home-panel.is-active .home-copy > :nth-child(4) { animation-delay: 1.75s; }
  .js .home-panel.is-active .home-copy > :nth-child(5) { animation-delay: 1.85s; }
}
@media (prefers-reduced-motion: no-preference) {
  .js #about.is-active .sc-square { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sc-draw 0.7s 0.2s var(--ease) both; }
  .js #about.is-active .sc-circle-in { opacity: 1; stroke-dasharray: 1; stroke-dashoffset: 1; animation: sc-draw 0.6s 0.8s var(--ease) both, sc-try 1.4s 1.4s var(--ease) forwards; }
  .js #about.is-active .sc-circle-out { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sc-draw 1.1s 2.6s var(--ease) both; }
}
/* Hidden until each stroke starts drawing (avoids a round-cap dot while waiting). */
@keyframes sc-draw { 0% { stroke-dashoffset: 1; opacity: 0; } 2% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 1; } }
@keyframes sc-try {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3px, 1px); }
  40% { transform: translate(3px, -1px); }
  55% { transform: translate(-1px, 0); }
  80% { transform: translate(16px, 0); opacity: 1; }
  100% { transform: translate(34px, 0); opacity: 0; }
}
@keyframes draw-origin { to { stroke-dashoffset: 0; } }
@keyframes draw-network { from { opacity: 0; stroke-dashoffset: 1; } to { opacity: 1; stroke-dashoffset: 0; } }
@keyframes reveal-nodes { to { opacity: 1; } }
@keyframes settle-network { 0%, 34% { transform: scale(2.2); } 100% { transform: scale(1); } }
@keyframes reveal-copy { to { opacity: 1; transform: translateY(0); } }
@keyframes draw-contact-link { to { stroke-dashoffset: 0; } }
@keyframes panel-in { from { opacity: 0; transform: translateY(0.45rem); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .contact-link.is-drawn path { stroke-dashoffset: 0; }
}
@media (forced-colors: active) { .button { border-color: ButtonText; } .placeholder { forced-color-adjust: none; } }
@media print { .site-header, .home-actions { display: none; } .view-panel[hidden] { display: block !important; } }
