/* ── RESET & BASE ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #080c14;
  --bg2:       #0d1221;
  --bg3:       #111827;
  --surface:   #151d2e;
  --surface2:  #1a2438;
  --border:    rgba(99,130,201,0.12);
  --accent:    #6366f1;
  --accent2:   #22d3ee;
  --accent3:   #a78bfa;
  --text:      #e2e8f0;
  --text-dim:  #94a3b8;
  --text-faint:#475569;
  --radius:    14px;
  --radius-sm: 8px;
  --font:      'Inter', system-ui, sans-serif;
  --mono:      'JetBrains Mono', monospace;
  --heading:   #f1f5f9;
  --nav-bg:    rgba(8, 12, 20, 0.88);
  --nav-bg-solid: rgba(8,12,20,0.97);
  --blob-opacity: 1;
  --shadow:    0 20px 60px rgba(0,0,0,0.45);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg:        #f7f8fc;
  --bg2:       #eef1f8;
  --bg3:       #e6eaf3;
  --surface:   #ffffff;
  --surface2:  #f1f4fa;
  --border:    rgba(71,85,140,0.16);
  --accent:    #4f46e5;
  --accent2:   #0e7490;
  --accent3:   #7c3aed;
  --text:      #1e293b;
  --text-dim:  #475569;
  --text-faint:#64748b;
  --heading:   #0f172a;
  --nav-bg:    rgba(247, 248, 252, 0.9);
  --nav-bg-solid: rgba(247,248,252,0.98);
  --blob-opacity: 0.35;
  --shadow:    0 20px 50px rgba(15,23,42,0.12);
  color-scheme: light;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ── UTILITIES ────────────────────────────────────────────────────── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.gradient-text {
  background: linear-gradient(135deg, var(--accent2) 0%, var(--accent) 50%, var(--accent3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.accent { color: var(--accent2); }

.section { padding: 100px 0; }
.section-dark { background: var(--bg2); }

.section-label {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent2);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  opacity: 0.85;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 16px;
  color: var(--heading);
}

.section-sub {
  color: var(--text-dim);
  max-width: 660px;
  margin-bottom: 56px;
  font-size: 17px;
}

/* ── NAV ─────────────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 24px;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
#navbar.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border-color: var(--border);
}

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-logo {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--heading);
  white-space: nowrap;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
  margin-left: auto;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--accent2);
  transform: scaleX(0);
  transition: transform 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }

.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; margin-left: auto; }

/* ── HERO ─────────────────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 64px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: calc(0.18 * var(--blob-opacity));
  animation: drift 12s ease-in-out infinite alternate;
}
.blob-1 { width: 500px; height: 500px; background: var(--accent); top: -120px; left: -100px; animation-duration: 14s; }
.blob-2 { width: 400px; height: 400px; background: var(--accent2); bottom: -80px; right: -80px; animation-duration: 11s; }
.blob-3 { width: 300px; height: 300px; background: var(--accent3); top: 50%; left: 50%; transform: translate(-50%,-50%); animation-duration: 9s; }

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, 20px) scale(1.08); }
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 780px;
  padding: 0 24px;
  z-index: 1;
}

.hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 24px;
  padding: 3px;
  background: linear-gradient(135deg, var(--accent2), var(--accent), var(--accent3));
  box-shadow: 0 0 32px rgba(99,102,241,0.4);
}
.hero-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.hero-tag {
  font-size: 17px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.hero-name {
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 800;
  line-height: 1.05;
  color: var(--heading);
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  text-shadow: 0 0 80px rgba(99,102,241,0.3);
}

.hero-roles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.role-badge {
  padding: 6px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface);
  letter-spacing: 0.02em;
}

.accent-badge {
  border-color: rgba(99,102,241,0.4);
  background: rgba(99,102,241,0.1);
  color: var(--accent3);
}

.role-sep { color: var(--text-faint); font-size: 18px; }

.hero-sub {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-dim);
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero-cta { display: flex; gap: 14px; justify-content: center; margin-bottom: 56px; flex-wrap: wrap; }

.btn {
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  color: #fff;
  border: none;
  box-shadow: 0 4px 24px rgba(99,102,241,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(99,102,241,0.5); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.btn-ghost:hover { border-color: var(--accent2); color: var(--accent2); transform: translateY(-2px); }

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-n { display: block; font-size: 28px; font-weight: 800; color: var(--heading); font-family: var(--mono); }
.stat-l { display: block; font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }
.stat-div { width: 1px; height: 40px; background: var(--border); }

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeUpDown 2s ease-in-out infinite;
}
.scroll-line { width: 1px; height: 40px; background: linear-gradient(to bottom, var(--text-faint), transparent); }

@keyframes fadeUpDown {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) translateY(0); }
  50%       { opacity: 1;   transform: translateX(-50%) translateY(6px); }
}

/* ── ABOUT ─────────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text h2 {
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 24px;
  color: var(--heading);
}

.about-text p {
  color: var(--text-dim);
  margin-bottom: 18px;
  font-size: 16px;
  line-height: 1.8;
}

.pull-quote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin-top: 28px;
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.7;
}

.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  transition: border-color 0.25s, transform 0.25s;
}
.mini-card:hover { border-color: rgba(99,102,241,0.35); transform: translateY(-3px); }
.mini-card-icon { font-size: 24px; margin-bottom: 10px; }
.mini-card h4 { font-size: 14px; font-weight: 600; color: var(--heading); margin-bottom: 8px; }
.mini-card p { font-size: 13px; color: var(--text-dim); line-height: 1.6; }

/* ── EXPERTISE ─────────────────────────────────────────────────────── */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.exp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.exp-card:hover {
  border-color: rgba(99,102,241,0.35);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.exp-card-accent {
  border-color: rgba(99,102,241,0.3);
  background: linear-gradient(145deg, rgba(99,102,241,0.08), var(--surface));
  position: relative;
  overflow: hidden;
}
.exp-card-accent::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(99,102,241,0.4), rgba(34,211,238,0.2));
  z-index: -1;
}

