/* ═══════════════ Origin Story — career page ═══════════════
   Base tone and nav come from style.css; this file styles the
   eight full-viewport chapters. */

:root {
  --ink: oklch(0.95 0.004 90);
  --gold: oklch(0.8 0.06 70);
  --red: oklch(0.58 0.21 27);
  --hairline: oklch(0.95 0.01 90 / 0.14);
}

.nav-active { opacity: 1; border-bottom: 1px solid oklch(0.95 0.004 90 / 0.5); padding-bottom: 3px; }

/* ---------- shared chapter shell ---------- */
.ch {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 120px 48px;
  box-sizing: border-box;
}

/* editorial column (left-aligned chapters) */
.ch-editorial {
  position: relative;
  z-index: 3;
  max-width: 900px;
}

.ch-center {
  position: relative;
  z-index: 3;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- typography ---------- */
.mega {
  font-size: clamp(42px, 7.6vw, 112px);
  font-weight: 200;
  line-height: 1.02;
  letter-spacing: 0.01em;
  margin: 0;
  text-transform: uppercase;
}

.serif,
.serif-mix {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  text-transform: none;
  letter-spacing: 0.005em;
}

.ch-body {
  margin-top: 36px;
  max-width: 520px;
}

.ch-body p {
  font-size: 14px;
  line-height: 1.75;
  opacity: 0.68;
  margin: 0 0 18px;
  font-weight: 300;
}

.ch-body .place {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 22px;
}

.ch-body.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* museum wall label — the serif italic caption of each room */
.wall-label {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 19px !important;
  line-height: 1.5 !important;
  opacity: 0.8 !important;
  color: var(--gold);
  margin-top: 26px !important;
}

/* ---------- ghost year numerals (signature device) ---------- */
.ghost-year {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(220px, 38vw, 560px);
  font-weight: 200;
  line-height: 1;
  color: oklch(0.95 0.01 90 / 0.04);
  -webkit-text-stroke: 1.5px oklch(0.95 0.01 90 / 0.28);
  text-shadow: 0 0 40px oklch(0.85 0.04 70 / 0.12);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

/* ---------- reveals ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s cubic-bezier(0.16,1,0.3,1) var(--d, 0s),
              transform 1s cubic-bezier(0.16,1,0.3,1) var(--d, 0s);
}

.in-view .reveal,
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.line-mask {
  display: block;
  overflow: hidden;
  padding: 0 0.08em 0.08em;
  margin: 0 -0.08em -0.08em;
}

.reveal-line {
  display: block;
  transform: translateY(112%);
  transition: transform 1.1s cubic-bezier(0.16,1,0.3,1) var(--d, 0s);
}

.in-view .reveal-line { transform: translateY(0); }

/* ---------- room label (fixed chapter marker) ---------- */
.room-label {
  position: fixed;
  left: 48px;
  bottom: 40px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  mix-blend-mode: difference;
}

.room-label.visible { opacity: 0.7; }

.room-sep { width: 28px; height: 1px; background: currentColor; opacity: 0.5; }

/* ---------- entrance ---------- */
.entrance { justify-content: flex-start; text-align: left; }

.ch-media.entrance-media img {
  filter: brightness(0.85);
}

.entrance-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85);
  pointer-events: none;
}

.entrance-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, oklch(0.14 0.003 270 / 0.85) 0%, oklch(0.14 0.003 270 / 0.3) 45%, oklch(0.14 0.003 270 / 0) 65%),
    linear-gradient(180deg, oklch(0.14 0.003 270 / 0.4) 0%, transparent 30%, transparent 70%, oklch(0.14 0.003 270 / 0.9) 100%);
  pointer-events: none;
}

.entrance-text {
  position: relative;
  z-index: 3;
  max-width: min(860px, 90vw);
}

.entrance-title {
  font-size: clamp(54px, 10vw, 150px);
  font-weight: 200;
  line-height: 0.98;
  margin: 0;
  letter-spacing: 0.01em;
}

.entrance-title .serif { font-size: 0.82em; opacity: 0.9; }

.entrance-sub {
  margin: 34px 0 0;
  font-size: 13px;
  line-height: 1.8;
  opacity: 0.55;
  font-weight: 300;
}

.scroll-cue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  translate: -50%;
  width: 1px;
  height: 56px;
  overflow: hidden;
  z-index: 3;
}

.scroll-cue span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent, oklch(0.95 0.004 90 / 0.7));
  transform-origin: top;
  animation: scrollLine 2.2s cubic-bezier(0.16,1,0.3,1) infinite;
}

