/* Design tokens — fonts loaded via index.html link */
:root,
[data-theme="dark"] {
  --bg: #06080f;
  --bg-elevated: rgba(12, 16, 28, 0.82);
  --bg-card: rgba(14, 19, 32, 0.72);
  --bg-card-hover: rgba(22, 28, 48, 0.88);
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(99, 102, 241, 0.45);
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #6366f1;
  --accent-2: #06b6d4;
  --accent-3: #ec4899;
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --grad-text: linear-gradient(135deg, #fff 20%, #a5b4fc 100%);
  --glow: radial-gradient(circle, rgba(99, 102, 241, 0.14) 0%, transparent 70%);
  --shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.5);
  --header-bg: rgba(6, 8, 15, 0.75);
  --particle: rgba(99, 102, 241, 0.12);
  --grid-line: rgba(255, 255, 255, 0.03);
  --focus-ring: 0 0 0 3px rgba(99, 102, 241, 0.45);
}

[data-theme="light"] {
  --bg: #fafbfe;
  --bg-elevated: rgba(255, 255, 255, 0.92);
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --border-hover: rgba(99, 102, 241, 0.35);
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --grad-text: linear-gradient(135deg, #0f172a 20%, #6366f1 100%);
  --glow: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  --shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.12);
  --header-bg: rgba(250, 251, 254, 0.85);
  --particle: rgba(99, 102, 241, 0.08);
  --grid-line: rgba(15, 23, 42, 0.04);
}

:root {
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-full: 9999px;
}

[hidden] { display: none !important; }

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }

.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 9999;
  background: var(--accent); color: #fff; padding: 10px 18px;
  border-radius: var(--radius-sm); font-weight: 600; text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* ─── Background ─── */
#particle-canvas {
  position: fixed; inset: 0; z-index: -3; pointer-events: none; opacity: 0.55;
}
.glow-bg-radial {
  position: fixed; top: 15%; left: 50%; transform: translateX(-50%);
  width: min(90vw, 1100px); aspect-ratio: 1;
  background: var(--glow); filter: blur(90px); z-index: -2; pointer-events: none;
}
.grid-overlay {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black, transparent);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, 0.25); border-radius: 4px; }

/* ─── Layout ─── */
.container { width: min(92%, 1180px); margin: 0 auto; }
.section { padding: clamp(72px, 10vw, 120px) 0; position: relative; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.025em; }
p { color: var(--text-secondary); }

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

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  text-align: center; margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.section-title::after {
  content: ''; width: 48px; height: 3px;
  background: var(--grad); border-radius: 2px;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease), background 0.4s var(--ease);
}
.glass-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

/* ─── Header ─── */
header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 200;
  background: var(--header-bg);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s var(--ease), padding 0.3s;
}
header.scrolled { background: var(--bg-elevated); }
.nav-container {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; position: relative; gap: 16px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 700;
  text-decoration: none; color: var(--text); flex-shrink: 0;
}
.logo span { color: var(--accent); }
.nav-links {
  display: flex; list-style: none; gap: clamp(12px, 2vw, 24px); align-items: center;
}
.nav-links a {
  text-decoration: none; color: var(--text-secondary); font-size: 0.875rem;
  font-weight: 500; transition: color 0.3s; position: relative; padding: 4px 0;
  white-space: nowrap;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
  background: var(--grad); transition: width 0.3s var(--ease);
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.icon-btn {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: transparent;
  color: var(--text-secondary); display: flex; align-items: center; justify-content: center;
  transition: all 0.3s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-hover); background: rgba(99,102,241,0.08); }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

.nav-toggle {
  display: none; width: 40px; height: 40px; border: none; background: transparent;
  color: var(--text); padding: 8px;
}
.hamburger, .hamburger::before, .hamburger::after {
  display: block; width: 22px; height: 2px; background: currentColor;
  border-radius: 2px; transition: transform 0.3s;
}
.hamburger { position: relative; }
.hamburger::before, .hamburger::after {
  content: ''; position: absolute; left: 0;
}
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }
.nav-toggle.open .hamburger { background: transparent; }
.nav-toggle.open .hamburger::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open .hamburger::after { transform: translateY(-7px) rotate(-45deg); }

