:root {
  --paper: #f1eadf;
  --paper-2: #fbf6ee;
  --ink: #11100e;
  --ink-soft: #312b25;
  --muted: #756a5f;
  --line: rgba(17, 16, 14, 0.18);
  --line-strong: rgba(17, 16, 14, 0.72);
  --rust: #c84a18;
  --rust-dark: #8f3212;
  --night: #0f0f0d;
  --night-soft: #1f1c18;
  --white: #fffaf2;
  --shadow: 0 24px 70px rgba(24, 18, 12, 0.18);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --serif: Georgia, "Songti SC", "STSong", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.35;
  background-image:
    radial-gradient(rgba(17, 16, 14, 0.08) 0.6px, transparent 0.8px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(0, 0, 0, 0.02));
  background-size: 5px 5px, 100% 100%;
  mix-blend-mode: multiply;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 110;
  background: rgba(17, 16, 14, 0.08);
}

.scroll-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--rust);
  transform-origin: left center;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px clamp(18px, 4vw, 64px);
  color: var(--ink);
  mix-blend-mode: multiply;
}

.brand,
.top-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--rust);
}

.top-nav a {
  color: rgba(17, 16, 14, 0.62);
  transition: color 180ms ease;
}

.top-nav a:hover {
  color: var(--rust);
}

.hero {
  min-height: 100svh;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: center;
  gap: clamp(24px, 6vw, 90px);
  padding: 96px clamp(24px, 6vw, 92px) 58px;
  border-bottom: 1.5px solid var(--ink);
}

.hero::before {
  content: "";
  position: absolute;
  left: clamp(24px, 6vw, 92px);
  right: clamp(24px, 6vw, 92px);
  top: 82px;
  border-top: 2px solid var(--ink);
}

.eyebrow,
.section-label {
  margin: 0;
  font-family: var(--mono);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 790px;
  margin: 64px 0 0;
  font-family: var(--serif);
  font-size: clamp(68px, 10vw, 155px);
  line-height: 0.86;
  letter-spacing: 0;
  font-weight: 900;
}

.hero h1 span {
  color: var(--rust);
}

.hero-en {
  margin: 38px 0 0;
  max-width: 580px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: clamp(23px, 2.6vw, 42px);
  font-weight: 800;
  line-height: 1.05;
}

.hero-lead {
  max-width: 640px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 38px;
}

.primary-link,
.ghost-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--ink);
  font-size: 14px;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.primary-link {
  background: var(--ink);
  color: var(--white);
}

.ghost-link {
  color: var(--ink);
}

.primary-link:hover,
.ghost-link:hover {
  transform: translateY(-2px);
}

.ghost-link:hover {
  background: var(--rust);
  border-color: var(--rust);
  color: var(--white);
}

.hero-stage {
  min-height: 580px;
  position: relative;
  display: grid;
  place-items: center;
}

.orbit {
  position: absolute;
  border: 1.5px solid rgba(17, 16, 14, 0.25);
  border-radius: 50%;
  animation: drift 14s ease-in-out infinite alternate;
}

.orbit-one {
  width: min(42vw, 520px);
  height: min(42vw, 520px);
  border-color: rgba(200, 74, 24, 0.36);
}

.orbit-two {
  width: min(28vw, 360px);
  height: min(28vw, 360px);
  animation-delay: -4s;
}

.year-cloud {
  position: absolute;
  inset: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(17, 16, 14, 0.54);
}

.year-cloud span {
  position: absolute;
}

.year-cloud span:nth-child(1) { left: 10%; top: 22%; }
.year-cloud span:nth-child(2) { right: 12%; top: 28%; }
.year-cloud span:nth-child(3) { left: 18%; bottom: 20%; }
.year-cloud span:nth-child(4) { right: 8%; bottom: 24%; }
.year-cloud span:nth-child(5) { left: 45%; top: 8%; color: var(--rust); }

.hero-image-stack {
  position: relative;
  width: min(39vw, 470px);
  aspect-ratio: 1 / 1;
}

.hero-image-stack img {
  position: absolute;
  object-fit: cover;
  filter: grayscale(10%) contrast(1.08);
  box-shadow: var(--shadow);
}

.hero-image-stack img:first-child {
  width: 78%;
  height: 45%;
  left: 0;
  top: 10%;
}

.hero-image-stack img:last-child {
  width: 70%;
  height: 44%;
  right: 0;
  bottom: 16%;
}

.intro,
.method,
.discussion {
  padding: clamp(90px, 12vw, 160px) clamp(24px, 7vw, 120px);
}

