/* Raio site stylesheet, rewritten against the design system spec.
   Same selectors, same section order. Tokens in :root; radius 0 everywhere;
   one shadow only. Fonts load from the existing <link> in each page head,
   so no @import here. */
:root {
  /* ramp, light to dark */
  --n-0:   #FEFDFC; /* raised surface: cards, menus (never #fff) */
  --n-50:  #FAF8F3; /* page background */
  --n-100: #F3F0E8; /* tinted section background */
  --n-200: #E7E4DA; /* hairline border, section divider */
  --n-300: #CECAC0; /* strong border, hover edge, disabled surface */
  --n-400: #A9A69E; /* secondary text on dark */
  --n-500: #908C82; /* non-text greys only: rules, icons, marks */
  --n-600: #747269; /* smallest grey legal as text on paper (4.54:1) */
  --n-700: #5D5B54; /* secondary body text */
  --n-800: #4A4843; /* dark surface step */
  --n-850: #34332F; /* divider on dark */
  --n-900: #2C2B28; /* footer border */
  --n-925: #1C1C1A; /* field surface on dark */
  --n-950: #121212; /* ink */
  /* accent */
  --chartreuse: #C6F235;
  --chartreuse-deep: #9DC81A; /* hover only */
  /* error: never colour alone, always colour plus a square */
  --danger: #E4573D;      /* field border and marker square */
  --danger-text: #F0997B; /* message text on dark only (8.52:1 on ink) */
  /* semantic: surfaces */
  --surface-page: var(--n-50);
  --surface-tint: var(--n-100);
  --surface-raised: var(--n-0);
  --surface-ink: var(--n-950);
  --surface-ink-raised: var(--n-925);
  --surface-disabled: var(--n-300);
  /* semantic: text */
  --text-body: var(--n-950);
  --text-secondary: var(--n-700);
  --text-quiet: var(--n-600);
  --text-on-ink: var(--n-50);
  --text-secondary-on-ink: var(--n-400);
  --text-disabled: var(--n-600);
  /* semantic: borders */
  --border-hairline: var(--n-200);
  --border-strong: var(--n-300);
  --border-interactive: var(--n-500);
  --border-ink: var(--n-950);
  --border-divider-on-ink: var(--n-850);
  --border-footer: var(--n-900);
  --border-field-on-ink: var(--n-600);
  --border-field-on-ink-hover: var(--n-500);
  /* focus: 2px solid ink at 3px offset; chartreuse on dark sections */
  --focus-ring: var(--n-950);
  --focus-ring-on-ink: var(--chartreuse);
  --font-sans: 'Space Grotesk', system-ui, sans-serif;
  --text-12: 12px; --text-13: 13px; --text-14: 14px; --text-16: 16px;
  --text-18: 18px; --text-20: 20px; --text-24: 24px;
  --text-h2: clamp(28px, 3.4vw, 40px);
  --text-h1: clamp(40px, 5.4vw, 64px);
  --weight-regular: 400; --weight-medium: 500; --weight-semibold: 600;
  --leading-body: 1.55; --leading-tight: 1.4; --leading-h2: 1.08; --leading-h1: 1.02;
  --tracking-h1: -0.035em; --tracking-h2: -0.03em; --tracking-heading: -0.015em;
  --tracking-eyebrow: 0.14em; --tracking-chip: 0.04em;
  --space-4: 4px; --space-8: 8px; --space-12: 12px; --space-16: 16px;
  --space-20: 20px; --space-24: 24px; --space-32: 32px; --space-40: 40px;
  --space-48: 48px; --space-64: 64px; --space-96: 96px;
  --radius: 0;
  /* squares (marks): four sizes, four states */
  --mark-8: 8px; --mark-12: 12px; --mark-16: 16px; --mark-24: 24px;
  --page-max: 1180px;
  --page-pad: 48px; /* 24px below 720px */
  --section-pad: 96px;
  --mark: var(--mark-24); /* hero cluster squares, was 20px off-scale */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--surface-page); color: var(--text-body); font-family: var(--font-sans); font-size: var(--text-16); line-height: var(--leading-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
::selection { background: var(--chartreuse); color: var(--n-950); }

a:focus-visible, button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; border-radius: var(--radius); }

