/* ---------------------------------------------------------------
   Type: Archivo variable. Width is the expressive axis:
   125 for display, 100 for reading, 80 for metadata.
   Colour: graphite ground, bone ink, one accent (ion blue by
   default, editable in admin under Settings, Theme).
---------------------------------------------------------------- */
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo.woff2') format('woff2-variations'), url('/fonts/archivo.woff2') format('woff2');
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-italic.woff2') format('woff2-variations'), url('/fonts/archivo-italic.woff2') format('woff2');
  font-weight: 100 900; font-stretch: 62% 125%; font-style: italic; font-display: swap;
}

/* Light mode: cool paper, darker accent for contrast. Chosen by the toggle or the system setting. */
:root[data-theme='light'] {
  --ground: #f1f3f4;
  --raise: #e8ebed;
  --raise-2: #dde1e4;
  --line: #d3d8dc;
  --line-2: #bfc6cc;
  --ink: #0f1317;
  --ink-2: #3a424a;
  --mute: #66707a;
  --fault: #c2412d;
  --hi: #000000;
  --t-research: 106, 74, 210; --t-dermis: 196, 52, 42; --t-failures: 168, 106, 0;
  --t-trajectory: 0, 124, 116; --t-log: 40, 132, 58; --t-writing: 182, 56, 108; --t-photos: 84, 98, 112;
  --k-edu: #4f6f8f; --k-work: #7a746c; --k-lead: #2b2f33; --k-res: #3c8a68;
  --board-line: #c3cad0; --board-pad: #a9b1b8;
  --field-rest: 192, 199, 205; --field-hot: 10, 26, 56; --field-ruler: 120, 128, 136;
  --bar-bg: rgba(241, 243, 244, .86);
  color-scheme: light;
}
:root {
  --ground: #0e1114;
  --raise: #14191d;
  --raise-2: #1a2026;
  --line: #242b31;
  --line-2: #333b43;
  --ink: #eeebe5;
  --ink-2: #c6c3bd;
  --mute: #8e959d;
  --accent: #5aa2ff;
  --accent-rgb: 90, 162, 255;
  --accent-soft: rgba(90, 162, 255, .16);
  --fault: #ea6a55;
  --hi: #ffffff;
  /* Section identities: one hue per section, applied as a faint wash and to that section's accents. */
  --t-work: var(--accent-rgb); --t-research: 167, 139, 250; --t-dermis: 255, 90, 78; --t-failures: 245, 181, 61;
  --t-trajectory: 61, 208, 196; --t-log: 126, 212, 126; --t-writing: 240, 143, 182; --t-photos: 172, 186, 200; --t-contact: var(--accent-rgb);
  --k-edu: #8ea6bd; --k-work: #a8a39c; --k-lead: #e4dfd6; --k-res: #7fc4a6;
  --board-line: #3b434b; --board-pad: #4b545d;
  --field-rest: 52, 59, 67; --field-hot: 238, 246, 255; --field-ruler: 132, 140, 148;
  --bar-bg: rgba(14, 17, 20, .84);
  color-scheme: dark;

  --f-hero: clamp(4.25rem, 16.4vw, 15.5rem);
  --f-h2: clamp(2.5rem, 6vw, 5.25rem);
  --f-h3: clamp(1.6rem, 2.6vw, 2.35rem);
  --f-lead: clamp(1.15rem, 1.5vw, 1.375rem);
  --f-body: 1.0625rem;
  --f-small: .9375rem;
  --f-meta: .8125rem;

  --pad: clamp(20px, 4.2vw, 64px);
  --sec: clamp(96px, 13vw, 184px);
  --max: 1400px;
  --r-img: 3px;
  --r-ctl: 999px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 var(--f-body)/1.58 'Archivo', system-ui, sans-serif; font-stretch: 100%;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent); color: var(--ground); }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--ground); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.meta, .count { font-stretch: 80%; font-weight: 500; font-size: var(--f-meta); letter-spacing: .01em; color: var(--mute); font-variant-numeric: tabular-nums; }
.count { font-size: .32em; vertical-align: super; margin-left: .3em; letter-spacing: 0; }

/* ---------- header ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: max(14px, env(safe-area-inset-top)) var(--pad) 14px;
  transition: background-color .3s, border-color .3s; border-bottom: 1px solid transparent;
}
.bar.solid { background: var(--bar-bg); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.bar-name { font-stretch: 118%; font-weight: 700; text-decoration: none; font-size: 1rem; letter-spacing: -.01em; white-space: nowrap; }
.bar-nav { display: flex; gap: clamp(12px, 1.8vw, 28px); }
.bar-nav a { text-decoration: none; font-size: var(--f-small); color: var(--ink-2); font-stretch: 92%; padding: 4px 0; position: relative; white-space: nowrap; }
.bar-nav a:hover, .bar-nav a.on { color: var(--ink); }
.bar-nav a.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent); }
.bar-menu { display: none; background: none; border: 1px solid var(--line-2); border-radius: var(--r-ctl); padding: 6px 16px; font-size: var(--f-small); cursor: pointer; }
.sheet { position: fixed; inset: 0; z-index: 35; background: var(--ground); padding: 96px var(--pad) 40px; overflow-y: auto; }
.sheet nav { display: flex; flex-direction: column; }
.sheet a { text-decoration: none; font-stretch: 125%; font-weight: 700; font-size: clamp(2rem, 9vw, 3.25rem); line-height: 1.12; padding: 6px 0; border-bottom: 1px solid var(--line); letter-spacing: -.02em; }
.sheet.open { animation: sheetIn .28s cubic-bezier(.2, .7, .2, 1); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(-8px); } }
@media (max-width: 1080px) { .bar-nav { display: none; } .bar-menu { display: inline-block; } }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; max-height: 1080px;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; padding-top: 96px;
}
.field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-glow { /* a faint field of light behind the array, gives the dark depth */
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(55% 45% at 78% 34%, rgba(var(--accent-rgb), .085), transparent 70%),
    radial-gradient(40% 40% at 12% 90%, rgba(var(--accent-rgb), .04), transparent 70%);
}
.hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(to bottom, transparent, var(--ground)); pointer-events: none; }
.hero-inner {
  position: relative; z-index: 2; pointer-events: none;
  display: grid; grid-template-columns: minmax(0, 1fr) min(400px, 34%); column-gap: 40px;
  align-items: end; padding-bottom: clamp(20px, 3vw, 36px);
}
.hero-inner a, .hero-inner button { pointer-events: auto; }
.hero-name { display: contents; }
.hero-name span { font-stretch: 125%; font-weight: 800; font-size: var(--f-hero); line-height: .84; letter-spacing: -.035em; display: block; }
.hero-name .n1 { grid-row: 1; grid-column: 1; }
.hero-name .n2 {
  grid-row: 2; grid-column: 1 / -1; position: relative; color: transparent;
  -webkit-text-stroke: 1.5px var(--ink); justify-self: start;
}
.hero-name .n2::after { /* fills with the accent under the contact point */
  content: attr(data-text); position: absolute; inset: 0; color: var(--accent); -webkit-text-stroke: 1.5px var(--accent);
  -webkit-mask-image: radial-gradient(circle var(--rr, 0px) at var(--rx, -999px) var(--ry, -999px), #000 0%, rgba(0,0,0,.55) 45%, transparent 100%);
  mask-image: radial-gradient(circle var(--rr, 0px) at var(--rx, -999px) var(--ry, -999px), #000 0%, rgba(0,0,0,.55) 45%, transparent 100%);
}
.hero-side { grid-row: 1; grid-column: 2; padding-bottom: clamp(16px, 2.4vw, 34px); text-shadow: 0 0 12px var(--ground), 0 0 3px var(--ground); }
.hero-headline { margin: 0 0 14px; font-stretch: 112%; font-weight: 600; font-size: var(--f-lead); line-height: 1.25; }
.hero-intro { margin: 0; color: var(--ink-2); font-size: var(--f-small); line-height: 1.6; max-width: 46ch; }
.now { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.now-label { margin: 0 0 4px; font-size: var(--f-meta); font-stretch: 80%; font-weight: 600; color: var(--accent); display: flex; gap: 10px; align-items: center; }
.now-label::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: live 2.4s ease-in-out infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 7px rgba(var(--accent-rgb), 0); } }
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after { transition: background-color .35s ease, color .35s ease, border-color .35s ease, fill .35s ease, stroke .35s ease !important; }
.now-where { color: var(--mute); font-weight: 500; }
.now-text { margin: 0; font-size: var(--f-small); line-height: 1.5; }

.readout { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 20px; padding-bottom: 22px; pointer-events: none; }
.readout p { margin: 0; font-stretch: 80%; font-size: var(--f-meta); color: var(--mute); font-variant-numeric: tabular-nums; }
.readout-val { display: flex; gap: 22px; }
.readout-val span[id] { color: var(--ink); }

@media (max-width: 860px) {
  .hero { min-height: auto; max-height: none; justify-content: flex-start; padding-top: 0; }
  .field { position: relative; height: 58svh; min-height: 340px; inset: auto; }
  .hero-glow { bottom: auto; height: 58svh; }
  .hero::after { display: none; }
  .hero-inner { grid-template-columns: 1fr; margin-top: -22svh; padding-bottom: 8px; }
  .hero-name span { font-size: clamp(3.4rem, 17.6vw, 9rem); }
  .hero-name .n2 { grid-column: 1; }
  .hero-side { grid-row: 3; grid-column: 1; padding: 22px 0 0; }
  .readout { position: absolute; top: 70px; left: 0; right: 0; padding-bottom: 0; justify-content: flex-end; }
  .readout-cap { display: none; }
  .readout-val { gap: 14px; }
}

/* ---------- recognition ---------- */
.recog { padding-top: 28px; padding-bottom: 8px; }
.recog ul { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 32px; }
.recog li, .recog li a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; }
.recog b { font-weight: 600; font-size: var(--f-small); }
.recog span { color: var(--mute); font-size: var(--f-meta); font-stretch: 85%; }
@media (max-width: 860px) { .recog ul { grid-template-columns: 1fr 1fr; } }

