:root {
  color-scheme: dark;
  --ink: #17130f;
  --ink-soft: #211b16;
  --panel: #2a211b;
  --paper: #f2ede5;
  --paper-muted: #c6bcb0;
  --rust: #e6662b;
  --rust-dark: #a83a17;
  --gold: #e0af45;
  --line: rgb(242 237 229 / 17%);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --condensed: "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --mono: "DejaVu Sans Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, transparent 49.8%, rgb(255 255 255 / 2%) 50%, transparent 50.2%),
    var(--ink);
  background-size: 58px 58px;
  color: var(--paper);
  font-family: var(--sans);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.wrap {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-180%);
  background: var(--paper);
  color: var(--ink);
}

.skip-link:focus {
  transform: translateY(0);
}

.scroll-meter {
  position: fixed;
  z-index: 150;
  inset: 0 0 auto;
  height: 3px;
}

.scroll-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--rust);
}

.site-header {
  position: absolute;
  z-index: 100;
  inset: 0 0 auto;
  border-bottom: 1px solid rgb(255 255 255 / 18%);
  background: linear-gradient(rgb(0 0 0 / 55%), transparent);
}

.topbar {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.project-mark {
  display: inline-flex;
  align-items: stretch;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 32px;
  text-decoration: none;
  text-transform: uppercase;
}

.project-mark span {
  display: inline-block;
  padding: 0 18px 0 16px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%);
}

.project-mark span:first-child {
  padding-left: 11px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
}

.project-mark span + span {
  margin-left: -7px;
}

