/* marciskandar.com — dark theme (Signal Room direction) */
@font-face { font-family: "Garet"; src: url("../fonts/Garet-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Garet"; src: url("../fonts/Garet-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --deep: #0A2327;
  --ink: #0E2E33;
  --ink-2: #14454C;
  --teal: #126B73;
  --signal: #1FB5A8;
  --lt: #9FD3D7;
  --tint: #E3EEEE;
  --paper: #F7F8F7;
  --line: rgba(159, 211, 215, 0.18);
  --card: rgba(14, 46, 51, 0.7);
  --surface-1: #0E2E33;
  --surface-2: #123A40;
  --surface-3: #17474F;
  --display: "Garet", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 104px; background: var(--deep); color-scheme: dark; }
body { margin: 0; background: var(--deep); color: #FFFFFF; font-family: var(--body); font-size: 18px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--lt); }
a:hover { color: var(--signal); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
section[id] { scroll-margin-top: 96px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--signal); color: var(--deep); padding: 10px 16px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 16px; }

.page { position: relative; overflow-x: clip; }
.wrap { position: relative; max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.stack-xl { display: flex; flex-direction: column; gap: 128px; }

/* background mesh */
.mesh { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; will-change: transform; }
.mesh.m1 { width: 620px; height: 620px; right: -160px; top: -180px; background: radial-gradient(circle, rgba(31,181,168,.42), rgba(31,181,168,0) 65%); animation: drift1 18s ease-in-out infinite alternate; }
.mesh.m2 { width: 560px; height: 560px; left: -220px; top: 420px; background: radial-gradient(circle, rgba(18,107,115,.55), rgba(18,107,115,0) 65%); animation: drift2 22s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(-120px, 80px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(140px, -60px) scale(.9); } }

/* nav */
.nav-shell { position: sticky; top: 12px; z-index: 40; padding-top: 12px; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: rgba(14,46,51,.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 999px; padding: 8px 10px 8px 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #FFFFFF; }
.brand-mark { width: 40px; height: 40px; border-radius: 999px; background: var(--paper); display: grid; place-items: center; flex: none; }
.brand-mark img { width: 24px; height: auto; }
.brand-word { font-family: var(--display); font-weight: 800; font-size: 14px; letter-spacing: 2.2px; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 16px; }
.nav-links a { color: var(--tint); text-decoration: none; padding: 10px 4px; }
.nav-links a[aria-current="page"]:not(.btn) { box-shadow: inset 0 -2px 0 var(--signal); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--signal); }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); color: #FFFFFF; border-radius: 999px; width: 44px; height: 44px; cursor: pointer; }
.menu-toggle span { display: block; width: 18px; height: 2px; background: currentColor; margin: 4px auto; transition: transform .3s var(--ease), opacity .3s; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; font-weight: 700; font-size: 16px; text-decoration: none; transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s; }
.btn-primary { background: var(--signal); color: var(--deep); }
.btn-primary:hover { color: var(--deep); background: #3CCABD; transform: translateY(-2px); }
.btn-ghost { border: 1px solid rgba(159,211,215,.45); color: #FFFFFF; font-weight: 600; }
.btn-ghost:hover { color: #FFFFFF; border-color: var(--signal); transform: translateY(-2px); }
.btn-sm { min-height: 44px; padding: 0 20px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* type */
.eyebrow { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--lt); margin: 0; }
.dot { width: 8px; height: 8px; border-radius: 4px; background: var(--signal); animation: live 1.6s ease-in-out infinite; }
@keyframes live { 50% { opacity: .35; } }
.h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(2.6rem, 5.6vw, 5rem); line-height: 1.04; letter-spacing: -1px; }
.h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.08; }
.h3 { margin: 0; font-family: var(--body); font-weight: 700; font-size: clamp(1.35rem, 1.9vw, 1.65rem); line-height: 1.2; letter-spacing: -0.2px; }
.accent { color: var(--signal); }
.lead { margin: 0; font-size: 21px; line-height: 1.55; color: var(--tint); max-width: 640px; }
.body { margin: 0; font-size: 19px; line-height: 1.6; color: var(--tint); }
.muted { color: var(--lt); }
.mono { font-family: var(--mono); }
.label { font-family: var(--mono); font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--lt); }
.num { font-family: var(--display); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.unit { font-family: var(--mono); font-weight: 400; font-size: .32em; color: var(--lt); letter-spacing: 1px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.section-head .note { margin: 0; font-size: 17px; color: var(--lt); max-width: 380px; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }

/* hero */
.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 72px; }
.hero-copy { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.system { flex: 1 1 440px; min-width: 0; border-radius: 28px; border: 1px solid var(--line); background-color: rgba(14,46,51,.55); background-image: linear-gradient(rgba(159,211,215,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(159,211,215,.06) 1px, transparent 1px); background-size: 28px 28px; padding: 20px; }
.system-cols { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; letter-spacing: 1.2px; color: var(--lt); padding: 4px 6px 10px; }
.system svg { width: 100%; height: auto; display: block; }
.flow { stroke-dasharray: 5 9; animation: flow 1.4s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -28; } }
.ring { transform-box: fill-box; transform-origin: center; animation: ring 2.6s ease-out infinite; }
.ring.r2 { animation-delay: 1.3s; }
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.9); opacity: 0; } }

/* run line */
.runline { position: relative; }
.runline-track { position: absolute; left: 0; right: 0; top: 7px; height: 24px; width: 100%; }
.runline-grid { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; }
.step { display: flex; flex-direction: column; gap: 14px; }
.node { width: 22px; height: 22px; border-radius: 11px; border: 3px solid var(--deep); background: var(--signal); box-shadow: 0 0 0 6px rgba(31,181,168,.18); }
.step .num { font-size: 52px; }
.step p { margin: 0; font-size: 16px; line-height: 1.45; color: var(--tint); }

/* cards */
.card { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(23,71,79,.55), rgba(14,46,51,.78)); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 24px 48px -24px rgba(0,0,0,.5); padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.glare { position: relative; overflow: hidden; transition: border-color .3s, transform .3s var(--ease); }
.glare::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(159,211,215,.16) 46%, transparent 62%); transform: translateX(-110%); transition: transform .9s var(--ease); pointer-events: none; }
@media (hover: hover) {
  .glare:hover::before { transform: translateX(110%); }
  .glare:hover { border-color: rgba(31,181,168,.6); transform: translateY(-3px); }
}
.shine { position: relative; overflow: hidden; isolation: isolate; border-radius: 26px; padding: 1.5px; background: var(--line); }
.shine::before { content: ""; position: absolute; inset: -60%; z-index: -1; background: conic-gradient(rgba(31,181,168,0) 0deg, rgba(31,181,168,0) 230deg, var(--signal) 290deg, var(--lt) 310deg, rgba(31,181,168,0) 350deg); animation: spin 6s linear infinite; }
.shine-inner { position: relative; border-radius: 25px; background: var(--ink); padding: 32px 36px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
@keyframes spin { to { transform: rotate(360deg); } }
.float { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.art { height: 120px; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.art-doc { background: var(--paper); }
.art-doc i { display: block; height: 6px; border-radius: 3px; background: #C9D6D6; }
.art-doc i:first-child { height: 10px; width: 60%; background: var(--teal); }
.art-dark { background: rgba(159,211,215,.08); align-items: center; justify-content: center; flex-direction: row; }

/* about */
.about { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.about-copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.facts { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin: 0; }
.facts div { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(159,211,215,.12); }
.facts dt { flex: 0 0 120px; font-family: var(--mono); font-size: 12px; letter-spacing: 1.2px; color: var(--lt); padding-top: 3px; }
.facts dd { margin: 0; font-size: 17px; }
.mosaic { flex: 1.4 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(4, 190px); gap: 14px; }
.photo { position: relative; overflow: hidden; border-radius: 22px; border: 1px solid rgba(159,211,215,.16); margin: 0; }
.photo img { width: 100%; height: 100%; object-fit: cover; animation: kb 22s ease-in-out infinite alternate; }
@keyframes kb { from { transform: scale(1); } to { transform: scale(1.08); } }
.photo figcaption { position: absolute; left: 12px; bottom: 12px; background: rgba(10,35,39,.8); border-radius: 999px; padding: 6px 12px; font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--tint); }

/* doors */
.door { text-decoration: none; border: 1px solid rgba(159,211,215,.22); border-radius: 28px; padding: 36px; display: flex; flex-direction: column; gap: 14px; }
.door-dark { color: #FFFFFF; background: linear-gradient(160deg, rgba(18,107,115,.45), rgba(14,46,51,.8)); }
.door-light { color: var(--ink); background: var(--paper); }
.door-light .label { color: var(--teal); }
.door p { margin: 0; font-size: 17px; line-height: 1.5; }
.door-dark p { color: var(--tint); }
.door-light p { color: #1D2A2C; }
.door .go { font-weight: 700; }
.door-dark .go { color: var(--signal); }
.door-light .go { color: var(--teal); }
.door:hover { color: inherit; }

/* prose pages */
.prose { max-width: 760px; }
.prose p, .prose li { font-size: 19px; line-height: 1.65; color: var(--tint); }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: #FFFFFF; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kpi { border: 1px solid var(--line); border-radius: 20px; background: var(--card); padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.kpi .num { font-size: 40px; }
.kpi p { margin: 0; font-size: 15px; color: var(--tint); line-height: 1.45; }
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.checklist li { display: flex; gap: 12px; font-size: 18px; color: var(--tint); }
.checklist li::before { content: "✓" / ""; color: var(--lt); font-weight: 700; flex: none; }
.chapter { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding: 40px 0; border-top: 1px solid var(--line); }

/* footer */
.footer { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding: 32px 0 48px; margin-top: 32px; }
.footer small { display: block; font-family: var(--mono); font-size: 12px; color: var(--lt); }
.footer small a { display: inline-block; padding: 6px 2px; }

/* reveal on scroll (only when JS runs; content is visible without it) */
.js [data-anim] { opacity: 0; }
.js [data-anim].in { opacity: 1; animation: blurIn .8s var(--ease) backwards; animation-delay: var(--d, 0s); }
@keyframes blurIn { from { opacity: 0; filter: blur(6px); transform: translateY(12px); } to { opacity: 1; filter: blur(0); transform: none; } }
.js .bf { display: inline-block; opacity: 0; }
.js .h1.in .bf { animation: blurIn .8s var(--ease) both; animation-delay: var(--d, 0s); }
.js .draw { stroke-dasharray: 1200; stroke-dashoffset: 1200; }
.js .in .draw, .js .draw.in { animation: draw 2.4s .3s var(--ease) forwards; }
.js .drawsm { stroke-dasharray: 400; stroke-dashoffset: 400; }
.js .in .drawsm { animation: draw 2s .4s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.js .runline .node { background: var(--ink-2); box-shadow: none; }
.js .runline.in .node { animation: lightUp .5s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes lightUp { to { background: var(--signal); box-shadow: 0 0 0 6px rgba(31,181,168,.18); } }

/* phone */
@media (max-width: 860px) {
  body { font-size: 17px; }
  .wrap { padding: 0 16px; }
  .stack-xl { gap: 96px; }
  .hero { padding-top: 40px; }
  .menu-toggle { display: block; }
  .nav { flex-wrap: wrap; border-radius: 28px; }
  .nav-links { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 4px 6px; }
  .menu-open .nav-links { display: flex; }
  .nav-links a { padding: 12px 10px; }
  .nav-links .btn { justify-content: center; margin-top: 8px; }
  .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: 170px; }
  .mosaic .photo { grid-column: auto !important; grid-row: auto !important; }
  .mosaic .photo.big { grid-column: 1 / span 2 !important; }
  .chapter { grid-template-columns: 1fr; gap: 12px; }
  .runline-track { display: none; }
  .runline-grid { gap: 30px; margin-left: 10px; padding-left: 30px; border-left: 2px solid rgba(31,181,168,.6); }
  .step { position: relative; }
  .step .node { position: absolute; left: -42px; top: 0; }
  .shine-inner { padding: 24px; }
  .door { padding: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js [data-anim], .js .bf { opacity: 1; }
  .js .draw, .js .drawsm { stroke-dashoffset: 0; }
  .js .runline .node { background: var(--signal); box-shadow: 0 0 0 6px rgba(31,181,168,.18); }
  .pulses { display: none; }
}

/* ===== audit fixes (v4) ===== */
.h1, .h2, .h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.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; }
.glare:focus-visible::before { transform: translateX(110%); }
.door:focus-visible, .card:focus-visible { outline-offset: 4px; }

/* fail-safes: never leave content invisible */
.js-timeout [data-anim], .js-timeout .bf { opacity: 1 !important; animation: none !important; }
@media print { .js [data-anim], .js .bf { opacity: 1 !important; animation: none !important; } .mesh, .motion-toggle, .nav-shell { display: none; } }

/* pause loops when off screen or when the visitor pauses motion */
.offscreen, .offscreen *, .offscreen *::before, .motion-paused .page *, .motion-paused .page *::before { animation-play-state: paused !important; }

/* full-bleed surface band to break up the dark */
.band { position: relative; }
.band::before { content: ""; position: absolute; z-index: -1; top: -64px; bottom: -64px; left: 50%; width: 100vw; transform: translateX(-50%); background: linear-gradient(180deg, var(--surface-1), var(--deep)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
main { position: relative; z-index: 1; }

/* quick route under the result */
.routes { display: flex; flex-wrap: wrap; gap: 12px; }
.route { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: rgba(14,46,51,.6); color: var(--tint); text-decoration: none; font-size: 16px; transition: border-color .2s, color .2s, transform .2s var(--ease); }
.route:hover { color: #FFFFFF; border-color: var(--signal); transform: translateY(-1px); }
.route .label { font-size: 11px; }

/* tool strip */
.tools { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tools .label { margin-right: 4px; }
.tools span.tool { font-family: var(--body); font-weight: 600; font-size: 17px; color: rgba(227,238,238,.55); transition: color .25s; }
.tools span.tool:hover { color: var(--tint); }

/* five service cards: 3 + 2 */
.grid-5 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.grid-5 > * { grid-column: span 2; }
.grid-5 > :nth-child(4), .grid-5 > :nth-child(5) { grid-column: span 3; }

/* closing section + footer */
.closing { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-end; justify-content: space-between; padding: 64px 0 24px; }
.closing .h2 { font-size: clamp(2.4rem, 5vw, 4rem); }
.email-chip { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 15px; color: var(--tint); border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; text-decoration: none; }
.email-chip:hover { color: #FFFFFF; border-color: var(--signal); }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-links a { color: var(--tint); text-decoration: none; padding: 8px 0; font-size: 15px; }
.foot-links a:hover { color: var(--signal); }

/* motion toggle (WCAG 2.2.2) */
.motion-toggle { position: fixed; left: 16px; bottom: 16px; z-index: 45; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(10,35,39,.92); color: var(--tint); font-family: var(--mono); font-size: 12px; letter-spacing: .8px; cursor: pointer; }
.motion-toggle:hover { border-color: var(--signal); color: #FFFFFF; }
.motion-toggle .ico { width: 10px; height: 10px; display: inline-block; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.motion-paused .motion-toggle .ico { border: 0; width: 0; height: 0; border-left: 9px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }

@media (max-width: 860px) {
  .nav { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(14,46,51,.97); }
  .system { padding: 10px; }
  .grid-5 { grid-template-columns: 1fr; }
  .grid-5 > *, .grid-5 > :nth-child(4), .grid-5 > :nth-child(5) { grid-column: auto; }
  .band::before { top: -40px; bottom: -40px; }
  .motion-toggle { left: auto; right: 12px; bottom: 12px; }
}
@media (min-width: 861px) and (max-width: 1100px) {
  .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-5 > *, .grid-5 > :nth-child(4), .grid-5 > :nth-child(5) { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .shine::before { animation: none !important; transform: rotate(120deg); }
  .motion-toggle { display: none; }
}

/* QA fixes */
.step .num { font-size: clamp(36px, 3.6vw, 52px); }
.kpi .num { font-size: clamp(30px, 3vw, 40px); }
.h3, .card h3 { overflow-wrap: anywhere; hyphens: auto; }
.system { max-width: 640px; margin-inline: auto; }
@media (max-width: 860px) {
  .runline-grid { grid-template-columns: 1fr; }
}
@media (min-width: 600px) and (max-width: 860px) {
  .grid-3 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ===== work / portfolio ===== */
.project { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.project-meta { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.browser { margin: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-1); box-shadow: 0 30px 60px -30px rgba(0,0,0,.7); }
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--lt); }
.browser-bar i { width: 10px; height: 10px; border-radius: 5px; background: rgba(159,211,215,.35); }
.browser-bar span { margin-left: 10px; }
.browser img { width: 100%; height: auto; transition: transform .6s var(--ease); }
.masonry { columns: 3 280px; column-gap: 18px; }
.shot { break-inside: avoid; margin: 0 0 18px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-1); position: relative; }
.shot img { width: 100%; height: auto; transition: transform .6s var(--ease); }
.shot figcaption { position: absolute; left: 12px; bottom: 12px; background: rgba(10,35,39,.82); border-radius: 999px; padding: 6px 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .6px; color: var(--tint); }
.zoom { display: block; cursor: zoom-in; }
@media (hover: hover) { .shot:hover img, .browser:hover img { transform: scale(1.03); } }
.private-card { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.lightbox { padding: 0; border: 0; background: transparent; max-width: min(92vw, 1100px); max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(5,18,20,.88); }
.lightbox img { display: block; max-width: min(92vw, 1100px); max-height: 88vh; width: auto; height: auto; border-radius: 16px; }
.lightbox-close { position: absolute; top: -14px; right: -14px; width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: var(--ink); color: #FFFFFF; font-size: 24px; line-height: 1; cursor: pointer; }
@media (max-width: 860px) {
  .project { grid-template-columns: 1fr; gap: 28px; }
  .lightbox-close { top: 8px; right: 8px; }
}
/* homepage work teaser */
.teaser { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.teaser a { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.teaser img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.teaser span.cap { position: absolute; left: 12px; bottom: 12px; background: rgba(10,35,39,.82); border-radius: 999px; padding: 6px 12px; font-family: var(--mono); font-size: 12px; color: var(--tint); }
@media (hover: hover) { .teaser a:hover img { transform: scale(1.04); } }
@media (max-width: 600px) { .teaser { grid-template-columns: 1fr 1fr; } .teaser a:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; } }

.gallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 250px; gap: 16px; }
.gallery .shot { margin: 0; }
.gallery .shot a, .gallery .shot img { width: 100%; height: 100%; }
.gallery .shot img { object-fit: cover; }
.gallery .shot:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }
.gallery .shot:nth-child(2) { grid-column: 1 / 4; grid-row: 3 / 5; }
.gallery .shot:nth-child(2) img { object-position: 50% 45%; }
.gallery .shot:nth-child(3) { grid-column: 3 / 5; grid-row: 1 / 2; }
.gallery .shot:nth-child(4) { grid-column: 3 / 5; grid-row: 2 / 3; }
.gallery .shot:nth-child(5) { grid-column: 5 / 7; grid-row: 1 / 3; }
.gallery .shot:nth-child(5) img { object-position: 50% 60%; }
.gallery .shot:nth-child(6) { grid-column: 4 / 7; grid-row: 3 / 5; }
.gallery .shot:nth-child(6) img { object-position: 50% 40%; }
@media (max-width: 860px) {
  .gallery { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .gallery .shot:nth-child(n) { grid-column: auto; grid-row: auto; }
  .gallery .shot a, .gallery .shot img { height: auto; }
}

/* hero portrait */
.portrait { position: relative; margin: 0; flex: 1 1 340px; max-width: 400px; margin-inline: auto; }
.portrait-frame { position: relative; aspect-ratio: 2 / 3; border-radius: 200px 200px 28px 28px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 0 0 8px rgba(31,181,168,.08), 0 40px 80px -30px rgba(0,0,0,.7); }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.portrait .chip { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: rgba(10,35,39,.9); border: 1px solid var(--line); font-family: var(--mono); font-size: 12px; letter-spacing: .6px; color: var(--tint); white-space: nowrap; }
.portrait .chip-a { left: -18px; bottom: 22%; animation: float 7s ease-in-out infinite; }
.portrait .chip-b { right: -14px; top: 7%; color: var(--signal); animation: float 7s ease-in-out -3.5s infinite; }
.system-wide { max-width: 760px; }
@media (max-width: 860px) {
  .portrait { max-width: 320px; }
  .portrait .chip-a { left: -6px; }
  .portrait .chip-b { right: -6px; }
}

/* ===== blog ===== */
.post-title { font-size: clamp(2.2rem, 4.6vw, 3.9rem); max-width: 20ch; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 15px; color: var(--lt); }
.byline img { width: 44px; height: 44px; border-radius: 22px; object-fit: cover; object-position: 50% 25%; border: 1px solid var(--line); }
.byline span:first-of-type { color: #FFFFFF; font-weight: 600; }
.post-graphic { margin: 0; max-width: none; padding: 24px; }
.post-graphic svg { width: 100%; height: auto; display: block; }
.post-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; margin-top: 48px; }
.post-side { position: sticky; top: 112px; }
.toc ol { list-style: none; margin: 12px 0 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: 7px 0 7px 16px; color: var(--lt); text-decoration: none; font-size: 15px; line-height: 1.35; }
.toc li a:hover { color: #FFFFFF; }
.post-body { max-width: 720px; }
.post-body h2 { font-family: var(--display); font-weight: 800; font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.15; margin: 56px 0 14px; color: #FFFFFF; }
.post-body h3 { font-family: var(--body); font-weight: 700; font-size: 1.3rem; margin: 32px 0 8px; color: #FFFFFF; }
.post-body p, .post-body li { font-size: 19px; line-height: 1.7; color: var(--tint); }
.post-body p { margin: 0 0 18px; }
.post-body ol, .post-body ul { padding-left: 22px; margin: 0 0 22px; }
.post-body li { margin-bottom: 10px; }
.post-body a { color: var(--signal); text-underline-offset: 3px; }
.post-body a:hover { color: #FFFFFF; }
.post-body strong { color: #FFFFFF; }
.short-answer { border-left: 3px solid var(--signal); padding: 18px 22px !important; background: rgba(31,181,168,.08); border-radius: 0 16px 16px 0; font-size: 20px !important; }
.takeaways { margin-bottom: 32px; }
.takeaways ul { margin: 6px 0 0; }
.takeaways li { font-size: 17px !important; margin-bottom: 6px; }
.callout { margin: 36px 0; padding: 26px 28px; border-radius: 22px; border: 1px solid rgba(31,181,168,.45); background: linear-gradient(160deg, rgba(18,107,115,.35), rgba(14,46,51,.85)); }
.callout .label { color: var(--signal); margin: 0 0 10px; }
.callout p:last-child { margin-bottom: 0; }
.post-body table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: 14px; display: block; overflow-x: auto; }
.post-body th, .post-body td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; color: var(--tint); }
.post-body th { font-family: var(--mono); font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--lt); font-weight: 500; }
.faq { margin-top: 56px; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-of-type { border-bottom: 1px solid var(--line); }
.faq-item summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative; font-size: 19px; font-weight: 700; color: #FFFFFF; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 26px; color: var(--signal); transition: transform .25s var(--ease); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0 0 18px; }
.sources { margin-top: 40px; }
.sources h2 { font-family: var(--mono) !important; font-size: 13px !important; font-weight: 500 !important; margin: 0 0 10px !important; color: var(--lt) !important; }
.sources li { font-size: 15px !important; }
.author { flex-direction: row; gap: 20px; align-items: flex-start; margin-top: 48px; }
.author img { width: 96px; height: 96px; border-radius: 48px; object-fit: cover; object-position: 50% 25%; flex: none; }
.post-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.post-card { text-decoration: none; color: #FFFFFF; gap: 12px; }
.post-card:hover { color: #FFFFFF; }
@media (max-width: 960px) {
  .post-grid { grid-template-columns: 1fr; gap: 24px; }
  .post-side { position: static; }
  .post-graphic { padding: 12px; }
  .author { flex-direction: column; }
}

/* ===== v11 recruiter pass ===== */
/* motion toggle lives in the nav (no longer floats over content) */
.nav .brand { order: 1; }
.nav .nav-links { order: 2; margin-left: auto; }
.nav .motion-toggle { order: 3; position: static; flex: none; width: 44px; height: 44px; min-height: 0; padding: 0; justify-content: center; background: none; border-radius: 999px; }
.nav .menu-toggle { order: 4; }
@media (max-width: 860px) {
  .nav .motion-toggle { order: 2; margin-left: auto; }
  .nav .menu-toggle { order: 3; }
  .nav .nav-links { order: 4; margin-left: 0; }
}
@media (min-width: 861px) and (max-width: 1060px) { .nav-links { gap: 16px; font-size: 15px; } }

/* hero: on phones show a face before the copy, skip the tall portrait */
.hero-id { display: none; }
.hero .lead strong { color: #FFFFFF; font-weight: 600; }
@media (max-width: 860px) {
  .hero-id { display: flex; align-items: center; gap: 12px; }
  .hero-id img { width: 56px; height: 56px; border-radius: 28px; object-fit: cover; object-position: 50% 22%; border: 1px solid var(--line); }
  .hero-id span { display: flex; flex-direction: column; line-height: 1.3; font-size: 16px; font-weight: 600; }
  .hero-id small { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--lt); letter-spacing: .6px; }
  .hero .portrait { display: none; }
}

/* the department board */
.dept { border: 1px solid var(--line); border-radius: 28px; overflow: hidden; background: rgba(14,46,51,.6); box-shadow: 0 40px 80px -40px rgba(0,0,0,.6); }
.dept-head { display: flex; flex-wrap: wrap; gap: 10px 32px; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--lt); }
.dept-head .stats { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.dept-head b { color: #FFFFFF; font-weight: 500; }
.dept-head .on { color: var(--signal); }
.dept-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.fn { position: relative; background: #0D2C31; padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; min-height: 260px; transition: background .3s; }
.fn::before { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 100%; background: var(--signal); transform-origin: left; transform: scaleX(0); }
.fn-top { display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--lt); }
.led { width: 10px; height: 10px; border-radius: 5px; background: var(--signal); box-shadow: 0 0 0 4px rgba(31,181,168,.18); }
.fn h3 { margin: 4px 0 0; font-family: var(--body); font-weight: 700; font-size: 20px; line-height: 1.2; color: #FFFFFF; }
.fn p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--tint); }
.fn .proof { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.fn .proof .num { font-size: clamp(30px, 2.6vw, 38px); color: #FFFFFF; }
.fn .proof .num .unit { font-size: .4em; }
.fn .proof small { font-size: 13px; line-height: 1.35; color: var(--lt); }
@media (hover: hover) { .fn:hover { background: #10373D; } .fn:hover .proof .num { color: var(--signal); } }
.js .dept .fn { opacity: .28; }
.js .dept .led { background: var(--ink-2); box-shadow: none; }
.js .dept.in .fn { animation: fnOn .55s var(--ease) forwards; animation-delay: calc(var(--i) * .16s + .15s); }
.js .dept.in .fn::before { animation: fnLine .5s var(--ease) forwards, fnFade 1.2s ease-out forwards; animation-delay: calc(var(--i) * .16s + .15s), calc(var(--i) * .16s + .7s); }
.js .dept.in .led { animation: lightUp .4s var(--ease) forwards; animation-delay: calc(var(--i) * .16s + .3s); }
@keyframes fnOn { to { opacity: 1; } }
@keyframes fnLine { to { transform: scaleX(1); } }
@keyframes fnFade { to { opacity: 0; } }
@media (max-width: 1100px) { .dept-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fn { min-height: 0; } }
@media (max-width: 600px) { .dept-grid { grid-template-columns: 1fr; } .dept-head { padding: 14px 18px; } .fn { padding: 20px 18px; } }

/* light results band */
.paper { position: relative; color: var(--ink); }
.paper::before { content: ""; position: absolute; z-index: -1; top: -80px; bottom: -80px; left: 50%; width: 100vw; transform: translateX(-50%); background: var(--paper); }
.paper .eyebrow, .paper .label { color: var(--teal); }
.paper .body { color: #1D2A2C; }
.paper a:not(.btn) { color: var(--teal); }
.result-top { display: flex; flex-wrap: wrap; gap: 16px 48px; align-items: flex-end; justify-content: space-between; }
.big-result { font-family: var(--display); font-weight: 800; line-height: .9; letter-spacing: -2px; font-size: clamp(4.5rem, 12vw, 10rem); color: var(--ink); font-variant-numeric: tabular-nums; }
.big-result .accent { color: var(--teal); }
.split { display: flex; flex-direction: column; gap: 12px; }
.split-bar { display: flex; height: 60px; border-radius: 16px; overflow: hidden; background: #DCE6E6; }
.seg { width: var(--w); display: flex; align-items: center; padding: 0 18px; color: #FFFFFF; font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; }
.seg.a { background: var(--teal); }
.seg.b { background: var(--ink); }
.js .seg { width: 0; }
.js .in .seg { width: var(--w); transition: width 1.4s var(--ease) var(--d, .2s); }
.js-timeout .seg { width: var(--w) !important; }
.split-key { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding: 0; list-style: none; font-size: 15px; color: #1D2A2C; }
.split-key li { display: flex; align-items: center; gap: 8px; }
.split-key i { width: 12px; height: 12px; border-radius: 3px; }
.pstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.pstat { border-top: 2px solid var(--ink); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.pstat .num { font-size: clamp(40px, 4vw, 56px); color: var(--ink); }
.pstat .num .from { color: #6B7B7D; font-size: .55em; }
.pstat p { margin: 0; font-size: 16px; line-height: 1.45; color: #1D2A2C; }

/* how I work */
.principle { display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px; padding: 36px 0; border-top: 1px solid var(--line); align-items: baseline; }
.principle:last-child { border-bottom: 1px solid var(--line); }
.principle .n { font-family: var(--mono); font-size: 14px; color: var(--signal); letter-spacing: 1px; }
.principle h3 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.9rem, 3.4vw, 2.8rem); line-height: 1.04; transition: color .3s; }
.principle p { margin: 0; font-size: 18px; line-height: 1.6; color: var(--tint); }
@media (hover: hover) { .principle:hover h3 { color: var(--signal); } }
@media (max-width: 860px) { .principle { grid-template-columns: 1fr; gap: 10px; padding: 28px 0; } }

/* if you're hiring */
.hire { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 36px; align-items: stretch; justify-content: flex-start; }
.plan90 { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding-top: 28px; }
.plan90 .track { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 12px; }
.plan90 .phase { position: relative; display: flex; flex-direction: column; gap: 10px; }
.plan90 .phase::before { content: ""; position: absolute; top: -34px; left: 0; width: 14px; height: 14px; border-radius: 7px; background: var(--signal); box-shadow: 0 0 0 5px rgba(31,181,168,.18); }
.plan90 .h3 { font-size: 22px; }
.plan90 p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--tint); }
.hire-foot { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 28px; }
.hire-foot .label { text-transform: none; letter-spacing: .4px; font-size: 13px; }
@media (max-width: 860px) {
  .plan90 { grid-template-columns: 1fr; padding: 0 0 0 30px; gap: 26px; border-left: 2px solid rgba(31,181,168,.6); margin-left: 6px; }
  .plan90 .track { display: none; }
  .plan90 .phase::before { top: 4px; left: -39px; }
}

/* work teaser: case-study tile */
.teaser a.case-tile { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; padding: 24px; text-decoration: none; color: #FFFFFF; background: radial-gradient(120% 80% at 100% 0%, rgba(31,181,168,.35), rgba(31,181,168,0) 60%), linear-gradient(160deg, #14454C, #0E2E33); }
.case-tile .h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.case-tile .leds { display: grid; grid-template-columns: repeat(4, 14px); gap: 10px; }
.case-tile .leds i { width: 14px; height: 14px; border-radius: 7px; background: var(--signal); box-shadow: 0 0 0 4px rgba(31,181,168,.16); animation: live 1.6s ease-in-out infinite; }
.case-tile .leds i:nth-child(2n) { animation-delay: .4s; } .case-tile .leds i:nth-child(3n) { animation-delay: .8s; }
.case-tile .go { color: var(--signal); font-weight: 700; }
.case-tile .cap { position: static !important; align-self: flex-start; }
.about .route { align-self: flex-start; }

@media (prefers-reduced-motion: reduce) {
  .js .dept .fn { opacity: 1; }
  .js .dept .led { background: var(--signal); box-shadow: 0 0 0 4px rgba(31,181,168,.18); }
  .js .seg { width: var(--w); }
}
.js-timeout .dept .fn { opacity: 1 !important; }
@media (max-width: 420px) {
  .nav { gap: 8px; padding: 6px 8px 6px 8px; }
  .brand { gap: 10px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-word { font-size: 13px; letter-spacing: 1.6px; }
  .nav .motion-toggle { width: 40px; height: 40px; }
}
@media (max-width: 700px) { .seg .nm { display: none; } }

/* ===== v14 space theme + toolkit ===== */
/* starfield: two fixed layers behind everything; the paper band covers them */
.page::before, .page::after { content: ""; position: fixed; left: 0; right: 0; top: 0; height: calc(100vh + 600px); pointer-events: none; z-index: 0; background-repeat: repeat; }
.page::before { background-image: url("../img/stars-a.svg"); background-size: 600px 600px; opacity: .55; animation: drift 240s linear infinite, twinkleA 7s ease-in-out infinite alternate; }
.page::after { background-image: url("../img/stars-b.svg"); background-size: 600px 600px; background-position: 220px 140px; opacity: .45; animation: drift 160s linear infinite, twinkleB 11s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translateY(-600px); } }
@keyframes twinkleA { from { opacity: .55; } to { opacity: .25; } }
@keyframes twinkleB { from { opacity: .2; } to { opacity: .6; } }
.band::before { background: linear-gradient(180deg, rgba(14,46,51,.6), rgba(10,35,39,.2)); }
.motion-paused .page::before, .motion-paused .page::after { animation-play-state: paused; }

/* constellation over the department board (drawn by site.js along the grid lines) */
.dept-grid { position: relative; }
.constellation { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 2; }
.constellation path { fill: none; stroke: var(--signal); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgba(31,181,168,.7)); }
.constellation .star { fill: #FFFFFF; transform-box: fill-box; transform-origin: center; filter: drop-shadow(0 0 5px rgba(159,211,215,.9)); }
.js .constellation path { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.js .dept.in .constellation path { animation: draw 1.5s .15s linear forwards; }
.js .constellation .star { opacity: 0; transform: scale(.2); }
.js .dept.in .constellation .star { animation: starOn .5s var(--ease) forwards, glint 3.2s ease-in-out infinite alternate; animation-delay: calc(var(--i) * .16s + .2s), calc(var(--i) * .16s + .8s); }
@keyframes starOn { to { opacity: 1; transform: scale(1); } }
@keyframes glint { from { opacity: 1; } to { opacity: .45; } }

/* toolkit */
.toolkit { display: flex; flex-direction: column; gap: 22px; padding: 28px 0 4px; border-top: 1px solid var(--line); }
.tk-head { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.partner { margin: 0; display: flex; align-items: center; gap: 14px; }
.badge-plate { display: grid; place-items: center; width: 92px; height: 80px; border-radius: 14px; background: #FFFFFF; flex: none; }
.badge-plate img { width: 74px; height: auto; }
.partner figcaption { display: flex; flex-direction: column; line-height: 1.3; font-size: 15px; color: var(--tint); }
.partner figcaption b { color: #FFFFFF; font-weight: 600; }
.partner figcaption small { font-family: var(--mono); font-size: 11px; letter-spacing: .6px; color: var(--lt); }
.tk-groups { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px 36px; }
.tk-groups > div { display: flex; flex-direction: column; gap: 10px; }
.tk-groups dt { font-family: var(--mono); font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--lt); }
.tk-groups dd { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-t { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(14,46,51,.55); font-size: 15px; color: var(--tint); transition: border-color .2s, color .2s; }
@media (hover: hover) { .chip-t:hover { border-color: var(--signal); color: #FFFFFF; } }
.creds { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }

/* Pause motion = show everything in its finished state (the choice is remembered across visits) */
.motion-paused [data-anim], .motion-paused .bf { opacity: 1 !important; animation: none !important; filter: none !important; transform: none !important; }
.motion-paused .draw, .motion-paused .drawsm { stroke-dashoffset: 0 !important; animation: none !important; }
.motion-paused .dept .fn { opacity: 1 !important; animation: none !important; }
.motion-paused .dept .led { background: var(--signal) !important; box-shadow: 0 0 0 4px rgba(31,181,168,.18) !important; animation: none !important; }
.motion-paused .runline .node { background: var(--signal) !important; box-shadow: 0 0 0 6px rgba(31,181,168,.18) !important; animation: none !important; }
.motion-paused .seg { width: var(--w) !important; transition: none !important; }
.motion-paused .constellation path { stroke-dashoffset: 0 !important; animation: none !important; }
.motion-paused .constellation .star { opacity: 1 !important; transform: none !important; animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .page::before { opacity: .45; } .page::after { opacity: .4; }
  .js .constellation path { stroke-dashoffset: 0; }
  .js .constellation .star { opacity: 1; transform: none; }
}
.js-timeout .constellation path { stroke-dashoffset: 0 !important; }
.js-timeout .constellation .star { opacity: 1 !important; transform: none !important; }
.constellation.static path { animation: none !important; stroke-dashoffset: 0 !important; }
.constellation.static .star { opacity: 1 !important; transform: none !important; animation: glint 3.2s ease-in-out infinite alternate !important; }
.page::before, .page::after { z-index: -1; }
@keyframes twinkleA { from { opacity: .7; } to { opacity: .4; } }
@keyframes twinkleB { from { opacity: .35; } to { opacity: .85; } }
.teaser img[src*="nurture-site"] { object-position: 88% 50%; }

/* ===== v17 visible starfield ===== */
/* body painted its own background over the z-index:-1 star layers; let the html canvas carry the colour */
body { background: transparent; }
.page::before { opacity: 1; animation: drift 150s linear infinite; }
.page::after { opacity: 1; background-position: 0 0; animation: drift 80s linear infinite; }
.motion-paused .page::before { background-image: url("../img/stars-a-static.svg"); }
.motion-paused .page::after { background-image: url("../img/stars-b-static.svg"); }
/* shooting stars (element added by site.js) */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.shoot { position: absolute; left: var(--x, 20%); top: var(--y, 15%); width: 160px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(159,211,215,0), #FFFFFF); filter: drop-shadow(0 0 6px rgba(159,211,215,.9)); opacity: 0; transform-origin: right center; animation: shoot var(--every, 7s) linear infinite; }
@keyframes shoot {
  0% { opacity: 0; transform: rotate(24deg) translateX(0); }
  2% { opacity: 1; }
  13% { opacity: 0; transform: rotate(24deg) translateX(560px); }
  100% { opacity: 0; transform: rotate(24deg) translateX(560px); }
}
.motion-paused .shoot { display: none; }
@media (prefers-reduced-motion: reduce) {
  .page::before { background-image: url("../img/stars-a-static.svg"); opacity: 1; }
  .page::after { background-image: url("../img/stars-b-static.svg"); opacity: 1; }
  .sky { display: none; }
}

/* ===== v18 white MI mark, no circle ===== */
.brand-mark { width: auto; height: auto; background: none; border-radius: 0; }
.brand-mark img { width: auto; height: 30px; }
.brand { gap: 14px; padding-left: 6px; }
@media (max-width: 420px) { .brand-mark img { height: 26px; } .brand { gap: 10px; padding-left: 4px; } }

/* blog diagrams: keep labels readable on phones, swipe sideways */
@media (max-width: 700px) {
  .post-graphic { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .post-graphic svg { min-width: 640px; }
  .post-graphic::before { content: "Swipe to see the full diagram →"; position: sticky; left: 0; display: block; margin: 0 0 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .6px; color: var(--lt); }
}

/* ===== v20 show-your-work, proof links, starlight, now line ===== */
/* each board tile is one big link to its proof (stretched-link pattern) */
.fn-link { color: inherit; text-decoration: none; }
.fn-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.fn-link:focus-visible { outline: none; }
.fn:has(.fn-link:focus-visible) { outline: 2px solid var(--signal); outline-offset: -2px; }
.fn-go { margin-top: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .8px; color: var(--signal); opacity: .7; transition: opacity .2s, transform .2s var(--ease); }
@media (hover: hover) { .fn:hover .fn-go { opacity: 1; transform: translateX(3px); } }
.src { display: none; margin: 6px 0 0; padding-top: 10px; border-top: 1px dashed rgba(159,211,215,.25); font-size: 13px; line-height: 1.45; color: var(--lt); }
.dept.show-src .src, html:not(.js) .src { display: block; }
html:not(.js) .math-toggle { display: none; }
.math-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(10,35,39,.6); color: var(--tint); font-family: var(--mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; transition: border-color .2s, color .2s; }
.math-toggle:hover { border-color: var(--signal); color: #FFFFFF; }
.math-toggle .sw { position: relative; width: 28px; height: 16px; border-radius: 8px; background: var(--ink-2); transition: background .25s; }
.math-toggle .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 6px; background: var(--tint); transition: transform .25s var(--ease); }
.math-toggle[aria-pressed="true"] .sw { background: var(--signal); }
.math-toggle[aria-pressed="true"] .sw::after { transform: translateX(12px); background: #FFFFFF; }
.dept-head .stats { align-items: center; }

/* "How this is counted" under the ~$7M */
.method { border: 1px solid rgba(14,46,51,.16); border-radius: 18px; background: #FFFFFF; padding: 0 22px; max-width: 820px; }
.method summary { cursor: pointer; list-style: none; padding: 16px 32px 16px 0; position: relative; font-weight: 700; font-size: 17px; color: var(--ink); }
.method summary::-webkit-details-marker { display: none; }
.method summary::after { content: "+"; position: absolute; right: 2px; top: 10px; font-size: 26px; color: var(--teal); transition: transform .25s var(--ease); }
.method[open] summary::after { transform: rotate(45deg); }
.method summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; border-radius: 6px; }
.method dl { margin: 0 0 18px; display: flex; flex-direction: column; }
.method dl > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-top: 1px solid rgba(14,46,51,.1); }
.method dt { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--teal); padding-top: 3px; }
.method dd { margin: 0; font-size: 16px; line-height: 1.5; color: #1D2A2C; }
@media (max-width: 600px) { .method dl > div { grid-template-columns: 1fr; gap: 4px; } }

/* Now line in the hero */
.now-line { margin: 4px 0 0; padding-top: 16px; border-top: 1px solid var(--line); max-width: 640px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 15px; line-height: 1.5; color: var(--tint); }
.now-line b { font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--signal); }
.now-line .upd { font-family: var(--mono); font-size: 11px; letter-spacing: .6px; color: var(--lt); }

/* cursor starlight (added by site.js on fine-pointer devices) */
.glow { position: fixed; left: 0; top: 0; width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%; pointer-events: none; z-index: -1; background: radial-gradient(circle, rgba(31,181,168,.16), rgba(31,181,168,.05) 40%, rgba(31,181,168,0) 68%); opacity: 0; transition: opacity .5s; will-change: transform; }
.glow.on { opacity: 1; }
.motion-paused .glow { display: none; }
@media (prefers-reduced-motion: reduce) { .glow { display: none; } }
.now-line { display: block; }
.now-line .dot { display: inline-block; margin-right: 8px; vertical-align: 1px; }
.now-line b { margin-right: 8px; }
.now-line .upd { display: inline-block; margin-left: 6px; }

/* ===== v22 icons, art, badge, about photos ===== */
.badge-plate { background: none; width: 84px; height: 84px; border-radius: 0; }
.badge-plate img { width: 84px; height: auto; }
.fn-ico { width: 64px; height: 64px; margin: 4px 0 2px -6px; mix-blend-mode: lighten; border-radius: 12px; }
.case-tile { position: relative; overflow: hidden; }
.case-tile .tile-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; opacity: .85; mix-blend-mode: lighten; z-index: 0; transition: transform .6s var(--ease); }
.case-tile::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(10,35,39,0) 30%, rgba(10,35,39,.92) 78%); pointer-events: none; }
.case-tile > :not(.tile-art) { position: relative; z-index: 1; }
.case-tile { justify-content: flex-end; }
@media (hover: hover) { .case-tile:hover .tile-art { transform: scale(1.04); } }
.principle { grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; }
.habit-mark { position: relative; width: 112px; height: 112px; }
.habit-mark img { width: 112px; height: 112px; border-radius: 22px; border: 1px solid var(--line); mix-blend-mode: lighten; }
.habit-mark .n { position: absolute; left: 8px; top: 6px; font-size: 12px; }
@media (max-width: 860px) { .habit-mark, .habit-mark img { width: 88px; height: 88px; } }
.hero-art { margin: 0; border-radius: 26px; overflow: hidden; border: 1px solid var(--line); background: #04282D; box-shadow: 0 40px 80px -40px rgba(0,0,0,.6); }
.hero-art img { width: 100%; height: auto; display: block; }
.strip-art figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 18px 22px 20px; border-top: 1px solid var(--line); font-size: 16px; color: var(--tint); }
.strip-art figcaption .num { font-size: 36px; }
.about-photos { flex: 1.4 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.about-photos .mosaic { flex: none; }
.couple { margin: 0; border-radius: 22px; overflow: hidden; border: 1px solid rgba(159,211,215,.16); position: relative; }
.couple img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 58% 55%; }
.couple figcaption { position: absolute; left: 12px; bottom: 12px; background: rgba(10,35,39,.82); border-radius: 999px; padding: 6px 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .6px; color: var(--tint); }
.section-head .facts { margin-top: 8px; }
.teaser a.case-tile { justify-content: flex-end; gap: 14px; }
.teaser a.case-tile::after { background: linear-gradient(180deg, rgba(10,35,39,0) 20%, rgba(10,35,39,.75) 55%, rgba(10,35,39,.96) 85%); }
.teaser a.case-tile .cap { order: -1; position: absolute !important; top: 14px; left: 14px; bottom: auto; }
.couple img { height: auto; }
.fn-ico, .habit-mark img, .hero-art img, .tile-art { height: auto; }
.case-tile .tile-art { height: 100%; }
.habit-mark img { height: 112px; }
@media (max-width: 860px) { .habit-mark img { height: 88px; } }
.fn-go { opacity: 1; }

/* ===== v25 review fixes ===== */
/* habits: the 3-column rule above beat the phone override; restate it last */
@media (max-width: 860px) {
  .principle { grid-template-columns: 1fr; gap: 12px; align-items: start; padding: 28px 0; }
}
/* fewer mono strings: small helper text goes back to the body face */
.fn-go { font-family: var(--body); font-size: 13px; font-weight: 600; letter-spacing: 0; }
.partner figcaption small, .now-line .upd { font-family: var(--body); letter-spacing: 0; font-size: 13px; }
/* the Garet tilde is huge; make "~$7M" read as one figure */
.tilde { font-size: .5em; vertical-align: .35em; margin-right: .04em; }
/* seniority line under the hero copy */
.scope-line { margin: -6px 0 0; font-size: 16px; line-height: 1.5; color: var(--lt); max-width: 640px; }
/* tile stats share a baseline */
.fn .proof small { min-height: 2.7em; }
@media (max-width: 600px) { .fn .proof small { min-height: 0; } .fn .proof { padding-top: 4px; } }
/* case study hero art: keep the glass detail on phones */
@media (max-width: 600px) { .hero-art:not(.strip-art) img { aspect-ratio: 4 / 3; object-fit: cover; object-position: 28% 50%; } }
/* paper band edge */
.paper::before { box-shadow: inset 0 1px 0 rgba(31,181,168,.55); }
/* reputation card icon fills the empty half */
.card-ico { width: 96px; height: auto; margin-top: auto; align-self: flex-end; mix-blend-mode: lighten; border-radius: 16px; }
/* calmer sky on reading pages (class set by site.js) */
.reading .page::before { opacity: .55; }
.reading .page::after { opacity: .45; }
/* second star layer on a different tile size so the repeat doesn't line up */
.page::after { background-size: 870px 870px; animation-name: driftB; }
@keyframes driftB { to { transform: translateY(-870px); } }
/* scroll-scrubbed constellation (site.js drives the line; stars light as it reaches them) */
.constellation.scrub path { animation: none !important; }
.constellation.scrub .star { animation: none; opacity: .18; transform: scale(.55); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.constellation.scrub .star.lit { opacity: 1; transform: none; animation: glint 3.2s ease-in-out infinite alternate; }
.js .dept .constellation.scrub .star, .js .dept.in .constellation.scrub .star { animation: none; opacity: .18; transform: scale(.55); }
.js .dept .constellation.scrub .star.lit, .js .dept.in .constellation.scrub .star.lit { opacity: 1; transform: none; animation: glint 3.2s ease-in-out infinite alternate; }
.motion-paused .constellation .star { transition: none !important; }
