/* ════════════════════════════════════════════════════════════
   omidnaeej.github.io — style.css
   Design: dark-first, Space Grotesk + Inter, navy/blue/purple
   ════════════════════════════════════════════════════════════ */

/* ── Tokens ────────────────────────────────────────────────── */
:root {
  /* Colors — dark (default) */
  --bg:           #08101f;
  --bg-alt:       #0b1424;
  --surface:      #0f1b2d;
  --surface-2:    #152035;
  --border:       #1a2d47;
  --border-light: #203552;

  --text-primary:   #e8f0fe;
  --text-secondary: #8da4c4;
  --text-muted:     #4f6c8a;

  --accent:        #4f8ef7;
  --accent-glow:   rgba(79, 142, 247, 0.18);
  --accent-2:      #9b72f5;
  --accent-2-glow: rgba(155, 114, 245, 0.15);

  --gradient: linear-gradient(135deg, #4f8ef7 0%, #9b72f5 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(79,142,247,.07) 0%, rgba(155,114,245,.07) 100%);

  --nav-height: 64px;

  /* Typography */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Spacing */
  --section-pad: 6rem;

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  /* Transitions */
  --t-fast: 150ms ease;
  --t-base: 250ms ease;
  --t-slow: 400ms ease;

  /* Shadow */
  --shadow-card: 0 1px 3px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.25);
  --shadow-card-hover: 0 2px 6px rgba(0,0,0,.5), 0 8px 32px rgba(0,0,0,.3), 0 0 0 1px var(--border-light);
}

[data-theme="light"] {
  --bg:           #f7f9fc;
  --bg-alt:       #eef2f8;
  --surface:      #ffffff;
  --surface-2:    #f0f4fb;
  --border:       #d6e0ef;
  --border-light: #c2d0e6;

  --text-primary:   #0d1f3c;
  --text-secondary: #3b5070;
  --text-muted:     #7a94b0;

  --accent:        #2563eb;
  --accent-glow:   rgba(37, 99, 235, 0.12);
  --accent-2:      #7c3aed;
  --accent-2-glow: rgba(124, 58, 237, 0.10);

  --shadow-card: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-card-hover: 0 2px 8px rgba(0,0,0,.10), 0 8px 32px rgba(0,0,0,.08), 0 0 0 1px var(--border);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
  -webkit-text-size-adjust: 100%;
}

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

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
em  { font-style: italic; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* ── Layout helpers ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Reveal animations ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed          { opacity: 1; transform: none; }
.reveal.reveal-delay-1    { transition-delay: 0.12s; }
.reveal.reveal-delay-2    { transition-delay: 0.24s; }
.reveal.reveal-delay-3    { transition-delay: 0.36s; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--t-base);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
}
.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover {
  background: var(--accent-glow);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-sm {
  font-size: 0.8rem;
  padding: 0.45rem 1rem;
}

/* ── Chips / Tags ───────────────────────────────────────────── */
.chip, .tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all var(--t-fast);
}
.chip-accent {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-research { background: var(--accent-2-glow); color: var(--accent-2); border: 1px solid var(--accent-2); }
.badge-work     { background: var(--accent-glow);   color: var(--accent);   border: 1px solid var(--accent); }
.badge-other    { background: var(--surface-2);     color: var(--text-muted); border: 1px solid var(--border); }
.badge-featured { background: var(--gradient); color: #fff; border: none; }
.badge-inline   { font-size: 0.65rem; font-weight: 500; opacity: 0.7; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }

/* ── Section scaffold ───────────────────────────────────────── */
.section {
  padding-block: var(--section-pad);
}
.section-alt {
  background-color: var(--bg-alt);
}

.section-header {
  margin-bottom: 3.5rem;
}
.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
  position: relative;
  padding-left: 1.1rem;
}
.section-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  color: var(--text-primary);
}