.mark-home { background: #005f87; }

.mark-guest { background: #0087af; }

.mark-rings { background: #006f91; }

.mark-path { background: #3f7400; }

.top-links {
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.top-links a {
  color: var(--paper-muted);
  text-decoration: none;
}

.top-links a:hover {
  color: #fff;
}

.hero {
  position: relative;
  display: grid;
  min-height: min(900px, 100svh);
  align-items: end;
  overflow: hidden;
  border-bottom: 7px solid var(--rust);
  background: #0b0907;
}

.hero-photo,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;
  filter: saturate(0.72) contrast(1.08);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgb(13 10 8 / 92%) 0%, rgb(13 10 8 / 70%) 44%, rgb(13 10 8 / 10%) 76%),
    linear-gradient(0deg, rgb(13 10 8 / 88%) 0%, transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-block: 150px 70px;
}

.eyebrow,
.section-kicker,
.note-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--paper-muted);
}

.eyebrow span {
  display: inline-block;
  margin-right: 10px;
  padding: 3px 8px;
  background: var(--rust);
  color: #fff;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  font-family: var(--condensed);
  font-weight: 900;
  text-transform: uppercase;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(3.7rem, 7.4vw, 6.7rem);
  line-height: 0.82;
  letter-spacing: -0.055em;
}

h1 em {
  color: var(--rust);
  font-style: normal;
}

.hero-intro {
  max-width: 650px;
  margin: 30px 0 0;
  color: #e2dbd2;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 11px 18px;
  border: 1px solid rgb(255 255 255 / 32%);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-transform: uppercase;
}

.button.primary {
  border-color: var(--rust);
  background: var(--rust);
  color: #fff;
}

.button.primary:hover {
  border-color: #f07942;
  background: #f07942;
}

.button.ghost {
  background: rgb(23 19 15 / 58%);
}

.button.ghost:hover {
  border-color: var(--paper);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  max-width: 770px;
  margin: 50px 0 0;
}

.hero-stats div {
  min-width: 180px;
  padding: 15px 22px;
  border-left: 2px solid var(--rust);
  background: rgb(23 19 15 / 75%);
  backdrop-filter: blur(8px);
}

.hero-stats dt {
  color: var(--paper-muted);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-stats dd {
  margin: 3px 0 0;
  font-size: 1.12rem;
  font-weight: 800;
}

.hero-caption {
  position: absolute;
  z-index: 3;
  right: 24px;
  bottom: 20px;
  color: rgb(255 255 255 / 65%);
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.timeline-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: clamp(40px, 8vw, 120px);
  align-items: end;
  padding-block: clamp(80px, 11vw, 150px);
}

.section-kicker {
  margin: 0 0 18px;
  color: var(--rust);
}

.timeline-intro h2,
.about h2 {
  margin: 0;
  font-size: clamp(3.3rem, 7.5vw, 7rem);
  line-height: 0.88;
  letter-spacing: -0.045em;
}

.intro-copy > p:last-child {
  max-width: 670px;
  margin: 28px 0 0;
  color: var(--paper-muted);
  font-size: 1.05rem;
}

.archive-note {
  padding: 24px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  background: var(--ink-soft);
}

.note-label {
  color: var(--gold);
}

.archive-note p {
  margin: 10px 0 0;
  color: var(--paper-muted);
  font-size: 0.9rem;
}

.timeline-tools {
  position: sticky;
  z-index: 60;
  top: 0;
  padding: 18px 0 12px;
  border-block: 1px solid var(--line);
  background: rgb(23 19 15 / 94%);
  backdrop-filter: blur(16px);
}

.tools-inner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.search-field {
  display: grid;
  flex: 1;
  max-width: 520px;
  gap: 6px;
  color: var(--paper-muted);
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.search-field input {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background: var(--ink-soft);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.92rem;
}

.search-field input:focus {
  border-color: var(--rust);
}

.toggle-field {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  color: var(--paper-muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.toggle-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--rust);
}

.chapter-nav {
  display: flex;
  gap: 8px;
  margin-top: 13px;
  overflow-x: auto;
  scrollbar-color: var(--rust) transparent;
}

.chapter-nav a {
  flex: none;
  padding: 5px 9px;
  border: 1px solid var(--line);
  color: var(--paper-muted);
  font-family: var(--mono);
  font-size: 0.67rem;
  text-decoration: none;
}

.chapter-nav a:hover {
  border-color: var(--rust);
  color: var(--paper);
}

.timeline {
  position: relative;
  padding-block: 72px 140px;
}

.timeline::before {
  position: absolute;
  top: 82px;
  bottom: 140px;
  left: 83px;
  width: 1px;
  background: linear-gradient(var(--rust), var(--gold), var(--line));
  content: "";
}

.chapter {
  position: relative;
  padding: 0 0 104px 135px;
  scroll-margin-top: 150px;
}

.chapter:last-child {
  padding-bottom: 0;
}

.chapter-marker {
  position: absolute;
  top: 3px;
  left: 47px;
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border: 1px solid var(--rust);
  border-radius: 50%;
  background: var(--ink);
  color: var(--rust);
  font-family: var(--condensed);
  font-size: 1.35rem;
  font-weight: 900;
}

.chapter-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  margin-bottom: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.chapter-range {
  margin: 0 0 7px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.chapter h3 {
  margin: 0;
  font-size: clamp(2.2rem, 4.5vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.chapter-summary {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--paper-muted);
}

.chapter-count {
  margin: 0;
  color: var(--paper-muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  text-align: right;
  text-transform: uppercase;
}

.chapter-count strong {
  display: block;
  color: var(--paper);
  font-family: var(--condensed);
  font-size: 2rem;
  line-height: 1;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 8px;
  gap: 14px;
}

.media-card {
  align-self: start;
  grid-column: span 4;
  grid-row-end: span var(--masonry-span, 1);
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--ink-soft);
  transition: border-color 150ms ease, transform 150ms ease;
}

.media-card:nth-child(7n + 1),
.media-card:nth-child(7n + 5) {
  grid-column: span 8;
}

.media-card:hover {
  border-color: rgb(230 102 43 / 72%);
  transform: translateY(-2px);
}

.media-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #090706;
  color: inherit;
  cursor: zoom-in;
}

.media-open img {
  width: 100%;
  aspect-ratio: var(--media-ratio, 4 / 3);
  object-fit: cover;
  opacity: 0;
  transition: opacity 240ms ease, transform 300ms ease;
}

.media-open img.loaded {
  opacity: 1;
}

.media-card:hover img {
  transform: scale(1.018);
}

.media-date {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 7px;
  background: rgb(15 12 10 / 83%);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.64rem;
}

.video-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  background: var(--rust);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.media-card figcaption {
  padding: 15px 16px 17px;
  color: #ddd4ca;
  font-size: 0.87rem;
  line-height: 1.5;
}

.show-more {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--paper-muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.show-more:hover {
  border-color: var(--rust);
  color: var(--paper);
}

.empty-state {
  grid-column: 1 / -1;
  grid-row: span 4;
  padding: 26px;
  border: 1px dashed var(--line);
  color: var(--paper-muted);
}

.about {
  padding-block: 110px 130px;
  border-top: 1px solid var(--line);
}

.guest-thesis {
  max-width: 980px;
  margin: 0 0 72px;
  padding: 0 0 22px 26px;
  border-left: 5px solid var(--rust);
  color: var(--paper);
  font-family: var(--condensed);
  font-size: clamp(1.9rem, 3.8vw, 3.6rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: clamp(40px, 8vw, 120px);
  align-items: start;
}

.about-grid > div {
  padding-top: 10px;
  color: var(--paper-muted);
}

@media (min-width: 901px) {
  .about h2 {
    font-size: clamp(2.8rem, 4.6vw, 4.8rem);
  }
}

code {
  padding: 2px 5px;
  background: var(--ink-soft);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.86em;
}

footer {
  border-top: 1px solid var(--line);
  background: #100d0a;
}

.footer-inner {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--paper-muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.lightbox {
  width: min(1120px, calc(100% - 28px));
  max-width: none;
  max-height: calc(100dvh - 28px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgb(255 255 255 / 28%);
  background: #100d0a;
  color: var(--paper);
  box-shadow: 0 24px 100px rgb(0 0 0 / 75%);
}

.lightbox::backdrop {
  background: rgb(0 0 0 / 88%);
  backdrop-filter: blur(8px);
}

.lightbox-close {
  position: fixed;
  z-index: 3;
  top: 24px;
  right: 24px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 50%;
  background: rgb(15 12 10 / 82%);
  color: #fff;
  cursor: pointer;
  font-size: 1.7rem;
  line-height: 1;
}

.lightbox-media {
  position: relative;
  display: grid;
  min-height: 320px;
  place-items: center;
  background: #050403;
}

.lightbox-media img {
  width: 100%;
  max-height: 72dvh;
  object-fit: contain;
}

.video-label {
  position: absolute;
  top: 16px;
  left: 16px;
  display: none;
  padding: 6px 9px;
  background: var(--rust);
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.video-label.visible {
  display: block;
}

.lightbox-copy {
  padding: 24px;
}

.lightbox-copy time {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lightbox-copy p {
  max-width: 800px;
  margin: 12px 0 0;
  color: #ddd4ca;
}

.noscript-note {
  position: fixed;
  z-index: 500;
  right: 20px;
  bottom: 20px;
  max-width: 460px;
  padding: 18px;
  border: 1px solid var(--rust);
  background: var(--ink);
}

@media (max-width: 900px) {
  .hero-photo img {
    object-position: 64% center;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgb(13 10 8 / 88%) 0%, rgb(13 10 8 / 54%) 72%, rgb(13 10 8 / 18%)),
      linear-gradient(0deg, rgb(13 10 8 / 92%) 0%, transparent 60%);
  }

  .timeline-intro,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    left: 35px;
  }

  .chapter {
    padding-left: 78px;
  }

  .chapter-marker {
    left: 8px;
    width: 55px;
    height: 55px;
    font-size: 1rem;
  }

  .media-card,
  .media-card:nth-child(7n + 1),
  .media-card:nth-child(7n + 5) {
    grid-column: span 6;
  }
}

@media (max-width: 620px) {
  .wrap {
    width: min(100% - 28px, 1240px);
  }

  .topbar {
    min-height: 68px;
  }

  .top-links {
    gap: 16px;
  }

  .top-links a:last-child {
    display: none;
  }

  .hero {
    min-height: 800px;
  }

  .hero-content {
    padding-block: 120px 58px;
  }

  h1 {
    font-size: clamp(3.35rem, 16vw, 4.9rem);
  }

  .hero-actions {
    display: grid;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-stats div {
    min-width: 0;
  }

  .hero-stats div:first-child {
    grid-column: 1 / -1;
  }

  .hero-caption {
    display: none;
  }

  .timeline-tools {
    position: relative;
  }

  .tools-inner {
    display: grid;
  }

  .timeline {
    padding-top: 56px;
  }

  .timeline::before {
    left: 26px;
  }

  .chapter {
    padding: 0 0 82px 53px;
  }

  .chapter-marker {
    left: 3px;
    width: 46px;
    height: 46px;
    font-size: 0.87rem;
  }

  .chapter-head {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .chapter-count {
    text-align: left;
  }

  .chapter-count strong {
    display: inline;
    margin-right: 5px;
  }

  .media-grid {
    gap: 10px;
  }

  .media-card,
  .media-card:nth-child(7n + 1),
  .media-card:nth-child(7n + 5) {
    grid-column: 1 / -1;
  }

  .about {
    padding-block: 80px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
