/* ==========================================================
   For Warda — Editorial × Engineer
   warm cream + burgundy + monospace, almost no shadows
   ========================================================== */

:root {
  --bg:        #f4ede0;   /* warm cream paper */
  --bg-2:      #ebe1cf;   /* darker cream */
  --bg-deep:   #1d1819;   /* deep ink for code */
  --ink:       #1a1414;
  --ink-soft:  #4a3f3d;
  --ink-mute:  #8a7f7c;
  --rule:      #c9bfae;   /* hairline rule */
  --wine:      #6b1d2c;   /* deep burgundy accent */
  --wine-soft: #8a3a48;
  --rose:      #b07d7d;   /* dusty rose accent */
  --olive:     #7a7250;   /* secondary tone */
  --paper:     #fbf6ec;
  --code-bg:   #1f1a1c;
  --code-fg:   #d8c8b0;

  --f-serif: 'Cormorant Garamond', Georgia, serif;
  --f-sans:  'Inter', system-ui, -apple-system, sans-serif;
  --f-mono:  'JetBrains Mono', 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  /* subtle paper grain */
  background-image:
    radial-gradient(rgba(0,0,0,.025) 1px, transparent 1px),
    radial-gradient(rgba(0,0,0,.018) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 1px;
}
img { max-width: 100%; display: block; }

::selection { background: var(--wine); color: var(--paper); }

/* ----------- shared section bits ----------- */
.side-num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--wine);
  margin-bottom: 18px;
}
.section-h {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -.5px;
  line-height: 1.1;
  color: var(--ink);
}
.section-sub {
  font-family: var(--f-serif);
  font-size: 19px;
  color: var(--ink-soft);
  margin-top: 14px;
  max-width: 540px;
}
.section-sub em { font-style: italic; color: var(--wine); }

/* ==========================================================
   FLOATING SYMBOLS (instead of hearts)
   ========================================================== */
.symbols {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.sym {
  position: absolute;
  bottom: -40px;
  font-family: var(--f-mono);
  font-size: 14px;
  color: rgba(107, 29, 44, .18);
  opacity: 0;
  animation: symFloat linear infinite;
  user-select: none;
}
@keyframes symFloat {
  0%   { transform: translateY(0) rotate(0); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translateY(-110vh) rotate(180deg); opacity: 0; }
}

/* ==========================================================
   AUDIO TOGGLE — small, terminal-style
   ========================================================== */
.audio-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 14px;
  background: var(--bg-deep);
  color: var(--code-fg);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .15em;
  text-transform: lowercase;
  border: 1px solid var(--bg-deep);
  border-radius: 0;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.audio-toggle:hover { transform: translateY(-2px); background: var(--wine); border-color: var(--wine); }
.audio-toggle.playing { background: var(--wine); border-color: var(--wine); }
.audio-toggle .audio-label::before { content: ''; }

/* ==========================================================
   HERO
   ========================================================== */
.hero {
  min-height: 100vh;
  padding: 60px clamp(24px, 6vw, 96px) 40px;
  display: flex;
  flex-direction: column;
  position: relative;
  border-bottom: 1px solid var(--rule);
}

.hero-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: clamp(30px, 6vw, 90px);
  align-items: center;
  padding-top: 40px;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  border-left: 1px solid var(--rule);
  padding-left: 20px;
  height: 100%;
  justify-content: center;
}
.meta-line {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.meta-line strong { color: var(--wine); font-weight: 500; }
.meta-rotate {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin-top: 20px;
  color: var(--ink-soft);
}

.hero-main { max-width: 820px; }

.kicker {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--wine);
  margin-bottom: 30px;
}

.hero-title {
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: clamp(54px, 11vw, 132px);
  line-height: .92;
  letter-spacing: -2px;
  color: var(--ink);
  margin-bottom: 28px;
}
.hero-title em {
  font-style: italic;
  color: var(--wine);
  font-weight: 500;
  display: inline-block;
  position: relative;
}
.hero-title em::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 1px;
  background: var(--wine);
  transform: scaleX(0);
  transform-origin: left;
  animation: ulSweep 1.6s cubic-bezier(.7,0,.2,1) .8s forwards;
}
@keyframes ulSweep { to { transform: scaleX(1); } }

