/* ==========================================================================
   Jefferson Savidotti | "Data Observatory" Design System
   Palette: Ink + Teal (data) + Violet (AI) + Amber (insight) | see ADR-002
   ========================================================================== */
:root {
  --ink-0: #06080F;
  --ink-1: #0A0F1E;
  --ink-2: #10172B;
  --ink-3: #172038;
  --line: rgba(148, 163, 209, 0.12);
  --line-2: rgba(148, 163, 209, 0.22);

  --text: #E7EBF6;
  --muted: #8C94AF;
  --dim: #5B6380;

  --teal: #2DD4BF;
  --violet: #7C6CF2;
  --amber: #F5B544;
  --coral: #FF7A6B;
  --sky: #5AB4FF;
  --bronze: #C98A4B;
  --silver: #BFC7D5;
  --gold: #F5B544;

  --grad-data: linear-gradient(100deg, var(--teal) 0%, var(--sky) 45%, var(--violet) 100%);
  --grad-insight: linear-gradient(100deg, var(--amber), var(--coral));

  --font-d: 'Space Grotesk', system-ui, sans-serif;
  --font-b: 'Inter', system-ui, sans-serif;
  --font-m: 'JetBrains Mono', ui-monospace, Consolas, monospace;

  --max: 1200px;
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --nav-h: 72px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-b);
  background: var(--ink-0);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}
