/* ==========================================================
   Chris Tejas Lincoln — "The Ledger"
   Executive Ledger × Data Intelligence Terminal
   Inspired by 21st.dev: Portfolio Hero, Bento Grid Hero, Feature Bento
   ========================================================== */

:root {
  --bg: #070b14;
  --bg-2: #0c1220;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f7;
  --muted: #8a94a8;
  --accent: #d4ff3a;        /* ledger-lime, nod to 21st.dev hero */
  --accent-ink: #0a0f02;
  --gold: #f2c14e;
  --emerald: #34d399;
  --cyan: #38bdf8;
  --violet: #a78bfa;
  --rose: #fb7185;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --maxw: 1240px;
}

[data-theme="light"] {
  --bg: #f6f1e7;
  --bg-2: #efe8da;
  --surface: rgba(30, 24, 10, 0.035);
  --surface-2: rgba(30, 24, 10, 0.06);
  --line: rgba(30, 24, 10, 0.1);
  --line-strong: rgba(30, 24, 10, 0.2);
  --text: #1c1a14;
  --muted: #6b6455;
  --accent: #1f4d3a;
  --accent-ink: #f6f1e7;
  --gold: #a8741a;
  --emerald: #1f7a55;
  --cyan: #1e6a8f;
  --violet: #5b4a9c;
  --rose: #b4334a;
  --shadow: 0 30px 60px -30px rgba(60, 40, 10, 0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.4s, color 0.4s;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 0.78rem; }
.small-cap { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.center { text-align: center; margin-top: 28px; }
em { font-style: italic; font-family: var(--serif); color: var(--accent); font-weight: 400; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- ambient layers ---------- */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.cursor-glow {
  position: fixed; width: 520px; height: 520px; border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 10%, transparent), transparent 65%);
  transform: translate(-50%, -50%); transition: opacity 0.3s; left: -999px; top: -999px;
}
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; }
.scroll-progress span { display: block; height: 100%; width: 0; background: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px;
  font-weight: 600; font-size: 0.92rem; transition: transform 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
  border: 1px solid transparent; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 14px; font-size: 0.82rem; }
.btn[disabled] { opacity: 0.6; pointer-events: none; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  display: grid; place-items: center; transition: border-color 0.2s;
}
.icon-btn:hover { border-color: var(--accent); }
kbd { font-family: var(--mono); font-size: 0.7rem; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: min(calc(100% - 28px), var(--maxw)); display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 10px 12px 10px 16px; border-radius: 16px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(16px);
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.brand-mono {
  font-family: var(--mono); font-weight: 700; font-size: 0.78rem; padding: 6px 8px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink);
}
.brand-text { display: flex; flex-direction: column; font-weight: 600; font-size: 0.9rem; line-height: 1.15; }
.brand-text small { font-family: var(--mono); font-size: 0.62rem; color: var(--muted); letter-spacing: 0.12em; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 12px; border-radius: 8px; font-size: 0.86rem; color: var(--muted); transition: color 0.2s, background 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; gap: 8px; align-items: center; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 130px 24px 40px; max-width: var(--maxw); margin: 0 auto; z-index: 2; }
.hero-grid-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
}
.hero-inner { text-align: center; }
.hero-meta {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  font-size: 0.74rem; color: var(--muted); padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface);
}
.sep { opacity: 0.4; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); flex: none;
  box-shadow: 0 0 0 0 var(--emerald); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--emerald) 60%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.hero-name {
  font-family: var(--serif); font-weight: 800; letter-spacing: -0.04em; line-height: 0.86;
  font-size: clamp(3.6rem, 13vw, 11.5rem); margin: 34px 0 26px; text-transform: uppercase;
}
.hero-name .line { display: block; }
.hero-name .accent { color: var(--accent); font-style: italic; font-weight: 600; }
.with-portrait { position: relative; display: inline-flex !important; align-items: center; gap: 0.18em; }
.portrait {
  display: inline-block; width: 0.62em; height: 0.86em; border-radius: 999px; overflow: hidden;
  border: 3px solid var(--accent); transform: rotate(6deg); transition: transform 0.4s;
  box-shadow: var(--shadow); background: var(--surface-2);
}
.portrait:hover { transform: rotate(0) scale(1.06); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.blur-word { display: inline-block; filter: blur(14px); opacity: 0; transform: translateY(-24px); transition: all 0.9s cubic-bezier(.2,.7,.2,1); }
.blur-word.in { filter: blur(0); opacity: 1; transform: none; }
.hero-tag { max-width: 720px; margin: 0 auto; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.15rem); }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 22px 0 28px; }
.badge {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
}
.badge.accent { border-color: var(--accent); color: var(--accent); }
.hero-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.bento-kpis {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 64px;
}
.kpi {
  position: relative; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); overflow: hidden; transition: border-color 0.3s, transform 0.3s;
}
.kpi:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.kpi::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--kpi-c, var(--accent));
}
.kpi-value { font-family: var(--mono); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -0.03em; color: var(--kpi-c, var(--accent)); }
.kpi-label { font-weight: 600; margin: 6px 0 4px; }
.kpi-sub { font-size: 0.8rem; color: var(--muted); }
.kpi:first-child { grid-column: span 2; }
.kpi:first-child .kpi-value { font-size: clamp(2.2rem, 5vw, 3.6rem); }

