/* ==========================================================================
   Tanvir Israque · portfolio
   Palette: ledger green + marigold (taken from the portrait and project art)
   Type: Archivo (expanded for display, normal width for text) + IBM Plex Mono
   ========================================================================== */

:root {
  color-scheme: light;

  --bg: #F3F5F0;
  --bg-alt: #E8EDE6;
  --surface: #FFFFFF;
  --ink: #0E1D18;
  --ink-2: #34453E;
  --muted: #5B6B63;
  --line: #D3DCD3;
  --line-strong: #B4C3B8;
  --brand: #1E5B45;
  --brand-hover: #174A38;
  --brand-soft: #DCEBE2;
  --on-brand: #FFFFFF;
  --accent: #F2A516;
  --accent-text: #8F5500;
  --on-accent: #1B1300;
  --ok: #1E7A4F;

  /* SIMPLETREE product panel: deep green in both themes */
  --panel: #15301F;
  --panel-2: #1A3826;
  --panel-3: #21452F;
  --panel-ink: #EEF5EF;
  --panel-ink-2: #C5D7CB;
  --panel-muted: #93AE9E;
  --panel-line: #2D5039;
  --p-ok: #74D6A2;
  --p-warn: #F5B53D;
  --p-danger: #FF9470;

  --root-line: rgba(30, 91, 69, 0.26);
  --root-node: #E39B14;

  --shadow: 0 1px 2px rgba(14, 29, 24, 0.06), 0 18px 40px -18px rgba(14, 29, 24, 0.28);

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --fs-base: 1.0625rem;
  --fs-lg: clamp(1.35rem, 1.1rem + 1vw, 1.9rem);
  --fs-xl: clamp(2.25rem, 1.3rem + 3.6vw, 4.25rem);

  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1200px;
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #09130F;
    --bg-alt: #0D1B15;
    --surface: #10211A;
    --ink: #E9F1EB;
    --ink-2: #BFCEC5;
    --muted: #8EA298;
    --line: #1F352B;
    --line-strong: #2E4A3D;
    --brand: #6CCB9C;
    --brand-hover: #86D8AF;
    --brand-soft: #12301F;
    --on-brand: #04120C;
    --accent: #F5B53D;
    --accent-text: #F5B53D;
    --on-accent: #1B1300;
    --ok: #5FD095;
    --panel: #122A1B;
    --panel-2: #163220;
    --panel-3: #1D3F29;
    --panel-line: #29482F;
    --root-line: rgba(108, 203, 156, 0.2);
    --root-node: #F5B53D;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 44px -18px rgba(0, 0, 0, 0.7);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09130F;
  --bg-alt: #0D1B15;
  --surface: #10211A;
  --ink: #E9F1EB;
  --ink-2: #BFCEC5;
  --muted: #8EA298;
  --line: #1F352B;
  --line-strong: #2E4A3D;
  --brand: #6CCB9C;
  --brand-hover: #86D8AF;
  --brand-soft: #12301F;
  --on-brand: #04120C;
  --accent: #F5B53D;
  --accent-text: #F5B53D;
  --on-accent: #1B1300;
  --ok: #5FD095;
  --panel: #122A1B;
  --panel-2: #163220;
  --panel-3: #1D3F29;
  --panel-line: #29482F;
  --root-line: rgba(108, 203, 156, 0.2);
  --root-node: #F5B53D;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 44px -18px rgba(0, 0, 0, 0.7);
}

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

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: 1.1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }

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

.wrap { width: min(var(--maxw), 100% - 2 * var(--gutter)); margin-inline: auto; }

.icon { width: 1.1em; height: 1.1em; flex: none; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px;
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

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

.display {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.92;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.7em;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-text);
}
.eyebrow::before { content: ""; width: 0.6em; height: 0.6em; background: currentColor; }

.label {
  font-family: var(--font-mono);
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
}

.statement {
  font-size: var(--fs-lg);
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  padding: 0.85em 1.25em;
  border: 1px solid transparent; border-radius: 10px;
  font-size: 0.95rem; font-weight: 600; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-hover); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: #FFC24F; }
.btn--small { padding: 0.6em 0.9em; font-size: 0.85rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-weight: 600; color: var(--ink); text-decoration: none;
  padding-block: 0.4em;
  border-bottom: 1.5px solid var(--line-strong);
  transition: border-color 0.2s, gap 0.2s var(--ease);
}
.link-arrow:hover { border-color: var(--accent); gap: 0.7em; }

.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.icon-btn:hover { border-color: var(--line-strong); }

/* ---------- Scroll progress ---------- */

.progress {
  position: fixed; left: 0; right: 0; top: env(safe-area-inset-top, 0px);
  height: 2px; z-index: 60; pointer-events: none;
}
.progress span {
  display: block; height: 100%; background: var(--accent);
  transform-origin: left; transform: scaleX(0);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header__inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
.brand__mark { display: block; width: 36px; height: 36px; flex: none; }
.brand__logo { display: block; width: 100%; height: 100%; }
.brand__logo .lg-ink { fill: var(--brand); }
.brand__logo .lg-cut { fill: var(--bg); }
.brand__logo .lg-win { fill: var(--accent); }
.brand__name { font-size: 0.98rem; letter-spacing: -0.01em; }

.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a {
  position: relative;
  padding: 8px 11px; border-radius: 8px;
  color: var(--muted); text-decoration: none;
  font-size: 0.92rem; font-weight: 500;
  transition: color 0.2s;
}
.nav a:hover { color: var(--ink); }
.nav a.is-active { color: var(--ink); }
.nav a.is-active::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 2px;
  height: 2px; background: var(--accent);
}

