/* ==========================================================================
   caspianloren.se · Midnight & warm
   ========================================================================== */

@property --gx   { syntax: '<percentage>'; inherits: true; initial-value: 78%; }
@property --gy   { syntax: '<percentage>'; inherits: true; initial-value: 22%; }
@property --glow { syntax: '<color>';      inherits: true; initial-value: rgba(255, 122, 89, .30); }

:root {
  --bg: #0f1a33;
  --bg-deep: #0a1226;
  --ink: #f4efe6;
  --body: #c8cedd;
  --muted: #8e98b3;
  --coral: #ff7a59;
  --gold: #f2c14e;
  --line: rgba(244, 239, 230, .12);
  --card: rgba(244, 239, 230, .045);
  --card-hi: rgba(244, 239, 230, .08);

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --text: "Archivo", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: clamp(16px, 5vw, 96px);
  --stagger: 55ms;

  color-scheme: dark;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg-deep);
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
html.snap-loose { scroll-snap-type: y proximity; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-stretch: 85%;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient glow that drifts to a new spot per section (vars set from JS) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(55vmax 55vmax at var(--gx) var(--gy), var(--glow), transparent 62%),
    radial-gradient(45vmax 45vmax at calc(100% - var(--gx)) calc(100% - var(--gy)), rgba(91, 124, 255, .16), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  transition: --gx 1.4s var(--ease), --gy 1.4s var(--ease), --glow 1.4s var(--ease);
}

/* Film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
strong { color: var(--ink); font-weight: 650; }

::selection { background: var(--coral); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 6px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: fixed;
  left: 16px; top: -60px;
  z-index: 100;
  padding: .7em 1em;
  background: var(--gold);
  color: var(--bg);
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: top .2s;
}
.skip:focus { top: 16px; }

/* ---------- Chrome: header, progress, dot nav ---------- */

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 40;
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--coral), var(--gold));
}

.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(clamp(14px, 2.4vh, 24px) + env(safe-area-inset-top, 0px)) var(--gutter) clamp(14px, 2.4vh, 24px);
  pointer-events: none;
}
.top > * { pointer-events: auto; }

