/* Self-hosted latin subsets (Google Fonts builds), so no third-party request per page view. */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/Fraunces-normal-400to600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/IBMPlexMono-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/IBMPlexSans-italic-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/IBMPlexSans-normal-400to500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --fg: #1c1b19;
  --fg-2: #5e5b55;
  --line: #e3e0d9;
  --accent: #b5442b;
  --st-live: #24713f;
  --st-working-tool: #2a5d9f;
  --st-prototype: #8a5410;
  --st-experiment: #6a4ab3;
  --st-paused: #6a675f;
  --st-archived: #6a675f;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  --measure: 47rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141311;
    --fg: #e9e5dd;
    --fg-2: #a6a198;
    --line: #2b2925;
    --accent: #e4805f;
    --st-live: #74c28f;
    --st-working-tool: #8db4e8;
    --st-prototype: #d6a75a;
    --st-experiment: #b9a4e8;
    --st-paused: #a6a198;
    --st-archived: #a6a198;
  }
}

/* ---------- base ---------- */
html {
  font-size: 106.25%; /* 17px */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}
a:hover { text-decoration-thickness: 2px; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
p { margin: 0 0 .75rem; }
p:last-child { margin-bottom: 0; }
.mono { font-family: var(--mono); font-size: .86em; }
.sep { color: var(--fg-2); margin: 0 .5em; }

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

/* ---------- level 0: the first screen ---------- */
.fold {
  box-sizing: border-box;
  padding-top: clamp(2rem, 6vh, 4rem);
  padding-bottom: 3rem;
}
@media (min-width: 720px) {
  .fold { min-height: 100vh; }
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.25rem;
  align-items: start;
}
@media (min-width: 720px) {
  .hero { grid-template-columns: minmax(0, 1fr) 19rem; gap: 3rem; }
}
.name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.35rem;
  line-height: 1.1;
  letter-spacing: -.01em;
  margin: 0 0 .7rem;
  font-variation-settings: "opsz" 72;
}
.tagline {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1.4;
  margin: 0 0 .7rem;
  font-variation-settings: "opsz" 24;
}
.meta { margin: 0; color: var(--fg-2); font-size: .95rem; }
.meta a { color: var(--fg); }

/* signature visual: three generations of proposals, one selected each time */
.sig { margin: .35rem 0 0; max-width: 19rem; color: var(--fg-2); transition: color .4s var(--ease); }
.sig:hover { color: var(--fg); }
.sig svg { display: block; width: 100%; height: auto; overflow: visible; }
#sig-fade stop { stop-color: var(--accent); }
.s-line { fill: none; stroke: currentColor; stroke-width: 1; stroke-dasharray: 100; stroke-dashoffset: 0; opacity: .32; }
.s-line.is-sel { stroke: var(--accent); opacity: 1; }
.s-tail { fill: none; stroke: url(#sig-fade); stroke-width: 1; stroke-dasharray: 100; stroke-dashoffset: 0; }
.s-node { fill: var(--bg); stroke: currentColor; stroke-width: 1; opacity: .55; transform-box: fill-box; transform-origin: center; }
.s-node.is-sel { fill: var(--accent); stroke: var(--accent); opacity: 1; }
.s-ring { fill: none; stroke: currentColor; stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; }
.sig-cap {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .02em;
  color: var(--fg-2);
  margin-top: .6rem;
  white-space: nowrap;
}
.sig-cap span { transition: opacity .3s; }

section { margin-top: 2.2rem; }
h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.3;
  margin: 0 0 .6rem;
  font-variation-settings: "opsz" 24;
}
h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: .78rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin: 1.6rem 0 .3rem;
}
.era:first-of-type h3 { margin-top: .4rem; }
.now p { max-width: 40rem; }
.now .question { margin-top: .9rem; }

/* ---------- expandable items (levels 1 and 3) ---------- */
.work { list-style: none; margin: 0; padding: 0; }
.work > li { border-top: 1px solid var(--line); }
.work > li:last-child { border-bottom: 1px solid var(--line); }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.d-body { overflow: hidden; }