.header-actions { display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; }

@media (max-width: 1060px) {
  .menu-btn { display: grid; }
  .header-actions { margin-left: auto; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    margin: 0; padding: 8px var(--gutter) 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a:last-child { border-bottom: 0; }
  .nav a.is-active::after { left: auto; right: 4px; top: 50%; bottom: auto; width: 8px; height: 8px; transform: translateY(-50%); }
}
@media (max-width: 400px) {
  .brand__name { display: none; }
}

/* ---------- Load + reveal motion ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.load { animation: rise 0.9s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 60ms); }
.reveal-in { animation: rise 0.8s var(--ease) both; animation-delay: var(--d, 0ms); }

/* ---------- Sections ---------- */

.section { --section-bg: var(--bg); padding-block: clamp(72px, 10vw, 136px); }
.section--alt { --section-bg: var(--bg-alt); background: var(--bg-alt); }
.section--tight { padding-block: clamp(56px, 7vw, 96px); }

.sec-head { display: grid; gap: 16px; margin-bottom: clamp(36px, 5vw, 60px); max-width: 62rem; }
.sec-head .display { font-size: var(--fs-xl); }
.sec-head .statement { max-width: 40ch; }

/* ---------- Hero ---------- */

.hero { position: relative; overflow: clip; padding-block: clamp(40px, 7vw, 92px) clamp(40px, 5vw, 64px); }
.hero__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent 97%);
  mask-image: linear-gradient(to bottom, #000 58%, transparent 97%);
}
.hero > .wrap { position: relative; }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}

.status-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2); font-size: 0.85rem; font-weight: 500;
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 2.6s infinite; }

.hero__copy > :first-child { margin-top: 0; }
.hero__title { margin-top: 26px; font-size: clamp(3.3rem, 1.2rem + 8.2vw, 7rem); }
.hero__title span { display: block; }
.hero__title .l2 { color: var(--brand); }

.hero__role { margin-top: 18px; }
.hero__tagline {
  margin-top: 26px;
  font-size: var(--fs-lg); font-weight: 650; font-stretch: 110%;
  letter-spacing: -0.015em; color: var(--ink);
}
.hero__lede { margin-top: 14px; max-width: 54ch; font-size: 1.08rem; }
.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 30px; }

.portrait { position: relative; margin: 0; width: min(100%, 460px); justify-self: end; }
.portrait__frame {
  position: relative; aspect-ratio: 4 / 5;
  border-radius: 22px; overflow: hidden;
  background: #3E3833;
  box-shadow: 0 1px 0 1px color-mix(in srgb, var(--ink) 6%, transparent), 0 40px 70px -34px rgba(14, 29, 24, 0.6);
}
.portrait__frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.portrait__frame img { transform-origin: 54% 32%; animation: kenburns 26s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.1); } }
/* soft breathing light over the photo's spotlight (measured: centre 52.25% / 29.5%, radius 32.25% of width) */
.portrait__glow {
  position: absolute; left: 20%; top: 3.7%; width: 64.5%; aspect-ratio: 1;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 246, 226, 0.7), rgba(255, 246, 226, 0) 72%);
  mix-blend-mode: screen;
  animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: 0.1; transform: scale(0.94); } 50% { opacity: 0.6; transform: scale(1.05); } }

/* profile badge: the round headshot with the rotating ring, pinned to the cover's empty top-left corner */
.badge {
  position: absolute; top: 0; left: 0; z-index: 2;
  width: 46%; aspect-ratio: 1;
  transform: translate(-42%, -24%);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 24px 48px -22px rgba(14, 29, 24, 0.55);
}
.badge__ring { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--ink-2); animation: spin 40s linear infinite; }
.badge__ring text { font-family: var(--font-mono); font-size: 5.2px; font-weight: 600; fill: currentColor; }
.badge__img {
  position: absolute; inset: 17%;
  border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, #F2AE86, #F8D86A);
}
.badge__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.085); }
.badge__orbit { position: absolute; inset: -5%; border-radius: 50%; animation: spin 11s linear infinite reverse; pointer-events: none; }
.badge__orbit i {
  position: absolute; top: -6px; left: 50%;
  width: 12px; height: 12px; margin-left: -6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent);
}