.page { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--page-pad); }
@media (max-width: 720px) { .page { padding: 0 var(--space-24); } }

/* ===== marks (hero) ===== */
.cluster { position: relative; }
.mark { position: absolute; width: var(--mark); height: var(--mark); background: var(--n-950); transition: transform 2.2s cubic-bezier(.25,.75,.25,1), opacity 2.2s ease; will-change: transform; }
.mark.stone { background: var(--n-500); }
.mark.hollow { background: var(--n-0); outline: 2px solid var(--border-ink); outline-offset: -2px; }
.mark.lime { background: var(--chartreuse); outline: 2px solid var(--border-ink); outline-offset: -2px; }
.cluster.sorted .mark.pulse { animation: pulse 2.6s ease-in-out 3.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ===== nav ===== */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface-page) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border-hairline); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 0; padding-bottom: 0; min-height: 70px; }
/* brand lockup metrics are deliberate and stay verbatim */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: var(--weight-semibold); font-size: 17px; letter-spacing: -0.02em; }
.brand-mark { display: block; width: 24px; height: 24px; background: var(--chartreuse); outline: 3px solid var(--border-ink); outline-offset: -3px; }
.nav-links { display: flex; align-items: center; gap: var(--space-24); font-size: var(--text-14); color: var(--text-secondary); }
.nav-links a { position: relative; padding-bottom: 2px; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--chartreuse); transition: width .25s ease; }
.nav-links a:hover { color: var(--text-body); }
.nav-links a:hover::after { width: 100%; }
.nav-links a[aria-current="page"] { color: var(--text-body); }
.nav-links a[aria-current="page"]::after { width: 100%; }
.lang { position: relative; margin-left: 10px; display: block; }
@media (max-width: 860px) { .nav.open .lang { margin-left: 0; } }
.lang summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: var(--text-13); color: var(--text-body); padding: 6px var(--space-12); border: 1px solid var(--border-hairline); border-radius: var(--radius); transition: border-color .15s ease; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { border-color: var(--border-interactive); }
.lang[open] summary svg { transform: rotate(180deg); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); display: flex; flex-direction: column; background: var(--surface-raised); border: 1px solid var(--border-hairline); border-radius: var(--radius); padding: 5px; min-width: 140px; box-shadow: 0 12px 30px rgba(18,18,18,.10); }
.lang-menu a { padding: 7px 10px; border-radius: var(--radius); font-size: var(--text-13); color: var(--text-secondary); display: flex; align-items: center; gap: var(--space-8); }
.lang-menu a:hover { background: var(--surface-tint); color: var(--text-body); }
.lang-menu a[aria-current]::before { content: ""; width: var(--mark-8); height: var(--mark-8); background: var(--chartreuse); outline: 1px solid var(--border-ink); outline-offset: -1px; }
.lang-menu a::after { display: none; }
.btn { display: inline-flex; align-items: center; gap: var(--space-8); background: var(--chartreuse); color: var(--n-950); font-weight: var(--weight-semibold); font-size: var(--text-14); padding: 10px var(--space-20); border-radius: var(--radius); transition: transform .15s ease, background .15s ease; }
.btn:hover { background: var(--chartreuse-deep); }
.btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--surface-disabled); color: var(--text-disabled); cursor: not-allowed; transform: none; pointer-events: none; }
.btn.ghost { background: transparent; border-bottom: 1px solid var(--border-interactive); border-radius: var(--radius); padding: 2px 0; font-weight: var(--weight-medium); color: var(--text-secondary); }
.btn.ghost:hover { border-color: var(--border-ink); color: var(--text-body); background: transparent; }
.btn.ghost:active { transform: none; }
.btn.ghost:disabled, .btn.ghost[aria-disabled="true"] { background: transparent; border-color: var(--n-300); color: var(--n-300); }
.btn.dark { background: var(--n-950); color: var(--text-on-ink); }
.btn.dark:hover { background: var(--n-800); }
.nav-burger { display: none; flex-direction: column; justify-content: center; gap: 5px; padding: 12px 0 12px 12px; margin-left: auto; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--n-950); transition: transform .25s ease, opacity .25s ease; }
.nav.open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-burger span:nth-child(2) { opacity: 0; }
.nav.open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav.open .nav-links { display: flex; flex-direction: column; align-items: stretch; gap: 0; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface-page); border-bottom: 1px solid var(--border-hairline); padding: 6px 22px 18px; box-shadow: 0 12px 30px rgba(18,18,18,.10); }
  .nav.open .nav-links a { padding: 13px 0; font-size: var(--text-16); color: var(--text-body); border-bottom: 1px solid var(--border-hairline); }
  .nav.open .nav-links a:last-of-type { border-bottom: 0; }
  .nav.open .nav-links a::after { display: none; }
}

