/* Luthfi Farabi, CV. Annual-report system: white paper, ink, one corporate green. */

@font-face {
  font-family: "Hanken Grotesk";
  src: url("/assets/fonts/hanken-grotesk-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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;
}

/* Metric-matched fallback so the swap does not shift the layout */
@font-face {
  font-family: "Hanken Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 100.8%;
  ascent-override: 99.3%;
  descent-override: 30.1%;
  line-gap-override: 0%;
}

:root {
  --paper: #ffffff;
  --paper-tint: #f1f4f2;
  --ink: #111315;
  --ink-2: #3c434a;
  --ink-3: #5c636b;
  --rule: #d5dbd8;
  --rule-tint: #c9d1cd;
  --green: #0b5d4b;
  --green-deep: #0a4a3c;
  --green-press: #083b30;
  --on-green: #ffffff;
  --on-green-2: #c6ddd5;
  --on-green-rule: rgba(255, 255, 255, 0.22);
  --on-green-rule-strong: rgba(255, 255, 255, 0.6);
  --highlight: #d4ece3;

  --font: "Hanken Grotesk", "Hanken Fallback", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(20px, 4vw, 56px);
  --gap: clamp(16px, 2vw, 28px);
  --masthead-h: 64px;
  --display: clamp(2.75rem, 1.6rem + 3.9vw, 4.5rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
  interpolate-size: allow-keywords;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--masthead-h) + 20px);
  scrollbar-color: #9aa4a0 var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  font-kerning: normal;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  caret-color: var(--green);
}

::selection { background: var(--green); color: var(--on-green); }

img, svg { display: block; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  transition: text-decoration-color 0.2s, color 0.2s;
}
a:hover { text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--paper-tint);
  padding: 0.08em 0.36em;
  border-radius: 2px;
  white-space: nowrap;
}

strong { font-weight: 600; }

.nw { white-space: nowrap; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ic {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  border-radius: 2px;
}
.skip:focus { top: 12px; }

/* Email links stay hidden until the owner replaces the placeholder address */
a[href="mailto:YOUR_EMAIL"] { display: none !important; }

/* ---------- Layout ---------- */

.wrap {
  width: min(100% - 2 * var(--gutter), 1320px);
  margin-inline: auto;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: var(--gap);
}

@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
}

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 2px;
  font: 600 1rem/1 var(--font);
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-sm { min-height: 40px; padding: 0 14px; font-size: 0.9375rem; gap: 8px; }

.btn-solid { background: var(--green); color: var(--on-green); }
.btn-solid:hover { background: var(--green-deep); }
.btn-solid:active { background: var(--green-press); }

.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--paper-tint); }

.btn-meta {
  margin-left: 2px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.4);
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--on-green-2);
}

.btn-paper { background: var(--paper); color: var(--green-deep); }
.btn-paper:hover { background: var(--highlight); }

.btn-line-paper { border-color: var(--on-green-rule-strong); color: var(--on-green); background: transparent; }
.btn-line-paper:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--on-green); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 4px;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
}
.text-link span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.text-link:hover span { text-decoration-color: currentColor; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

/* ---------- Masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-top: 4px solid var(--green);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}
.masthead.is-scrolled { border-bottom-color: var(--rule); }

.masthead-in {
  display: flex;
  align-items: center;
  gap: 20px;
  height: calc(var(--masthead-h) - 4px);
}

.wordmark {
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.015em;
  text-decoration: none;
  white-space: nowrap;
}

.edition {
  display: none;
  padding-left: 20px;
  border-left: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--ink-3);
  white-space: nowrap;
}

.nav { margin-left: auto; }

.nav-list {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  position: relative;
  display: block;
  padding: 8px 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
}
.nav-list a:hover { color: var(--ink); }
.nav-list a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.nav-list a[aria-current="true"] { color: var(--ink); }
.nav-list a[aria-current="true"]::after { transform: scaleX(1); }

.menu-btn {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font: 600 0.9375rem/1 var(--font);
  cursor: pointer;
}
.menu-bars { display: grid; gap: 4px; width: 16px; }
.menu-bars span { height: 1.5px; background: currentColor; transition: transform 0.3s var(--ease-out); }
.menu-btn[aria-expanded="true"] .menu-bars span:first-child { transform: translateY(2.75px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-bars span:last-child { transform: translateY(-2.75px) rotate(-45deg); }

@media (min-width: 1180px) {
  .edition { display: block; }
}

@media (max-width: 959px) {
  .masthead-in { gap: 12px; }
  .nav { order: 3; margin-left: 0; min-width: 0; }
  html:not(.js) .masthead-in { flex-wrap: wrap; height: auto; padding-block: 10px 4px; row-gap: 4px; }
  html:not(.js) .nav { flex: 1 0 100%; }
  html:not(.js) .nav-list a { padding-left: 0; padding-right: 18px; }
  .masthead-cv { margin-left: auto; }
  .js .menu-btn { display: inline-flex; }

  /* Without JS the sections stay reachable as a scrolling strip */
  .nav-list { overflow-x: auto; scrollbar-width: none; }
  .nav-list::-webkit-scrollbar { display: none; }

  .js .nav-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 4px var(--gutter) 20px;
    background: var(--paper);
    border-top: 1px solid var(--rule);
    border-bottom: 2px solid var(--ink);
  }
  .js .nav-list.is-open { display: flex; }
  .js .nav-list a {
    padding: 14px 0;
    font-size: 1.125rem;
    color: var(--ink);
    border-bottom: 1px solid var(--rule);
  }
  .js .nav-list li:last-child a { border-bottom: 0; }
  .js .nav-list a::after { left: 0; right: auto; width: 24px; bottom: 10px; }
}