.figures {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(44px, 6vw, 80px) 0 0; padding: 0; list-style: none;
  border-top: 1px solid var(--line);
}
.figure { padding: 22px 20px 6px 20px; border-left: 1px solid var(--line); }
.figure:first-child { padding-left: 0; border-left: 0; }
.figure__value {
  display: block;
  font-family: var(--font-display); font-stretch: 125%; font-weight: 750;
  font-size: clamp(2rem, 1.3rem + 2.3vw, 3.1rem);
  line-height: 1; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.figure__label { display: block; margin-top: 10px; font-size: 0.9rem; color: var(--muted); }

@media (max-width: 880px) {
  .hero__canvas { display: none; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .portrait { justify-self: center; width: min(100%, 420px); margin-top: 56px; }
  .badge { width: 40%; transform: translate(-6%, -34%); }
  .hero__title { margin-top: 20px; }
}
@media (max-width: 720px) {
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figure { padding: 18px 0 18px 16px; }
  .figure:nth-child(odd) { padding-left: 0; border-left: 0; }
  .figure:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* ---------- About ---------- */

.about__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(36px, 6vw, 96px); }
.about .sec-head { margin-bottom: 28px; }
.about .statement { font-size: clamp(1.6rem, 1.15rem + 1.7vw, 2.5rem); max-width: 26ch; }
.about__body { display: grid; gap: 18px; max-width: 64ch; font-size: 1.08rem; }

.facts { margin: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { padding-top: 3px; }
.facts dd { margin: 0; color: var(--ink); font-weight: 500; }

.method {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  margin: clamp(48px, 7vw, 88px) 0 0; padding: 0; list-style: none;
}
.method li { position: relative; padding-top: 20px; border-top: 2px solid var(--ink); }
.method li:not(:last-child)::after {
  content: ""; position: absolute; top: -7px; right: 0;
  width: 12px; height: 12px;
  border-top: 2px solid var(--ink); border-right: 2px solid var(--ink);
  transform: rotate(45deg);
}
.method h3 { margin-top: 8px; font-size: 1.35rem; font-stretch: 112%; font-weight: 750; }
.method p { margin-top: 8px; color: var(--ink-2); }

@media (max-width: 880px) {
  .about__grid, .method { grid-template-columns: minmax(0, 1fr); }
  .method li:not(:last-child)::after { display: none; }
}

/* ---------- SIMPLETREE panel ---------- */

.panel-section {
  position: relative; overflow: clip;
  padding-block: clamp(72px, 10vw, 136px);
  background: var(--panel); color: var(--panel-ink-2);
}
.panel-section .eyebrow { color: var(--p-warn); }
.panel-section .label { color: var(--panel-muted); }

.st-top { display: grid; gap: 14px; margin-bottom: clamp(20px, 3vw, 36px); }
.st-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; gap: clamp(28px, 5vw, 72px); }
.st-head__copy { display: grid; gap: 18px; }
.st-title { font-size: clamp(2.2rem, 0.6rem + 8.4vw, 8.5rem); color: var(--panel-ink); }
.st-formerly { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.06em; color: var(--panel-muted); }
.st-headline { font-size: var(--fs-lg); font-weight: 500; line-height: 1.28; color: var(--panel-ink); max-width: 30ch; }
.st-intro { max-width: 62ch; }

.st-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 6px 0 0; }
.st-meta div { padding: 12px 0; border-top: 1px solid var(--panel-line); }
.st-meta dd { margin: 4px 0 0; color: var(--panel-ink); font-weight: 500; }

.st-figure { margin: 0; }
.st-figure img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  -webkit-mask-image: radial-gradient(closest-side, #000 60%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 60%, transparent 100%);
}

@media (max-width: 880px) {
  .st-head { grid-template-columns: minmax(0, 1fr); }
  .st-figure { order: -1; max-width: 420px; }
}

/* ----- Journey explorer ----- */

.journey {
  margin-top: clamp(48px, 7vw, 88px);
  border: 1px solid var(--panel-line); border-radius: 18px;
  background: var(--panel-2);
  overflow: hidden;
}
.journey__top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--panel-line);
}
.journey__heading { color: var(--panel-ink); font-size: 1.05rem; font-weight: 600; }
.journey__toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--panel-line); border-radius: 8px;
  background: transparent; color: var(--panel-ink-2);
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em;
  cursor: pointer;
}
.journey__toggle:hover { border-color: var(--panel-muted); color: var(--panel-ink); }
.journey__toggle .icon { width: 0.95em; height: 0.95em; }

.journey__tabs {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--panel-line);
}
.jtab {
  position: relative;
  display: grid; gap: 4px; align-content: start;
  padding: 16px 18px 20px;
  border: 0; border-right: 1px solid var(--panel-line);
  background: transparent; color: var(--panel-muted);
  text-align: left; cursor: pointer;
  transition: background-color 0.25s, color 0.25s;
}
.jtab:last-child { border-right: 0; }
.jtab:hover { color: var(--panel-ink-2); background: color-mix(in srgb, var(--panel-3) 50%, transparent); }
.jtab[aria-selected="true"] { color: var(--panel-ink); background: var(--panel-3); }
.jtab__n { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; }
.jtab__t { font-weight: 600; font-size: 0.98rem; line-height: 1.25; }
.jtab__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.jtab__bar i { display: block; width: 100%; height: 100%; background: var(--p-warn); transform-origin: left; transform: scaleX(0); }
.jtab[aria-selected="true"] .jtab__bar i { transform: scaleX(1); }
.journey.is-playing .jtab[aria-selected="true"] .jtab__bar i { animation: fillbar var(--dur, 8s) linear both; }
.journey.is-paused .jtab__bar i { animation-play-state: paused !important; }
@keyframes fillbar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.jpanel {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(24px, 4vw, 52px);
  padding: clamp(16px, 4vw, 44px);
}
.jpanel__copy { display: grid; gap: 14px; align-content: start; }
.jpanel__title { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.35rem); font-stretch: 115%; font-weight: 780; color: var(--panel-ink); letter-spacing: -0.02em; }
.jpanel__summary { font-size: 1.06rem; color: var(--panel-ink-2); }
.jpanel__points { display: grid; gap: 10px; margin: 6px 0 0; padding: 0; list-style: none; }
.jpanel__points li { display: flex; gap: 10px; align-items: baseline; color: var(--panel-ink); }
.jpanel__points .icon { color: var(--p-warn); transform: translateY(2px); }

.jpanel.is-live .jpanel__copy > * { animation: rise 0.6s var(--ease) both; }
.jpanel.is-live .jpanel__copy > :nth-child(2) { animation-delay: 60ms; }
.jpanel.is-live .jpanel__copy > :nth-child(3) { animation-delay: 120ms; }
.jpanel.is-live .jpanel__copy > :nth-child(4) { animation-delay: 180ms; }