#contact { scroll-margin-top: 0; }
#problems, #method, #about { scroll-margin-top: 0; }

/* ===== hero ===== */
.hero { display: grid; grid-template-columns: 1fr 320px; gap: var(--space-48); padding: var(--section-pad) 0 var(--space-96); }
.hero-figure { min-height: 300px; }
.eyebrow { font-size: var(--text-12); letter-spacing: var(--tracking-eyebrow); text-transform: lowercase; color: var(--text-secondary); margin-bottom: var(--space-16); }
.eyebrow b { color: var(--text-body); font-weight: var(--weight-semibold); }
h1 { font-size: var(--text-h1); line-height: var(--leading-h1); letter-spacing: var(--tracking-h1); font-weight: var(--weight-semibold); margin-left: -0.045em; }
@media (min-width: 861px) {
  h1 { font-size: clamp(38px, 9.9vw - 46px, 64px); }
}
@media (max-width: 860px) {
  h1 br { display: none; }
}
.hero p { color: var(--text-secondary); margin: var(--space-24) 0 var(--space-32); max-width: 40ch; font-size: var(--text-18); }
.hero-ctas { display: flex; gap: var(--space-24); align-items: center; flex-wrap: wrap; }
@media (max-width: 860px) {
  .hero-band > .page { display: flex; flex-direction: column; min-height: calc(100vh - 70px); min-height: min(calc(100svh - 70px), 780px); }
  .hero { grid-template-columns: 1fr; padding: 56px 0 220px; gap: 36px; flex: 1; }
  .hero-figure { display: none; }
}

.meta-strip { display: flex; gap: var(--space-24); align-items: center; border-top: 1px solid var(--border-hairline); padding: var(--space-16) 0 56px; font-size: var(--text-13); color: var(--text-secondary); flex-wrap: wrap; }
@media (max-width: 720px) { .meta-strip { gap: 14px; } }

/* ===== sections ===== */
section { padding: var(--section-pad) 0; border-top: 1px solid var(--border-hairline); }
.sec-head { margin-bottom: var(--space-12); }
h2 { font-size: var(--text-h2); letter-spacing: var(--tracking-h2); line-height: var(--leading-h2); font-weight: var(--weight-semibold); }
.sec-intro { color: var(--text-secondary); max-width: 52ch; margin-bottom: var(--space-48); }

/* problems */
.problems-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border-hairline); border: 1px solid var(--border-hairline); }
.problem { background: var(--surface-page); padding: var(--space-24); transition: background .2s ease; }
.problem:hover { background: var(--surface-raised); }
.p-mark { display: block; width: var(--mark-16); height: var(--mark-16); background: var(--n-950); }
.p-mark.hollow { background: var(--n-0); outline: 2px solid var(--border-ink); outline-offset: -2px; }
.p-mark.stone { background: var(--n-500); }
.p-mark.lime { background: var(--chartreuse); outline: 2px solid var(--border-ink); outline-offset: -2px; }
.problem h3 { font-size: var(--text-18); letter-spacing: var(--tracking-heading); margin: 10px 0 8px; font-weight: var(--weight-semibold); }
.problem p { font-size: var(--text-14); color: var(--text-secondary); }
.problems-note { margin-top: var(--space-24); font-size: var(--text-14); color: var(--text-secondary); }
.problems-note b { color: var(--text-body); font-weight: var(--weight-semibold); }
@media (max-width: 640px) { .problems-grid { grid-template-columns: 1fr; } }