.subsection-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ════════════════════════════════════════════════════════════
   NAV
   ════════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  transition: background-color var(--t-base), backdrop-filter var(--t-base), box-shadow var(--t-base);
}

.nav-scrolled {
  background: rgba(8, 16, 31, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}
[data-theme="light"] .nav-scrolled {
  background: rgba(247, 249, 252, 0.88);
}

.nav-inner {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 1.5rem;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: 1rem;
  flex: 1;
}
.nav-links a {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: all var(--t-fast);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text-primary);
  background: var(--surface-2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--t-fast);
  line-height: 1;
}
.theme-toggle:hover { background: var(--surface-2); color: var(--text-primary); }

.theme-icon-light { display: none; }
[data-theme="light"] .theme-icon-dark  { display: none; }
[data-theme="light"] .theme-icon-light { display: block; }

/* Burger */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  padding: 8px 7px;
  margin-left: auto;
}
.nav-burger span {
  display: block;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transform-origin: center;
  transition: all var(--t-base);
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--t-slow);
}
.nav-mobile.open {
  display: flex;
  max-height: 500px;
}
.nav-mobile ul {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.nav-mobile a {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--t-fast);
}
.nav-mobile a:hover { color: var(--text-primary); }
.nav-mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.25rem;
}
.nav-mobile-actions .btn { justify-content: center; }

/* ════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

/* Animated background */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbFloat 8s ease-in-out infinite alternate;
}
.hero-orb-1 {
  width: 480px;
  height: 480px;
  top: -15%;
  right: -5%;
  background: radial-gradient(circle, rgba(79,142,247,0.18) 0%, transparent 70%);
  animation-delay: 0s;
}
.hero-orb-2 {
  width: 380px;
  height: 380px;
  bottom: 5%;
  left: -8%;
  background: radial-gradient(circle, rgba(155,114,245,0.14) 0%, transparent 70%);
  animation-delay: -3s;
}

@keyframes orbFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(20px, -30px) scale(1.05); }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79,142,247,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,142,247,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 0%, transparent 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
  padding-block: 4rem;
}

/* Text side */
.hero-content { max-width: 600px; }

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-name {
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 1.05;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.05em;
}
.hero-name-first {
  color: var(--text-primary);
  animation: fadeSlideDown 0.7s ease both;
}
.hero-name-last {
  animation: fadeSlideDown 0.7s ease 0.15s both;
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: none; }
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}
.hero-tagline em {
  font-style: normal;
  color: var(--text-primary);
  font-weight: 500;
}

.hero-bio {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.75;
}
.hero-bio strong { color: var(--text-primary); font-weight: 600; }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Photo side */
.hero-photo {
  position: relative;
  flex-shrink: 0;
}

.photo-frame {
  position: relative;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-light);
  background: var(--surface);
  z-index: 1;
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--gradient-subtle);
  color: var(--text-muted);
  gap: 0.4rem;
}
.photo-initials {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.photo-placeholder-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.photo-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  z-index: 0;
  animation: glowPulse 3s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  from { opacity: 0.6; transform: scale(0.95); }
  to   { opacity: 1;   transform: scale(1.05); }
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: fadeIn 1s ease 1.2s both;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollLineAnim 1.8s ease-in-out infinite;
}
@keyframes scrollLineAnim {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}

/* ════════════════════════════════════════════════════════════
   ABOUT
   ════════════════════════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 1.025rem;
}
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--text-primary); font-weight: 600; }

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all var(--t-base);
}
.stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ════════════════════════════════════════════════════════════
   RESEARCH INTERESTS
   ════════════════════════════════════════════════════════════ */
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.research-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--t-base);
  position: relative;
  overflow: hidden;
}
.research-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity var(--t-base);
}
.research-card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}
.research-card:hover::before { opacity: 1; }

.research-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.research-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.7rem;
  color: var(--text-primary);
}
.research-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Publications */
.pub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem 2rem;
  position: relative;
  border-left: 3px solid var(--accent-2);
}
.pub-status {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: var(--accent-2-glow);
  border: 1px solid var(--accent-2);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}
