/* ============================================
   ASAF — Portfolio
   ============================================ */

:root {
  --bg: #08090c;
  --bg-elev: #0e1013;
  --bg-elev-2: #14171b;
  --surface: rgba(255,255,255,0.035);
  --surface-strong: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.16);
  --text: #edeef1;
  --text-muted: #9aa0aa;
  --text-faint: #5c6169;

  --accent-1: #7c8cff;
  --accent-2: #4fd1c5;
  --accent-grad: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  --accent-soft: rgba(124, 140, 255, 0.12);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.2s;
  --dur-med: 0.5s;
  --dur-slow: 0.9s;

  --font-display: 'Sora', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f7f7f9;
  --bg-elev: #ffffff;
  --bg-elev-2: #eeeff2;
  --surface: rgba(10,12,16,0.03);
  --surface-strong: rgba(10,12,16,0.05);
  --border: rgba(10,12,16,0.09);
  --border-strong: rgba(10,12,16,0.16);
  --text: #14161a;
  --text-muted: #565c66;
  --text-faint: #8b909a;
  --accent-soft: rgba(124, 140, 255, 0.10);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background var(--dur-med) var(--ease), color var(--dur-med) var(--ease);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }

::selection { background: var(--accent-1); color: #fff; }

.section-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 640px) {
  .section-inner { padding: 0 40px; }
}

section { position: relative; padding: 110px 0; }
@media (max-width: 768px) { section { padding: 72px 0; } }

.section-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 560px;
  margin-bottom: 48px;
}

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

.muted { color: var(--text-faint); font-size: 0.92em; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover { box-shadow: 0 8px 24px rgba(124,140,255,0.25); }

.btn-secondary {
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover { border-color: var(--accent-1); }

.btn-ghost {
  color: var(--text-muted);
  border: 1px solid transparent;
}
.btn-ghost:hover { color: var(--text); }

/* ============================================
   Cursor glow (desktop only, respects reduced motion)
   ============================================ */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 420px; height: 420px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(124,140,255,0.08), transparent 70%);
  transform: translate(-50%, -50%);
  z-index: 2;
  will-change: transform;
  transition: opacity 0.3s ease;
}
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .cursor-glow { display: none; }
}

/* ============================================
   Progress bar
   ============================================ */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent-grad);
  z-index: 1000;
  transition: width 0.1s linear;
}

/* ============================================
   Side dot navigation (desktop)
   ============================================ */
.dot-nav {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 500;
  display: none;
  flex-direction: column;
  gap: 18px;
}
@media (min-width: 1140px) { .dot-nav { display: flex; } }

.dot-nav a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 4px;
}
.dot-nav a span {
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease, transform var(--dur-fast) var(--ease);
}
.dot-nav a:hover span { border-color: var(--accent-1); transform: scale(1.25); }
.dot-nav a.is-active span {
  background: var(--accent-2);
  border-color: var(--accent-2);
  transform: scale(1.4);
}
.dot-nav a em {
  position: absolute;
  right: 22px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity var(--dur-fast) ease, transform var(--dur-fast) var(--ease);
  pointer-events: none;
}
.dot-nav a:hover em { opacity: 1; transform: translateX(0); }

/* ============================================
   Toast
   ============================================ */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  box-shadow: 0 20px 44px -14px rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast) ease, transform var(--dur-fast) var(--ease);
  z-index: 1300;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  padding: 18px 0;
  transition: background var(--dur-med) var(--ease), padding var(--dur-med) var(--ease), border-color var(--dur-med) var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (min-width: 640px) { .nav-inner { padding: 0 40px; } }

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.06em;
}
.nav-logo .dot { color: var(--accent-2); }

.nav-links {
  display: none;
  gap: 32px;
}
@media (min-width: 900px) { .nav-links { display: flex; } }

.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  position: relative;
  padding: 4px 0;
  transition: color var(--dur-fast) ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--accent-grad);
  transition: width var(--dur-fast) var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a.is-active { color: var(--text); }
.nav-links a.is-active::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.status-chip {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
}
@media (min-width: 700px) { .status-chip { display: flex; } }

.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4fd18a;
  box-shadow: 0 0 0 0 rgba(79,209,138,0.6);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