@media (max-width: 420px) {
  .masthead-cv .lg { display: none; }
}

@media (max-width: 340px) {
  .masthead-in { gap: 8px; }
  .menu-btn { padding: 0 10px; gap: 8px; }
}

/* ---------- Cover ---------- */

.cover { padding-top: clamp(36px, 5.5vw, 80px); }

.name {
  margin: 0;
  font-size: var(--display);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.role {
  margin: 0.06em 0 0;
  font-size: clamp(2.125rem, 1.2rem + 3.6vw, 4.5rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--ink-3);
  text-wrap: balance;
}

.availability {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 26px 0 0;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.45;
}

.state {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  transform: translateY(-1px);
}

.lead {
  max-width: 62ch;
  margin: 14px 0 0;
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.6;
  color: var(--ink-2);
}

.facts {
  position: relative;
  margin: 44px 0 0;
  padding-top: 2px;
}
.facts::before,
.figures::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ink);
  transform-origin: left center;
}

.fact { padding: 14px 0 16px; border-bottom: 1px solid var(--rule); }
.fact dt { margin-bottom: 4px; font-size: 0.8125rem; font-weight: 500; color: var(--ink-3); }
.fact dd { display: flex; flex-direction: column; margin: 0; }
.fact strong { font-size: 0.9375rem; font-weight: 600; line-height: 1.4; }
.fact span { font-size: 0.875rem; line-height: 1.45; color: var(--ink-3); }
.fact span + strong { margin-top: 10px; }

@media (min-width: 640px) and (max-width: 899px) {
  .facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--gap);
  }
}

@media (min-width: 900px) {
  .role { font-size: var(--display); }
  .cover-main { grid-column: 4 / -1; grid-row: 1; }
  .facts { grid-column: 1 / 4; grid-row: 1; align-self: start; margin-top: 10px; }
}

/* Key figures */

.figures-block {
  margin-top: clamp(44px, 5vw, 64px);
  padding-bottom: clamp(56px, 7vw, 96px);
}

.figures-title {
  margin: 0 0 10px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
}

.figures {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding-top: 2px;
  border-bottom: 1px solid var(--rule);
}

.figure {
  padding: 16px 16px 18px 0;
  border-top: 1px solid var(--rule);
  transition: background-color 0.3s;
}
.figure:nth-child(-n + 2) { border-top: 0; }
.figure:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--rule); }

.figure dt {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.fig {
  font-size: clamp(2.5rem, 1.45rem + 3.4vw, 5rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.045em;
  transition: color 0.3s;
}

.fig-unit {
  margin-left: 0.18em;
  font-size: clamp(1.0625rem, 0.85rem + 0.8vw, 1.625rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink-2);
}

.fn { margin-left: 2px; line-height: 0; }
.fn a {
  display: inline-block;
  min-width: 24px;
  min-height: 24px;
  padding: 0 4px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
  color: var(--green);
  text-decoration: none;
  border-radius: 2px;
  transform: translateY(-1.15em);
  transition: background-color 0.2s, color 0.2s;
}
.fn a:hover, .fn a:focus-visible { background: var(--green); color: var(--on-green); }

.figure dd {
  max-width: 26ch;
  margin: 8px 0 0;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ink-2);
}

.figure.is-lit .fig { color: var(--green); }

.notes {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 0;
  padding: 14px 0 0;
  list-style: none;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-3);
}