.hero-import {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 28px;
  letter-spacing: -.2px;
}
.hero-import code {
  color: var(--wine);
  font-family: var(--f-mono);
}

.hero-lede {
  font-family: var(--f-serif);
  font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: 44px;
}
.hero-lede em { font-style: italic; color: var(--wine); }

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  align-items: center;
}

.link-cta {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ink);
  padding: 0 0 6px 0;
  cursor: pointer;
  font-family: var(--f-sans);
  font-size: 15px;
  color: var(--ink);
  transition: color .25s ease, border-color .25s ease, padding .25s ease;
}
.link-cta:hover { color: var(--wine); border-color: var(--wine); padding-right: 8px; }
.cta-num {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: .2em;
}
.cta-label { font-weight: 400; letter-spacing: .02em; }
.cta-arrow {
  font-family: var(--f-mono);
  transition: transform .35s ease;
}
.link-cta:hover .cta-arrow { transform: translate(2px, 4px); }

.link-ghost {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-mute);
  text-decoration: none;
  border-bottom: 1px dashed var(--rule);
  padding-bottom: 4px;
  transition: color .25s ease, border-color .25s ease;
}
.link-ghost:hover { color: var(--wine); border-color: var(--wine); }

.hero-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.hero-foot-line {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ==========================================================
   SPLASH — layar pertama, full-viewport
   ========================================================== */
body.locked { overflow: hidden; }

.splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  background-image:
    radial-gradient(rgba(0,0,0,.025) 1px, transparent 1px),
    radial-gradient(rgba(0,0,0,.018) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 1px;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  overflow-y: auto;
  transition: opacity .9s ease, transform 1.1s cubic-bezier(.7, .03, .25, 1);
}
.splash.dismissed {
  opacity: 0;
  transform: translateY(-3vh);
  pointer-events: none;
}

.splash-stage {
  text-align: center;
  max-width: 380px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: splashIn 1.2s cubic-bezier(.7, .03, .25, 1) both;
}
@keyframes splashIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

.splash-meta {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--wine);
}

.splash-photo-wrap {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 4/5;
  border: 1px solid var(--rule);
  overflow: hidden;
  background: var(--bg-2);
  position: relative;
}
.splash-photo-wrap::before,
.splash-photo-wrap::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--ink);
  z-index: 2;
}
.splash-photo-wrap::before { top: 8px; left: 8px;  border-right: none; border-bottom: none; }
.splash-photo-wrap::after  { bottom: 8px; right: 8px; border-left: none; border-top: none; }
.splash-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.92) contrast(.97);
}

.splash-name {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
  margin-top: 2px;
}

.splash-import {
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.85;
  letter-spacing: -.1px;
}
.splash-import code { color: var(--wine); }

.splash-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 26px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .25em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  cursor: pointer;
  margin-top: 6px;
  transition: background .25s ease, border-color .25s ease,
              color .25s ease, transform .35s ease;
}
.splash-btn:hover {
  background: var(--wine);
  border-color: var(--wine);
  transform: translateY(-2px);
}
.splash-btn:active { transform: translateY(0); }
.splash-arrow {
  display: inline-block;
  transition: transform .35s ease;
}
.splash-btn:hover .splash-arrow { transform: translate(3px, -3px); }

.splash-date {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ==========================================================
   WISHES — letter + Java code
   ========================================================== */
.wishes {
  padding: clamp(80px, 12vw, 160px) clamp(24px, 6vw, 96px);
  border-bottom: 1px solid var(--rule);
}
.wishes-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(30px, 5vw, 80px);
  max-width: 1080px;
  margin: 0 auto;
}
.wishes-side {
  position: sticky;
  top: 60px;
  height: fit-content;
}
.side-cap {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 22px;
  color: var(--ink-soft);
  margin-top: 6px;
}
.wishes-text {
  max-width: 660px;
}
.wishes-text .lead {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 28px;
  text-indent: 0;
}
.wishes-text p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-soft);
  margin-bottom: 22px;
}
.wishes-text em { color: var(--wine); font-style: italic; }
.wishes-text p.aside-note {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--ink-mute);
  border-left: 2px solid var(--wine);
  padding: 6px 0 6px 18px;
  background: transparent;
  font-style: normal;
  margin: 30px 0 28px;
}
.signoff {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 22px;
  color: var(--wine);
  margin-top: 36px !important;
}

