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

/* ─────────────────────────────────────────────
   LIGHT MODE (default)
───────────────────────────────────────────── */
:root {
  --bg:          #f8fafc;
  --bg-alt:      #f1f5f9;
  --surface:     #ffffff;
  --surface-2:   #f8fafc;
  --border:      rgba(99, 102, 241, 0.12);
  --border-glow: rgba(99, 102, 241, 0.3);

  --indigo:      #4f46e5;
  --indigo-dim:  rgba(79, 70, 229, 0.07);
  --cyan:        #0891b2;
  --cyan-dim:    rgba(8, 145, 178, 0.07);
  --purple:      #7c3aed;
  --green:       #059669;

  --text:        #0f172a;
  --text-muted:  #64748b;
  --text-dim:    #475569;

  --nav-bg:      rgba(248, 250, 252, 0.88);
  --shadow:      0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:   0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);

  --font:  'Inter', system-ui, sans-serif;
  --mono:  'JetBrains Mono', 'Fira Code', monospace;
  --nav-h: 68px;
  --radius:    12px;
  --radius-lg: 20px;
}

/* ─────────────────────────────────────────────
   DARK MODE
───────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:          #030712;
  --bg-alt:      #080f1e;
  --surface:     #0d1526;
  --surface-2:   #111d35;
  --border:      rgba(99, 102, 241, 0.15);
  --border-glow: rgba(99, 102, 241, 0.35);

  --indigo:      #6366f1;
  --indigo-dim:  rgba(99, 102, 241, 0.12);
  --cyan:        #22d3ee;
  --cyan-dim:    rgba(34, 211, 238, 0.1);
  --purple:      #a855f7;
  --green:       #34d399;

  --text:        #f1f5f9;
  --text-muted:  #64748b;
  --text-dim:    #94a3b8;

  --nav-bg:      rgba(3, 7, 18, 0.88);
  --shadow:      0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:   0 4px 6px rgba(0,0,0,0.3);
}

/* ─────────────────────────────────────────────
   BASE
───────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--indigo); border-radius: 3px; }

/* ─────────────────────────────────────────────
   THEME TOGGLE ICONS
───────────────────────────────────────────── */
.icon-moon { display: block; }
.icon-sun  { display: none; }

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

