/* ── ABOUT PAGE ──
   Layout: hero → pinned chapters → purple statement → process line.
   (The closing Contact block is the shared .project-next from project.css.)
   Everything is prefixed ab- so it never collides with the shared styles.
   Motion lives in js/about-page.js. */

.ab { position: relative; z-index: 1; }
/* The shared `section` rule adds 12vh / 5vw padding, so every section below
   sets its full padding shorthand (side padding comes from .ab-wrap). */

.ab-wrap { width: 100%; max-width: 1680px; margin-inline: auto; padding-inline: 5vw; }
.ab-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }

/* ── Type ── */
.ab-display {
  font-family: 'Syne', sans-serif; font-weight: 800;
  line-height: 0.95; letter-spacing: -0.04em;
  color: var(--text); text-wrap: balance;
}
.ab-accent { color: var(--accent); }

.ab-lead {
  font-family: 'Syne', sans-serif; font-weight: 600;
  font-size: clamp(1.35rem, 2.3vw, 2.1rem);
  line-height: 1.25; letter-spacing: -0.02em;
  color: var(--text); text-wrap: balance;
}

.ab-label {
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--accent);
}

/* ── Reveal helpers (js adds the motion) ── */
.ab-reveal { opacity: 0; transform: translateY(40px); }
[data-split] { visibility: hidden; }
/* Each word is its own mask, so letters rise out from behind its baseline */
.ab-w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.08em 0.06em 0.14em 0; margin: -0.08em -0.06em -0.14em 0; }
.ab-c, .ab-wi { display: inline-block; will-change: transform; }

/* ── 0. Showreel ── */
/* Fills the first screen. object-fit: contain on the reel's own black, so the
   bars a non-16:9 (or non-9:16) screen adds are invisible; portrait screens get
   the portrait cut through <source media>. */
.ab-reel {
  position: relative;
  height: 100vh; height: 100svh;
  padding: 0;
  background: var(--bg);
  overflow: hidden;
}
.ab-reel.is-purple { background: var(--accent); }   /* follows the reel's own background (js) */
.ab-reel-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.ab-reel-cue { position: absolute; left: 50%; bottom: clamp(1.25rem, 3.5vh, 2.5rem); transform: translateX(-50%); }
.ab-reel-toggle {
  position: absolute; right: clamp(16px, 3vw, 40px); bottom: clamp(16px, 3.5vh, 40px);
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(8, 8, 8, 0.55); color: var(--text);
  border: 1px solid rgba(240, 237, 230, 0.25);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.ab-reel-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.ab-reel-toggle .ab-reel-play,
.ab-reel-toggle.is-paused .ab-reel-pause { display: none; }
.ab-reel-toggle.is-paused .ab-reel-play { display: block; }
@media (hover: hover) {
  .ab-reel-toggle:hover { background: var(--accent); border-color: var(--accent); }
}

/* ── 1. Hero ── */
/* Follows the reel, so it only needs a modest top gap */
.ab-hero { padding: clamp(5rem, 13vh, 9rem) 0 clamp(1rem, 3vh, 2rem); }
.ab-hero .project-back { margin-bottom: clamp(2.5rem, 6vh, 4rem); }
.ab-hero .section-label { margin-bottom: clamp(1.5rem, 4vh, 2.5rem); }

.ab-hero-title { font-size: clamp(3rem, 9.4vw, 10rem); max-width: 11ch; }

.ab-hero-row {
  margin-top: clamp(2.5rem, 7vh, 5rem); padding-top: 24px;
  border-top: 1px solid var(--border);
  align-items: start;
}
.ab-hero-row .ab-lead { grid-column: 1 / span 7; }
.ab-hero-side { grid-column: 9 / span 4; }
.ab-hero-side p { color: var(--text-muted); font-size: 1rem; line-height: 1.7; }

.ab-hero-media {
  margin-top: clamp(3.5rem, 10vh, 7.5rem);
  aspect-ratio: 16 / 10; min-height: 360px; /* tall enough to hold head and shoulders of the portrait */
  overflow: hidden; border-radius: 20px;
  background: var(--accent);
}
.ab-hero-media img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: 50% 9%;
  will-change: transform;
}

/* Social pills under the portrait (pill styles: .footer-socials in styles.css) */
.ab-hero-socials { margin-top: 1.25rem; }