.scroll-progress {
  position: absolute; bottom: 0; left: 0; height: 2px;
  background: var(--grad); width: 0%; transition: width 0.1s linear;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-full);
  font-weight: 600; font-size: 0.9rem; text-decoration: none;
  border: none; transition: all 0.35s var(--ease-bounce); white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -6px rgba(99,102,241,0.45); }
.btn-secondary {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-hover); background: rgba(99,102,241,0.06); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid transparent; }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }

/* ─── Hero ─── */
.hero-section {
  min-height: 100vh; display: flex; align-items: center;
  padding: 140px 0 80px;
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 64px); align-items: center;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: var(--radius-full);
  background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.2);
  color: #a5b4fc; font-size: 0.8rem; font-weight: 600; margin-bottom: 20px;
}
.hero-tag span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2); animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(6,182,212,0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(6,182,212,0); }
}
.hero-title { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.08; margin-bottom: 18px; }
.hero-title span { display: block; }
.typewriter { min-height: 1.2em; }
.hero-desc { font-size: clamp(1rem, 2vw, 1.125rem); max-width: 540px; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.hero-socials { display: flex; gap: 12px; }
.social-icon {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(255,255,255,0.02);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); text-decoration: none;
  transition: all 0.35s var(--ease-bounce);
}
.social-icon:hover { color: var(--text); border-color: var(--accent); background: rgba(99,102,241,0.12); transform: translateY(-4px); }

/* Avatar */
.hero-visual { display: flex; justify-content: center; }
.avatar-container {
  width: clamp(260px, 30vw, 320px); aspect-ratio: 1; position: relative;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.avatar-glow-ring {
  position: absolute; inset: -8px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  animation: spin 4s linear infinite; opacity: 0.7;
  filter: blur(2px);
}
@keyframes spin { to { transform: rotate(360deg); } }
.avatar-ring {
  position: absolute; inset: 4px; border-radius: 50%;
  border: 2px dashed rgba(99,102,241,0.25);
  animation: spin 20s linear infinite reverse;
}
.avatar-ring-inner {
  position: absolute; inset: 16px; border-radius: 50%;
  border: 1px solid rgba(6,182,212,0.3);
  animation: spin 14s linear infinite;
}
.avatar-core {
  position: absolute; inset: 24px; border-radius: 50%; overflow: hidden;
  border: 3px solid var(--border);
  box-shadow: inset 0 0 30px rgba(99,102,241,0.15);
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}
.avatar-container:hover .avatar-core {
  transform: scale(1.04);
  box-shadow: 0 0 40px rgba(99,102,241,0.3), inset 0 0 30px rgba(99,102,241,0.2);
}
.avatar-core img {
  width: 100%; height: 100%; object-fit: cover;
}

/* ─── About ─── */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; }
.summary-card h3 { font-size: 1.5rem; margin-bottom: 16px; }
.summary-card p + p { margin-top: 14px; }
.highlight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat-box { text-align: center; padding: 20px; }
.stat-num { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; margin-bottom: 6px; }
.stat-lbl { font-size: 0.78rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.06em; }

/* ─── Skills ─── */
.skills-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px;
}
.skill-category h3 {
  font-size: 1.1rem; margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.skill-category h3 svg { stroke: var(--accent-2); flex-shrink: 0; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tag {
  padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(255,255,255,0.02);
  font-size: 0.85rem; font-weight: 500; color: var(--text-secondary);
  transition: all 0.3s var(--ease);
}
.skill-tag:hover {
  border-color: var(--accent-2); color: var(--text);
  background: rgba(6,182,212,0.08); transform: translateY(-2px);
}

/* ─── Projects ─── */
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px;
}
.project-card {
  display: flex; flex-direction: column; gap: 14px;
  position: relative; overflow: hidden;
}
.project-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad); transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.project-card:hover::before { transform: scaleX(1); }
.project-card h3 { font-size: 1.2rem; }
.project-card p { font-size: 0.9rem; flex: 1; }
.project-tech { display: flex; flex-wrap: wrap; gap: 6px; }
.project-tech span {
  font-size: 0.72rem; padding: 4px 10px; border-radius: var(--radius-full);
  background: rgba(99,102,241,0.1); color: var(--accent); font-weight: 600;
  border: 1px solid rgba(99,102,241,0.15);
}
.project-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }

/* ─── Achievements ─── */
.achievements-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px;
}
.achievement-card { text-align: center; padding: 28px 20px; }
.achievement-icon {
  width: 52px; height: 52px; margin: 0 auto 14px;
  border-radius: 14px; background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.15);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 1.4rem;
}
.achievement-value {
  font-family: var(--font-display); font-size: 2.5rem; font-weight: 700;
  line-height: 1; margin-bottom: 6px;
}
.achievement-label { font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; color: var(--text); }
.achievement-desc { font-size: 0.82rem; }

/* ─── Coding Profiles ─── */
.profiles-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px;
}
.profile-card {
  display: flex; flex-direction: column; gap: 16px; padding: 28px;
}
.profile-header { display: flex; align-items: center; gap: 16px; }
.profile-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(99,102,241,0.1); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
  flex-shrink: 0;
}
.profile-meta h4 { font-size: 1.1rem; margin-bottom: 2px; }
.profile-meta p { font-size: 0.8rem; color: var(--text-muted); }
.profile-card > p { font-size: 0.9rem; flex: 1; }
.btn-arrow {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: transparent;
  color: var(--text-secondary); text-decoration: none; font-size: 0.85rem; font-weight: 600;
  transition: all 0.3s var(--ease);
}
.profile-card:hover .btn-arrow {
  background: var(--grad); border-color: transparent; color: #fff;
  transform: translateX(4px);
}

/* ─── Education ─── */
.education-layout { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; }
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2), transparent);
}
.timeline-item { position: relative; margin-bottom: 28px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute; left: -34px; top: 8px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); z-index: 1;
  transition: all 0.3s var(--ease-bounce);
}
.timeline-item:hover .timeline-dot { background: var(--accent); box-shadow: 0 0 12px var(--accent); transform: scale(1.2); }
.timeline-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.timeline-title { font-size: 1.05rem; }
.timeline-inst { font-size: 0.9rem; color: var(--accent-2); font-weight: 500; }
.timeline-date {
  font-size: 0.78rem; padding: 4px 12px; border-radius: var(--radius-full);
  border: 1px solid var(--border); color: var(--text-secondary); white-space: nowrap;
}
.timeline-body p { font-size: 0.9rem; }
.timeline-grade { margin-top: 10px; font-weight: 600; font-size: 0.9rem; }
.timeline-grade span { color: var(--accent-3); }
.coursework-card h3 { font-size: 1.15rem; margin-bottom: 16px; }
.coursework-list { display: flex; flex-direction: column; gap: 10px; }
.coursework-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  font-size: 0.88rem; color: var(--text-secondary);
}
.coursework-item svg { color: var(--accent); flex-shrink: 0; }