.exp-icon { font-size: 28px; margin-bottom: 14px; }
.exp-card h3 { font-size: 16px; font-weight: 700; color: var(--heading); margin-bottom: 14px; }
.exp-card ul { list-style: none; color: var(--text-dim); font-size: 14px; line-height: 1.7; }
.exp-card ul li { padding: 3px 0; }
.exp-card ul li::before { content: '→ '; color: var(--accent2); opacity: 0.7; }

.exp-tag {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent2);
  opacity: 0.7;
}

/* ── AGENTIC AI ──────────────────────────────────────────────────── */
.agentic-flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

.flow-step {
  flex: 1;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  transition: border-color 0.25s;
}
.flow-step:hover { border-color: rgba(99,102,241,0.4); }

.flow-arrow {
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: var(--accent2);
  font-size: 22px;
  opacity: 0.5;
  flex-shrink: 0;
}

.flow-num {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.25;
  line-height: 1;
  margin-bottom: 12px;
}
.flow-body h4 { font-size: 15px; font-weight: 700; color: var(--heading); margin-bottom: 8px; }
.flow-body p  { font-size: 13px; color: var(--text-dim); line-height: 1.65; }

.interest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
  font-family: var(--mono);
  transition: all 0.2s;
}
.chip:hover {
  border-color: var(--accent2);
  color: var(--accent2);
  background: rgba(34,211,238,0.06);
}

/* ── TIMELINE ────────────────────────────────────────────────────── */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border) 10%, var(--border) 90%, transparent);
  transform: translateX(-50%);
}

.tl-item {
  display: flex;
  width: 100%;
  margin-bottom: 48px;
  position: relative;
}

.tl-right { justify-content: flex-end; }
.tl-left  { justify-content: flex-start; }

.tl-right .tl-card { margin-right: calc(50% + 28px); }
.tl-left  .tl-card { margin-left:  calc(50% + 28px); }

.tl-dot {
  position: absolute;
  left: 50%;
  top: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface2);
  border: 2px solid var(--border);
  transform: translateX(-50%);
  z-index: 1;
  transition: border-color 0.25s;
}
.tl-item:hover .tl-dot { border-color: var(--accent); }
.tl-dot-active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(99,102,241,0.6);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 16px rgba(99,102,241,0.6); }
  50%       { box-shadow: 0 0 28px rgba(99,102,241,0.9); }
}

.tl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  flex: 1;
  max-width: calc(50% - 40px);
  transition: border-color 0.25s, transform 0.25s;
}
.tl-item:hover .tl-card { border-color: rgba(99,102,241,0.3); transform: translateY(-2px); }