.intro {
  display: grid;
  grid-template-columns: 0.3fr 1fr;
  gap: clamp(26px, 5vw, 80px);
  border-bottom: 1px solid var(--line);
}

.intro h2,
.method h2,
.discussion h2 {
  margin: 0;
  max-width: 960px;
  font-family: var(--serif);
  font-size: clamp(42px, 6vw, 92px);
  line-height: 0.96;
  letter-spacing: 0;
}

.intro p:last-child,
.discussion p {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.75;
}

.timeline-shell {
  display: grid;
  grid-template-columns: minmax(240px, 28vw) minmax(0, 1fr);
  align-items: start;
  gap: clamp(28px, 5vw, 80px);
  padding: 0 clamp(24px, 6vw, 90px) 120px;
}

.timeline-rail {
  position: sticky;
  top: 92px;
  min-height: calc(100svh - 120px);
  padding: 34px 0 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.active-year {
  margin-top: 28px;
  font-family: var(--serif);
  font-size: clamp(76px, 10vw, 148px);
  line-height: 0.82;
  color: var(--rust);
  font-weight: 900;
}

.active-era {
  margin-top: 14px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
}

.rail-line {
  position: absolute;
  left: 0;
  top: 250px;
  bottom: 230px;
  width: 2px;
  background: rgba(17, 16, 14, 0.16);
}

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

.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 190px;
  min-width: 0;
}

.filter {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  min-height: 36px;
  padding: 0 12px;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.filter:hover,
.filter.is-active {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
  transform: translateX(4px);
}

.timeline-content {
  padding-top: 110px;
  min-width: 0;
}

.timeline-heading {
  max-width: 840px;
  margin-bottom: 80px;
  min-width: 0;
}

.timeline-heading h2 {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: clamp(46px, 6vw, 92px);
  line-height: 0.96;
  overflow-wrap: anywhere;
}

.timeline-heading p:last-child {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.events {
  display: grid;
  gap: 78px;
}

.event {
  position: relative;
  display: grid;
  grid-template-columns: minmax(160px, 0.25fr) minmax(0, 0.9fr);
  gap: clamp(24px, 5vw, 78px);
  min-height: 420px;
  padding: 26px 0 78px;
  border-top: 1.5px solid var(--line-strong);
  opacity: 0.38;
  transform: translateY(34px);
  transition: opacity 520ms ease, transform 520ms ease, filter 520ms ease;
}

.event.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.event.is-muted {
  display: none;
}

.event-year {
  position: sticky;
  top: 116px;
  align-self: start;
  font-family: var(--serif);
  color: var(--ink);
  font-size: clamp(48px, 6vw, 96px);
  line-height: 0.9;
  font-weight: 900;
}

.event-era {
  display: block;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--rust);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.event-card {
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.72fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  outline: none;
}

.event-card:focus-visible .event-title,
.event-card:hover .event-title {
  color: var(--rust);
}

.event-kicker {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--rust);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.event-copy {
  min-width: 0;
}

.event-title {
  margin: 0;
  max-width: 620px;
  font-family: var(--serif);
  font-size: clamp(34px, 4.4vw, 72px);
  line-height: 0.98;
  transition: color 180ms ease;
  overflow-wrap: anywhere;
}

.event-subtitle {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 20px;
  font-family: var(--serif);
  font-style: italic;
}

.event-summary {
  max-width: 620px;
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.7;
}

.event-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.tag {
  border: 1px solid var(--line);
  padding: 6px 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}

.event-media {
  overflow: hidden;
  min-height: 260px;
  background: var(--paper-2);
  border: 1px solid rgba(17, 16, 14, 0.13);
  box-shadow: 0 20px 60px rgba(30, 22, 14, 0.12);
}

.event-media img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  display: block;
  filter: grayscale(14%) contrast(1.05);
  transform: scale(1.01);
  transition: transform 500ms ease, filter 500ms ease;
}

.event-card:hover .event-media img {
  transform: scale(1.06);
  filter: grayscale(0%) contrast(1.08);
}

.event-open {
  display: inline-flex;
  margin-top: 32px;
  align-items: center;
  gap: 10px;
  color: var(--rust);
  font-weight: 900;
  font-size: 14px;
}

.event-open::after {
  content: "↗";
  font-size: 16px;
}

.shift-grid {
  margin-top: 54px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1.5px solid var(--ink);
}

.shift-grid div {
  min-height: 190px;
  padding: 22px 18px;
  border-right: 1px solid var(--line);
}

.shift-grid div:last-child {
  border-right: 0;
}

.shift-grid span {
  display: block;
  font-family: var(--mono);
  font-weight: 900;
  color: var(--rust);
  margin-bottom: 38px;
}

.shift-grid strong {
  display: block;
  font-size: 22px;
  line-height: 1.25;
}

.discussion {
  min-height: 80svh;
  background: var(--night);
  color: var(--white);
}

.discussion .section-label,
.discussion p {
  color: rgba(255, 250, 242, 0.68);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(13, 12, 10, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}

.drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.detail-drawer {
  position: fixed;
  z-index: 130;
  top: 0;
  right: 0;
  width: min(560px, 94vw);
  height: 100svh;
  overflow-y: auto;
  background: var(--night);
  color: var(--white);
  padding: 28px;
  transform: translateX(105%);
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.25);
}

.detail-drawer.is-open {
  transform: translateX(0);
}

.drawer-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 250, 242, 0.2);
  background: rgba(255, 250, 242, 0.04);
  color: var(--white);
  font-size: 27px;
  cursor: pointer;
  z-index: 2;
}