/* ─────────────────────────────────────────────
   NAVIGATION
───────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.3s, box-shadow 0.3s;
}

#navbar.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo-bracket { color: var(--indigo); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--indigo-dim); }

.nav-cta {
  background: var(--indigo) !important;
  color: white !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
}
.nav-cta:hover { opacity: 0.9 !important; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle:hover {
  border-color: var(--indigo);
  color: var(--indigo);
  background: var(--indigo-dim);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  padding: 16px 24px 24px;
  border-bottom: 1px solid var(--border);
}
.mobile-menu.open { display: flex; }
.mobile-link {
  padding: 12px 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.mobile-link:last-child { border-bottom: none; }
.mobile-link:hover { color: var(--indigo); }

/* ─────────────────────────────────────────────
   HERO
───────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--nav-h) 24px 80px;
}

#neuralCanvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0.45;
}

#hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(79,70,229,0.1) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(124,58,237,0.07) 0%, transparent 60%);
  pointer-events: none;
}
[data-theme="dark"] #hero::before {
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(99,102,241,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(168,85,247,0.1) 0%, transparent 60%);
}

#hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border: 1px solid rgba(5,150,105,0.3);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--green);
  background: rgba(5,150,105,0.06);
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}
[data-theme="dark"] .hero-badge {
  border-color: rgba(52,211,153,0.3);
  background: rgba(52,211,153,0.06);
}

.badge-dot {
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 currentColor; }
  50% { opacity: 0.8; transform: scale(1.1); }
}

.hero-name {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 16px;
  display: flex;
  gap: 0.25em;
  justify-content: center;
  flex-wrap: wrap;
}
.name-accent {
  background: linear-gradient(135deg, var(--indigo), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-roles {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-family: var(--mono);
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 24px;
  height: 2em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.role-prefix { color: var(--text-muted); }
.typewriter { color: var(--indigo); }
.cursor {
  color: var(--indigo);
  animation: blink 0.9s infinite;
  font-weight: 300;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--indigo), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.stat-label {
  font-size: 0.73rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}
.stat-divider {
  width: 1px; height: 40px;
  background: var(--border);
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-primary {
  background: var(--indigo);
  color: white;
  box-shadow: 0 0 20px rgba(79,70,229,0.25);
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(79,70,229,0.35);
}
[data-theme="dark"] .btn-primary { box-shadow: 0 0 24px rgba(99,102,241,0.35); }
[data-theme="dark"] .btn-primary:hover { box-shadow: 0 0 36px rgba(99,102,241,0.5); }

.btn-ghost {
  border: 1px solid var(--border-glow);
  color: var(--text-dim);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.btn-ghost:hover {
  border-color: var(--indigo);
  color: var(--text);
  background: var(--indigo-dim);
  transform: translateY(-2px);
}

.hero-socials {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.hero-socials a {
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.hero-socials a svg { width: 18px; height: 18px; }
.hero-socials a:hover {
  border-color: var(--indigo);
  color: var(--indigo);
  background: var(--indigo-dim);
  transform: translateY(-2px);
}

.scroll-hint {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: float 2s ease-in-out infinite;
}
.scroll-line {
  width: 1px; height: 32px;
  background: linear-gradient(to bottom, var(--indigo), transparent);
}
@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ─────────────────────────────────────────────
   SECTIONS
───────────────────────────────────────────── */
.section { padding: 100px 24px; }
.section-alt { background: var(--bg-alt); }
.container { max-width: 1100px; margin: 0 auto; }

.section-header { margin-bottom: 60px; }
.section-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--indigo);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.1;
}

/* ─────────────────────────────────────────────
   REVEAL
───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible { opacity: 1; transform: none; }

/* ─────────────────────────────────────────────
   ABOUT
───────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.about-text p {
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 16px;
  font-size: 1rem;
}
.about-text p:last-child { margin-bottom: 0; }
.about-lead { font-size: 1.05rem !important; color: var(--text) !important; }
.about-text strong { color: var(--text); font-weight: 600; }

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

.profile-photo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}
.profile-photo {
  width: 185px;
  height: 185px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: grayscale(100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 55%, transparent 100%);
}

.info-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.info-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-md);
}
.info-card-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--indigo-dim);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--indigo);
}
.info-card-icon svg { width: 18px; height: 18px; }
.info-card-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 2px;
}
.info-card-value { font-size: 0.88rem; font-weight: 600; color: var(--text); }

/* ─────────────────────────────────────────────
   SKILLS
───────────────────────────────────────────── */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.skill-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.skill-category:hover { border-color: var(--border-glow); box-shadow: var(--shadow-md); }

.skill-cat-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
}
.skill-cat-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--indigo-dim);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--indigo);
}
.skill-cat-icon svg { width: 18px; height: 18px; }
.skill-cat-header h3 { font-size: 0.92rem; font-weight: 700; color: var(--text); }

.skill-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.skill-tag {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.775rem;
  font-weight: 600;
  font-family: var(--mono);
  transition: all 0.2s;
  cursor: default;
}
.skill-tag.tier-1 {
  background: rgba(79,70,229,0.08);
  border: 1px solid rgba(79,70,229,0.2);
  color: var(--indigo);
}
[data-theme="dark"] .skill-tag.tier-1 {
  background: rgba(99,102,241,0.12);
  border-color: rgba(99,102,241,0.3);
  color: #a5b4fc;
}
.skill-tag.tier-2 {
  background: rgba(8,145,178,0.07);
  border: 1px solid rgba(8,145,178,0.18);
  color: var(--cyan);
}
[data-theme="dark"] .skill-tag.tier-2 {
  background: rgba(34,211,238,0.08);
  border-color: rgba(34,211,238,0.2);
  color: #67e8f9;
}
.skill-tag.tier-3 {
  background: rgba(100,116,139,0.07);
  border: 1px solid rgba(100,116,139,0.15);
  color: var(--text-muted);
}
.skill-tag:hover { transform: translateY(-2px); filter: brightness(0.9); }
[data-theme="dark"] .skill-tag:hover { filter: brightness(1.15); }

