/* ============================================================
   Musa Alanssari — resume site
   Palette: warm off-whites + olive greens, soft & human.
   Editorial, mostly box-free: hairlines, hanging type, links.
   ============================================================ */

:root {
  --paper:      #FAF8F1;
  --cream:      #FFFEF8;
  --mist:       #F1EFE3;
  --olive:      #75814B;
  --olive-deep: #59653A;
  --sage:       #B7C09B;
  --sage-soft:  #DDE2CC;
  --ink:        #2F3322;
  --ink-soft:   #5C6048;
  --clay:       #D9A87E;
  --clay-soft:  #F3E3D3;
  --clay-text:  #7A5634;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Karla", -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  position: relative;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
}

::selection { background: var(--sage); color: var(--ink); }

a { color: inherit; }

/* balanced headings + tidy paragraphs read as more "designed" */
h1, h2, h3,
.hero-title, .section-title, .contact-headline, .page-title,
.block-title, .cta-title, .lead {
  text-wrap: balance;
}
p { text-wrap: pretty; }

/* keep section anchors clear of the fixed nav when linked to */
section[id], [id] { scroll-margin-top: 110px; }

.container {
  position: relative;
  z-index: 2;                 /* keep content above the path overlay */
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
}

/* ============ Winding scroll path ============ */
.path-layer {
  position: absolute;
  inset: 0;
  z-index: 0;                 /* draws on the background, beneath all content */
  pointer-events: none;
  overflow: hidden;
  /* let the path dissolve gently into the background at the page edges */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 6%, #000 94%, transparent 100%);
}

#journey-svg { display: block; width: 100%; }

#journey-trail {
  stroke-width: 2;
  stroke-dasharray: 1 13;
  stroke-linecap: round;
  opacity: 0.28;
}

#journey-path {
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.4;
}

#journey-dot .dot-core { fill: var(--olive-deep); opacity: 0.55; }
#journey-dot .dot-halo { fill: var(--sage); opacity: 0.16; }

/* ============ Navigation ============ */
.nav-wrap {
  position: fixed;
  top: 18px;
  left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 0 24px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: min(1080px, 100%);
  padding: 10px 12px 10px 24px;
  background: rgba(255, 254, 248, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(117, 129, 75, 0.16);
  border-radius: 999px;
  box-shadow: 0 10px 30px -18px rgba(63, 70, 41, 0.35);
}

.nav-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  text-decoration: none;
}
.nav-dot { color: var(--olive); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--ink); background: var(--sage-soft); }

.nav-links .nav-cta { background: var(--olive); color: var(--cream); }
.nav-links .nav-cta:hover,
.nav-links .nav-cta.active { background: var(--olive-deep); color: var(--cream); }

/* ============ Shared type ============ */
.kicker {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 22px;
}

.section-title,
.contact-headline {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.section-title { font-size: clamp(2.1rem, 5vw, 3.2rem); margin-bottom: 48px; }

/* ============ Buttons & links ============ */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
              box-shadow 0.25s var(--ease), color 0.25s var(--ease);
}
.btn-primary {
  background: var(--olive);
  color: var(--cream);
  box-shadow: 0 18px 40px -22px rgba(63, 70, 41, 0.5);
}
.btn-primary:hover { background: var(--olive-deep); transform: translateY(-2px); }
.btn-ghost { color: var(--ink); border: 1.5px solid var(--sage); }
.btn-ghost:hover { background: var(--sage-soft); transform: translateY(-2px); }

/* inline text link with animated underline */
.text-link {
  display: inline-block;
  margin-top: 40px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--olive-deep);
  text-decoration: none;
  background-image: linear-gradient(var(--olive), var(--olive));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.35s var(--ease);
}
.text-link span { transition: transform 0.25s var(--ease); display: inline-block; }
.text-link:hover { background-size: 100% 2px; }
.text-link:hover span { transform: translateX(5px); }
.text-link-light { color: var(--sage-soft); }
.text-link-light { background-image: linear-gradient(var(--sage), var(--sage)); }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0 60px;
  overflow: hidden;
}
.hero-inner { max-width: 820px; }

.hero-hello {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--olive);
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.wave {
  display: inline-block;
  transform-origin: 70% 70%;
  animation: wave 2.6s var(--ease) infinite;
}
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 5.8rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin-bottom: 28px;
}
.hero-title .accent { color: var(--olive); font-style: italic; }
.hero-title .period { color: var(--clay); }