.tl-card-active {
  border-color: rgba(99,102,241,0.4);
  background: linear-gradient(145deg, rgba(99,102,241,0.08), var(--surface));
}

.tl-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent2);
  display: block;
  margin-bottom: 6px;
}

.tl-card h4 { font-size: 15px; font-weight: 700; color: var(--heading); margin-bottom: 8px; }
.tl-card p  { font-size: 13px; color: var(--text-dim); line-height: 1.65; margin-bottom: 12px; }

.tl-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tl-tags span {
  font-size: 11px;
  font-family: var(--mono);
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-faint);
}

/* ── TECH STACK ──────────────────────────────────────────────────── */
.stack-groups { display: flex; flex-direction: column; gap: 32px; }

.stack-group-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 14px;
  font-family: var(--mono);
}

.stack-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stack-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  transition: all 0.2s;
}
.stack-item:hover { border-color: rgba(99,102,241,0.3); color: var(--text); transform: translateY(-2px); }
.stack-icon { font-size: 18px; }

.accent-stack {
  border-color: rgba(99,102,241,0.25);
  background: rgba(99,102,241,0.06);
  color: var(--accent3);
}
.accent-stack:hover { border-color: rgba(99,102,241,0.5); }

/* ── EXPLORING ───────────────────────────────────────────────────── */
.exploring-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.explore-item {
  display: flex;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  transition: border-color 0.25s, transform 0.25s;
}
.explore-item:hover { border-color: rgba(99,102,241,0.3); transform: translateY(-3px); }
.explore-icon { font-size: 28px; flex-shrink: 0; }
.explore-item h4 { font-size: 14px; font-weight: 700; color: var(--heading); margin-bottom: 6px; }
.explore-item p  { font-size: 13px; color: var(--text-dim); line-height: 1.6; }

/* ── CONNECT ─────────────────────────────────────────────────────── */
.connect-container { text-align: center; }
.connect-sub { color: var(--text-dim); font-size: 17px; margin-bottom: 48px; }

.connect-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.connect-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 28px;
  min-width: 240px;
  transition: all 0.25s;
  text-align: left;
}
.connect-card:hover {
  border-color: rgba(99,102,241,0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.connect-icon { font-size: 26px; flex-shrink: 0; }
.connect-card strong { display: block; font-size: 15px; color: var(--heading); margin-bottom: 2px; }
.connect-card span { font-size: 13px; color: var(--text-dim); }
.connect-arrow { margin-left: auto; color: var(--text-faint); font-size: 18px; transition: transform 0.2s; }
.connect-card:hover .connect-arrow { transform: translate(3px, -3px); color: var(--accent2); }

/* ── FOOTER ──────────────────────────────────────────────────────── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 28px 24px;
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-copy { font-size: 13px; color: var(--text-faint); margin-left: auto; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13px; color: var(--text-faint); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent2); }

/* ── FADE-IN ANIMATION ───────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .about-grid       { grid-template-columns: 1fr; gap: 40px; }
  .expertise-grid   { grid-template-columns: 1fr 1fr; }
  .exploring-grid   { grid-template-columns: 1fr 1fr; }
  .agentic-flow     { flex-direction: column; }
  .flow-arrow       { transform: rotate(90deg); padding: 4px 0; align-self: center; }
  .timeline::before { left: 20px; }
  .tl-right, .tl-left { justify-content: flex-start; }
  .tl-right .tl-card, .tl-left .tl-card { margin: 0 0 0 52px; max-width: 100%; }
  .tl-dot { left: 20px; }
}

@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--nav-bg-solid);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }
  .hamburger { display: block; }
  .expertise-grid  { grid-template-columns: 1fr; }
  .exploring-grid  { grid-template-columns: 1fr; }
  .about-cards     { grid-template-columns: 1fr; }
  .hero-stats      { gap: 20px; }
  .stat-div        { display: none; }
  .connect-card    { min-width: auto; width: 100%; }
  .footer-copy     { order: 3; width: 100%; margin-left: 0; text-align: center; }
  .footer-links    { margin-left: auto; }
}

/* ── 2026 UPDATE: news pill, wins, research, open source ───────── */
code { font-family: var(--mono); font-size: 0.9em; background: rgba(99,102,241,0.12); padding: 1px 6px; border-radius: 5px; color: var(--accent2); }

.news-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-dim);
  padding: 6px 14px; margin-bottom: 18px;
  border: 1px solid rgba(34,211,238,0.3); border-radius: 999px;
  background: rgba(34,211,238,0.06);
  transition: border-color .2s, color .2s;
}
.news-pill strong { color: var(--accent2); font-weight: 600; }
.news-pill:hover { border-color: var(--accent2); color: var(--text); }
.news-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulse 2s infinite; }
.news-arrow { transition: transform .2s; }
.news-pill:hover .news-arrow { transform: translateX(3px); }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