/* method */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-32); }
.step { border-top: 2px solid var(--border-ink); padding-top: var(--space-16); position: relative; }
.step.lit { border-top-color: var(--chartreuse); }
.step .s-num { font-size: var(--text-12); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-eyebrow); color: var(--text-quiet); }
.step h3 { font-size: var(--text-18); margin: 8px 0 8px; letter-spacing: var(--tracking-heading); font-weight: var(--weight-semibold); }
.step p { font-size: var(--text-14); color: var(--text-secondary); }
.step .s-tag { display: inline-block; margin-top: var(--space-12); font-size: var(--text-12); color: var(--text-body); background: var(--surface-tint); padding: 3px 9px; border-radius: var(--radius); }
@media (max-width: 920px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* work */
.proj-single { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--space-48); align-items: start; background: var(--surface-tint); border: 1px solid var(--border-hairline); padding: var(--space-32); margin-bottom: var(--space-48); transition: background .2s ease; }
.proj-single:hover { background: var(--surface-raised); }
.proj-single h3 { font-size: var(--text-20); letter-spacing: var(--tracking-heading); font-weight: var(--weight-semibold); margin-bottom: var(--space-12); }
.proj-single__intro p { color: var(--text-secondary); font-size: var(--text-14); }
.proj-single__detail > p { color: var(--text-secondary); font-size: var(--text-16); margin-bottom: var(--space-24); }
@media (max-width: 820px) { .proj-single { grid-template-columns: 1fr; gap: var(--space-32); padding: var(--space-24) var(--space-20); } }
.work-card { display: block; background: var(--surface-raised); border: 1px solid var(--border-hairline); transition: border-color .15s ease; }
.work-card:hover { border-color: var(--border-interactive); }
.work-card__cover { display: block; width: 100%; background: var(--surface-tint); border-bottom: 1px solid var(--border-hairline); }
.work-card__cover--ph { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; }
.work-card__cover--ph i { width: var(--mark-24); height: var(--mark-24); background: var(--chartreuse); outline: 2px solid var(--border-ink); outline-offset: -2px; }
img.work-card__cover { height: auto; object-fit: cover; }
.work-card-body { display: block; padding: var(--space-24) var(--space-20) var(--space-20); }
.work-card .eyebrow { display: block; margin-bottom: var(--space-8); }
.work-card h3 { font-size: var(--text-18); letter-spacing: var(--tracking-heading); font-weight: var(--weight-semibold); margin-bottom: var(--space-8); }
.work-card-body > p { color: var(--text-secondary); font-size: var(--text-14); margin-bottom: 0; }
.work-points { display: grid; gap: var(--space-12); margin-bottom: var(--space-24); }
.work-points li { position: relative; padding-left: var(--space-24); font-size: var(--text-14); color: var(--text-secondary); }
.work-points li::before { content: ""; position: absolute; left: 0; top: 7px; width: var(--mark-8); height: var(--mark-8); background: var(--n-950); }
.work-points li:nth-child(2)::before { background: var(--n-0); outline: 2px solid var(--border-ink); outline-offset: -2px; }
.work-points li:nth-child(3)::before { background: var(--n-500); }
.work-points li:last-child::before { background: var(--chartreuse); outline: 2px solid var(--border-ink); outline-offset: -2px; }

@media (max-width: 560px) { .work-card { padding: 26px; } }