.hero-sub {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--ink-soft);
  max-width: 580px;
  margin-bottom: 26px;
}
.hero-meta {
  font-weight: 700;
  color: var(--olive-deep);
  margin-bottom: 38px;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.squiggle { position: relative; white-space: nowrap; color: var(--ink); font-weight: 700; }
.squiggle::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -6px; height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 9' preserveAspectRatio='none'%3E%3Cpath d='M1 6 Q 12 1, 24 5 T 48 5 T 72 5 T 96 5 T 119 4' fill='none' stroke='%23D9A87E' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

.scroll-hint {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--ink-soft); font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
}
.scroll-hint .wheel { animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(9px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---- Kinetic hero (home) ---- */
.hero { overflow: hidden; padding-bottom: 92px; }

/* soft accent that drifts toward the cursor across the WHOLE page.
   It adapts to the backdrop: a darker olive that MULTIPLIES over light
   sections, and a light sage that SCREENS (glows) over the dark ones. */
.cursor-orb {
  position: fixed; top: 0; left: 0;
  width: 460px; height: 460px; border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none; z-index: 1; opacity: 0;
  will-change: transform, opacity;
  filter: blur(36px);
  transition: opacity 0.7s var(--ease);
}
/* light-background state — darker olive that multiplies into the surface */
.orb-light {
  background: radial-gradient(circle at center, rgba(89, 101, 58, 0.55), rgba(89, 101, 58, 0) 70%);
  mix-blend-mode: multiply;
}
/* dark-background state — light sage that lifts the surface */
.orb-dark {
  background: radial-gradient(circle at center, rgba(221, 226, 204, 0.62), rgba(221, 226, 204, 0) 70%);
  mix-blend-mode: screen;
}
.section-dark, .section-contact { position: relative; }

/* ---- Blurred, programming-themed depth objects behind the content ---- */
main { position: relative; }
.depth-layer { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.depth-obj {
  position: absolute;
  opacity: 0.11;
  filter: blur(6px);
  will-change: transform;
}
.depth-obj svg { width: 100%; height: 100%; display: block; }
@media (max-width: 700px) { .depth-obj { opacity: 0.07; filter: blur(5px); } }

/* clarifying glass: a sharp copy of the depth objects, revealed only through
   a circular mask that follows the orb (vars set by hero.js) */
.depth-clear {
  -webkit-mask-image: radial-gradient(circle 165px at var(--mx, -9999px) var(--my, -9999px), #000 0, #000 58%, transparent 100%);
  mask-image: radial-gradient(circle 165px at var(--mx, -9999px) var(--my, -9999px), #000 0, #000 58%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.depth-clear .depth-obj { filter: none; opacity: 0.5; }

.hero-inner { position: relative; z-index: 2; max-width: 980px; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--olive); margin-bottom: 24px;
}

/* oversized wordmark with a line-by-line mask reveal on load */
.hero-display {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3.4rem, 13vw, 9.5rem);
  line-height: 0.9;
  letter-spacing: -0.025em;
  margin: 0 0 26px;
  color: var(--ink);
}
.hd-line { display: block; overflow: hidden; padding-bottom: 0.06em; }
/* base state is visible (translateY 0); the keyframe plays it up FROM hidden,
   so the name is never stuck off-screen if the animation doesn't run */
.hd-in { display: block; animation: hd-rise 1s var(--ease) 0.1s both; }
.hd-line:nth-child(2) .hd-in { animation-delay: 0.22s; }
.hero-display .period { color: var(--clay); }
@keyframes hd-rise { from { transform: translateY(110%); } to { transform: translateY(0); } }

/* rotating value phrase */
.hero-rotate {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.7vw, 2rem);
  color: var(--ink-soft);
  margin-bottom: 36px;
  display: flex; align-items: baseline; gap: 0.4em; flex-wrap: wrap;
}
.hr-static { white-space: nowrap; }
.rotor { display: inline-grid; }
.rotor-word {
  grid-area: 1 / 1;
  color: var(--olive); font-style: italic; white-space: nowrap;
  opacity: 0; transform: translateY(0.5em);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.rotor-word.is-on { opacity: 1; transform: none; }
.rotor-word.is-out { opacity: 0; transform: translateY(-0.5em); }

/* looping marquee strip pinned to the bottom of the hero */
.hero-marquee {
  position: absolute; left: 0; right: 0; bottom: 0;
  overflow: hidden;
  border-top: 1px solid var(--sage-soft);
  padding: 15px 0;
  z-index: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.hm-track { display: inline-flex; align-items: center; white-space: nowrap; animation: hm-scroll 26s linear infinite; }
.hm-track span { font-family: var(--font-display); font-size: clamp(0.95rem, 1.7vw, 1.2rem); color: var(--ink-soft); padding: 0 24px; }
.hm-dot { color: var(--olive); }
@keyframes hm-scroll { to { transform: translateX(-50%); } }

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

/* ---- Big scrolling marquee divider (home) ---- */
.home-marquee-band {
  overflow: hidden;
  padding: clamp(30px, 6vw, 66px) 0;
  border-top: 1px solid var(--sage-soft);
  border-bottom: 1px solid var(--sage-soft);
  background: var(--cream);
  position: relative;
  z-index: 2;
}
.hmb-track { display: inline-flex; align-items: center; white-space: nowrap; animation: hmb-scroll 32s linear infinite; }
.hmb-track span {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 7vw, 5rem);
  letter-spacing: -0.015em;
  color: var(--ink);
  padding: 0 0.35em;
}
.hmb-star { color: var(--olive); }
@keyframes hmb-scroll { to { transform: translateX(-50%); } }

/* ---- Scroll wipe-reveal for home section headings ---- */
body[data-page="home"] .home-section .section-title,
body[data-page="home"] .section-contact .contact-headline {
  clip-path: inset(0 0 105% 0);
  transition: clip-path 0.95s var(--ease), opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
body[data-page="home"] .home-section .section-title.visible,
body[data-page="home"] .section-contact .contact-headline.visible {
  clip-path: inset(-12% 0 -12% 0);
}

/* parallax targets drift smoothly (transform set per-scroll by home-fx.js) */
.il-num { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .hd-in { transform: none !important; animation: none !important; }
  .hm-track, .hmb-track { animation: none; }
  .cursor-orb { display: none; }
  body[data-page="home"] .home-section .section-title,
  body[data-page="home"] .section-contact .contact-headline { clip-path: none; }
}

.blob { position: absolute; border-radius: 50%; filter: blur(70px); z-index: 0; }
.blob-a { width: 480px; height: 480px; background: rgba(183,192,155,0.45); top: -120px; right: -140px; }
.blob-b { width: 380px; height: 380px; background: rgba(243,227,211,0.85); bottom: -80px; left: -120px; }

/* ============ HOME sections (de-boxed) ============ */
.home-section { padding: 120px 0; }

.lead {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  line-height: 1.38;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 880px;
}
.lead strong { color: var(--olive-deep); font-weight: 600; }
.lead-sub {
  margin-top: 26px;
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 640px;
}

.inline-skills {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 0;
}
.inline-skills span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 0 18px;
  border-right: 1px solid var(--sage);
}
.inline-skills span:first-child { padding-left: 0; }
.inline-skills span:last-child { border-right: 0; }

/* dark band */
.section-dark { background: var(--olive-deep); color: var(--sage-soft); }
.section-dark .kicker { color: var(--sage); }
.section-dark .section-title { color: var(--cream); }

/* ruled list (work teaser) */
.ruled-list { list-style: none; }
.ruled-list li { border-top: 1px solid rgba(221,226,204,0.22); }
.ruled-list li:last-child { border-bottom: 1px solid rgba(221,226,204,0.22); }
.ruled-list a {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 28px 8px;
  text-decoration: none;
  transition: padding 0.3s var(--ease), background 0.3s var(--ease);
}
.ruled-list a:hover { padding-left: 22px; background: rgba(255,254,248,0.05); }
.rl-when { font-weight: 700; font-size: 0.92rem; color: var(--sage); }
.rl-main { display: flex; flex-direction: column; gap: 3px; }
.rl-role { font-family: var(--font-display); font-size: 1.4rem; font-weight: 500; color: var(--cream); }
.rl-org { font-size: 0.98rem; color: var(--sage-soft); opacity: 0.85; }
.rl-arrow { font-size: 1.4rem; color: var(--sage); opacity: 0; transform: translateX(-8px); transition: all 0.3s var(--ease); }
.ruled-list a:hover .rl-arrow { opacity: 1; transform: translateX(0); }

/* index list (projects teaser) */
.index-list { list-style: none; counter-reset: none; }
.index-list li { border-top: 1px solid var(--sage-soft); }
.index-list li:last-child { border-bottom: 1px solid var(--sage-soft); }
.index-list a {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: baseline;
  gap: 28px;
  padding: 30px 8px;
  text-decoration: none;
  transition: padding 0.3s var(--ease);
}
.index-list a:hover { padding-left: 22px; }
.il-num { font-family: var(--font-display); font-size: 1.2rem; color: var(--clay); font-weight: 500; }
.il-body { display: flex; flex-direction: column; gap: 6px; }
.il-title { font-family: var(--font-display); font-size: 1.55rem; font-weight: 500; color: var(--ink); }
.il-desc { color: var(--ink-soft); font-size: 1rem; max-width: 520px; }
.il-tech { font-size: 0.85rem; font-weight: 700; color: var(--olive); white-space: nowrap; }
.index-list a:hover .il-title { color: var(--olive-deep); }

/* contact */
.section-contact { padding-bottom: 130px; }
.contact-headline { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 24px; }
.contact-sub { font-size: 1.2rem; color: var(--ink-soft); max-width: 520px; margin-bottom: 40px; }
.contact-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.contact-links a {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  width: fit-content;
  background-image: linear-gradient(var(--clay), var(--clay));
  background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size 0.35s var(--ease), color 0.25s var(--ease);
}
.contact-links a:hover { background-size: 100% 2px; color: var(--olive-deep); }

/* ============ SUB-PAGES ============ */
.page { padding-top: 0; }

.page-hero {
  padding: 180px 0 80px;
  border-bottom: 1px solid var(--sage-soft);
}
.page-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.8rem, 8vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 32px;
}
.page-intro {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  color: var(--ink-soft);
  max-width: 680px;
  line-height: 1.6;
}

.page-note {
  margin-top: 22px;
  max-width: 620px;
  font-size: 0.86rem;
  line-height: 1.65;
  color: #8d907e;
  font-style: italic;
}
.page-note-mark {
  font-style: normal;
  font-weight: 700;
  color: var(--olive);
  margin-right: 2px;
}

.page-block { padding: 80px 0; border-bottom: 1px solid var(--sage-soft); }

/* split layout: sticky label + body */
.split { display: grid; grid-template-columns: 220px 1fr; gap: 56px; align-items: start; }
.split-aside h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--olive);
  position: sticky;
  top: 120px;
}
.split-body > p {
  font-size: 1.18rem;
  color: var(--ink-soft);
  margin-bottom: 22px;
  max-width: 660px;
}
.split-body > p:last-child { margin-bottom: 0; }

.skill-group { margin-bottom: 34px; }
.skill-group:last-child { margin-bottom: 0; }
.skill-group h3 { font-family: var(--font-display); font-size: 1.1rem; color: var(--ink); margin-bottom: 10px; }
.skill-line { font-size: 1.05rem; color: var(--ink-soft); line-height: 1.9; }

.edu-school { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); margin-bottom: 6px; }
.edu-degree { font-weight: 700; color: var(--olive); margin-bottom: 14px; }
.edu-course { color: var(--ink-soft); max-width: 620px; }