.status-dot.is-away { background: #d1a24f; box-shadow: none; animation: none; }
@media (prefers-reduced-motion: reduce) { .status-dot { animation: none; } }

.cmdk-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
.cmdk-trigger:hover { color: var(--text); border-color: var(--border-strong); }
.cmdk-trigger kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  display: none;
}
@media (min-width: 640px) { .cmdk-trigger kbd { display: inline; } }

.theme-toggle {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }

.nav-burger {
  width: 36px; height: 36px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
}
@media (min-width: 900px) { .nav-burger { display: none; } }
.nav-burger span {
  width: 20px; height: 1.5px;
  background: var(--text);
  transition: transform var(--dur-fast) ease, opacity var(--dur-fast) ease;
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Larger tap targets on touch devices */
@media (pointer: coarse) {
  .nav-burger, .theme-toggle, .cmdk-trigger, .project-toggle, .dot-nav a {
    min-width: 44px;
    min-height: 44px;
  }
}

.mobile-menu {
  position: fixed;
  top: 0; right: 0;
  width: min(78vw, 320px);
  height: 100vh;
  background: var(--bg-elev);
  border-left: 1px solid var(--border);
  z-index: 950;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 100px 32px 32px;
  transform: translateX(100%);
  transition: transform var(--dur-med) var(--ease);
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
@media (min-width: 900px) { .mobile-menu { display: none; } }

/* ============================================
   Hero
   ============================================ */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 24px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  --px: 0px;
  --py: 0px;
}
.grid-lines {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 20%, transparent 75%);
  transform: translate(calc(var(--px) * 0.3), calc(var(--py) * 0.3));
  transition: transform 0.2s linear;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  animation: float 16s ease-in-out infinite;
}
.orb-1 { width: 420px; height: 420px; background: var(--accent-1); top: -10%; left: -8%; --depth: 1; }
.orb-2 { width: 380px; height: 380px; background: var(--accent-2); bottom: -12%; right: -6%; animation-delay: -5s; --depth: -1.4; }
.orb-3 { width: 260px; height: 260px; background: #b28dff; top: 40%; right: 22%; animation-delay: -10s; opacity: 0.22; --depth: 0.8; }

@keyframes float {
  0%, 100% { transform: translate(calc(var(--px) * var(--depth)), calc(var(--py) * var(--depth))) scale(1); }
  50% { transform: translate(calc(30px + var(--px) * var(--depth)), calc(-30px + var(--py) * var(--depth))) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } .grid-lines { transition: none; } }

.hero-content { position: relative; z-index: 2; max-width: 900px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 22px;
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(18px, 7.5vw, 80px);
  letter-spacing: -0.03em;
  line-height: 1.02;
  white-space: nowrap;
}

.hero-role {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(18px, 2.6vw, 26px);
  color: var(--text-muted);
  margin-top: 14px;
}
.type-cursor {
  display: inline-block;
  width: 2px;
  height: 0.95em;
  margin-left: 4px;
  vertical-align: -0.12em;
  background: var(--accent-2);
  animation: blink 1s step-start infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .type-cursor { animation: none; opacity: 0.6; } }

.hero-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-2);
  letter-spacing: 0.02em;
}
.hero-stack i { color: var(--text-faint); font-style: normal; }

.hero-statement {
  margin: 30px auto 0;
  max-width: 560px;
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 42px;
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 2;
}
.scroll-cue span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.scroll-cue-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-faint), transparent);
  overflow: hidden;
  position: relative;
}
.scroll-cue-line::after {
  content: '';
  position: absolute;
  top: -100%; left: 0;
  width: 100%; height: 100%;
  background: var(--accent-2);
  animation: scrollcue 2s ease-in-out infinite;
}
@keyframes scrollcue { to { top: 100%; } }
@media (prefers-reduced-motion: reduce) { .scroll-cue-line::after { animation: none; top: 40%; } }

/* ============================================
   Identity flow
   ============================================ */
.identity { padding-top: 60px; padding-bottom: 60px; }
.identity .section-inner { text-align: center; }
.identity .section-sub { margin-left: auto; margin-right: auto; }

.identity-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 20px;
}

.identity-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease, transform var(--dur-fast) ease;
  min-width: 140px;
}
.identity-node:hover, .identity-node.is-active {
  border-color: var(--accent-1);
  background: var(--accent-soft);
  transform: translateY(-4px);
}
.node-index {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}
.node-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
}
.identity-node.is-active .node-label { color: var(--accent-2); }