/* projects page */
.projects-page { padding-top: var(--space-48); padding-bottom: var(--section-pad); }
.projects-page h1 { font-size: var(--text-h2); line-height: var(--leading-h2); letter-spacing: var(--tracking-h2); font-weight: var(--weight-semibold); margin: var(--space-12) 0 var(--space-16); max-width: 18ch; }
.projects-page .lead { color: var(--text-secondary); font-size: var(--text-16); line-height: var(--leading-body); max-width: 62ch; margin-bottom: var(--space-32); }
.projects-page .work-card { margin-bottom: var(--space-8); }

/* about */
.about-wrap p { color: var(--text-secondary); max-width: 56ch; }
.about-wrap p + p { margin-top: var(--space-12); }
.about-wrap p b { color: var(--text-body); font-weight: var(--weight-semibold); }

/* contact */
.contact { text-align: left; background: var(--surface-ink); color: var(--text-on-ink); border-top: 0; }
#about, #problems { background: var(--surface-tint); }
.contact h2 { max-width: 18ch; }
.contact p { color: var(--text-secondary-on-ink); max-width: 46ch; margin: var(--space-20) 0 var(--space-32); }
.contact a:focus-visible, .contact button:focus-visible, .contact input:focus-visible, .contact textarea:focus-visible { outline-color: var(--focus-ring-on-ink); }
.contact-form { display: flex; flex-direction: column; gap: var(--space-16); max-width: 560px; }
.ff-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); }
.contact-form label { display: flex; flex-direction: column; gap: 7px; font-size: var(--text-13); color: var(--text-secondary-on-ink); }
.contact-form input, .contact-form textarea { background: var(--surface-ink-raised); border: 1px solid var(--border-field-on-ink); border-radius: var(--radius); padding: var(--space-12); color: var(--text-on-ink); font: inherit; font-size: var(--text-14); transition: border-color .15s ease; }
.contact-form input:hover, .contact-form textarea:hover { border-color: var(--border-field-on-ink-hover); }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--chartreuse); outline: none; }
.contact-form input:disabled, .contact-form textarea:disabled { border-color: var(--n-300); color: var(--text-secondary-on-ink); cursor: not-allowed; }
.contact-form input:user-invalid, .contact-form textarea:user-invalid { border-color: var(--danger); }
.contact-form .ff-error { display: flex; align-items: center; gap: var(--space-8); font-size: var(--text-13); color: var(--danger-text); }
.contact-form .ff-error::before { content: ""; width: var(--mark-8); height: var(--mark-8); background: var(--danger); flex: none; }
.contact-form textarea { resize: vertical; min-height: var(--space-96); }
.contact-form .btn { align-self: flex-start; margin-top: var(--space-4); }
@media (max-width: 560px) { .ff-row { grid-template-columns: 1fr; } }
.contact .fine { margin-top: var(--space-16); font-size: var(--text-13); color: var(--text-secondary-on-ink); max-width: 56ch; }
.contact .fine a { color: var(--text-secondary-on-ink); border-bottom: 1px solid var(--n-800); }
.contact .fine a:hover { color: var(--text-on-ink); border-color: var(--text-on-ink); }
.status { display: inline-flex; align-items: center; gap: 9px; font-size: var(--text-13); font-weight: var(--weight-medium); color: var(--chartreuse); margin-bottom: var(--space-20); }
.status-dot { width: var(--mark-8); height: var(--mark-8); background: var(--chartreuse); animation: pulse 2.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .status-dot { animation: none; } }

/* footer */
footer { background: var(--surface-ink); border-top: 1px solid var(--border-footer); padding: var(--space-24) 0 var(--space-40); }
.foot-inner { display: flex; justify-content: space-between; align-items: center; gap: var(--space-16); flex-wrap: wrap; font-size: var(--text-13); color: var(--text-secondary-on-ink); }
.foot-inner .links { display: flex; gap: var(--space-16); }
.foot-inner a:hover { color: var(--text-on-ink); }

/* reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mark { transition: none !important; animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
}

/* back to top */
.to-top { position: fixed; right: var(--space-24); bottom: var(--space-24); z-index: 60; width: var(--space-48); height: var(--space-48); display: flex; align-items: center; justify-content: center; background: var(--chartreuse); color: var(--n-950); outline: 2px solid var(--border-ink); outline-offset: -2px; border-radius: var(--radius); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .25s ease, transform .25s ease, visibility .25s, background .15s ease; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--chartreuse-deep); }
.to-top:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

