@font-face {
  font-family: Edition Serif;
  src: url("../assets/projects/fonts/instrument-serif.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: Edition Serif;
  src: url("../assets/projects/fonts/instrument-serif-italic.ttf") format("truetype");
  font-style: italic;
  font-display: swap;
}
/* The homepage introduction and first project archive have their own styles. */
.v2 {
  --serif: "Edition Serif", Georgia, serif;
  --mono: "Courier New", monospace;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.5 "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}
.v2 *, .v2 *::before, .v2 *::after { box-sizing: border-box; }
.v2 h1, .v2 h2, .v2 h3, .v2 p, .v2 figure { margin: 0; }
.v2 a { color: inherit; text-decoration: none; }
.v2 a:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
.v2 h1, .v2 h2, .v2 h3, .v2 .v2-signature, .v2 .v2-dek { font-family: var(--serif); font-weight: 400; }
.v2-wrap { width: min(1100px, calc(100% - 72px)); margin-inline: auto; }
.v2-home { padding: clamp(44px, 6vw, 90px) 0 clamp(55px, 8vw, 110px); margin-top: 55px; }
.v2-heading, .v2-register-heading, .v2-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.v2-heading { border-bottom: 1px solid var(--rule); padding-bottom: 24px; }
.v2-heading h2 { font-size: clamp(66px, 8vw, 120px); line-height: .94; letter-spacing: -.045em; }
.v2-heading em { font-weight: 400; color: var(--faint); }
.v2-jump, .v2-bar a { font-size: 14px; }
.v2-jump:hover, .v2-bar a:hover, .v2-story nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
/* Five cards across; the lower four sit between the upper cards. */
.v2-home > .v2-wrap { container-type: inline-size; }
.v2-deck {
  isolation: isolate;
  margin-inline: calc(50% - min(50vw - 16px, 680px));
}
.v2-spread {
  /* Each original card spanned 19% of the text column before its individual size adjustment. */
  --card-width: 23.75cqw;
  display: grid; grid-template-columns: repeat(10,minmax(0,1fr));
  align-items: center; justify-items: center; row-gap: clamp(17px,2.4vw,34px);
  padding: clamp(56px,6.5vw,90px) calc(var(--card-width) * .21) clamp(62px,7vw,98px);
}
.v2-card {
  --angle: -8deg; --lift: 7px; --offset: 0%; --size: 1.06;
  grid-column: span 2; position: relative; display: block; container-type: inline-size;
  width: calc(var(--card-width) * var(--size));
  transform: translate(var(--offset),var(--lift)) rotate(var(--angle)); border-radius: 9px;
}
.v2-card:nth-child(2) { --angle: 4deg; --lift: -11px; --size: .99; --offset: -2%; }
.v2-card:nth-child(3) { --angle: -4deg; --lift: 12px; --size: 1.11; }
.v2-card:nth-child(4) { --angle: 7deg; --lift: -7px; --size: .98; --offset: 2%; }
.v2-card:nth-child(5) { --angle: -6deg; --lift: 3px; --size: 1.05; }
.v2-card:nth-child(6) { grid-column: 2 / span 2; --angle: 5deg; --lift: -4px; --size: 1.11; --offset: -4%; }
.v2-card:nth-child(7) { --angle: -7deg; --lift: 8px; --size: 1.02; --offset: -1%; }
.v2-card:nth-child(8) { --angle: 3deg; --lift: -8px; --size: 1.09; --offset: 2%; }
.v2-card:nth-child(9) { --angle: 8deg; --lift: 5px; --size: 1.04; --offset: 3%; }
.v2-pan:not([hidden]) { display: flex; justify-content: end; gap: 4px; margin: 8px 0 20px; }
.v2-pan button {
  width: 44px; height: 44px; border: 1px solid var(--rule); border-radius: 50%;
  background: var(--ground); color: var(--ink); font-size: 18px; cursor: pointer;
}
.v2-pan button:disabled { opacity: .35; cursor: default; }
.v2-print {
  position: relative; display: grid; overflow: hidden; isolation: isolate; border-radius: 9px;
  grid-template: "label label" auto "plate plate" minmax(0,1fr) "title mark" auto / minmax(0,1fr) auto;
  align-items: baseline; gap: clamp(3px,1.5cqi,6px) 4px;
  padding: clamp(10px,5cqi,22px) clamp(12px,6.5cqi,28px) clamp(10px,5cqi,22px);
  background: var(--stock, #34373a) url("art/paper-grain.webp") repeat;
  color: var(--letterpress, #f1e8d6); aspect-ratio: 14 / 9;
  box-shadow: 0 1px 1px #2225, 0 8px 12px -6px #0003, 0 21px 25px -17px #0008;
}
/* Center the contents in the visible part of each overlapped sheet. */
.v2-card:not(:nth-child(5)):not(:last-child) .v2-print {
  padding-inline-end: 13cqi;
}
.v2-card:not(:nth-child(5)):not(:last-child) .v2-mark { margin-inline-end: 4cqi; }
@media (min-width: 761px) and (max-width: 1280px) {
  .v2-card:not(:nth-child(5)):not(:last-child) .v2-print { padding-inline-end: 22cqi; }
}
.v2-print[data-cover="lore"] { --stock: #243858; --letterpress: #eee3c9; }
.v2-print[data-cover="rag-intelligence"] { --stock: #203638; }
.v2-print[data-cover="ai-agent-platform"] { --stock: #342d3d; }
.v2-print[data-cover="meter-book"] { --stock: #543228; }
.v2-print[data-cover="passage-index"] { --stock: #455064; }
.v2-print[data-cover="saas-automation"] { --stock: #40311e; }
.v2-print[data-cover="pulse-study"] { --stock: #738a69; --letterpress: #141b14; }
.v2-print[data-cover="ml-research-lab"] { --stock: #333d55; }
.v2-print[data-cover="ai-deepfake-detector"] { --stock: #302735; }
.v2-print::after { content: ""; position: absolute; inset: 5px; border: 1px solid color-mix(in srgb,currentColor 20%,transparent); border-radius: 5px; pointer-events: none; }
.v2-print img {
  grid-area: plate; place-self: center; display: block;
  width: 90%; height: 100%; min-height: 0; object-fit: contain;
}
.v2-imprint, .v2 small, .v2-register-heading > span { font: 500 11px/1.45 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.v2-imprint { grid-area: label; font-size: clamp(8px,3.8cqi,12px); line-height: 1.15; }
.v2-signature {
  grid-area: title; min-width: 0; font-size: clamp(18px,10.25cqi,42px); line-height: 1;
  letter-spacing: -.025em; text-wrap: balance; overflow-wrap: anywhere;
}
.v2-mark { grid-area: mark; font: italic clamp(16px,8cqi,30px)/1 var(--serif); }
.v2-register-heading { border-bottom: 1px solid var(--ink); padding-bottom: 14px; }
.v2-register-heading h3 { font-size: clamp(37px,4.4vw,58px); line-height: 1; letter-spacing: -.03em; }
.v2-register { padding: 0; margin: 0; list-style: none; }
.v2-row { display: grid; grid-template-columns: minmax(190px,1fr) 1.1fr 24px; align-items: center; gap: 30px; border-bottom: 1px solid var(--rule); padding: 19px 0; }
.v2 small { display: block; color: var(--quiet); }
.v2-row strong { display: block; font: 400 32px/1.2 var(--serif); }
.v2-desc { color: var(--quiet); max-width: 52ch; font-size: 14px; }
.v2-detail { margin: 0; min-height: 100vh; }
.v2-skip { position: absolute; top: -100px; padding: 9px; background: var(--ground); z-index: 3; }
.v2-skip:focus { top: 4px; }
.v2-bar { padding: 24px 0; border-bottom: 1px solid var(--rule); }
header.v2-bar > a:first-child { font-weight: 700; letter-spacing: -.055em; font-size: 23px; }
.v2-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 8%; align-items: center; padding-block: clamp(55px,8vw,105px); }
.v2-intro h1 { font-size: clamp(66px,8vw,125px); line-height: 1; letter-spacing: -.045em; margin: 16px 0 6px; }
.v2-dek { font-size: clamp(27px,3.3vw,44px); font-style: italic; line-height: 1.1; }
.v2-intro p:last-child { max-width: 44ch; margin-top: 18px; color: var(--quiet); }
.v2-exhibit { padding: 6%; container-type: inline-size; }
.v2-exhibit .v2-print { transform: rotate(4deg); }
.v2-story { display: grid; grid-template-columns: minmax(170px, .62fr) minmax(0,1.7fr); border-top: 1px solid var(--rule); gap: 7%; padding: 36px 0 56px; }
.v2-story nav { position: sticky; top: 24px; }
.v2-story nav a { display: block; width: fit-content; padding-block: 4px; font-size: 14px; }
.v2-story nav small { margin-bottom: 12px; }
.v2-story article { max-width: 690px; }
.v2-story article section { margin-top: 34px; scroll-margin-top: 22px; }
.v2-story h2 { font-size: clamp(34px,4vw,48px); line-height: 1.1; letter-spacing: -.025em; margin-bottom: 12px; }
.v2-story article p { line-height: 1.7; }
.v2-story ol { padding-left: 23px; }
.v2-story ol li { padding: 8px; border-bottom: 1px solid var(--rule); }
.v2-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.v2-tools span { border: 1px solid var(--rule); border-radius: 4px; padding: 4px 9px; font-size: 12px; }
.v2-story figure { margin-top: 22px; }
.v2-story figure img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }
.v2-story figcaption { margin-top: 8px; color: var(--quiet); font-size: 14px; }
.v2-story .v2-source { display: block; width: fit-content; text-decoration: underline; text-underline-offset: 4px; margin-top: 10px; }
.v2-end { border-bottom: 0; border-top: 1px solid var(--rule); }
@media (max-width: 760px) {
  .v2-wrap { width: calc(100% - 40px); }
  .v2-deck { margin-inline: 0; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
  .v2-spread { --card-width: 205px; min-width: 1100px; padding: 49px 38px 54px; row-gap: 22px; }
  .v2-row { grid-template-columns: 1fr 1fr 15px; gap: 14px; }
  .v2-intro { gap: 4%; }
  .v2-story { grid-template-columns: 1fr; gap: 20px; }
  .v2-story nav { position: static; display: flex; gap: 4px 15px; flex-wrap: wrap; }
  .v2-story nav small { width: 100%; margin: 0; }
}
@media (max-width: 520px) {
  .v2-heading { align-items: end; gap: 12px; }
  .v2-heading h2 { font-size: clamp(46px,13vw,65px); }
  .v2-jump { font-size: 12px; white-space: nowrap; }
  .v2-row { grid-template-columns: 1fr 20px; gap: 8px; }
  .v2-row .v2-desc { grid-row: 2; grid-column: 1/-1; }
  .v2-row > span:last-child { grid-row: 1; grid-column: 2; }
  .v2-intro { grid-template-columns: 1fr; padding: 38px 0; gap: 18px; }
  .v2-exhibit { width: min(100%,400px); justify-self: center; }
}

.v2-card:focus-visible { z-index: 3; }
.v2-print::before {
  position: absolute; z-index: 1; inset: 0; content: ""; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at var(--shine,50%) var(--shine-y,4%), #ffffff30, transparent 62%);
}
.v2-card:focus-visible .v2-print::before { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .v2-card:hover { z-index: 3; }
  .v2-card:hover .v2-print::before { opacity: 1; }
  .v2-row:hover { color: var(--ink); }
}
@media (prefers-reduced-motion: no-preference) {
  .v2-print, .v2-print img, .v2-print::before, .v2-row > span:last-child {
    transition: transform 420ms cubic-bezier(.22,1,.36,1), opacity 700ms cubic-bezier(.22,1,.36,1), box-shadow 420ms ease-out, filter 540ms ease-out;
  }
  .v2-card:focus-visible .v2-print { transform: translateY(-4px) scale(1.03); }
  .v2-intro .v2-dek { animation: edition-type 550ms ease-out both; }
  .v2-exhibit { animation: edition-unmask 600ms cubic-bezier(.2,.7,.2,1) both; }
  @keyframes edition-type {
    from { opacity: .5; filter: blur(4px); translate: 0 4px; }
    to { opacity: 1; filter: blur(0); translate: 0 0; }
  }
  @keyframes edition-unmask {
    from { clip-path: inset(8% 0 14% 0 round 8px); opacity: .6; }
    to { clip-path: inset(-15% round 0); opacity: 1; }
  }
  @media (hover: hover) and (pointer: fine) {
    .v2-card:hover .v2-print {
      transform: perspective(850px) translateY(-4px) scale(1.03) rotateX(var(--pitch,0deg)) rotateY(var(--yaw,0deg));
      box-shadow: 0 23px 30px -13px #0007;
    }
    .v2-card:hover img { transform: scale(1.045); filter: brightness(1.05); }
    .v2-card:hover :is(.v2-signature,.v2-imprint) { animation: edition-type 400ms cubic-bezier(.22,1,.36,1); }
    .v2-row:hover > span:last-child { transform: translate(2px,-2px); }
  }
}

.v2-concept-print .v2-signature { grid-column: 1 / -1; }
.v2-concept-print .v2-mark { display: none; }
.v2-story .v2-example-note { margin-bottom: 14px; color: var(--quiet); }
.v2-step { border-top: 1px solid var(--rule); }
.v2-step:last-child { border-bottom: 1px solid var(--rule); }
.v2-step summary { padding: 13px 2px; cursor: pointer; font-weight: 550; }
.v2-step[open] p { padding: 0 14px 17px; color: var(--quiet); }
@media (max-width: 500px) {
  .v2-intro:has(.v2-concept-print) h1 { font-size: clamp(50px,12.6vw,68px); }
}

.section-dock {
  position: fixed; z-index: 8; top: max(13px,env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 3px; padding: 4px; border: 1px solid var(--rule); border-radius: 999px;
  background: var(--dock); color: var(--faint); box-shadow: var(--dock-shadow);
}
.section-dock a {
  display: grid; position: relative; place-items: center; width: 42px; height: 36px;
  color: inherit; border-radius: 999px; text-decoration: none;
}
.section-dock svg { width: 17px; height: 17px; display: block; }
.section-dock a[aria-current] { background: var(--dock-active); color: var(--ink); box-shadow: 0 1px 4px #0002; }
.section-dock a:is(:hover,:focus-visible) { background: var(--dock-active); color: var(--ink); }
.section-dock a span {
  display: block; z-index: 1; position: absolute; top: calc(100% + 9px); left: 50%; transform: translateX(-50%);
  pointer-events: none; opacity: 0; color: var(--ground); background: var(--ink); padding: 4px 8px; border-radius: 4px;
  font: 12px/1.4 Arial,sans-serif; white-space: nowrap;
}
.section-dock a:focus-visible span { opacity: 1; }
@media (hover: hover) { .section-dock a:hover span { opacity: 1; } }
html:has(.section-dock) { scroll-padding-top: 72px; }
@media (max-width: 960px) {
  body:has(.section-dock) { padding-top: 60px; }
  .section-dock { top: max(8px,env(safe-area-inset-top)); }
  .section-dock a { width: 44px; height: 40px; }
}
@media (prefers-reduced-motion: no-preference) {
  .section-dock a { transition: background-color 180ms, color 180ms, box-shadow 180ms; }
  .section-dock a span { transition: opacity 150ms; }
}

.v2-story .chapter-rail { top: 84px; }
.chapter-rail a { display: flex !important; align-items: center; gap: 9px; color: var(--quiet); }
.chapter-rail a::before { content: ""; width: 13px; height: 1px; background: currentColor; flex-shrink: 0; opacity: .55; }
.chapter-rail a[aria-current] { color: var(--ink); font-weight: 600; }
.chapter-rail a[aria-current]::before { width: 25px; height: 2px; opacity: 1; }
.v2-story article section { scroll-margin-top: 0; }
@media (min-width: 761px) {
  .v2-story .chapter-rail { max-height: calc(100dvh - 100px); overflow-y: auto; }
}
@media (max-width: 760px) {
  html:has(.chapter-rail) { scroll-padding-top: 119px; }
  .v2-story { grid-template-columns: minmax(0,1fr); }
  .v2-story aside { position: sticky; top: 58px; z-index: 4; background: var(--ground); border-block: 1px solid var(--rule); }
  .v2-story .chapter-rail { position: static; display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 16px; align-items: center; padding: 3px 6px; }
  .chapter-rail small { display: none; }
  .v2-story .chapter-rail a { flex: none; min-height: 38px; font-size: 13px; }
  .chapter-rail a::before { width: 7px; }
  .chapter-rail a[aria-current]::before { width: 14px; }
}
@media (prefers-reduced-motion: no-preference) {
  html:has(.chapter-rail) { scroll-behavior: smooth; }
  .chapter-rail a::before { transition: width 200ms ease-out, opacity 180ms; }
}