.notes li {
  display: flex;
  gap: 6px;
  padding: 2px 4px 2px 0;
  border-radius: 2px;
  background-image: linear-gradient(var(--highlight), var(--highlight));
  background-repeat: no-repeat;
  background-size: 0% 100%;
  transition: background-size 0.6s var(--ease-out), color 0.3s;
}
.notes li.is-lit { background-size: 100% 100%; color: var(--ink); }
.note-n { flex: none; min-width: 0.9em; font-weight: 700; color: var(--green); }
.notes a { color: var(--ink-2); white-space: nowrap; }

@media (min-width: 900px) {
  .figures { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .figure { border-top: 0; padding: 18px 20px 20px; border-left: 1px solid var(--rule); }
  .figure:first-child { padding-left: 0; border-left: 0; }
  .figure:nth-child(even) { padding-left: 20px; }
  .notes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
  .notes li { padding: 2px 16px 2px 20px; }
  .notes li:first-child { padding-left: 0; }
}

/* Target marking: the evidence a footnote points to gets a highlighter sweep */
.mark-able {
  background-image: linear-gradient(var(--highlight), var(--highlight));
  background-repeat: no-repeat;
  background-size: 0% 100%;
  transition: background-size 0.8s var(--ease-out);
}
.mark-able.is-marked { background-size: 100% 100%; }

/* ---------- Chapter opener (Selected work) ---------- */

.chapter {
  padding: clamp(56px, 7vw, 104px) 0;
  background: var(--green);
  color: var(--on-green);
}

.chapter ::selection, .back-cover ::selection, .colophon ::selection { background: var(--on-green); color: var(--green-deep); }
.chapter :focus-visible, .back-cover :focus-visible, .colophon :focus-visible { outline-color: var(--on-green); }

.chapter-title {
  margin: 0;
  font-size: clamp(2.5rem, 1.5rem + 3.6vw, 4.75rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.chapter-body > p {
  max-width: 52ch;
  margin: 18px 0 0;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--on-green-2);
}

.toc {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--on-green-rule-strong);
}

.toc a {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--on-green-rule);
  color: var(--on-green);
  text-decoration: none;
}
.toc-n { font-size: 0.875rem; color: var(--on-green-2); }
.toc-t { font-size: 1.0625rem; font-weight: 500; line-height: 1.35; }
.toc-f { font-size: 0.9375rem; color: var(--on-green-2); white-space: nowrap; }
.toc a:hover .toc-t { text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }

@media (min-width: 900px) {
  .chapter-title { grid-column: 1 / 6; }
  .chapter-body { grid-column: 7 / -1; }
  .chapter-body > p { margin-top: 0.35em; }
}

/* ---------- Cases ---------- */

.cases { padding: clamp(24px, 4vw, 56px) 0 clamp(64px, 8vw, 112px); }

.case {
  position: relative;
  padding: clamp(28px, 3.5vw, 44px) 0 clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--rule);
}
.case:first-child { border-top: 0; }
.case::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ink);
  transform-origin: left center;
}
.case:not(:first-child)::before {
  background: var(--green);
  transform: scaleX(0);
  transition: transform 0.6s var(--ease-out);
}
.case:not(:first-child):hover::before,
.case:not(:first-child):focus-within::before,
.case.is-marked::before { transform: scaleX(1); }

.case-n {
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}
.case-n:hover { text-decoration: underline; }
.case-cat { margin: 2px 0 0; font-size: 0.875rem; color: var(--ink-3); }

.case-fig { display: flex; align-items: baseline; margin: 16px 0 0; }
.case-fig .fig { font-size: clamp(2.5rem, 1.7rem + 2.2vw, 3.75rem); }
.case-cap { max-width: 24ch; margin: 6px 0 0; font-size: 0.875rem; line-height: 1.45; color: var(--ink-2); }

.case:hover .case-fig .fig,
.case:focus-within .case-fig .fig,
.case.is-marked .case-fig .fig { color: var(--green); }

.case-title {
  max-width: 32ch;
  margin: 0 0 18px;
  font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.022em;
}

.case-title .hl {
  background-image: linear-gradient(var(--highlight), var(--highlight));
  background-repeat: no-repeat;
  background-size: 0% 100%;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: background-size 0.9s var(--ease-out);
}
.case.is-marked .case-title .hl { background-size: 100% 100%; }

.fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 54rem;
  margin: 0;
}
.fields > div { display: contents; }
.fields dt {
  padding: 12px 0 0;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  font-weight: 700;
}
.fields dd {
  margin: 0;
  padding: 2px 0 12px;
  color: var(--ink-2);
}
.fields .stack { font-size: 0.9375rem; color: var(--ink); }