/* ===== legal pages ===== */
.legal { padding-top: var(--space-64); padding-bottom: var(--section-pad); }
.legal h1 { font-size: var(--text-h2); line-height: var(--leading-h2); letter-spacing: var(--tracking-h2); font-weight: var(--weight-semibold); margin: var(--space-12) 0 var(--space-32); }
.legal h2 { font-size: var(--text-18); letter-spacing: var(--tracking-heading); font-weight: var(--weight-semibold); margin: var(--space-32) 0 var(--space-8); }
.legal p { color: var(--text-secondary); font-size: var(--text-16); line-height: var(--leading-body); margin: 6px 0; max-width: 85ch; }
.legal .todo { background: var(--surface-tint); border-left: 3px solid var(--chartreuse); padding: var(--space-12) var(--space-16); margin: 10px 0; color: var(--text-secondary); font-size: var(--text-14); line-height: var(--leading-body); max-width: 85ch; }
.legal .back, .projects-page .back { display: inline-block; margin-top: var(--space-40); font-size: var(--text-14); color: var(--text-secondary); border-bottom: 1px solid var(--border-interactive); padding-bottom: 1px; }
.legal .back:hover, .projects-page .back:hover { color: var(--text-body); border-color: var(--border-ink); }

/* Scale the whole layout up by 1.25 to match a 125% browser zoom.
   Applied on wide screens only. Below 1200px the site keeps its normal
   responsive sizing, because forcing 1.25x onto a narrow or phone screen
   pushes content off the side and causes horizontal scrolling. */
@media (min-width: 1200px) {
  body { zoom: 1.25; }
}

/* project card, horizontal */
.proj-list { display: flex; flex-direction: column; gap: var(--space-24); }
.proj-row__ph { flex: 1; border: 1px solid var(--border-hairline); background: var(--surface-tint); display: flex; align-items: center; justify-content: center; min-height: 220px; }
.proj-row__ph span { width: 24px; height: 24px; background: var(--chartreuse); outline: 2px solid var(--border-ink); outline-offset: -2px; }
.proj-row { display: grid; grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); background: var(--surface-raised); border: 1px solid var(--border-hairline); align-items: stretch; transition: background .2s ease; min-height: 384px; }
.proj-row:hover { background: var(--surface-page); }
.proj-row__shot { overflow: hidden; padding: var(--space-32); display: flex; align-items: stretch; }
.proj-row__shot a { display: flex; width: 100%; border: 1px solid var(--border-hairline); transition: border-color .15s ease; }
.proj-row__shot a:hover { border-color: var(--border-ink); }
.proj-row__shot a:focus-visible { outline: 2px solid var(--border-ink); outline-offset: 3px; }
.proj-row__shot img { width: 100%; height: 100%; object-fit: cover; object-position: left top; display: block; }
.proj-row__body { padding: var(--space-32); }
.proj-row__body h3 { font-size: var(--text-20); letter-spacing: var(--tracking-heading); font-weight: var(--weight-semibold); margin-bottom: var(--space-8); }
.proj-row__body > p { color: var(--text-secondary); font-size: var(--text-14); margin-bottom: var(--space-16); }
.proj-row__body .work-points { margin-bottom: var(--space-24); }
@media (max-width: 820px) { .proj-row { grid-template-columns: 1fr; } .proj-row__shot { padding-bottom: 0; max-height: 220px; } .proj-row__body { padding: var(--space-24) var(--space-20); } }

/* projects gallery */
.proj-detail > p { color: var(--text-secondary); font-size: var(--text-16); margin-bottom: var(--space-24); }
.proj-detail .work-points { margin-bottom: var(--space-24); }


/* ===== homepage additions ===== */