/* spotlight hover (Feature Bento) */
.spot { position: relative; }
.spot::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 12%, transparent), transparent 45%);
  transition: opacity 0.3s;
}
.spot:hover::before { opacity: 1; }

/* ---------- ticker (21st.dev-inspired fintech-pill marquee) ---------- */
.ticker {
  border-block: 1px solid var(--line); overflow: hidden; padding: 18px 0; position: relative; z-index: 2;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 60%, var(--bg-2)), var(--bg-2));
  cursor: grab; user-select: none; touch-action: pan-y;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 7%, #000 93%, transparent 100%);
}
.ticker:active { cursor: grabbing; }
.ticker-track { display: flex; align-items: center; width: max-content; will-change: transform; }
.ticker-slot { padding-right: 16px; display: inline-flex; align-items: center; }
.ticker-pill {
  display: inline-flex; align-items: center; gap: 11px; white-space: nowrap;
  padding: 9px 15px 9px 12px; border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  box-shadow: 0 6px 20px -12px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.22s cubic-bezier(.2,.7,.2,1), border-color 0.22s, box-shadow 0.22s;
}
.ticker-pill:hover {
  transform: translateY(-2px);
  border-color: var(--pill-c, var(--accent));
  box-shadow: 0 10px 26px -12px color-mix(in srgb, var(--pill-c, var(--accent)) 45%, transparent);
}
.ticker-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: var(--pill-c, var(--accent));
  box-shadow: 0 0 8px color-mix(in srgb, var(--pill-c, var(--accent)) 75%, transparent);
}
.ticker-tag {
  font-family: var(--mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: 999px;
  color: var(--pill-c, var(--accent));
  background: color-mix(in srgb, var(--pill-c, var(--accent)) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--pill-c, var(--accent)) 32%, transparent);
}
.ticker-title { font-size: 0.84rem; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.ticker-detail { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.ticker-sep { color: var(--line-strong); font-size: 0.75rem; }

/* ---------- sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 110px 24px 20px; position: relative; z-index: 2; }
.section-head { margin-bottom: 40px; }
.eyebrow { display: inline-block; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.section h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -0.03em; }
.lede { color: var(--muted); max-width: 640px; margin-top: 14px; }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s, transform 0.8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

.card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  transition: border-color 0.3s, transform 0.3s;
}
.card:hover { border-color: var(--line-strong); }

/* chips / seg */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.82rem; color: var(--muted);
  transition: all 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip .count { font-family: var(--mono); font-size: 0.7rem; opacity: 0.7; margin-left: 4px; }
.seg { display: inline-flex; margin-top: 22px; border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.seg-btn { padding: 7px 16px; border-radius: 999px; font-size: 0.82rem; color: var(--muted); }
.seg-btn.active { background: var(--surface-2); color: var(--text); }

/* ---------- academic ---------- */
.acad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.acad-card { padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.acad-card .period { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); }
.acad-card h3 { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; line-height: 1.2; }
.acad-card .role { color: var(--accent); font-weight: 600; font-size: 0.92rem; }
.acad-card .stat {
  font-family: var(--mono); font-size: 0.84rem; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); border-left: 3px solid var(--gold);
}
.acad-card p { font-size: 0.9rem; color: var(--muted); }
.milestones { list-style: none; display: flex; flex-direction: column; border-top: 1px dashed var(--line); }
.milestones li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 0.82rem; }
.milestones li span:last-child { font-family: var(--mono); text-align: right; color: var(--text); font-size: 0.76rem; }
.milestones li.active span:last-child { color: var(--gold); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 0.72rem; padding: 4px 9px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.link-btn { font-size: 0.82rem; color: var(--accent); font-weight: 600; display: inline-flex; gap: 6px; margin-top: auto; }
.link-btn:hover { text-decoration: underline; }
.sgpa-bars { display: flex; gap: 10px; align-items: flex-end; height: 70px; padding: 4px 0; }
.sgpa-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.sgpa-bar i { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 30%, transparent)); height: 0; transition: height 1.2s cubic-bezier(.2,.7,.2,1); }
.sgpa-bar i.pending { background: repeating-linear-gradient(45deg, var(--line-strong) 0 4px, transparent 4px 8px); }
.sgpa-bar b, .sgpa-bar small { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); font-weight: 400; }
.sgpa-bar b { color: var(--text); font-weight: 600; }

