/* Palette "paper & ink", tuned for long reading without eye strain:
   - paper is a soft off-white (#F9F8F5), not pure white, so large areas don't glare;
   - text is dark graphite (14.5:1), not pure black (21:1), which halos on bright screens;
   - body text sits at 8:1 (AAA), the accent at 7:1 (AAA), so nothing is faint;
   - one calm cobalt for meaning, a muted amber only as decoration, nothing neon. */
:root {
  --bg: #F9F8F5;
  --card: #FFFFFF;
  --tile: #F2F1EC;
  --ink: #22252B;
  --muted: #474C56;
  --eyebrow: #676C76;
  --accent: #2D4FA8;
  --amber: #C98A2B;
  --line: #E7E5DF;
  --foot: #1C2133;
  --foot-ink: #F0B866;
  --foot-muted: #AEB4C4;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --display: "Archivo", "Inter", Arial, sans-serif;
  color-scheme: light only; /* light-only by design: no dark theme, and browsers shouldn't auto-darken it */
}

* { box-sizing: border-box; }
/* Type: Inter with optical sizing; tailed l and serifed I so l, I and 1 never look alike */
body {
  margin: 0; overflow-x: clip; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.75;
  font-optical-sizing: auto; font-feature-settings: "cv05", "cv08";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
@media (min-width: 900px) { body { font-size: 1.125rem; } }
a { color: var(--accent); text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.shell { max-width: 1160px; margin: 0 auto; }

/* header */
header { padding-block: 40px 0; }
header .shell { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--display); font-variation-settings: "wdth" 96, "wght" 800; font-size: 1.7rem; color: var(--accent); letter-spacing: -0.02em; line-height: 1; display: inline-flex; align-items: baseline; }
.logo i { display: inline-block; width: 0.32em; height: 0.32em; border-radius: 50%; background: var(--amber); margin-left: 2px; transition: transform .4s cubic-bezier(.3,1.6,.5,1); }
.logo:hover i { transform: translateY(-0.5em); }
.burger { width: 44px; height: 44px; border: 0; background: none; cursor: pointer; display: grid; place-content: center; gap: 7px; position: relative; z-index: 12; }
.burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .35s ease, width .35s ease; }
.burger span:first-child { width: 30px; }
.burger span:last-child { width: 22px; justify-self: end; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); width: 26px; }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); width: 26px; }

/* menu card */
.menu {
  position: fixed; z-index: 11;
  top: calc(env(safe-area-inset-top, 0px) + 18px);
  right: max(16px, env(safe-area-inset-right, 0px));
  width: min(290px, calc(100vw - 32px));
  background: var(--card); border: 1px solid var(--line); border-radius: 4px;
  padding: 76px 40px 36px;
  box-shadow: 0 24px 60px -24px rgba(18, 23, 51, 0.18);
  transform-origin: top right; transform: scale(0.92); opacity: 0; visibility: hidden;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .2s ease, visibility 0s .3s;
}
.menu.open { transform: none; opacity: 1; visibility: visible; transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .2s ease; }
.menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 0.9rem; }
.menu .lbl { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); opacity: .6; margin: 28px 0 12px; }
.menu .socials { display: flex; gap: 22px; margin-top: 30px; font-size: 0.72rem; letter-spacing: 0.06em; }
.menu a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* home */
main { padding-block: 72px 120px; }
.read { max-width: 760px; margin: 0 auto; padding-left: clamp(0px, 4vw, 24px); }
.eyebrow { font-size: 0.78rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--eyebrow); margin: 0 0 22px; }
.eyebrow::before { content: ""; display: inline-block; width: 18px; height: 2px; background: var(--amber); vertical-align: middle; margin-right: 10px; }
h1.headline { font-weight: 600; font-size: clamp(1.75rem, 3.9vw, 2.5rem); line-height: 1.22; letter-spacing: -0.025em; margin: 0 0 44px; text-wrap: balance; }
h1.headline em { font-style: normal; font-weight: 500; color: var(--accent); }
.read p { margin: 0 0 1.35em; color: var(--muted); max-width: 64ch; text-wrap: pretty; }
.read p strong { color: var(--ink); font-weight: 600; }
/* body links get an underline so they never read as the headline's emphasis colour */
.read p a { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.read p a:hover { color: var(--accent); }
.cta { display: inline-flex; gap: 6px; align-items: center; margin-top: 18px; font-size: 1.05rem; font-weight: 500; padding-bottom: 3px; background: linear-gradient(var(--accent), var(--accent)) left bottom / 100% 2px no-repeat; transition: background-size .35s ease; }
.cta:hover { background-size: 0% 2px; background-position: right bottom; }
.cta .arr { display: inline-block; transition: transform .3s ease; }
.cta:hover .arr { transform: translate(3px, -3px); }

/* work */
.page-title { text-align: center; margin: 0 0 6px; font-weight: 600; font-size: clamp(1.75rem, 3.4vw, 2.25rem); letter-spacing: -0.025em; }
.page-title span { color: var(--muted); font-weight: 500; }
.page-sub { text-align: center; color: var(--muted); font-size: 0.95rem; margin: 0 0 48px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 940px; margin: 0 auto; }
.item {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  display: flex; flex-direction: column;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: translate .7s cubic-bezier(.2,.8,.2,1) calc(var(--i, 0) * 70ms), transform .25s ease, box-shadow .35s ease;
}
.item:hover { translate: 0 -4px; box-shadow: 0 22px 40px -26px rgba(18, 23, 51, 0.28); transition-delay: 0s; }
/* cursor spotlight */
.item::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%); }
.item:hover::after { opacity: 1; }
/* scroll reveal: moves only, never hides */
.item.pre { translate: 0 28px; }
.mark { background: var(--tile); aspect-ratio: 16 / 8; display: grid; place-items: center; }
.mark b { font-family: var(--display); font-size: clamp(1.3rem, 2.4vw, 1.75rem); letter-spacing: -0.02em; font-variation-settings: "wdth" var(--w, 100), "wght" 800; transition: font-variation-settings .5s ease; }
.item:hover .mark b { font-variation-settings: "wdth" 120, "wght" 900; }
.meta { padding: 20px 28px 24px; display: grid; gap: 2px; }
.meta .nm { font-weight: 600; font-size: 0.95rem; }
.meta .what { font-size: 0.875rem; color: var(--muted); line-height: 1.55; margin: 4px 0 8px; }
.meta a, .meta .priv { font-size: 0.875rem; font-weight: 500; overflow-wrap: anywhere; }
.meta .priv { color: var(--muted); }
.meta .tag { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--eyebrow); margin-bottom: 4px; }