body::before { /* dot grid */
  content: '';
  position: fixed; inset: 0;
  background-image: radial-gradient(rgba(148, 163, 209, 0.13) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: rgba(45, 212, 191, 0.3); color: #fff; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--ink-0); }
::-webkit-scrollbar-thumb { background: var(--ink-3); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--teal); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

#flow-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0.7; }
.aurora {
  position: fixed; pointer-events: none; z-index: 0; border-radius: 50%; filter: blur(120px); opacity: 0.16;
}
.aurora-a { width: 620px; height: 620px; top: -220px; right: -160px; background: var(--violet); }
.aurora-b { width: 520px; height: 520px; top: 55%; left: -240px; background: var(--teal); opacity: 0.1; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 1; }
main, footer { position: relative; z-index: 1; }
.section { padding: 7rem 0; position: relative; }
.mono { font-family: var(--font-m); }
.t-teal { color: var(--teal); } .t-violet { color: var(--violet); } .t-amber { color: var(--amber); }
.t-muted { color: var(--muted); } .t-coral { color: var(--coral); }

h1, h2, h3, h4 { font-family: var(--font-d); line-height: 1.12; letter-spacing: -0.025em; color: #fff; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { color: var(--muted); }
strong { color: var(--text); font-weight: 600; }

.grad-text { background: var(--grad-data); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-insight { background: var(--grad-insight); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Notebook cell section header ---------- */
.cell-head { margin-bottom: 3rem; max-width: 760px; }
.cell-head.center { margin-inline: auto; text-align: center; }
.cell-prompt {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-m); font-size: 0.82rem;
  padding: 0.4rem 0.8rem; margin-bottom: 1.1rem;
  background: var(--ink-1); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.cell-prompt .in { color: var(--violet); }
.cell-prompt code { color: var(--teal); }
.cell-prompt .cursor { width: 7px; height: 14px; background: var(--teal); animation: blink 1s steps(1) infinite; }
.cell-head p { font-size: 1.1rem; margin-top: 1rem; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.4rem; border-radius: 10px;
  font-weight: 600; font-size: 0.95rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, border-color 0.25s, color 0.25s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary { background: var(--teal); color: #04221E; box-shadow: 0 0 0 1px rgba(45,212,191,.4), 0 10px 30px -10px rgba(45,212,191,.6); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(45,212,191,.6), 0 16px 40px -12px rgba(45,212,191,.8); }
.btn-ghost { border: 1px solid var(--line-2); background: rgba(16, 23, 43, 0.6); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--violet); color: #fff; transform: translateY(-2px); }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.85rem; border-radius: 8px; }

.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-m); font-size: 0.74rem;
  padding: 0.28rem 0.6rem; border-radius: 6px;
  background: var(--ink-2); border: 1px solid var(--line); color: var(--muted);
}
.chip.teal { color: var(--teal); border-color: rgba(45,212,191,.3); background: rgba(45,212,191,.07); }
.chip.violet { color: #A99EFF; border-color: rgba(124,108,242,.35); background: rgba(124,108,242,.08); }
.chip.amber { color: var(--amber); border-color: rgba(245,181,68,.3); background: rgba(245,181,68,.07); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }

/* ---------- Panel (card base) with cursor spotlight ---------- */
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(16, 23, 43, 0.85), rgba(10, 15, 30, 0.85));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.35s var(--ease);
}
.spot::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(45, 212, 191, 0.09), transparent 45%);
}
.spot:hover::after { opacity: 1; }
.spot:hover { border-color: var(--line-2); }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 1000;
  background: rgba(5, 8, 17, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(148, 163, 209, 0.12);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.nav.scrolled {
  background: rgba(5, 8, 17, 0.97);
  border-color: rgba(45, 212, 191, 0.25);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.brand img {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  transition: transform 0.4s var(--ease);
}
.brand:hover img {
  transform: rotate(-6deg) scale(1.05);
}
.brand-name {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.15;
  color: #fff;
  display: block;
}
.brand-sub {
  font-family: var(--font-m);
  font-size: 0.68rem;
  color: var(--teal);
  letter-spacing: 0.05em;
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-family: var(--font-m);
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  white-space: nowrap;
  transition: all 0.2s var(--ease);
  display: inline-block;
}
.nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.nav-links a.active {
  color: var(--teal);
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.25);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  background: var(--ink-1);
}
.burger svg { width: 22px; height: 22px; }

.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(6px); z-index: 1050; opacity: 0; pointer-events: none; transition: opacity .3s; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: min(320px, 85vw); z-index: 1100;
  background: var(--ink-1); border-left: 1px solid var(--line);
  padding: 5rem 1.5rem 2rem; display: flex; flex-direction: column; gap: 0.35rem;
  transform: translateX(100%); transition: transform 0.4s var(--ease);
}
.drawer.open { transform: none; }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer a { padding: 0.85rem 1rem; border-radius: 10px; font-family: var(--font-m); font-size: 0.92rem; color: var(--muted); }
.drawer a:hover { background: var(--ink-2); color: #fff; }
.drawer-close { position: absolute; top: 1.25rem; right: 1.25rem; width: 40px; height: 40px; }

/* ---------- Language Selector (Desktop & Drawer) ---------- */
.lang-selector {
  position: relative;
  display: inline-block;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  background: rgba(16, 23, 43, 0.7);
  border: 1px solid var(--line-2);
  color: #fff;
  font-family: var(--font-m);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s var(--ease);
}
.lang-btn:hover,
.lang-btn[aria-expanded="true"] {
  border-color: var(--teal);
  background: rgba(45, 212, 191, 0.08);
  box-shadow: 0 0 16px -4px rgba(45, 212, 191, 0.3);
}
.lang-flag {
  font-size: 0.95rem;
  line-height: 1;
}
.lang-globe-icon {
  color: var(--teal);
  flex-shrink: 0;
}
.lang-arrow {
  color: var(--muted);
  transition: transform 0.25s var(--ease);
}
.lang-btn[aria-expanded="true"] .lang-arrow {
  transform: rotate(180deg);
}
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 175px;
  background: rgba(10, 15, 30, 0.96);
  border: 1px solid rgba(45, 212, 191, 0.28);
  border-radius: 10px;
  box-shadow: 0 12px 35px -8px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  z-index: 1050;
}
.lang-dropdown.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.lang-opt {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--font-m);
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s;
  width: 100%;
}
.lang-opt:hover {
  background: rgba(45, 212, 191, 0.12);
  color: #fff;
}
.lang-opt.active {
  background: rgba(45, 212, 191, 0.18);
  color: var(--teal);
  font-weight: 600;
}
.drawer-lang-selector {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.drawer-lang-title {
  display: block;
  font-family: var(--font-m);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.65rem;
}
.drawer-lang-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
}
.drawer-lang-pill {
  padding: 0.5rem 0.2rem;
  border-radius: 8px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-m);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.drawer-lang-pill:hover,
.drawer-lang-pill.active {
  background: rgba(45, 212, 191, 0.15);
  border-color: var(--teal);
  color: #fff;
  box-shadow: 0 0 12px -2px rgba(45, 212, 191, 0.35);
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  min-height: calc(100vh - var(--nav-h));
  padding: calc(var(--nav-h) + 3rem) 0 4rem;
  display: flex;
  align-items: center;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3.5rem; align-items: center; }
.hero-eyebrow { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.6rem; }
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.02; }
.hero h1 .line { display: block; }
.hero-role {
  margin: 1.5rem 0 1.25rem; font-family: var(--font-m); font-size: clamp(0.95rem, 1.6vw, 1.1rem); color: var(--muted);
}
.hero-role .typed { color: var(--teal); }
.hero-role .caret { display: inline-block; width: 9px; height: 1.1em; vertical-align: -0.18em; background: var(--teal); animation: blink 1s steps(1) infinite; margin-left: 2px; }
.hero-lead { font-size: 1.15rem; max-width: 560px; margin-bottom: 2.2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 2.6rem; }
.hero-id { display: flex; align-items: center; gap: 1rem; padding-top: 1.6rem; border-top: 1px dashed var(--line-2); }
.hero-id img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--teal); box-shadow: 0 0 0 4px rgba(45,212,191,.12); }
.hero-id-meta { font-size: 0.88rem; color: var(--muted); }
.hero-id-meta strong { display: block; font-family: var(--font-d); font-size: 1.02rem; color: #fff; }

/* Live dashboard */
.dash { padding: 1.25rem; box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(124,108,242,.12); }
.dash-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; font-family: var(--font-m); font-size: 0.75rem; color: var(--dim); }
.dash-live { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--teal); }
.dash-live .dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.7); } }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-bottom: 0.75rem; }
.kpi { padding: 0.95rem 1rem; background: var(--ink-1); border: 1px solid var(--line); border-radius: var(--r); }
.kpi-label { font-family: var(--font-m); font-size: 0.7rem; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.kpi-value { font-family: var(--font-d); font-size: 1.9rem; font-weight: 700; color: #fff; line-height: 1.15; margin-top: .2rem; }
.kpi-trend { font-family: var(--font-m); font-size: 0.72rem; }
.chart-card { padding: 1rem; background: var(--ink-1); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: .75rem; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-m); font-size: .72rem; color: var(--dim); margin-bottom: .5rem; }
.chart-head b { color: var(--teal); font-weight: 600; font-size: .85rem; }
#sparkline { width: 100%; height: 90px; display: block; }
.focus-bars { display: grid; gap: .55rem; }
.fbar { display: grid; grid-template-columns: 72px 1fr 38px; align-items: center; gap: .6rem; font-family: var(--font-m); font-size: .72rem; color: var(--muted); }
.fbar-track { height: 8px; background: var(--ink-3); border-radius: 8px; overflow: hidden; }
.fbar-fill { height: 100%; width: 0; border-radius: 8px; transition: width 1.4s var(--ease); }
.fbar-val { text-align: right; color: var(--text); }



/* ==========================================================================
   TOOL CAROUSEL (MARQUEE)
   ========================================================================== */
.marquee-section {
  padding: 3.5rem 0 4rem;
  border-block: 1px solid var(--line);
  background: radial-gradient(ellipse 80% 50% at 50% 50%, rgba(16, 23, 43, 0.75), var(--ink-0));
  position: relative;
}
.marquee-label {
  text-align: center;
  font-family: var(--font-m);
  font-size: .85rem;
  color: var(--dim);
  margin-bottom: 2rem;
  letter-spacing: 0.04em;
}
.marquee-label span { color: var(--teal); font-weight: 600; }
.marquee {
  overflow: hidden;
  position: relative;
  padding: .75rem 0;
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.marquee.grabbing {
  cursor: grabbing;
}
.marquee.grabbing .tool {
  pointer-events: none;
}
.marquee + .marquee { margin-top: 1.25rem; }
.marquee-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  will-change: transform;
}
/* Fallback se o JavaScript estiver desabilitado */
.marquee:not(.js-interactive) .marquee-track {
  animation: marqueeTrack 36s linear infinite;
}
.marquee:not(.js-interactive).reverse .marquee-track {
  animation-direction: reverse;
  animation-duration: 40s;
}
@keyframes marqueeTrack {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-33.333333%, 0, 0); }
}
.tool {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .75rem 1.25rem .75rem .85rem;
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 209, 0.16);
  border-radius: 16px;
  box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.45);
  transition: all .35s var(--ease);
  cursor: default;
}
.tool:hover {
  border-color: var(--teal);
  background: rgba(16, 23, 43, 0.95);
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 28px -8px rgba(0, 242, 254, 0.35);
}
.tool-ico {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform .3s var(--ease);
}
.tool:hover .tool-ico {
  transform: scale(1.08) rotate(4deg);
}
.tool-ico img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.tool-ico img.inv {
  filter: invert(1) hue-rotate(180deg);
}
.tool-name {
  font-family: var(--font-d);
  font-weight: 600;
  font-size: .96rem;
  color: #fff;
  white-space: nowrap;
}
.tool-cat {
  font-family: var(--font-m);
  font-size: .7rem;
  color: var(--dim);
  text-transform: lowercase;
}
.pipe-tool-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .75rem;
  border-radius: 8px;
  font-family: var(--font-m);
  font-size: .75rem;
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--teal);
}

