/* Maximally Entangled — 2026 edition. Electric flood, Hanken Grotesk, full volume. */

@font-face {
  font-family: "Hanken";
  src: url("/fonts/hanken-var.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Hanken";
  src: url("/fonts/hanken-var-italic.woff2") format("woff2");
  font-weight: 100 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Cousine";
  src: url("/fonts/cousine-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cousine";
  src: url("/fonts/cousine-bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Dirtyline 36";
  src: url("/fonts/dirtyline-36days-2022.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

@view-transition { navigation: auto; }

:root {
  color-scheme: light;
  --flood: #1f2df0;
  --flood-deep: #1518c4;
  --hot: #ff3d1f;
  --cream: #fff4e4;
  --ink: #16130e;
  --ink-soft: rgba(22, 19, 14, 0.62);
  --cream-soft: rgba(255, 244, 228, 0.72);
  --line-ink: rgba(22, 19, 14, 0.18);
  --line-cream: rgba(255, 244, 228, 0.28);
  --grot: "Hanken", "Helvetica Neue", Arial, sans-serif;
  --mono: "Cousine", "Courier New", monospace;
  --disp: "Dirtyline 36", "Hanken", sans-serif;
  --spring: cubic-bezier(0.2, 0.9, 0.25, 1.15);
}
@supports (color: oklch(0% 0 0)) {
  :root {
    --flood: oklch(47% 0.28 265);
    --flood-deep: oklch(38% 0.26 265);
    --hot: oklch(64% 0.24 32);
  }
}

* { box-sizing: border-box; }
html { background: var(--flood); scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--grot);
  font-size: 1.05rem;
  line-height: 1.6;
  font-weight: 430;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--hot); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--flood); }
::selection { background: var(--hot); color: var(--cream); }

.shell { max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 44px); }

/* reading progress */
.progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 4px;
  z-index: 100;
  background: linear-gradient(90deg, var(--hot), var(--cream));
  transform-origin: 0 50%;
  transform: scaleX(0);
}
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { to { transform: scaleX(1); } }
}
@supports not (animation-timeline: scroll()) {
  .progress { display: none; }
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--flood);
  border-bottom: 1px solid var(--line-cream);
}
.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 12px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--cream);
}
.wordmark:hover { color: var(--cream); }
.wordmark img { width: 38px; height: 30px; filter: brightness(0) invert(1); opacity: 0.95; }
.wordmark span {
  font-family: var(--disp);
  font-size: 1.35rem;
  line-height: 1;
  text-transform: uppercase;
  transform: translateY(2px);
}
.site-header nav { display: flex; gap: clamp(14px, 2.5vw, 26px); font-family: var(--mono); font-size: 0.8rem; }
.site-header nav a { color: var(--cream-soft); text-decoration: none; transition: color 0.2s; }
.site-header nav a:hover { color: var(--cream); }

/* ---------- flood hero ---------- */

.hero {
  position: relative;
  background: var(--flood);
  color: var(--cream);
  overflow: hidden;
}
.hero .shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4.5fr);
  grid-template-rows: auto 1fr;
  column-gap: clamp(30px, 5vw, 70px);
  align-items: start;
  padding-top: clamp(36px, 6vh, 64px);
  padding-bottom: 120px;
}
.hero h1 { grid-column: 1; }
.hero .lede { grid-column: 1; }
.hero-art {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  justify-self: end;
  width: min(100%, 390px);
  border-radius: 16px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
.kicker {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--hot);
  display: inline-block;
  width: fit-content;
  padding: 6px 12px 5px;
  border-radius: 4px;
  margin: 0 0 26px;
}
.hero h1 {
  margin: 0 0 30px;
  font-family: var(--disp);
  font-weight: 400;
  font-size: clamp(3.2rem, 10.5vw, 8.6rem);
  line-height: 0.92;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  max-width: 11ch;
}
.hero h1 .row { display: block; overflow: hidden; }
.hero h1 .row i { display: block; font-style: normal; }
.lede {
  margin: 0 0 36px;
  max-width: 50ch;
  font-size: clamp(1.06rem, 1.6vw, 1.3rem);
  font-weight: 460;
  color: var(--cream);
}
.lede a { color: var(--cream); text-decoration-color: var(--hot); }
.lede a:hover { color: var(--hot); }
.hero-links { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; }
.btn {
  display: inline-block;
  font-family: var(--grot);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 13px 26px;
  transition: translate 0.25s var(--spring), box-shadow 0.25s var(--spring), background 0.2s, color 0.2s;
}
.btn.solid { background: var(--cream); color: var(--ink); }
.btn.solid:hover { background: var(--hot); color: var(--cream); translate: 0 -3px; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25); }
.btn.ghost { border: 1.5px solid var(--line-cream); color: var(--cream); font-family: var(--mono); font-weight: 700; font-size: 0.85rem; }
.btn.ghost:hover { border-color: var(--cream); color: var(--cream); translate: 0 -3px; }