.pub-title {
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}
.pub-authors {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}
.pub-venue {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-style: italic;
}
.pub-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ════════════════════════════════════════════════════════════
   EXPERIENCE TIMELINE
   ════════════════════════════════════════════════════════════ */
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 3rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -2.4rem;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent-glow);
  transition: box-shadow var(--t-base);
}
.timeline-item:hover .timeline-marker {
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 7px var(--accent-glow);
}

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  transition: all var(--t-base);
}
.timeline-item:hover .timeline-content {
  border-color: var(--border-light);
  box-shadow: var(--shadow-card);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.timeline-role {
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.timeline-org {
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.timeline-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}
.timeline-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.timeline-bullets li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-left: 1rem;
  position: relative;
  line-height: 1.65;
}
.timeline-bullets li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ════════════════════════════════════════════════════════════
   EDUCATION
   ════════════════════════════════════════════════════════════ */
.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  transition: all var(--t-base);
}
.edu-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-card);
}

.edu-logo {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.edu-body { flex: 1; }

.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.edu-degree {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}
.edu-school {
  font-size: 0.95rem;
  color: var(--accent);
}
.edu-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}
.gpa-badge {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 3px 10px;
  border-radius: 4px;
}

.edu-focus {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-style: italic;
}

.coursework-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.course-col-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.course-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.course-col li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.course-col li em {
  color: var(--accent);
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════
   PROJECTS
   ════════════════════════════════════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--t-base);
  overflow: hidden;
}
.project-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.project-featured {
  grid-column: span 3;
  background: var(--gradient-subtle);
  border-color: var(--border-light);
}

.project-card-inner {
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.project-badges { display: flex; gap: 0.5rem; align-items: center; }
.project-year {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 600;
}

.project-github {
  color: var(--text-muted);
  transition: color var(--t-fast);
  padding: 4px;
  border-radius: var(--radius-sm);
}
.project-github:hover { color: var(--text-primary); }

.project-title {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
  line-height: 1.35;
}
.project-featured .project-title {
  font-size: 1.2rem;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1rem;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
}

.projects-footer {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

/* ════════════════════════════════════════════════════════════
   SKILLS
   ════════════════════════════════════════════════════════════ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 2.5rem;
}

.skill-group {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--t-base);
}
.skill-group:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-card);
}

.skill-group-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.skill-group-title svg { color: var(--accent); flex-shrink: 0; }

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ════════════════════════════════════════════════════════════
   TEACHING
   ════════════════════════════════════════════════════════════ */
.teaching-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.teaching-col-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}
.teaching-col-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.role-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}
.role-chief {
  background: var(--gradient);
  color: #fff;
}
.role-ta {
  background: var(--accent-2-glow);
  color: var(--accent-2);
  border: 1px solid var(--accent-2);
}

.teaching-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  transition: all var(--t-base);
}
.teaching-card:hover {
  border-color: var(--border-light);
  transform: translateX(4px);
}
.teaching-card h4 {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}
.teaching-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.teaching-card-volunteer { border-left: 3px solid var(--accent-2); }
.volunteer-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.5rem;
}

.ta-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ta-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--t-fast);
}
.ta-item:hover { color: var(--text-primary); }
.ta-item em { color: var(--text-muted); font-size: 0.8rem; }

.ta-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   AWARDS & CERTS
   ════════════════════════════════════════════════════════════ */
.awards-certs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.award-card {
  display: flex;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  transition: all var(--t-base);
}
.award-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.award-gold {
  background: linear-gradient(135deg, rgba(251,191,36,.06) 0%, var(--surface) 100%);
  border-color: rgba(251,191,36,.3);
}
.award-gold:hover { border-color: rgba(251,191,36,.5); }