/* ---------- sections ---------- */
.sec { padding-top: var(--sec); }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 16px 48px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head h2, .page-head h1 { margin: 0; font-stretch: 125%; font-weight: 800; font-size: var(--f-h2); line-height: .9; letter-spacing: -.035em; }
.sec-note { margin: 0; color: var(--ink-2); font-size: var(--f-small); max-width: 44ch; }
@media (max-width: 760px) { .sec-head { grid-template-columns: 1fr; } }

.prose { max-width: 68ch; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose h2 { font-stretch: 112%; font-weight: 700; font-size: 1.5rem; margin: 2em 0 .6em; letter-spacing: -.01em; line-height: 1.2; }
.prose h3 { font-weight: 650; font-size: 1.15rem; margin: 1.6em 0 .5em; }
.prose a { color: var(--ink); text-decoration-color: var(--accent); }
.prose code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .88em; background: var(--raise-2); padding: .12em .38em; border-radius: 3px; }
.prose pre { background: var(--raise); border: 1px solid var(--line); padding: 16px 18px; overflow-x: auto; border-radius: 4px; }
.prose pre code { background: none; padding: 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.4em 0; font-size: var(--f-small); font-variant-numeric: tabular-nums; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 9px 18px 9px 0; border-bottom: 1px solid var(--line); }
.prose th { font-stretch: 85%; font-weight: 600; color: var(--mute); font-size: var(--f-meta); }
.prose blockquote { margin: 1.4em 0; padding-left: 18px; border-left: 2px solid var(--accent); color: var(--ink-2); }
.prose figure { margin: 1.6em 0; }
.prose figure img { border-radius: var(--r-img); }
.prose figcaption { color: var(--mute); font-size: var(--f-meta); margin-top: 8px; }
.prose li { margin-bottom: .35em; }
.prose strong { font-weight: 650; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; text-decoration: none;
  background: var(--ink); color: var(--ground); border: 0; border-radius: var(--r-ctl);
  padding: 12px 22px; font-weight: 600; font-size: var(--f-small); font-stretch: 105%; transition: background-color .15s;
}
.btn:hover { background: var(--hi); }
.btn:disabled { opacity: .5; cursor: progress; }
.btn-line { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn-line:hover { background: var(--raise-2); }

/* expand / see more */
.collapsible.is-collapsed .more { display: none; }
.expand {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; cursor: pointer; text-decoration: none;
  background: none; border: 1px solid var(--line-2); border-radius: var(--r-ctl); padding: 9px 18px;
  font-size: var(--f-small); font-weight: 550; color: var(--ink); transition: border-color .15s, background-color .15s;
}
.expand::before { content: ''; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.expand[aria-expanded='true']::before { transform: translateY(2px) rotate(-135deg); }
a.expand::before { transform: rotate(-45deg); }
.expand:hover { border-color: var(--accent); background: var(--accent-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--line-2); background: none; border-radius: var(--r-ctl); padding: 5px 13px; font-size: var(--f-meta); font-stretch: 90%; color: var(--ink-2); cursor: pointer; }
.chips button:hover { border-color: var(--mute); color: var(--ink); }
.chips button[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.chips sup { font-size: .8em; margin-left: 3px; opacity: .7; vertical-align: baseline; }

.status { display: inline-flex; align-items: center; gap: 7px; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--mute); }
.status[data-s='In progress']::before, .status[data-s='Active']::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.status[data-s='Shipped']::before, .status[data-s='Published']::before { background: var(--ink); }
.status[data-s='Design stage']::before, .status[data-s='Paused']::before { background: transparent; border: 1px solid var(--mute); }
.go { font-size: var(--f-small); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .3em; }

/* generated board art */
.board .bg { fill: var(--raise); } .board .dot { fill: var(--line); }
.board .tr { stroke: var(--board-line); stroke-width: 1.5; } .board .tr-hot { stroke: var(--accent); stroke-width: 2; opacity: .9; }
.board .via { fill: var(--raise); stroke: var(--board-pad); stroke-width: 1.5; } .board .via-hot { fill: var(--raise); stroke: var(--accent); stroke-width: 1.5; }
.board .chip { fill: var(--raise-2); stroke: var(--board-pad); stroke-width: 1.5; } .board .pads rect { fill: var(--board-pad); }

/* ---------- work ---------- */
.featured { display: flex; flex-direction: column; gap: clamp(56px, 7vw, 104px); }
.feat { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: center; text-decoration: none; }
.feat-media { aspect-ratio: 16 / 10; border-radius: var(--r-img); overflow: hidden; background: var(--raise); }
.feat-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.feat:hover .feat-media img { transform: scale(1.025); }
.feat-media svg { width: 100%; height: 100%; display: block; }
.feat-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.feat h3 { margin: 0 0 14px; font-stretch: 115%; font-weight: 750; font-size: var(--f-h3); line-height: 1.02; letter-spacing: -.025em; }
.feat p { margin: 0 0 18px; color: var(--ink-2); max-width: 52ch; }
.feat .stack { color: var(--mute); font-size: var(--f-meta); font-stretch: 85%; margin-bottom: 20px; }
@media (max-width: 860px) { .feat { grid-template-columns: 1fr; } }

.index { margin-top: clamp(80px, 10vw, 144px); }
.index-top { display: flex; justify-content: space-between; align-items: end; gap: 16px 24px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line-2); }
.index-title { margin: 0; font-stretch: 112%; font-weight: 700; font-size: 1.5rem; letter-spacing: -.01em; }
.index-title .count { font-size: .55em; }
.index-list { list-style: none; margin: 0; padding: 0; }
.index-list a { display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 220px) 128px; gap: 20px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.index-list a:hover { background: linear-gradient(to right, var(--raise), transparent 85%); }
.index-list a:hover .ix-title { color: var(--hi); }
.ix-year { font-stretch: 80%; color: var(--mute); font-variant-numeric: tabular-nums; font-size: var(--f-small); }
.ix-title { font-stretch: 108%; font-weight: 650; font-size: 1.15rem; letter-spacing: -.01em; }
.ix-sum { display: block; color: var(--mute); font-size: var(--f-small); font-weight: 400; font-stretch: 100%; margin-top: 3px; letter-spacing: 0; max-width: 70ch; }
.ix-dom, .ix-status { font-size: var(--f-meta); font-stretch: 85%; color: var(--ink-2); }
@media (max-width: 760px) {
  .index-list a { grid-template-columns: 1fr auto; gap: 4px 14px; }
  .ix-year { order: 2; text-align: right; } .ix-title { order: 1; } .ix-dom { order: 3; } .ix-status { order: 4; text-align: right; }
}

/* ---------- research ---------- */
.rs-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.rs a { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 10px clamp(24px, 5vw, 80px); padding: clamp(28px, 4vw, 44px) 0; border-bottom: 1px solid var(--line); text-decoration: none; position: relative; }
.rs a::before { content: ''; position: absolute; left: 0; top: -1px; width: 0; height: 2px; background: var(--accent); transition: width .4s cubic-bezier(.2, .7, .2, 1); }
.rs a:hover::before { width: 100%; }
.rs-meta { grid-column: 1; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.rs h3 { grid-column: 1; margin: 0; font-stretch: 115%; font-weight: 750; font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1.04; letter-spacing: -.025em; }
.rs-q { grid-column: 2; grid-row: 1 / span 3; margin: 0; font-size: var(--f-lead); line-height: 1.4; font-stretch: 104%; color: var(--ink); }
.rs-q::before { content: 'Question'; display: block; font-size: var(--f-meta); font-stretch: 85%; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.rs-sum { grid-column: 2; margin: 6px 0 0; color: var(--ink-2); font-size: var(--f-small); max-width: 62ch; }
.rs .go { grid-column: 1; align-self: end; }
@media (max-width: 860px) {
  .rs a { grid-template-columns: 1fr; }
  .rs-meta, .rs h3, .rs-q, .rs-sum, .rs .go { grid-column: 1; grid-row: auto; }
}

/* ---------- dermis ---------- */
.dermis { margin-top: var(--sec); padding: clamp(72px, 10vw, 136px) 0; background: var(--raise); border-block: 1px solid var(--line); position: relative; overflow: hidden; }
.dermis::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5; background-image: radial-gradient(circle, var(--line-2) 1px, transparent 1.2px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(to bottom, #000, transparent 60%); mask-image: linear-gradient(to bottom, #000, transparent 60%); }
.dermis .wrap { position: relative; }
.dermis-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px clamp(24px, 5vw, 80px); align-items: end; }
.dermis-mark { grid-column: 1 / -1; margin: 0; font-stretch: 125%; font-weight: 800; font-size: 1.125rem; color: var(--accent); letter-spacing: -.01em; }
.dermis-tag { margin: 0; font-stretch: 118%; font-weight: 750; font-size: clamp(2.2rem, 5.2vw, 4.5rem); line-height: .95; letter-spacing: -.035em; }
.dermis-overview { color: var(--ink-2); font-size: var(--f-small); }
.dermis-overview p:last-child { margin-bottom: 0; }
.dermis-photos { display: grid; grid-template-columns: 7fr 5fr; gap: 14px; margin-top: clamp(48px, 6vw, 80px); }
.dermis-photos.n1 { grid-template-columns: 1fr; }
.dermis-photos.n3 { grid-template-columns: 6fr 3fr 3fr; }
.dermis-photos figure { margin: 0; }
.dermis-photos button { display: block; width: 100%; padding: 0; border: 0; background: var(--raise-2); cursor: zoom-in; border-radius: var(--r-img); overflow: hidden; height: clamp(260px, 34vw, 500px); }
.dermis-photos.n1 button { height: auto; aspect-ratio: 16 / 8; }
.dermis-photos img { width: 100%; height: 100%; object-fit: cover; }
.dermis-photos figcaption { margin-top: 8px; font-size: var(--f-meta); color: var(--mute); font-stretch: 85%; }
@media (max-width: 640px) { .dermis-photos, .dermis-photos.n3 { grid-template-columns: 1fr; } .dermis-photos button { height: auto; aspect-ratio: 4 / 3; } }
.dermis-figure { margin: clamp(48px, 6vw, 80px) 0; }
.dermis-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px clamp(24px, 4vw, 56px); padding-top: 32px; border-top: 1px solid var(--line-2); }
.dermis-cols h3, .dermis-timeline h3, .dermis-contact h3 { margin: 0 0 10px; font-size: var(--f-small); font-weight: 650; font-stretch: 105%; }
.dermis-cols p { margin: 0; color: var(--ink-2); font-size: var(--f-small); }
@media (max-width: 860px) { .dermis-head, .dermis-cols { grid-template-columns: 1fr; } }
.dermis-timeline { margin-top: clamp(56px, 7vw, 88px); }
.dermis-timeline ol { list-style: none; margin: 18px 0 0; padding: 0 0 6px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); overflow-x: auto; scrollbar-width: thin; }
.dermis-timeline li { position: relative; padding: 26px 24px 0 0; }
.dermis-timeline li::before { content: ''; position: absolute; top: 5px; left: 0; right: 0; height: 1px; background: var(--line-2); }
.dermis-timeline li::after { content: ''; position: absolute; top: 0; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--raise); border: 1.5px solid var(--accent); }
.dermis-timeline li:last-child::after { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.dermis-timeline time { display: block; margin-bottom: 6px; }
.dermis-timeline b { display: block; font-weight: 650; margin-bottom: 4px; font-size: var(--f-small); }
.dermis-timeline .prose { font-size: var(--f-meta); color: var(--ink-2); line-height: 1.5; }
@media (max-width: 640px) {
  .dermis-timeline ol { grid-auto-flow: row; grid-auto-columns: auto; }
  .dermis-timeline li { padding: 0 0 26px 28px; }
  .dermis-timeline li::before { top: 6px; bottom: -6px; left: 5px; right: auto; width: 1px; height: auto; }
  .dermis-timeline li:last-child::before { display: none; }
}
.dermis-contact { margin-top: clamp(56px, 7vw, 88px); padding: clamp(24px, 3vw, 36px); border: 1px solid var(--line-2); border-radius: 6px; background: var(--ground); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 24px 40px; align-items: center; }
.dermis-contact p { margin: 0; color: var(--ink-2); font-size: var(--f-small); }
.dermis-contact dl { margin: 0; display: grid; gap: 10px; }
.dermis-contact dl div { display: grid; grid-template-columns: 80px 1fr; gap: 12px; align-items: baseline; }
.dermis-contact dt { font-size: var(--f-meta); color: var(--mute); font-stretch: 85%; }
.dermis-contact dd { margin: 0; font-weight: 550; }
.dermis-contact dd a { text-decoration-color: var(--accent); }
.dermis-cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 960px) { .dermis-contact { grid-template-columns: 1fr; } .dermis-cta { justify-content: flex-start; } }

.dg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dg-stage { position: relative; padding: 0 28px 0 0; display: flex; flex-direction: column; gap: 6px; }
.dg-stage:not(:last-child)::after { content: ''; position: absolute; top: 44px; left: 108px; right: 18px; height: 1px; background: repeating-linear-gradient(to right, var(--line-2) 0 6px, transparent 6px 10px); }
.dg-stage b { font-size: var(--f-small); font-weight: 650; margin-top: 14px; }
.dg-stage span { color: var(--ink-2); font-size: var(--f-meta); line-height: 1.5; max-width: 26ch; }
.dg-vis { width: 88px; height: 88px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--ground); display: grid; place-items: center; }
.dg-tiles { grid-template-columns: repeat(3, 22px); gap: 3px; place-content: center; }
.dg-tile { display: grid; grid-template-columns: repeat(4, 4px); gap: 2px; padding: 2px; border: 1px solid var(--line-2); border-radius: 2px; }
.dg-tile i { width: 4px; height: 4px; background: var(--line-2); }
.dg-tile i.h { background: var(--accent); }
.dg-fw { grid-template-rows: repeat(3, 8px); gap: 8px; align-content: center; }
.dg-fw span { width: 52px; height: 8px; border-radius: 2px; background: var(--line-2); }
.dg-fw span:nth-child(2) { width: 36px; background: var(--ink-2); }
.dg-key .dg-vis { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 24px -6px rgba(var(--accent-rgb), .5); }
.dg-wave svg { width: 64px; height: 30px; }
.dg-yours .dg-vis { border-style: dashed; }
.dg-hand { grid-auto-flow: column; gap: 6px; align-items: end; }
.dg-hand span { width: 9px; border-radius: 5px 5px 2px 2px; background: var(--line-2); }
.dg-hand span:nth-child(1) { height: 34px; } .dg-hand span:nth-child(2) { height: 44px; } .dg-hand span:nth-child(3) { height: 38px; }
@media (max-width: 860px) { .dg { grid-template-columns: 1fr 1fr; gap: 36px 20px; } .dg-stage::after { display: none; } }