/* work groups */
.group { max-width: 940px; margin: 64px auto 0; }
.group-head { display: grid; grid-template-columns: 1fr auto; column-gap: 24px; row-gap: 4px; align-items: end; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.group-head h2 { grid-column: 1; margin: 0; font-size: 1.3rem; font-weight: 600; letter-spacing: -0.015em; }
.group-head p { grid-column: 1; margin: 0; color: var(--muted); font-size: 0.95rem; max-width: 62ch; }
.group-head .count {
  grid-column: 2; grid-row: 1 / span 2; font-family: var(--display); line-height: .85; font-size: clamp(2.6rem, 6vw, 4rem);
  color: color-mix(in srgb, var(--ink) 16%, transparent);
  font-variation-settings: "wdth" 125, "wght" 800;
  transition: font-variation-settings 1.1s cubic-bezier(.2,.8,.2,1), color 1.1s ease;
}
.group.pre .count { font-variation-settings: "wdth" 62, "wght" 200; color: color-mix(in srgb, var(--amber) 70%, transparent); }
/* vibe-coded cards look deliberately lighter-weight: dashed edge, striped tile */
.vibe .item { border-style: dashed; border-color: #D8D5CC; }
.vibe .mark { background: repeating-linear-gradient(135deg, var(--tile) 0 12px, #EDEBE4 12px 24px); }
.vibe .group-head h2::after { content: "AI-built"; margin-left: 10px; vertical-align: 3px; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #8A5A12; background: color-mix(in srgb, var(--amber) 18%, transparent); padding: 3px 8px; border-radius: 999px; }
@media (max-width: 860px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr; } }

/* headline: words settle from light to their final weight; near the cursor they get heavier */
.headline .w { display: inline-block; transition: font-weight .35s cubic-bezier(.2,.8,.2,1); animation: settle 1s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: calc(120ms + var(--i) * 55ms); }
@keyframes settle { from { font-weight: 300; translate: 0 .22em; } }
/* hand-drawn style highlight that sweeps under the accent phrase */
h1.headline em {
  background: linear-gradient(color-mix(in srgb, var(--amber) 26%, transparent), color-mix(in srgb, var(--amber) 26%, transparent)) left 88% / 100% .3em no-repeat;
  animation: mark 1s cubic-bezier(.6,0,.2,1) 1.1s backwards; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
@keyframes mark { from { background-size: 0% .3em; } }
.eyebrow::before { animation: grow .8s cubic-bezier(.2,.8,.2,1) backwards; }
@keyframes grow { from { width: 0; } }

/* home CTAs */
.cta-row { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; margin-top: 18px; }
.cta-row .cta { margin-top: 0; }
.cta.ghost { color: var(--ink); background-image: linear-gradient(var(--line), var(--line)); }
.cta.ghost:hover { color: var(--accent); }
.magnetic { transition: translate .35s cubic-bezier(.2,.8,.2,1), background-size .35s ease; }

/* smooth fade between home and /work in browsers that support it */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .22s ease both; }
::view-transition-new(root) { animation: vt-in .38s cubic-bezier(.2,.8,.2,1) both; }
@keyframes vt-out { to { opacity: 0; translate: 0 -8px; } }
@keyframes vt-in { from { opacity: 0; translate: 0 12px; } }

/* reading progress: a thin amber line along the top, driven by scroll position */
.progress { position: fixed; z-index: 20; top: env(safe-area-inset-top, 0px); left: 0; right: 0; height: 3px; background: var(--amber); transform-origin: left; transform: scaleX(0); }
@supports (animation-timeline: scroll()) {
  .progress { animation: fill-x linear both; animation-timeline: scroll(root); }
  @keyframes fill-x { to { transform: scaleX(1); } }
}
@supports not (animation-timeline: scroll()) { .progress { display: none; } }

/* logo letters hop in a wave on hover */
.logo .l { display: inline-block; }
.logo:hover .l { animation: hop .5s cubic-bezier(.3,1.6,.5,1) calc(var(--i) * 45ms); }
@keyframes hop { 40% { translate: 0 -0.22em; } }

/* footer headline stretches wider as it scrolls into view */
.foot-big {
  margin: 0 0 72px; font-family: var(--display); line-height: .95; letter-spacing: -0.02em;
  font-size: clamp(2.2rem, 7vw, 5.4rem); color: #E9E6F2;
  font-variation-settings: "wdth" 125, "wght" 800; text-wrap: balance;
}
.foot-big span { color: var(--foot-ink); }
@supports (animation-timeline: view()) {
  .foot-big { animation: stretch linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; }
  @keyframes stretch { from { font-variation-settings: "wdth" 62, "wght" 250; } }
}

/* ticker band: tech stack scrolls slowly, leans with scroll speed */
.ticker { overflow: hidden; border-top: 1px solid var(--line); padding-block: 26px; background: var(--bg); }
.ticker-track { display: flex; width: max-content; animation: ticker 48s linear infinite; transform: skewX(var(--skew, 0deg)); }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker span { font-family: var(--display); font-variation-settings: "wdth" 112, "wght" 800; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1; letter-spacing: -0.02em; color: color-mix(in srgb, var(--ink) 13%, transparent); white-space: nowrap; display: inline-flex; align-items: center; transition: color .3s ease; }
.ticker span::after { content: ""; width: .22em; height: .22em; border-radius: 50%; background: var(--amber); margin: 0 .6em; opacity: .8; }
.ticker span:hover { color: var(--accent); }
@keyframes ticker { to { translate: -50% 0; } }

/* footer */
footer { background: var(--foot); color: var(--foot-ink); padding-block: 110px 40px; }
.foot-top { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; padding-bottom: 70px; border-bottom: 1px solid color-mix(in srgb, var(--foot-ink) 55%, transparent); }
.foot-top .lbl { font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--foot-muted); margin: 0 0 14px; }
.foot-top ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.foot-top .links { align-self: end; }
footer a { color: var(--foot-ink); }
footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-bot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 40px; font-size: 0.95rem; }
.foot-bot nav { display: flex; gap: 32px; }
@media (max-width: 600px) { .foot-top { grid-template-columns: 1fr; } footer { padding-block: 72px 32px; } }

/* entrance */
.rise { animation: rise .8s cubic-bezier(.2,.8,.2,1) both; }
/* motion only, never hides text: if an animation stalls, the page still reads at full contrast */
@keyframes rise { from { transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
  .rise, .headline .w, h1.headline em, .eyebrow::before, .ticker-track, .foot-big, .logo .l { animation: none !important; }
  @view-transition { navigation: none; }
  *, *::before, *::after { transition: none !important; }
}

/* ---------- home hero with the lanyard ID card ---------- */
header { position: relative; z-index: 15; }           /* menu button stays clickable above the band */
.hero { display: grid; gap: 24px; }
.hero { position: relative; }
/* #badge only reserves the card's resting column; the canvas covers the whole hero so the card can swing over the text */
.badge { height: 700px; margin-inline: auto; width: min(420px, 100%); }
.badge-canvas { position: absolute; z-index: 5; pointer-events: none; opacity: 0; transition: opacity .6s ease; }
.badge-canvas.ready { opacity: 1; }
html.grab, html.grab * { cursor: grab; }
html.grabbing, html.grabbing * { cursor: grabbing !important; user-select: none; }
/* words the card can knock aside */
.kw { display: inline-block; }
@media (min-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr) 400px; align-items: start; gap: 40px; }
  .hero .read { margin: 0; }
  /* reach up to the top of the window so the band hangs from the page edge */
  .badge { height: 840px; margin-top: -156px; width: 100%; }
}