@keyframes scrollLine {
  0% { transform: scaleY(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ---------- ch01 — foundations ---------- */
.ch-01 { justify-content: center; }

/* ---------- ch02 — engineering (industrial) ---------- */
.ch-02 {
  background:
    radial-gradient(ellipse 1000px 700px at 80% 20%, oklch(0.19 0.02 250 / 0.45), transparent 65%);
}

.blueprint-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(oklch(0.95 0.01 250 / 0.06) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.95 0.01 250 / 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  pointer-events: none;
}

.callout {
  position: absolute;
  z-index: 2;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  opacity: 0;
  color: oklch(0.85 0.04 250);
  padding-left: 34px;
  pointer-events: none;
}

.callout::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 26px;
  height: 1px;
  background: oklch(0.85 0.04 250 / 0.8);
}

.in-view .callout { opacity: 0.9; }

.co-1 { top: 22%; right: 12%; }
.co-2 { top: 58%; right: 20%; }
.co-3 { bottom: 16%; right: 9%; }

.crosshair {
  position: absolute;
  z-index: 2;
  width: 18px;
  height: 18px;
  pointer-events: none;
  opacity: 0.7;
}

.crosshair::before,
.crosshair::after {
  content: '';
  position: absolute;
  background: oklch(0.85 0.04 250 / 0.9);
}

.crosshair::before { left: 50%; top: 0; width: 1px; height: 100%; }
.crosshair::after { top: 50%; left: 0; height: 1px; width: 100%; }

.xh-1 { top: 18%; left: 55%; }
.xh-2 { bottom: 24%; right: 32%; }

/* ---------- ch03 — software (digital) ---------- */
.ch-03 {
  background:
    radial-gradient(ellipse 1000px 700px at 15% 80%, oklch(0.19 0.03 290 / 0.4), transparent 65%);
}

.code-frag {
  position: absolute;
  z-index: 2;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: oklch(0.85 0.05 290 / 0.85);
  white-space: nowrap;
  pointer-events: none;
}

.cf-1 { top: 62%; right: 14%; }

.ui-ghost {
  position: absolute;
  z-index: 1;
  top: 30%;
  right: 14%;
  width: 220px;
  border: 1px solid oklch(0.95 0.01 290 / 0.3);
  border-radius: 6px;
  padding: 12px;
  opacity: 0.9;
  pointer-events: none;
}

.ui-ghost-bar { display: flex; gap: 5px; margin-bottom: 12px; }

.ui-ghost-bar i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: oklch(0.95 0.01 290 / 0.4);
}

.ui-ghost-row {
  height: 6px;
  border-radius: 3px;
  background: oklch(0.95 0.01 290 / 0.22);
  margin-bottom: 8px;
}

.w40 { width: 40%; } .w60 { width: 60%; } .w70 { width: 70%; } .w80 { width: 80%; }

/* ---------- ch04 — first professional (split) ---------- */
.ch-04 {
  background:
    radial-gradient(ellipse 900px 700px at 85% 30%, oklch(0.19 0.02 190 / 0.35), transparent 65%);
}

.ch-split {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 60px;
  width: 100%;
}

.phone-stage { display: flex; justify-content: center; }

.phone {
  width: clamp(180px, 16vw, 240px);
  aspect-ratio: 9 / 19;
  border: 1px solid var(--hairline);
  border-radius: 34px;
  padding: 22px 18px;
  box-sizing: border-box;
  position: relative;
  background: linear-gradient(160deg, oklch(0.17 0.008 250 / 0.8), oklch(0.15 0.005 270 / 0.9));
  box-shadow: 0 40px 80px oklch(0 0 0 / 0.4);
  color: oklch(0.75 0.06 190);
}

.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  translate: -50%;
  width: 60px;
  height: 5px;
  border-radius: 3px;
  background: oklch(0.95 0.004 90 / 0.12);
}

.phone-header {
  height: 10px;
  width: 50%;
  border-radius: 5px;
  background: oklch(0.95 0.004 90 / 0.14);
  margin: 26px 0 22px;
}

.phone-pulse {
  width: 100%;
  height: 46px;
  margin-bottom: 22px;
  opacity: 0.8;
}

.phone-row {
  height: 8px;
  border-radius: 4px;
  background: oklch(0.95 0.004 90 / 0.09);
  margin-bottom: 12px;
}

.phone-cta {
  position: absolute;
  bottom: 24px;
  left: 18px;
  right: 18px;
  height: 34px;
  border-radius: 17px;
  background: oklch(0.75 0.06 190 / 0.18);
  border: 1px solid oklch(0.75 0.06 190 / 0.3);
}

/* ---------- ch05 — visual storytelling (cinematic) ---------- */
.ch-05 { justify-content: center; }

.ch-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.ch-media img {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  object-fit: cover;
  filter: brightness(0.5) saturate(0.9);
}

.ch-media-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, oklch(0.14 0.003 270 / 0.7), oklch(0.14 0.003 270 / 0.35) 45%, oklch(0.14 0.003 270 / 0.85));
}

.ch-media-shade.heavy {
  background: linear-gradient(90deg, oklch(0.14 0.003 270 / 0.92) 20%, oklch(0.14 0.003 270 / 0.5) 65%, oklch(0.14 0.003 270 / 0.75));
}

.letterbox {
  position: absolute;
  left: 0;
  right: 0;
  height: 7vh;
  background: oklch(0.1 0.002 270);
  z-index: 4;
  pointer-events: none;
}

.lb-top { top: 0; }
.lb-bottom { bottom: 0; }