/* ticker */
.ticker {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  border-top: 1px solid var(--line-cream);
  padding: 14px 0;
  overflow: hidden;
  white-space: nowrap;
}
.ticker .track {
  display: inline-flex;
  gap: 3ch;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--cream-soft);
  padding-right: 3ch;
}
.ticker .track a { color: inherit; text-decoration: none; }
.ticker .track a:hover { color: var(--cream); }
.ticker .track .sep { color: var(--hot); }

/* ---------- bands & section labels ---------- */

.band { padding: clamp(70px, 11vh, 130px) 0; }
.band.cream { background: var(--cream); color: var(--ink); }
.band.hot { background: var(--hot); color: var(--cream); }
.band.flood { background: var(--flood); color: var(--cream); }
.band.ink { background: var(--ink); color: var(--cream); }

.rune {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.band.cream .rune { color: var(--hot); }
.band.hot .rune, .band.flood .rune, .band.ink .rune { color: var(--cream); opacity: 0.85; }
.rune::after { content: ""; display: block; margin-top: 12px; border-top: 1px solid currentColor; opacity: 0.25; }

/* ---------- recent writing (big list) ---------- */

.post-list { list-style: none; margin: 26px 0 0; padding: 0; }
.post-list li { border-bottom: 1.5px solid var(--line-ink); }
.post-list a {
  display: flex;
  align-items: baseline;
  gap: 22px;
  padding: 20px 4px;
  text-decoration: none;
  color: var(--ink);
  transition: padding 0.3s var(--spring), background 0.2s;
}
.post-list .d { flex: none; font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft); }
.post-list .t {
  font-weight: 800;
  font-size: clamp(1.25rem, 2.6vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.post-list .arrow { margin-left: auto; font-weight: 800; font-size: 1.3rem; opacity: 0; translate: -10px 0; transition: 0.25s var(--spring); }
.post-list a:hover { color: var(--hot); padding-left: 14px; }
.post-list a:hover .arrow { opacity: 1; translate: 0 0; }
.more { margin: 26px 0 0; font-family: var(--mono); font-size: 0.85rem; }
.more a { color: var(--ink); }
.more a:hover { color: var(--hot); }

/* ---------- worldline (hot band) ---------- */

.worldline .line {
  list-style: none;
  margin: 40px 0 0;
  padding: 48px 8px 20px;
  display: flex;
  gap: clamp(40px, 5vw, 70px);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--cream) transparent;
}
.worldline .line::before {
  content: "";
  position: absolute;
  top: 32px; left: 0;
  width: max(100%, 1700px);
  border-top: 2px solid var(--cream);
  opacity: 0.55;
}
.station { flex: none; width: 255px; scroll-snap-align: start; position: relative; }
.station .tick {
  position: absolute;
  top: -22px; left: 2px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--cream);
  box-shadow: 0 0 0 5px rgba(255, 244, 228, 0.25);
}
.station:nth-child(even) .tick { background: var(--ink); box-shadow: 0 0 0 5px rgba(22, 19, 14, 0.22); }
.station .yr { display: block; font-weight: 900; font-size: 2.5rem; letter-spacing: -0.03em; line-height: 1; margin-top: 6px; }
.station .ct { display: block; font-family: var(--mono); font-size: 0.72rem; opacity: 0.8; margin: 6px 0 14px; }
.station ul { list-style: none; margin: 0; padding: 0; }
.station li { padding: 4px 0; font-size: 0.95rem; line-height: 1.35; font-weight: 550; }
.station a { color: var(--cream); text-decoration: none; }
.station a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.more-x { display: inline-block; margin-top: 12px; font-family: var(--mono); font-size: 0.78rem; color: var(--cream); }
.more-line { margin: 26px 0 0; font-family: var(--mono); font-size: 0.85rem; }
.more-line a { color: var(--cream); }