/* ledger table */
.ledger-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.ledger { width: 100%; border-collapse: collapse; font-size: 0.86rem; min-width: 760px; }
.ledger th, .ledger td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.ledger th { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
.ledger td.num { font-family: var(--mono); }
.ledger tr.group td { font-family: var(--serif); font-weight: 600; font-size: 1rem; background: var(--surface); }
.status { font-family: var(--mono); font-size: 0.68rem; padding: 3px 8px; border-radius: 4px; }
.status.verified { color: var(--emerald); background: color-mix(in srgb, var(--emerald) 12%, transparent); }
.status.active { color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent); }

/* ---------- internships ---------- */
.intern-list { display: flex; flex-direction: column; gap: 18px; }
.intern { display: grid; grid-template-columns: 1.25fr 1fr; overflow: hidden; }
.intern-body { padding: 30px; display: flex; flex-direction: column; gap: 14px; }
.intern-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.intern h3 { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; line-height: 1.15; }
.intern .company { color: var(--muted); font-size: 0.9rem; }
.verify-pill { font-family: var(--mono); font-size: 0.7rem; padding: 6px 10px; border-radius: 6px; color: var(--emerald); border: 1px solid color-mix(in srgb, var(--emerald) 40%, transparent); }
.intern-headline { font-family: var(--serif); font-size: 1.15rem; font-style: italic; color: var(--accent); }
.intern ul.bullets { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.intern ul.bullets li { font-size: 0.9rem; color: var(--muted); padding-left: 20px; position: relative; }
.intern ul.bullets li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.intern-side { border-left: 1px solid var(--line); display: flex; flex-direction: column; background: var(--bg-2); }
.intern-side .viz { padding: 26px; flex: 1; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.metric-grid div { background: var(--bg-2); padding: 16px; }
.metric-grid b { display: block; font-family: var(--mono); font-size: 1.15rem; }
.metric-grid span { font-size: 0.74rem; color: var(--muted); }
.bar-row { display: flex; flex-direction: column; gap: 6px; }
.bar-row header { display: flex; justify-content: space-between; font-size: 0.78rem; }
.bar-row header b { font-family: var(--mono); }
.bar-track { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: 999px; background: var(--c, var(--accent)); transition: width 1.4s cubic-bezier(.2,.7,.2,1); }
.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut { width: 130px; height: 130px; flex: none; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; font-size: 0.8rem; }
.donut-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: middle; }

/* ---------- projects ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.proj { grid-column: span 2; display: flex; flex-direction: column; overflow: hidden; cursor: pointer; }
.proj.wide { grid-column: span 3; }
.proj:hover { transform: translateY(-4px); }
.proj-media { aspect-ratio: 16/9; overflow: hidden; position: relative; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.proj-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.6s; }
.proj:hover .proj-media img { transform: scale(1.05); }
.proj-media .ph {
  position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-size: 0.8rem; color: var(--muted);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 24px 24px;
}
.ph-inner { text-align: center; padding: 20px; }
.ph-inner strong { display: block; font-family: var(--serif); font-size: 1.6rem; color: var(--text); margin-bottom: 4px; }
.proj-media .cat { position: absolute; top: 12px; left: 12px; }
.proj-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.proj h3 { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; line-height: 1.2; }
.proj .sub { font-size: 0.84rem; color: var(--muted); }
.proj-metrics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.proj-metrics span { font-family: var(--mono); font-size: 0.75rem; padding: 4px 8px; border-radius: 4px; border: 1px solid var(--line); }
.proj-links { display: flex; gap: 14px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 0.8rem; }
.proj-links a { color: var(--muted); font-weight: 600; }
.proj-links a:hover { color: var(--accent); }

/* ---------- graph ---------- */
.graph-shell { display: grid; grid-template-columns: 290px 1fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-height: 600px; background: var(--bg-2); }
.graph-side { padding: 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 640px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.graph-side::-webkit-scrollbar, .graph-inspector ul::-webkit-scrollbar { width: 6px; }
.graph-side::-webkit-scrollbar-thumb, .graph-inspector ul::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
.graph-side::-webkit-scrollbar-track, .graph-inspector ul::-webkit-scrollbar-track { background: transparent; }
.graph-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.graph-stats div { padding: 10px; border-radius: var(--radius-sm); background: var(--surface-2); text-align: center; }
.graph-stats b { display: block; font-family: var(--mono); font-size: 1.2rem; }
.graph-stats span { font-size: 0.66rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.graph-legend { display: flex; flex-direction: column; gap: 4px; }
.legend-item { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; padding: 5px 8px; border-radius: 6px; text-align: left; color: var(--muted); }
.legend-item:hover, .legend-item.active { background: var(--surface-2); color: var(--text); }
.legend-item i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.graph-inspector { padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); font-size: 0.84rem; margin: 6px 0; }
.graph-inspector h4 { font-family: var(--serif); font-size: 1.05rem; margin-bottom: 6px; line-height: 1.25; }
.graph-inspector ul { list-style: none; margin-top: 8px; display: flex; flex-direction: column; gap: 4px; max-height: 180px; overflow-y: auto; }
.graph-inspector li { font-size: 0.76rem; color: var(--muted); }
.graph-inspector li b { color: var(--text); font-weight: 500; }
#graph-canvas { width: 100%; height: 100%; min-height: 600px; display: block; cursor: grab; }
#graph-canvas:active { cursor: grabbing; }

/* ---------- research ---------- */
.research-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.research { display: grid; grid-template-columns: 170px 1fr; overflow: hidden; cursor: pointer; }
.research:hover { transform: translateY(-3px); }
.research-thumb { background: var(--bg-2); border-right: 1px solid var(--line); overflow: hidden; position: relative; }
.research-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.research-thumb .pages { position: absolute; bottom: 8px; left: 8px; }
.research-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.research-body .type { font-family: var(--mono); font-size: 0.68rem; color: var(--gold); letter-spacing: 0.08em; text-transform: uppercase; }
.research-body h3 { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; line-height: 1.25; }
.research-body .org { font-size: 0.78rem; color: var(--muted); }
.research-body .hl, .rf-main .hl { font-size: 0.82rem; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border-left: 3px solid var(--accent); }
.research-feature {
  grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr 1fr; overflow: hidden; cursor: pointer;
  border-color: color-mix(in srgb, var(--gold) 35%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 6%, var(--surface)) 0%, var(--surface) 60%);
}
.research-feature:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--gold) 60%, var(--line-strong)); }
.rf-main { padding: 26px 28px; display: flex; flex-direction: column; gap: 12px; }
.rf-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rf-press-badge {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold);
  padding: 5px 11px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  background: color-mix(in srgb, var(--gold) 12%, transparent);
}
.rf-in {
  font-style: normal; font-family: var(--sans); font-weight: 800; font-size: 0.72rem; line-height: 1;
  padding: 3px 5px; border-radius: 4px; background: #0a66c2; color: #fff; text-transform: lowercase;
}
.rf-main h3 { font-family: var(--serif); font-size: clamp(1.25rem, 2.2vw, 1.65rem); font-weight: 600; line-height: 1.2; }
.rf-quote {
  font-family: var(--serif); font-style: italic; font-size: 0.96rem; line-height: 1.5; color: var(--text);
  padding: 12px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line);
}
.rf-proof {
  border-left: 1px solid var(--line); background: var(--bg-2); padding: 24px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
}
.rf-clip {
  padding: 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface);
  display: flex; flex-direction: column; gap: 8px;
}
.rf-clip-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); }
.rf-live-pill {
  font-family: var(--mono); font-size: 0.65rem; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  white-space: nowrap; flex: none;
  color: var(--emerald); background: color-mix(in srgb, var(--emerald) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--emerald) 35%, transparent);
}
.rf-clip-title { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; line-height: 1.25; }
.rf-clip-meta { font-size: 0.8rem; color: var(--muted); }
.rf-clip-url {
  font-family: var(--mono); font-size: 0.72rem; color: var(--cyan); background: var(--bg);
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); word-break: break-all;
}
.rf-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- feed ---------- */
.sync-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 20px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--emerald) 30%, var(--line));
  background: color-mix(in srgb, var(--emerald) 5%, var(--surface)); margin-bottom: 18px;
}
.sync-status { display: flex; align-items: center; gap: 14px; }
.sync-status strong { display: block; font-size: 0.95rem; }
.sync-actions { display: flex; gap: 8px; }
.spin { display: inline-block; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.feed-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.feed-tools .chips { margin-top: 0; flex: 1; }
.feed-tools input, .feed-tools select {
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); outline: none;
}
.feed-tools input { min-width: 240px; }
.feed-tools input:focus, .feed-tools select:focus { border-color: var(--accent); }
.feed-tools select option { background: var(--bg); }
.feed-stats { font-size: 0.74rem; color: var(--muted); margin: 16px 0; display: flex; gap: 20px; flex-wrap: wrap; }
.feed-stats b { color: var(--text); }
.feed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; align-items: stretch; }
.post { padding: 20px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; }
.post:hover { border-color: var(--line-strong); }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-head img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.post-head b { display: block; font-size: 0.84rem; }
.post-head span { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); }
.post-head .cat { margin-left: auto; }
.post h4 { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; line-height: 1.3; }
.post p { font-size: 0.86rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.post-media { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); position: relative; max-height: 260px; }
.post-media img { width: 100%; object-fit: cover; max-height: 260px; }
.post-media .badge { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,0.7); color: #fff; }
.post-foot { margin-top: auto; display: flex; gap: 14px; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); align-items: center; }
.post-foot a { margin-left: auto; color: var(--accent); }
.post.is-new { border-color: var(--accent); }
.post .new-pill { font-family: var(--mono); font-size: 0.62rem; padding: 2px 6px; border-radius: 4px; background: var(--accent); color: var(--accent-ink); }