/* ==========================================================================
   ABOUT | DataFrame view
   ========================================================================== */
.about-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 3rem; align-items: start; }
.about-text p { font-size: 1.06rem; margin-bottom: 1.1rem; }
.about-text p.lead { font-size: 1.25rem; color: var(--text); font-family: var(--font-d); line-height: 1.45; }
.about-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-top: 1.75rem; }
.about-quick div { padding: .9rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--ink-1); }
.about-quick b { display: block; font-family: var(--font-d); font-size: 1.4rem; color: #fff; }
.about-quick span { font-family: var(--font-m); font-size: .7rem; color: var(--dim); }

.df { font-family: var(--font-m); font-size: .8rem; }
.df-head { display: flex; justify-content: space-between; align-items: center; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); color: var(--dim); font-size: .74rem; }
.df-head code { color: var(--teal); }
.df table { width: 100%; border-collapse: collapse; }
.df th, .df td { padding: .8rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.df th { color: var(--dim); font-weight: 500; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; background: rgba(6,8,15,.4); }
.df td:first-child { color: var(--dim); width: 32px; }
.df td.area { color: var(--text); font-family: var(--font-b); font-weight: 500; font-size: .88rem; }
.df tr { transition: background .2s; }
.df tbody tr:hover { background: rgba(45,212,191,.04); }
.lvl { display: flex; align-items: center; gap: .55rem; }
.lvl-track { width: 90px; height: 6px; background: var(--ink-3); border-radius: 6px; overflow: hidden; }
.lvl-fill { height: 100%; width: 0; background: var(--grad-data); border-radius: 6px; transition: width 1.4s var(--ease); }
.df-foot { padding: .7rem 1.1rem; color: var(--dim); font-size: .72rem; }

/* ==========================================================================
   MEDALLION PIPELINE
   ========================================================================== */
.pipe-wrap { padding: 2rem; }
.pipe { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; margin-bottom: 1.75rem; }
.pipe-track { position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: linear-gradient(90deg, var(--sky), var(--bronze), var(--silver), var(--gold), var(--violet)); opacity: .35; transform: translateY(-50%); }
.pipe-packets { position: absolute; left: 6%; right: 6%; top: 50%; height: 0; }
.packet { position: absolute; top: -4px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); animation: flow 6s linear infinite; }
.packet:nth-child(2) { animation-delay: -1.5s; background: var(--amber); box-shadow: 0 0 12px var(--amber); }
.packet:nth-child(3) { animation-delay: -3s; background: var(--violet); box-shadow: 0 0 12px var(--violet); }
.packet:nth-child(4) { animation-delay: -4.5s; }
@keyframes flow { 0% { left: 0; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.stage {
  position: relative; z-index: 1; text-align: left;
  padding: 1.1rem; border-radius: var(--r); background: var(--ink-1); border: 1px solid var(--line);
  transition: border-color .3s, transform .35s var(--ease), box-shadow .3s;
}
.stage:hover { transform: translateY(-4px); }
.stage.active { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 20px 40px -20px var(--c); }
.stage-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; margin-bottom: .8rem; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.stage-ico svg { width: 20px; height: 20px; }
.stage-step { font-family: var(--font-m); font-size: .68rem; color: var(--dim); }
.stage-name { font-family: var(--font-d); font-weight: 600; font-size: 1.05rem; color: #fff; }
.stage[data-stage="src"] { --c: var(--sky); }
.stage[data-stage="bronze"] { --c: var(--bronze); }
.stage[data-stage="silver"] { --c: var(--silver); }
.stage[data-stage="gold"] { --c: var(--gold); }
.stage[data-stage="ai"] { --c: var(--violet); }
.pipe-detail { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; padding: 1.5rem; border-radius: var(--r); background: rgba(6,8,15,.55); border: 1px dashed var(--line-2); min-height: 150px; }
.pipe-detail h3 { margin-bottom: .5rem; }
.pipe-detail .code { font-family: var(--font-m); font-size: .8rem; color: var(--muted); background: var(--ink-1); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; white-space: pre; overflow-x: auto; line-height: 1.7; }
.pipe-detail .code .k { color: var(--violet); } .pipe-detail .code .s { color: var(--amber); } .pipe-detail .code .f { color: var(--teal); } .pipe-detail .code .c { color: var(--dim); }
.pipe-tools { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.fade-swap { animation: fadeSwap .45s var(--ease); }
@keyframes fadeSwap { from { opacity: 0; transform: translateY(8px); } }

/* ==========================================================================
   STACK (tabs)
   ========================================================================== */
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.tab {
  font-family: var(--font-m); font-size: .82rem; padding: .6rem 1rem; border-radius: 10px;
  border: 1px solid var(--line); color: var(--muted); background: var(--ink-1); transition: all .25s;
}
.tab:hover { color: #fff; border-color: var(--line-2); }
.tab.active { color: #04221E; background: var(--teal); border-color: var(--teal); }
.tab-panel { display: none; grid-template-columns: 1.1fr 1fr; gap: 2rem; padding: 2rem; }
.tab-panel.active { display: grid; animation: fadeSwap .45s var(--ease); }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .75rem; }
.icon-cell { display: flex; flex-direction: column; align-items: center; gap: .55rem; padding: 1rem .5rem; border-radius: var(--r); background: var(--ink-1); border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s; }
.icon-cell:hover { transform: translateY(-4px); border-color: rgba(45,212,191,.4); }
.icon-cell img { width: 40px; height: 40px; object-fit: contain; }
.icon-cell img.inv { filter: invert(1) hue-rotate(180deg); }
.icon-cell span { font-family: var(--font-m); font-size: .7rem; color: var(--muted); text-align: center; }
.comp-list { list-style: none; display: grid; gap: .6rem; margin-top: 1.25rem; }
.comp-list li { display: flex; gap: .7rem; align-items: center; font-size: .95rem; color: var(--text); }
.comp-list li::before { content: '→'; font-family: var(--font-m); color: var(--teal); }

/* ==========================================================================
   PROJECTS | dataset cards
   ========================================================================== */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.project { display: flex; flex-direction: column; padding: 1.5rem; transition: opacity .3s, transform .35s var(--ease), border-color .3s; }
.project:hover { transform: translateY(-5px); }
.project.hide { display: none; }
.project-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.1rem; }
.project-file { font-family: var(--font-m); font-size: .75rem; color: var(--dim); }
.project-file b { color: var(--teal); font-weight: 500; }
.gh-btn { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--muted); transition: all .25s; }
.gh-btn:hover { color: #04221E; background: var(--teal); border-color: var(--teal); }
.gh-btn svg { width: 17px; height: 17px; }
.project h3 { margin-bottom: .6rem; }
.project p { font-size: .92rem; flex-grow: 1; margin-bottom: 1.25rem; }
.schema { font-family: var(--font-m); font-size: .72rem; border-top: 1px solid var(--line); padding-top: 1rem; display: grid; gap: .35rem; }
.schema div { display: flex; justify-content: space-between; gap: 1rem; }
.schema span { color: var(--dim); }
.schema b { color: var(--text); font-weight: 500; text-align: right; }

/* ==========================================================================
   EDUCATION
   ========================================================================== */
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.learn-path { padding: 2rem; }
.learn-path h3 { margin-bottom: 1.5rem; }
.lp-step { display: grid; grid-template-columns: 44px 1fr; gap: 1rem; position: relative; padding-bottom: 1.6rem; }
.lp-step:last-child { padding-bottom: 0; }
.lp-step:not(:last-child)::before { content: ''; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px; background: linear-gradient(var(--teal), var(--violet)); opacity: .35; }
.lp-num { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-m); font-weight: 700; color: var(--teal); background: rgba(45,212,191,.08); border: 1px solid rgba(45,212,191,.3); }
.lp-step h4 { font-size: 1.02rem; margin-bottom: .25rem; }
.lp-step p { font-size: .9rem; }
.channels { display: grid; gap: .85rem; }
.channel { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; }
.channel:hover { transform: translateX(6px); }
.channel-logo { width: 48px; height: 48px; border-radius: 12px; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; }
.channel-logo img { width: 100%; height: 100%; object-fit: contain; }
.channel-logo.txt { font-family: var(--font-d); font-weight: 700; font-size: .85rem; }
.channel h4 { font-size: 1rem; display: flex; align-items: center; gap: .4rem; }
.channel h4 svg { width: 13px; height: 13px; color: var(--dim); }
.channel p { font-size: .84rem; }
.edu-quote { margin-top: 1.5rem; padding: 1.4rem 1.5rem; border-left: 3px solid var(--amber); background: rgba(245,181,68,.05); border-radius: 0 var(--r) var(--r) 0; font-family: var(--font-d); font-size: 1.08rem; color: var(--text); }

/* ==========================================================================
   CERTIFICATIONS
   ========================================================================== */
.certs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.cert { padding: 1.75rem 1.4rem; text-align: center; display: flex; flex-direction: column; align-items: center; }
.cert:hover { transform: translateY(-6px); }
.cert-badge { width: 110px; height: 110px; margin-bottom: 1.25rem; display: grid; place-items: center; position: relative; }
.cert-badge::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: radial-gradient(circle, rgba(124,108,242,.35), transparent 70%); filter: blur(14px); }
.cert-badge img { position: relative; max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .5s var(--ease); }
.cert:hover .cert-badge img { transform: scale(1.08) rotate(-3deg); }
.cert h3 { font-size: 1rem; margin: .7rem 0 .35rem; }
.cert p { font-size: .82rem; margin-bottom: 1rem; flex-grow: 1; }
.cert a { font-family: var(--font-m); font-size: .75rem; color: var(--teal); }
.cert a:hover { text-decoration: underline; }

/* ==========================================================================
   ARTICLES | query result
   ========================================================================== */
.news-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 1.5rem; align-items: start; }
.news-card { padding: 2rem; position: sticky; top: calc(var(--nav-h) + 1.5rem); background: radial-gradient(circle at 0% 0%, rgba(124,108,242,.22), transparent 55%), linear-gradient(180deg, var(--ink-2), var(--ink-1)); }
.news-card h3 { font-size: 1.8rem; margin: 1rem 0 .75rem; }
.news-card p { margin-bottom: 1.5rem; }
.news-card .feature { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px dashed var(--line-2); }
.news-card .feature a { display: block; font-family: var(--font-d); font-weight: 600; color: #fff; margin-top: .5rem; }
.news-card .feature a:hover { color: var(--amber); }
.query { font-family: var(--font-m); font-size: .8rem; }
.query-head { padding: .9rem 1.2rem; border-bottom: 1px solid var(--line); color: var(--muted); }
.query-head .k { color: var(--violet); } .query-head .s { color: var(--amber); }
.row-art { display: grid; grid-template-columns: 34px 1fr auto; gap: 1rem; align-items: center; padding: 1.05rem 1.2rem; border-bottom: 1px solid var(--line); transition: background .2s; }
.row-art:hover { background: rgba(45,212,191,.05); }
.row-art:hover .ra-title { color: var(--teal); }
.ra-idx { color: var(--dim); }
.ra-title { font-family: var(--font-b); font-size: .95rem; font-weight: 500; color: var(--text); transition: color .2s; display: block; }
.ra-tag { font-size: .7rem; color: var(--dim); margin-top: .2rem; display: block; }
.ra-go { color: var(--dim); font-size: 1.1rem; transition: transform .25s var(--ease), color .2s; }
.row-art:hover .ra-go { transform: translateX(4px); color: var(--teal); }
.query-foot { padding: .75rem 1.2rem; color: var(--dim); font-size: .72rem; }

/* ==========================================================================
   DATA VIEW & OBSERVABILITY HUB
   ========================================================================== */
.dv-hub {
  padding: 2.25rem;
  background: radial-gradient(circle at 100% 0%, rgba(0, 242, 254, 0.08), transparent 50%),
              radial-gradient(circle at 0% 100%, rgba(123, 44, 191, 0.08), transparent 50%),
              linear-gradient(180deg, var(--ink-2), var(--ink-1));
  border: 1px solid rgba(0, 242, 254, 0.22);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
}
.dv-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.dv-title-group h3 {
  font-size: 1.5rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: .65rem;
}
.dv-query-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.dv-query-tab {
  font-family: var(--font-m);
  font-size: .8rem;
  padding: .5rem .95rem;
  border-radius: 9px;
  background: var(--ink-0);
  border: 1px solid var(--line);
  color: var(--muted);
  transition: all .25s var(--ease);
}
.dv-query-tab:hover {
  color: #fff;
  border-color: var(--teal);
}
.dv-query-tab.active {
  background: rgba(0, 242, 254, 0.14);
  border-color: var(--teal);
  color: var(--teal);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.25);
}
.dv-query-bar {
  background: #04060c;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .9rem 1.25rem;
  font-family: var(--font-m);
  font-size: .84rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}
.dv-query-bar .k { color: var(--violet); font-weight: 600; }
.dv-query-bar code { color: #fff; }
.dv-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(6, 8, 15, 0.65);
}
.dv-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-m);
  font-size: .82rem;
  text-align: left;
}
.dv-table th {
  padding: .9rem 1.2rem;
  background: rgba(16, 23, 43, 0.9);
  color: var(--dim);
  font-weight: 600;
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--line);
}
.dv-table td {
  padding: .9rem 1.2rem;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  vertical-align: middle;
}
.dv-table tr:hover {
  background: rgba(0, 242, 254, 0.04);
}
.dv-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
.dv-metric-box {
  padding: 1rem 1.15rem;
  background: var(--ink-0);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.dv-metric-box span {
  display: block;
  font-family: var(--font-m);
  font-size: .72rem;
  color: var(--dim);
  text-transform: uppercase;
}
.dv-metric-box strong {
  display: block;
  font-family: var(--font-d);
  font-size: 1.5rem;
  color: #fff;
  margin-top: .25rem;
}

/* ==========================================================================
   GITHUB INSIGHTS
   ========================================================================== */
.gh-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; justify-items: center; }
.gh-card { padding: 1.5rem; display: flex; flex-direction: column; gap: .85rem; border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s; width: 100%; }
.gh-card:hover { transform: translateY(-3px); border-color: rgba(0, 242, 254, 0.3); }
.gh-card.center { max-width: 820px; margin: 0 auto; width: 100%; }
.gh-card.center img { display: block; margin: 0 auto; max-width: 100%; }
.gh-card.full { width: 100%; max-width: 960px; margin: 0 auto; }
.gh-card .label { font-family: var(--font-m); font-size: .78rem; color: var(--teal); display: flex; align-items: center; justify-content: space-between; }
.gh-card img { width: 100%; height: auto; border-radius: 10px; }