/* accented research block — subtle left rule, not a box */
.accented { border-left: 4px solid var(--clay); padding-left: 0; }
.accented .container { padding-left: 0; }
.accent-tag {
  display: inline-block;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--clay-text); margin-bottom: 18px;
}
.block-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.12; color: var(--ink);
  max-width: 760px; margin-bottom: 22px;
}
.block-lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 680px; margin-bottom: 44px; }

.feature-list { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.feature-list h3 { font-family: var(--font-display); font-size: 1.15rem; color: var(--olive-deep); margin-bottom: 10px; padding-top: 18px; border-top: 2px solid var(--sage); }
.feature-list p { color: var(--ink-soft); font-size: 0.98rem; }

/* CV timeline — vertical rule, no boxes */
.cv-timeline { list-style: none; padding: 80px 0 40px; }
.cv-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 0 0 56px 40px;
}
.cv-item:last-child { padding-bottom: 0; }
.cv-item::before {
  content: "";
  position: absolute; left: -9px; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--sage);
  border: 4px solid var(--paper);
  z-index: 1;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.cv-item.is-active::before { background: var(--olive); transform: scale(1.3); }
.cv-item .cv-role { transition: color 0.3s var(--ease); }
.cv-item.is-active .cv-role { color: var(--olive-deep); }

/* JS-built filling rail */
.cv-rail, .cv-rail-fill {
  position: absolute; left: -2px; width: 2px; border-radius: 2px; z-index: 0;
}
.cv-rail { background: var(--sage-soft); }
.cv-rail-fill { background: var(--olive); height: 0; }

/* rolling balls — one rolls down per job and parks at its node */
.cv-timeline.has-balls .cv-item::before { display: none; }
.cv-ball {
  position: absolute;
  left: -10px;
  top: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--olive);
  border: 4px solid var(--paper);
  box-sizing: border-box;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}
.cv-ball::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
}
.cv-when { font-weight: 700; color: var(--olive); font-size: 0.92rem; }
.cv-role { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 3vw, 2rem); color: var(--ink); }
.cv-org { color: var(--ink-soft); font-weight: 700; margin-top: -10px; }
.cv-bullets { list-style: none; display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.cv-bullets li { position: relative; padding-left: 24px; color: var(--ink-soft); font-size: 1.05rem; }
.cv-bullets li::before { content: ""; position: absolute; left: 4px; top: 0.7em; width: 7px; height: 7px; border-radius: 50%; background: var(--sage); }
.cv-tech { font-size: 0.88rem; font-weight: 700; color: var(--clay-text); letter-spacing: 0.01em; }

/* Project detail rows */
.proj {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 32px;
  padding: 60px 0;
  border-bottom: 1px solid var(--sage-soft);
}
.proj:first-of-type { border-top: 1px solid var(--sage-soft); }
.proj-index { font-family: var(--font-display); font-size: 2.4rem; font-weight: 500; color: var(--clay); line-height: 1; }
.proj-headrow { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.proj-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.7rem, 3.6vw, 2.4rem); color: var(--ink); }
.proj-date { font-weight: 700; color: var(--olive); font-size: 0.9rem; }
.proj-kind { color: var(--olive-deep); font-weight: 700; font-size: 0.92rem; margin: 6px 0 18px; }
.proj-text { font-size: 1.1rem; color: var(--ink-soft); max-width: 720px; margin-bottom: 20px; }
.proj-tech { font-size: 0.88rem; font-weight: 700; color: var(--clay-text); }

/* page CTA */
.page-cta { padding: 100px 0; text-align: center; }
.cta-kicker { font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--olive); font-size: 0.85rem; margin-bottom: 16px; }
.cta-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.8rem, 4.5vw, 2.8rem); color: var(--ink); margin-bottom: 32px; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* ============ Playground (mini-players) ============ */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 40px;
  padding: 72px 0 24px;
}
.demo-card { display: flex; flex-direction: column; gap: 16px; }
.demo-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  color: var(--ink);
}
.demo-caption { font-size: 0.85rem; font-weight: 700; color: var(--clay-text); }

.miniplayer {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--sage-soft);
  border-radius: 18px;
  overflow: hidden;
  background: var(--cream);
  box-shadow: 0 18px 40px -22px rgba(63, 70, 41, 0.3);
}
.mp-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  background: var(--mist);
  border-bottom: 1px solid var(--sage-soft);
}
.mp-dots { display: flex; gap: 6px; }
.mp-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--sage); opacity: 0.65; display: block; }
.mp-label { font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); letter-spacing: 0.02em; }
.mp-actions { margin-left: auto; display: flex; gap: 6px; }
.mp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.mp-btn svg { width: 17px; height: 17px; }
.mp-btn:hover { background: var(--sage-soft); color: var(--ink); }

.mp-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0f120b;
  overflow: hidden;
}
.mp-stage iframe,
.mp-stage video,
.mp-stage canvas,
.mp-stage .mp-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.mp-placeholder,
.mp-launch {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 20px;
  background: var(--olive-deep);
  color: var(--sage-soft);
}
.mp-ph-icon { font-size: 2.4rem; }
.mp-placeholder p,
.mp-launch p { font-family: var(--font-display); font-size: 1.1rem; color: var(--cream); margin: 0; }
.mp-ph-note { font-size: 0.85rem; color: var(--sage); }
.mp-launch .btn { margin-top: 6px; }