/* ── 2. Chapters ── */
.ab-chapters {
  --cw: clamp(2rem, 5.5vw, 6.5rem); /* sized so the longest word fits its 7 columns */
  height: 100vh; height: 100svh; overflow: hidden;
  /* Content hangs from the top (just clear of the nav once pinned) rather than
     the middle, so it follows closely after the portrait above */
  display: flex; align-items: flex-start;
  padding: clamp(6.5rem, 16vh, 9.5rem) 0 0;
}
.ab-chapters-grid { align-items: center; }
.ab-chapters-words-wrap { grid-column: 1 / span 7; height: calc(var(--cw) * 1.15); overflow: hidden; }
.ab-chapters-words { display: flex; flex-direction: column; will-change: transform; }
.ab-chapters-words .ab-display { font-size: var(--cw); height: calc(var(--cw) * 1.15); line-height: 1.15; white-space: nowrap; }

.ab-chapters-texts { grid-column: 8 / span 5; position: relative; min-height: 300px; }
.ab-chapters-text { position: absolute; inset: 0 0 auto 0; display: flex; flex-direction: column; gap: 18px; }
.ab-chapters-text + .ab-chapters-text { visibility: hidden; opacity: 0; }
.ab-chapters-text p { color: var(--text-muted); line-height: 1.7; }
.ab-chapters-text p:first-of-type {
  font-family: 'Syne', sans-serif; font-weight: 600;
  font-size: clamp(1.25rem, 1.9vw, 1.75rem); line-height: 1.3; letter-spacing: -0.02em;
  color: var(--text);
}

.ab-chapters-progress {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 20px;
  margin-top: clamp(2.5rem, 8vh, 5rem);
  font-family: 'Syne', sans-serif; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.2em; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.ab-chapters-count { color: var(--text); }
.ab-chapters-track { flex: 1; height: 4px; border-radius: 2px; background: rgba(240, 237, 230, 0.12); position: relative; overflow: hidden; }
.ab-chapters-bar { position: absolute; inset: 0; border-radius: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; }

/* ── 3. Now (purple) ── */
/* Full-bleed purple. Everything sits on the page's left edge: label, then the
   manifesto, then a closing row with the statement left and the quote right. */
.ab-now-section {
  background: var(--accent); color: var(--text);
  padding: clamp(5rem, 16vh, 11rem) 0;
}

.ab-now { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }

.ab-now-label {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: clamp(1.75rem, 4vh, 2.75rem);
}
.ab-now .ab-label { color: var(--bg); }
.ab-now-label::before { content: ''; width: 30px; height: 1px; background: var(--bg); }

.ab-now-text { grid-column: 1 / span 10; }

/* Same face as .ab-lead (the quote below). Syne runs wide, so the size sits a
   step under what the previous text face used, keeping the same line count. */
.ab-manifesto {
  font-family: 'Syne', sans-serif; font-weight: 600;
  font-size: clamp(1.3rem, 2.55vw, 2.6rem);
  line-height: 1.3; letter-spacing: -0.02em;
}
/* Key words: same font as the sentence, marked with an underline only */
.ab-manifesto em {
  font-style: normal;
  text-decoration: underline;
  text-decoration-thickness: 0.06em; text-underline-offset: 0.16em;
}

/* Closing row, separated by a rule */
.ab-now-statement, .ab-now-quote {
  margin-top: clamp(3.5rem, 11vh, 7rem); padding-top: clamp(1.5rem, 4vh, 2.5rem);
  border-top: 1px solid rgba(8, 8, 8, 0.35);
}
.ab-statement { font-size: clamp(2.25rem, 5.4vw, 5.5rem); }
.ab-now-statement { grid-column: 1 / span 8; }
.ab-now-quote { grid-column: 9 / -1; }

/* ── 4. Process ── */
.ab-section { padding: clamp(5rem, 16vh, 11rem) 0; }

.ab-split { align-items: start; }
.ab-split-aside {
  grid-column: 1 / span 4; position: sticky; top: 7.5rem;
  display: flex; flex-direction: column; gap: 20px;
}
.ab-split-aside .section-label { margin-bottom: 0; }
.ab-split-main { grid-column: 6 / span 7; }

.ab-h3 { font-size: clamp(2rem, 3.6vw, 3.5rem); line-height: 1; }

.ab-meta {
  display: flex; align-items: center; gap: 0.75rem;
  font-family: 'Geist', 'Inter', sans-serif; font-size: 0.82rem;
  letter-spacing: 0.04em; color: var(--text-muted);
}
.ab-meta-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); box-shadow: 0 0 0 0 var(--accent-glow);
  animation: abPulse 2s ease-out infinite;
}

.ab-btn-col { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 12px; }

