/* Minimal, warm paper in the day and deep ink at night. One accent: the green "live" signal. */
/* Fonts are served from this site (Geist and Geist Mono by Vercel, Instrument Serif by Rodrigo Fuenzalida; all SIL Open Font License),
   latin subset only. If a file is ever replaced, rename it: /assets/fonts/ is cached for a year. */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/assets/fonts/geist.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 500; font-display: swap; src: url(/assets/fonts/geist-mono.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/instrument-serif.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/instrument-serif-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #f6f5f1;
  --bg-raised: #ffffff;
  --ink: #141413;
  --ink-2: #55534d;
  --ink-3: #6b6963;
  --line: rgba(20, 20, 19, 0.1);
  --line-strong: rgba(20, 20, 19, 0.22);
  --dot: 20, 20, 19;
  --live: #16a46b;
  --live-text: #0c7d4f;
  --shadow: 0 1px 2px rgba(20, 20, 19, 0.04), 0 8px 28px rgba(20, 20, 19, 0.06);
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --gutter: 16px;
  --max: 1080px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0d0c;
    --bg-raised: #171715;
    --ink: #f1efe8;
    --ink-2: #b4b1a8;
    --ink-3: #99978f;
    --line: rgba(241, 239, 232, 0.1);
    --line-strong: rgba(241, 239, 232, 0.24);
    --dot: 241, 239, 232;
    --live: #3ddc97;
  --live-text: #3ddc97;
    --live-text: #3ddc97;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0d0c;
  --bg-raised: #171715;
  --ink: #f1efe8;
  --ink-2: #b4b1a8;
  --ink-3: #99978f;
  --line: rgba(241, 239, 232, 0.1);
  --line-strong: rgba(241, 239, 232, 0.24);
  --dot: 241, 239, 232;
  --live: #3ddc97;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}
/* Night sky: a secret theme (the Konami code). */
:root[data-theme="night"] {
  --bg: #05060c;
  --bg-raised: rgba(20, 24, 42, 0.7);
  --ink: #eef0f8;
  --ink-2: #aeb4cc;
  --ink-3: #8a92ae;
  --line: rgba(160, 175, 255, 0.14);
  --line-strong: rgba(160, 175, 255, 0.3);
  --dot: 200, 210, 255;
  --live: #8cffd2;
  --live-text: #8cffd2;
  --shadow: 0 0 0 1px rgba(160, 175, 255, 0.06), 0 10px 40px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.6s ease, color 0.6s ease;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; transition: text-decoration-color 0.2s; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--ink); color: var(--bg); }

#field { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.wrap { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