.wins-strip { padding: 56px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg2); }
.wins-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.win-card {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .25s, border-color .25s;
}
.win-card:hover { transform: translateY(-3px); border-color: rgba(99,102,241,0.45); }
.win-card-accent { background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(34,211,238,0.06)); }
.win-icon { font-size: 30px; flex-shrink: 0; }
.win-kicker { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent2); }
.win-card strong { display: block; color: var(--heading); font-size: 15px; line-height: 1.4; margin: 4px 0; }
.win-meta { font-size: 13px; color: var(--text-dim); }
.win-card:hover .connect-arrow { color: var(--accent2); }

.btn-sm { padding: 9px 18px; font-size: 13px; cursor: pointer; font-family: var(--font); }
button.btn-ghost { background: transparent; }

.paper-card {
  display: grid; grid-template-columns: 150px 1fr; gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
}
.paper-side {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 28px 16px; text-align: center;
  background: linear-gradient(160deg, rgba(99,102,241,0.25), rgba(34,211,238,0.1));
  border-right: 1px solid var(--border);
}
.paper-badge { font-weight: 800; font-size: 15px; color: var(--heading); }
.paper-year { font-family: var(--mono); font-size: 30px; font-weight: 800; color: var(--accent2); }
.paper-oa { font-size: 12px; color: var(--text-dim); }
.paper-body { padding: 32px 36px; }
.paper-body h3 { font-size: 20px; line-height: 1.4; color: var(--heading); margin-bottom: 10px; }
.paper-authors { color: var(--text-dim); font-size: 14px; }
.paper-authors strong { color: var(--text); }
.paper-venue { font-family: var(--mono); font-size: 12.5px; color: var(--text-faint); margin: 4px 0 16px; }
.paper-venue a { color: var(--accent2); }
.paper-abstract { color: var(--text-dim); font-size: 15px; margin-bottom: 12px; }
.paper-repro { font-size: 14px; color: var(--text); background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.25); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 16px; }
.paper-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.paper-tags span { font-family: var(--mono); font-size: 11px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--accent3); }
.paper-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.bibtex { margin-top: 16px; font-family: var(--mono); font-size: 12px; color: var(--text-dim); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; overflow-x: auto; }