.identity-connector {
  width: 40px;
  height: 1px;
  background: linear-gradient(to right, var(--border), var(--border-strong), var(--border));
}
@media (max-width: 900px) {
  .identity-connector { width: 1px; height: 24px; }
  .identity-flow { flex-direction: column; }
}

.identity-detail {
  margin-top: 30px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-muted);
  font-size: 15px;
  min-height: 48px;
  transition: opacity var(--dur-fast) ease;
}

/* ============================================
   About
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

.about-text p { color: var(--text-muted); margin-bottom: 18px; font-size: 16px; }
.about-text p:last-child { margin-bottom: 0; }

.about-facts {
  display: grid;
  gap: 14px;
}
.fact-card {
  padding: 20px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.fact-value { font-size: 14.5px; font-weight: 500; }

/* ============================================
   Currently building / focus
   ============================================ */
.focus { padding-top: 20px; padding-bottom: 20px; }

.focus-card {
  position: relative;
  padding: 44px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: linear-gradient(160deg, var(--surface-strong), var(--surface));
  overflow: hidden;
}
.focus-glow {
  position: absolute;
  top: -40%; right: -10%;
  width: 380px; height: 380px;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.focus-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.live-dot span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 rgba(79,209,197,0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(79,209,197,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(79,209,197,0); }
  100% { box-shadow: 0 0 0 0 rgba(79,209,197,0); }
}
@media (prefers-reduced-motion: reduce) { .live-dot span { animation: none; } }

.focus-dates {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
}
.focus-role {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
}
.focus-desc {
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 26px;
  position: relative;
}
.focus-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
}
.focus-tags span {
  font-size: 12.5px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ============================================
   Experience timeline
   ============================================ */
.timeline {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.timeline-item {
  border-bottom: 1px solid var(--border);
}

.timeline-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 4px;
  text-align: left;
}

.timeline-marker {
  flex-shrink: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
}
.timeline-marker span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
  transition: background var(--dur-fast) ease;
}
.timeline-item.is-current .timeline-marker { border-color: var(--accent-2); }
.timeline-item.is-current .timeline-marker span { background: var(--accent-2); }

.timeline-heading { flex: 1; min-width: 0; }
.timeline-heading h3 {
  font-family: var(--font-display);
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 600;
}
.timeline-org {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-top: 4px;
}
.timeline-org em { font-style: normal; color: var(--text-faint); }

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  white-space: nowrap;
}
.chev { color: var(--text-faint); transition: transform var(--dur-fast) var(--ease); }
.timeline-item[data-open="true"] .chev { transform: rotate(180deg); color: var(--accent-2); }

.timeline-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-med) var(--ease);
}
.timeline-item[data-open="true"] .timeline-body { grid-template-rows: 1fr; }
.timeline-body > * { overflow: hidden; }
.timeline-body::before { content: ''; display: table; }

.timeline-list {
  overflow: hidden;
  padding: 0 4px 8px 32px;
}
.timeline-list li {
  position: relative;
  color: var(--text-muted);
  font-size: 14.5px;
  padding: 6px 0 6px 18px;
  line-height: 1.6;
}
.timeline-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 15px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent-1);
}
.timeline-list b { color: var(--text); font-weight: 600; }

.timeline-tags {
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 4px 20px 32px;
}
.timeline-tags span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text-muted);
}

/* ============================================
   Projects
   ============================================ */
.project-list { display: flex; flex-direction: column; gap: 16px; }

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 30px 32px;
  transition: border-color var(--dur-fast) ease;
}
.project-card:hover { border-color: var(--border-strong); }

.project-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.project-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-2);
  letter-spacing: 0.05em;
}
.project-title {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.4vw, 24px);
  font-weight: 700;
  margin-top: 8px;
}
.project-stack {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-top: 8px;
  font-family: var(--font-mono);
}

.project-toggle {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) ease;
}
.project-card[data-open="true"] .project-toggle { transform: rotate(135deg); background: var(--accent-soft); }

.project-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 24px;
}
.project-metrics div { display: flex; flex-direction: column; gap: 4px; }
.project-metrics b { font-family: var(--font-display); font-size: 20px; }
.project-metrics span { font-size: 12px; color: var(--text-faint); font-family: var(--font-mono); }