/* ----- Java code block ----- */
.code-block {
  margin: 36px 0;
  background: var(--code-bg);
  color: var(--code-fg);
  border: 1px solid var(--bg-deep);
  font-family: var(--f-mono);
  font-size: 13px;
  line-height: 1.7;
  overflow: hidden;
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #261f21;
  border-bottom: 1px solid #3a3133;
  font-size: 11px;
  letter-spacing: .15em;
}
.code-bar .dot {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block;
}
.dot-r { background: #ef4d63; }
.dot-y { background: #d9b95e; }
.dot-g { background: #6cb38a; }
.code-file {
  margin-left: 12px;
  color: var(--code-fg);
  font-size: 12px;
  letter-spacing: 0;
}
.code-meta {
  margin-left: auto;
  color: #6cb38a;
  font-size: 11px;
}
.code-pre {
  margin: 0;
  padding: 22px 18px;
  overflow-x: auto;
  background: var(--code-bg);
}
.code-pre code {
  font-family: var(--f-mono);
  white-space: pre;
  display: block;
}
.code-pre .ln  { color: #5a4a4d; user-select: none; padding-right: 14px; display: inline-block; min-width: 24px; text-align: right; }
.code-pre .kw  { color: #d97a8b; }   /* keyword: pink-wine */
.code-pre .cls { color: #e8c987; }   /* class: gold */
.code-pre .fn  { color: #c9b08a; }   /* function: warm sand */
.code-pre .str { color: #9eb87b; }   /* string: olive-green */
.code-pre .num { color: #c9a26e; }
.code-pre .cm  { color: #6e5e5d; font-style: italic; }
.code-pre .an  { color: #b88aa8; }   /* annotation */

.code-out {
  padding: 14px 18px;
  background: #1a1518;
  border-top: 1px solid #3a3133;
  font-family: var(--f-mono);
  font-size: 12px;
  color: #9b8e8a;
}
.code-out .prompt { color: #d97a8b; }
.code-out .out    { color: #e8c987; }

/* ==========================================================
   TIMELINE — chapter style
   ========================================================== */
.timeline {
  padding: clamp(80px, 12vw, 160px) clamp(24px, 6vw, 96px);
  background: var(--bg-2);
  border-bottom: 1px solid var(--rule);
}
.timeline-intro {
  max-width: 720px;
  margin: 0 auto 90px;
  text-align: left;
}
.timeline-intro .section-sub { margin-top: 18px; }

.chapters {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(80px, 10vw, 140px);
}

.chapter {
  display: grid;
  grid-template-columns: 90px 1.05fr 1fr;
  gap: clamp(20px, 4vw, 50px);
  align-items: start;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}
.chapter.in-view { opacity: 1; transform: none; }

.chapter.rev .ch-img  { order: 3; }
.chapter.rev .ch-body { order: 2; }
/* keep .ch-num always first */

.ch-num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--wine);
  padding-top: 14px;
  border-top: 1px solid var(--wine);
  align-self: start;
}

.ch-img {
  position: relative;
}
.ch-img img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  filter: saturate(.92) contrast(.98);
  transition: filter .8s ease, transform .8s ease;
}
.chapter.in-view .ch-img img { filter: saturate(1) contrast(1); }
.ch-cap {
  display: block;
  margin-top: 12px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--ink-mute);
  line-height: 1.6;
}
.ch-cap em { color: var(--wine); font-style: italic; }

.ch-body {
  padding-top: 4px;
  max-width: 460px;
}
.ch-body h3 {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.2;
  letter-spacing: -.3px;
  color: var(--ink);
  margin-bottom: 18px;
}
.ch-body p {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.8;
}
.ch-body em { color: var(--wine); font-style: italic; }
.final-line {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--wine);
  margin-top: 22px;
  letter-spacing: 0;
}
.final-line em { font-style: italic; }

/* ==========================================================
   GALLERY — alternating marquees
   ========================================================== */
.gallery {
  padding: clamp(80px, 12vw, 160px) 0 clamp(60px, 8vw, 100px);
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.gallery-intro {
  max-width: 1100px;
  margin: 0 auto 70px;
  padding: 0 clamp(24px, 6vw, 96px);
}

.marquee {
  overflow: hidden;
  margin-bottom: 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.marquee-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: scrollLeft 45s linear infinite;
}
.marquee[data-direction="right"] .marquee-track { animation: scrollRight 50s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes scrollLeft  { from { transform: translateX(0); }      to { transform: translateX(-50%); } }
@keyframes scrollRight { from { transform: translateX(-50%); }   to { transform: translateX(0); } }

.m-card {
  flex: 0 0 auto;
  width: clamp(200px, 26vw, 300px);
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  position: relative;
}
.m-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.92) contrast(.97);
  transition: filter .5s ease, transform .8s ease;
}
.m-card:hover img { filter: saturate(1.05); transform: scale(1.04); }

.marquee:nth-of-type(2) .marquee-track { animation-duration: 52s; }
.marquee:nth-of-type(3) .marquee-track { animation-duration: 47s; }
.marquee:nth-of-type(4) .marquee-track { animation-duration: 58s; }

/* ==========================================================
   CLOSING
   ========================================================== */
.closing {
  padding: clamp(80px, 12vw, 160px) clamp(24px, 6vw, 96px) 80px;
  text-align: left;
  max-width: 800px;
  margin: 0 auto;
}
.closing .side-num { color: var(--wine); }
.closing-h {
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.15;
  letter-spacing: -.5px;
  color: var(--ink);
  margin-bottom: 28px;
}
.closing-h em { font-style: italic; color: var(--wine); }
.closing-p {
  font-family: var(--f-serif);
  font-size: clamp(18px, 1.7vw, 22px);
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 40px;
}
.closing-p em { font-style: italic; color: var(--wine); }

.closing-out {
  font-family: var(--f-mono);
  font-size: 13px;
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 18px 22px;
  border: 1px solid var(--bg-deep);
  white-space: pre-wrap;
  margin-bottom: 36px;
}
.closing-out .cmd { color: #d97a8b; }
.closing-out .ok  { color: #9eb87b; }

.closing-sign {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 20px;
  color: var(--wine);
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

/* ----- Tablet & under (≤ 1024px) ----- */
@media (max-width: 1024px) {
  .hero-title { font-size: clamp(46px, 9vw, 88px); letter-spacing: -1.2px; }
  .hero-grid  { grid-template-columns: 70px 1fr; gap: 40px; }
  .hero-lede  { font-size: clamp(17px, 1.8vw, 22px); }

  .chapters   { gap: clamp(60px, 8vw, 100px); }
  .chapter    { grid-template-columns: 70px 1fr 1fr; gap: 24px; }
  .ch-body h3 { font-size: clamp(22px, 2.6vw, 28px); }

  .code-pre   { font-size: 12.5px; padding: 18px 14px; }
}

/* ----- Splash on tablet & under ----- */
@media (max-width: 1024px) {
  .splash-stage { gap: 18px; }
}

/* ----- Mobile (≤ 768px) ----- */
@media (max-width: 768px) {
  /* splash */
  .splash { padding: 30px 22px; }
  .splash-stage { gap: 16px; max-width: 320px; }
  .splash-photo-wrap { max-width: 240px; }
  .splash-name { font-size: 20px; }
  .splash-import { font-size: 11.5px; }
  .splash-btn { padding: 12px 22px; font-size: 11px; gap: 12px; }
  .splash-date { font-size: 9.5px; }

  /* hero */
  .hero { padding: 50px 22px 36px; min-height: auto; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-top: 14px;
  }
  .hero-meta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-left: none;
    border-top: 1px solid var(--rule);
    padding: 14px 0 0 0;
    height: auto;
    gap: 14px;
  }
  .meta-rotate {
    writing-mode: horizontal-tb;
    transform: none;
    margin-top: 0;
  }
  .hero-title { font-size: clamp(42px, 12vw, 72px); line-height: .95; margin-bottom: 22px; }
  .hero-import { font-size: 12px; margin-bottom: 22px; }
  .hero-lede   { font-size: 17px; line-height: 1.55; margin-bottom: 32px; }
  .hero-cta-row { gap: 24px; }
  .hero-foot   { font-size: 10px; gap: 10px; }

  /* wishes */
  .wishes { padding: 70px 22px; }
  .wishes-grid { grid-template-columns: 1fr; gap: 18px; }
  .wishes-side { position: static; display: flex; align-items: baseline; gap: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
  .side-num { margin-bottom: 0; }
  .side-cap { font-size: 18px; }

  .wishes-text .lead { font-size: 21px; }
  .wishes-text p { font-size: 15.5px; }
  .wishes-text p.aside-note { padding-left: 14px; font-size: 12px; }
  .signoff { font-size: 19px; }

  /* code block */
  .code-block { margin: 28px -10px; }
  .code-bar   { padding: 10px 12px; font-size: 10px; }
  .code-bar .dot { width: 8px; height: 8px; }
  .code-file  { font-size: 11px; margin-left: 8px; }
  .code-meta  { font-size: 10px; }
  .code-pre   { font-size: 11.5px; padding: 14px 10px; line-height: 1.6; }
  .code-pre .ln { padding-right: 10px; min-width: 22px; }
  .code-out   { padding: 12px 14px; font-size: 11px; }

  /* timeline */
  .timeline { padding: 70px 22px; }
  .timeline-intro { margin-bottom: 50px; }
  .chapters { gap: 60px; }
  .chapter {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .chapter .ch-num  { order: 1; padding-top: 0; }
  .chapter .ch-img  { order: 2; }
  .chapter .ch-body { order: 3; }
  .chapter.rev .ch-img  { order: 2; }
  .chapter.rev .ch-body { order: 3; }
  .ch-img img { aspect-ratio: 4/3; }
  .ch-body { max-width: 100%; }
  .ch-body h3 { font-size: 22px; margin-bottom: 12px; }
  .ch-body p  { font-size: 15px; }
  .ch-cap { font-size: 11px; margin-top: 10px; }

  /* gallery */
  .gallery { padding: 70px 0 40px; }
  .gallery-intro { padding: 0 22px; margin-bottom: 40px; }
  .marquee { margin-bottom: 10px; }
  .marquee-track { gap: 10px; }
  .m-card { width: clamp(150px, 56vw, 220px); }

  /* closing */
  .closing { padding: 70px 22px 60px; }
  .closing-h { font-size: 30px; margin-bottom: 22px; }
  .closing-p { font-size: 17px; margin-bottom: 30px; }
  .closing-out { font-size: 12px; padding: 14px 16px; }

  /* audio toggle */
  .audio-toggle {
    padding: 7px 12px;
    font-size: 10.5px;
    bottom: 16px;
    right: 16px;
  }

  /* shared section labels */
  .section-h { font-size: clamp(28px, 7vw, 40px); }
  .section-sub { font-size: 16px; }
}

/* ----- Small mobile (≤ 480px) ----- */
@media (max-width: 480px) {
  .hero { padding: 40px 18px 30px; }
  .hero-title { font-size: clamp(38px, 13vw, 56px); }
  .hero-meta { flex-wrap: wrap; }
  .meta-line { font-size: 10px; }
  .hero-cta-row { flex-direction: column; align-items: flex-start; gap: 18px; }
  .hero-cta-row .link-cta { width: 100%; }

  /* splash on small mobile */
  .splash-stage { gap: 14px; }
  .splash-photo-wrap { max-width: 220px; }
  .splash-name { font-size: 18px; }

  .wishes { padding: 60px 18px; }
  .wishes-text .lead { font-size: 19px; }

  /* code: shrink further so most lines fit without scroll */
  .code-block { margin: 24px -14px; }
  .code-pre   { font-size: 10.5px; padding: 12px 8px; line-height: 1.55; }
  .code-pre .ln { padding-right: 8px; min-width: 20px; }
  .code-out   { font-size: 10.5px; padding: 10px 12px; }
  .code-bar   { padding: 8px 10px; }
  .code-file  { font-size: 10px; }
  .code-meta  { display: none; }

  .timeline { padding: 60px 18px; }
  .gallery-intro { padding: 0 18px; }
  .closing { padding: 60px 18px 50px; }
  .closing-h { font-size: 26px; }
  .closing-out { font-size: 11px; }
}

/* ----- Very small (≤ 360px) — code block tightening only ----- */
@media (max-width: 360px) {
  .code-pre { font-size: 9.5px; }
  .code-pre .ln { display: none; } /* drop line numbers entirely */
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