/* ---------- built (bento, cream band) ---------- */

.works {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-top: 34px;
}
.work {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 7px 7px 0 var(--ink);
  transition: translate 0.3s var(--spring), box-shadow 0.3s var(--spring);
}
.work:hover { translate: -4px -4px; box-shadow: 12px 12px 0 var(--hot); color: var(--ink); }
.work figure { margin: 0; overflow: hidden; border-right: 2px solid var(--ink); min-height: 264px; }
.work img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: scale 0.5s var(--spring); }
.work:hover img { scale: 1.04; }
.work-text { padding: 28px 32px; align-self: center; }
.work-text h3 {
  margin: 0 0 10px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.work-text .ext { font-family: var(--mono); font-weight: 700; font-size: 0.74rem; color: var(--hot); }
.work-text p { margin: 0; font-size: 1rem; color: var(--ink-soft); }

/* ---------- worked (flood band) ---------- */

.jobs { list-style: none; margin: 14px 0 0; padding: 0; }
.jobs li {
  position: relative;
  padding: 36px 180px 36px 0;
  border-bottom: 1px solid var(--line-cream);
  font-size: 1.08rem;
  font-weight: 460;
}
.jobs li:last-child { border-bottom: 0; }
.jobs li::after {
  content: attr(data-era);
  position: absolute;
  right: 0; top: 50%;
  translate: 0 -50%;
  font-weight: 900;
  font-size: clamp(3rem, 7vw, 5.2rem);
  letter-spacing: -0.05em;
  opacity: 0.16;
  pointer-events: none;
}
.jobs div { max-width: 64ch; }
.jobs a { color: var(--cream); text-decoration-color: var(--hot); font-weight: 700; }
.jobs a:hover { color: var(--hot); }

/* ---------- agents (ink band) ---------- */

.term {
  margin-top: 30px;
  background: #0c0b09;
  border: 1px solid rgba(255, 244, 228, 0.14);
  border-radius: 16px;
  overflow: hidden;
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 13px 18px; border-bottom: 1px solid rgba(255, 244, 228, 0.1); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; }
.term-bar i:nth-child(1) { background: var(--hot); }
.term-bar i:nth-child(2) { background: #e8b84a; }
.term-bar i:nth-child(3) { background: #58b26b; }
.term-bar span { margin-left: 10px; font-family: var(--mono); font-size: 0.72rem; color: rgba(255, 244, 228, 0.5); }
.term pre { margin: 0; padding: 22px 24px 10px; font-family: var(--mono); font-size: 0.84rem; line-height: 1.6; color: var(--cream); overflow-x: auto; }
.caret { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.term-link { display: block; padding: 14px 24px 20px; font-family: var(--mono); font-size: 0.82rem; color: var(--hot); text-decoration: none; }
.term-link:hover { color: var(--cream); }

/* ---------- footer ---------- */

.site-footer {
  background: var(--flood);
  color: var(--cream);
  padding: clamp(50px, 8vh, 90px) 0 56px;
  overflow: hidden;
}
.foot-mark {
  margin: 0 0 26px;
  font-family: var(--disp);
  font-size: clamp(2.6rem, 8.5vw, 7rem);
  line-height: 0.95;
  text-transform: uppercase;
  opacity: 0.22;
  white-space: nowrap;
}
.psi { margin: 0 0 14px; font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.04em; opacity: 0.75; }
.site-footer p:last-child { margin: 0; font-family: var(--mono); font-size: 0.78rem; color: var(--cream-soft); }
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--hot); }

/* ---------- inner pages (prose, archives, agents) ---------- */

.page-body { background: var(--cream); }
.prose {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(48px, 8vh, 80px) clamp(20px, 4vw, 44px) 30px;
}
.post-date { margin: 0 0 12px; font-family: var(--mono); font-size: 0.82rem; color: var(--hot); font-weight: 700; }
.prose h1 {
  margin: 0 0 30px;
  font-weight: 900;
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.prose p { margin: 0 0 1.2em; }
.prose img { display: block; margin: 1.6em auto; border-radius: 10px; border: 2px solid var(--ink); }
.prose .caption, .prose span.caption {
  display: block;
  margin: -1em auto 1.6em;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
}
.prose blockquote {
  margin: 1.5em 0;
  padding: 4px 0 4px 20px;
  border-left: 4px solid var(--hot);
  color: var(--ink-soft);
  font-style: italic;
  font-weight: 500;
}
.prose pre {
  overflow-x: auto;
  padding: 16px 18px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.55;
}
.prose code { font-family: var(--mono); font-size: 0.9em; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.prose hr { border: 0; border-top: 1.5px solid var(--line-ink); margin: 2.2em 0; }
.mono-note { font-family: var(--mono); font-size: 0.82rem; margin-top: 2.4em; }
.prose .eq { font-family: var(--mono); font-size: 0.84em; white-space: nowrap; }

.post-nav {
  max-width: 780px;
  margin: 0 auto;
  padding: 26px clamp(20px, 4vw, 44px) 70px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1.5px solid var(--line-ink);
}
.post-nav a { display: flex; flex-direction: column; gap: 5px; max-width: 44%; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.post-nav a:hover { color: var(--hot); }
.post-nav .newer { text-align: right; margin-left: auto; }
.post-nav .d { font-family: var(--mono); font-weight: 400; font-size: 0.72rem; color: var(--ink-soft); }

/* archives */
.intro { max-width: 1240px; margin: 0 auto; padding: clamp(48px, 8vh, 80px) clamp(20px, 4vw, 44px) 8px; }
.intro h1 { margin: 0 0 16px; font-weight: 900; font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -0.03em; line-height: 1; }
.intro p { margin: 0; max-width: 60ch; font-size: 1.1rem; color: var(--ink-soft); }
.years { max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 44px) 60px; }
.year h2 { margin: 52px 0 6px; font-weight: 900; font-size: 2rem; letter-spacing: -0.02em; color: var(--flood); }
.year h2::after { content: ""; display: block; margin-top: 10px; border-top: 1.5px solid var(--line-ink); }
.years .post-list .t { font-size: 1.1rem; font-weight: 650; }
.years .post-list a { padding: 12px 4px; }

/* ---------- motion ---------- */

.row i { translate: 0 110%; }
.hero .kicker, .hero .lede, .hero .hero-links, .hero-art { opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  .row i { animation: riseline 0.9s var(--spring) forwards; }
  .hero h1 .row:nth-child(2) i { animation-delay: 0.12s; }
  @keyframes riseline { to { translate: 0 0; } }

  .hero .kicker { animation: fadeup 0.7s var(--spring) 0.5s forwards; }
  .hero .lede { animation: fadeup 0.7s var(--spring) 0.62s forwards; }
  .hero .hero-links { animation: fadeup 0.7s var(--spring) 0.74s forwards; }
  .hero-art { animation: fadeup 1s var(--spring) 0.4s forwards, bob 7s ease-in-out 1.4s infinite alternate; }
  @keyframes fadeup { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
  @keyframes bob { from { transform: translateY(0); } to { transform: translateY(-14px); } }

  .ticker .track { animation: slide 36s linear infinite; }
  @keyframes slide { to { transform: translateX(-50%); } }
  .ticker:hover .track { animation-play-state: paused; }

  @supports (animation-timeline: view()) {
    .rev { animation: rise 0.9s var(--spring) both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    .station { animation: rise 0.9s var(--spring) both; animation-timeline: view(inline); animation-range: entry 0% entry 55%; }
    @keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
  }
}
@media (prefers-reduced-motion: reduce) {
  .row i { translate: 0 0; }
  .hero .kicker, .hero .lede, .hero .hero-links, .hero-art { opacity: 1; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */

@media (max-width: 880px) {
  .hero .shell { grid-template-columns: 1fr; padding-bottom: 110px; }
  .hero-art { grid-column: 1; grid-row: auto; justify-self: end; width: min(320px, 82%); margin: 30px 0 0; }
  .hero h1 { max-width: none; }
  .work { grid-template-columns: 1fr; }
  .work figure { border-right: 0; border-bottom: 2px solid var(--ink); aspect-ratio: 16 / 9; min-height: 0; }
  .jobs li { padding-right: 0; padding-bottom: 78px; }
  .jobs li::after { top: auto; bottom: 10px; translate: none; }
  .post-list a { gap: 14px; }
  .foot-mark { font-size: clamp(2.2rem, 11vw, 4rem); }
}

@media print {
  .site-header, .progress, .ticker, .post-nav, .site-footer { display: none; }
}