.mono {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(10, 18, 38, .5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font: 800 1rem/1 var(--display);
  letter-spacing: -.04em;
  text-decoration: none;
  transition: border-color .3s, transform .3s var(--ease);
}
.mono:hover { border-color: var(--coral); transform: rotate(-8deg); }
.mono--in { font-size: 1.05rem; letter-spacing: -.02em; padding-bottom: 2px; }
.mono--in:hover { border-color: var(--gold); background: var(--gold); color: var(--bg); transform: none; }

.top__right { display: flex; align-items: center; gap: 10px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: .7em 1.15em;
  border-radius: 999px;
  background: var(--coral);
  color: var(--bg);
  font: 700 .95rem/1 var(--text);
  font-stretch: 95%;
  text-decoration: none;
  box-shadow: 0 10px 30px -10px rgba(255, 122, 89, .7);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.pill:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(255, 122, 89, .85); }

.dots {
  position: fixed;
  right: clamp(12px, 2vw, 32px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
}
.dots ol { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.dots a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 0;
  color: var(--muted);
  text-decoration: none;
  font: 600 .72rem/1 var(--text);
  font-stretch: 100%;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.dots a::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 99px;
  background: rgba(244, 239, 230, .28);
  transition: height .45s var(--ease), background .3s;
}
.dots a span {
  opacity: 0;
  transform: translateX(8px);
  transition: opacity .3s, transform .3s var(--ease);
  white-space: nowrap;
}
.dots a:hover span,
.dots a:focus-visible span { opacity: 1; transform: none; color: var(--ink); }
.dots a:hover::after { background: var(--ink); }
.dots a[aria-current="true"]::after { height: 28px; background: var(--coral); }

/* ---------- Panels & layout ---------- */

.panel {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: clamp(84px, 12vh, 140px) var(--gutter) clamp(56px, 8vh, 96px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  isolation: isolate;
}

/* Giant outlined section number */
.panel::after {
  content: attr(data-num);
  position: absolute;
  right: -.04em;
  bottom: -.2em;
  z-index: -1;
  font: 800 clamp(11rem, 36vw, 38rem)/1 var(--display);
  letter-spacing: -.07em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 239, 230, .07);
  pointer-events: none;
  transition: transform 1.4s var(--ease), opacity 1.2s var(--ease);
}

.wrap {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: center;
}
.wrap--wide   { grid-template-columns: minmax(0, 1.45fr) minmax(0, .65fr); }
.wrap--single { grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 4.5vh, 48px); }

.copy { min-width: 0; }
.copy--wide { max-width: 1180px; }

/* ---------- Type ---------- */

.kicker {
  display: flex;
  align-items: center;
  gap: .8em;
  margin-bottom: clamp(.9rem, 2.4vh, 1.5rem);
  color: var(--coral);
  font: 650 .8rem/1.2 var(--text);
  font-stretch: 100%;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  flex: none;
  width: 2.4em;
  height: 1px;
  background: currentColor;
}

.display {
  font-family: var(--display);
  font-weight: 800;
  font-variation-settings: "opsz" 96;
  font-size: clamp(2.6rem, min(6.6vw, 12svh), 8rem);
  line-height: .94;
  letter-spacing: -.045em;
  margin-bottom: clamp(1rem, 3vh, 2rem);
  text-wrap: balance;
}
.display--xl { font-size: clamp(3.2rem, min(9.6vw, 17svh), 11.5rem); line-height: .9; }
.display--md { font-size: clamp(2.3rem, min(5.2vw, 10svh), 6.25rem); }
.display em { font-style: normal; color: var(--coral); }
.display .emo { font-size: .78em; letter-spacing: 0; }

.lede {
  max-width: 46ch;
  color: var(--body);
  font-size: clamp(1rem, .92rem + .32vw, 1.2rem);
  font-stretch: 80%;
  line-height: 1.5;
}
.lede em { font-style: normal; color: var(--gold); }

.tag {
  display: inline-block;
  color: var(--gold);
  font: 650 .68rem/1 var(--text);
  font-stretch: 100%;
  letter-spacing: .16em;
  text-transform: uppercase;
}

/* Masked words: JS wraps each headline word as .w > .wi */
.w {
  display: inline-block;
  overflow: clip;
  overflow-clip-margin: .06em;
  vertical-align: top;
  padding: .06em .03em .14em;
  margin: -.06em -.03em -.14em;
}
.wi { display: inline-block; will-change: transform; }

/* ---------- Direction-aware reveal ----------
   future (below the active section): content waits below, rises up into place
   past   (above the active section): content waits above, drops down into place
   so scrolling down = things fall up; scrolling up = things fall down. */

.js .panel .wi {
  transform: translateY(110%);
  opacity: 0;
  transition: transform .5s var(--ease), opacity .4s var(--ease);
}
.js .panel.is-past .wi { transform: translateY(-110%); }

.js .panel [data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  filter: blur(6px);
  transition: opacity .4s var(--ease), transform .5s var(--ease), filter .4s var(--ease);
}
.js .panel.is-past [data-reveal] { transform: translateY(-34px); }

.js .panel.is-active .wi,
.js .panel.is-active [data-reveal] {
  opacity: 1;
  transform: none;
  filter: none;
  transition: transform 1s var(--ease), opacity .8s var(--ease), filter .8s var(--ease);
  transition-delay: calc(var(--i, 0) * var(--stagger) + 90ms);
}

.js .panel:not(.is-active)::after { opacity: 0; transform: translateY(14%); }
.js .panel.is-past::after { transform: translateY(-14%); }

/* ---------- 01 · Hero ---------- */

.hero .wrap { grid-template-columns: minmax(0, 1.5fr) minmax(0, .7fr); }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(1.25rem, 3.5vh, 2.25rem);
}
.meta li {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .55em .95em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--body);
  font-size: .9rem;
}

.portrait {
  position: relative;
  justify-self: center;
  width: min(100%, 400px);
}
.portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 999px 999px 28px 28px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .7);
}
.portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1.5px solid var(--coral);
  border-radius: 999px 999px 28px 28px;
  transform: translate(18px, 18px);
}

