/* Gradient & Clip Type — antjanus.com redesign 086
   Rule of the system: surfaces stay neutral; color lives only inside letterforms.
   Every gradient stop is checked against its own ground (light stops ≥4.5:1 on #f6f4ef,
   dark stops ≥7:1 on #0e0f13) so the weakest end of each ramp still passes. */

:root {
  --ground: #f6f4ef;
  --surface: #fffdf9;
  --surface-2: #eeebe4;
  --text: #15171c;
  --text-2: #353a44;
  --muted: #555b66;
  --line: #dcd6cb;
  --line-strong: #b3ac9f;
  --code-bg: #16181e;
  --code-text: #e8e6e0;
  --focus: #5b21b6;
  --clip-wash: rgba(246, 244, 239, 0);

  --g-brand: linear-gradient(100deg, #364f6a 0%, #5b3fa0 55%, #b0265e 100%);
  --g-ai: linear-gradient(100deg, #5b21b6 0%, #a21caf 55%, #be123c 100%);
  --g-garden: linear-gradient(100deg, #0f5f59 0%, #0f766e 45%, #4d7c0f 100%);
  --g-tools: linear-gradient(100deg, #9a3412 0%, #b45309 55%, #a16207 100%);
  --g-stories: linear-gradient(100deg, #1e3a8a 0%, #6d28d9 50%, #9d174d 100%);
  --g-projects: linear-gradient(100deg, #364f6a 0%, #155e75 55%, #0f766e 100%);
  --g-spectrum: linear-gradient(120deg, #364f6a 0%, #5b21b6 22%, #be123c 46%, #b45309 70%, #0f766e 100%);
  --g-inverse: linear-gradient(100deg, #a9c6e8 0%, #d8b4fe 50%, #fda4af 100%);

  --c-brand: #364f6a;
  --c-ai: #7e22ce;
  --c-garden: #0f766e;
  --c-tools: #9a3412;
  --c-stories: #4c1d95;
  --c-projects: #155e75;

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-read: "Source Serif 4", Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --max: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 14px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --ground: #0e0f13;
  --surface: #16181e;
  --surface-2: #1d2028;
  --text: #eeebe4;
  --text-2: #cdd0d6;
  --muted: #a4aab4;
  --line: #2b2f39;
  --line-strong: #4a5160;
  --code-bg: #08090c;
  --code-text: #e8e6e0;
  --focus: #d8b4fe;
  --clip-wash: rgba(255, 255, 255, 0.38);

  --g-brand: linear-gradient(100deg, #a9c6e8 0%, #c4b5fd 55%, #f9a8d4 100%);
  --g-ai: linear-gradient(100deg, #d8b4fe 0%, #f0abfc 55%, #fda4af 100%);
  --g-garden: linear-gradient(100deg, #5eead4 0%, #99f6e4 45%, #bef264 100%);
  --g-tools: linear-gradient(100deg, #fde68a 0%, #fcd34d 50%, #fdba74 100%);
  --g-stories: linear-gradient(100deg, #93c5fd 0%, #c4b5fd 50%, #f9a8d4 100%);
  --g-projects: linear-gradient(100deg, #a9c6e8 0%, #67e8f9 55%, #5eead4 100%);
  --g-spectrum: linear-gradient(120deg, #a9c6e8 0%, #c4b5fd 22%, #fda4af 46%, #fcd34d 70%, #5eead4 100%);
  --g-inverse: linear-gradient(100deg, #364f6a 0%, #5b21b6 50%, #be123c 100%);

  --c-brand: #a9c6e8;
  --c-ai: #d8b4fe;
  --c-garden: #5eead4;
  --c-tools: #fcd34d;
  --c-stories: #c4b5fd;
  --c-projects: #67e8f9;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text-2);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { color: var(--text); font-family: var(--f-display); margin: 0; line-height: 1.05; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
::selection { background: #5b21b6; color: #fff; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--surface); color: var(--text); padding: 10px 16px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- The ink system ---------- */
.ink { color: var(--c, var(--c-brand)); }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .ink {
    background-image: var(--g, var(--g-brand));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
  }
  .ink.fixed { background-attachment: fixed; background-size: 100vw 100vh; }
  .ink.shift { background-size: 220% 100%; background-position: 0% 50%; transition: background-position .5s ease; }
  a:hover .ink.shift, a:focus-visible .ink.shift, .card:hover .ink.shift { background-position: 100% 50%; }
}
.g-brand { --g: var(--g-brand); --c: var(--c-brand); }
.g-ai { --g: var(--g-ai); --c: var(--c-ai); }
.g-garden { --g: var(--g-garden); --c: var(--c-garden); }
.g-tools { --g: var(--g-tools); --c: var(--c-tools); }
.g-stories { --g: var(--g-stories); --c: var(--c-stories); }
.g-projects { --g: var(--g-projects); --c: var(--c-projects); }
.g-spectrum { --g: var(--g-spectrum); --c: var(--c-brand); }
.solid { color: var(--c); }

@media (forced-colors: active) {
  .ink, .clipword, .numeral { background: none !important; color: CanvasText !important; -webkit-text-fill-color: CanvasText !important; }
}

/* Photo-filled display words. Decorative, always aria-hidden beside a real heading. */
.clipword {
  display: block;
  font-family: var(--f-display);
  font-weight: 900;
  font-stretch: 70%;
  line-height: .78;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  font-size: clamp(5rem, 21vw, 19rem);
  color: var(--text);
  margin: 0 0 .06em -0.04em;
  user-select: none;
  white-space: nowrap;
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .clipword {
    background-image: linear-gradient(var(--clip-wash), var(--clip-wash)), var(--clip-img);
    background-size: cover;
    background-position: var(--clip-pos, center);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(56px, 8vw, 112px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.eyebrow {
  font-family: var(--f-mono);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
.eyebrow .solid { font-weight: 500; }
.lede { font-size: clamp(1.1875rem, 1.6vw, 1.375rem); line-height: 1.5; color: var(--text-2); max-width: 62ch; }
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); }

.sec-head { display: grid; grid-template-columns: 1fr auto; gap: 16px 32px; align-items: end; margin-bottom: clamp(28px, 4vw, 48px); }
.sec-head h2 { font-size: clamp(2.5rem, 6.2vw, 5.5rem); font-weight: 850; font-stretch: 78%; line-height: .95; letter-spacing: -0.03em; word-spacing: .08em; }
.sec-head p { margin: 12px 0 0; color: var(--muted); font-size: 1.125rem; }
.more {
  font-weight: 600; text-decoration: none; padding: 10px 2px; min-height: 44px; display: inline-flex; align-items: center; gap: 8px;
  border-bottom: 2px solid var(--line-strong);
}
.more:hover { border-color: var(--text); }
@media (max-width: 640px) { .sec-head { grid-template-columns: 1fr; } }

/* ---------- Header / nav ---------- */
.progress { position: fixed; top: 0; left: 0; height: 4px; width: 0; background: var(--g-spectrum); z-index: 60; }
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-height: 44px; }
.brand svg { width: 38px; height: 38px; flex: none; }
.brand-word { font-family: var(--f-display); font-weight: 850; font-stretch: 80%; font-size: 1.5rem; letter-spacing: -0.03em; line-height: 1; }
.brand-sub { display: block; font-family: var(--f-mono); font-size: .8125rem; letter-spacing: .08em; color: var(--muted); font-weight: 400; margin-top: 3px; text-transform: uppercase; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none;
  font-weight: 600; color: var(--text); font-size: 1rem; position: relative;
}
.nav-links a[aria-current="page"]::after, .nav-links a:hover::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 3px; border-radius: 2px; background: var(--g, var(--g-brand));
}
.nav-links a:hover::after { opacity: .5; }
.nav-links a[aria-current="page"]::after { opacity: 1; }
.nav-links .ai-link span { font-weight: 800; }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.search { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); height: 44px; padding: 0 4px 0 14px; }
.search input { border: 0; background: transparent; color: var(--text); font: inherit; font-size: 1rem; width: 120px; outline: none; }
.search input::placeholder { color: var(--muted); }
.search:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.search button { border: 0; background: var(--text); color: var(--ground); font: 600 .875rem var(--f-body); border-radius: 999px; height: 34px; padding: 0 14px; cursor: pointer; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  display: inline-grid; place-items: center; cursor: pointer; padding: 0;
}
.icon-btn:hover { border-color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
.menu-btn { display: none; }
.mobile-menu { display: none; }

@media (max-width: 1080px) { .search { display: none; } }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-grid; }
  .nav-tools { margin-left: auto; }
  .mobile-menu[data-open="true"] { display: block; border-top: 1px solid var(--line); padding: 12px 0 20px; }
  .mobile-menu ul { list-style: none; margin: 0; padding: 0; }
  .mobile-menu a { display: flex; min-height: 52px; align-items: center; text-decoration: none; font-family: var(--f-display); font-weight: 800; font-stretch: 80%; font-size: 1.75rem; border-bottom: 1px solid var(--line); }
  .mobile-menu .search { display: flex; margin-top: 16px; }
  .mobile-menu .search input { width: 100%; }
}
@media (max-width: 420px) { .brand-sub { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; font-weight: 700; font-size: 1.0625rem; text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--text); }
.btn-primary .ink { --g: var(--g-inverse); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--text); }
.link-underline { font-weight: 700; color: var(--text); text-decoration: none; background: var(--g-brand) left bottom / 100% 3px no-repeat; padding-bottom: 4px; min-height: 44px; display: inline-flex; align-items: center; }
.link-muted { color: var(--muted); text-decoration: none; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.link-muted:hover { color: var(--text); }

/* ---------- Page heads with clip words ---------- */
.page-head { padding: clamp(40px, 6vw, 80px) 0 clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--line); overflow: hidden; }
.page-head h1 { font-size: clamp(2.5rem, 5.5vw, 4.75rem); font-weight: 850; font-stretch: 80%; line-height: .96; letter-spacing: -0.035em; margin-bottom: 18px; }
.page-head .clip-row { display: grid; grid-template-columns: minmax(0, 1fr); }
.page-head .head-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-top: clamp(16px, 3vw, 32px); }
@media (max-width: 860px) { .page-head .head-grid { grid-template-columns: 1fr; } }

/* ---------- Home hero ---------- */
.hero { padding: clamp(40px, 6vw, 88px) 0 clamp(48px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
.hero h1 {
  font-size: clamp(3rem, 8.6vw, 8.25rem); font-weight: 870; font-stretch: 72%; line-height: .88; letter-spacing: -0.035em; word-spacing: .12em; margin: 0 0 28px;
}
.hero h1 .w { display: inline; }
.hero-sub { font-size: clamp(1.1875rem, 1.7vw, 1.4375rem); max-width: 40ch; color: var(--text-2); line-height: 1.5; }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-top: 28px; }
.portrait { margin: 0; position: relative; }
.portrait .frame { border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--g-spectrum); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 22% 30%; filter: grayscale(1) contrast(1.08); mix-blend-mode: luminosity; }
.portrait figcaption { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; font-family: var(--f-mono); font-size: .8125rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 420px; }
  .portrait .frame { aspect-ratio: 5 / 4; }
}

/* Key: the hero headline's colored words map to the site's sections */
.key { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); list-style: none; padding-left: 0; }
.key li { display: flex; align-items: center; gap: 8px; font-size: .9375rem; color: var(--muted); }
.key .bar { width: 28px; height: 10px; border-radius: 3px; background: var(--g); }
.key strong { color: var(--text); font-weight: 700; }

/* ---------- Numerals / stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.stat { background: var(--ground); padding: clamp(24px, 4vw, 48px) clamp(12px, 2vw, 32px); }
.numeral {
  display: block; font-family: var(--f-display); font-weight: 900; font-stretch: 68%;
  font-size: clamp(3.5rem, 10vw, 9.5rem); line-height: .85; letter-spacing: -0.05em; font-variant-numeric: tabular-nums;
}
.stat-label { font-family: var(--f-mono); font-size: .875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 14px; display: block; }
@media (max-width: 600px) {
  .stats { grid-template-columns: 1fr; }
  .stat { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
  .stat .numeral { font-size: 4.25rem; }
}

/* ---------- Typographic index list ---------- */
.index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.index li { border-bottom: 1px solid var(--line); }
.index a {
  display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) auto; gap: 8px 32px; align-items: baseline;
  padding: 26px 0; text-decoration: none;
}
.index .date { font-family: var(--f-mono); font-size: .875rem; color: var(--muted); letter-spacing: .04em; }
.index .t { font-size: clamp(1.5rem, 2.6vw, 2.25rem); font-weight: 800; font-stretch: 84%; line-height: 1.08; letter-spacing: -0.025em; display: block; }
.index .d { display: block; margin-top: 10px; color: var(--text-2); max-width: 68ch; font-size: 1.0625rem; }
.index .kind { font-family: var(--f-mono); font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.index a:hover .t { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: var(--line-strong); }
@media (max-width: 720px) {
  .index a { grid-template-columns: 1fr; gap: 6px; padding: 22px 0; }
  .index .kind { order: -1; }
}

/* ---------- Cards ---------- */
.grid { display: grid; gap: clamp(16px, 2vw, 28px); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; } }

.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden; transition: border-color .15s ease, transform .2s ease;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card:focus-within { border-color: var(--text); }
.card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font-size: 1.625rem; font-weight: 800; font-stretch: 84%; line-height: 1.1; letter-spacing: -0.02em; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card p { margin: 0; color: var(--text-2); }
.card .meta { font-family: var(--f-mono); font-size: .8125rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; display: flex; gap: 12px; flex-wrap: wrap; }
.card .foot { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }

/* Duotone: grayscale photo takes its hue from the collection gradient underneath. */
.duo { position: relative; background: var(--g, var(--g-brand)); aspect-ratio: 16 / 9; overflow: hidden; }
.duo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); mix-blend-mode: luminosity; transition: filter .3s ease, mix-blend-mode .3s; }
.card:hover .duo img, .card:focus-within .duo img, .duo:hover img { mix-blend-mode: normal; filter: none; }
.duo.tall { aspect-ratio: 4 / 3; }

.chip {
  display: inline-flex; align-items: center; min-height: 30px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-strong);
  font-family: var(--f-mono); font-size: .8125rem; color: var(--text-2); text-decoration: none; background: transparent;
}
a.chip:hover { border-color: var(--text); color: var(--text); }
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 6px; font-family: var(--f-mono); font-size: .8125rem; font-weight: 500; border: 1px solid currentColor; }

/* Feature spotlight card on home */
.spot { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.spot .duo { aspect-ratio: auto; min-height: 320px; }
.spot .card-body { padding: clamp(24px, 3vw, 44px); justify-content: center; }
.spot h3 { font-size: clamp(2rem, 3.6vw, 3.25rem); font-stretch: 76%; line-height: .98; }
@media (max-width: 860px) { .spot { grid-template-columns: minmax(0, 1fr); } .spot .duo { min-height: 220px; aspect-ratio: 16/9; } }

/* Typographic experiment tiles */
.tile-num { font-family: var(--f-display); font-weight: 900; font-stretch: 68%; font-size: 4rem; line-height: .85; letter-spacing: -0.05em; }

/* Dark "work with me" panel */
.panel-dark { background: #111318; color: #e9e7e1; border-radius: 20px; padding: clamp(28px, 4vw, 56px); border: 1px solid #2b2f39; }
.panel-dark h2, .panel-dark h3 { color: #f4f2ec; }
.panel-dark p { color: #cfd2d8; }
.panel-dark .ink { --g: linear-gradient(100deg, #a9c6e8, #d8b4fe 50%, #fda4af); --c: #d8b4fe; }
.panel-dark .btn-light { background: #f4f2ec; color: #111318; }
.panel-dark .muted { color: #a4aab4; }

/* ---------- Footer ---------- */
.site-foot { margin-top: clamp(40px, 6vw, 96px); border-top: 1px solid var(--line); padding: clamp(40px, 6vw, 72px) 0 32px; }
.foot-word { display: block; font-family: var(--f-display); font-weight: 900; font-stretch: 62%; font-size: clamp(4.5rem, 19vw, 17.5rem); line-height: .8; letter-spacing: -0.05em; margin: 0 0 clamp(28px, 4vw, 48px) -0.03em; white-space: nowrap; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.4fr; gap: 32px; }
.foot-grid h2 { font-size: .875rem; font-family: var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 12px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li a { display: inline-flex; min-height: 36px; align-items: center; text-decoration: none; color: var(--text); font-weight: 500; }
.foot-grid li a:hover { text-decoration: underline; text-underline-offset: 4px; }
.subscribe { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.subscribe input {
  flex: 1 1 180px; min-height: 48px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  padding: 0 18px; font: inherit;
}
.subscribe input::placeholder { color: var(--muted); }
.form-status { min-height: 1.6em; margin-top: 8px; font-size: 1rem; }
.form-status.ok { color: var(--c-garden); }
.form-status.err { color: var(--c-ai); }
.foot-bottom { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: .9375rem; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Filters / pills ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font: 600 1rem var(--f-body); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
}
.pill:hover { border-color: var(--text); }
.pill[aria-pressed="true"] { background: var(--text); color: var(--ground); border-color: var(--text); }
.pill .count { font-family: var(--f-mono); font-size: .8125rem; opacity: .8; }

/* Jump bar */
.jump { position: sticky; top: 72px; z-index: 20; background: color-mix(in srgb, var(--ground) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.jump .wrap { display: flex; gap: 8px; overflow-x: auto; padding-block: 10px; scrollbar-width: thin; }
.jump .pill { flex: none; }

/* ---------- Year-grouped archive ---------- */
.year-block { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 24px; padding: 24px 0; border-top: 1px solid var(--line); }
.year-block .yr { font-family: var(--f-display); font-weight: 900; font-stretch: 68%; font-size: clamp(3rem, 6vw, 5rem); line-height: .85; letter-spacing: -0.05em; position: sticky; top: 140px; align-self: start; }
.year-block .index { border-top: 0; }
.year-block .index a { grid-template-columns: minmax(0, 1fr) auto; padding: 18px 0; }
.year-block .index li:last-child { border-bottom: 0; }
.year-block .index .t { font-size: clamp(1.3125rem, 2vw, 1.75rem); }
@media (max-width: 720px) {
  .year-block { grid-template-columns: 1fr; gap: 0; }
  .year-block .yr { position: static; }
  .year-block .index a { grid-template-columns: 1fr; }
}
.empty-note { padding: 32px; border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; }
[hidden] { display: none !important; }

/* ---------- Stories ---------- */
.chapters { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.chapter { background: var(--surface); display: grid; grid-template-columns: 9rem minmax(0, 1fr) minmax(0, 18rem); gap: 20px 36px; padding: clamp(22px, 3vw, 36px); align-items: start; position: relative; }
.chapter .numeral { font-size: clamp(4rem, 8vw, 7rem); }
.chapter h3 { font-size: clamp(1.625rem, 2.6vw, 2.25rem); font-weight: 800; font-stretch: 82%; margin-bottom: 10px; }
.chapter h3 a { text-decoration: none; }
.chapter h3 a::after { content: ""; position: absolute; inset: 0; }
.chapter .duo { border-radius: 12px; aspect-ratio: 4 / 3; }
.chapter.soon { background: var(--surface-2); }
.chapter.soon .numeral { opacity: .45; }
@media (max-width: 900px) { .chapter { grid-template-columns: 5.5rem minmax(0, 1fr); } .chapter .duo { grid-column: 1 / -1; } }
@media (max-width: 520px) { .chapter { grid-template-columns: 1fr; } }
.notice { border-left: 4px solid; border-image: var(--g-stories) 1; padding: 14px 20px; background: var(--surface); }

/* ---------- Article ---------- */
.a-head { padding: clamp(40px, 6vw, 88px) 0 clamp(28px, 4vw, 48px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-family: var(--f-mono); font-size: .875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }
.crumbs a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.crumbs a:hover { color: var(--text); }
.a-head h1 { font-size: clamp(2.75rem, 7.6vw, 7.25rem); font-weight: 880; font-stretch: 72%; line-height: .9; letter-spacing: -0.035em; word-spacing: .1em; max-width: 14ch; }
.a-head .lede { margin-top: 24px; }
.a-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; font-family: var(--f-mono); font-size: .875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); align-items: center; }
.a-banner { margin: 0 0 clamp(32px, 5vw, 56px); }
.a-banner .duo { border-radius: 18px; aspect-ratio: 3 / 1; }
.a-banner .duo img { object-position: left center; }
.a-banner figcaption { margin-top: 10px; color: var(--muted); font-size: .9375rem; }
.a-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.toc { position: sticky; top: 100px; }
.toc h2 { font-family: var(--f-mono); font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 8px 0 8px 16px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); font-weight: 600; line-height: 1.35; font-size: 1rem; }
.toc a:hover { color: var(--text); }
.toc a.active { border-image: var(--g-garden) 1; color: var(--text); }
.toc-mobile { display: none; }
@media (max-width: 1024px) {
  .a-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .toc-mobile { display: block; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 32px; }
  .toc-mobile summary { min-height: 52px; display: flex; align-items: center; padding: 0 18px; cursor: pointer; font-weight: 700; color: var(--text); }
  .toc-mobile ol { margin: 0; padding: 0 18px 16px 40px; }
  .toc-mobile li { padding: 6px 0; }
  .toc-mobile a { color: var(--text-2); }
}

.prose { font-family: var(--f-read); font-size: 1.1875rem; line-height: 1.7; color: var(--text-2); max-width: 44rem; }
.prose > * { max-width: 40rem; }
.prose > pre, .prose > .code, .prose > figure { max-width: 48rem; }
.prose p { margin: 0 0 1.25em; }
.prose h2 {
  font-family: var(--f-display); font-size: clamp(2rem, 3.8vw, 3rem); font-weight: 850; font-stretch: 76%; line-height: .98; letter-spacing: -0.035em;
  margin: 2.1em 0 .6em; scroll-margin-top: 100px;
}
.prose h2 .n { font-family: var(--f-mono); font-size: .875rem; letter-spacing: .1em; display: block; margin-bottom: 10px; font-weight: 500; color: var(--muted); -webkit-text-fill-color: var(--muted); }
.prose a { color: var(--text); text-decoration-color: var(--c-garden); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--text); }
.prose ol, .prose ul { padding-left: 1.4em; margin: 0 0 1.25em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--c-garden); font-family: var(--f-mono); font-weight: 500; }
.prose code { font-family: var(--f-mono); font-size: .86em; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; color: var(--text); }
.prose em { font-style: italic; }
.prose blockquote { margin: 1.6em 0; padding: 18px 22px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-family: var(--f-body); font-size: 1.0625rem; }
.prose blockquote p:last-child { margin: 0; }
.callout { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 18px; align-items: start; }
.callout .label { font-family: var(--f-display); font-weight: 900; font-stretch: 70%; font-size: 2.25rem; line-height: .9; letter-spacing: -0.04em; }
.callout.q .label { font-size: 1.5rem; max-width: 7ch; line-height: 1; }
@media (max-width: 520px) { .callout { grid-template-columns: 1fr; } }

.code { margin: 1.6em 0; border-radius: 14px; overflow: hidden; background: var(--code-bg); border: 1px solid #2b2f39; }
.code-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px 16px; border-bottom: 1px solid #2b2f39; }
.code-bar .lang { font-family: var(--f-mono); font-size: .8125rem; letter-spacing: .1em; color: #b8bdc7; }
.copy-btn { background: transparent; border: 1px solid #4a5160; color: #e8e6e0; border-radius: 8px; min-height: 36px; padding: 0 12px; font: 600 .875rem var(--f-body); cursor: pointer; }
.copy-btn:hover { border-color: #e8e6e0; }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-family: var(--f-mono); font-size: .9375rem; line-height: 1.65; color: var(--code-text); tab-size: 2; }
.code pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.tok-k { color: #d8b4fe; }
.tok-s { color: #86efac; }
.tok-c { color: #9aa3b2; font-style: italic; }
.tok-t { color: #7dd3fc; }
.tok-n { color: #fcd34d; }

.tags-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 48px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.share { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- Patterns ---------- */
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.ways > div { background: var(--surface); padding: clamp(22px, 3vw, 36px); }
.ways h3 { font-size: clamp(2.25rem, 4vw, 3.5rem); font-weight: 900; font-stretch: 70%; letter-spacing: -0.04em; margin-bottom: 12px; }
.ways-foot { grid-column: 1 / -1; }
@media (max-width: 800px) { .ways { grid-template-columns: 1fr; } }

.p-tools { display: grid; gap: 16px; margin: 40px 0 28px; }
.p-search { display: flex; align-items: center; border: 2px solid var(--line-strong); border-radius: 14px; background: var(--surface); min-height: 60px; padding: 0 18px; gap: 12px; }
.p-search:focus-within { border-color: var(--text); }
.p-search input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 1.125rem; color: var(--text); outline: none; min-width: 0; }
.p-search input::placeholder { color: var(--muted); }
.p-bar { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.p-bar select { min-height: 44px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; padding: 0 12px; }
.clear-btn { background: none; border: 0; color: var(--text); font: 700 1rem var(--f-body); text-decoration: underline; cursor: pointer; min-height: 44px; }

.p-card .glyph {
  display: flex; justify-content: space-between; align-items: flex-end; padding: 18px 22px 0; min-height: 132px;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.p-card .glyph .numeral { font-size: 6.5rem; line-height: .78; margin-bottom: -4px; }
.p-card .glyph .cat { font-family: var(--f-mono); font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); align-self: flex-start; padding-top: 4px; text-align: right; }
.p-card h3 { font-size: 1.5rem; }
.p-card .good { color: var(--muted); font-size: 1rem; }
.p-card .good strong { color: var(--text); }
.g-data { --g: var(--g-projects); --c: var(--c-projects); }
.g-layout { --g: var(--g-garden); --c: var(--c-garden); }
.g-interaction { --g: var(--g-ai); --c: var(--c-ai); }
.g-forms { --g: var(--g-tools); --c: var(--c-tools); }
.g-color { --g: var(--g-spectrum); --c: var(--c-brand); }

/* Pattern detail */
.uses { columns: 2; column-gap: 40px; padding-left: 1.2em; margin: 0; }
.uses li { margin: 0 0 8px; break-inside: avoid; }
@media (max-width: 600px) { .uses { columns: 1; } }
.panes { border: 1px solid var(--line-strong); border-radius: 18px; overflow: hidden; background: var(--surface); margin-top: 40px; }
.pane-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); padding: 8px; background: var(--surface-2); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.tab { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text-2); font: 600 1rem var(--f-body); cursor: pointer; }
.tab:hover { color: var(--text); border-color: var(--line-strong); }
.tab[aria-selected="true"] { background: var(--surface); border-color: var(--line-strong); color: var(--text); box-shadow: inset 0 -3px 0 0 var(--c-brand); }
.pane-actions { display: flex; gap: 8px; }
.small-btn { min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 600 .9375rem var(--f-body); cursor: pointer; }
.small-btn:hover { border-color: var(--text); }
.pane { padding: clamp(18px, 3vw, 32px); }
.pane pre { margin: 0; background: var(--code-bg); color: var(--code-text); padding: 18px 20px; border-radius: 12px; overflow-x: auto; font: .9375rem/1.65 var(--f-mono); }
.pane .prompt { font-family: var(--f-read); font-size: 1.125rem; line-height: 1.7; max-width: 66ch; }
.pane-note { margin: 0 0 16px; color: var(--text-2); }

/* The demo pattern itself: hairline stat strip */
.stage { background: var(--ground); border: 1px solid var(--line); border-radius: 14px; padding: clamp(16px, 3vw, 28px); }
.stage .cap { color: var(--muted); margin: 0 0 12px; }
.hss-strip { display: grid; gap: 1px; background: var(--line-strong); border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; grid-template-columns: 1fr; margin-bottom: 28px; }
@container stage (min-width: 21rem) { .hss-strip { grid-template-columns: repeat(2, 1fr); } }
@container stage (min-width: 42rem) { .hss-strip { grid-template-columns: repeat(4, 1fr); } .hss-strip.five { grid-template-columns: repeat(5, 1fr); } }
.stage { container: stage / inline-size; }
.hss-tile { background: var(--surface); padding: 14px 16px; min-width: 0; text-align: left; border: 0; font: inherit; color: inherit; display: block; width: 100%; }
button.hss-tile { cursor: pointer; }
button.hss-tile:hover { background: var(--surface-2); }
button.hss-tile[aria-pressed="true"] { background: color-mix(in srgb, #364f6a 16%, var(--surface)); box-shadow: inset 0 3px 0 #364f6a; }
:root[data-theme="dark"] button.hss-tile[aria-pressed="true"] { background: color-mix(in srgb, #6f92bd 22%, var(--surface)); box-shadow: inset 0 3px 0 #6f92bd; }
.hss-label { font-family: var(--f-mono); font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: block; overflow-wrap: anywhere; }
.hss-fig { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); display: block; line-height: 1.2; margin: 4px 0 2px; }
.hss-fig.missing { color: var(--muted); font-weight: 500; }
.hss-sub { font-size: .9375rem; color: var(--muted); display: block; overflow-wrap: anywhere; }
.hss-list { list-style: none; margin: 12px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.hss-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.hss-list li:last-child { border-bottom: 0; }
.hss-list .st { font-family: var(--f-mono); font-size: .875rem; color: var(--text-2); }

/* ---------- About ---------- */
.career { display: flex; gap: 2px; margin: 24px 0 40px; border-radius: 10px; overflow: hidden; }
.career div { background: var(--surface); border: 1px solid var(--line); padding: 12px 14px; min-width: 0; }
.career strong { display: block; color: var(--text); font-size: 1rem; }
.career span { font-family: var(--f-mono); font-size: .8125rem; color: var(--muted); }
@media (max-width: 900px) { .career { flex-wrap: wrap; } .career div { flex: 1 1 45% !important; } }
.phases { display: grid; gap: 0; }
.phase { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 16px 40px; padding: 32px 0; border-top: 1px solid var(--line); }
.phase .numeral { font-size: clamp(3rem, 6vw, 5rem); }
.phase h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 850; font-stretch: 78%; margin-bottom: 8px; }
.phase .period { font-family: var(--f-mono); font-size: .875rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.roles { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.roles li { padding-left: 18px; position: relative; }
.roles li::before { content: ""; position: absolute; left: 0; top: .65em; width: 8px; height: 8px; border-radius: 2px; background: var(--g); }
@media (max-width: 720px) { .phase { grid-template-columns: 1fr; } }
.principles { list-style: none; margin: 0; padding: 0; counter-reset: pr; }
.principles li { padding: 26px 0; border-top: 1px solid #2b2f39; display: grid; grid-template-columns: 4rem minmax(0,1fr); gap: 16px; align-items: baseline; }
.principles li::before { counter-increment: pr; content: "0" counter(pr); font-family: var(--f-mono); color: #a4aab4; font-size: .9375rem; }
.principles q { font-family: var(--f-display); font-weight: 800; font-stretch: 78%; font-size: clamp(1.75rem, 3.6vw, 3rem); line-height: 1.02; letter-spacing: -0.03em; quotes: none; }
.caps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.caps > div { background: var(--surface); padding: clamp(22px, 3vw, 36px); }
.caps h3 { font-size: 1.875rem; font-weight: 850; font-stretch: 80%; margin-bottom: 8px; }
.caps .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (max-width: 720px) { .caps { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.beyond { display: grid; gap: 0; }
.beyond div { padding: 20px 0; border-top: 1px solid var(--line); }
.beyond h3 { font-size: 1.75rem; font-weight: 850; font-stretch: 80%; margin-bottom: 6px; }

/* Projects */
.oss { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(28px, 4vw, 48px) 0; border-top: 1px solid var(--line); }
.oss:nth-child(even) .duo { order: 2; }
.oss .duo { border-radius: 16px; }
.oss h3 { font-size: clamp(2.25rem, 4.4vw, 3.75rem); font-weight: 900; font-stretch: 72%; letter-spacing: -0.04em; line-height: .92; margin-bottom: 14px; }
.oss h3 a { text-decoration: none; }
.kv { display: flex; flex-wrap: wrap; gap: 20px 32px; margin-top: 16px; }
.kv div { display: flex; flex-direction: column; }
.kv strong { font-family: var(--f-display); font-weight: 900; font-stretch: 70%; font-size: 2.5rem; line-height: 1; color: var(--text); }
.kv span { font-family: var(--f-mono); font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 800px) { .oss { grid-template-columns: 1fr; } .oss:nth-child(even) .duo { order: 0; } }
.tui-tile { aspect-ratio: 16 / 9; background: #111318; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.tui-tile span { font-family: var(--f-mono); font-size: 1.5rem; font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .card:hover { transform: none; }
}

/* gallery article */
.prose > figure { margin: 1.6em 0; }
.prose > figure img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.prose blockquote.callout > div > p + p { margin-top: .75em; }
.prose blockquote.callout > div > p:last-child { margin-bottom: 0; }
.prose code { overflow-wrap: anywhere; }