@media (max-width: 880px) {
  .journey__tabs {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr);
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .journey__tabs::-webkit-scrollbar { display: none; }
  .jtab { scroll-snap-align: start; }
  .jpanel { grid-template-columns: minmax(0, 1fr); }
}

/* ----- Mini product screens (illustrative) ----- */

.mini {
  display: flex; flex-direction: column;
  min-height: 360px;
  border: 1px solid var(--panel-line); border-radius: 14px;
  background: var(--panel);
  color: var(--panel-ink-2); font-size: 0.88rem;
  overflow: hidden;
}
.mini__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--panel-line);
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.05em; color: var(--panel-muted);
}
.mini__tag { padding: 2px 8px; border: 1px dashed var(--panel-line); border-radius: 6px; white-space: nowrap; }
.mini__body { display: grid; gap: 14px; align-content: start; flex: 1; padding: 16px; }
.mini b { color: var(--panel-ink); font-weight: 600; }
.mini small { display: block; color: var(--panel-muted); font-size: 0.78rem; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 6px;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.02em;
  white-space: nowrap;
}
.chip--ok { color: var(--p-ok); background: color-mix(in srgb, var(--p-ok) 14%, transparent); }
.chip--warn { color: var(--p-warn); background: color-mix(in srgb, var(--p-warn) 15%, transparent); }
.chip--danger { color: var(--p-danger); background: color-mix(in srgb, var(--p-danger) 15%, transparent); }
.chip--muted { color: var(--panel-muted); background: color-mix(in srgb, var(--panel-muted) 12%, transparent); }

/* Stage 1: first contact */
.leadcard { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border-radius: 10px; background: var(--panel-2); }
.avatar {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: #F2AE86; color: #2A1606; font-weight: 700; font-size: 0.8rem;
}
.leadcard time { font-family: var(--font-mono); font-size: 0.75rem; color: var(--panel-muted); }

.flow { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.flow li { position: relative; display: flex; gap: 12px; align-items: center; padding: 9px 0; color: var(--panel-ink); }
.flow li:not(:last-child)::before {
  content: ""; position: absolute; left: 8px; top: 28px; bottom: -8px; width: 2px; background: var(--panel-line);
}
.flow__dot {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: var(--p-ok); color: var(--panel);
}
.flow__dot .icon { width: 11px; height: 11px; stroke-width: 3; }
.is-live .flow li { animation: flowText 0.45s var(--ease) both; animation-delay: calc(var(--i) * 520ms + 250ms); }
.is-live .flow__dot { animation: flowDot 0.45s var(--ease) both; animation-delay: calc(var(--i) * 520ms + 250ms); }
@keyframes flowText { from { opacity: 0.35; transform: translateX(-4px); } to { opacity: 1; transform: none; } }
@keyframes flowDot { from { background: transparent; box-shadow: inset 0 0 0 2px var(--panel-line); color: transparent; } to { background: var(--p-ok); box-shadow: none; } }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kpis div { padding: 10px 12px; border: 1px solid var(--panel-line); border-radius: 10px; }
.kpis b { display: block; font-family: var(--font-display); font-stretch: 125%; font-size: 1.4rem; line-height: 1.1; font-variant-numeric: tabular-nums; }

/* Stage 2: understanding */
.voice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border-radius: 10px; background: var(--panel-2); }
.voice__play { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--p-warn); color: var(--on-accent); }
.voice__play .icon { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.voice__meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--panel-muted); white-space: nowrap; }
.wave { display: flex; align-items: center; gap: 3px; height: 34px; overflow: hidden; }
.wave i { flex: 1; min-width: 2px; height: var(--h); border-radius: 2px; background: var(--panel-ink-2); opacity: 0.75; transform-origin: center; }
.is-live .wave i { animation: wave 1.1s ease-in-out infinite alternate; animation-delay: calc(var(--k) * -73ms); }
@keyframes wave { from { transform: scaleY(0.35); } to { transform: scaleY(1); } }

.polish { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.05em; color: var(--p-warn); }
.polish .icon { width: 14px; height: 14px; }

.note { padding: 14px; border: 1px solid var(--panel-line); border-radius: 10px; display: grid; gap: 12px; }
.note p { color: var(--panel-ink); font-size: 0.95rem; line-height: 1.5; }
.is-live .note p { animation: rise 0.6s var(--ease) both; animation-delay: 0.7s; }
.note__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.review { position: relative; display: inline-grid; }
.review > * { grid-area: 1 / 1; }
.review .pending { opacity: 0; }
.is-live .review .pending { animation: swapOut 2.6s steps(1, end) both; }
.is-live .review .done { animation: swapIn 2.6s steps(1, end) both; }
@keyframes swapOut { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes swapIn { 0% { opacity: 0; } 100% { opacity: 1; } }
.next { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); color: var(--panel-ink); }
.next .icon { color: var(--p-warn); }