.badge {
  position: absolute;
  left: -46px;
  bottom: 40px;
  width: clamp(96px, 9vw, 128px);
  height: auto;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .35));
}
.badge__bg { fill: var(--gold); }
.badge__text {
  fill: var(--bg);
  font: 700 11.5px var(--text);
  font-stretch: 100%;
  letter-spacing: 2.2px;
}
.badge__emoji { font-size: 30px; }
.badge__spin { transform-origin: 60px 60px; animation: spin 26s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

.wave { display: inline-block; transform-origin: 70% 75%; }
.panel.is-active .wave { animation: wave 1.6s ease-in-out 1.4s 2; }
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(16deg); }
  20%, 40% { transform: rotate(-8deg); }
}

.cue {
  position: absolute;
  left: 50%;
  bottom: clamp(16px, 3.5vh, 32px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  text-decoration: none;
  font: 600 .7rem/1 var(--text);
  font-stretch: 100%;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.cue i {
  position: relative;
  width: 1px;
  height: 44px;
  background: var(--line);
  overflow: hidden;
}
.cue i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--coral);
  animation: drip 2s var(--ease) infinite;
}
@keyframes drip {
  0%   { transform: translateY(-100%); }
  60%  { transform: translateY(100%); }
  100% { transform: translateY(100%); }
}

/* ---------- 02 · Journey timeline ---------- */