.oss-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start; }
.terminal { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #05080f; box-shadow: var(--shadow); }
.terminal .term-body { color: #e2e8f0; }
.terminal .term-bar { background: #1a2438; border-color: rgba(99,130,201,0.12); }
.terminal .t-fix { color: #22d3ee; } .terminal .t-p { color: #a78bfa; } .terminal .t-dim { color: #64748b; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--surface2); border-bottom: 1px solid var(--border); }
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: #ef4444; }
.term-bar span:nth-child(2) { background: #f59e0b; }
.term-bar span:nth-child(3) { background: #22c55e; }
.term-bar em { margin-left: auto; font-family: var(--mono); font-size: 12px; font-style: normal; color: var(--text-faint); }
.term-body { font-family: var(--mono); font-size: 12.5px; line-height: 1.75; color: var(--text); padding: 18px 20px; min-height: 340px; overflow-x: auto; white-space: pre; }
.t-p { color: var(--accent3); } .t-ok { color: #22c55e; } .t-bad { color: #ef4444; } .t-warn { color: #f59e0b; } .t-fix { color: var(--accent2); } .t-dim { color: var(--text-faint); }
.term-cursor { display: inline-block; width: 8px; height: 1em; background: var(--accent2); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.install-box { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid rgba(99,102,241,0.35); border-radius: var(--radius-sm); padding: 10px 10px 10px 16px; margin-bottom: 16px; }
.install-box code { background: none; padding: 0; font-size: 14px; color: var(--heading); }
.install-box code::before { content: '$ '; color: var(--accent3); }
.copy-btn { margin-left: auto; font-family: var(--mono); font-size: 12px; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface2); color: var(--text-dim); cursor: pointer; transition: color .2s, border-color .2s; }
.copy-btn:hover { color: var(--accent2); border-color: var(--accent2); }
.oss-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.oss-badges img { height: 20px; }
.oss-points { list-style: none; margin-bottom: 24px; }
.oss-points li { color: var(--text-dim); font-size: 14px; padding: 7px 0 7px 22px; position: relative; border-bottom: 1px dashed var(--border); }
.oss-points li::before { content: '✔'; position: absolute; left: 0; color: #22c55e; }
.oss-points strong { color: var(--text); }
.oss-points a { color: var(--accent2); }

@media (max-width: 900px) {
  .wins-grid, .oss-grid { grid-template-columns: 1fr; }
  .paper-card { grid-template-columns: 1fr; }
  .paper-side { flex-direction: row; border-right: none; border-bottom: 1px solid var(--border); padding: 16px; }
  .paper-year { font-size: 20px; }
  .paper-body { padding: 24px 20px; }
}
@media (max-width: 640px) {
  .term-body { font-size: 11px; min-height: 0; padding: 14px; }
  .hero-roles { flex-wrap: wrap; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

@media (max-height: 1000px) { .scroll-hint { display: none; } }


/* ── NAV TOOLS: theme toggle + palette trigger ─────────────────── */
.nav-tools { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; min-width: 34px; padding: 0 10px;
  border-radius: 8px; border: 1px solid var(--border); background: transparent;
  color: var(--text-dim); font-family: var(--mono); font-size: 12px; cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.icon-btn:hover { color: var(--accent2); border-color: var(--accent2); }
.icon-btn kbd { font-family: var(--mono); font-size: 11px; }
.icon-btn svg { width: 16px; height: 16px; }
.theme-icon-sun { display: none; }
:root[data-theme="light"] .theme-icon-sun { display: block; }
:root[data-theme="light"] .theme-icon-moon { display: none; }

/* ── T-RKG DEMO GRAPH ──────────────────────────────────────────── */
.kg-demo { margin-top: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 24px 28px; }
.kg-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.kg-head h3 { font-size: 17px; color: var(--heading); }
.kg-note { font-size: 13px; color: var(--text-faint); margin-bottom: 14px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 3px; background: var(--bg); }
.seg button { border: 0; background: transparent; color: var(--text-dim); font-family: var(--font); font-size: 13px; font-weight: 600; padding: 7px 16px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.seg button[aria-pressed="true"] { background: linear-gradient(135deg, var(--accent), var(--accent3)); color: #fff; }
.kg-svg { width: 100%; height: auto; display: block; }
.kg-svg .edge { stroke: var(--text-faint); stroke-width: 1.6; fill: none; opacity: .7; transition: opacity .5s; }
.kg-svg .edge-x { stroke: var(--accent); stroke-dasharray: 5 5; opacity: 0; transition: opacity .6s; }
.kg-svg .silo { fill: none; stroke: var(--text-faint); stroke-dasharray: 6 6; stroke-width: 1.2; opacity: .6; transition: opacity .5s; }
.kg-svg .silo-label { fill: var(--text-faint); font-family: var(--mono); font-size: 12px; transition: opacity .5s; }
.kg-svg .node rect { fill: var(--surface2); stroke: var(--border); stroke-width: 1.4; }
.kg-svg .node text { fill: var(--text); font-family: var(--font); font-size: 13px; font-weight: 600; }
.kg-svg .node .sub { fill: var(--text-dim); font-family: var(--mono); font-size: 11px; font-weight: 400; }
.kg-svg .reg rect { stroke: var(--accent3); }
.kg-svg .rec rect { stroke: var(--accent2); }
.kg-svg .conflict { opacity: 0; transition: opacity .6s .3s; }
.kg-svg .conflict path { stroke: #ef4444; stroke-width: 2.6; fill: none; stroke-dasharray: 600; stroke-dashoffset: 600; }
.kg-svg .conflict .badge rect { fill: #ef4444; }
.kg-svg .conflict .badge text { fill: #fff; font-family: var(--mono); font-size: 11.5px; font-weight: 600; }
.kg-svg.composed .edge-x { opacity: .9; }
.kg-svg.composed .silo, .kg-svg.composed .silo-label { opacity: .12; }
.kg-svg.composed .conflict { opacity: 1; }
.kg-svg.composed .conflict path { animation: draw 1.1s .35s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.kg-verdict { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; color: var(--text-dim); min-height: 24px; }
.kg-verdict .pill { font-family: var(--mono); font-size: 11.5px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); }
.kg-verdict.ok .pill { color: #22c55e; border-color: rgba(34,197,94,.4); }
.kg-verdict.bad .pill { color: #ef4444; border-color: rgba(239,68,68,.45); }

/* ── LIVE STATS ────────────────────────────────────────────────── */
.live-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.live-stat { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); padding: 12px 14px; }
.live-stat b { display: block; font-family: var(--mono); font-size: 20px; color: var(--heading); line-height: 1.2; }
.live-stat span { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); }
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #22c55e; margin-right: 6px; vertical-align: middle; }
.live-caption { font-size: 12px; color: var(--text-faint); margin: -8px 0 18px; }

/* ── COMMAND PALETTE ───────────────────────────────────────────── */
.cmdk-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(2,6,15,.55); backdrop-filter: blur(6px); display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
.cmdk-backdrop.open { display: flex; animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.cmdk { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.45); overflow: hidden; }
.cmdk input { width: 100%; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--heading); font-family: var(--font); font-size: 16px; padding: 16px 18px; outline: none; }
.cmdk ul { list-style: none; max-height: 52vh; overflow-y: auto; padding: 6px; }
.cmdk li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; color: var(--text); font-size: 14px; }
.cmdk li .ic { width: 22px; text-align: center; }
.cmdk li .hint { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--text-faint); }
.cmdk li[aria-selected="true"] { background: rgba(99,102,241,.14); color: var(--heading); }
.cmdk .group { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); padding: 10px 12px 4px; cursor: default; }
.cmdk .empty { padding: 18px; color: var(--text-faint); font-size: 14px; cursor: default; }
.cmdk-foot { display: flex; gap: 14px; padding: 9px 14px; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 11px; color: var(--text-faint); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 210; background: var(--heading); color: var(--bg); font-size: 13px; font-weight: 600; padding: 9px 16px; border-radius: 999px; transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 640px) {
  .nav-tools { margin-left: auto; }
  .nav-tools + .hamburger { margin-left: 4px; }
  .icon-btn kbd { display: none; }
  .kg-demo { padding: 18px 14px; }
  .live-stats { grid-template-columns: 1fr 1fr 1fr; }
  .live-stat b { font-size: 16px; }
}

/* ── T-RKG Explorer call-to-action ─────────────────────────────── */
.explorer-cta { display: flex; align-items: center; gap: 16px; margin-top: 18px; padding: 16px 20px; border-radius: var(--radius-sm);
  border: 1px solid rgba(99,102,241,0.4); background: linear-gradient(135deg, rgba(99,102,241,0.14), rgba(34,211,238,0.06)); transition: transform .2s, border-color .2s; }
.explorer-cta:hover { transform: translateY(-2px); border-color: var(--accent2); }
.explorer-cta:hover .connect-arrow { color: var(--accent2); transform: translate(3px,-3px); }
.explorer-ic { font-size: 26px; flex-shrink: 0; }
.explorer-cta strong { display: block; color: var(--heading); font-size: 15px; }
.explorer-cta span span { display: block; font-size: 13px; color: var(--text-dim); margin-top: 2px; }
@media (max-width: 1100px) { .expertise-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .expertise-grid { grid-template-columns: 1fr; } }

/* ── Expanding-into strip ─────────────────────────────────────── */
.expanding { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.expanding-label { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }

/* ── Compact single-column timeline ───────────────────────────── */
.timeline { max-width: 760px; }
.timeline::before { left: 20px; }
.tl-item { margin-bottom: 16px; }
.tl-right, .tl-left { justify-content: flex-start; }
.tl-right .tl-card, .tl-left .tl-card { margin: 0 0 0 52px; max-width: 100%; }
.tl-dot { left: 20px; }
.tl-card { padding: 16px 20px; }
.tl-card p { margin-bottom: 8px; }