/* About dropdown in the nav */
.navsub { position: relative; display: inline-flex; align-items: center; }
.navsub > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); padding-bottom: 2px; transition: color .15s ease; font-size: var(--text-14); }
.navsub > summary::-webkit-details-marker { display: none; }
.navsub > summary:hover { color: var(--text-body); }
.navsub-label { position: relative; }
.navsub-label::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 0; background: var(--border-ink); transition: width .2s ease; }
.navsub:hover .navsub-label::after, .navsub[open] .navsub-label::after { width: 100%; }
.navsub-chev { transition: transform .2s ease; }
.navsub[open] .navsub-chev { transform: rotate(180deg); }
.navsub-menu { position: absolute; top: calc(100% + 12px); left: -12px; display: flex; flex-direction: column; background: var(--surface-raised); border: 1px solid var(--border-hairline); border-radius: var(--radius); padding: 5px; min-width: 168px; z-index: 60; box-shadow: 0 12px 30px rgba(18,18,18,.10); }
.navsub-menu a { padding: 9px var(--space-12); font-size: var(--text-14); color: var(--text-secondary); white-space: nowrap; }
.navsub-menu a:hover { background: var(--surface-tint); color: var(--text-body); }
.navsub-menu a::after { display: none; }

@media (max-width: 860px) {
  .nav.open .navsub { display: block; }
  .nav.open .navsub > summary { padding: 13px 0; font-size: var(--text-16); color: var(--text-body); border-bottom: 1px solid var(--border-hairline); justify-content: space-between; }
  .nav.open .navsub-menu { position: static; box-shadow: none; border: 0; padding: 2px 0 8px 14px; min-width: 0; }
  .nav.open .navsub-menu a { padding: 10px 0; font-size: var(--text-14); }
}

/* example and fit sections share the tint background */
#example, #fit { background: var(--surface-tint); }

/* fit check */
.fit-list { display: grid; gap: var(--space-12); margin-bottom: var(--space-24); max-width: 60ch; }
.fit-check { position: relative; display: block; padding-left: var(--space-32); font-size: var(--text-18); line-height: var(--leading-tight); color: var(--text-body); cursor: pointer; }
.fit-check input { position: absolute; left: 0; top: 3px; width: var(--mark-16); height: var(--mark-16); appearance: none; -webkit-appearance: none; margin: 0; background: var(--n-0); outline: 2px solid var(--border-ink); outline-offset: -2px; cursor: pointer; }
.fit-check:hover input { outline-color: var(--border-interactive); }
.fit-check input:checked { background: var(--chartreuse); outline-color: var(--border-ink); }
.fit-check input:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.fit-cta { font-size: var(--text-16); color: var(--text-secondary); max-width: 60ch; }
.fit-cta .fit-cta-link { display: block; margin-top: var(--space-16); }
.fit-cta a { color: var(--text-body); font-weight: var(--weight-semibold); border-bottom: 2px solid var(--chartreuse); padding-bottom: 1px; }
.fit-cta a:hover { border-color: var(--border-ink); }

/* faq */
.faq-list { max-width: 760px; border-top: 1px solid var(--border-hairline); }
.faq-item { border-bottom: 1px solid var(--border-hairline); }
.faq-item > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--space-16); padding: var(--space-16) 0; font-weight: var(--weight-semibold); font-size: var(--text-18); letter-spacing: var(--tracking-heading); color: var(--text-body); }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after { content: "+"; font-size: var(--text-20); font-weight: var(--weight-regular); line-height: 1; color: var(--n-500); flex: none; }
.faq-item[open] > summary::after { content: "\2212"; }
.faq-item > summary:hover, .faq-item > summary:hover::after { color: var(--text-body); }
.faq-a { padding: 0 0 var(--space-20); max-width: 64ch; }
.faq-a p { color: var(--text-secondary); font-size: var(--text-16); line-height: var(--leading-body); }
.faq-a p + p { margin-top: 10px; }

/* hero band with floating-squares canvas */
.hero-band { position: relative; overflow: hidden; padding: 0; border-top: 0; background: var(--surface-page); }
#hero-space { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; pointer-events: none; }