/* ─────────────────────────────────────────────
   TIMELINE
───────────────────────────────────────────── */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 12px; bottom: 12px;
  width: 2px;
  background: linear-gradient(to bottom, var(--indigo), transparent);
}

.timeline-item { display: flex; gap: 28px; margin-bottom: 48px; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker { position: relative; flex-shrink: 0; margin-left: -32px; }
.timeline-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border-glow);
  margin-top: 6px;
}
.timeline-dot.active {
  background: var(--indigo);
  border-color: var(--indigo);
  box-shadow: 0 0 10px rgba(79,70,229,0.4);
}
[data-theme="dark"] .timeline-dot.active { box-shadow: 0 0 12px rgba(99,102,241,0.6); }

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 30px;
  flex: 1;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.timeline-content:hover { border-color: var(--border-glow); box-shadow: var(--shadow-md); }

.timeline-header { margin-bottom: 14px; }
.timeline-meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px; flex-wrap: wrap;
}
.timeline-date {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}
.active-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(5,150,105,0.08);
  border: 1px solid rgba(5,150,105,0.25);
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
[data-theme="dark"] .active-badge {
  background: rgba(52,211,153,0.1);
  border-color: rgba(52,211,153,0.3);
}

.timeline-role { font-size: 1.15rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.timeline-org { font-size: 0.875rem; color: var(--indigo); font-weight: 500; }

.timeline-points { list-style: none; margin-bottom: 18px; }
.timeline-points li {
  position: relative;
  padding-left: 16px;
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 9px;
}
.timeline-points li::before {
  content: '▸';
  position: absolute; left: 0;
  color: var(--indigo);
  font-size: 0.68rem;
  top: 4px;
}
.timeline-points li strong { color: var(--text); font-weight: 600; }
.timeline-points li a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: rgba(8,145,178,0.3);
  text-underline-offset: 2px;
  transition: color 0.2s;
}
[data-theme="dark"] .timeline-points li a { text-decoration-color: rgba(34,211,238,0.3); }
.timeline-points li a:hover { color: var(--text); }

.timeline-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.timeline-tags span {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-family: var(--mono);
  font-weight: 500;
  background: var(--indigo-dim);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ─────────────────────────────────────────────
   PROJECTS
───────────────────────────────────────────── */
.projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.project-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  overflow: hidden;
}
.project-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.project-card.featured { border-color: rgba(79,70,229,0.2); }
[data-theme="dark"] .project-card.featured { border-color: rgba(99,102,241,0.25); }
.project-card.featured:hover { border-color: var(--indigo); }

.project-card-glow {
  position: absolute;
  top: -40px; right: -40px;
  width: 150px; height: 150px;
  background: radial-gradient(circle, rgba(79,70,229,0.07) 0%, transparent 70%);
  pointer-events: none;
}
[data-theme="dark"] .project-card-glow {
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
}

.project-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.project-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--indigo-dim);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--indigo);
}
.project-icon svg { width: 20px; height: 20px; }

.project-links { display: flex; gap: 8px; }
.project-link {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s;
}
.project-link svg { width: 15px; height: 15px; }
.project-link:hover {
  border-color: var(--indigo);
  color: var(--indigo);
  background: var(--indigo-dim);
}