/* ---------- failures ---------- */
.faults { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.fault { border-bottom: 1px solid var(--line); }
.fault > button { width: 100%; background: none; border: 0; cursor: pointer; text-align: left; display: grid; grid-template-columns: 112px minmax(0, 1fr) minmax(0, 240px) 28px; gap: 20px; align-items: baseline; padding: 22px 0; }
.fault > button:hover .fault-title { color: var(--hi); }
.fault-date { font-stretch: 80%; color: var(--mute); font-size: var(--f-small); font-variant-numeric: tabular-nums; }
.fault-title { font-stretch: 106%; font-weight: 650; font-size: 1.2rem; line-height: 1.3; letter-spacing: -.01em; }
.fault-proj { font-size: var(--f-meta); color: var(--ink-2); font-stretch: 85%; }
.fault-icon { width: 14px; height: 14px; position: relative; align-self: center; justify-self: end; }
.fault-icon::before, .fault-icon::after { content: ''; position: absolute; background: var(--ink-2); left: 0; right: 0; top: 50%; height: 1.5px; transition: transform .25s; }
.fault-icon::after { transform: rotate(90deg); }
.fault.open .fault-icon::after { transform: rotate(0deg); }
.fault-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s cubic-bezier(.2, .7, .2, 1); }
.fault.open .fault-body { grid-template-rows: 1fr; }
.fault-body > div { overflow: hidden; }
.fault-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 48px; padding: 4px 0 32px 132px; }
.fault-grid h4 { margin: 0 0 6px; font-size: var(--f-meta); font-stretch: 85%; font-weight: 600; color: var(--mute); }
.fault-grid p { margin: 0; font-size: var(--f-small); color: var(--ink-2); max-width: 56ch; }
.fault-grid .lesson { grid-column: 1 / -1; padding: 18px 20px; background: var(--raise); border-left: 2px solid var(--fault); }
.fault-grid .lesson p { color: var(--ink); font-size: var(--f-body); }
.fault-grid .lesson h4 { color: var(--fault); }
.fault-cost { color: var(--mute); font-size: var(--f-meta); font-stretch: 85%; grid-column: 1 / -1; }
@media (max-width: 760px) {
  .fault > button { grid-template-columns: 1fr 20px; gap: 4px 12px; }
  .fault-date { grid-row: 1; } .fault-title { grid-row: 2; } .fault-proj { grid-row: 3; }
  .fault-icon { grid-row: 1 / 3; grid-column: 2; }
  .fault-grid { grid-template-columns: 1fr; padding-left: 0; }
}