.project-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-med) var(--ease);
}
.project-card[data-open="true"] .project-body { grid-template-rows: 1fr; margin-top: 8px; }
.project-body > * { overflow: hidden; }

.project-cols {
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}
@media (max-width: 760px) { .project-cols { grid-template-columns: 1fr; } }
.project-cols h4 {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.project-cols p { color: var(--text-muted); font-size: 14.5px; }

/* ============================================
   AI Lab / gallery
   ============================================ */
.gallery {
  columns: 3 220px;
  column-gap: 16px;
}
@media (max-width: 700px) { .gallery { columns: 2 160px; } }

.gallery-tile {
  break-inside: avoid;
  margin-bottom: 16px;
  height: calc(var(--h) * 1px);
  position: relative;
  perspective: 1200px;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: transform var(--dur-fast) var(--ease);
}
.gallery-tile:hover { transform: translateY(-4px); }
.gallery-tile:focus-visible { outline: 2px solid var(--accent-1); outline-offset: 3px; }

.tile-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease);
}
.gallery-tile.is-flipped .tile-inner { transform: rotateY(180deg); }

.tile-front, .tile-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
}

.tile-front {
  display: flex;
  align-items: flex-end;
  padding: 18px;
  background:
    linear-gradient(150deg, rgba(124,140,255,0.16), rgba(79,209,197,0.10) 45%, rgba(178,141,255,0.14)),
    var(--bg-elev);
  background-size: 220% 220%;
  animation: drift 12s ease-in-out infinite;
}
.gallery-tile:nth-child(2n) .tile-front { animation-duration: 15s; animation-delay: -3s; }
.gallery-tile:nth-child(3n) .tile-front { animation-duration: 18s; animation-delay: -7s; }
@keyframes drift {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .tile-front { animation: none; }
  .tile-inner { transition: none; }
}

.tile-icon {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 25%;
  min-width: 40px;
  max-width: 60px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--icon-color, var(--accent-2));
  opacity: 0.9;
  transition: transform var(--dur-med) var(--ease);
}
.tile-icon svg { width: 100%; height: 100%; }
.tile-icon::after {
  content: '';
  position: absolute;
  inset: -60%;
  background: radial-gradient(circle, currentColor 0%, transparent 72%);
  opacity: 0.16;
  filter: blur(4px);
  z-index: -1;
  border-radius: 50%;
}
.gallery-tile:hover .tile-icon { transform: translate(-50%, -50%) scale(1.08); }

.tile-label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--text);
  background: rgba(0,0,0,0.28);
  padding: 6px 12px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
:root[data-theme="light"] .tile-label { background: rgba(255,255,255,0.6); color: var(--text); }

.tile-flip-hint {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
  background: rgba(0,0,0,0.28);
  padding: 4px 9px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity var(--dur-fast) ease;
}
.gallery-tile:hover .tile-flip-hint, .gallery-tile:focus-visible .tile-flip-hint { opacity: 1; }
:root[data-theme="light"] .tile-flip-hint { background: rgba(255,255,255,0.6); color: var(--text-muted); }

.tile-back {
  transform: rotateY(180deg);
  background: var(--bg-elev-2);
  padding: 20px;
  display: flex;
  align-items: center;
}
.tile-back p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
}

.gallery-note {
  margin-top: 20px;
  color: var(--text-faint);
  font-size: 13px;
  font-family: var(--font-mono);
}

/* ============================================
   Skills
   ============================================ */
.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.skill-category {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px 10px;
}
.skill-category-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  width: 100%;
  margin-bottom: 2px;
}
@media (min-width: 720px) {
  .skill-category { align-items: center; }
  .skill-category-label { width: 170px; margin-bottom: 0; flex-shrink: 0; }
}

.chip {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-muted);
  transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease, background var(--dur-fast) ease;
}
.chip:hover, .chip.is-active {
  border-color: var(--accent-1);
  color: var(--text);
  background: var(--accent-soft);
}

.skill-detail {
  margin-top: 40px;
  padding: 24px 28px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14.5px;
  color: var(--text-muted);
  min-height: 24px;
  transition: border-color var(--dur-fast) ease;
}
.skill-detail #skillDetailTitle { color: var(--text); font-weight: 600; font-family: var(--font-display); }