/* Stage 3: deciding (stacking plan) */
.stack-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.stack { display: grid; grid-template-columns: 2.2rem repeat(4, minmax(0, 1fr)); gap: 5px; align-items: center; }
.stack__label { font-family: var(--font-mono); font-size: 0.66rem; color: var(--panel-muted); text-align: center; }
.unit {
  height: 24px; padding: 0;
  border: 1px solid transparent; border-radius: 4px;
  font-family: var(--font-mono); font-size: 0.64rem; font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background-color 0.4s, color 0.4s, border-color 0.4s;
}
.unit:hover, .unit:focus-visible { transform: scale(1.06); }
.unit.av { background: transparent; border-color: color-mix(in srgb, var(--p-ok) 55%, transparent); color: var(--p-ok); }
.unit.bk { background: var(--p-warn); color: #231800; }
.unit.sd { background: #2F5B43; color: #B9D5C3; }
.unit.flash { animation: unitFlash 1.4s var(--ease); }
@keyframes unitFlash { 0% { box-shadow: 0 0 0 0 var(--p-warn); } 100% { box-shadow: 0 0 0 10px transparent; } }
.stack__readout {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 34px; padding: 8px 12px;
  border-radius: 8px; background: var(--panel-2);
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--panel-ink);
}
.fake-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 9px; border: 1px solid var(--panel-line); border-radius: 6px;
  color: var(--panel-ink-2); font-size: 0.7rem;
}
.fake-btn .icon { width: 12px; height: 12px; }

/* Stage 4: becoming a client */
.customer { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; }
.customer .chips-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ledger-wrap { overflow-x: auto; }
.ledger { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ledger th {
  padding: 0 8px 8px; text-align: left;
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--panel-muted);
}
.ledger td { padding: 8px; border-top: 1px solid var(--panel-line); color: var(--panel-ink); white-space: nowrap; }
.ledger th.num { text-align: right; }
.ledger td.num { text-align: right; font-family: var(--font-mono); font-size: 0.8rem; }
.ledger td:first-child, .ledger th:first-child { padding-left: 0; }
.ledger td:last-child, .ledger th:last-child { padding-right: 0; text-align: right; }
.is-live .ledger tr.overdue .chip { animation: pulseChip 1.6s ease-in-out 3; }
@keyframes pulseChip { 50% { background: color-mix(in srgb, var(--p-danger) 32%, transparent); } }
@media (max-width: 520px) {
  .mini__body { padding: 14px; }
  .ledger thead { display: none; }
  .ledger, .ledger tbody { display: block; }
  .ledger tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; padding: 9px 0; border-top: 1px solid var(--panel-line); }
  .ledger td { padding: 0 !important; border: 0; }
  .ledger td:nth-child(1) { grid-area: 1 / 1; }
  .ledger td:nth-child(2) { grid-area: 2 / 1; color: var(--panel-muted); font-size: 0.78rem; }
  .ledger td:nth-child(3) { grid-area: 1 / 2; }
  .ledger td:nth-child(4) { grid-area: 2 / 2; text-align: right; }
}
.ledger-sum { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 4px; font-family: var(--font-mono); font-size: 0.76rem; color: var(--panel-muted); }
.ledger-sum b { font-family: var(--font-mono); }

/* Stage 5: journey continues */
.project-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.mbar { height: 8px; border-radius: 99px; background: var(--panel-line); overflow: hidden; }
.mbar i { display: block; height: 100%; width: var(--p); border-radius: inherit; background: linear-gradient(90deg, var(--p-ok), var(--p-warn)); transform-origin: left; }
.is-live .mbar i { animation: grow 1.4s var(--ease) both 0.2s; }
@keyframes grow { from { transform: scaleX(0); } }
.milestones { display: grid; margin: 0; padding: 0; list-style: none; }
.milestones li { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; color: var(--panel-ink); }
.milestones li:not(:last-child)::before { content: ""; position: absolute; left: 8px; top: 26px; bottom: -8px; width: 2px; background: var(--panel-line); }
.milestones .m-dot { position: relative; z-index: 1; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; }
.milestones .m-done .m-dot { background: var(--p-ok); color: var(--panel); }
.milestones .m-done .m-dot .icon { width: 11px; height: 11px; stroke-width: 3; }
.milestones .m-now .m-dot { background: var(--panel); box-shadow: inset 0 0 0 3px var(--p-warn); }
.milestones .m-next .m-dot { background: var(--panel); box-shadow: inset 0 0 0 2px var(--panel-line); }
.milestones .m-next { color: var(--panel-muted); }
.is-live .milestones .m-now .m-dot { animation: ring 1.8s ease-out infinite; }
@keyframes ring { 0% { outline: 0 solid color-mix(in srgb, var(--p-warn) 50%, transparent); } 100% { outline: 10px solid transparent; } }

/* ----- Demo strip ----- */

.demo {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: 20px 32px;
  margin-top: clamp(24px, 4vw, 40px);
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--panel-line); border-radius: 18px;
  background: var(--panel-2);
}
.demo__copy { display: grid; gap: 6px; }
.demo__title { color: var(--panel-ink); font-size: 1.3rem; font-stretch: 112%; font-weight: 750; }
.demo__creds { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.cred {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--panel-line); border-radius: 10px;
  background: var(--panel);
}
.cred .label { font-size: 0.65rem; }
.cred code { font-family: var(--font-mono); font-size: 0.9rem; color: var(--panel-ink); user-select: all; }
.cred button {
  display: grid; place-items: center; width: 30px; height: 30px;
  border: 0; border-radius: 7px; background: var(--panel-3); color: var(--panel-ink);
  cursor: pointer;
}
.cred button:hover { background: var(--panel-line); }
.cred button .icon { width: 15px; height: 15px; }
.demo__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

@media (max-width: 880px) {
  .demo { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- How it's built ---------- */

.built { display: grid; gap: clamp(40px, 6vw, 72px); }
.built__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.built__head h2 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); font-stretch: 115%; font-weight: 800; letter-spacing: -0.02em; }

