/* =========================================================
   Pankaj Kumar Sahoo — Portfolio
   Design tokens → base → layout → components → sections
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg: #0A0806;
  --bg2: #120E0A;
  --card: #1A140E;
  --glass: rgba(26,20,14, .62);
  --line: rgba(200,180,150, .14);
  --line2: rgba(212,175,55, .28);
  --text: #F6EFE2;
  --text2: #BCAE98;
  --cyan: #D4AF37;
  --violet: #D2B48C;
  --violet-raw: #C19A6B;
  --blue: #B8885A;
  --blue-raw: #A67C52;
  --green: #A9C67E;
  --on-accent: #1A1206;
  --shadow: 0 30px 80px rgba(0, 0, 0, .55);
  --gridline: rgba(166,124,82, .07);
  --code-bg: #070504;
  --grad: linear-gradient(92deg, #F0D78C 0%, #D4AF37 45%, #C19A6B 100%);

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --r-sm: 8px; --r-btn: 12px; --r-md: 14px; --r-card: 20px; --r-lg: 24px; --r-xl: 28px;
  --s-section: 120px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #F7F0E3;
  --bg2: #EDE1CC;
  --card: #FFFAF0;
  --glass: rgba(255, 250, 240, .78);
  --line: rgba(43,29,14, .10);
  --line2: rgba(138,106,18, .32);
  --text: #2B1D0E;
  --text2: #6B5842;
  --cyan: #8A6A12;
  --violet: #8B5E34;
  --blue: #A0723F;
  --green: #4F7A2F;
  --on-accent: #FFFFFF;
  --shadow: 0 24px 60px rgba(43,29,14, .12);
  --gridline: rgba(160,114,63, .06);
  --grad: linear-gradient(92deg, #8A6A12 0%, #A0723F 55%, #7A4E28 100%);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background-color .3s, color .3s;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; margin: 0; font-weight: 600; }
p { margin: 0; }
a { color: var(--cyan); }
a:hover { color: var(--text); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(212,175,55, .3); }
.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; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 200; padding: 12px 16px; border-radius: var(--r-btn); background: var(--cyan); color: var(--on-accent); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; color: var(--on-accent); }

/* ---------- Layout helpers ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { position: relative; padding: var(--s-section) 0; border-bottom: 1px solid var(--line); scroll-margin-top: 72px; }
.section--alt { background: var(--bg2); }
.grid-bg {
  background-image: linear-gradient(var(--gridline) 1px, transparent 1px), linear-gradient(90deg, var(--gridline) 1px, transparent 1px);
  background-size: 56px 56px;
}
.split { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.split > * { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.mono { font-family: var(--font-mono); }
.eyebrow { font: 500 12px/1.4 var(--font-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--cyan); }
.eyebrow--violet { color: var(--violet); }
.h2 { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.04; }
.lead { font-size: 17px; color: var(--text2); max-width: 680px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 48px; }
.section-head .stack { max-width: 760px; }
.glow-blob { position: absolute; border-radius: 50%; pointer-events: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r-btn);
  font: 600 15px/1 var(--font-body); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; background: none; color: var(--text);
  transition: transform .25s var(--ease), box-shadow .25s, background .25s, color .25s, border-color .25s;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--primary { background: var(--cyan); color: var(--on-accent); }
.btn--primary:hover { color: var(--on-accent); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(212,175,55, .35); }
.btn--ghost { border-color: var(--line); }
.btn--ghost:hover { color: var(--text); border-color: var(--cyan); transform: translateY(-2px); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.icon-btn {
  width: 44px; height: 44px; border-radius: var(--r-btn); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line); color: var(--text); cursor: pointer;
  transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--cyan); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text); font: 500 14px var(--font-body); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line2); }
.text-link svg { width: 16px; height: 16px; }

/* ---------- Chips & tabs ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 10px;
  border-radius: 999px; border: 1px solid var(--line); background: transparent;
  font: 500 12px var(--font-mono); color: var(--text2); white-space: nowrap;
}
.chip--strong { color: var(--text); }
.chip--live { color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, transparent); }
.chip--concept { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 40%, transparent); }
.chip--accent { color: var(--cyan); border-color: var(--line2); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tab {
  min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--text2);
  font: 500 14px var(--font-body); transition: all .25s;
}
.tab:hover { color: var(--text); border-color: var(--line2); }
.tab[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.tab .count { font: 500 11px var(--font-mono); opacity: .7; margin-left: 4px; }

/* ---------- Glass ---------- */
.glass { background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--line); }
.glass--accent { border-color: var(--line2); }