/* ============================================
   Impact metrics
   ============================================ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 860px) { .metrics-grid { grid-template-columns: repeat(2, 1fr); } }

.metric-card {
  background: var(--bg-elev);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.metric-num {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 700;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.metric-label { font-size: 13.5px; font-weight: 500; }
.metric-context { font-size: 12px; color: var(--text-faint); font-family: var(--font-mono); }

/* ============================================
   Education / certifications
   ============================================ */
.edu-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}
.edu-card h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.edu-card p { color: var(--text-muted); font-size: 14px; }
.edu-dates {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
}

.cert-kicker { margin-top: 56px; }

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 800px) { .cert-grid { grid-template-columns: 1fr; } }

.cert-card {
  padding: 26px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color var(--dur-fast) ease, transform var(--dur-fast) var(--ease);
}
.cert-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.cert-icon { color: var(--accent-2); font-size: 18px; }
.cert-card h4 { font-family: var(--font-display); font-size: 15.5px; font-weight: 600; margin: 12px 0 6px; }
.cert-card p { color: var(--text-faint); font-size: 13px; }

/* ============================================
   Contact
   ============================================ */
.contact-inner { text-align: center; }
.contact-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 780px;
  margin: 0 auto 18px;
}
.contact-sub {
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 15px;
  margin-bottom: 40px;
}
.contact-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.contact-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-muted);
}

.contact-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px 8px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 14px;
  overflow: hidden;
  isolation: isolate;
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease, transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) ease;
}
.contact-chip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-grad);
  opacity: 0.16;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-med) var(--ease);
  z-index: -1;
  border-radius: 999px;
}
.contact-chip:hover, .contact-chip:focus-visible {
  color: var(--text);
  border-color: var(--accent-1);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -12px rgba(124,140,255,0.45);
}
.contact-chip:hover::before { transform: scaleX(1); }

.chip-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--text-muted);
  transition: background var(--dur-med) var(--ease), color var(--dur-fast) ease, transform var(--dur-med) var(--ease);
}
.contact-chip:hover .chip-icon {
  background: var(--accent-grad);
  color: #0a0b0d;
  transform: rotate(-10deg) scale(1.08);
}

.chip-arrow {
  display: inline-block;
  font-size: 12px;
  color: var(--text-faint);
  transform: translate(0, 0);
  transition: transform var(--dur-fast) var(--ease), color var(--dur-fast) ease;
}
.contact-chip:hover .chip-arrow {
  color: var(--accent-2);
  transform: translate(3px, -3px);
}

/* ============================================
   Footer
   ============================================ */
.footer { padding: 32px 0; border-top: 1px solid var(--border); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-faint);
}

/* ============================================
   Command palette
   ============================================ */
.cmdk-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 20px 20px;
  background: rgba(4,5,7,0.55);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast) ease;
}
:root[data-theme="light"] .cmdk-overlay { background: rgba(20,22,26,0.35); }
.cmdk-overlay.is-open { opacity: 1; pointer-events: auto; }

.cmdk-panel {
  width: 100%;
  max-width: 560px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
  overflow: hidden;
  transform: translateY(-12px) scale(0.98);
  transition: transform var(--dur-fast) var(--ease);
}
.cmdk-overlay.is-open .cmdk-panel { transform: translateY(0) scale(1); }

.cmdk-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text-faint);
}
.cmdk-input-row input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
}
.cmdk-input-row input::placeholder { color: var(--text-faint); }
.cmdk-input-row kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
}

.cmdk-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}
.cmdk-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  text-align: left;
}
.cmdk-item .cmdk-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-strong);
  color: var(--text-muted);
  flex-shrink: 0;
}
.cmdk-item .cmdk-label { flex: 1; color: var(--text); font-weight: 500; }
.cmdk-item .cmdk-hint { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.cmdk-item.is-selected {
  background: var(--accent-soft);
  color: var(--text);
}
.cmdk-item.is-selected .cmdk-icon { background: var(--accent-grad); color: #0a0b0d; }
.cmdk-empty { padding: 24px 14px; color: var(--text-faint); font-size: 13.5px; text-align: center; }

/* ============================================
   Pointer-reactive tilt targets
   ============================================ */
.project-card, .cert-card, .focus-card {
  transform-style: preserve-3d;
  will-change: transform;
}