.on-media { z-index: 3; }

.serif-mix { font-size: 0.9em; color: var(--gold); }

/* ---------- ch06 — comeleon (brand red) ---------- */
.ch-06 {
  flex-direction: column;
  justify-content: center;
  gap: 70px;
}

.ch-glow-red {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 900px 650px at 50% 15%, oklch(0.3 0.09 27 / 0.35), transparent 65%);
  pointer-events: none;
}

.centered-block { text-align: center; }

.centered-block .ch-body { margin-left: auto; margin-right: auto; }

.accent-red { color: var(--red); }

.studio-showcase {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  width: min(980px, 100%);
  align-items: start;
}

.browser-frame,
.ig-frame {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow: hidden;
  background: oklch(0.16 0.004 270);
  box-shadow: 0 40px 90px oklch(0 0 0 / 0.45);
}

a.browser-frame,
a.ig-frame {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1), border-color 0.4s;
}

a.browser-frame:hover,
a.ig-frame:hover {
  transform: translateY(-6px);
  border-color: oklch(0.95 0.01 90 / 0.3);
}

a.ig-frame:hover .ig-caption { opacity: 1; color: var(--gold); }

.browser-visit {
  padding: 12px 14px;
  border-top: 1px solid var(--hairline);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.6;
  transition: opacity 0.3s;
}

a.browser-frame:hover .browser-visit { opacity: 1; color: var(--gold); }

.browser-bar,
.ig-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
}

.browser-bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: oklch(0.95 0.004 90 / 0.18);
}

.browser-url {
  margin-left: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  opacity: 0.55;
}

.browser-body img,
.ig-body img {
  display: block;
  width: 100%;
  height: auto;
}

.ig-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, oklch(0.7 0.19 27), oklch(0.5 0.2 27));
}

.ig-handle {
  font-size: 11px;
  letter-spacing: 0.06em;
  opacity: 0.8;
}

.ig-body { aspect-ratio: 4 / 5; overflow: hidden; }

.ig-body img { height: 100%; object-fit: cover; }

.ig-caption {
  padding: 12px 14px;
  font-size: 11px;
  line-height: 1.5;
  opacity: 0.55;
  transition: opacity 0.3s, color 0.3s;
}

/* ---------- ch07 — personal projects ---------- */
.ch-07 .ch-editorial { max-width: 640px; }

.big-fact {
  font-size: 15px !important;
  opacity: 0.8 !important;
}

.big-fact strong {
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 200;
  letter-spacing: 0.01em;
  color: var(--gold);
  padding: 0 6px;
  vertical-align: -0.12em;
  line-height: 1;
}

/* ---------- final — today ---------- */
.ch-final { justify-content: center; text-align: center; }

.final-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 800px 600px at 50% 45%, oklch(0.24 0.02 70 / 0.4), transparent 70%);
  pointer-events: none;
}

.gradient-gold {
  background: linear-gradient(100deg, oklch(0.97 0.01 90) 30%, oklch(0.8 0.06 70) 55%, oklch(0.97 0.01 90) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(70px, 14vw, 210px);
}

.final-roles {
  margin: 26px 0 0;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.6;
}

.final-actions {
  display: flex;
  gap: 40px;
  margin-top: 54px;
}

.final-link {
  font-size: 14px;
  letter-spacing: 0.06em;
  color: oklch(0.95 0.004 90 / 0.85);
  text-decoration: none;
  border-bottom: 1px solid oklch(0.95 0.004 90 / 0.4);
  padding-bottom: 7px;
  transition: opacity 0.3s;
}

.final-link:hover { opacity: 0.6; }

/* ---------- accessibility & responsive ---------- */
:focus-visible {
  outline: 1px solid oklch(0.8 0.06 70 / 0.8);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-line { transition: none; opacity: 1; transform: none; }
  .scroll-cue span { animation: none; }
  [data-parallax] { transform: none !important; }
}

@media (max-width: 900px) {
  .ch { padding: 100px 24px; }

  .room-label { left: 24px; bottom: 24px; }

  .ghost-year { font-size: clamp(140px, 44vw, 280px); }

  .ch-split { grid-template-columns: 1fr; gap: 48px; }

  .phone-stage { order: -1; }

  .callout, .crosshair, .code-frag, .ui-ghost { display: none; }

  .studio-showcase { grid-template-columns: 1fr; }

  .letterbox { height: 5vh; }

  .final-actions { flex-direction: column; gap: 22px; align-items: center; }
}

@media (max-width: 480px) {
  .ch { padding: 90px 18px; }

  .room-label { left: 18px; bottom: 18px; font-size: 9px; gap: 10px; }
  .room-sep { width: 18px; }

  .ghost-year { font-size: clamp(110px, 40vw, 220px); }

  .ch-body { max-width: none; }
  .wall-label { font-size: 16px !important; }

  .ch-06 { gap: 48px; }
  .studio-showcase { gap: 20px; }

  .phone { width: clamp(150px, 42vw, 200px); }

  .big-fact strong { font-size: clamp(28px, 8vw, 44px); }
}