.ab-timeline { position: relative; list-style: none; --tl-year: clamp(84px, 9vw, 150px); }
.ab-timeline-line {
  position: absolute; top: 0; bottom: 0; left: calc(var(--tl-year) + 12px);
  width: 2px; background: rgba(240, 237, 230, 0.12);
}
.ab-timeline-line span { position: absolute; inset: 0; background: var(--accent); transform: scaleY(0); transform-origin: top; }

.ab-timeline-item {
  position: relative;
  display: grid; grid-template-columns: var(--tl-year) minmax(0, 1fr); gap: 48px;
  align-items: start;
  padding-block: clamp(1.75rem, 4.5vh, 3rem);
}
.ab-timeline-year {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: clamp(2.25rem, 4.2vw, 4.5rem); line-height: 0.9; letter-spacing: -0.04em;
  color: rgba(240, 237, 230, 0.14);
  transition: color 0.6s ease;
}
.ab-timeline-event h3 {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: clamp(1.5rem, 2.2vw, 2.1rem); letter-spacing: -0.03em; line-height: 1.1;
  color: var(--text-muted); margin-bottom: 0.75rem;
  transition: color 0.6s ease;
}
.ab-timeline-event p { color: var(--text-dim); line-height: 1.7; max-width: 46ch; transition: color 0.6s ease; }

/* Dot on the line */
.ab-timeline-item::after {
  content: ''; position: absolute;
  left: calc(var(--tl-year) + 7px); top: calc(clamp(1.75rem, 4.5vh, 3rem) + 0.9rem);
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid rgba(240, 237, 230, 0.2);
  transition: background-color 0.4s, border-color 0.4s, transform 0.6s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.ab-timeline-item.is-active .ab-timeline-year { color: var(--accent); }
.ab-timeline-item.is-active .ab-timeline-event h3 { color: var(--text); }
.ab-timeline-item.is-active .ab-timeline-event p { color: var(--text-muted); }
.ab-timeline-item.is-active::after { background: var(--accent); border-color: var(--accent); transform: scale(1.25); }

@keyframes abPulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow); }
  100% { box-shadow: 0 0 0 10px rgba(139, 95, 163, 0); }
}

/* ── Smaller screens ── */
@media (max-width: 900px) {
  .ab-hero-row .ab-lead, .ab-hero-side { grid-column: 1 / -1; }
  .ab-hero-side { margin-top: 1.25rem; }
  .ab-hero-media { aspect-ratio: 4 / 5; min-height: 0; border-radius: 16px; }
  .ab-hero-media img { object-position: 50% 30%; }

  /* Tall, narrow screens: a vh-based offset leaves too big a gap after the
     portrait, so use the fixed minimum that still clears the header */
  .ab-hero { padding-bottom: 1rem; }
  .ab-chapters { padding-top: 6.5rem; }
  .ab-chapters-words-wrap, .ab-chapters-texts { grid-column: 1 / -1; }
  .ab-chapters { --cw: clamp(1.75rem, 9.6vw, 5rem); }
  .ab-chapters-texts { min-height: 300px; margin-top: 24px; }

  .ab-now > * { grid-column: 1 / -1; }
  /* Stacked layout has the full width, so the text can scale up faster
     (keeps it larger than the quote on tablets) */
  .ab-manifesto { font-size: clamp(1.45rem, 3.4vw, 2.6rem); }
  .ab-now-quote { margin-top: 1.75rem; padding: 4px 0 4px 16px; border-top: 0; border-left: 2px solid var(--bg); }

  .ab-split-aside, .ab-split-main { grid-column: 1 / -1; position: static; }
  .ab-split-main { margin-top: 3rem; }
  .ab-timeline-item { grid-template-columns: 1fr; gap: 6px; padding: 20px 0 20px 32px; }
  .ab-timeline-line { left: 5px; }
  .ab-timeline-item::after { left: 0; top: 34px; }
  .ab-timeline-year { font-size: 2.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ab-reveal { opacity: 1; transform: none; }
  [data-split] { visibility: visible; }
  .ab-chapters { height: auto; }
  .ab-chapters { padding: clamp(5rem, 16vh, 11rem) 0; }
  .ab-chapters-words-wrap { height: auto; }
  .ab-chapters-text + .ab-chapters-text { visibility: visible; opacity: 1; position: relative; margin-top: 32px; }
  .ab-chapters-text { position: relative; }
  .ab-timeline-year { color: var(--accent); }
  .ab-meta-dot { animation: none; }
}