.writeup { margin-top: 10px; }
.writeup summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
  color: var(--green);
  list-style: none;
  cursor: pointer;
}
.writeup summary::-webkit-details-marker { display: none; }
.writeup summary span { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.writeup summary:hover span { text-decoration-color: currentColor; }
.writeup summary .ic { transition: transform 0.4s var(--ease-out); }
.writeup[open] summary .ic { transform: rotate(45deg); }

.writeup-body {
  max-width: 68ch;
  padding: 6px 0 4px 20px;
  border-left: 1px solid var(--rule);
  color: var(--ink-2);
}
.writeup-body p { margin: 0 0 1em; }
.writeup-body p:last-child { margin-bottom: 0; }

@supports selector(::details-content) {
  .writeup::details-content {
    height: 0;
    overflow: clip;
    transition: height 0.5s var(--ease-out), content-visibility 0.5s allow-discrete;
  }
  .writeup[open]::details-content { height: auto; }
}

.title-n { display: none; }

@media (max-width: 899px) {
  .case-side { margin-bottom: 18px; }
  .case-n, .case-cat { display: none; }
  .case-fig { margin-top: 0; }
  .title-n {
    display: inline;
    margin-right: 0.45em;
    font-weight: 400;
    color: var(--ink-3);
  }
}

@media (min-width: 900px) {
  .cap-cat { display: none; }
}

@media (min-width: 900px) {
  .case-side { grid-column: 1 / 4; }
  .case-main { grid-column: 4 / -1; }
  .fields { grid-template-columns: 7.5rem minmax(0, 1fr); }
  .fields dt { padding: 12px 0; }
  .fields dd { padding: 12px 0; border-top: 1px solid var(--rule); }
}

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 8vw, 120px) 0; }
.section-tint { background: var(--paper-tint); }
.section-rule { border-top: 1px solid var(--rule); }

.section-head h2 {
  margin: 0;
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.section-head p {
  max-width: 34ch;
  margin: 14px 0 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.section-body { margin-top: 32px; }

@media (min-width: 900px) {
  .section-head {
    grid-column: 1 / 4;
    align-self: start;
    position: sticky;
    top: calc(var(--masthead-h) + 32px);
  }
  .section-body { grid-column: 4 / -1; margin-top: 0; }
}

/* Experience ledger */

.ledger {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--ink);
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px 32px;
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--rule);
}
.row.mark-able { padding-inline: 0; }

.period {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-3);
  white-space: nowrap;
}
.period .state { display: inline-block; margin-right: 8px; vertical-align: 0.05em; transform: none; }
.row.is-current .period { color: var(--green); font-weight: 600; }

.who h3, .who h4 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.who p { margin: 2px 0 0; font-size: 0.9375rem; line-height: 1.4; color: var(--ink-3); }

.what { max-width: 64ch; margin: 6px 0 0; color: var(--ink-2); }

.ledger-sub {
  margin: 48px 0 12px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
}
.ledger-compact { border-top-width: 1px; border-top-color: var(--ink); }
.ledger-compact .what { font-size: 0.9375rem; }

@media (min-width: 720px) {
  .row { grid-template-columns: 9rem minmax(0, 1fr); }
  .period { padding-top: 3px; }
  .what { grid-column: 2; margin-top: 4px; }
}

@media (min-width: 1180px) {
  .row { grid-template-columns: 9rem minmax(0, 15rem) minmax(0, 1fr); }
  .what { grid-column: 3; margin-top: 0; }
}

/* Skills */

.skills {
  margin: 0;
  border-top: 2px solid var(--ink);
}

.skill {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px 32px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule-tint);
}
.skill dt strong { display: block; font-weight: 600; }
.skill dt span { display: block; font-size: 0.875rem; color: var(--ink-3); }
.skill dd { margin: 0; line-height: 1.65; }
.earlier { display: block; margin-top: 4px; font-size: 0.875rem; color: var(--ink-3); }

@media (min-width: 720px) {
  .skill { grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); }
}

/* About */