.timeline {
  position: relative;
  display: grid;
  gap: clamp(10px, 2.2vh, 22px);
}
.timeline::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(var(--coral), var(--gold) 70%, transparent);
  transform-origin: top;
  transition: transform 1.4s var(--ease) .35s;
}
.js .panel:not(.is-active) .timeline::before { transform: scaleY(0); transition-delay: 0s; transition-duration: .5s; }

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.timeline__ico {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  font-size: 1.05rem;
}
.timeline .is-now .timeline__ico {
  border-color: var(--coral);
  box-shadow: 0 0 0 6px rgba(255, 122, 89, .12);
}
.timeline__yr {
  color: var(--gold);
  font: 650 .72rem/1.2 var(--text);
  font-stretch: 100%;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.timeline h3 {
  margin: .25rem 0 .2rem;
  font: 700 clamp(1.02rem, .95rem + .3vw, 1.25rem)/1.15 var(--display);
  letter-spacing: -.015em;
}
.timeline li p:last-child {
  color: var(--body);
  font-size: .95rem;
  line-height: 1.4;
}

/* ---------- 03 · Scale ---------- */

.mega {
  font: 800 clamp(3.4rem, min(9.4vw, 19svh), 13rem)/.86 var(--display);
  font-variation-settings: "opsz" 96;
  letter-spacing: -.055em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(100deg, var(--gold) 10%, var(--coral) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: clamp(.4rem, 1.4vh, 1rem);
  white-space: nowrap;
}
.scale .display { margin-bottom: clamp(.8rem, 2.4vh, 1.5rem); }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px clamp(24px, 4vw, 56px);
  margin-top: clamp(1.25rem, 3.5vh, 2.25rem);
}
.stats div { display: flex; flex-direction: column-reverse; gap: 6px; }
.stats dd { font: 800 clamp(2rem, 3.4vw, 3rem)/1 var(--display); letter-spacing: -.04em; }
.stats dt {
  color: var(--muted);
  font: 600 .72rem/1.3 var(--text);
  font-stretch: 100%;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.stats small { display: block; color: var(--coral); letter-spacing: .1em; }

.phone {
  position: relative;
  justify-self: center;
  width: min(100%, 300px);
  aspect-ratio: 9 / 18.5;
  padding: 12px;
  border-radius: 46px;
  background: linear-gradient(160deg, #1d2a4d, #0b1328);
  border: 1px solid rgba(244, 239, 230, .14);
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .8), inset 0 0 0 2px rgba(255, 255, 255, .03);
  rotate: 4deg;
}
.phone__notch {
  position: absolute;
  top: 22px; left: 50%;
  translate: -50% 0;
  width: 84px; height: 22px;
  border-radius: 99px;
  background: #050a16;
  z-index: 2;
}
.phone__screen {
  height: 100%;
  border-radius: 36px;
  padding: 62px 20px 20px;
  display: flex;
  flex-direction: column;
  background: radial-gradient(120% 70% at 50% 0%, rgba(255, 122, 89, .22), transparent 60%), #f4efe6;
  color: var(--bg);
  font-stretch: 90%;
}
.phone__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 700 .78rem/1 var(--text);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.phone__live {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #1fbf75;
  box-shadow: 0 0 0 0 rgba(31, 191, 117, .6);
  animation: pulse 1.8s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(31, 191, 117, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 191, 117, 0); } }
.phone__zone { margin-top: 6px; color: #4b5675; font-size: .85rem; }
.phone__time {
  margin: auto 0 4px;
  font: 800 2.7rem/1 var(--display);
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.phone__plate {
  align-self: flex-start;
  padding: .3em .6em;
  border: 2px solid var(--bg);
  border-radius: 6px;
  font: 700 .85rem/1 var(--mono);
  letter-spacing: .08em;
}
.phone__rows { margin-top: 18px; display: grid; gap: 8px; font-size: .82rem; }
.phone__rows p { display: flex; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid rgba(15, 26, 51, .1); }
.phone__rows span:first-child { color: #4b5675; }
.phone__note { margin: 14px 0 auto; color: #4b5675; font-size: .8rem; line-height: 1.35; }
.phone__btn {
  display: block;
  margin-top: 16px;
  padding: .95em;
  border-radius: 16px;
  background: var(--bg);
  color: var(--ink);
  text-align: center;
  font: 700 .9rem/1 var(--text);
}

/* ---------- 04 · Suite cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.card {
  padding: clamp(16px, 2vw, 26px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  transition: border-color .3s, background .3s, translate .4s var(--ease);
}
.card:hover { translate: 0 -4px; border-color: rgba(255, 122, 89, .55); background: var(--card-hi); }
.card__head { display: flex; justify-content: space-between; align-items: center; }
.card__ico { font-size: 1.7rem; }
.card h3 {
  margin: .8rem 0 .35rem;
  font: 750 clamp(1.1rem, 1rem + .4vw, 1.4rem)/1.1 var(--display);
  letter-spacing: -.02em;
}
.card p { color: var(--body); font-size: .92rem; line-height: 1.42; }

/* ---------- 05 · How I work ---------- */

.points {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 36px);
  max-width: 1400px;
}
.points li { padding-top: 18px; border-top: 1px solid var(--line); }
.points__ico { font-size: 1.6rem; }
.points h3 {
  margin: .6rem 0 .35rem;
  font: 750 clamp(1.08rem, 1rem + .3vw, 1.3rem)/1.15 var(--display);
  letter-spacing: -.02em;
}
.points p { color: var(--body); font-size: .93rem; line-height: 1.45; }

/* ---------- 06 · Applied AI ---------- */

.ticks { display: grid; gap: 12px; max-width: 52ch; }
.ticks li { display: grid; grid-template-columns: 1.8em minmax(0, 1fr); gap: 10px; align-items: baseline; }
.ticks li > span { font-size: 1.15rem; }
.ticks p { color: var(--body); font-size: clamp(.98rem, .92rem + .25vw, 1.1rem); line-height: 1.45; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  display: inline-flex;
  align-items: baseline;
  gap: .5em;
  padding: .5em .9em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--body);
  font-size: .88rem;
  line-height: 1.25;
}
.chips small { color: var(--muted); font-size: .78rem; }
#ai .chips { margin-top: clamp(1.1rem, 3vh, 1.8rem); }

.term-col { display: grid; gap: 14px; justify-items: start; min-width: 0; }
.term {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(7, 12, 27, .85);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .8);
  overflow: hidden;
  rotate: -1.5deg;
}
.term__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 500 .78rem/1 var(--mono);
}
.term__bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a4566; }
.term__bar i:nth-child(1) { background: var(--coral); }
.term__bar i:nth-child(2) { background: var(--gold); }
.term__bar i:nth-child(3) { background: #1fbf75; }
.term__bar span { margin-left: 8px; }
.term__body {
  display: grid;
  gap: 9px;
  padding: 18px 20px 22px;
  font: 400 clamp(.8rem, .74rem + .2vw, .92rem)/1.45 var(--mono);
  color: var(--ink);
}
.term__body b { font-weight: 700; margin-right: .5em; }
.term__body .dim { color: var(--muted); }
.term__body .ok { color: #1fbf75; }
.term__body .gold { color: var(--gold); }
.caret {
  display: inline-block;
  width: .55em; height: 1.1em;
  margin-left: .3em;
  vertical-align: text-bottom;
  background: var(--gold);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.ps { color: var(--muted); font-size: .92rem; }

/* ---------- 07 · Side quests ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 22px);
  max-width: 1400px;
}
.tile {
  position: relative;
  padding: clamp(20px, 2.4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  overflow: hidden;
  transition: translate .45s var(--ease), border-color .3s, background .3s;
}
.tile::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--coral), var(--gold));
  opacity: .8;
}
.tile:hover { translate: 0 -6px; border-color: rgba(242, 193, 78, .5); background: var(--card-hi); }
.tile__ico {
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: rgba(244, 239, 230, .07);
  font-size: 1.75rem;
  transition: rotate .45s var(--ease), scale .45s var(--ease);
}
.tile:hover .tile__ico { rotate: -10deg; scale: 1.08; }
.tile h3 {
  margin: .4rem 0 .35rem;
  font: 800 clamp(1.4rem, 1.2rem + .8vw, 2rem)/1 var(--display);
  letter-spacing: -.035em;
}
.tile h3 a { text-decoration: none; }
.tile h3 a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.tile__out { color: var(--coral); font-size: .7em; vertical-align: .25em; }
.tile p:last-child { color: var(--body); font-size: .95rem; line-height: 1.45; }
.ribbon {
  position: absolute;
  top: 44px; right: 44px;
  translate: 50% -50%;
  width: 190px;
  padding: .55em 0;
  rotate: 45deg;
  background: repeating-linear-gradient(-45deg, var(--coral) 0 12px, #ff8f73 12px 24px);
  color: var(--bg);
  font: 750 .66rem/1 var(--text);
  font-stretch: 100%;
  letter-spacing: .16em;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
  pointer-events: none;
  z-index: 1;
}

/* ---------- 08 · Off the clock ---------- */

.hobbies {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2.4vh, 24px) clamp(18px, 2.4vw, 32px);
  max-width: 760px;
}
.hobbies li { display: grid; grid-template-columns: 1.9em minmax(0, 1fr); gap: 10px; }
.hobbies li > span { font-size: 1.35rem; line-height: 1.2; }
.hobbies h3 { font: 750 1.08rem/1.2 var(--display); letter-spacing: -.015em; margin-bottom: .2rem; }
.hobbies p { color: var(--body); font-size: .93rem; line-height: 1.42; }

.avatar {
  position: relative;
  justify-self: center;
  width: min(100%, 420px);
}
.avatar img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line), 0 0 0 14px rgba(244, 239, 230, .03), 0 0 140px rgba(255, 140, 190, .28);
}
.avatar__orbit {
  position: absolute;
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(15, 26, 51, .78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 1.7rem;
  animation: float 6s ease-in-out infinite;
}
.avatar__orbit--1 { top: 4%; right: 2%; }
.avatar__orbit--2 { bottom: 10%; right: -4%; animation-delay: -2s; }
.avatar__orbit--3 { bottom: 4%; left: 2%; animation-delay: -4s; }
@keyframes float { 50% { translate: 0 -12px; } }

/* ---------- 09 · Toolkit ---------- */

.kit {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 36px);
  max-width: 1400px;
}
.kit h3,
.training h3 {
  margin-bottom: 12px;
  color: var(--coral);
  font: 650 .78rem/1.2 var(--text);
  font-stretch: 100%;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.kit h3 span, .training h3 span { margin-right: .3em; }
.training { max-width: 1400px; padding-top: clamp(16px, 3vh, 28px); border-top: 1px solid var(--line); }

/* ---------- 10 · Contact ---------- */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: clamp(1.5rem, 4vh, 2.5rem);
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: .7em;
  padding: 1em 1.4em;
  border-radius: 999px;
  background: var(--coral);
  color: var(--bg);
  font: 750 clamp(1rem, .9rem + .5vw, 1.35rem)/1 var(--display);
  letter-spacing: -.01em;
  text-decoration: none;
  box-shadow: 0 18px 44px -14px rgba(255, 122, 89, .75);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.cta:hover { transform: translateY(-3px); box-shadow: 0 24px 50px -14px rgba(255, 122, 89, .9); }
.cta__short { display: none; }
.ghost {
  padding: 1em 1.3em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 600 .95rem/1 var(--text);
  font-stretch: 95%;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .3s, background .3s;
}
.ghost:hover { border-color: var(--ink); background: var(--card); }

.portrait--alt { width: min(100%, 380px); }
.portrait--alt img { aspect-ratio: 1; border-radius: 28px 999px 999px 999px; object-position: 50% 40%; }
.portrait--alt::before { border-radius: 28px 999px 999px 999px; border-color: var(--gold); transform: translate(-18px, 18px); }

.foot {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(14px, 3vh, 28px);
  color: var(--muted);
  font-size: .82rem;
}
.foot a { color: var(--body); text-underline-offset: 3px; }
.foot a:hover { color: var(--coral); }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .points, .kit, .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .wrap, .wrap--wide, .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .portrait { width: min(62vw, 300px); }
  .hero .portrait { order: -1; justify-self: start; width: min(46vw, 220px); }
  .badge { left: auto; right: -38px; bottom: 12px; width: 84px; }
  .phone { width: min(64vw, 250px); }
  .avatar { width: min(64vw, 300px); }
  .term-col { max-width: 560px; }
  .contact .portrait--alt { justify-self: start; width: min(56vw, 240px); margin-left: 18px; }
}