.project-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  background: rgba(5,150,105,0.08);
  border: 1px solid rgba(5,150,105,0.2);
  color: var(--green);
}
[data-theme="dark"] .project-badge {
  background: rgba(52,211,153,0.1);
  border-color: rgba(52,211,153,0.25);
}
.project-badge.research {
  background: rgba(124,58,237,0.07);
  border-color: rgba(124,58,237,0.2);
  color: var(--purple);
}
[data-theme="dark"] .project-badge.research { color: #c084fc; }
.project-badge.more {
  background: rgba(8,145,178,0.07);
  border-color: rgba(8,145,178,0.18);
  color: var(--cyan);
}

.project-title { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 8px; line-height: 1.3; }
.project-desc { font-size: 0.868rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 18px; }

.project-stack { display: flex; flex-wrap: wrap; gap: 6px; }
.project-stack span {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.71rem;
  font-family: var(--mono);
  font-weight: 500;
  background: rgba(100,116,139,0.07);
  border: 1px solid rgba(100,116,139,0.14);
  color: var(--text-muted);
}

/* ─────────────────────────────────────────────
   PUBLICATIONS
───────────────────────────────────────────── */
.pubs-grid { display: grid; gap: 14px; }

.pub-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 30px;
  display: flex; gap: 22px; align-items: flex-start;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.pub-card:hover {
  border-color: var(--border-glow);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.pub-type-badge {
  position: absolute;
  top: 20px; right: 22px;
  font-size: 0.67rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pub-publication {
  background: rgba(79,70,229,0.07);
  border: 1px solid rgba(79,70,229,0.2);
  color: var(--indigo);
}
[data-theme="dark"] .pub-publication { color: #a5b4fc; background: rgba(99,102,241,0.1); }
.pub-talk {
  background: rgba(8,145,178,0.07);
  border: 1px solid rgba(8,145,178,0.18);
  color: var(--cyan);
}
.pub-award {
  background: rgba(180,130,0,0.07);
  border: 1px solid rgba(180,130,0,0.2);
  color: #92650a;
}
[data-theme="dark"] .pub-award { color: #fbbf24; background: rgba(251,191,36,0.08); border-color: rgba(251,191,36,0.2); }

.pub-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 11px;
  background: var(--indigo-dim);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--indigo);
}
.pub-icon svg { width: 20px; height: 20px; }

.pub-content h3 {
  font-size: 0.98rem; font-weight: 700; color: var(--text);
  margin-bottom: 5px; padding-right: 90px;
}
.pub-venue { font-size: 0.8rem; color: var(--indigo); font-weight: 600; margin-bottom: 5px; }
.pub-authors { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.pub-detail { font-size: 0.83rem; color: var(--text-muted); line-height: 1.6; }
.pub-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.8rem; font-family: var(--mono);
  color: var(--cyan); transition: color 0.2s;
}
.pub-link svg { width: 12px; height: 12px; }
.pub-link:hover { color: var(--text); }

/* ─────────────────────────────────────────────
   EDUCATION
───────────────────────────────────────────── */
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.edu-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.edu-card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 14px; gap: 16px;
}
.edu-degree-icon {
  width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 11px;
  background: var(--indigo-dim);
  border: 1px solid rgba(79,70,229,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--indigo);
}
.edu-degree-icon svg { width: 22px; height: 22px; }

.edu-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.edu-date { font-family: var(--mono); font-size: 0.73rem; color: var(--text-muted); }
.edu-honours {
  font-size: 0.7rem; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(5,150,105,0.08);
  border: 1px solid rgba(5,150,105,0.2);
  color: var(--green);
  text-transform: uppercase; letter-spacing: 0.05em;
}
[data-theme="dark"] .edu-honours { background: rgba(52,211,153,0.1); border-color: rgba(52,211,153,0.25); }

.edu-degree { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 4px; line-height: 1.3; }
.edu-institution { font-size: 0.86rem; color: var(--indigo); font-weight: 500; margin-bottom: 22px; }

.edu-module-title {
  font-size: 0.7rem; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 9px;
}
.edu-module-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.edu-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.74rem; font-family: var(--mono); font-weight: 500;
  background: rgba(100,116,139,0.07);
  border: 1px solid rgba(100,116,139,0.15);
  color: var(--text-muted);
}
.edu-tag.high {
  background: rgba(79,70,229,0.07);
  border-color: rgba(79,70,229,0.18);
  color: var(--indigo);
}
[data-theme="dark"] .edu-tag.high { color: #a5b4fc; background: rgba(99,102,241,0.1); }
.edu-tag em {
  font-style: normal; font-weight: 700;
  color: var(--green); font-size: 0.68rem;
}

/* ─────────────────────────────────────────────
   CONTACT
───────────────────────────────────────────── */
#contact { text-align: center; }
.contact-inner { max-width: 780px; margin: 0 auto; }
.contact-lead {
  font-size: 1.1rem; color: var(--text-dim);
  line-height: 1.8; margin-bottom: 44px;
}
.contact-lead strong { color: var(--text); }

.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.contact-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.2s; text-align: left;
}
.contact-card:hover {
  border-color: var(--indigo);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.contact-card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--indigo-dim);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--indigo); flex-shrink: 0;
}
.contact-card-icon svg { width: 18px; height: 18px; }
.contact-card-label {
  font-size: 0.7rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  font-weight: 600; margin-bottom: 2px;
}
.contact-card-value { font-size: 0.86rem; font-weight: 600; color: var(--text); }

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 28px 24px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
}
.footer-logo { font-family: var(--mono); font-size: 1rem; font-weight: 700; }
.footer-copy { font-size: 0.78rem; color: var(--text-muted); }
.footer-socials { display: flex; gap: 8px; }
.footer-socials a {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s;
}
.footer-socials a svg { width: 15px; height: 15px; }
.footer-socials a:hover { border-color: var(--indigo); color: var(--indigo); }

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: 1fr; }

  .hero-stats { gap: 20px; }
  .stat-divider { display: none; }

  .timeline { padding-left: 20px; }
  .timeline::before { left: 5px; }
  .timeline-marker { margin-left: -20px; }
  .timeline-dot { width: 12px; height: 12px; }

  .pub-card { flex-direction: column; gap: 14px; }
  .pub-content h3 { padding-right: 0; }
  .pub-type-badge { position: static; display: inline-block; margin-bottom: 6px; }

  .edu-card-top { flex-wrap: wrap; }
  .edu-meta { align-items: flex-start; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-socials { justify-content: center; }
  .section { padding: 72px 20px; }
}

@media (max-width: 480px) {
  .hero-name { font-size: 2.4rem; }
  .hero-roles { font-size: 0.9rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .timeline-content { padding: 18px; }
}


/* ─────────────────────────────────────────────
   ALTMETRIC BADGE
───────────────────────────────────────────── */
.altmetric-wrap {
  margin-top: 12px;
  display: flex;
  align-items: center;
}

/* ─────────────────────────────────────────────
   CONTACT FORM
───────────────────────────────────────────── */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.contact-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.contact-form-row .contact-form-group { margin-bottom: 0; }

.contact-form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.contact-form-group input,
.contact-form-group textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}

.contact-form-group input::placeholder,
.contact-form-group textarea::placeholder { color: var(--text-muted); }

.contact-form-group input:focus,
.contact-form-group textarea:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px var(--indigo-dim);
}

.contact-form-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: none;
}
.contact-form-btn svg { width: 16px; height: 16px; }

.contact-form-success {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--green);
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s;
  height: 0;
  overflow: hidden;
}
.contact-form-success.visible { opacity: 1; height: auto; }

.contact-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.contact-divider::before,
.contact-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

@media (max-width: 768px) {
  .contact-form-row { grid-template-columns: 1fr; }
}