/* ---------- trajectory ---------- */
.gantt { position: relative; }
.g-axis { position: relative; height: 26px; border-bottom: 1px solid var(--line-2); }
.g-tick { position: absolute; bottom: 6px; font-stretch: 80%; font-size: var(--f-meta); color: var(--mute); transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.g-rows { position: relative; list-style: none; margin: 0; padding: 0; }
.g-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.g-now { position: absolute; top: -26px; bottom: 0; width: 1px; background: var(--accent); z-index: 1; box-shadow: 0 0 10px rgba(var(--accent-rgb), .6); }
.g-now span { position: absolute; top: 4px; right: 6px; font-size: var(--f-meta); font-stretch: 80%; color: var(--accent); font-weight: 600; }
.g-row { position: relative; height: 58px; }
.g-bar { position: absolute; top: 12px; height: 34px; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; display: flex; flex-direction: column; justify-content: flex-end; min-width: 4px; }
.g-bar .g-label { white-space: nowrap; font-size: var(--f-small); font-weight: 600; line-height: 1.2; padding-bottom: 6px; }
.g-bar .g-label em { font-style: normal; font-weight: 400; color: var(--mute); }
.g-bar .g-line { align-self: stretch; height: 4px; border-radius: 2px; background: var(--c, var(--ink-2)); position: relative; }
.g-bar.ongoing .g-line { background: linear-gradient(to right, var(--c) 82%, transparent); }
.g-bar.planned .g-line::after { content: ''; position: absolute; top: 0; bottom: 0; left: var(--now); right: 0; background: repeating-linear-gradient(to right, var(--ground) 0 4px, transparent 4px 8px); }
.g-bar.flip .g-label { position: absolute; right: calc(100% + 12px); bottom: -7px; padding: 0; text-align: right; }
.g-bar:hover .g-label, .g-bar[aria-pressed='true'] .g-label { color: var(--hi); }
.g-bar[aria-pressed='true'] .g-line { box-shadow: 0 0 0 3px var(--accent-soft); }
.g-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; font-size: var(--f-meta); color: var(--mute); font-stretch: 85%; }
.g-legend span { display: inline-flex; align-items: center; gap: 8px; }
.g-legend i { width: 18px; height: 4px; border-radius: 2px; background: var(--c); }
.gantt-detail { min-height: 64px; margin-top: 18px; padding: 16px 0; border-top: 1px solid var(--line); color: var(--ink-2); font-size: var(--f-small); max-width: 72ch; }
.gantt-detail b { color: var(--ink); font-weight: 650; }
.career-list { display: none; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.career-list li { padding: 18px 0 18px 18px; border-bottom: 1px solid var(--line); position: relative; }
.career-list li::before { content: ''; position: absolute; left: 0; top: 24px; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.career-list b { display: block; font-weight: 650; }
.career-list span { color: var(--ink-2); }
.career-list p { margin: 6px 0 0; color: var(--ink-2); font-size: var(--f-small); }
@media (max-width: 860px) { .gantt, .gantt-detail { display: none; } .career-list { display: block; } }

/* ---------- log ---------- */
.log { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.log.no-now { grid-template-columns: 1fr; }
.log-now { position: sticky; top: 96px; padding: 24px; background: var(--raise); border-radius: 4px; border: 1px solid var(--line); }
.log-now .now-label { margin-bottom: 12px; }
.log-now p.big { margin: 0; font-stretch: 108%; font-weight: 600; font-size: 1.3rem; line-height: 1.3; letter-spacing: -.01em; }
.log-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.log-item { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.log-item time { font-stretch: 80%; color: var(--mute); font-size: var(--f-small); font-variant-numeric: tabular-nums; }
.log-item h3 { margin: 0 0 4px; font-weight: 650; font-size: 1.125rem; line-height: 1.35; font-stretch: 104%; letter-spacing: -.005em; }
.log-item h3 a { text-decoration-color: var(--accent); }
.log-tags { display: flex; gap: 14px; margin-bottom: 8px; font-size: var(--f-meta); color: var(--mute); font-stretch: 85%; }
.log-tags .k { color: var(--ink-2); }
.log-tags .k[data-k='Award'] { color: var(--accent); }
.log-item .prose { font-size: var(--f-small); color: var(--ink-2); }
.log-item .prose p:last-child { margin-bottom: 0; }
.log-item img { margin-top: 14px; border-radius: var(--r-img); max-height: 420px; width: auto; }
@media (max-width: 860px) { .log { grid-template-columns: 1fr; } .log-now { position: static; } .log-item { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- writing ---------- */
.sub { margin: 0 0 18px; font-size: var(--f-small); font-weight: 650; font-stretch: 105%; color: var(--ink-2); }
.pubs + .stories { margin-top: clamp(64px, 8vw, 104px); }
.pub-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.pub { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 260px); gap: 12px 48px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.pub h4 { margin: 0 0 8px; font-stretch: 112%; font-weight: 700; font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.12; letter-spacing: -.02em; }
.pub h4 a { text-decoration: none; }
.pub h4 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.pub p { margin: 0; color: var(--ink-2); font-size: var(--f-small); max-width: 64ch; }
.pub-side { display: flex; flex-direction: column; gap: 4px; font-size: var(--f-meta); font-stretch: 85%; color: var(--mute); }
.pub-side .venue { color: var(--ink); font-weight: 600; font-size: var(--f-small); font-stretch: 95%; }
.pub-links { display: flex; gap: 16px; margin-top: 10px; }
.pub-links a { font-size: var(--f-small); color: var(--ink); text-decoration-color: var(--accent); }
@media (max-width: 760px) { .pub { grid-template-columns: 1fr; } .pub-side { order: -1; flex-direction: row; flex-wrap: wrap; gap: 4px 14px; } }
.stories-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.sub-link { font-size: var(--f-small); color: var(--ink-2); text-decoration-color: var(--accent); }
.story-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.story { text-decoration: none; display: flex; flex-direction: column; }
.story-img { aspect-ratio: 16 / 9; background: var(--raise); border-radius: var(--r-img); overflow: hidden; margin-bottom: 14px; }
.story-img img, .story-img svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.story h4 { margin: 6px 0 8px; font-weight: 650; font-size: 1.15rem; line-height: 1.3; font-stretch: 104%; }
.story:hover h4 { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .2em; }
.story p { margin: 0; color: var(--ink-2); font-size: var(--f-small); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.story-row:empty::before { content: 'Your latest Medium stories appear here once your Medium username is set in admin.'; grid-column: 1 / -1; color: var(--mute); font-size: var(--f-small); padding: 22px; border: 1px dashed var(--line-2); border-radius: 4px; }
@media (max-width: 960px) {
  .story-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(78vw, 340px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); scroll-padding-inline: var(--pad); }
  .story { scroll-snap-align: start; }
}

/* ---------- photos ---------- */
.photo-grid { columns: 3 300px; column-gap: 14px; }
.ph { display: block; width: 100%; margin: 0 0 14px; padding: 0; border: 0; background: var(--raise); cursor: zoom-in; break-inside: avoid; border-radius: var(--r-img); overflow: hidden; position: relative; }
.ph img { width: 100%; height: auto; transition: opacity .35s; }
.ph img:not(.ld) { aspect-ratio: 4 / 5; opacity: 0; }
.ph:hover img { opacity: .86; }
.ph .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px; text-align: left; font-size: var(--f-meta); color: #f1efe9; background: linear-gradient(transparent, rgba(10, 12, 14, .82)); opacity: 0; transition: opacity .2s; }
.ph:hover .cap, .ph:focus-visible .cap { opacity: 1; }
@media (max-width: 640px) { .photo-grid { columns: 2; column-gap: 8px; } .ph { margin-bottom: 8px; } }

.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: rgba(8, 10, 12, .97); color: #eeebe5; --ink: #eeebe5; --ink-2: #c6c3bd; --line-2: #333b43; }
.lightbox::backdrop { background: rgba(8, 10, 12, .9); }
.lightbox[open] { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; animation: lbIn .2s ease-out; }
@keyframes lbIn { from { opacity: 0; } }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100dvh; padding: 56px 0 24px; }
.lightbox img { max-height: calc(100dvh - 140px); max-width: 100%; object-fit: contain; border-radius: 2px; }
.lightbox figcaption { margin-top: 14px; font-size: var(--f-small); color: var(--ink-2); text-align: center; padding: 0 16px; display: flex; gap: 16px; }
#lbCount { color: var(--mute); font-stretch: 85%; font-variant-numeric: tabular-nums; }
.lb-close { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 16px; background: none; border: 1px solid var(--line-2); border-radius: var(--r-ctl); padding: 6px 16px; cursor: pointer; z-index: 2; font-size: var(--f-small); }
.lb-nav { height: 100%; background: none; border: 0; cursor: pointer; position: relative; }
.lb-nav::before { content: ''; position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; border-left: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: translate(-30%, -50%) rotate(45deg); }
.lb-next::before { transform: translate(-70%, -50%) rotate(-135deg); }
.lb-nav:hover::before { border-color: var(--ink); }
@media (max-width: 640px) { .lightbox[open] { grid-template-columns: 0 1fr 0; } .lb-nav { display: none; } }

/* ---------- contact ---------- */
.contact { padding-bottom: clamp(72px, 9vw, 120px); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 48px clamp(32px, 6vw, 96px); align-items: start; }
.contact-email { display: inline-block; font-stretch: 115%; font-weight: 700; font-size: clamp(1.4rem, 3.2vw, 2.6rem); letter-spacing: -.025em; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .18em; word-break: break-all; margin-bottom: 28px; }
.contact-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.contact-links a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 550; }
.contact-links a span { color: var(--mute); font-weight: 400; font-size: var(--f-small); font-stretch: 85%; text-align: right; }
.contact-links a:hover { color: var(--hi); }
.contact-links a:hover span { color: var(--accent); }
.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 7px; font-size: var(--f-meta); color: var(--ink-2); font-stretch: 90%; font-weight: 500; }
.form input, .form textarea { font: inherit; font-size: var(--f-body); font-stretch: 100%; color: var(--ink); background: var(--raise); border: 1px solid var(--line-2); border-radius: 4px; padding: 12px 14px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form .hp { position: absolute; left: -9999px; }
.form-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-status { margin: 0; font-size: var(--f-small); color: var(--ink-2); }
.form-status.err { color: var(--fault); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 28px; padding-bottom: max(32px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--mute); font-size: var(--f-meta); font-stretch: 85%; }
.foot p { margin: 0; }

/* ---------- detail, log and photo pages ---------- */
.proj, .page { padding-top: 120px; }
.page { padding-bottom: 96px; }
.proj-back { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 40px; font-size: var(--f-small); color: var(--ink-2); text-decoration: none; }
.proj-back::before { content: ''; width: 7px; height: 7px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.proj-back:hover { color: var(--ink); }
.proj h1 { margin: 0 0 24px; font-stretch: 125%; font-weight: 800; font-size: clamp(2.75rem, 8vw, 7rem); line-height: .9; letter-spacing: -.04em; max-width: 16ch; }
.proj-q { font-size: clamp(1.3rem, 2.2vw, 1.75rem); line-height: 1.35; font-stretch: 104%; max-width: 40ch; margin: 0 0 20px; }
.proj-sum { font-size: var(--f-lead); color: var(--ink-2); max-width: 52ch; margin: 0 0 48px; line-height: 1.45; }
.proj-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 32px; padding: 20px 0; border-block: 1px solid var(--line-2); margin: 0 0 56px; }
.proj-facts dt { font-size: var(--f-meta); color: var(--mute); font-stretch: 85%; margin-bottom: 4px; }
.proj-facts dd { margin: 0; font-size: var(--f-small); font-weight: 550; }
@media (max-width: 760px) { .proj-facts { grid-template-columns: 1fr 1fr; } }
.proj-cover { border-radius: var(--r-img); overflow: hidden; margin-bottom: 64px; background: var(--raise); }
.proj-cover img { width: 100%; }
.proj-cover svg { width: 100%; display: block; aspect-ratio: 21 / 9; }
.proj-body { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 48px clamp(32px, 6vw, 96px); align-items: start; }
.proj-aside { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 28px; }
.proj-aside h3 { margin: 0 0 10px; font-size: var(--f-meta); color: var(--mute); font-weight: 600; font-stretch: 85%; }
.proj-aside ul { list-style: none; margin: 0; padding: 0; }
.proj-aside li a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 550; }
.proj-aside li a:hover { color: var(--hi); }
.proj-stack { display: flex; flex-wrap: wrap; gap: 6px; }
.proj-stack span { border: 1px solid var(--line-2); border-radius: var(--r-ctl); padding: 3px 11px; font-size: var(--f-meta); font-stretch: 88%; color: var(--ink-2); }
@media (max-width: 860px) { .proj-body { grid-template-columns: 1fr; } .proj-aside { position: static; order: -1; } }
.proj-gallery { margin-top: 64px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.proj-gallery button { padding: 0; border: 0; background: var(--raise); cursor: zoom-in; border-radius: var(--r-img); overflow: hidden; aspect-ratio: 4 / 3; }
.proj-gallery img { width: 100%; height: 100%; object-fit: cover; }
.proj-gallery button:first-child:nth-last-child(odd) { grid-column: 1 / -1; aspect-ratio: 16 / 8; }
.proj-fails { margin-top: 88px; }
.proj-fails h2 { font-stretch: 118%; font-weight: 750; font-size: var(--f-h3); letter-spacing: -.025em; margin: 0 0 24px; }
.proj-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 104px; padding: 28px 0 72px; border-top: 1px solid var(--line-2); }
.proj-nav a { text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.proj-nav a span { font-size: var(--f-meta); color: var(--mute); font-stretch: 85%; }
.proj-nav a b { font-stretch: 112%; font-weight: 700; font-size: clamp(1.1rem, 2vw, 1.5rem); letter-spacing: -.015em; }
.proj-nav a:hover b { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .2em; }
.proj-nav .next { text-align: right; grid-column: 2; }
.page-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 16px 48px; align-items: end; margin-bottom: 40px; }
@media (max-width: 760px) { .page-head { grid-template-columns: 1fr; } }
.page .log-now { position: static; margin-bottom: 40px; max-width: 560px; }
.page-filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 40px; padding: 18px 0; border-block: 1px solid var(--line); }
.year-block { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 24px; margin-bottom: 48px; }
.year { margin: 0; font-stretch: 125%; font-weight: 800; font-size: 2.25rem; letter-spacing: -.03em; line-height: 1; color: var(--ink-2); position: sticky; top: 96px; align-self: start; }
@media (max-width: 760px) { .year-block { grid-template-columns: 1fr; gap: 12px; } .year { position: static; } }
.empty-filter { color: var(--ink-2); }
.notfound { padding: 200px 0 120px; }
.notfound h1 { font-stretch: 125%; font-weight: 800; font-size: clamp(3rem, 9vw, 7rem); letter-spacing: -.04em; line-height: .9; margin: 0 0 20px; }

/* ---------- icons and theme toggle ---------- */
.ic { width: 18px; height: 18px; flex: none; }
.bar-right { display: flex; align-items: center; gap: 10px; }
.theme-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--line-2); border-radius: var(--r-ctl); height: 34px; padding: 0 12px; cursor: pointer; color: var(--ink-2); font-size: var(--f-meta); }
.theme-btn:hover { color: var(--ink); border-color: var(--mute); }
.theme-btn .ic { width: 16px; height: 16px; }
.bar .theme-btn { width: 34px; padding: 0; justify-content: center; }
.bar .theme-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:root[data-theme='light'] .theme-btn .ic:first-of-type, :root:not([data-theme='light']) .theme-btn .ic:nth-of-type(2) { display: none; }