@media (max-width: 760px) {
  html { scroll-snap-type: y proximity; }
  .dots { display: none; }
  .panel { padding: 92px 16px 64px; align-items: start; scroll-snap-stop: normal; }
  .top { padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 14px; background: linear-gradient(var(--bg-deep) 30%, transparent); }
  .display { font-size: clamp(2.3rem, 10.5vw, 3.6rem); }
  .display--xl { font-size: clamp(2.9rem, 14.5vw, 4.8rem); }
  .display--md { font-size: clamp(2.1rem, 9.4vw, 3.2rem); }
  .mega { font-size: clamp(3rem, 15.5vw, 5rem); }
  .cards, .hobbies, .tiles, .points, .kit { grid-template-columns: minmax(0, 1fr); }
  .tile { padding: 20px; }
  .tile__ico { width: 48px; height: 48px; font-size: 1.45rem; margin-bottom: 10px; }
  .cue { display: none; }
  .foot { position: static; margin-top: 48px; }
  .contact { align-content: center; }
  .phone { rotate: 0deg; }
  .term { rotate: 0deg; }
}

@media (max-width: 480px) {
  .cta__long { display: none; }
  .cta__short { display: inline; }
}

/* Short desktop viewports: tighten vertical rhythm */
@media (min-width: 761px) and (max-height: 760px) {
  .panel { padding-top: 84px; padding-bottom: 48px; }
  .timeline { gap: 10px; }
  .timeline li p:last-child { font-size: .9rem; }
  .phone { width: min(100%, 250px); }
  #toolkit .display--xl { font-size: clamp(3rem, 13svh, 8rem); margin-bottom: .5rem; }
  .chips li { padding: .42em .85em; font-size: .84rem; }
  .kit h3, .training h3 { margin-bottom: 8px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .panel .wi,
  .js .panel [data-reveal],
  .js .panel.is-active .wi,
  .js .panel.is-active [data-reveal] {
    transform: none !important;
    filter: none !important;
    transition: opacity .25s linear !important;
    transition-delay: 0s !important;
  }
  .js .panel::after, .js .panel:not(.is-active)::after { transform: none !important; }
  .badge__spin, .wave, .panel.is-active .wave, .cue i::after, .avatar__orbit, .phone__live, .caret { animation: none !important; }
  .timeline::before { transition: none !important; transform: none !important; }
}