/* ---------- Header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 60; border-bottom: 1px solid transparent; transition: background .3s, border-color .3s; }
.site-header.is-scrolled { background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom-color: var(--line); }
.nav { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand__mark {
  width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line2); font: 700 16px var(--font-display); letter-spacing: -0.04em;
  background: radial-gradient(circle at 30% 25%, rgba(212,175,55, .25), transparent 70%), var(--card);
}
.brand__name { font: 600 15px var(--font-display); }
.nav__links { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav__link { position: relative; display: block; padding: 10px 2px; color: var(--text2); text-decoration: none; font: 500 14px var(--font-body); }
.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__link.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; border-radius: 2px; background: var(--cyan); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__burger { display: none; }
.theme-icon--light { display: none; }
[data-theme="light"] .theme-icon--dark { display: none; }
[data-theme="light"] .theme-icon--light { display: block; }
.mobile-menu { display: none; border-top: 1px solid var(--line); background: var(--bg); padding: 12px 24px 28px; }
.mobile-menu.is-open { display: block; }
.mobile-menu a { display: flex; justify-content: space-between; align-items: center; min-height: 56px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; font: 500 22px var(--font-display); }
.mobile-menu a span { font: 500 12px var(--font-mono); color: var(--text2); }
@media (max-width: 1080px) { .nav__links { display: none; } .nav__burger { display: inline-flex; } }
@media (max-width: 420px) { .brand__name { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero__inner { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 40px; min-height: min(860px, calc(100vh - 72px)); padding-top: 56px; padding-bottom: 88px; }
.hero__copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.hero__title { font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: clamp(50px, 6.2vw, 96px); line-height: .98; letter-spacing: -.02em; }
.hero__title .line { display: block; }
.hero__name { display: flex; align-items: center; gap: 14px; font: 500 18px var(--font-display); }
.hero__name::before { content: ""; width: 32px; height: 1px; background: var(--text2); }
.hero__desc { max-width: 560px; font-size: 18px; line-height: 1.65; color: var(--text2); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.status-pill { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; font: 500 13px var(--font-body); color: var(--text2); }
.status-pill .dot { width: 8px; height: 8px; background: var(--green); box-shadow: 0 0 10px var(--green); animation: blink 2.4s ease-in-out infinite; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 32px; max-width: 560px; padding-top: 18px; border-top: 1px solid var(--line); }
.stat__value { font: 600 26px var(--font-display); }
.stat__label { font: 500 11px var(--font-mono); letter-spacing: .12em; color: var(--text2); text-transform: uppercase; }
.hero__visual { flex: 1 1 480px; min-width: 0; display: flex; justify-content: center; }
.core-stage { position: relative; width: 100%; max-width: 620px; aspect-ratio: 1; }
.core-stage > svg, .core-stage > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.core-stage > svg { overflow: visible; transition: opacity .8s; }
.core-stage > canvas { opacity: 0; transition: opacity 1.2s; }
.core-stage.has-webgl > canvas { opacity: 1; }
.core-stage.has-webgl > svg .mesh { opacity: 0; }
.hud { position: absolute; padding: 12px 14px; border-radius: 12px; box-shadow: var(--shadow); pointer-events: none; }
.hud p { margin: 0; font: 400 12px var(--font-mono); color: var(--text); }
.hud .hud__label { font-size: 10px; letter-spacing: .14em; color: var(--cyan); margin-bottom: 4px; }
.hud--1 { left: -2%; top: 14%; border-color: var(--line2); animation: floaty 6s ease-in-out infinite; }
.hud--2 { right: -3%; top: 30%; animation: floaty 7.5s ease-in-out -2s infinite; }
.hud--2 .hud__label { color: var(--violet); }
.hud--2 p + p { margin-top: 4px; font-size: 11px; color: var(--text2); }
.hud--3 { left: 6%; bottom: 10%; display: flex; align-items: center; gap: 10px; animation: floaty 9s ease-in-out -4s infinite; }
.hud--3 .tag { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line2); font: 500 10px var(--font-mono); color: var(--cyan); }
.hud--4 { right: 4%; bottom: 16%; animation: floaty 6s ease-in-out -1s infinite; }
.ok { color: var(--green); }
.live { color: var(--cyan); animation: blink 2s infinite; }
.scroll-cue { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text2); text-decoration: none; font: 500 10px var(--font-mono); letter-spacing: .24em; }
.scroll-cue__mouse { width: 22px; height: 34px; border-radius: 12px; border: 1px solid var(--line); display: flex; justify-content: center; padding-top: 6px; }
.scroll-cue__mouse span { width: 3px; height: 8px; border-radius: 2px; background: var(--cyan); animation: floaty 2s ease-in-out infinite; }
@media (max-width: 640px) { .hud--2, .hud--4 { display: none; } .hero__inner { padding-bottom: 96px; } }

/* svg animation helpers */
.spin { animation: spin 38s linear infinite; transform-origin: 280px 280px; }
.spinr { animation: spin 52s linear infinite reverse; transform-origin: 280px 280px; }
.spin2 { animation: spin 24s linear infinite; transform-origin: 280px 280px; }
.pulse { animation: pulse 3s ease-in-out infinite; }
.dash { animation: dash 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes dash { to { stroke-dashoffset: -16; } }

/* ---------- Intelligence ecosystem ---------- */
.eco__panel { flex: 1 1 360px; }
.eco__detail { border-radius: var(--r-card); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.eco__detail-head { display: flex; align-items: center; gap: 12px; }
.eco__badge { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid var(--cyan); font: 500 12px var(--font-mono); color: var(--cyan); flex: none; }
.eco__detail h3 { font-size: 22px; }
.eco__detail .label { font: 500 11px var(--font-mono); letter-spacing: .14em; color: var(--text2); margin-bottom: 4px; }
.eco__links { font: 500 13px var(--font-mono); color: var(--cyan); }
.eco__map-wrap { flex: 1 1 560px; display: flex; justify-content: center; }
.eco__map { position: relative; width: 100%; max-width: 620px; aspect-ratio: 1; }
.eco__map > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.eco__ring { stroke: var(--line); }
.eco__core {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 22%; aspect-ratio: 1;
  border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  border: 1px solid var(--line2); box-shadow: 0 0 60px rgba(212,175,55, .25);
  background: radial-gradient(circle at 35% 30%, rgba(212,175,55, .35), rgba(166,124,82, .12) 50%, var(--card) 80%);
}
.eco__core small { font: 500 10px var(--font-mono); letter-spacing: .2em; color: var(--text2); }
.eco__core strong { font: 700 clamp(13px, 2vw, 20px) var(--font-display); }
.eco-node {
  position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 44px; min-height: 44px; padding: 4px; background: none; border: 0; cursor: pointer;
  color: var(--text2); font: 500 12px/1.25 var(--font-body); text-align: center;
}
.eco-node__label { max-width: 120px; }
.orb {
  width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font: 500 12px var(--font-mono); color: var(--text); border: 1px solid var(--line);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .18), var(--card) 60%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35); transition: all .3s var(--ease);
}
.eco-node:hover .orb, .eco-node[aria-pressed="true"] .orb { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(212,175,55, .12), 0 0 32px rgba(212,175,55, .35); transform: scale(1.08); }
.eco-node[aria-pressed="true"] { color: var(--text); }
@media (max-width: 560px) { .orb { width: 40px; height: 40px; font-size: 10px; } .eco-node__label { display: none; } }