/* ---------- certs ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cert { overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.cert:hover { transform: translateY(-3px); }
.cert-img { aspect-ratio: 4/3; background: #fff; overflow: hidden; border-bottom: 1px solid var(--line); }
.cert-img img { width: 100%; height: 100%; object-fit: contain; }
.cert-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.cert-body b { font-size: 0.88rem; line-height: 1.3; }
.cert-body span { font-size: 0.74rem; color: var(--muted); }
.cert-body code { font-family: var(--mono); font-size: 0.66rem; color: var(--muted); margin-top: auto; padding-top: 8px; word-break: break-all; }

/* ---------- beyond ---------- */
.beyond-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.beyond { overflow: hidden; position: relative; aspect-ratio: 3/4; cursor: pointer; }
.beyond img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.beyond:hover img { transform: scale(1.06); }
.beyond-cap {
  position: absolute; inset: auto 0 0 0; padding: 28px 18px 18px; color: #fff;
  background: linear-gradient(transparent 0%, rgba(7,11,20,0.72) 38%, rgba(7,11,20,0.96) 100%);
}
.beyond-cap .tag { background: rgba(255,255,255,0.15); color: #fff; }
.beyond-cap h4 { font-family: var(--serif); font-size: 1.1rem; margin-top: 8px; line-height: 1.2; }
.beyond-cap p { font-size: 0.76rem; opacity: 0.8; margin-top: 4px; }

/* ---------- contact / footer ---------- */
.contact { max-width: var(--maxw); margin: 120px auto 0; padding: 80px 24px; text-align: center; border-top: 1px solid var(--line); position: relative; z-index: 2; }
.contact-title {
  font-family: var(--sans); font-weight: 600; font-size: clamp(2rem, 4.5vw, 3.75rem);
  line-height: 1.18; letter-spacing: -0.02em; word-spacing: 0.03em; margin: 10px 0 18px;
}
.contact-title em {
  font-family: var(--sans); font-style: normal; font-weight: 600; color: var(--accent);
}
.contact .lede { margin: 0 auto; }
.contact-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.footer { max-width: var(--maxw); margin: 0 auto; padding: 28px 24px 40px; display: flex; justify-content: center; text-align: center; gap: 14px; flex-wrap: wrap; font-size: 0.72rem; color: var(--muted); border-top: 1px solid var(--line); position: relative; z-index: 2; }

/* ---------- modal ---------- */
.modal, .cmdk { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3, 6, 12, 0.72); backdrop-filter: blur(6px); }
.modal-panel {
  position: relative; width: min(980px, 100%); max-height: 90vh; overflow-y: auto; border-radius: 20px;
  background: var(--bg); border: 1px solid var(--line-strong); box-shadow: var(--shadow); animation: pop 0.3s cubic-bezier(.2,.7,.2,1);
}
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.modal-close { position: sticky; top: 14px; float: right; margin: 14px 14px 0 0; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); z-index: 2; }
.modal-close:hover { border-color: var(--accent); }
.m-wrap { padding: 34px; display: flex; flex-direction: column; gap: 18px; }
.m-wrap h2 { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.1; font-weight: 600; }
.m-wrap h5 { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.m-wrap p { color: var(--muted); white-space: pre-line; }
.m-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.m-two > div { padding: 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.carousel { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); }
.carousel img { width: 100%; max-height: 62vh; object-fit: contain; margin: 0 auto; }
.carousel img.carousel-slide { display: none; }
.carousel img.carousel-slide.active { display: block; }
.carousel-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff; font-size: 1.1rem; }
.carousel-nav.prev { left: 12px; } .carousel-nav.next { right: 12px; }
.carousel-count { position: absolute; bottom: 10px; right: 12px; font-family: var(--mono); font-size: 0.7rem; padding: 4px 8px; border-radius: 4px; background: rgba(0,0,0,0.6); color: #fff; }
.m-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.arch { display: flex; flex-direction: column; gap: 10px; }
.arch-step { display: grid; grid-template-columns: 38px 1fr; gap: 14px; align-items: start; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.arch-step i { font-style: normal; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; background: var(--accent); color: var(--accent-ink); }
.arch-step b { display: block; }
.arch-step span { font-size: 0.84rem; color: var(--muted); }
.arch-step code { font-family: var(--mono); font-size: 0.76rem; color: var(--accent); }
.form { display: flex; flex-direction: column; gap: 10px; }
.form input, .form textarea, .form select { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); outline: none; font: inherit; color: inherit; }
.form textarea { min-height: 140px; resize: vertical; }
.form select option { background: var(--bg); }

/* ---------- CV ---------- */
.cv { padding: 44px; background: #fff; color: #111; font-family: var(--sans); }
.cv h1 { font-family: var(--serif); font-size: 2.1rem; letter-spacing: -0.02em; line-height: 1.08; }
.cv .cv-head { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 20px; border-bottom: 2px solid #111; padding-bottom: 14px; margin-bottom: 18px; }
.cv .cv-head p { font-size: 0.84rem; color: #444; margin-top: 4px; }
.cv h3 { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; margin: 18px 0 8px; border-bottom: 1px solid #ccc; padding-bottom: 4px; }
.cv .row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 0.88rem; margin-top: 8px; }
.cv .row b { font-weight: 600; flex: 1 1 58%; min-width: 0; }
.cv .row span { color: #555; font-family: var(--mono); font-size: 0.74rem; text-align: right; max-width: 40%; }
.cv ul { margin: 4px 0 0 18px; font-size: 0.84rem; color: #333; }
.cv li { margin: 2px 0; }
.cv-tools { display: flex; gap: 10px; padding: 16px 44px; border-bottom: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
.cv-summary { font-size: 0.86rem; color: #222; margin: 0 0 10px; line-height: 1.48; }
.cv.compact { padding: 26px 34px; font-size: 0.84rem; }
.cv.compact h1 { font-size: 1.75rem; }
.cv.compact h3 { margin: 11px 0 5px; font-size: 0.68rem; }
.cv.compact .cv-head { padding-bottom: 8px; margin-bottom: 10px; }
.cv.compact .row { margin-top: 5px; font-size: 0.82rem; }
.cv.compact ul { font-size: 0.78rem; }

/* Local-only CV customizer */
.cv-customizer {
  padding: 20px 44px; border-bottom: 1px solid var(--line); background: var(--bg-2);
  display: flex; flex-direction: column; gap: 14px;
}
.cv-customizer[hidden] { display: none; }
.cv-c-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.cv-c-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-c-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cv-c-field { display: flex; flex-direction: column; gap: 5px; }
.cv-c-field label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cv-c-field input, .cv-c-field textarea {
  padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: inherit; font-size: 0.85rem; outline: none;
}
.cv-c-field textarea { min-height: 78px; resize: vertical; }
.cv-c-field input:focus, .cv-c-field textarea:focus { border-color: var(--accent); }
.cv-c-match {
  padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.cv-c-match b { color: var(--accent); }
.cv-c-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-c-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: 0.76rem; cursor: pointer;
}
.cv-c-pill input { accent-color: var(--accent); cursor: pointer; }
.cv-c-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }

/* ---------- cmdk ---------- */
.cmdk { place-items: start center; padding-top: 14vh; }
.cmdk-panel { position: relative; width: min(620px, 100%); border-radius: 16px; background: var(--bg); border: 1px solid var(--line-strong); box-shadow: var(--shadow); overflow: hidden; animation: pop 0.2s; }
#cmdk-input { width: 100%; padding: 18px 20px; border: none; border-bottom: 1px solid var(--line); background: transparent; outline: none; font-size: 1rem; }
#cmdk-list { list-style: none; max-height: 380px; overflow-y: auto; padding: 8px; }
#cmdk-list li { padding: 10px 12px; border-radius: 8px; display: flex; justify-content: space-between; gap: 12px; font-size: 0.9rem; cursor: pointer; }
#cmdk-list li span { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); white-space: nowrap; }
#cmdk-list li.sel { background: var(--surface-2); }
.cmdk-foot { padding: 10px 16px; font-size: 0.68rem; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 120; padding: 12px 18px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: 0.88rem; font-weight: 500; box-shadow: var(--shadow); animation: pop 0.25s; max-width: calc(100% - 40px); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .cert-grid, .beyond-grid { grid-template-columns: repeat(3, 1fr); }
  .proj, .proj.wide { grid-column: span 3; }
}
@media (max-width: 900px) {
  .acad-grid { grid-template-columns: 1fr; }
  .intern { grid-template-columns: 1fr; }
  .intern-side { border-left: none; border-top: 1px solid var(--line); }
  .research-grid { grid-template-columns: 1fr; }
  .research-feature { grid-template-columns: 1fr; }
  .rf-proof { border-left: none; border-top: 1px solid var(--line); }
  .graph-shell { grid-template-columns: 1fr; }
  .graph-shell > :last-child { order: -1; }
  .graph-side { border-right: none; border-top: 1px solid var(--line); max-height: none; }
  .bento-kpis { grid-template-columns: 1fr 1fr; }
  .m-two { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .feed-tools { flex-direction: column; align-items: stretch; }
  .feed-tools input { min-width: 0; width: 100%; }
  .feed-tools .chips { flex: none; width: 100%; }
  .feed-tools select { width: 100%; }
}
@media (max-width: 640px) {
  .brand-text { display: none; }
  .nav-brand { min-height: 36px; }
  .hero-meta { padding: 8px 14px; gap: 4px 12px; line-height: 1.45; }
  .hero-meta .sep { display: none; }
  #cv-open { display: inline-flex; padding: 7px 11px; font-size: 0.76rem; white-space: nowrap; }
  #graph-canvas { min-height: 430px; height: 430px; }
  .proj, .proj.wide { grid-column: span 6; }
  .proj-links a, .link-btn { min-height: 36px; display: inline-flex; align-items: center; }
  .cert-grid, .beyond-grid { grid-template-columns: 1fr 1fr; }
  .research { grid-template-columns: 1fr; }
  .research-thumb { height: 180px; border-right: none; border-bottom: 1px solid var(--line); }
  .bento-kpis { grid-template-columns: 1fr; }
  .kpi:first-child { grid-column: auto; }
  .m-wrap, .cv { padding: 20px; }
  .cv .cv-head { grid-template-columns: 1fr; gap: 8px; }
  .cv .cv-head > div:last-child { text-align: left !important; }
  .cv .row { flex-direction: column; align-items: flex-start; gap: 2px; }
  .cv .row span { max-width: 100%; text-align: left; }
  .cv-tools, .cv-customizer { padding: 14px 20px; }
  .cv-c-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .cert-grid, .beyond-grid { grid-template-columns: 1fr; }
  .beyond { aspect-ratio: 16 / 11; }
}
@media (hover: none), (pointer: coarse) {
  .cursor-glow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .blur-word, .reveal { opacity: 1; filter: none; transform: none; }
}

/* ---------- print (Executive CV) ---------- */
@page { size: A4; margin: 12mm 14mm; }
@media print {
  html, body { background: #fff !important; color: #111 !important; height: auto !important; overflow: visible !important; }
  body > *:not(#modal) { display: none !important; }
  #modal { position: static !important; display: block !important; inset: auto !important; padding: 0 !important; background: #fff !important; }
  .modal-backdrop, .modal-close, .cv-tools, .cv-customizer { display: none !important; }
  .modal-panel {
    position: static !important; width: 100% !important; max-width: none !important;
    max-height: none !important; overflow: visible !important;
    box-shadow: none !important; border: none !important; border-radius: 0 !important;
    background: #fff !important; animation: none !important;
  }
  .cv {
    position: static !important; width: 100% !important; padding: 0 !important;
    background: #fff !important; color: #111 !important; font-size: 9.5pt !important; line-height: 1.4 !important;
  }
  .cv.compact { font-size: 8.4pt !important; line-height: 1.32 !important; }
  .cv h1 { font-size: 20pt !important; }
  .cv.compact h1 { font-size: 16.5pt !important; }
  .cv .cv-head { grid-template-columns: 1fr auto !important; gap: 14px !important; padding-bottom: 10px !important; margin-bottom: 12px !important; }
  .cv h3 { margin: 12px 0 5px !important; break-after: avoid; page-break-after: avoid; }
  .cv.compact h3 { margin: 8px 0 4px !important; }
  .cv .row, .cv li { break-inside: avoid; page-break-inside: avoid; }
  .cv .row span { font-size: 8pt !important; }
}