/* ---- launch poster (preview image + click-to-launch) on every box ---- */
.mp-poster {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 22px;
  text-align: center;
  background: radial-gradient(120% 120% at 50% 18%, #1c2014 0%, #0d100a 78%);
  transition: opacity 0.5s var(--ease);
}
.mp-poster-gone { opacity: 0; pointer-events: none; visibility: hidden; }
.mp-poster-art { color: var(--sage); opacity: 0.6; }
.mp-poster-art svg { width: clamp(74px, 16vw, 122px); height: auto; display: block; }
.mp-poster-meta { display: flex; flex-direction: column; gap: 3px; }
.mp-poster-title { font-family: var(--font-display); font-size: clamp(1.1rem, 3vw, 1.6rem); color: var(--cream); }
.mp-poster-tech { font-size: clamp(0.72rem, 1.7vw, 0.85rem); letter-spacing: 0.06em; text-transform: uppercase; color: var(--sage); }
.mp-launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 22px;
  border: none;
  border-radius: 999px;
  background: var(--olive);
  color: var(--cream);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.mp-launch-btn svg { width: 16px; height: 16px; }
.mp-launch-btn:hover { transform: translateY(-2px); background: var(--olive-deep, #59653a); }

/* fullscreen: fill the screen and drop the fixed aspect ratio */
.miniplayer:fullscreen { border-radius: 0; border: 0; width: 100vw; height: 100vh; }
.miniplayer:fullscreen .mp-stage { aspect-ratio: auto; flex: 1; }
.miniplayer:-webkit-full-screen { border-radius: 0; border: 0; width: 100vw; height: 100vh; }
.miniplayer:-webkit-full-screen .mp-stage { aspect-ratio: auto; flex: 1; }

/* ---- Box 3 · Scroll Studio (scroll-effect builder) ---- */
.ss-stage { background: #14170f; }
.ss-root {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  color: #f5f3eb;
  font-family: var(--font-body);
}

/* top toolbar */
.ss-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: clamp(7px, 1.6%, 12px);
  border-bottom: 1px solid rgba(245, 243, 235, 0.1);
  flex-wrap: wrap;
}
.ss-effect, .ss-axis, .ss-ease {
  background: rgba(245, 243, 235, 0.07);
  color: #f5f3eb;
  border: 1px solid rgba(245, 243, 235, 0.15);
  border-radius: 8px;
  padding: 5px 8px;
  font-family: var(--font-body);
  font-size: clamp(0.72rem, 1.7vw, 0.85rem);
  max-width: 100%;
}
.ss-effect { flex: 1 1 auto; min-width: 120px; }
.ss-effect option, .ss-axis option, .ss-ease option { background: #1c2013; }
.ss-file-btn, .ss-code-btn, .ss-zip-btn {
  flex: 0 0 auto;
  background: transparent;
  color: rgba(245, 243, 235, 0.85);
  border: 1px solid rgba(245, 243, 235, 0.2);
  border-radius: 999px;
  padding: 5px 11px;
  font-family: var(--font-body);
  font-size: clamp(0.7rem, 1.6vw, 0.8rem);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s;
}
.ss-file-btn:hover, .ss-code-btn:hover, .ss-zip-btn:hover { border-color: rgba(157, 179, 106, 0.7); color: #9db36a; }

/* body: preview + controls */
.ss-body { flex: 1 1 auto; display: flex; min-height: 0; }

/* the preview reads like a real (light) website */
.ss-preview { flex: 1.6 1 0; position: relative; min-width: 0; background: #f3f1e8; overflow: hidden; }
.ss-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}
.ss-spacer { padding: 18px; color: #5c6048; box-sizing: border-box; }
.ss-spacer-top { min-height: 78%; display: flex; align-items: flex-end; }
.ss-spacer-bot { min-height: 130%; display: flex; flex-direction: column; gap: 12px; }
.ss-spacer-bot p { font-size: clamp(0.8rem, 1.9vw, 0.98rem); line-height: 1.55; max-width: 38ch; }
.ss-hint { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: #8d907e; }

.ss-stick { position: sticky; top: 10px; padding: 0 18px; z-index: 1; }
.ss-media {
  width: min(100%, 460px);
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  background: #e9e6da;                 /* opaque card so text never bleeds through */
  box-shadow: 0 18px 40px -18px rgba(20, 22, 15, 0.6);
  will-change: transform, filter, opacity;
}
/* override the generic ".mp-stage canvas" rule so the frame canvas sits in
   flow inside its wrapper instead of filling (and covering) the whole stage */
.ss-media .ss-canvas {
  position: static;
  inset: auto;
  display: block;
  width: 100%;
  height: auto;
}
.ss-scrub-hint {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 0.72rem;
  color: #8d907e;
}
.ss-scrub-hint[hidden] { display: none; }
.ss-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(20, 22, 15, 0.12); }
.ss-progress-bar { height: 100%; width: 0%; background: #9db36a; }

/* right-hand controls */
.ss-controls {
  flex: 0 0 clamp(118px, 26%, 168px);
  display: flex;
  flex-direction: column;
  gap: clamp(7px, 1.8%, 12px);
  padding: clamp(9px, 2%, 14px);
  border-left: 1px solid rgba(245, 243, 235, 0.1);
  overflow-y: auto;
}
.ss-ctrl { display: flex; flex-direction: column; gap: 4px; }
.ss-ctrl label {
  display: flex; justify-content: space-between;
  font-size: clamp(0.62rem, 1.5vw, 0.74rem);
  letter-spacing: 0.04em;
  color: rgba(245, 243, 235, 0.6);
}
.ss-ctrl input[type="range"] { width: 100%; accent-color: #9db36a; }
.ss-check { display: flex; align-items: center; gap: 6px; font-size: clamp(0.66rem, 1.6vw, 0.78rem); color: rgba(245, 243, 235, 0.7); }
.ss-check input { accent-color: #9db36a; }
.ss-status { margin-top: auto; font-size: clamp(0.58rem, 1.4vw, 0.7rem); color: rgba(245, 243, 235, 0.45); line-height: 1.4; }

/* code overlay */
.ss-code-panel {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  background: #0e110a;
}
.ss-code-panel[hidden] { display: none; }
.ss-code-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(245, 243, 235, 0.1);
  font-size: 0.82rem;
  color: rgba(245, 243, 235, 0.8);
}
.ss-copy {
  margin-left: auto;
  background: var(--olive); color: var(--cream);
  border: none; border-radius: 999px; padding: 5px 14px;
  font-family: var(--font-body); font-size: 0.74rem; cursor: pointer;
}
.ss-code-close {
  background: transparent; color: rgba(245, 243, 235, 0.6);
  border: 1px solid rgba(245, 243, 235, 0.2); border-radius: 8px;
  width: 26px; height: 26px; cursor: pointer; font-size: 0.8rem;
}
.ss-code {
  margin: 0; flex: 1 1 auto; overflow: auto;
  padding: 12px 14px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(0.66rem, 1.5vw, 0.78rem);
  line-height: 1.55;
  color: #d7ddc4;
  white-space: pre;
  tab-size: 2;
}

@media (max-width: 860px) {
  .demo-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ---- TSCHUB Roku channel re-creation ---- */
.roku-stage { background: #07090c; }
.ts-viewport { position: absolute; inset: 0; overflow: hidden; background: #07090c; }
.ts-tv {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 960px;
  height: 540px;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  background: #0a0d12;
  color: #f4f5f0;
  font-family: var(--font-body);
  overflow: hidden;
  outline: none;
}
.ts-screen { position: absolute; inset: 0; }
.ts-screen[hidden] { display: none; }

.ts-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 6;
  background: linear-gradient(180deg, rgba(7,9,12,0.9), transparent);
}
.ts-logo { font-family: var(--font-display); font-weight: 600; font-size: 24px; letter-spacing: 0.02em; color: #fff; }
.ts-logo span, .ts-logo-xl span { color: #e5544a; }
.ts-clock { font-size: 15px; font-weight: 700; color: #cdd2c4; }

/* auth gate */
.ts-auth {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  text-align: center; padding: 40px;
  background: radial-gradient(120% 90% at 50% 25%, #18202a 0%, #07090c 70%);
}
.ts-logo-xl { font-family: var(--font-display); font-weight: 600; font-size: 76px; color: #fff; letter-spacing: 0.01em; }
.ts-tag { color: #aab0a0; font-size: 19px; max-width: 560px; }
.ts-enter {
  margin-top: 10px;
  padding: 14px 30px;
  border: none; border-radius: 999px;
  background: #e5544a; color: #fff;
  font-family: var(--font-body); font-weight: 700; font-size: 18px; cursor: pointer;
}
.ts-enter:hover { background: #f06a60; }
.ts-note { color: #7f8674; font-size: 14px; letter-spacing: 0.04em; }

/* hero */
.ts-hero { position: absolute; top: 0; left: 0; right: 0; height: 300px; overflow: hidden; }
.ts-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ts-hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7,9,12,0.95) 0%, rgba(7,9,12,0.55) 45%, rgba(7,9,12,0.15) 100%),
              linear-gradient(0deg, #0a0d12 2%, transparent 55%);
}
.ts-hero-info { position: absolute; left: 28px; bottom: 22px; right: 40%; z-index: 2; }
.ts-hero-title { font-family: var(--font-display); font-weight: 600; font-size: 40px; color: #fff; line-height: 1.05; margin-bottom: 8px; }
.ts-hero-meta { color: #c7ccbd; font-size: 16px; margin-bottom: 12px; }
.ts-hero-cta { display: inline-block; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.3); color: #fff; font-weight: 700; font-size: 14px; padding: 7px 16px; border-radius: 999px; }

.ts-live { display: inline-block; color: #ff5a4e; font-weight: 800; font-size: 13px; letter-spacing: 0.08em; margin-bottom: 8px; }
.ts-live[hidden] { display: none; }

/* rows */
.ts-rows { position: absolute; left: 0; right: 0; top: 300px; bottom: 0; padding: 8px 0 16px 28px; overflow-y: auto; scrollbar-width: none; }
.ts-rows::-webkit-scrollbar { display: none; }
.ts-row { margin-bottom: 14px; }
.ts-row-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.ts-row-label { font-family: var(--font-display); font-weight: 600; font-size: 20px; color: #f4f5f0; }
.ts-row-count { font-size: 13px; color: #7f8674; font-weight: 700; }
.ts-track { display: flex; gap: 14px; overflow-x: auto; padding: 6px 28px 6px 2px; scrollbar-width: none; }
.ts-track::-webkit-scrollbar { display: none; }

.ts-card {
  flex: 0 0 auto; width: 188px;
  border: none; background: transparent; padding: 0; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: 7px;
}
.ts-card-img {
  position: relative; display: block;
  width: 188px; height: 106px; border-radius: 10px; overflow: hidden;
  background: #161b22; outline: 3px solid transparent; transition: outline-color .15s, transform .15s;
}
.ts-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ts-card-title { font-size: 14px; color: #b9bdb0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-card-live {
  position: absolute; top: 7px; left: 7px;
  background: #e5544a; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 0.06em;
  padding: 2px 7px; border-radius: 4px;
}
.ts-card.is-focused .ts-card-img { outline-color: #fff; transform: scale(1.04); }
.ts-card.is-focused .ts-card-title { color: #fff; }
.ts-card-lock {
  position: absolute; bottom: 7px; right: 7px;
  font-size: 13px; line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.7));
  opacity: 0.85;
}

/* player — content revoked, so this is a notice screen (no media) */
.ts-player { background: radial-gradient(120% 120% at 50% 30%, #1a1f12 0%, #07090a 80%); display: flex; flex-direction: column; }
.ts-revoked {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center; padding: 40px;
}
.ts-revoked-lock { font-size: 56px; line-height: 1; }
.ts-revoked-h { font-family: var(--font-display); font-weight: 600; font-size: 30px; color: #f5f3eb; margin: 0; }
.ts-revoked-sub { font-size: 16px; color: rgba(245,243,235,0.62); margin: 0; max-width: 520px; line-height: 1.5; }
.ts-revoked-name { font-size: 15px; color: #9db36a; margin: 6px 0 0; font-weight: 700; }
.ts-player-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 56px;
  display: flex; align-items: center; gap: 14px; padding: 0 20px; z-index: 4;
  background: linear-gradient(180deg, rgba(0,0,0,0.85), transparent);
}
.ts-back-btn { border: 1px solid rgba(255,255,255,0.4); background: rgba(0,0,0,0.4); color: #fff; font-family: var(--font-body); font-weight: 700; font-size: 14px; padding: 7px 16px; border-radius: 999px; cursor: pointer; }
.ts-back-btn:hover { background: rgba(255,255,255,0.16); }
.ts-player-title { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: #fff; }

/* on-screen remote (overlay, real size) */
.ts-remote {
  position: absolute; right: 12px; bottom: 12px; z-index: 8;
  display: grid; grid-template-columns: repeat(3, 30px); grid-auto-rows: 30px; gap: 4px;
  padding: 8px; border-radius: 14px;
  background: rgba(10,13,18,0.72); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,0.12);
}
.ts-rk { border: none; border-radius: 7px; background: rgba(255,255,255,0.1); color: #f4f5f0; font-size: 12px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ts-rk:hover { background: rgba(255,255,255,0.22); }
.ts-up { grid-column: 2; grid-row: 1; }
.ts-left { grid-column: 1; grid-row: 2; }
.ts-ok { grid-column: 2; grid-row: 2; background: #e5544a; font-size: 11px; }
.ts-ok:hover { background: #f06a60; }
.ts-right { grid-column: 3; grid-row: 2; }
.ts-down { grid-column: 2; grid-row: 3; }
.ts-back { grid-column: 3; grid-row: 3; font-size: 14px; }

.ts-hint {
  position: absolute; left: 12px; bottom: 14px; z-index: 7;
  font-size: 11px; color: rgba(244,245,240,0.55); max-width: 45%;
}

@media (max-width: 560px) {
  .ts-hint { display: none; }
}

/* ---- Facial Recognition (Python + OpenCV) demo ---- */
.vision-stage { background: #0f120b; }
.vision-video,
.vision-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vision-overlay { pointer-events: none; }
.vision-cta {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 22px;
  background: var(--olive-deep);
  color: var(--sage-soft);
}
.vision-cta[hidden] { display: none; }
.vision-cta p { font-family: var(--font-display); font-size: 1.1rem; color: var(--cream); margin: 0; }
.vision-cta .vision-start { margin-top: 6px; }
.vision-status { font-size: 0.82rem; color: var(--sage); min-height: 1em; max-width: 320px; }
.vision-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(47, 51, 34, 0.6);
  color: var(--cream);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}
.vision-stop {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  padding: 6px 14px;
  border: none;
  border-radius: 999px;
  background: var(--clay-text);
  color: var(--cream);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
}
.vision-stop[hidden] { display: none; }

/* ---- face-tracker People sidebar ---- */
.vision-people-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  padding: 6px 13px;
  border: none;
  border-radius: 999px;
  background: rgba(20, 22, 15, 0.62);
  color: var(--cream);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.vision-people-btn[hidden] { display: none; }

.vision-sidebar {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(74%, 280px);
  z-index: 6;
  display: flex;
  flex-direction: column;
  background: rgba(14, 17, 10, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-left: 1px solid rgba(245, 243, 235, 0.12);
  color: #f5f3eb;
  box-shadow: -16px 0 40px -20px rgba(0, 0, 0, 0.8);
}
.vision-sidebar[hidden] { display: none; }
.vs-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  font-family: var(--font-display); font-size: 1.05rem;
  border-bottom: 1px solid rgba(245, 243, 235, 0.1);
}
.vs-close {
  background: transparent; border: none; color: rgba(245, 243, 235, 0.6);
  font-size: 0.95rem; cursor: pointer; padding: 2px 6px;
}
.vs-list { flex: 1 1 auto; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.vs-empty { margin: 0; padding: 6px 14px 14px; font-size: 0.78rem; color: rgba(245, 243, 235, 0.45); line-height: 1.5; }
.vs-empty[hidden] { display: none; }
.vs-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 10px;
  background: rgba(245, 243, 235, 0.05);
}
.vs-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; }
.vs-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vs-name {
  width: 100%; box-sizing: border-box;
  background: transparent; border: 1px solid transparent; border-radius: 6px;
  color: #f5f3eb; font-family: var(--font-body); font-weight: 700; font-size: 0.86rem;
  padding: 2px 5px; outline: none;
}
.vs-name:hover { border-color: rgba(245, 243, 235, 0.18); }
.vs-name:focus { border-color: rgba(157, 179, 106, 0.7); background: rgba(245, 243, 235, 0.06); }
.vs-meta { font-size: 0.66rem; color: rgba(245, 243, 235, 0.45); padding-left: 5px; }
.vs-del {
  flex: 0 0 auto; background: transparent; border: none; cursor: pointer;
  color: rgba(245, 243, 235, 0.45); font-size: 0.85rem; padding: 4px 6px; border-radius: 6px;
}
.vs-del:hover { color: #e08a6a; background: rgba(224, 138, 106, 0.12); }
.vs-actions {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px; border-top: 1px solid rgba(245, 243, 235, 0.1);
}
.vs-actions button, .vs-import {
  flex: 1 1 auto; text-align: center;
  background: transparent; border: 1px solid rgba(245, 243, 235, 0.2);
  color: rgba(245, 243, 235, 0.85); border-radius: 999px;
  padding: 6px 8px; font-family: var(--font-body); font-size: 0.74rem; cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.vs-actions button:hover, .vs-import:hover { border-color: rgba(157, 179, 106, 0.7); color: #9db36a; }
.vs-clear { color: rgba(224, 138, 106, 0.85) !important; }

/* ============ Contact / résumé page ============ */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
  padding-bottom: 40px;
}
.resume-frame {
  position: relative;
  width: 100%;
  height: clamp(440px, 76vh, 860px);
  border: 1px solid var(--sage-soft);
  border-radius: 16px;
  overflow: hidden;
  background: var(--mist);
  box-shadow: 0 30px 60px -34px rgba(47, 51, 34, 0.5);
}
.resume-pdf { width: 100%; height: 100%; border: 0; display: block; }
.resume-fs {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 9px; cursor: pointer;
  background: rgba(20, 22, 15, 0.55); color: var(--cream);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background 0.2s var(--ease);
}
.resume-fs:hover { background: rgba(20, 22, 15, 0.78); }
.resume-fs svg { width: 18px; height: 18px; }
.resume-frame:fullscreen { width: 100vw; height: 100vh; border: 0; border-radius: 0; }
.resume-frame:-webkit-full-screen { width: 100vw; height: 100vh; border: 0; border-radius: 0; }
.resume-fallback {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 30px;
}
.resume-fallback[hidden] { display: none; }
.rf-note code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85em; background: var(--sage-soft); padding: 1px 5px; border-radius: 4px; }
.rf-icon { font-size: 2.6rem; }
.rf-title { font-family: var(--font-display); font-size: 1.4rem; color: var(--ink); margin: 0; }
.rf-note { color: var(--ink-soft); margin: 0; max-width: 32ch; }
.resume-fallback .btn { margin-top: 6px; }
.resume-actions { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 16px; }
.resume-actions .text-link { margin-top: 0; }

.contact-col { position: sticky; top: 110px; }
.contact-h {
  font-family: var(--font-display); font-size: 1.5rem; color: var(--ink);
  margin: 0 0 16px;
}
.contact-methods { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.contact-method {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--sage-soft);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), background 0.2s var(--ease);
}
a.contact-method:hover { border-color: var(--olive); transform: translateY(-2px); background: var(--cream); }
.contact-method.is-static { cursor: default; }
.cm-ic {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--sage-soft); color: var(--olive-deep);
}
.cm-ic svg { width: 20px; height: 20px; }
.cm-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cm-label { font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-soft); }
.cm-value { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-arrow { flex: 0 0 auto; color: var(--olive); font-size: 1.05rem; transition: transform 0.2s var(--ease); }
a.contact-method:hover .cm-arrow { transform: translateX(3px); }
.contact-foot { margin-top: 18px; font-size: 0.9rem; color: var(--ink-soft); line-height: 1.6; }

@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-col { position: static; }
  .resume-frame { height: clamp(420px, 64vh, 680px); }
}

/* ============ Footer ============ */
.footer { border-top: 1px solid var(--sage-soft); padding: 36px 0; background: var(--mist); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--ink-soft); font-size: 0.92rem; }

/* ============ Per-page scroll signatures ============ */
.page-fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

/* About — growing vine */
.about-vine svg { position: absolute; top: 0; left: 0; display: block; }
.vine-stem { stroke: var(--olive); stroke-width: 2.5; stroke-linecap: round; opacity: 0.5; }
.vine-leaf { fill: var(--sage); opacity: 0; transition: opacity 0.6s var(--ease); }
.vine-leaf.grown { opacity: 0.6; }
@media (max-width: 1024px) { .about-vine { display: none; } }

/* Projects — scrubbing numeral */
.proj-bignum {
  position: fixed;
  right: 4vw;
  top: 50%;
  transform: translateY(-50%);
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.proj-bignum.show { opacity: 1; }
.pbn-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(7rem, 22vw, 18rem);
  line-height: 0.8;
  color: var(--sage);
  opacity: 0.28;
}
.pbn-num.flip { animation: pbnFlip 0.5s var(--ease); }
@keyframes pbnFlip {
  0% { opacity: 0; transform: translateY(0.18em); }
  100% { opacity: 0.28; transform: translateY(0); }
}
.pbn-of { font-family: var(--font-body); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sage); opacity: 0.6; margin-top: 6px; }
@media (max-width: 900px) { .proj-bignum { display: none; } }

/* Playground — top scroll-progress bar */
.pg-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 60;
  background: var(--olive);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ============ Background shapes ============ */
.shape-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-shape {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.bg-shape-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  will-change: transform;
}

/* shape motion options (run on the inner element so centering is untouched) */
/* translate values are % of the shape's own size, so motion scales with the
   shape (a big soft blob moves far enough to read; a small one stays subtle) */
@keyframes shp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14%); } }
@keyframes shp-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes shp-spin  { to { transform: rotate(360deg); } }
@keyframes shp-sway  { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(10deg); } }
@keyframes shp-drift { 0% { transform: translate(0, 0); } 25% { transform: translate(18%, -14%); } 50% { transform: translate(30%, 9%); } 75% { transform: translate(11%, 18%); } 100% { transform: translate(0, 0); } }
@keyframes shp-orbit { 0% { transform: translate(0, 0); } 25% { transform: translate(14%, -14%); } 50% { transform: translate(0, -28%); } 75% { transform: translate(-14%, -14%); } 100% { transform: translate(0, 0); } }
.anim-float { animation: shp-float 5s ease-in-out infinite; }
.anim-pulse { animation: shp-pulse 4s ease-in-out infinite; }
.anim-spin  { animation: shp-spin 20s linear infinite; }
.anim-sway  { animation: shp-sway 5.5s ease-in-out infinite; }
.anim-drift { animation: shp-drift 14s ease-in-out infinite; }
.anim-orbit { animation: shp-orbit 12s linear infinite; }
@media (prefers-reduced-motion: reduce) { .bg-shape-fx { animation: none !important; } }

.sp-anim {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--sage-soft);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

/* shape editing chrome (only meaningful in edit mode) */
.shape-add {
  position: fixed;
  right: 20px;
  bottom: 72px;
  z-index: 300;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--sage);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 14px 34px -16px rgba(63, 70, 41, 0.55);
}
.edit-on .shape-add { display: flex; }
.shape-add:hover { background: var(--sage-soft); }

.shape-grip {
  position: fixed;
  z-index: 310;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 2px solid var(--cream);
  background: var(--clay);
  box-shadow: 0 2px 8px -2px rgba(47, 51, 34, 0.6);
  cursor: pointer;
  display: none;
  padding: 0;
}
.edit-on .shape-grip { display: block; }

.shape-selbox {
  position: fixed;
  z-index: 312;
  border: 1.5px dashed var(--olive);
  background: rgba(117, 129, 75, 0.06);
  cursor: move;
}
.shape-resize {
  position: fixed;
  z-index: 314;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 4px;
  background: var(--olive);
  border: 2px solid var(--cream);
  cursor: nwse-resize;
}

.shape-panel {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 320;
  width: 240px;
  padding: 16px;
  border-radius: 16px;
  background: var(--cream);
  border: 1px solid var(--sage-soft);
  box-shadow: 0 22px 50px -20px rgba(47, 51, 34, 0.55);
  font-family: var(--font-body);
  color: var(--ink);
}
.shape-panel[hidden] { display: none; }
.sp-head { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin-bottom: 12px; }
.sp-types { display: flex; gap: 6px; margin-bottom: 14px; }
.sp-type {
  flex: 1; padding: 7px 2px; border: 1px solid var(--sage-soft); border-radius: 8px;
  background: var(--paper); color: var(--ink-soft); font-weight: 700; font-size: 0.78rem; cursor: pointer;
}
.sp-type.is-on { background: var(--olive); color: var(--cream); border-color: var(--olive); }
.sp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 0.9rem; color: var(--ink-soft); font-weight: 600; }
.sp-row input[type="range"] { flex: 1; accent-color: var(--olive); }
.sp-row input[type="color"] { width: 52px; height: 30px; border: 1px solid var(--sage-soft); border-radius: 6px; background: none; cursor: pointer; padding: 0; }
.sp-actions { display: flex; gap: 8px; margin-top: 4px; }
.sp-actions button { border: none; border-radius: 999px; padding: 9px 14px; font-family: var(--font-body); font-weight: 700; font-size: 0.85rem; cursor: pointer; }
.sp-delete { background: transparent; color: var(--clay-text); border: 1px solid var(--sage-soft) !important; }
.sp-done { background: var(--olive); color: var(--cream); margin-left: auto; }

/* ============ Nav goal-scoring celebration ============ */
/* the whole scene sits in a band directly ABOVE the nav pill */
.goal-celebrate {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 82px;
  overflow: hidden;       /* clip the scrolling ticker to the bar's width */
  pointer-events: none;
  z-index: 6;
}
/* on the home page, drop the nav down during the celebration to make room
   above it, then it slides back up to dock when the animation ends */
.nav-wrap { transition: top 0.6s var(--ease); }
body[data-page="home"].celebrating .nav-wrap { top: 100px; }
/* phase 1 — the FIFA 26 splash pops in, holds, then pops away */
.ft-fifa-splash {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transform: scale(0.55);
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.18, 1.5, 0.5, 1);
}
.goal-celebrate.show-fifa .ft-fifa-splash { opacity: 1; transform: scale(1); }
.goal-celebrate.hide-fifa .ft-fifa-splash {
  opacity: 0;
  transform: scale(1.3);
  transition: opacity 0.32s ease, transform 0.32s ease;
}
.ft-fifa-splash .ft-cup { width: clamp(26px, 4vw, 40px); height: clamp(26px, 4vw, 40px); }
.ft-fifa-splash .ft-lead-txt { font-size: clamp(13px, 2.2vw, 17px); }
.ft-fifa-splash .ft-lead-txt b { font-size: clamp(18px, 3vw, 24px); }

/* phase 2 container — slides the whole strip downward at the very end */
.ft-track {
  position: absolute;
  inset: 0;
  transition: transform 0.6s var(--ease), opacity 0.55s var(--ease);
}
.goal-celebrate.dropping .ft-track { transform: translateY(130%); opacity: 0; }

/* the flag train is a marquee that scrolls every group across the bar once */
.flag-train {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: clamp(7px, 1.4vw, 12px);
  white-space: nowrap;
  will-change: transform;
  transform: translateX(calc(var(--loopW, 0px) * -1));
  opacity: 0;
}
.goal-celebrate.marching .flag-train {
  opacity: 1;
  animation: ft-march var(--dur, 30s) linear 1 forwards;
}
.ft-item { flex: 0 0 auto; display: flex; align-items: center; }

.ft-flag {
  position: relative;
  width: clamp(30px, 5vw, 50px);
  aspect-ratio: 3 / 2;
  border: 1px solid rgba(47, 51, 34, 0.25);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 5px 12px -5px rgba(47, 51, 34, 0.6);
}
.ft-flag svg { display: block; width: 100%; height: 100%; }
.ft-flag img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ft-item.ft-iraq .ft-flag { border-color: #d4af37; box-shadow: 0 0 11px 2px rgba(212, 175, 55, 0.75); }

/* win-draw-loss record overlaid on each flag */
.ft-wl {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(20, 22, 15, 0.76);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(8px, 1.4vw, 11px);
  line-height: 1;
  padding: 2px 5px;
  border-radius: 999px;
  white-space: nowrap;
}

/* group divider label */
.ft-group-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(9px, 1.5vw, 12px);
  letter-spacing: 0.06em;
  color: var(--olive);
  padding: 0 2px 0 10px;
}
.ft-group-label.ft-iraq-grp { color: #b8902a; }

/* FIFA World Cup 26 lead badge */
.ft-lead { gap: 7px; padding: 0 8px 0 4px; }
.ft-cup { width: clamp(18px, 3vw, 24px); height: clamp(18px, 3vw, 24px); flex: 0 0 auto; }
.ft-lead-txt {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(9px, 1.5vw, 11px);
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.ft-lead-txt b { color: #d4af37; font-size: clamp(11px, 1.8vw, 14px); font-weight: 700; }

@keyframes ft-march {
  from { transform: translateX(calc(var(--loopW, 0px) * -1)); }
  to   { transform: translateX(0); }
}
/* a little shorter on phones, but still shown (it scrolls, so it fits) */
@media (max-width: 560px) { .goal-celebrate { height: 60px; } body[data-page="home"].celebrating .nav-wrap { top: 84px; } }
@media (prefers-reduced-motion: reduce) { .goal-celebrate { display: none; } }

/* ============ Reveal animations ============ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.visible { transition-delay: var(--stagger, 0s); }

/* ============ Responsive ============ */
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 24px; }
  .split-aside h2 { position: static; }
  .feature-list { grid-template-columns: 1fr; gap: 28px; }
  .ruled-list a { grid-template-columns: 90px 1fr auto; gap: 16px; }
  .rl-role { font-size: 1.2rem; }
}

@media (max-width: 640px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .home-section { padding: 80px 0; }
  .page-hero { padding: 140px 0 60px; }
  .index-list a { grid-template-columns: 44px 1fr; }
  .il-tech { grid-column: 2; white-space: normal; }
  .ruled-list a { grid-template-columns: 1fr auto; }
  .rl-when { grid-column: 1 / -1; }
  .proj { grid-template-columns: 1fr; gap: 14px; }
  .cv-item { padding-left: 28px; }
  .scroll-hint { display: none; }
}

/* ============ Inline editing (local authoring tool) ============ */
.edit-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px 11px 14px;
  border: 1px solid var(--sage);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 14px 34px -16px rgba(63, 70, 41, 0.55);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.edit-toggle:hover { transform: translateY(-2px); }
.edit-toggle svg { width: 18px; height: 18px; }
.edit-toggle.active { background: var(--olive); color: var(--cream); border-color: var(--olive); }

.edit-ctl {
  position: fixed;
  z-index: 320;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--cream);
  box-shadow: 0 6px 16px -6px rgba(47, 51, 34, 0.6);
  transition: transform 0.15s var(--ease), filter 0.15s var(--ease);
}
.edit-ctl svg { width: 16px; height: 16px; }
.edit-ctl:hover { transform: scale(1.08); }
.edit-ctl:disabled { opacity: 0.6; cursor: default; }
.edit-pencil { background: var(--olive); }
.edit-save { background: var(--olive-deep); }
.edit-cancel { background: var(--clay-text); }
.edit-bg { background: var(--clay); color: var(--ink); }

/* section background popover */
.edit-bg-pop {
  position: fixed;
  z-index: 340;
  width: 250px;
  padding: 16px;
  border-radius: 16px;
  background: var(--cream);
  border: 1px solid var(--sage-soft);
  box-shadow: 0 22px 50px -20px rgba(47, 51, 34, 0.55);
  font-family: var(--font-body);
  color: var(--ink);
}
.edit-bg-pop[hidden] { display: none; }
.ebp-head { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin-bottom: 12px; }
.ebp-modes { display: flex; gap: 6px; margin-bottom: 14px; }
.ebp-mode {
  flex: 1; padding: 7px 4px; border: 1px solid var(--sage-soft); border-radius: 8px;
  background: var(--paper); color: var(--ink-soft); font-weight: 700; font-size: 0.82rem; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ebp-mode.is-on { background: var(--olive); color: var(--cream); border-color: var(--olive); }
.ebp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 0.9rem; color: var(--ink-soft); font-weight: 600; }
.ebp-row input[type="color"] { width: 52px; height: 30px; border: 1px solid var(--sage-soft); border-radius: 6px; background: none; cursor: pointer; padding: 0; }
.ebp-rowangle input[type="range"] { flex: 1; accent-color: var(--olive); }
.ebp-angleval { font-variant-numeric: tabular-nums; min-width: 38px; text-align: right; }
.ebp-hint { font-size: 0.78rem; color: var(--ink-soft); opacity: 0.8; line-height: 1.4; margin: 6px 0 14px; }
.ebp-actions { display: flex; gap: 8px; }
.ebp-actions button {
  border: none; border-radius: 999px; padding: 9px 14px; font-family: var(--font-body);
  font-weight: 700; font-size: 0.85rem; cursor: pointer;
}
.ebp-reset { background: transparent; color: var(--clay-text); border: 1px solid var(--sage-soft) !important; }
.ebp-cancel { background: var(--sage-soft); color: var(--ink); }
.ebp-save { background: var(--olive); color: var(--cream); margin-left: auto; }
.ebp-actions button:disabled { opacity: 0.6; cursor: default; }

/* highlight editable blocks while edit mode is on */
.edit-on [data-edit-index] { cursor: text; }
.edit-on [data-edit-index]:hover {
  outline: 1.5px dashed var(--sage);
  outline-offset: 4px;
  border-radius: 4px;
}
[data-edit-index].is-editing {
  outline: 2px solid var(--olive) !important;
  outline-offset: 4px;
  border-radius: 4px;
  background: rgba(183, 192, 155, 0.16);
  opacity: 1 !important;
  transform: none !important;
}

.edit-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 16px);
  z-index: 330;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.edit-toast.show { opacity: 1; transform: translate(-50%, 0); }
.edit-toast.err { background: var(--clay-text); }

@media (prefers-reduced-motion: reduce) {
  .edit-toggle, .edit-ctl, .edit-toast { transition: none; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint .wheel { animation: none; }
  .path-layer { display: none; }
}