.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin: 0; padding: 0; list-style: none; }
.principles li { display: grid; gap: 10px; align-content: start; }
.principles h3 { font-size: clamp(1.4rem, 1rem + 1.3vw, 1.9rem); font-weight: 650; letter-spacing: -0.02em; }

.foundation { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.foundation li { padding: 22px 24px 4px; border-left: 1px solid var(--line); }
.foundation li:first-child { padding-left: 0; border-left: 0; }
.foundation h3 { font-size: 1.1rem; margin-bottom: 8px; }
.foundation p { font-size: 0.95rem; }

.stackline { display: grid; gap: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tag {
  padding: 5px 10px;
  border: 1px solid var(--line-strong); border-radius: 6px;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink);
}
.roadmap { font-size: 0.95rem; color: var(--muted); }

@media (max-width: 880px) {
  .principles, .foundation { grid-template-columns: minmax(0, 1fr); }
  .foundation li { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Experience ---------- */

.timeline { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.job { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 12px 40px; padding: clamp(24px, 4vw, 40px) 0; border-bottom: 1px solid var(--line); }
.job__period { display: grid; gap: 8px; align-content: start; padding-top: 6px; }
.job__period time, .job__period span:first-child { font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink); }
.now-chip { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ok); }
.now-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 2.6s infinite; }
.job__role { font-size: clamp(1.35rem, 1rem + 1.2vw, 1.8rem); font-stretch: 112%; font-weight: 780; letter-spacing: -0.02em; }
.job__org { margin-top: 6px; color: var(--ink); font-weight: 500; }
.job__detail { color: var(--muted); font-size: 0.93rem; }
.job__points { display: grid; gap: 9px; max-width: 72ch; margin: 16px 0 0; padding: 0; list-style: none; }
.job__points li { position: relative; padding-left: 22px; }
.job__points li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 10px; height: 2px; background: var(--accent); }
.job__points b { color: var(--ink); font-weight: 600; }
.job__points a { color: var(--brand); font-weight: 650; text-underline-offset: 3px; }

@media (max-width: 760px) {
  .job { grid-template-columns: minmax(0, 1fr); }
  .job__period { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 0; }
}

/* ---------- Projects ---------- */

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card__media { aspect-ratio: 4 / 3; background: #16311F; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
.card__body { display: flex; flex: 1; flex-direction: column; gap: 12px; padding: 22px 22px 24px; }
.card__meta { display: flex; justify-content: space-between; gap: 12px; }
.card__title { font-size: 1.65rem; font-stretch: 120%; font-weight: 800; letter-spacing: -0.02em; }
.card__summary { color: var(--ink); font-weight: 500; }
.card__points { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; font-size: 0.94rem; }
.card__points li { position: relative; padding-left: 18px; }
.card__points li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 8px; height: 2px; background: var(--accent); }
.card__points b { color: var(--ink); }
.card__foot { display: grid; gap: 14px; margin-top: auto; padding-top: 6px; }
.card__foot .tags .tag { font-size: 0.72rem; border-color: var(--line); color: var(--ink-2); }
.card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.card__link { font-size: 0.92rem; }
.card__actions .btn .icon { width: 1.05em; height: 1.05em; }

@media (max-width: 1000px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .card__media { aspect-ratio: auto; min-height: 100%; }
}
@media (max-width: 640px) {
  .card { display: flex; }
  .card__media { aspect-ratio: 4 / 3; min-height: 0; }
}

/* ---------- Deck library ---------- */