/* Top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; letter-spacing: -0.01em; }
.mark svg { width: 26px; height: 26px; transition: transform 0.5s cubic-bezier(.2,.8,.2,1); }
.mark:hover svg { transform: rotate(-90deg); }
.bar nav { display: flex; align-items: center; gap: 4px; }
.bar nav a, .icon-btn {
  font: 500 13.5px/1 var(--sans); color: var(--ink-2); text-decoration: none;
  padding: 9px 11px; border-radius: 999px; border: 0; background: none; cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}
.bar nav a:hover, .icon-btn:hover { color: var(--ink); background: var(--line); }
.icon-btn { display: inline-grid; place-items: center; padding: 8px; }
.icon-btn svg { width: 17px; height: 17px; }
@media (max-width: 520px) { .bar nav a.hide-sm { display: none; } }

/* Hero */
.hero { padding: 9vh 0 10vh; }
.status {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12.5px/1 var(--mono); color: var(--ink-2); letter-spacing: 0.01em;
  padding: 8px 13px 8px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-raised);
}
.pulse { position: relative; width: 9px; height: 9px; border: 0; padding: 0; border-radius: 50%; background: var(--live); cursor: pointer; flex: none; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--live); animation: ping 2.4s cubic-bezier(0, 0, 0.2, 1) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.6; } 80%, 100% { transform: scale(3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pulse::after { animation: none; } }
.status .pulse { cursor: default; }
.here { display: inline-flex; align-items: center; gap: 10px; }
.hero h1 {
  font: 400 clamp(46px, 9.5vw, 112px)/0.98 var(--serif);
  letter-spacing: -0.025em; margin: 28px 0 0;
}
.hero h1 em { font-style: italic; color: var(--ink-2); }
.hero h1 .w { display: inline-block; opacity: 0; transform: translateY(0.35em); animation: rise 0.9s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero h1 .w { animation: none; opacity: 1; transform: none; } }
.lede { max-width: 620px; font-size: clamp(17px, 2.1vw, 20px); color: var(--ink-2); margin: 28px 0 0; text-wrap: pretty; }
.lede strong { color: var(--ink); font-weight: 500; }
.hi { font: 500 13px/1 var(--mono); color: var(--ink-2); margin: 0 0 18px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 34px; font: 400 13px/1.4 var(--mono); color: var(--ink-3); }
.meta a { color: var(--ink-2); }
@media (hover: none) { .kbd-hint { display: none; } }

/* Sections */
section { padding: 6vh 0; }
.label { font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 22px; display: flex; align-items: center; gap: 12px; }
.label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
h2 { font: 400 clamp(32px, 5vw, 48px)/1.05 var(--serif); letter-spacing: -0.02em; margin: 0 0 14px; }
h3 { font: 500 19px/1.3 var(--sans); letter-spacing: -0.01em; margin: 0; }
p { margin: 0 0 1em; }

/* Project cards */
.projects { display: grid; gap: 18px; }
@media (min-width: 860px) { .projects { grid-template-columns: 1fr 1fr; } }
.card {
  position: relative; display: grid; grid-template-rows: auto 1fr; overflow: hidden;
  border: 1px solid var(--line); border-radius: 18px; background: var(--bg-raised);
  text-decoration: none; color: inherit; box-shadow: var(--shadow);
  transition: transform 0.5s cubic-bezier(.2,.8,.2,1), border-color 0.3s;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.card .preview { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--line); }
.card .body { padding: 20px 22px 22px; display: grid; gap: 8px; align-content: start; }
.card p { color: var(--ink-2); margin: 0; font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { font: 400 11.5px/1 var(--mono); color: var(--ink-2); padding: 5px 8px; border-radius: 6px; background: var(--line); }
.card .go { position: absolute; right: 18px; bottom: 20px; font: 400 18px/1 var(--sans); color: var(--ink-3); transition: transform 0.3s, color 0.3s; }
.card:hover .go { transform: translateX(4px); color: var(--ink); }
.card.soon { box-shadow: none; border-style: dashed; background: transparent; display: grid; place-items: center; min-height: 72px; align-self: stretch; grid-template-rows: none; align-content: center; text-align: center; padding: 24px; color: var(--ink-3); font: 400 13px/1.5 var(--mono); }
.card.soon:hover { transform: none; }

/* Andromeda preview */
.sky { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 45%, #151b31 0%, #0a0d18 50%, #04050a 100%); }
.sky canvas { width: 100%; height: 100%; }

/* DempIn preview: a phone logging purchases on its own */
.dp { position: absolute; inset: 0; background: #ebe8e0; display: grid; place-items: center; }
.phone {
  width: 46%; max-width: 210px; aspect-ratio: 9 / 17; margin-top: 16%;
  background: #f6f5f2; border-radius: 26px; border: 6px solid #141413;
  box-shadow: 0 20px 40px rgba(20,20,19,0.18); padding: 12px 10px; color: #141413;
  font: 500 9.5px/1.3 var(--sans); overflow: hidden; position: relative;
}
.phone .ph-h { font: 600 11px/1 var(--sans); display: flex; justify-content: space-between; margin-bottom: 8px; }
.phone .ph-h span { color: #67655f; font-weight: 400; }
.budget { display: grid; gap: 6px; margin-bottom: 9px; }
.budget > div { background: #fff; border-radius: 8px; padding: 6px 7px; }
.budget b { display: flex; justify-content: space-between; font-weight: 500; }
.budget b i { font-style: normal; color: #67655f; font-weight: 400; }
.meter { height: 4px; border-radius: 4px; background: #ebe8e0; margin-top: 5px; overflow: hidden; }
.meter span { display: block; height: 100%; width: var(--w, 30%); background: #141413; border-radius: 4px; transition: width 0.9s cubic-bezier(.2,.8,.2,1); }
.rows { display: grid; gap: 4px; }
.row-e { display: flex; justify-content: space-between; background: #fff; border-radius: 7px; padding: 5px 7px; animation: drop 0.5s cubic-bezier(.2,.8,.2,1); }
.row-e i { font-style: normal; color: #67655f; }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }
.notif {
  position: absolute; left: 50%; top: 8%; width: 74%; transform: translate(-50%, -140%);
  background: rgba(255,255,255,0.96); border-radius: 12px; padding: 8px 10px; color: #141413;
  font: 500 10px/1.35 var(--sans); box-shadow: 0 10px 30px rgba(20,20,19,0.15);
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1), opacity 0.4s;
  display: flex; gap: 8px; align-items: center;
}
.notif.in { transform: translate(-50%, 0); }
.notif.out { transform: translate(-50%, 0) scale(0.92); opacity: 0; }
.notif .app { width: 22px; height: 22px; border-radius: 6px; background: #2b8a3e; flex: none; display: grid; place-items: center; color: #fff; font: 700 9px/1 var(--sans); }
.notif small { display: block; color: #67655f; font-weight: 400; }

/* This site's preview: sample visits arriving, the way /stats shows them */
.vf { position: absolute; inset: 0; background: var(--bg); padding: 18px 20px; display: grid; grid-template-rows: auto 1fr; gap: 12px; font: 400 11.5px/1.4 var(--mono); color: var(--ink-2); }
.vf-h { display: flex; gap: 6px; align-items: center; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; font-size: 10.5px; }
.vf-h span:first-child { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
.vf-h i { width: 7px; height: 7px; border-radius: 50%; background: #16a46b; box-shadow: 0 0 0 3px rgba(22, 164, 107, 0.22); }
.vf-rows { display: grid; gap: 6px; align-content: start; overflow: hidden; }
.vf-r { display: grid; grid-template-columns: 38px 52px 1fr; gap: 8px; align-items: baseline; padding: 7px 10px; border-radius: 8px; background: var(--bg-raised); border: 1px solid var(--line); animation: drop 0.5s cubic-bezier(.2,.8,.2,1); white-space: nowrap; }
.vf-r time { color: var(--ink-3); }
.vf-r b { font-weight: 500; color: var(--ink); }
.vf-r span { overflow: hidden; text-overflow: ellipsis; }

.say-hi { margin-top: 22px; font: 500 14px/1 var(--sans); color: var(--bg); background: var(--ink); border: 0; padding: 11px 16px; border-radius: 999px; cursor: pointer; transition: transform 0.2s cubic-bezier(.2,.8,.2,1); }
.say-hi:hover { transform: translateY(-1px); }

/* Approach */
.approach { display: grid; gap: 14px; }
@media (min-width: 760px) { .approach { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 22px; border-radius: 16px; border: 1px solid var(--line); }
.step .n { font: 400 12px/1 var(--mono); color: var(--ink-3); }
.step h3 { margin: 14px 0 6px; }
.step p { color: var(--ink-2); font-size: 15px; margin: 0; }

/* Timeline */
.timeline { display: grid; }
.job { display: grid; grid-template-columns: 1fr; gap: 2px 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.job:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .job { grid-template-columns: 170px 1fr auto; align-items: baseline; } }
.job time { font: 400 13px/1.5 var(--mono); color: var(--ink-3); }
.job b { font-weight: 500; }
.job span { color: var(--ink-2); }
.job em { font-style: normal; font: 400 12.5px/1.5 var(--mono); color: var(--ink-3); }

/* Contact */
.contact { padding: 10vh 0 6vh; }
.contact h2 { font-size: clamp(40px, 7vw, 76px); }
.contact h2 a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.5s cubic-bezier(.2,.8,.2,1); }
.contact h2 a:hover { background-size: 100% 1px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer;
  font: 500 14px/1 var(--sans); color: var(--ink); padding: 12px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent; transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { opacity: 0.86; }

footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; padding: 28px 0 40px; border-top: 1px solid var(--line); font: 400 12.5px/1.5 var(--mono); color: var(--ink-3); }
footer .secrets { display: none; }
footer .secrets.on { display: inline; }
kbd { font: 500 11px/1 var(--mono); padding: 3px 6px; border-radius: 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; color: var(--ink-2); }

/* Reveal on scroll */
/* Sections fade in as they scroll into view. Only when scripts run (the "js" class is set in each page's head),
   and if site.js never takes over, everything shows after a moment anyway. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.2,.8,.2,1); }
.js .reveal.seen { opacity: 1; transform: none; }
.js:not(.reveals) .reveal { animation: reveal-anyway 0.6s 2.5s forwards; }
@keyframes reveal-anyway { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Toasts and overlays */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 140%);
  max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 14px;
  font: 500 14px/1.35 var(--sans); box-shadow: 0 16px 40px rgba(0,0,0,0.25);
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
}
.toast.in { transform: translate(-50%, 0); }
.toast small { display: block; opacity: 0.65; font-weight: 400; font-size: 12.5px; }
.toast .ok { width: 26px; height: 26px; border-radius: 50%; background: var(--live); color: #0d0d0c; display: grid; place-items: center; flex: none; font-size: 14px; }
.overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(10,10,9,0.4); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.overlay.in { opacity: 1; pointer-events: auto; }
.sheet { width: min(440px, 100%); background: var(--bg-raised); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); transform: translateY(10px); transition: transform 0.4s cubic-bezier(.2,.8,.2,1); }
.overlay.in .sheet { transform: none; }
.sheet:focus { outline: none; }
.sheet h3 { font: 400 28px/1.1 var(--serif); margin: 0 0 14px; }
.sheet dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; font-size: 14.5px; }
.sheet dt { text-align: right; }
.sheet dd { margin: 0; color: var(--ink-2); }
.sheet .hint { margin: 18px 0 0; font: 400 12.5px/1.5 var(--mono); color: var(--ink-3); }

/* The pufferfish that swims by now and then */
#puffer { position: fixed; z-index: 40; left: 0; bottom: 14vh; width: 48px; height: 40px; border: 0; padding: 0; background: none; cursor: pointer; display: none; }
#puffer svg { width: 100%; height: 100%; overflow: visible; }

/* Project pages */
.back { font: 500 13px/1 var(--mono); color: var(--ink-3); text-decoration: none; }
.back:hover { color: var(--ink); }
.p-hero { padding: 6vh 0 4vh; }
.p-hero h1 { font: 400 clamp(52px, 10vw, 120px)/0.95 var(--serif); letter-spacing: -0.03em; margin: 18px 0 18px; }
.p-hero .lede { margin-top: 0; }
.p-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 34px 0 0; }
@media (min-width: 720px) { .p-facts { grid-template-columns: repeat(4, 1fr); } }
.p-facts div { background: var(--bg); padding: 16px 18px; }
.p-facts b { display: block; font: 400 30px/1.1 var(--serif); }
.p-facts span { font: 400 12px/1.4 var(--mono); color: var(--ink-3); }
.stage { position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.stage iframe { display: block; width: 100%; height: min(78vh, 680px); border: 0; background: #04050a; }
.stage-cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 12px; font: 400 12.5px/1.5 var(--mono); color: var(--ink-3); }
.prose { max-width: 680px; }
.prose p, .prose li { color: var(--ink-2); font-size: 17px; }
.prose strong { color: var(--ink); font-weight: 500; }
.prose ul { padding-left: 1.1em; margin: 0 0 1em; }
.prose li { margin: 0 0 0.5em; }
.prose li::marker { color: var(--ink-3); }
.two { display: grid; gap: 28px; }
@media (min-width: 860px) { .two { grid-template-columns: 240px 1fr; gap: 40px; align-items: start; } .two .label { position: sticky; top: 24px; } }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th, .tbl td { text-align: left; padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font: 500 12px/1.4 var(--mono); color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
.tbl td:first-child { font-weight: 500; white-space: nowrap; }
.tbl code, .prose code { font: 400 12.5px/1.5 var(--mono); background: var(--line); padding: 2px 5px; border-radius: 5px; color: var(--ink); word-break: break-word; }
.quote { border-left: 2px solid var(--ink); padding: 2px 0 2px 18px; margin: 0 0 1.2em; font: 400 italic 22px/1.4 var(--serif); color: var(--ink); }
.quote cite { display: block; font: 400 12.5px/1.5 var(--mono); font-style: normal; color: var(--ink-3); margin-top: 6px; }
.next { display: flex; justify-content: space-between; gap: 16px; padding: 30px 0; border-top: 1px solid var(--line); }
.next a { text-decoration: none; }
.next small { display: block; font: 400 12px/1.4 var(--mono); color: var(--ink-3); }
.next b { font: 400 30px/1.1 var(--serif); }

/* Recently shipped */
.ship { list-style: none; margin: 0; padding: 0; max-width: 680px; }
.ship li { display: grid; grid-template-columns: 124px 1fr; gap: 8px 18px; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 16.5px; line-height: 1.5; }
.ship li:first-child { padding-top: 0; }
.ship li:last-child { border-bottom: 0; }
.ship-k { justify-self: start; align-self: start; margin-top: 2px; font: 400 11.5px/1 var(--mono); color: var(--ink-2); padding: 5px 8px; border-radius: 6px; background: var(--line); text-decoration: none; white-space: nowrap; }
.ship-k:hover { color: var(--ink); }
.ship-k i { font-style: normal; color: var(--ink-3); }
@media (max-width: 520px) { .ship li { grid-template-columns: 1fr; gap: 8px; } }

/* Flip cards: the back of each project card runs its demo in a phone */
.projects { align-items: start; }
.flip, .solo { position: relative; }
.flip > .card { width: 100%; }
.try {
  position: absolute; z-index: 3; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 7px;
  font: 500 13px/1 var(--sans); color: #141413; background: rgba(255, 255, 255, 0.92); border: 0; cursor: pointer;
  padding: 9px 13px 9px 11px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s cubic-bezier(.2,.8,.2,1), background-color 0.2s;
}
.try:hover { transform: translateY(-1px) scale(1.03); background: #fff; }
.try i { width: 7px; height: 7px; border-radius: 50%; background: #16a46b; box-shadow: 0 0 0 3px rgba(22, 164, 107, 0.22); }
.flip.flipped .try { display: none; }
.card.back { padding: 16px 16px 18px; display: grid; gap: 14px; justify-items: center; grid-template-rows: auto auto auto; }
.card.back:hover { transform: none; }
.back-head { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.back-head b { font: 500 17px/1.2 var(--sans); color: var(--ink); }
.back-head small { display: block; font: 400 12px/1.4 var(--mono); color: var(--ink-3); margin-top: 2px; }
.flip-back { font: 500 13px/1 var(--sans); color: var(--ink); background: transparent; border: 1px solid var(--line-strong); padding: 8px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.flip-back:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.device {
  position: relative; width: min(300px, 100%); aspect-ratio: 9 / 19; padding: 9px; border-radius: 42px;
  background: #141413; box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset, 0 24px 50px rgba(20, 20, 19, 0.22);
}
.device::before { content: ""; position: absolute; z-index: 2; top: 17px; left: 50%; width: 22%; height: 18px; transform: translateX(-50%); border-radius: 999px; background: #141413; pointer-events: none; }
.device-screen { width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: #f6f5f2; }
.flip[data-name="andromeda"] .device-screen { background: #04050a; }
.device iframe { display: block; width: 100%; height: 100%; border: 0; }
.back-foot { width: 100%; display: flex; justify-content: space-between; gap: 12px; font: 400 12.5px/1.5 var(--mono); color: var(--ink-3); }
.back-foot a { color: var(--ink-2); }
@media (max-width: 520px) { .device { width: 100%; max-width: 330px; } }

/* DempIn project page: the mock-up in a phone, with things to try beside it */
.try-stage { display: grid; gap: 28px; align-items: center; justify-items: center; padding: 28px 16px; border-radius: 20px; background: var(--line); }
@media (min-width: 860px) { .try-stage { grid-template-columns: auto 1fr; justify-items: start; padding: 36px 48px; gap: 48px; } }
.try-stage .device { width: min(320px, 100%); }
.try-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; max-width: 380px; }
.try-list li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; color: var(--ink-2); font-size: 15.5px; }
.try-list li b { color: var(--ink); font-weight: 500; }
.try-list .n { font: 400 12px/1.9 var(--mono); color: var(--ink-3); }
.device-screen { display: grid; grid-template-rows: 30px 1fr; }
.sb { display: flex; justify-content: space-between; align-items: center; padding: 2px 22px 0 26px; font: 600 12px/1 var(--sans); color: #141413; }
.flip[data-name="andromeda"] .sb { color: #f2f3f7; }
.sb-i { display: inline-flex; align-items: flex-end; gap: 2px; }
.sb-i i { width: 3px; background: currentColor; border-radius: 1px; }
.sb-i i:nth-child(1) { height: 5px; } .sb-i i:nth-child(2) { height: 7px; } .sb-i i:nth-child(3) { height: 9px; }
.sb-i b { width: 19px; height: 10px; margin-left: 5px; border: 1.5px solid currentColor; border-radius: 3px; background: linear-gradient(90deg, currentColor 65%, transparent 65%) content-box; padding: 1px; }
.device-screen:has(iframe[src*="theme=dark"]) { background: #000; }
.device-screen:has(iframe[src*="theme=dark"]) .sb { color: #f5f5f5; }

/* Timeline: every role opens its story, every year a fun fact */
.hint-line { font: 400 12.5px/1.5 var(--mono); color: var(--ink-3); margin: -10px 0 14px; }
.job { position: relative; }
.job > button { font: inherit; color: inherit; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; }
.job .yr { font: 400 13px/1.5 var(--mono); color: var(--ink-3); text-decoration: underline dotted var(--line-strong); text-underline-offset: 4px; justify-self: start; }
.job .yr:hover, .job .yr[aria-expanded="true"] { color: var(--ink); text-decoration-color: currentColor; }
.job .role b { font-weight: 500; }
.job .role span { color: var(--ink-2); }
.job .role:hover b { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
.job .hl {
  font: 400 12.5px/1.5 var(--mono); color: var(--ink-2); justify-self: start; display: inline-flex; align-items: center; gap: 8px;
  padding: 3px 9px !important; margin: -3px -9px; border-radius: 999px; transition: background-color 0.2s, color 0.2s;
}
.job .hl::after { content: "+"; font: 400 14px/1 var(--sans); color: var(--ink-3); transition: transform 0.3s cubic-bezier(.2,.8,.2,1); }
.job .hl:hover { background: var(--line); color: var(--ink); }
.job .hl[aria-expanded="true"] { background: var(--ink); color: var(--bg); }
.job .hl[aria-expanded="true"]::after { transform: rotate(45deg); color: var(--bg); }
@media (min-width: 720px) { .job .hl { justify-self: end; } }
.job .more { grid-column: 1 / -1; display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s cubic-bezier(.2,.8,.2,1); }
.job.open .more { grid-template-rows: 1fr; }
.job .more-in { overflow: hidden; min-height: 0; }
.job .story, .job .fact { margin: 14px 0 6px; padding: 18px 20px; border-radius: 14px; background: var(--bg-raised); border: 1px solid var(--line); max-width: 760px; }
@media (min-width: 720px) { .job .story, .job .fact { margin-left: 194px; } }
.job .story p { margin: 0 0 10px; color: var(--ink-2); font-size: 15.5px; }
.job .story p:last-child { margin-bottom: 0; }
.job .story .lead { color: var(--ink); font: 400 21px/1.35 var(--serif); }
.job .story .impact { color: var(--ink); font-weight: 500; display: flex; gap: 10px; align-items: baseline; }
.job .story .impact span { flex: none; font: 500 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--bg); background: var(--live); padding: 4px 7px; border-radius: 5px; }
:root[data-theme="dark"] .job .story .impact span, :root[data-theme="night"] .job .story .impact span { color: #0d0d0c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .job .story .impact span { color: #0d0d0c; } }
.job .story .also { font-size: 14px; color: var(--ink-3); }
.job .fact { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: start; }
.job .fact[hidden] { display: none; }
.job .fact .die { grid-row: span 2; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--line); font: 400 20px/1 var(--serif); }
.job .fact small { font: 500 11.5px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.job .fact p { margin: 0; color: var(--ink); font-size: 16px; }
.job .fact .again { grid-column: 2; justify-self: start; margin-top: 6px; font: 500 12.5px/1 var(--sans); color: var(--ink-2); background: none; border: 1px solid var(--line-strong); padding: 7px 11px; border-radius: 999px; cursor: pointer; }
.job .fact .again:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.job.open { background: transparent; }

/* How I build: each card opens a real example */
.step { cursor: pointer; transition: border-color 0.3s, background-color 0.3s; }
.step:hover { border-color: var(--line-strong); }
.step .ex { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s cubic-bezier(.2,.8,.2,1); }
.step.open .ex { grid-template-rows: 1fr; }
.step .ex-in { overflow: hidden; min-height: 0; color: var(--ink); font-size: 15px; line-height: 1.55; }
.step .ex-in b { display: block; margin: 14px 0 4px; font: 500 11.5px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.step .more-hint { margin-top: 14px; font: 500 12.5px/1 var(--sans); color: var(--ink-2); background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.step .more-hint::after { content: "+"; font-size: 15px; transition: transform 0.3s cubic-bezier(.2,.8,.2,1); }
.step.open .more-hint::after { transform: rotate(45deg); }
.step.open { background: var(--bg-raised); }

/* Project snapshot: problem, solution, value, one number, and the stack */
.snap { margin: 34px 0 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--line); display: grid; gap: 1px; }
.snap-grid { display: grid; gap: 1px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .snap-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .snap-grid { grid-template-columns: repeat(4, 1fr); } }
.snap-cell { background: var(--bg); padding: 18px 20px 20px; display: grid; gap: 6px; align-content: start; }
.snap-k { font: 500 11.5px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.snap-cell b { font: 400 22px/1.2 var(--serif); }
.snap-cell.num b { font-size: 44px; line-height: 1; letter-spacing: -0.02em; }
.snap-cell p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.stack { background: var(--bg); padding: 16px 20px 18px; display: grid; gap: 12px; }
.stack-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stack-chips .snap-k { margin-right: 6px; }
.stack-chips button { font: 400 12.5px/1 var(--mono); color: var(--ink-2); background: var(--line); border: 1px solid transparent; padding: 7px 10px; border-radius: 7px; cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.stack-chips button:hover { color: var(--ink); border-color: var(--line-strong); }
.stack-chips button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.stack-note { margin: 0; font-size: 15px; color: var(--ink); min-height: 1.5em; }
.stack-note.idle { color: var(--ink-3); font-size: 14px; }

/* This site's page: the architecture, as rows of browser → Vercel → service */
.arch { display: grid; gap: 10px; }
.arch-h, .arch-row { display: grid; grid-template-columns: 1fr; gap: 6px; }
.arch-h { display: none; font: 500 11px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.arch-row { padding: 12px; border-radius: 14px; background: var(--line); }
.arch-n { position: relative; display: grid; gap: 3px; padding: 11px 13px; border-radius: 10px; background: var(--bg-raised); border: 1px solid var(--line); }
.arch-n small { font: 400 10.5px/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.arch-n b { font: 500 14.5px/1.3 var(--sans); }
.arch-n i { font: 400 12px/1.4 var(--mono); font-style: normal; color: var(--ink-2); }
.arch-n code, .arch-foot code { font: 400 12.5px/1.4 var(--mono); }
.arch-n em, .arch-foot em { position: absolute; top: 10px; right: 10px; font: 500 10.5px/1 var(--mono); font-style: normal; color: var(--live-text); border: 1px solid rgba(22, 164, 107, 0.4); padding: 4px 6px; border-radius: 999px; }
.arch-n.ghost { background: transparent; border-style: dashed; color: var(--ink-3); }
.arch-n.ghost i { color: var(--ink-2); }
.arch-a { justify-self: center; width: 1px; height: 14px; background: var(--ink-3); position: relative; }
.arch-a::after { content: ""; position: absolute; left: -3px; bottom: -1px; border: 3.5px solid transparent; border-top: 5px solid var(--ink-3); border-bottom: 0; }
.arch-a.none { visibility: hidden; }
@media (max-width: 859px) { .arch-row .arch-n.ghost, .arch-row .arch-a.none { display: none; } }
.arch-foot { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.arch-foot em { position: static; display: inline-block; margin-right: 6px; vertical-align: 1px; }
@media (min-width: 860px) {
  .arch-h, .arch-row { grid-template-columns: 1fr 28px 1fr 28px 1fr; align-items: stretch; gap: 0; }
  .arch-h { display: grid; padding: 0 12px; }
  .arch-n small { display: none; }
  .arch-a { align-self: center; justify-self: stretch; width: auto; height: 1px; margin: 0 4px; }
  .arch-a::after { left: auto; right: -1px; bottom: -3px; border: 3.5px solid transparent; border-left: 5px solid var(--ink-3); border-right: 0; }
}
.tbl.brief td:first-child { white-space: normal; width: 34%; padding-right: 16px; }

/* Skip link: the first thing a keyboard reaches, out of sight until then. */
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--bg); font: 500 14px/1 var(--sans); text-decoration: none; transition: top 0.15s ease; }
.skip:focus { top: 12px; }
/* Visually hidden, still read by screen readers. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Small grey text on the tinted stages needs the darker grey to stay readable. */
.try-stage .label, .try-stage .n, .try-stage .stage-cap { color: var(--ink-2); }