.item > summary {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: baseline;
  padding: .58rem 0;
}
.item-name { font-weight: 500; }
.item-gist { color: var(--fg-2); }
.item-gist::before { content: "— "; }
.status {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .02em;
  white-space: nowrap;
  color: var(--st, var(--fg-2));
}
.st-live { --st: var(--st-live); }
.st-working-tool { --st: var(--st-working-tool); }
.st-prototype { --st: var(--st-prototype); }
.st-experiment { --st: var(--st-experiment); }
.st-paused { --st: var(--st-paused); }
.st-archived { --st: var(--st-archived); }

.chev { position: relative; display: inline-block; width: 1.1rem; height: 1em; }
.chev::before {
  content: "";
  position: absolute;
  left: .18rem;
  top: .34em;
  width: .38rem;
  height: .38rem;
  border-right: 1px solid var(--fg-2);
  border-bottom: 1px solid var(--fg-2);
  transform: rotate(-45deg);
  transition: transform .25s var(--ease);
}
details[open] > summary .chev::before { transform: rotate(45deg); }
details.is-closing > summary .chev::before { transform: rotate(-45deg); }

/* a project record: meta line, labelled paragraphs, evidence in mono, one highlight */
.rec { padding: .3rem 0 1.5rem 1.85rem; }
.rec-meta { font-family: var(--mono); font-size: .78rem; color: var(--fg-2); margin: 0 0 1rem; }
.rec dl {
  margin: 0;
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  column-gap: 1rem;
  row-gap: .55rem;
}
.rec dt {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .03em;
  color: var(--fg-2);
  padding-top: .28em;
}
.rec dd { margin: 0; }
.ev { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: .82rem; line-height: 1.6; }
.ev li { overflow-wrap: anywhere; }
.rec .mono { overflow-wrap: anywhere; }
.rec-hl {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.5;
  margin: 1.1rem 0 0;
  max-width: 38rem;
  font-variation-settings: "opsz" 24;
}
@media (max-width: 719px) {
  .sig { max-width: 14rem; }
}
@media (max-width: 560px) {
  .item > summary { grid-template-columns: 1.1rem minmax(0, 1fr); row-gap: .1rem; }
  .item > summary .status { grid-column: 2; }
  .rec { padding-left: 0; }
  .rec dl { grid-template-columns: minmax(0, 1fr); row-gap: .15rem; }
  .rec dd { margin-bottom: .6rem; }
}

/* ---------- level 2: quiet headings that open ---------- */
.deeper { border-top: 1px solid var(--line); padding-top: .5rem; }
.sec { border-bottom: 1px solid var(--line); }
.sec > summary {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: baseline;
  padding: .95rem 0;
}
.sec > summary h2 { margin: 0; }
.sum-meta { font-family: var(--mono); font-size: .74rem; color: var(--fg-2); white-space: nowrap; }
.sec-body { padding: .3rem 0 1.9rem 1.85rem; max-width: 40rem; }
.sec-body > p { margin-bottom: .9rem; }
.sec-body .work { max-width: none; }
.sec-body .era { margin-top: 0; }
@media (max-width: 560px) { .sec-body { padding-left: 0; } }

.tools { display: flex; gap: 1.25rem; margin: 0 0 .9rem; }
.tools button {
  all: unset;
  cursor: pointer;
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--fg-2);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: .2em;
}
.tools button:hover { color: var(--fg); }
.tools button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.plain { margin: 0; padding-left: 1.1rem; }
.plain li { margin-bottom: .45rem; }
.plain li::marker { color: var(--fg-2); }

.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr); gap: 1rem; padding: .28rem 0; }
.tl .year { font-family: var(--mono); font-size: .82rem; color: var(--fg-2); padding-top: .18em; }

.contact { list-style: none; margin: 0; padding: 0; }
.contact li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; padding: .25rem 0; }
.contact .lbl { color: var(--fg-2); }
.contact a { overflow-wrap: anywhere; }

.question {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.5;
  max-width: 34rem;
  font-variation-settings: "opsz" 24;
}

.foot { margin: 4rem 0 3rem; color: var(--fg-2); font-size: .86rem; }

/* ---------- targets ---------- */
details { scroll-margin-top: 2rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chev::before, .sig, .sig-cap span { transition: none; }
}