.deck-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 clamp(24px, 3vw, 36px); }
.filter {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: transparent; color: var(--ink);
  font-size: 0.92rem; font-weight: 550;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.filter:hover { border-color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.filter__count { font-family: var(--font-mono); font-size: 0.72rem; opacity: 0.7; font-variant-numeric: tabular-nums; }

.decks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr)); gap: clamp(16px, 2vw, 24px); }
.deck {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s;
}
.deck:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.deck__cover { position: relative; display: block; aspect-ratio: 16 / 9; background: #0E1D18; overflow: hidden; cursor: pointer; }
.deck__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.deck:hover .deck__cover img { transform: scale(1.04); }
.deck__count {
  position: absolute; right: 10px; bottom: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 9px; border-radius: 7px;
  background: rgba(9, 19, 15, 0.8); color: #EEF5EF;
  font-family: var(--font-mono); font-size: 0.7rem;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.deck__count .icon { width: 13px; height: 13px; }
.deck__body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px 18px 18px; }
.deck__meta { display: flex; justify-content: space-between; gap: 8px; width: 100%; }
.deck__title { font-size: 1.22rem; font-stretch: 112%; font-weight: 760; letter-spacing: -0.01em; }
.deck__context { font-size: 0.86rem; color: var(--muted); }
.deck__context b { color: var(--ink-2); font-weight: 600; }
.deck__summary { font-size: 0.93rem; }
.deck__stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; }
.deck__stats div { padding: 5px 9px; border-radius: 7px; background: var(--brand-soft); }
.deck__stats dt { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.deck__stats dd { margin: 0; color: var(--ink); font-size: 0.86rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.deck__open { margin-top: auto; padding-top: 10px; background: none; border-top: 0; border-left: 0; border-right: 0; font-size: 0.92rem; cursor: pointer; }

/* ---------- Slide viewer ---------- */

html.viewer-open { overflow: hidden; }

.viewer {
  width: min(1180px, 100vw - 32px); max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid #29482F; border-radius: 18px;
  background: #0B1712; color: #C9DACF;
  overflow: hidden;
}
.viewer[open] { display: flex; flex-direction: column; animation: viewerIn 0.28s var(--ease); }
.viewer::backdrop { background: rgba(4, 10, 8, 0.84); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@keyframes viewerIn { from { opacity: 0; transform: translateY(12px) scale(0.985); } }

.viewer__top { display: flex; align-items: center; gap: 16px; padding: 12px 14px 12px 22px; border-bottom: 1px solid #1F3A2B; }
.viewer__heading { flex: 1; min-width: 0; }
.viewer__context { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: #93AE9E; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer__title { margin-top: 2px; color: #EEF5EF; font-size: 1.15rem; font-stretch: 112%; font-weight: 760; }
.viewer__count { font-family: var(--font-mono); font-size: 0.82rem; color: #C9DACF; font-variant-numeric: tabular-nums; white-space: nowrap; }
.viewer .icon-btn { background: #15301F; border-color: #29482F; color: #EEF5EF; }

.viewer__stage { position: relative; display: grid; place-items: center; flex: 1; min-height: 0; padding: 18px 72px 14px; touch-action: pan-y; }
.viewer__figure { display: grid; justify-items: center; gap: 12px; width: 100%; margin: 0; }
.viewer__img {
  display: block; width: auto; max-width: 100%;
  max-height: calc(100dvh - 290px);
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.9);
  transition: filter 0.3s;
}
.viewer__stage.is-loading .viewer__img { filter: blur(2px) saturate(0.9); }
.viewer__caption { max-width: 70ch; text-align: center; font-size: 0.95rem; color: #D6E4DB; }
.viewer__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid #29482F; background: #15301F; color: #EEF5EF;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
}
.viewer__nav:hover:not(:disabled) { background: #21452F; }
.viewer__nav:disabled { opacity: 0.3; cursor: default; }
.viewer__nav--prev { left: 14px; }
.viewer__nav--next { right: 14px; }

.viewer__thumbs { display: flex; gap: 8px; padding: 12px 16px 16px; overflow-x: auto; border-top: 1px solid #1F3A2B; scrollbar-width: thin; scrollbar-color: #29482F transparent; }
.viewer__thumb {
  flex: none; width: 108px; aspect-ratio: 16 / 9; padding: 0;
  border: 2px solid transparent; border-radius: 7px;
  background: #15301F; overflow: hidden;
  opacity: 0.55; cursor: pointer;
  transition: opacity 0.2s, border-color 0.2s;
}
.viewer__thumb img { width: 100%; height: 100%; object-fit: cover; }
.viewer__thumb:hover { opacity: 0.85; }
.viewer__thumb[aria-current="true"] { border-color: #F5B53D; opacity: 1; }

@media (max-width: 700px) {
  .viewer { width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  .viewer__top { padding: 10px 10px 10px 16px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
  .viewer__stage { padding: 12px 10px 76px; }
  .viewer__img { max-height: calc(100dvh - 300px); }
  .viewer__nav { top: auto; bottom: 14px; transform: none; }
  .viewer__nav--prev { left: calc(50% - 58px); }
  .viewer__nav--next { right: calc(50% - 58px); }
  .viewer__thumbs { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .viewer__thumb { width: 88px; }
}

/* ---------- Research ---------- */

.research__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: end; }
.research__head .sec-head { margin-bottom: 0; }
.research__thesis { display: grid; gap: 12px; }
.research__thesis p:not(.label) { font-size: var(--fs-lg); font-weight: 500; line-height: 1.3; color: var(--ink); letter-spacing: -0.01em; }

.sapsf { margin-top: clamp(48px, 7vw, 80px); }
.phases { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin: 16px 0 0; padding: 0; list-style: none; }
.phase {
  position: relative;
  display: grid; gap: 8px; align-content: start;
  padding: 18px 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px;
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.phase:hover { border-color: var(--brand); transform: translateY(-3px); }
.phase:not(:last-child)::after {
  content: ""; position: absolute; right: -11px; top: 30px; z-index: 1;
  width: 8px; height: 8px;
  border-top: 2px solid var(--line-strong); border-right: 2px solid var(--line-strong);
  transform: rotate(45deg);
}
.phase__n { font-family: var(--font-display); font-stretch: 125%; font-weight: 800; font-size: 2.1rem; line-height: 1; color: var(--accent-text); }
.phase__name { font-weight: 700; color: var(--ink); line-height: 1.25; }
.phase__text { font-size: 0.9rem; }
.loop {
  position: relative;
  margin: 10px 10% 0; height: 22px;
  border: 2px dashed var(--line-strong); border-top: 0;
  border-radius: 0 0 14px 14px;
}
.loop span {
  position: absolute; left: 50%; bottom: -0.8em; transform: translateX(-50%);
  padding: 0 10px; background: var(--section-bg, var(--bg)); white-space: nowrap;
}

.research__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); margin-top: clamp(48px, 7vw, 80px); }
.research__cols h3 { margin-bottom: 12px; }
.hypo { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.hypo li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.hypo b { font-family: var(--font-mono); font-weight: 600; color: var(--accent-text); }
.methods { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.research__note {
  display: flex; gap: 14px; align-items: flex-start;
  margin-top: 22px; padding: 18px 20px;
  border-radius: 14px; background: var(--brand-soft); color: var(--ink);
}
.research__note .icon { color: var(--brand); width: 1.4em; height: 1.4em; margin-top: 2px; }
.research__note a { color: var(--brand); font-weight: 650; text-underline-offset: 3px; }

@media (max-width: 960px) {
  .research__head, .research__cols { grid-template-columns: minmax(0, 1fr); }
  .phases { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .phase { grid-template-columns: 2.6rem minmax(0, 1fr); column-gap: 14px; }
  .phase__n { grid-row: span 2; }
  .phase:not(:last-child)::after { right: auto; left: 30px; top: auto; bottom: -11px; transform: rotate(135deg); }
  .loop { display: none; }
}

/* ---------- Education ---------- */

.edu-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.edu { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.edu li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.edu__school { font-size: 1.2rem; font-weight: 700; color: var(--ink); }
.edu__degree { color: var(--ink-2); }
.edu__period { margin-top: 4px; }
.edu__score {
  grid-row: 1 / span 3; grid-column: 2;
  text-align: right;
  font-family: var(--font-display); font-stretch: 125%; font-weight: 800;
  font-size: clamp(1.8rem, 1.3rem + 1.4vw, 2.5rem); line-height: 1;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.edu__score small { display: block; margin-top: 8px; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 400; font-stretch: 100%; letter-spacing: 0.04em; color: var(--muted); }
.edu__note { grid-column: 1 / -1; margin-top: 6px; max-width: 70ch; font-size: 0.93rem; color: var(--muted); }

.ielts { padding: clamp(20px, 3vw, 28px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.ielts__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.ielts__overall { font-family: var(--font-display); font-stretch: 125%; font-weight: 800; font-size: 3.6rem; line-height: 0.9; color: var(--ink); }
.ielts__cefr { display: grid; gap: 4px; justify-items: end; text-align: right; }
.ielts__cefr strong { padding: 4px 10px; border-radius: 6px; background: var(--brand); color: var(--on-brand); font-family: var(--font-mono); font-size: 0.85rem; }
.bands { display: grid; gap: 4px; margin: 14px 0 0; padding: 0; list-style: none; }
.band { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr) 2.2rem; gap: 12px; align-items: center; padding: 6px 0; }
.band span:first-child { font-size: 0.92rem; color: var(--ink); }
.band__track { height: 8px; border-radius: 99px; background: var(--bg-alt); overflow: hidden; }
.band__fill { display: block; height: 100%; width: calc(var(--v) / 9 * 100%); border-radius: inherit; background: var(--brand); transform-origin: left; }
.is-revealing .band__fill { animation: grow 1.1s var(--ease) both; animation-delay: calc(var(--i) * 110ms + 200ms); }
.band b { font-family: var(--font-mono); font-weight: 600; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.langs { display: grid; gap: 0; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.langs div { display: flex; justify-content: space-between; padding: 6px 0; }
.langs dt { color: var(--ink); font-weight: 600; }
.langs dd { margin: 0; color: var(--muted); }

.awards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); margin: clamp(48px, 7vw, 80px) 0 0; padding: 0; list-style: none; }
.awards li { display: grid; gap: 8px; align-content: start; justify-items: start; padding-top: 18px; border-top: 2px solid var(--ink); }
.awards p { font-size: 0.94rem; }
.award__deck { background: none; border-top: 0; border-left: 0; border-right: 0; padding: 0.3em 0; font-size: 0.88rem; cursor: pointer; }
@media (max-width: 1100px) { .awards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.awards .icon { width: 1.6em; height: 1.6em; color: var(--accent-text); }
.awards h3 { font-size: 1.12rem; }

@media (max-width: 880px) {
  .edu-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .awards { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Skills ---------- */

.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.skills h3 { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.chips li {
  padding: 7px 12px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); font-size: 0.93rem; font-weight: 500;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.chips li:hover { border-color: var(--brand); transform: translateY(-2px); }

@media (max-width: 880px) {
  .skills { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Contact ---------- */

.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.contact__title { font-size: clamp(3.2rem, 1.2rem + 7vw, 6.5rem); }
.contact__lede { margin-top: 20px; max-width: 46ch; font-size: 1.08rem; }

.contact-list { margin: 30px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.contact-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-list .value { grid-column: 1; color: var(--ink); font-size: 1.1rem; font-weight: 600; overflow-wrap: anywhere; text-decoration: none; }
.contact-list a.value:hover { color: var(--brand); }
.contact-list .icon-btn { grid-row: 1 / span 2; grid-column: 2; }
.contact-list .icon-btn .icon { width: 17px; height: 17px; }

.form { display: grid; gap: 16px; padding: clamp(20px, 3vw, 32px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.form__title { font-size: 1.3rem; font-stretch: 112%; font-weight: 750; }
.field { display: grid; gap: 7px; }
.field label { font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--bg); color: var(--ink);
  font: inherit; font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.form__status { font-size: 0.92rem; color: var(--muted); }
.form__status.ok { color: var(--ok); }
.form__status.err { color: #C2410C; }

@media (max-width: 880px) {
  .contact__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .field-row { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Footer ---------- */

.site-footer { padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.9rem; color: var(--muted); }
.site-footer a { color: var(--ink); text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--brand); }

/* ---------- Toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 80;
  padding: 11px 16px; border-radius: 10px;
  background: var(--ink); color: var(--bg);
  font-size: 0.9rem; font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none;
  transition: opacity 0.25s, transform 0.25s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- No-JS fallback ---------- */

.nojs { padding: 48px var(--gutter); max-width: 720px; margin-inline: auto; }
.nojs h1 { font-size: 2.5rem; }
.nojs p { margin-top: 12px; }

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