/* ---------- Agentic AI ---------- */
.agent-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.agent-controls .btn--primary { min-width: 168px; }
.flow { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0 0 20px; }
.flow::before { content: ""; position: absolute; left: 2%; right: 2%; top: 50%; height: 1px; background: linear-gradient(90deg, transparent, var(--line2), transparent); }
.stage {
  position: relative; width: 100%; height: 100%; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px 14px 16px; color: var(--text2); transition: all .3s var(--ease);
}
.stage__num { display: block; font: 500 11px var(--font-mono); }
.stage__name { display: block; margin-top: 8px; font: 600 14px/1.25 var(--font-display); }
.stage__short { display: block; margin-top: 6px; font-size: 12px; line-height: 1.4; color: var(--text2); }
.stage.is-done { border-color: rgba(184,136,90, .45); color: var(--text); }
.stage[aria-current="step"] { border-color: var(--cyan); color: var(--text); box-shadow: 0 0 0 1px var(--cyan), 0 0 36px rgba(212,175,55, .25); transform: translateY(-3px); }
.stage[aria-current="step"] .stage__num { color: var(--cyan); }
.flow-detail { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; }
.flow-detail > * { flex: 1 1 420px; min-width: 0; }
.stage-card { border-radius: var(--r-card); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.stage-card h3 { font-size: 28px; }
.progress { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; width: 12.5%; background: linear-gradient(90deg, #D4AF37, #C19A6B); transition: width .5s var(--ease); }
.terminal { border-radius: var(--r-card); background: var(--code-bg); border: 1px solid var(--line); overflow: hidden; color: #BCAE98; }
.terminal__bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid rgba(200,180,150, .14); font: 400 12px var(--font-mono); }
.terminal__bar i { width: 10px; height: 10px; border-radius: 50%; background: #5A4A38; }
.terminal__bar span { margin-left: 8px; }
.terminal__body { padding: 18px 20px; min-height: 196px; display: grid; align-content: start; gap: 6px; font: 400 12px/1.6 var(--font-mono); }
.terminal__body .is-now { color: #D4AF37; }
.notice { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--r-md); border: 1px dashed var(--line); color: var(--text2); font-size: 14px; margin-bottom: 20px; }
.notice svg { width: 18px; height: 18px; flex: none; }
.agents-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.agent-card { position: relative; overflow: hidden; border-radius: var(--r-card); padding: 24px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.agent-card__glow { position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; pointer-events: none; }
.agent-card__top { display: flex; justify-content: space-between; align-items: center; }
.code-badge { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line2); font: 500 12px var(--font-mono); color: var(--cyan); }
.agent-card h3 { font-size: 21px; }
.agent-card p { color: var(--text2); font-size: 15px; }
.agent-card__ground { margin-top: auto !important; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px !important; }
.agent-card__ground b { font: 500 11px var(--font-mono); letter-spacing: .12em; color: var(--text); }

/* ---------- About ---------- */
.portrait-wrap { flex: 1 1 380px; display: flex; justify-content: center; }
.portrait { position: relative; width: 100%; max-width: 440px; }
.portrait__deco1 { position: absolute; left: -28px; top: -28px; width: 120px; height: 120px; border-radius: 28px; border: 1px solid var(--line2); transform: rotate(14deg); background: linear-gradient(135deg, rgba(212,175,55, .08), transparent); }
.portrait__deco2 { position: absolute; right: -22px; bottom: 60px; width: 76px; height: 76px; border-radius: 50%; border: 1px solid rgba(193,154,107, .45); background: radial-gradient(circle at 30% 30%, rgba(193,154,107, .35), transparent 70%); animation: floaty 9s ease-in-out infinite; }
.portrait__frame { position: relative; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); background: linear-gradient(180deg, #2A1F14, #120E0A); aspect-ratio: 4 / 5; box-shadow: var(--shadow); }
.portrait__frame img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.portrait__frame::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(transparent, rgba(10,8,6, .92)); }
.portrait__caption { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; color: #F6EFE2; }
.portrait__caption strong { display: block; font: 600 18px var(--font-display); }
.portrait__caption small { font: 500 11px var(--font-mono); letter-spacing: .12em; color: #D4AF37; }
.portrait__caption span { font: 400 11px var(--font-mono); color: #BCAE98; }
.about__copy { flex: 1 1 520px; }
.about__copy p.big { font-size: 18px; }
.about__copy p.muted { color: var(--text2); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.fact { border-radius: var(--r-md); padding: 14px 16px; }
.fact small { display: block; font: 500 10px var(--font-mono); letter-spacing: .14em; color: var(--cyan); }
.fact span { display: block; margin-top: 4px; font-weight: 500; font-size: 15px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Skills ---------- */
.sphere-col { flex: 1 1 420px; display: flex; justify-content: center; }
.sphere-stage { position: relative; width: 440px; height: 440px; perspective: 1100px; flex: none; }
.sphere-stage__halo { position: absolute; inset: 60px; border-radius: 50%; border: 1px solid var(--line); background: radial-gradient(circle at 40% 35%, rgba(212,175,55, .16), rgba(166,124,82, .06) 50%, transparent 72%); }
.sphere-stage__ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed var(--line); }
.sphere { position: absolute; inset: 0; transform-style: preserve-3d; animation: sphere 46s linear infinite; }
.sphere-stage:hover .sphere { animation-play-state: paused; }
@keyframes sphere { from { transform: rotateX(-14deg) rotateY(0); } to { transform: rotateX(-14deg) rotateY(360deg); } }
.slabel { position: absolute; left: 50%; top: 50%; width: 130px; margin: -10px 0 0 -65px; text-align: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; font: 500 13px var(--font-mono); color: var(--text); opacity: .72; transition: color .3s, text-shadow .3s, opacity .3s; }
.slabel.is-hot { opacity: 1; color: var(--cyan); text-shadow: 0 0 18px rgba(212,175,55, .7); }
.cats { flex: 1 1 560px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.cat { cursor: pointer; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; color: var(--text); transition: border-color .3s, transform .3s var(--ease), box-shadow .3s; }
.cat:hover { border-color: var(--line2); transform: translateY(-2px); }
.cat[aria-pressed="true"] { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan) inset; }
.cat__head { display: flex; justify-content: space-between; gap: 8px; font: 500 11px var(--font-mono); letter-spacing: .14em; }
.cat__head span:first-child { color: var(--cyan); }
.cat__head span:last-child { color: var(--text2); }
.cat__note { display: block; margin: 8px 0 12px; font-size: 13px; line-height: 1.45; color: var(--text2); }
@media (max-width: 520px) { .sphere-stage { transform: scale(.72); margin: -60px 0; } }

/* ---------- Projects ---------- */
.featured { display: flex; flex-wrap: wrap; border-radius: var(--r-xl); overflow: hidden; margin-bottom: 48px; }
.featured__body { flex: 1 1 460px; min-width: 0; padding: 40px; display: flex; flex-direction: column; gap: 18px; }
.featured__body h3 { font-size: clamp(28px, 3vw, 36px); line-height: 1.08; }
.featured__body > p { color: var(--text2); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.kpi { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; font-size: 14px; }
.kpi small { display: block; font: 500 10px var(--font-mono); letter-spacing: .14em; color: var(--cyan); margin-bottom: 4px; }
.featured__arch { flex: 1 1 520px; min-width: 0; padding: 40px; background: var(--code-bg); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; color: #F6EFE2; }
.arch-title { font: 500 11px var(--font-mono); letter-spacing: .16em; color: #BCAE98; }
.arch-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.arch-box { border: 1px solid rgba(200,180,150, .2); border-radius: 12px; padding: 12px; font-size: 13px; }
.arch-box small { display: block; font: 500 10px var(--font-mono); color: #D4AF37; margin-bottom: 4px; }
.arch-box--violet small { color: #DDBF94; }
.arch-box--core { border-color: rgba(212,175,55, .45); box-shadow: 0 0 30px rgba(212,175,55, .12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 14px; }
.arch-box--core div:last-child small { color: #BCAE98; }
.arch-arrow { text-align: center; font: 500 14px var(--font-mono); color: #A67C52; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 20px; }
.p-card { border-radius: 22px; background: var(--card); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
.p-card[hidden] { display: none; }
.p-card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--code-bg); border-bottom: 1px solid var(--line); }
.p-card__media img { width: 100%; height: 100%; object-fit: cover; }
.p-card__art { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 24px; background-color: #0B0806; overflow: hidden; }
.p-card__art .file { font: 500 11px var(--font-mono); letter-spacing: .14em; color: #BCAE98; }
.p-card__art .code { position: relative; font: 400 14px/1.6 var(--font-mono); color: #F6EFE2; white-space: pre-line; }
.p-card__art .blob { position: absolute; right: -30px; bottom: -50px; width: 220px; height: 220px; border-radius: 50%; }
.p-card__status { position: absolute; left: 14px; top: 14px; background: rgba(10,8,6, .8); color: #F6EFE2; border-color: rgba(200,180,150, .25); }
.p-card__body { padding: 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.p-card__cat { font: 500 11px var(--font-mono); letter-spacing: .14em; color: var(--cyan); }
.p-card__body h3 { font-size: 21px; line-height: 1.2; }
.p-card__body p { color: var(--text2); font-size: 15px; }
.p-card__links { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 18px; }
.card-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--text); text-decoration: none; font: 600 14px var(--font-body); }
.card-link:hover { color: var(--cyan); }
.card-link svg { width: 14px; height: 14px; }
.tilt { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px)); transition: transform .45s var(--ease), box-shadow .45s, border-color .45s; will-change: transform; }
.tilt:hover { --ty: -6px; box-shadow: var(--shadow); border-color: var(--line2); }
.tilt .zoom { transition: transform .8s var(--ease); }
.tilt:hover .zoom { transform: scale(1.07); }
@media (max-width: 720px) { .featured__body, .featured__arch { padding: 24px; } .featured__arch { border-left: 0; border-top: 1px solid var(--line); } }

/* ---------- Creative lab ---------- */
.lab__copy { flex: 1 1 380px; }
.lab__list { display: grid; gap: 10px; }
.lab__list div { display: flex; gap: 14px; align-items: baseline; }
.lab__list b { flex: none; width: 120px; font: 500 12px var(--font-mono); color: var(--cyan); }
.lab__list span { color: var(--text2); font-size: 15px; }
.lab__grid { flex: 1 1 600px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.stage3d { grid-column: 1 / -1; position: relative; height: 340px; border-radius: var(--r-lg); border: 1px solid var(--line2); overflow: hidden; perspective: 900px; background: radial-gradient(circle at 50% 55%, rgba(166,124,82, .18), var(--code-bg) 70%); }
.stage3d__scene { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .2s ease-out; }
.cube { position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; margin: -75px 0 0 -75px; transform-style: preserve-3d; animation: cube 22s linear infinite; }
@keyframes cube { from { transform: rotateX(-22deg) rotateY(0); } to { transform: rotateX(-22deg) rotateY(360deg); } }
.face { position: absolute; inset: 0; border: 1px solid rgba(212,175,55, .55); background: linear-gradient(135deg, rgba(212,175,55, .10), rgba(193,154,107, .10)); box-shadow: inset 0 0 40px rgba(212,175,55, .15); }
.face:nth-child(1) { transform: translateZ(75px); } .face:nth-child(2) { transform: rotateY(180deg) translateZ(75px); }
.face:nth-child(3) { transform: rotateY(90deg) translateZ(75px); } .face:nth-child(4) { transform: rotateY(-90deg) translateZ(75px); }
.face:nth-child(5) { transform: rotateX(90deg) translateZ(75px); } .face:nth-child(6) { transform: rotateX(-90deg) translateZ(75px); }
.orbit { position: absolute; left: 50%; top: 50%; border-radius: 50%; transform: rotateX(72deg); }
.orbit--1 { width: 300px; height: 300px; margin: -150px 0 0 -150px; border: 1px solid rgba(212,175,55, .25); }
.orbit--2 { width: 400px; height: 400px; margin: -200px 0 0 -200px; border: 1px dashed rgba(193,154,107, .3); }
.stage3d__label { position: absolute; font: 500 11px var(--font-mono); letter-spacing: .14em; color: #BCAE98; }
.stage3d__label--tl { left: 18px; top: 16px; } .stage3d__label--br { right: 18px; bottom: 14px; letter-spacing: 0; }
.lab-tile { border-radius: var(--r-card); border: 1px solid var(--line); background: var(--code-bg); padding: 18px; display: flex; flex-direction: column; gap: 10px; color: #BCAE98; }
.lab-tile .stage3d__label { position: static; }
.lab-tile svg { width: 100%; height: 150px; }
.lab-tile p { font-size: 13px; }

/* ---------- Certifications ---------- */
.certs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 18px; }
.c-card { border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.c-card button { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.c-card__img { aspect-ratio: 4 / 3; overflow: hidden; background: #fff; border-bottom: 1px solid var(--line); }
.c-card__img img { width: 100%; height: 100%; object-fit: cover; }
.c-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; }
.c-card__meta { display: flex; justify-content: space-between; gap: 10px; font: 500 11px var(--font-mono); letter-spacing: .14em; }
.c-card__meta span:first-child { color: var(--cyan); }
.c-card__meta span:last-child { color: var(--text2); }
.c-card__title { font: 600 18px/1.25 var(--font-display); }
.c-card__desc { font-size: 14px; color: var(--text2); line-height: 1.5; }
.c-card__cta { font: 600 14px var(--font-body); }
.lightbox { max-width: min(920px, 94vw); width: 100%; padding: 0; border-radius: var(--r-card); border: 1px solid rgba(212,175,55, .3); background: #120E0A; color: #F6EFE2; overflow: hidden; }
.lightbox::backdrop { background: rgba(6,4,2, .82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lightbox img { width: 100%; background: #fff; max-height: 74vh; object-fit: contain; }
.lightbox__bar { padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lightbox__bar strong { font: 600 16px var(--font-display); }
.lightbox__bar span { color: #BCAE98; font-weight: 400; }
.lightbox .btn--ghost { color: #F6EFE2; border-color: rgba(200,180,150, .3); }

/* ---------- Journey ---------- */
.journey .container { max-width: 1080px; }
.center-head { text-align: center; align-items: center; margin: 0 auto 48px; }
.timeline { position: relative; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.timeline__line { position: absolute; left: 27px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, var(--cyan), #A67C52 60%, #C19A6B); transform-origin: top; }
.t-item { position: relative; display: flex; gap: 24px; align-items: flex-start; }
.t-dot { position: relative; z-index: 1; flex: none; width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--bg); border: 1px solid var(--line2); font: 500 12px var(--font-mono); }
.t-item--now .t-dot { border-color: var(--cyan); box-shadow: 0 0 24px rgba(212,175,55, .45); }
.t-card { flex: 1; min-width: 0; border-radius: 18px; padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: baseline; }
.t-card__year { width: 64px; font: 500 13px var(--font-mono); color: var(--cyan); }
.t-card__text { flex: 1 1 280px; min-width: 0; }
.t-card h3 { font-size: 20px; }
.t-card p { margin-top: 6px; color: var(--text2); font-size: 15px; }

/* ---------- Blog ---------- */
.blog-layout { display: flex; flex-wrap: wrap; gap: 24px; }
.blog-feature { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; }
.blog-feature__img { aspect-ratio: 2 / 1; overflow: hidden; }
.blog-feature__img img { width: 100%; height: 100%; object-fit: cover; }
.blog-feature__body { padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.blog-feature h3 { font-size: clamp(24px, 2.4vw, 30px); line-height: 1.15; transition: color .2s; }
.blog-feature p { color: var(--text2); }
.blog-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font: 400 12px var(--font-mono); color: var(--text2); }
.blog-list { flex: 1 1 400px; min-width: 0; list-style: none; margin: 0; padding: 0; }
.blog-row { display: flex; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.blog-row__img { flex: none; width: 120px; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.blog-row__img img { width: 100%; height: 100%; object-fit: cover; }
.blog-row h3 { font-size: 18px; line-height: 1.3; transition: color .2s; }
.blog-row p { font-size: 14px; color: var(--text2); line-height: 1.45; margin-top: 2px; }
.blog-row:hover h3, .blog-feature:hover h3 { color: var(--cyan); }
@media (max-width: 480px) { .blog-row__img { width: 88px; } }

/* ---------- Contact ---------- */
.contact__copy { flex: 1 1 440px; }
.globe { width: 100%; max-width: 360px; aspect-ratio: 1; margin: 8px 0; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.social { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; border-radius: var(--r-btn); border: 1px solid var(--line); color: var(--text); text-decoration: none; font: 500 14px var(--font-body); transition: border-color .2s, color .2s; }
.social:hover { border-color: var(--cyan); color: var(--cyan); }
.social svg { width: 18px; height: 18px; }
.contact__meta { font: 400 12px var(--font-mono); color: var(--text2); }
.contact__form-wrap { flex: 1 1 480px; }
.form { border-radius: var(--r-lg); padding: 32px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 8px; }
.form label > span { font: 500 13px var(--font-body); color: var(--text2); }
.field { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--bg2); color: var(--text); font: 400 16px var(--font-body); outline: none; transition: border-color .2s, box-shadow .2s; }
.field:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(212,175,55, .18); }
.field::placeholder { color: color-mix(in srgb, var(--text2) 70%, transparent); }
textarea.field { resize: vertical; min-height: 140px; }
.form__status { min-height: 22px; font-size: 14px; color: var(--text2); }
.form__status.is-ok { color: var(--green); }
.form__status.is-err { color: #F87171; }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.footer { background: var(--bg); border-top: 1px solid var(--line); }
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding: 56px 0 40px; }
.footer__brand { max-width: 360px; display: flex; flex-direction: column; gap: 12px; }
.footer__brand p { color: var(--text2); font-size: 15px; }
.footer__nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.footer__nav a { color: var(--text2); text-decoration: none; padding: 8px 0; font-size: 14px; }
.footer__nav a:hover { color: var(--text); }
.footer__social { display: flex; gap: 10px; align-items: flex-start; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 0 32px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text2); }

/* ---------- Chat assistant ---------- */
.chat-fab { position: fixed; right: 22px; bottom: 22px; z-index: 80; width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line2); background: radial-gradient(circle at 35% 30%, rgba(212,175,55, .35), var(--card) 70%); color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 30px rgba(212,175,55, .2); transition: transform .25s var(--ease); }
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab svg { width: 24px; height: 24px; }
.chat-panel { position: fixed; right: 22px; bottom: 90px; z-index: 81; width: min(380px, calc(100vw - 32px)); height: min(540px, calc(100vh - 140px)); border-radius: var(--r-card); display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow); }
.chat-panel[hidden] { display: none; }
.chat-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat-panel__head strong { display: block; font: 600 15px var(--font-display); }
.chat-panel__head small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text2); }
.chat-panel__head small .dot { background: var(--green); }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.msg--bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg--user { align-self: flex-end; background: var(--cyan); color: var(--on-accent); border-bottom-right-radius: 4px; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.chat-suggest button { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text2); font-size: 12px; cursor: pointer; }
.chat-suggest button:hover { color: var(--text); border-color: var(--line2); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form .field { min-height: 44px; padding: 10px 12px; font-size: 15px; }

/* ---------- Cursor ring (fine pointers only) ---------- */
.cursor-ring { position: fixed; left: 0; top: 0; z-index: 300; width: 32px; height: 32px; margin: -16px 0 0 -16px; border-radius: 50%; border: 1px solid rgba(212,175,55, .55); pointer-events: none; opacity: 0; transition: width .25s, height .25s, margin .25s, opacity .3s, background .25s; }
.cursor-ring.is-visible { opacity: 1; }
.cursor-ring.is-hover { width: 56px; height: 56px; margin: -28px 0 0 -28px; background: rgba(212,175,55, .06); }
@media (hover: none), (pointer: coarse) { .cursor-ring { display: none; } }

/* ---------- Reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Detail pages (projects / blog) ---------- */
.detail-hero { padding: 72px 0 48px; border-bottom: 1px solid var(--line); }
.detail-hero .container, .detail-body .container { max-width: 820px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 20px; color: var(--text2); text-decoration: none; font-size: 14px; }
.back-link:hover { color: var(--cyan); }
.detail-hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; margin: 14px 0 16px; }
.detail-hero .lead { margin-bottom: 18px; }
.detail-body { padding: 56px 0 96px; }
.detail-cover { border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); margin-bottom: 40px; aspect-ratio: 16 / 8; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.prose { font-size: 17px; line-height: 1.75; color: var(--text); }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3 { margin-top: 2em; font-size: 22px; }
.prose h3.label { font: 500 12px var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); margin-top: 2.2em; }
.prose h3.label + p { margin-top: .5em; }
.prose p, .prose li { color: var(--text2); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: .4em; }
.prose strong { color: var(--text); }
.prose code { font-family: var(--font-mono); font-size: .9em; padding: 2px 6px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding: 40px 0; border-top: 1px solid var(--line); }
.redirect { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 24px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Skills: Three.js STL globe ---------- */
.stl-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: none; cursor: grab; touch-action: pan-y; z-index: 2; }
.stl-canvas:active { cursor: grabbing; }
.stl-hint { position: absolute; left: 0; right: 0; bottom: -6px; z-index: 3; display: none; text-align: center; font: 500 10px var(--font-mono); letter-spacing: .18em; color: var(--text2); pointer-events: none; }
.sphere-stage.is-stl .stl-canvas, .sphere-stage.is-stl .stl-hint { display: block; }
.sphere-stage.is-stl .sphere, .sphere-stage.is-stl .sphere-stage__ring { display: none; }

/* ---------- Ecosystem auto-cycle ---------- */
.eco__detail { position: relative; overflow: hidden; }
.eco__detail.is-swap > :not(.eco__progress):not(.eco__auto) { animation: ecoSwap .5s var(--ease); }
@keyframes ecoSwap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.eco__progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--grad); transform: scaleX(0); transform-origin: left; opacity: .9; }
.eco__progress.run { animation: ecoProg 3.8s linear forwards; }
@keyframes ecoProg { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.eco__auto { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text2); font: 500 11px var(--font-mono); letter-spacing: .08em; cursor: pointer; transition: border-color .2s, color .2s; }
.eco__auto:hover { border-color: var(--cyan); color: var(--text); }
.eco__auto-ico { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 3px rgba(212,175,55,.2); }
.eco__auto[aria-pressed="false"] .eco__auto-ico { background: var(--text2); box-shadow: none; }
.eco__map line.dash { opacity: .35; transition: opacity .4s, stroke-width .4s; }
.eco__map line.dash.is-active { opacity: 1; stroke-width: .6; }
.eco-node[aria-pressed="true"] .orb { animation: ecoPulse 2.2s ease-in-out infinite; }
@keyframes ecoPulse { 0%,100% { box-shadow: 0 0 0 4px rgba(212,175,55,.12), 0 0 32px rgba(212,175,55,.35); } 50% { box-shadow: 0 0 0 9px rgba(212,175,55,.06), 0 0 46px rgba(212,175,55,.55); } }
@media (prefers-reduced-motion: reduce) { .eco-node[aria-pressed="true"] .orb { animation: none; } .eco__progress { display: none; } }

/* ---------- Horizontal motion strip (dual lanes) ---------- */
.motion { position: relative; overflow: hidden; padding: 28px 0; border-bottom: 1px solid var(--line); background: var(--bg); }
.motion::before, .motion::after { content: ""; position: absolute; top: 0; bottom: 0; width: 10%; z-index: 2; pointer-events: none; }
.motion::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.motion::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.motion__row { padding: 7px 0; }
.motion__track { display: flex; width: max-content; will-change: transform; }
.mpill {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 8px; padding: 12px 22px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); white-space: nowrap;
  font: 500 15px var(--font-mono); transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.mpill i { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-raw); flex: none; transition: background .25s; }
.motion__row[data-dir="-1"] .mpill i { background: var(--cyan); }
.mpill:hover { background: var(--cyan); color: var(--on-accent); border-color: transparent; transform: scale(1.06); box-shadow: 0 10px 28px rgba(212,175,55, .3); }
.mpill:hover i { background: var(--on-accent); }
@media (max-width: 560px) { .mpill { padding: 10px 16px; font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .motion__track { transform: none !important; } .motion__row { overflow-x: auto; } }