.drawer-media {
  margin-top: 18px;
  overflow: hidden;
  background: var(--night-soft);
  border: 1px solid rgba(255, 250, 242, 0.14);
}

.drawer-media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.drawer-year {
  margin: 28px 0 0;
  color: var(--rust);
  font-family: var(--serif);
  font-size: 70px;
  font-weight: 900;
  line-height: 0.85;
}

.detail-drawer h2 {
  margin: 22px 0 0;
  font-family: var(--serif);
  font-size: 42px;
  line-height: 1.02;
}

.drawer-subtitle {
  color: var(--rust);
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
}

.drawer-detail {
  color: rgba(255, 250, 242, 0.78);
  line-height: 1.8;
  font-size: 16px;
}

.drawer-tags,
.drawer-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.drawer-tags .tag {
  border-color: rgba(255, 250, 242, 0.18);
  color: rgba(255, 250, 242, 0.72);
}

.drawer-links a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 12px;
  background: var(--rust);
  color: var(--white);
  font-weight: 900;
  font-size: 13px;
}

.drawer-links a::after {
  content: "↗";
  margin-left: 8px;
}

@keyframes drift {
  from { transform: translate3d(-10px, -6px, 0) rotate(0deg); }
  to { transform: translate3d(12px, 9px, 0) rotate(8deg); }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 980px) {
  .site-header {
    position: absolute;
  }

  .top-nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 96px;
  }

  .hero-stage {
    min-height: 360px;
  }

  .hero-image-stack {
    width: min(82vw, 520px);
  }

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

  .timeline-rail {
    position: relative;
    top: 0;
    min-height: 0;
    padding: 36px 0 0;
  }

  .rail-line {
    display: none;
  }

  .filter-bar {
    max-width: none;
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .filter {
    white-space: nowrap;
  }

  .timeline-content {
    padding-top: 42px;
  }

  .event,
  .event-card {
    grid-template-columns: 1fr;
  }

  .event-year {
    position: relative;
    top: 0;
  }

  .shift-grid {
    grid-template-columns: 1fr;
  }

  .shift-grid div {
    min-height: 110px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 18px;
  }

  .brand {
    font-size: 9px;
  }

  .hero {
    padding: 88px 18px 44px;
  }

  .hero::before {
    left: 18px;
    right: 18px;
  }

  .hero h1 {
    font-size: clamp(58px, 18vw, 92px);
  }

  .hero-actions {
    width: 100%;
  }

  .primary-link,
  .ghost-link {
    flex: 1;
  }

  .intro,
  .method,
  .discussion,
  .timeline-shell {
    padding-left: 18px;
    padding-right: 18px;
    overflow: hidden;
  }

  .filter-bar {
    max-width: calc(100vw - 36px);
  }

  .active-year {
    font-size: 72px;
  }

  .event {
    min-height: 0;
    gap: 20px;
    padding-bottom: 50px;
  }

  .event-title {
    max-width: calc(100vw - 36px);
    font-size: 28px;
    overflow-wrap: normal;
    word-break: normal;
  }

  .timeline-heading h2 {
    max-width: calc(100vw - 36px);
    font-size: 34px;
    word-break: break-all;
  }

  .timeline-heading p:last-child,
  .event-summary {
    max-width: calc(100vw - 36px);
    word-break: break-all;
  }

  .event-summary {
    font-size: 16px;
  }

  .event-media,
  .event-media img {
    min-height: 210px;
  }

  .detail-drawer {
    padding: 20px;
  }
}