/* ---------- connect (contact) ---------- */
.connect { margin-top: var(--sec); padding: clamp(80px, 11vw, 150px) 0 clamp(64px, 8vw, 104px); background: var(--raise); border-top: 1px solid var(--line); }
.connect-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 420px); gap: 48px clamp(40px, 7vw, 120px); align-items: end; }
.connect-label { margin: 0 0 22px; font-size: var(--f-small); font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 10px; }
.connect-label::before { content: ''; width: 22px; height: 2px; background: var(--accent); }
.connect-title { margin: 0 0 24px; font-stretch: 112%; font-weight: 750; font-size: clamp(2.75rem, 7.2vw, 6.5rem); line-height: .94; letter-spacing: -.04em; max-width: 12ch; }
.connect-text { margin: 0; font-size: var(--f-lead); color: var(--ink-2); max-width: 48ch; line-height: 1.45; }
.connect-actions { display: flex; flex-direction: column; gap: 12px; }
.btn-big { justify-content: center; padding: 17px 24px; font-size: 1rem; border-radius: 10px; }
.btn-big .ic { width: 20px; height: 20px; }
.btn-big.btn-line { border-color: var(--line-2); }
.connect-card { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 0; margin-top: 4px; border-bottom: 1px solid var(--line-2); text-decoration: none; font-weight: 600; font-size: var(--f-small); }
.connect-card:hover { border-color: var(--accent); color: var(--accent); }
.connect-more { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 40px clamp(40px, 7vw, 120px); margin-top: clamp(64px, 8vw, 104px); padding-top: 36px; border-top: 1px solid var(--line-2); align-items: start; }
.contact-rows { list-style: none; margin: 0; padding: 0; }
.contact-rows a { display: grid; grid-template-columns: 22px 96px minmax(0, 1fr); gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.contact-rows .ic { color: var(--mute); }
.cr-l { font-size: var(--f-meta); color: var(--mute); font-stretch: 85%; }
.cr-v { font-weight: 550; overflow-wrap: anywhere; }
.contact-rows a:hover .cr-v, .contact-rows a:hover .ic { color: var(--accent); }
.form-title { margin: 0 0 4px; font-weight: 650; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.connect .form input, .connect .form textarea { background: var(--ground); }
@media (max-width: 900px) { .connect-grid, .connect-more { grid-template-columns: 1fr; } .connect-actions { max-width: 460px; } }
@media (max-width: 520px) { .form-2 { grid-template-columns: 1fr; } .contact-rows a { grid-template-columns: 22px 72px minmax(0, 1fr); } }

/* ---------- footer ---------- */
.foot { display: block; padding: 0; border-top: 1px solid var(--line); color: var(--ink-2); font-size: var(--f-small); font-stretch: 100%; }
.foot-top { display: flex; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; padding-top: 48px; padding-bottom: 40px; }
.foot-name { margin: 0 0 6px; font-stretch: 112%; font-weight: 700; font-size: 1.25rem; color: var(--ink); letter-spacing: -.01em; }
.foot-tag { margin: 0; color: var(--mute); }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: baseline; }
.foot-links a { text-decoration: none; color: var(--ink); font-weight: 500; }
.foot-links a:hover { color: var(--accent); }
.foot-bottom { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 18px; padding-bottom: max(28px, env(safe-area-inset-bottom)); color: var(--mute); font-size: var(--f-meta); font-stretch: 90%; }
.foot-bottom::before { content: ''; position: absolute; top: 0; left: var(--pad); right: var(--pad); height: 1px; background: var(--line); }
.foot-bottom p { margin: 0; }

/* ---------- digital card ---------- */
body[data-page='card'] .bar { display: none; }
body[data-page='card'] .foot { display: none; }
.cardpage { min-height: 100svh; display: grid; place-items: center; padding: clamp(16px, 5vw, 64px) 16px; background: radial-gradient(60% 50% at 50% 0%, rgba(var(--accent-rgb), .12), transparent 70%); }
.vcard-panel { width: min(100%, 560px); background: var(--raise); border: 1px solid var(--line); border-radius: 28px; padding: clamp(20px, 4vw, 32px); box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .55); }
.vc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: clamp(28px, 5vw, 44px); }
.vc-back { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--raise-2); color: var(--ink); }
.vc-back:hover { color: var(--accent); }
.vc-status { display: inline-flex; align-items: center; gap: 9px; font-size: var(--f-meta); font-weight: 600; color: var(--ink-2); }
.vc-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: live 2.4s ease-in-out infinite; }
.vc-id { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center; margin-bottom: 28px; }
.vc-avatar { width: clamp(84px, 18vw, 112px); aspect-ratio: 1; border-radius: 22px; overflow: hidden; background: var(--accent); }
.vc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mono { position: relative; display: grid; place-items: center; width: 100%; height: 100%; }
.mono-grid { position: absolute; inset: 14%; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; place-items: center; }
.mono-grid i { width: 26%; aspect-ratio: 1; background: rgba(255, 255, 255, .28); }
.mono-grid i.h { background: rgba(255, 255, 255, .85); width: 40%; }
.mono b { position: relative; font-stretch: 125%; font-weight: 800; font-size: clamp(1.4rem, 4vw, 1.9rem); color: var(--ground); letter-spacing: -.03em; mix-blend-mode: normal; background: var(--accent); padding: 0 6px; border-radius: 6px; }
.vc-id h1 { margin: 0 0 6px; font-stretch: 112%; font-weight: 750; font-size: clamp(1.75rem, 5vw, 2.4rem); letter-spacing: -.03em; line-height: 1; }
.vc-tag { margin: 0 0 6px; font-weight: 600; }
.vc-sub { margin: 0; color: var(--mute); font-size: var(--f-meta); font-stretch: 85%; }
.vc-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vc-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 96px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--ground); color: var(--ink); text-decoration: none; cursor: pointer; font-weight: 600; font-size: var(--f-small); transition: transform .15s, border-color .15s; }
.vc-act .ic { width: 22px; height: 22px; }
.vc-act:hover { border-color: var(--accent); }
.vc-act:active { transform: scale(.97); }
.vc-act.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
:root:not([data-theme='light']) .vc-act.primary { color: #06101e; }
.vc-act:disabled { opacity: .4; cursor: default; }
.vc-note { min-height: 1.2em; margin: 10px 0 6px; font-size: var(--f-meta); color: var(--accent); text-align: center; }
.vc-rows { list-style: none; margin: 0 0 22px; padding: 0; border-top: 1px solid var(--line-2); }
.vc-rows a { display: grid; grid-template-columns: 22px minmax(0, 1fr) 18px; gap: 16px; align-items: center; padding: 16px 4px; border-bottom: 1px solid var(--line-2); text-decoration: none; }
.vc-rows a span { overflow-wrap: anywhere; }
.vc-rows a .ic:last-child { width: 16px; height: 16px; color: var(--mute); }
.vc-rows a:hover span { color: var(--accent); }
.vc-qr { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 18px 18px 22px; border-radius: 18px; background: var(--raise-2); }
.vc-qr b { display: block; font-stretch: 125%; font-weight: 800; font-size: 1.4rem; letter-spacing: -.02em; }
.vc-qr span { font-size: var(--f-meta); color: var(--mute); font-stretch: 85%; overflow-wrap: anywhere; }
.vc-qr button { width: 104px; flex: none; padding: 6px; border: 0; border-radius: 10px; background: #fff; cursor: zoom-in; }
.qr { display: block; width: 100%; height: auto; }
.qr-dialog { border: 0; padding: 0; background: transparent; max-width: none; }
.qr-dialog::backdrop { background: rgba(8, 10, 12, .8); backdrop-filter: blur(6px); }
.qr-box { width: min(86vw, 380px); background: #fff; color: #0e1114; border-radius: 24px; padding: 24px; text-align: center; }
.qr-box p { margin: 14px 0 0; font-weight: 600; }
.qr-box .meta { margin: 4px 0 18px; color: #66707a; font-weight: 500; }
.qr-box .btn-line { color: #0e1114; border-color: #c3c9ce; }
@media (max-width: 480px) { .vc-rows a span { font-size: .95rem; } .vc-act { min-height: 84px; font-size: var(--f-meta); } .vcard-panel { border-radius: 22px; } }

/* ---------- section identities ---------- */
[data-band] { --tint: var(--t-work); --accent: rgb(var(--tint)); --accent-rgb: var(--tint); --accent-soft: rgba(var(--tint), .15); position: relative; isolation: isolate; }
[data-band='research'] { --tint: var(--t-research); }
[data-band='failures'] { --tint: var(--t-failures); }
[data-band='trajectory'] { --tint: var(--t-trajectory); }
[data-band='log'] { --tint: var(--t-log); }
[data-band='writing'] { --tint: var(--t-writing); }
[data-band='photos'] { --tint: var(--t-photos); }
[data-band='contact'] { --tint: var(--t-contact); }
[data-band='dermis'] { --tint: var(--t-dermis); }
[data-band]::before { /* a faint light behind each section's heading */
  content: ''; position: absolute; z-index: -1; pointer-events: none; left: 0; right: 0;
  top: max(0px, calc(var(--sec) - 200px)); height: 720px;
  background: radial-gradient(48% 50% at 14% 32%, rgba(var(--tint), .085), transparent 72%), radial-gradient(40% 40% at 92% 70%, rgba(var(--tint), .035), transparent 70%);
}
:root[data-theme='light'] [data-band]::before { background: radial-gradient(48% 50% at 14% 32%, rgba(var(--tint), .09), transparent 72%), radial-gradient(40% 40% at 92% 70%, rgba(var(--tint), .04), transparent 70%); }
[data-band='dermis']::before, [data-band='contact']::before { display: none; }
.sec-head::before, .page-head::before { content: ''; grid-column: 1 / -1; width: 56px; height: 3px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 18px rgba(var(--accent-rgb), .6); }
.sec-head .count, .page-head .count { color: var(--accent); }
.fault-grid .lesson { border-left-color: var(--accent); background: linear-gradient(to right, var(--accent-soft), var(--raise) 60%); }
.fault-grid .lesson h4 { color: var(--accent); }
.fault.open > button .fault-title { color: var(--accent); }
.chips button[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: var(--ground); }
.index-list a:hover, .log-item:hover { background: linear-gradient(to right, var(--accent-soft), transparent 70%); }
.rs a:hover h3, .pub h4 a:hover, .story:hover h4 { color: var(--accent); }
.ph:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
.bar-nav a[data-nav='research'] { --accent: rgb(var(--t-research)); }
.bar-nav a[data-nav='dermis'] { --accent: rgb(var(--t-dermis)); }
.bar-nav a[data-nav='failures'] { --accent: rgb(var(--t-failures)); }
.bar-nav a[data-nav='trajectory'] { --accent: rgb(var(--t-trajectory)); }
.bar-nav a[data-nav='log'] { --accent: rgb(var(--t-log)); }
.bar-nav a[data-nav='writing'] { --accent: rgb(var(--t-writing)); }
.bar-nav a[data-nav='photos'] { --accent: rgb(var(--t-photos)); }
.bar-nav a.on::after { box-shadow: 0 0 10px var(--accent); }

/* ---------- Dermis: its own brand block, dark in both themes ---------- */
.dermis {
  --ground: #050607; --raise: #0b0e10; --raise-2: #121619; --line: #1b2024; --line-2: #2a3137;
  --ink: #f3f0ea; --ink-2: #c8c4bd; --mute: #8a9097; --hi: #ffffff;
  --accent: #ff5a4e; --accent-rgb: 255, 90, 78; --accent-soft: rgba(255, 90, 78, .14);
  --board-line: #2f363c; --board-pad: #3f474e;
  color-scheme: dark; color: var(--ink);
  background:
    radial-gradient(55% 60% at 88% 12%, rgba(255, 90, 78, .16), transparent 65%),
    radial-gradient(45% 50% at 5% 95%, rgba(255, 60, 50, .07), transparent 70%),
    #050607;
  border: 0; margin-top: var(--sec); padding: clamp(88px, 12vw, 160px) 0;
}
.dermis::before { opacity: .9; background-image: radial-gradient(circle, rgba(255, 255, 255, .09) 1px, transparent 1.3px); background-size: 22px 22px; -webkit-mask-image: radial-gradient(70% 70% at 80% 20%, #000, transparent 75%); mask-image: radial-gradient(70% 70% at 80% 20%, #000, transparent 75%); }
.dermis::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(to right, transparent, rgba(255, 90, 78, .7), transparent); }
.dermis-brand { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: clamp(20px, 3vw, 36px); }
.dermis-logo { height: clamp(44px, 5vw, 60px); width: auto; filter: drop-shadow(0 0 22px rgba(255, 90, 78, .35)); }
.dermis-word { font-stretch: 112%; font-weight: 700; font-size: 1.6rem; letter-spacing: -.03em; line-height: 1; }
.dermis-role { margin-left: 6px; padding: 5px 12px; border: 1px solid rgba(255, 90, 78, .35); border-radius: var(--r-ctl); font-size: var(--f-meta); color: var(--accent); background: rgba(255, 90, 78, .06); }
.dermis-tag { font-size: clamp(2.6rem, 6.4vw, 5.75rem); line-height: .92; letter-spacing: -.04em; max-width: 13ch; text-wrap: balance; }
.dermis-sub { margin: 0 0 14px; font-stretch: 108%; font-weight: 600; font-size: var(--f-lead); color: var(--ink); line-height: 1.3; }
.dermis-overview { color: var(--ink-2); font-size: var(--f-small); }
.dermis-overview .prose p:last-child { margin-bottom: 0; }
.dermis-photos button { border: 1px solid var(--line-2); }
.dermis-cols > div { padding: 22px 22px 24px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .02); }
.dermis-cols { border-top: 0; padding-top: 0; }
.dermis-cols h3 { color: var(--accent); }
.dermis-contact { border-color: rgba(255, 90, 78, .3); background: linear-gradient(135deg, rgba(255, 90, 78, .08), transparent 60%), var(--raise); }
.dermis .btn { background: var(--accent); color: #1a0706; }
.dermis .btn:hover { background: #ff7a6e; }
.dermis .btn-line { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.dermis .btn-line:hover { background: var(--raise-2); }

.vc-rows .vc-logo { width: 22px; height: auto; }