/* ─── Certifications ─── */
.certs-slider-container { position: relative; }
.certs-slider {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding: 8px 0 16px;
}
.certs-slider::-webkit-scrollbar { display: none; }
.cert-card {
  flex: 0 0 min(340px, 85vw); scroll-snap-align: start;
  display: flex; flex-direction: column; justify-content: space-between; min-height: 190px;
}
.cert-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.cert-badge {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(99,102,241,0.08); border: 1px solid rgba(99,102,241,0.15);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.cert-authority { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-2); font-weight: 700; }
.cert-title { font-size: 1.15rem; margin-bottom: 16px; color: var(--text); }
.cert-status { font-size: 0.78rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.cert-status span { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }
.certs-nav { display: flex; justify-content: center; gap: 12px; margin-top: 20px; }
.certs-nav-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-secondary); display: flex; align-items: center; justify-content: center;
  transition: all 0.3s var(--ease-bounce);
}
.certs-nav-btn:hover { background: var(--grad); border-color: transparent; color: #fff; transform: scale(1.08); }

/* ─── Resume ─── */
.resume-locked, .resume-unlocked { max-width: 640px; margin: 0 auto; text-align: center; }
.resume-locked-icon {
  width: 64px; height: 64px; margin: 0 auto 20px;
  border-radius: 16px; background: rgba(99,102,241,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 1.8rem;
}
.resume-locked h3, .resume-unlocked h3 { font-size: 1.4rem; margin-bottom: 10px; }
.resume-locked p, .resume-unlocked p { margin-bottom: 24px; }
.resume-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ─── Contact ─── */
.contact-layout { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; }
.contact-info-panel h3 { font-size: 1.75rem; margin-bottom: 12px; }
.contact-info-panel > p { margin-bottom: 24px; }
.contact-links { display: flex; flex-direction: column; gap: 14px; }
.contact-link-item {
  display: flex; align-items: center; gap: 16px; padding: 18px; cursor: pointer;
  transition: all 0.3s var(--ease);
}
.contact-link-item.no-copy { cursor: default; }
.contact-link-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: rgba(99,102,241,0.08); border: 1px solid rgba(99,102,241,0.12);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
  transition: all 0.3s var(--ease-bounce); flex-shrink: 0;
}
.contact-link-item:hover .contact-link-icon {
  background: var(--grad); color: #fff; border-color: transparent; transform: scale(1.06);
}
.contact-link-details h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 3px; }
.contact-link-details p { font-size: 1rem; font-weight: 600; color: var(--text); margin: 0; }
.contact-form-panel { padding: clamp(24px, 4vw, 40px); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.form-control {
  width: 100%; padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(255,255,255,0.02);
  color: var(--text); font-size: 0.9rem; transition: all 0.3s;
}
.form-control:focus { border-color: var(--accent); background: rgba(99,102,241,0.04); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); outline: none; }
textarea.form-control { resize: vertical; min-height: 110px; }
.form-error { color: #ef4444; font-size: 0.85rem; margin-bottom: 12px; }

/* ─── Modal ─── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal { width: min(100%, 420px); position: relative; padding: 32px; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border: none; background: transparent;
  color: var(--text-secondary); font-size: 1.5rem; line-height: 1;
  border-radius: 8px; transition: all 0.2s;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.modal h3 { font-size: 1.3rem; margin-bottom: 8px; }
.modal-desc { font-size: 0.9rem; margin-bottom: 20px; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; }

/* ─── Toast ─── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 600; }
.toast {
  background: var(--bg-elevated); border: 1px solid var(--accent-2);
  color: var(--text); padding: 14px 20px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow); font-weight: 600; font-size: 0.9rem;
  display: flex; align-items: center; gap: 10px;
  transform: translateY(80px); opacity: 0;
  transition: all 0.4s var(--ease-bounce);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-icon { color: var(--accent-2); }

/* ─── Loader ─── */
.loader {
  position: fixed; inset: 0; z-index: 999;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  transition: opacity 0.4s, visibility 0.4s;
}
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-spinner {
  width: 40px; height: 40px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ─── Footer ─── */
footer { padding: 36px 0; border-top: 1px solid var(--border); text-align: center; }
footer p { font-size: 0.85rem; color: var(--text-muted); }

/* ─── Reveal Animations ─── */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--delay, 0s);
}
.reveal.active { opacity: 1; transform: translateY(0); }
.stagger > * {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.stagger.active > * { opacity: 1; transform: translateY(0); }
.stagger.active > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.active > *:nth-child(2) { transition-delay: 0.1s; }
.stagger.active > *:nth-child(3) { transition-delay: 0.15s; }
.stagger.active > *:nth-child(4) { transition-delay: 0.2s; }
.stagger.active > *:nth-child(5) { transition-delay: 0.25s; }
.stagger.active > *:nth-child(6) { transition-delay: 0.3s; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .hero-grid, .about-grid, .education-layout, .contact-layout { grid-template-columns: 1fr; }
  .hero-grid { text-align: center; }
  .hero-tag, .hero-actions, .hero-socials { justify-content: center; }
  .hero-desc { margin-inline: auto; }
  .hero-visual { order: -1; }
  .avatar-container { width: 240px; }
}

@media (max-width: 768px) {
  nav[aria-label="Primary navigation"] { position: static; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-links {
    position: fixed; top: 68px; left: 0; width: 100%;
    height: calc(100dvh - 68px); background: var(--bg-elevated);
    backdrop-filter: blur(20px); flex-direction: column;
    padding: 40px 24px; gap: 24px;
    transform: translateX(100%); transition: transform 0.4s var(--ease);
    border-top: 1px solid var(--border); overflow-y: auto;
  }
  .nav-links.active { transform: translateX(0); }
  .nav-links a { font-size: 1rem; }
}

@media (max-width: 480px) {
  .highlight-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}

@media (max-width: 320px) {
  .container { width: 96%; }
  .section { padding: 56px 0; }
}

@media (min-width: 1440px) {
  .container { max-width: 1240px; }
}

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