.award-icon {
  font-size: 2.2rem;
  line-height: 1;
  flex-shrink: 0;
}
.award-rank {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f59e0b;
  margin-bottom: 0.3rem;
}
.award-title {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.award-org {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}
.award-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Presentations */
.pres-list { display: flex; flex-direction: column; gap: 0.85rem; }
.pres-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  transition: all var(--t-base);
}
.pres-card:hover {
  border-color: var(--border-light);
  transform: translateX(4px);
}
.pres-card h4 {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}
.pres-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
  line-height: 1.6;
}

/* Certifications */
.cert-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  margin-bottom: 0.85rem;
  transition: all var(--t-base);
}
.cert-card:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}
.cert-icon {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.cert-card h4 {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.cert-issuer {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Languages */
.lang-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.lang-item {}
.lang-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.lang-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}
.lang-level {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.lang-bar {
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
}
.lang-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 2px;
  transition: width 1s ease 0.5s;
}

/* ════════════════════════════════════════════════════════════
   CONTACT
   ════════════════════════════════════════════════════════════ */
.contact-inner {
  max-width: 760px;
}

.contact-lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.75;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 3rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  transition: all var(--t-base);
}
.contact-link:hover {
  border-color: var(--accent);
  transform: translateX(4px);
  box-shadow: -3px 0 0 var(--accent);
}
.contact-link-todo {
  opacity: 0.5;
  pointer-events: none;
}

.contact-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  color: var(--accent);
  flex-shrink: 0;
}

.contact-link-body { flex: 1; min-width: 0; }
.contact-link-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}
.contact-link-value {
  display: block;
  font-size: 0.9rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.todo-text::after {
  content: 'Coming soon';
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
}

.resume-downloads {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.downloads-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.downloads-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════ */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-block: 2rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.footer-built {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.footer-built a {
  color: var(--text-secondary);
  transition: color var(--t-fast);
}
.footer-built a:hover { color: var(--accent); }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */

/* Tablet (≤ 960px) */
@media (max-width: 960px) {
  :root { --section-pad: 4.5rem; }

  .nav-links  { display: none; }
  .nav-actions .btn { display: none; }
  .nav-burger { display: flex; }

  .nav-mobile { display: none; }
  .nav-mobile.open { display: flex; }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content { max-width: 100%; }
  .hero-ctas { justify-content: center; }
  .hero-photo {
    order: -1;
    display: flex;
    justify-content: center;
  }
  .photo-frame { width: 200px; height: 200px; }

  .about-grid { grid-template-columns: 1fr; }
  .about-stats { flex-direction: row; flex-wrap: wrap; }
  .about-stats .stat-card { flex: 1; min-width: 120px; }

  .research-grid { grid-template-columns: 1fr; }

  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .project-featured { grid-column: span 2; }

  .skills-grid { grid-template-columns: 1fr; }

  .teaching-grid { grid-template-columns: 1fr; }

  .awards-certs-grid { grid-template-columns: 1fr; }

  .contact-links { grid-template-columns: 1fr; }

  .coursework-grid { grid-template-columns: repeat(2, 1fr); }

  .edu-card { flex-direction: column; gap: 1.25rem; }
  .edu-header { flex-direction: column; gap: 0.75rem; }
  .edu-meta { align-items: flex-start; }
}

/* Mobile (≤ 600px) */
@media (max-width: 600px) {
  :root { --section-pad: 3.5rem; }

  .hero-name { font-size: clamp(2rem, 10vw, 2.8rem); }

  .projects-grid { grid-template-columns: 1fr; }
  .project-featured { grid-column: span 1; }

  .coursework-grid { grid-template-columns: 1fr; }

  .timeline { padding-left: 1.5rem; }
  .timeline-header { flex-direction: column; gap: 0.5rem; }
  .timeline-meta { align-items: flex-start; }

  .downloads-row { flex-direction: column; }
  .downloads-row .btn { justify-content: center; }

  .footer-inner { flex-direction: column; text-align: center; }
}

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ── Focus styles (accessibility) ───────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}