.about p {
  max-width: 62ch;
  margin: 0 0 1em;
  font-size: 1.125rem;
  color: var(--ink-2);
}
.about p:first-child {
  max-width: 34ch;
  font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.about .creed {
  max-width: 22ch;
  margin: 44px 0 0;
  padding-top: 22px;
  border-top: 2px solid var(--ink);
  font-size: clamp(1.625rem, 1.1rem + 1.8vw, 2.625rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.032em;
  color: var(--ink);
}
.creed span { color: var(--green); }

/* Now */

.now-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--ink);
}
.now-list li { padding: 18px 0 22px; border-bottom: 1px solid var(--rule); }
.now-list h3 { margin: 0 0 6px; font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.now-list p { margin: 0; font-size: 0.9375rem; color: var(--ink-2); }

@media (min-width: 720px) {
  .now-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Back cover (contact) ---------- */

.back-cover {
  padding: clamp(72px, 9vw, 136px) 0 clamp(72px, 9vw, 120px);
  background: var(--green);
  color: var(--on-green);
}

.back-cover h2 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2.25rem, 1.35rem + 3.4vw, 4.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}

.contact-lead {
  max-width: 52ch;
  margin: 22px 0 0;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--on-green-2);
}

.actions-on-green { margin-top: 32px; }

.oneliner {
  max-width: 62ch;
  margin: 44px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--on-green-rule-strong);
}
.oneliner blockquote { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--on-green); }
.oneliner figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-top: 14px;
  font-size: 0.875rem;
  color: var(--on-green-2);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--on-green-rule-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--on-green);
  font: 600 0.9375rem/1 var(--font);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--on-green); }
html:not(.js) .copy-btn { display: none; }
.copy-btn.is-done { background: var(--on-green); color: var(--green-deep); border-color: var(--on-green); }

.terms {
  margin: 48px 0 0;
  border-top: 1px solid var(--on-green-rule-strong);
}
.terms > div { padding: 14px 0 16px; border-bottom: 1px solid var(--on-green-rule); }
.terms dt { font-size: 0.875rem; font-weight: 700; color: var(--on-green); }
.terms dd { margin: 4px 0 0; font-size: 0.9375rem; line-height: 1.5; color: var(--on-green-2); }

@media (min-width: 900px) {
  .contact-main { grid-column: 1 / 8; }
  .terms { grid-column: 9 / -1; align-self: start; margin-top: 10px; }
}

.colophon {
  background: var(--green);
  color: var(--on-green);
  border-top: 1px solid var(--on-green-rule);
}
.colophon-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
  padding: 18px 0 24px;
  font-size: 0.875rem;
  color: var(--on-green-2);
}
.colophon p { margin: 0; }
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-left: auto;
  color: var(--on-green);
  font-weight: 600;
  text-decoration: none;
}
.to-top .ic { width: 16px; height: 16px; }
.to-top:hover span { text-decoration: underline; text-underline-offset: 0.22em; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  max-width: min(92vw, 420px);
  padding: 12px 18px;
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9375rem;
  font-weight: 500;
  border: 1px solid var(--ink);
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.4s var(--ease-out);
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Motion: one authored moment on the cover ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .js .facts::before,
  .js .figures::before {
    animation: rule-draw 1.2s var(--ease-out) 0.1s both;
  }
  .js .figures::before { animation-delay: 0.25s; }

  .js .figure {
    animation: figure-rise 0.9s var(--ease-out) both;
  }
  .js .figure:nth-child(1) { animation-delay: 0.35s; }
  .js .figure:nth-child(2) { animation-delay: 0.42s; }
  .js .figure:nth-child(3) { animation-delay: 0.49s; }
  .js .figure:nth-child(4) { animation-delay: 0.56s; }
}

@keyframes rule-draw { from { transform: scaleX(0); } }
@keyframes figure-rise { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- Print ---------- */

@media print {
  @page { margin: 16mm 14mm; }
  body { font-size: 10.5pt; }
  .masthead, .copy-btn, .to-top, .skip, .toast, .writeup summary { display: none !important; }
  .actions .btn:not([href^="http"]), .actions .text-link { display: none !important; }
  .actions .btn { min-height: 0; padding: 0; border: 0; background: none; color: var(--ink); font-weight: 600; }
  .actions .ic, .actions .sr-only { display: none; }
  .chapter, .back-cover, .colophon { background: none; color: var(--ink); }
  .chapter-body > p, .toc-n, .toc-f, .contact-lead, .terms dd, .colophon-in, .oneliner figcaption { color: var(--ink-2); }
  .toc a, .oneliner blockquote, .terms dt { color: var(--ink); }
  .toc, .oneliner, .terms { border-color: var(--ink); }
  .toc a, .terms > div, .colophon { border-color: var(--rule); }
  .section-head { position: static; }
  .case, .row, .skill, .now-list li { break-inside: avoid; }
  .writeup::details-content { height: auto !important; content-visibility: visible !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: var(--ink-3); }
}