/* ==========================================================================
   VISION
   ========================================================================== */
.vision { text-align: center; padding: 8rem 0; }
.vision blockquote { font-family: var(--font-d); font-size: clamp(1.7rem, 3.6vw, 2.8rem); line-height: 1.25; letter-spacing: -0.025em; color: #fff; max-width: 980px; margin: 0 auto 1.75rem; }
.vision p { max-width: 640px; margin: 0 auto; font-size: 1.08rem; }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.contact-card, .form-card { padding: 2rem; }
.email-box { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; margin: 1.5rem 0; background: var(--ink-0); border: 1px solid rgba(45,212,191,.3); border-radius: var(--r); }
.email-box span { font-family: var(--font-m); color: var(--teal); font-size: .95rem; word-break: break-all; }
.links { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.link-btn { display: flex; align-items: center; gap: .7rem; padding: .8rem .95rem; border-radius: 12px; border: 1px solid var(--line); background: var(--ink-1); font-size: .9rem; font-weight: 500; transition: all .25s var(--ease); }
.link-btn svg { width: 18px; height: 18px; color: var(--b, var(--teal)); flex-shrink: 0; }
.link-btn:hover { border-color: var(--b, var(--teal)); transform: translateY(-2px); background: var(--ink-2); }
.field { margin-bottom: 1rem; }
.field label { display: block; font-family: var(--font-m); font-size: .74rem; color: var(--muted); margin-bottom: .45rem; }
.field input, .field textarea {
  width: 100%; padding: .85rem 1rem; border-radius: 10px; background: var(--ink-0); border: 1px solid var(--line-2);
  color: #fff; font: inherit; font-size: .95rem; outline: none; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(45,212,191,.15); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { border-top: 1px solid var(--line); padding: 3rem 0 2rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; }
.footer small { font-family: var(--font-m); font-size: .75rem; color: var(--dim); }
.footer-wave { display: block; width: 100%; height: 70px; margin-top: 2rem; }

.to-top { position: fixed; bottom: 1.5rem; left: 1.5rem; z-index: 90; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--ink-2); border: 1px solid var(--line-2); color: var(--teal); opacity: 0; pointer-events: none; transform: translateY(12px); transition: all .3s var(--ease); }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--teal); color: #04221E; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1240px) {
  .nav-links { display: none; }
  .burger { display: flex; }
}
@media (max-width: 1040px) {
  .hero-grid, .about-grid, .edu-grid, .news-grid, .contact-grid { grid-template-columns: 1fr; }
  .projects { grid-template-columns: repeat(2, 1fr); }
  .certs { grid-template-columns: repeat(2, 1fr); }
  .tab-panel { grid-template-columns: 1fr; }
  .news-card { position: static; }
}
@media (max-width: 760px) {
  .section { padding: 5rem 0; }
  .nav-right .btn { display: none; }
  .pipe { grid-template-columns: 1fr; }
  .pipe-track, .pipe-packets { display: none; }
  .pipe-detail { grid-template-columns: 1fr; }
  .pipe-wrap, .tab-panel { padding: 1.25rem; }
  .projects, .certs, .gh-grid, .links { grid-template-columns: 1fr; }
  .about-quick { grid-template-columns: 1fr 1fr; }
  .df th:nth-child(4), .df td:nth-child(4) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  #flow-canvas { opacity: 0.3; }
}
