/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* Colors */
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --secondary-color: #ec4899;
  --accent-color: #06b6d4;
  /* RGB channels for the accent colors, so baked rgba() gradients/glows below
     re-tint with the accent theme (red/orange/mono) instead of staying indigo/
     pink/cyan. Defaults match blue; html[data-accent=...] overrides these. */
  --accent-primary-rgb: 99, 102, 241;
  --accent-secondary-rgb: 236, 72, 153;
  --accent-tertiary-rgb: 6, 182, 212;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-dark: #111827;
  --border-color: #e5e7eb;
  --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Typography */
  --font-primary: 'Product Sans', 'Inter', sans-serif;
  --font-secondary: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Spacing */
  --section-padding: 5rem 0;
  --container-padding: 0 1rem;
  --border-radius: 0.75rem;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Mobile Safe Areas */
  --safe-area-inset-top: env(safe-area-inset-top);
  --safe-area-inset-bottom: env(safe-area-inset-bottom);
  --safe-area-inset-left: env(safe-area-inset-left);
  --safe-area-inset-right: env(safe-area-inset-right);
}

/* ===== DARK MODE VARIABLES ===== */
[data-theme="dark"] {
  --text-primary: #f8fafc;
  --text-secondary: #e2e8f0;
  --text-light: #cbd5e1;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-dark: #020617;
  --border-color: #475569;
  --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* ===== DARK MODE NAVBAR ===== */
[data-theme="dark"] .navbar {
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--border-color);
}

/* ===== DARK MODE PARTICLES ===== */
[data-theme="dark"] #particles-js {
  opacity: 0.25;
}

/* ===== DARK MODE SPECIFIC IMPROVEMENTS ===== */
[data-theme="dark"] .timeline-date {
  background: var(--bg-primary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .publication-venue {
  color: var(--text-secondary);
}

[data-theme="dark"] .tag {
  background: var(--bg-primary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .feature {
  background: var(--bg-primary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .tech-tag {
  background: var(--bg-primary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .achievement {
  background: var(--primary-color);
  color: white;
}

[data-theme="dark"] .gpa {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

[data-theme="dark"] h1 {
  background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .hero-subtitle {
  color: var(--text-secondary);
}

[data-theme="dark"] .hero-description {
  color: var(--text-secondary);
}

[data-theme="dark"] .section-subtitle {
  color: var(--text-secondary);
}

[data-theme="dark"] .timeline-content h4 {
  color: var(--text-secondary);
}

[data-theme="dark"] .contact-details a {
  color: var(--text-secondary);
}

[data-theme="dark"] .contact-details a:hover {
  color: var(--primary-color);
}

/* ===== DARK MODE ABOUT SECTION ===== */
[data-theme="dark"] .profile-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
}



[data-theme="dark"] .stat-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .stat-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary-color);
}

[data-theme="dark"] .skill-category-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .skill-category-card:hover {
  border-color: var(--primary-color);
}

[data-theme="dark"] .skill-item {
  border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .education-card-modern {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .education-card-modern:hover {
  border-color: var(--primary-color);
}

[data-theme="dark"] .experience-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .experience-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary-color);
}

[data-theme="dark"] .highlight-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .highlight-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary-color);
}

[data-theme="dark"] .stat-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .stat-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary-color);
}



/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== CUSTOM CURSOR ===== */
@media (hover: hover) and (pointer: fine) {
  body {
    cursor: none;
  }
  a, button, [role="button"], label, input, select, textarea,
  .btn, .nav-link, .social-link, .project-link, .floating-icon,
  .skill-category-card, .project-card, .experience-card, .cultural-card,
  .stat-card, .metric-card, .cert-card, .gallery-item, .clickable-image {
    cursor: none;
  }
}

.custom-cursor {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
  mix-blend-mode: normal;
  will-change: transform;
  display: none;
}

.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--primary-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  will-change: transform;
  transition: width 0.2s ease, height 0.2s ease, background 0.2s ease;
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .custom-cursor,
  .cursor-dot {
    display: block;
  }
}

.custom-cursor.cursor-hover {
  width: 56px;
  height: 56px;
  border-color: var(--secondary-color);
  background: rgba(var(--accent-primary-rgb), 0.08);
}

.cursor-dot.cursor-hover {
  width: 4px;
  height: 4px;
  background: var(--secondary-color);
}

.custom-cursor.cursor-click {
  width: 28px;
  height: 28px;
  background: rgba(var(--accent-primary-rgb), 0.15);
}

/* ===== SCROLL PROGRESS RING ===== */
.scroll-progress-ring {
  position: fixed;
  bottom: 88px;
  left: 20px;
  width: 48px;
  height: 48px;
  z-index: 1002;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-primary);
  box-shadow: var(--shadow-large);
  border: 1px solid var(--border-color);
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.scroll-progress-ring:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 30px rgba(var(--accent-primary-rgb), 0.3);
}

.scroll-progress-ring svg {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(-90deg);
}

.spr-bg {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 3;
}

.spr-fill {
  fill: none;
  stroke: url(#spr-gradient);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 125.66;
  stroke-dashoffset: 125.66;
  transition: stroke-dashoffset 0.1s linear;
  stroke: var(--primary-color);
}

.spr-icon {
  position: relative;
  z-index: 1;
  color: var(--primary-color);
  font-size: 0.8rem;
  transition: transform var(--transition-medium);
}

.scroll-progress-ring:hover .spr-icon {
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .scroll-progress-ring {
    bottom: 20px;
    left: 15px;
    width: 42px;
    height: 42px;
  }
}

/* ===== HERO MORPHING BLOBS ===== */
.hero-blob {
  position: absolute;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  filter: blur(60px);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
  will-change: transform, border-radius;
}

.hero-blob-1 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  top: -100px;
  right: -80px;
  animation: blobMorph1 14s ease-in-out infinite;
}

.hero-blob-2 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
  bottom: -80px;
  left: -60px;
  animation: blobMorph2 18s ease-in-out infinite;
}

@keyframes blobMorph1 {
  0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: translate(0, 0) scale(1); }
  25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; transform: translate(-20px, 20px) scale(1.05); }
  50% { border-radius: 50% 60% 40% 70% / 40% 50% 60% 50%; transform: translate(10px, -15px) scale(0.95); }
  75% { border-radius: 70% 30% 60% 40% / 60% 40% 60% 30%; transform: translate(-10px, 10px) scale(1.02); }
}

@keyframes blobMorph2 {
  0%, 100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: translate(0, 0) scale(1); }
  33% { border-radius: 70% 30% 40% 60% / 60% 40% 50% 60%; transform: translate(15px, -20px) scale(1.08); }
  66% { border-radius: 30% 70% 60% 40% / 50% 60% 40% 70%; transform: translate(-10px, 15px) scale(0.92); }
}

[data-theme="dark"] .hero-blob {
  opacity: 0.2;
}

/* ===== SECTION DIVIDERS ===== */
.section-divider {
  position: relative;
  height: 80px;
  overflow: hidden;
  z-index: 2;
  pointer-events: none;
}

.divider-wave {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, transparent 100%);
}

.divider-wave::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80'%3E%3Cpath fill='%236366f1' fill-opacity='0.06' d='M0,40 C360,80 720,0 1080,40 C1260,60 1380,30 1440,40 L1440,80 L0,80 Z'/%3E%3Cpath fill='%23ec4899' fill-opacity='0.04' d='M0,60 C240,20 480,70 720,50 C960,30 1200,70 1440,55 L1440,80 L0,80 Z'/%3E%3C/svg%3E") no-repeat center/cover;
}

.divider-diagonal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80'%3E%3Cpolygon fill='%236366f1' fill-opacity='0.05' points='0,0 1440,0 1440,80'/%3E%3Cpolygon fill='%2306b6d4' fill-opacity='0.04' points='0,80 1440,0 1440,80'/%3E%3C/svg%3E") no-repeat center/cover;
}

/* ===== HERO PARALLAX LAYERS ===== */
.hero-text {
  will-change: transform;
  transition: none;
}

.hero-image {
  will-change: transform;
  transition: none;
}

/* ===== SKILL BAR SCROLL REVEAL ===== */
.skill-category-card.scroll-revealed .skills-list {
  max-height: 350px !important;
  opacity: 1 !important;
}

.skill-category-card.scroll-revealed .skill-fill {
  width: var(--width) !important;
}

.skill-category-card.scroll-revealed .progress-circle {
  stroke-dashoffset: 0;
}

/* ===== SECTION HEADER PERSPECTIVE ===== */
.section-header {
  text-align: center;
  margin-bottom: clamp(3rem, 6vw, 5rem);
  padding: 0 1rem;
  perspective: 800px;
}

.section-header.aos-animate .section-title {
  animation: headerReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes headerReveal {
  from {
    opacity: 0;
    transform: rotateX(20deg) translateY(20px);
  }
  to {
    opacity: 1;
    transform: rotateX(0deg) translateY(0);
  }
}

/* ===== VANILLATILT PERSPECTIVE HELPERS ===== */
.projects-grid,
.experience-grid,
.cultural-grid,
.research-metrics,
.research-areas-grid,
.skills-container {
  perspective: 1200px;
}

.skill-category-card,
.stat-card,
.cert-card {
  transform-style: preserve-3d;
}

/* ===== MAGNETIC BUTTON EFFECT ===== */
.btn {
  transition: var(--transition-medium), box-shadow var(--transition-medium);
}

/* ===== FLOAT NAV POSITION TWEAK (leave room for progress ring) ===== */
@media (max-width: 768px) {
  .theme-toggle {
    bottom: 80px !important;
  }
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  width: 100%;
  height: 100%;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  width: 100%;
  min-height: 100vh;
  position: relative;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  padding: 0;
  padding-top: var(--safe-area-inset-top);
  padding-bottom: var(--safe-area-inset-bottom);
  padding-left: var(--safe-area-inset-left);
  padding-right: var(--safe-area-inset-right);
}

/* ===== PARTICLES BACKGROUND ===== */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.6;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

h1 { 
  font-size: clamp(2.5rem, 5vw, 4rem); 
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 { 
  font-size: clamp(2rem, 4vw, 3rem); 
  font-weight: 600;
  position: relative;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

h3 { 
  font-size: clamp(1.5rem, 3vw, 2rem); 
  color: var(--primary-color);
}

h4 { 
  font-size: clamp(1.25rem, 2.5vw, 1.5rem); 
  font-family: var(--font-secondary);
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

/* ===== UTILITY CLASSES ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--container-padding);
}

/* ===== MOBILE TOUCH IMPROVEMENTS ===== */
@media (hover: none) and (pointer: coarse) {
  /* Touch device specific styles */
  .btn,
  .social-link,
  .project-link,
  .nav-link {
    min-height: 44px;
    min-width: 44px;
  }
  
  .skill-tag:hover,
  .btn:hover,
  .social-link:hover {
    transform: none;
  }
  
  .skill-tag:active,
  .btn:active,
  .social-link:active {
    transform: scale(0.95);
  }
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  line-height: 1.1;
}

.name-first,
.name-last {
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: clamp(0.625rem, 2vw, 0.875rem) clamp(1.25rem, 3vw, 1.75rem);
  border-radius: var(--border-radius);
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-medium);
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-size: clamp(0.875rem, 2vw, 1rem);
  min-height: 44px; /* Accessibility: minimum touch target */
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-large);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #d63384 100%);
  border: 2px solid var(--secondary-color);
  color: white;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-accent:hover {
  background: linear-gradient(135deg, #d63384 0%, #b02a5b 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--accent-secondary-rgb), 0.4);
  color: white;
}

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: var(--transition-medium);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-primary);
  font-weight: 500;
  position: relative;
  transition: var(--transition-fast);
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--primary-color);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 0.25rem;
}

.hamburger span {
  width: 1.5rem;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition-fast);
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
  display: flex;
  align-items: center;
  position: relative;
  padding: max(2rem, calc(4rem + var(--safe-area-inset-top))) 0 2rem 0;
  background: 
    linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.08), rgba(var(--accent-secondary-rgb), 0.08)),
    radial-gradient(circle at 20% 80%, rgba(var(--accent-tertiary-rgb), 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(var(--accent-primary-rgb), 0.1) 0%, transparent 50%);
  will-change: transform;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(99,102,241,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  animation: heroGridMove 30s linear infinite;
  opacity: 0.3;
  z-index: 0;
}

@keyframes heroGridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(100px, 100px); }
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--container-padding);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-title {
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-buttons {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Inner parallax layers: mouse-parallax JS writes transform here so it
   never fights the AOS entrance transform on the outer .hero-text /
   .hero-image. They are transparent layout pass-throughs. */
.hero-image-parallax {
  display: flex;
  justify-content: center;
  align-items: center;
  will-change: transform;
}

.hero-text-parallax {
  will-change: transform;
}

.image-container {
  width: 350px;
  height: 350px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ===== TECH GRID BACKGROUND ===== */
.tech-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  animation: gridMove 20s linear infinite;
  opacity: 0.3;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(20px, 20px); }
}

/* ===== CODE ANIMATION ===== */
.code-animation {
  position: absolute;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 30%;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.8);
  z-index: 2;
}

.code-line {
  opacity: 0;
  transform: translateX(-20px);
  animation: codeType 2s ease-out infinite;
  animation-delay: var(--delay);
  margin-bottom: 0.3rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border-left: 2px solid var(--accent-color);
}

@keyframes codeType {
  0%, 20% { opacity: 0; transform: translateX(-20px); }
  25%, 75% { opacity: 1; transform: translateX(0); }
  80%, 100% { opacity: 0; transform: translateX(20px); }
}

/* ===== FLOATING TECH ELEMENTS ===== */
.floating-elements {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 3;
}

.floating-icon {
  position: absolute;
  width: 50px;
  height: 50px;
  /* Perf: backdrop-filter removed — these 5 icons animate + parallax every
     frame, so blur compositing was a constant cost. Slightly more opaque
     bg keeps the frosted look. */
  background: rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  animation: techFloat 4s ease-in-out infinite;
  animation-delay: var(--delay);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
}

.tech-icon {
  flex-direction: column;
  gap: 0.2rem;
}

.tech-label {
  font-size: 0.6rem;
  font-weight: 600;
  opacity: 0.8;
  font-family: var(--font-mono);
}

.floating-icon:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.floating-icon:nth-child(1) { top: 15%; left: 15%; }
.floating-icon:nth-child(2) { top: 25%; right: 10%; }
.floating-icon:nth-child(3) { bottom: 30%; left: 10%; }
.floating-icon:nth-child(4) { bottom: 15%; right: 20%; }
.floating-icon:nth-child(5) { top: 50%; left: 5%; }

@keyframes techFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-15px) rotate(2deg); }
  50% { transform: translateY(-10px) rotate(-1deg); }
  75% { transform: translateY(-20px) rotate(1deg); }
}

/* ===== CENTRAL AVATAR ===== */
.avatar-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  z-index: 4;
}

.avatar-content {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  position: relative;
  z-index: 2;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.avatar-ring {
  position: absolute;
  top: -10px;
  left: -10px;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: avatarRotate 10s linear infinite;
}

.pulse-ring {
  position: absolute;
  top: -20px;
  left: -20px;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes avatarRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.1); opacity: 0.1; }
}

/* ===== DATA VISUALIZATION ===== */
.data-viz {
  position: absolute;
  bottom: 10%;
  right: 10%;
  display: flex;
  align-items: end;
  gap: 3px;
  height: 40px;
  z-index: 2;
}

.chart-bar {
  width: 4px;
  height: var(--height);
  background: linear-gradient(to top, var(--accent-color), rgba(255, 255, 255, 0.8));
  border-radius: 2px;
  animation: chartGrow 2s ease-out infinite;
  animation-delay: var(--delay);
}

@keyframes chartGrow {
  0%, 20% { transform: scaleY(0.1); }
  25%, 75% { transform: scaleY(1); }
  80%, 100% { transform: scaleY(0.3); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-arrow {
  width: 2px;
  height: 30px;
  background: var(--primary-color);
  position: relative;
}

.scroll-arrow::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -4px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  transform: rotate(45deg);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* ===== SECTION STYLES ===== */
section {
  position: relative;
  z-index: 1;
  margin-bottom: 2rem;
}

/* .section-header defined above with perspective enhancement */

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== ABOUT SECTION ===== */
.about {
  padding: clamp(3rem, 8vw, 6rem) 0;
  background: 
    linear-gradient(135deg, var(--bg-secondary) 0%, rgba(var(--accent-primary-rgb), 0.02) 100%),
    radial-gradient(circle at 70% 30%, rgba(var(--accent-tertiary-rgb), 0.05) 0%, transparent 50%);
  margin-top: -2rem;
  position: relative;
  overflow: hidden;
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60"><circle cx="30" cy="30" r="1" fill="rgba(99,102,241,0.1)"/></svg>');
  background-size: 60px 60px;
  animation: dotPattern 25s linear infinite;
  opacity: 0.4;
  z-index: 0;
}

@keyframes dotPattern {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  position: relative;
  z-index: 1;
}

/* ===== INTERACTIVE PROFILE CARD ===== */
.profile-card {
  background: var(--bg-primary);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-medium);
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.03), rgba(var(--accent-secondary-rgb), 0.03));
  pointer-events: none;
}

.profile-card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(var(--accent-primary-rgb), 0.1);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}

.profile-avatar {
  position: relative;
  flex-shrink: 0;
}

.avatar-ring {
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: avatarRotate 10s linear infinite;
  opacity: 0.6;
}

.avatar-pulse {
  position: absolute;
  top: -12px;
  left: -12px;
  right: -12px;
  bottom: -12px;
  border: 1px solid rgba(var(--accent-primary-rgb), 0.3);
  border-radius: 50%;
  animation: avatarPulse 3s ease-in-out infinite;
}

.profile-avatar > picture {
  display: block;
  line-height: 0;
}

.avatar-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: 3px solid var(--bg-primary);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(1.1) contrast(1.05);
}

.profile-avatar:hover .avatar-image {
  transform: scale(1.08);
  filter: brightness(1.2) contrast(1.1);
  box-shadow: 
    0 0 30px rgba(var(--accent-primary-rgb), 0.4),
    0 0 60px rgba(var(--accent-primary-rgb), 0.2),
    0 0 90px rgba(var(--accent-primary-rgb), 0.1),
    0 8px 25px rgba(0, 0, 0, 0.15);
}



@keyframes avatarRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes avatarPulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.05); opacity: 0.1; }
}



.profile-info {
  flex: 1;
}

.profile-name {
  margin: 0 0 0.25rem 0;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-title {
  margin: 0 0 1rem 0;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
}

.profile-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all var(--transition-medium);
  cursor: pointer;
}

.badge-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 12px rgba(var(--accent-primary-rgb), 0.3);
}

.badge-secondary {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  color: white;
  box-shadow: 0 4px 12px rgba(var(--accent-secondary-rgb), 0.3);
}

.badge:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 20px rgba(var(--accent-primary-rgb), 0.4);
}

.profile-description {
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}

.profile-description p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

/* ===== PROFILE ACTIONS ===== */
.profile-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}

.profile-actions .btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.profile-actions .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.profile-actions .btn:hover::before {
  left: 100%;
}

.profile-actions .btn i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.profile-actions .btn:hover i {
  transform: scale(1.1);
}

.profile-actions .btn span {
  font-size: 0.95rem;
}

/* ===== INTERACTIVE STATS ===== */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  position: relative;
  z-index: 2;
}

.stat-item {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all var(--transition-medium);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-primary-rgb), 0.1), transparent);
  transition: left 0.6s ease;
}

.stat-item:hover::before {
  left: 100%;
}

.stat-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 30px rgba(var(--accent-primary-rgb), 0.2);
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.8);
}

.stat-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.125rem;
  flex-shrink: 0;
  transition: all var(--transition-medium);
}

.stat-item:hover .stat-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 20px rgba(var(--accent-primary-rgb), 0.4);
}

.stat-content {
  flex: 1;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.125rem;
  transition: all var(--transition-medium);
}

.stat-item:hover .stat-number {
  transform: scale(1.05);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin: 0;
}

/* ===== INTERACTIVE SKILLS SECTION ===== */
.skills-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.skills-header {
  text-align: center;
  margin-bottom: 1rem;
}

.skills-header h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.skills-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.skills-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skill-category-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.5rem;
  transition: all var(--transition-medium);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.skill-category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.02), rgba(var(--accent-secondary-rgb), 0.02));
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.skill-category-card:hover::before {
  opacity: 1;
}

.skill-category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.skill-category-card:hover .skills-list {
  max-height: 300px;
  opacity: 1;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 2;
}

.category-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: all var(--transition-medium);
}

.skill-category-card:hover .category-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 20px rgba(var(--accent-primary-rgb), 0.4);
}

.category-info {
  flex: 1;
}

.category-info h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.skill-count {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.category-progress {
  position: relative;
}

.progress-ring {
  position: relative;
  width: 60px;
  height: 60px;
}

.progress-svg {
  transform: rotate(-90deg);
}

.progress-circle-bg {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 3;
}

.progress-circle {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 157;
  stroke-dashoffset: 157;
  transition: stroke-dashoffset 1s ease-in-out;
}

.skill-category-card:hover .progress-circle {
  stroke-dashoffset: calc(157 - (157 * var(--progress)) / 100);
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-color);
  text-align: center;
  line-height: 1;
  white-space: nowrap;
}

.skills-list {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.4s ease;
  margin-top: 1rem;
  position: relative;
  z-index: 2;
}

.skill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.skill-item:last-child {
  border-bottom: none;
}

.skill-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.skill-bar {
  width: 100px;
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 3px;
  width: 0;
  transition: width 1s ease-in-out 0.2s;
  position: relative;
}

.skill-category-card:hover .skill-fill {
  width: var(--width);
}

.skill-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: skillShimmer 2s ease-in-out infinite;
}

@keyframes skillShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ===== MODERN EDUCATION CARD ===== */
.education-card-modern {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  margin-top: 2rem;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.education-card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.03), rgba(var(--accent-tertiary-rgb), 0.03));
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.education-card-modern:hover::before {
  opacity: 1;
}

.education-card-modern:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.education-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}

.education-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: all var(--transition-medium);
}

.education-card-modern:hover .education-icon {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 8px 20px rgba(var(--accent-tertiary-rgb), 0.4);
}

.education-content {
  flex: 1;
}

.education-content h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.education-content p {
  margin: 0 0 1.5rem 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.education-achievements {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.achievement-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 16px;
  color: white;
  min-width: 80px;
  transition: all var(--transition-medium);
}

.achievement-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(var(--accent-primary-rgb), 0.4);
}

.gpa-score {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.gpa-label {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.9;
}

.honor-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.honor-badge {
  background: var(--accent-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition-medium);
}

.honor-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(var(--accent-tertiary-rgb), 0.3);
}

/* ===== PROFILE IMAGE PLACEHOLDER ===== */
.profile-image-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 2rem;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-large);
  border: 3px solid var(--primary-color);
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition-medium);
  position: relative;
  z-index: 1;
}

.profile-image-container:hover .profile-image {
  transform: scale(1.05);
}

.profile-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  position: relative;
  z-index: 1;
}

.profile-placeholder span {
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 0.5rem;
  text-align: center;
  opacity: 0.9;
}

.profile-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.9), rgba(var(--accent-secondary-rgb), 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-medium);
  z-index: 2;
  backdrop-filter: blur(2px);
}

.profile-overlay p {
  color: white;
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
  margin: 0;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.4;
}

.profile-image-container:hover .profile-overlay {
  opacity: 1;
}

.education-card {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--border-color);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.card-header i {
  font-size: 1.5rem;
}

.education-item h5 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.education-item p {
  margin-bottom: 1rem;
}

.gpa {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.achievements {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.achievement {
  background: var(--accent-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ===== EXPERIENCE SECTION ===== */
.experience {
  padding: var(--section-padding) 0;
  position: relative;
  background: linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.02), rgba(var(--accent-secondary-rgb), 0.02));
}

.experience::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(var(--accent-primary-rgb), 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(var(--accent-secondary-rgb), 0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* Experience Grid */
.experience-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
  position: relative;
  z-index: 2;
}

/* Experience Cards */
.experience-card {
  /* Perf: backdrop-filter removed (numerous, scroll-heavy cards = jank);
     bumped bg opacity to approximate the glass look cheaply. */
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.experience-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-primary-rgb), 0.1), transparent);
  transition: left 0.6s ease;
}

.experience-card:hover::before {
  left: 100%;
}

.experience-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(var(--accent-primary-rgb), 0.15);
  border-color: var(--primary-color);
}

.experience-card.featured {
  background: linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.05), rgba(var(--accent-secondary-rgb), 0.05));
  border: 2px solid var(--primary-color);
}

.experience-card.featured::after {
  content: 'Featured';
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Experience Header */
.experience-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.company-logo {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.experience-card:hover .company-logo {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 20px rgba(var(--accent-primary-rgb), 0.3);
}

.experience-meta {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.company-info h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.company-name {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.experience-duration {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.duration-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.duration-badge.current {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.duration-badge.past {
  background: rgba(107, 114, 128, 0.1);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.duration-length {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
}

.role-title {
  margin-bottom: 1.5rem;
}

.role-title h4 {
  margin: 0 0 0.75rem 0;
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 600;
}

.role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.role-tag {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.cultural-highlights {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.highlight-item:hover {
  transform: translateX(5px);
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.highlight-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.125rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.highlight-item:hover .highlight-icon {
  background: white;
  color: var(--primary-color);
  transform: scale(1.1);
}

.highlight-content h5 {
  margin: 0 0 0.25rem 0;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
}

.highlight-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.4;
}

.highlight-item:hover .highlight-content h5,
.highlight-item:hover .highlight-content p {
  color: white;
}

/* Project Gallery */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-secondary);
  transition: all 0.3s ease;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* <picture> wrapper must fill the gallery-item so the inner img's
   width/height:100% resolves against the tile, not the inline picture box. */
.gallery-item > picture {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.gallery-item:hover .gallery-image {
  transform: scale(1.1);
}

.gallery-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 1rem 0.75rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  transform: translateY(100%);
  transition: all 0.3s ease;
}

.gallery-item:hover .gallery-label {
  transform: translateY(0);
}

/* Gallery Link Styles */
.gallery-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
  position: relative;
}

/* Gallery Overlay for PDF Links */
.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  border-radius: 12px;
}

.gallery-overlay i {
  font-size: 2rem;
  color: white;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Certificate Thumbnail Styles */
/* (removed previews) */
/* Certifications horizontal row */
.certifications-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  scroll-snap-type: x mandatory;
}

.certifications-row::-webkit-scrollbar {
  height: 8px;
}

.certifications-row::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 8px;
}

.cert-card {
  min-width: 320px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  scroll-snap-align: start;
}

.cert-title {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
}

.cert-meta {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.cert-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.certificate-thumbnail::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(var(--accent-primary-rgb), 0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.gallery-item:hover .certificate-thumbnail::before {
  transform: translateX(100%);
}

.certificate-icon {
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.certificate-icon i {
  font-size: 2.5rem;
  color: var(--primary-color);
  filter: drop-shadow(0 2px 4px rgba(var(--accent-primary-rgb), 0.3));
  transition: all 0.3s ease;
}

.certificate-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.certificate-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  text-align: center;
  line-height: 1.2;
}

.certificate-subtitle {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.2;
}

.gallery-item:hover .certificate-thumbnail {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border-color: var(--primary-dark);
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(var(--accent-primary-rgb), 0.3);
}

.gallery-item:hover .certificate-icon i {
  color: white;
  transform: scale(1.1);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.gallery-item:hover .certificate-title,
.gallery-item:hover .certificate-subtitle {
  color: white;
}

/* Certificate Button Container */
.certificate-item {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.3s ease;
  padding: 1rem;
}

.certificate-item:hover {
  border-color: var(--primary-color);
  box-shadow: 0 8px 20px rgba(var(--accent-primary-rgb), 0.15);
  transform: translateY(-2px);
}

.certificate-button-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 200px;
}

.certificate-button-container .btn {
  width: 100%;
  justify-content: center;
  font-size: 0.8rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.certificate-button-container .btn i {
  margin-right: 0.5rem;
  font-size: 0.9rem;
}

.certificate-button-container .btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border: none;
  color: white;
  font-weight: 600;
}

.certificate-button-container .btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #3730a3 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--accent-primary-rgb), 0.4);
}

.certificate-button-container .btn-secondary {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  font-weight: 500;
}

.certificate-button-container .btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--accent-primary-rgb), 0.2);
}

/* Dark mode support for certificate buttons */
[data-theme="dark"] .certificate-item {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] .certificate-item:hover {
  border-color: var(--primary-color);
  box-shadow: 0 8px 20px rgba(var(--accent-primary-rgb), 0.25);
}

[data-theme="dark"] .certificate-button-container .btn-secondary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

[data-theme="dark"] .certificate-button-container .btn-secondary:hover {
  background: var(--primary-color);
  color: white;
}

/* Experience Stats */
.experience-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}

.stat-card {
  /* Perf: backdrop-filter removed; opaque-ish bg approximates glass. */
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-primary-rgb), 0.1), transparent);
  transition: left 0.6s ease;
}

.stat-card:hover::before {
  left: 100%;
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(var(--accent-primary-rgb), 0.15);
  border-color: var(--primary-color);
}

.stat-card .stat-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
  transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
  transform: scale(1.1) rotate(5deg);
}

.stat-card .stat-content h4 {
  margin: 0 0 0.5rem 0;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card .stat-content p {
  margin: 0;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===== CULTURAL LEADERSHIP SECTION ===== */
.cultural {
  padding: clamp(4rem, 8vw, 8rem) 0;
  background: 
    linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.02), rgba(var(--accent-secondary-rgb), 0.02)),
    radial-gradient(circle at 30% 70%, rgba(var(--accent-tertiary-rgb), 0.03) 0%, transparent 50%),
    radial-gradient(circle at 70% 30%, rgba(var(--accent-primary-rgb), 0.03) 0%, transparent 50%);
  position: relative;
  overflow: hidden;
}

.cultural::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="cultural-grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M20,0 L20,40 M0,20 L40,20" fill="none" stroke="rgba(99,102,241,0.06)" stroke-width="0.5"/><circle cx="20" cy="20" r="1.5" fill="rgba(236,72,153,0.08)"/></pattern></defs><rect width="100" height="100" fill="url(%23cultural-grid)"/></svg>');
  animation: dotPattern 50s linear infinite;
  opacity: 0.7;
  z-index: 0;
}

.cultural-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
}

.cultural-card {
  background: var(--bg-primary);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cultural-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 20px 20px 0 0;
}

.cultural-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-large);
}

.cultural-card.featured {
  border-color: var(--primary-color);
}

.cultural-card.featured::after {
  content: 'Featured';
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.cultural-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.organization-logo {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.cultural-card:hover .organization-logo {
  transform: scale(1.1) rotate(5deg);
}

.cultural-meta {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.organization-info h3 {
  margin: 0 0 0.25rem 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
}

.organization-name {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

.cultural-duration {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.duration-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.duration-badge.current {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.duration-badge.past {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.duration-length {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
}

.leadership-card {
  background: var(--bg-primary);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.08),
    0 8px 16px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  /* Perf: backdrop-filter removed — bg is already opaque so blur was a no-op cost. */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.leadership-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  border-radius: 20px 20px 0 0;
}

.leadership-card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 32px 64px rgba(0, 0, 0, 0.12),
    0 16px 32px rgba(0, 0, 0, 0.08);
}

.leadership-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.leadership-header i {
  font-size: 2rem;
  color: var(--primary-color);
}

.leadership-header h3 {
  margin: 0;
  color: var(--text-primary);
  flex: 1;
}

.leadership-period {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.leadership-header h4 {
  margin: 0.5rem 0 1.5rem 0;
  color: var(--text-secondary);
  font-weight: 500;
}

.leadership-achievements {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.achievement-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  background:
    linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.08), rgba(var(--accent-secondary-rgb), 0.04)),
    rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  border: 1px solid rgba(var(--accent-primary-rgb), 0.1);
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* Perf: backdrop-filter removed; raised bg opacity to compensate. */
}

.achievement-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 16px 0 0 16px;
}

.achievement-item:hover {
  transform: translateX(8px);
  background: 
    linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.12), rgba(var(--accent-secondary-rgb), 0.06)),
    rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 24px rgba(var(--accent-primary-rgb), 0.15);
}

.achievement-item i {
  color: var(--primary-color);
  font-size: 1.4rem;
  min-width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(var(--accent-primary-rgb), 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.achievement-item:hover i {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

.achievement-item span {
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 500;
  flex: 1;
}

.current-role {
  background: 
    linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.05), rgba(var(--accent-secondary-rgb), 0.03)),
    var(--bg-primary);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 
    0 16px 32px rgba(0, 0, 0, 0.06),
    0 4px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(var(--accent-primary-rgb), 0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.current-role::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="role-pattern" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="0.8" fill="rgba(99,102,241,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23role-pattern)"/></svg>');
  opacity: 0.6;
  z-index: 0;
}

.current-role > * {
  position: relative;
  z-index: 1;
}

.current-role:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 24px 48px rgba(0, 0, 0, 0.1),
    0 8px 16px rgba(0, 0, 0, 0.06);
}

.current-role h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.current-role p {
  margin: 0;
  color: var(--text-primary);
  line-height: 1.6;
}

.cultural-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 
    0 12px 24px rgba(0, 0, 0, 0.08),
    0 4px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  aspect-ratio: 16/10;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.12),
    0 8px 16px rgba(0, 0, 0, 0.08);
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
  transform: scale(1.05);
}

/* Cultural Placeholder Styles */
.cultural-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}

.cultural-placeholder::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60"><circle cx="30" cy="30" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="50" cy="20" r="1.5" fill="rgba(255,255,255,0.08)"/><circle cx="20" cy="50" r="1" fill="rgba(255,255,255,0.06)"/></svg>');
  background-size: 60px 60px;
  animation: culturalPattern 20s linear infinite;
  opacity: 0.3;
}

@keyframes culturalPattern {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(60px, 60px) rotate(360deg); }
}

.cultural-placeholder i {
  margin-bottom: 1rem;
  opacity: 0.9;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  position: relative;
  z-index: 2;
}

.cultural-placeholder span {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-overlay h5 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.gallery-overlay p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.cultural-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.cultural-stats .stat-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--bg-primary);
  border-radius: 20px;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-color);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.cultural-stats .stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.02), rgba(var(--accent-secondary-rgb), 0.02));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cultural-stats .stat-card:hover::before {
  opacity: 1;
}

.cultural-stats .stat-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.12),
    0 8px 16px rgba(0, 0, 0, 0.06);
}

.cultural-stats .stat-card .stat-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: white;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.cultural-stats .stat-card:hover .stat-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 20px rgba(var(--accent-primary-rgb), 0.3);
}

.cultural-stats .stat-card .stat-content h4 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.cultural-stats .stat-card .stat-content p {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  margin: 0;
  position: relative;
  z-index: 1;
}

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

.timeline::before {
  content: '';
  position: absolute;
  left: 2rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 5rem;
}

.timeline-marker {
  position: absolute;
  left: 1.25rem;
  top: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--primary-color);
  border-radius: 50%;
  border: 4px solid var(--bg-primary);
  box-shadow: var(--shadow-medium);
}

.timeline-content {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--border-color);
}

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

.timeline-header h3 {
  color: var(--primary-color);
  margin-bottom: 0;
}

.timeline-date {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.timeline-content h4 {
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 1rem;
}

.timeline-achievements {
  list-style: none;
  padding: 0;
}

.timeline-achievements li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.timeline-achievements li:last-child {
  border-bottom: none;
}

/* ===== PROJECTS SECTION ===== */
.projects {
  padding: clamp(3rem, 8vw, 6rem) 0;
  background: 
    linear-gradient(135deg, var(--bg-secondary) 0%, rgba(var(--accent-secondary-rgb), 0.02) 100%),
    radial-gradient(circle at 30% 70%, rgba(var(--accent-primary-rgb), 0.05) 0%, transparent 50%);
  margin-top: -2rem;
  position: relative;
}

.projects::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><polygon points="20,5 35,15 35,25 20,35 5,25 5,15" fill="none" stroke="rgba(236,72,153,0.1)" stroke-width="0.5"/></svg>');
  background-size: 40px 40px;
  animation: hexPattern 20s linear infinite;
  opacity: 0.3;
  z-index: 0;
}

@keyframes hexPattern {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(40px, 40px) rotate(360deg); }
}


.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--border-color);
  transition: all var(--transition-medium);
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.05), rgba(var(--accent-secondary-rgb), 0.05));
  opacity: 0;
  transition: opacity var(--transition-medium);
  z-index: 1;
}

.project-card:hover::before {
  opacity: 1;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(var(--accent-primary-rgb), 0.1);
  border-color: rgba(var(--accent-primary-rgb), 0.2);
}

.project-card * {
  position: relative;
  z-index: 2;
}

.project-image {
  position: relative;
  height: 200px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ===== YOUTUBE PREVIEW ===== */
.youtube-preview {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  overflow: hidden;
}

.youtube-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-medium);
}

.youtube-preview:hover .youtube-thumbnail {
  transform: scale(1.05);
}

.youtube-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 0, 0, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  transition: all var(--transition-medium);
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.youtube-preview:hover .youtube-play-button {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

.youtube-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 1rem;
  color: white;
}

.youtube-duration {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== YOUTUBE MODAL ===== */
.youtube-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  backdrop-filter: blur(10px);
}

.youtube-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.3s ease;
}

.youtube-modal-content {
  position: relative;
  width: 90%;
  max-width: 800px;
  aspect-ratio: 16/9;
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-large);
}

.youtube-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10001;
  transition: color var(--transition-fast);
}

.youtube-modal-close:hover {
  color: var(--primary-color);
}

.youtube-video-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.youtube-video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== IMAGE PREVIEW MODAL ===== */
.image-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
}

.image-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.3s ease-out;
}

.image-modal-content {
  position: relative;
  background: var(--card-bg);
  border-radius: 20px;
  max-width: 95vw;
  max-height: 95vh;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.image-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.image-modal-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 600;
}

.image-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.image-control-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.image-control-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.image-control-btn:disabled:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.1);
}

#image-zoom-level {
  color: var(--text-secondary);
  font-size: 0.9rem;
  min-width: 50px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
}

.image-modal-close {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  margin-left: 1rem;
}

.image-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.image-viewer-container {
  position: relative;
  max-width: 90vw;
  max-height: 80vh;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .image-viewer-container {
  background: rgba(0, 0, 0, 0.5);
}

.modal-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  cursor: grab;
}

.modal-image:active {
  cursor: grabbing;
}

.image-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.image-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

.image-loading p {
  margin: 0;
  font-size: 0.9rem;
}

/* Clickable Images */
.clickable-image {
  cursor: pointer;
  transition: all 0.3s ease;
}

.clickable-image:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
}

/* ===== FLOATING AUTO-SCROLL NAVIGATION ===== */
.floating-nav {
  position: fixed;
  top: 5rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.auto-scroll-btn {
  position: relative;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(var(--accent-primary-rgb), 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.auto-scroll-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.3s ease;
}

.auto-scroll-btn:hover::before {
  transform: scale(1);
}

.auto-scroll-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 40px rgba(var(--accent-primary-rgb), 0.4);
}

.auto-scroll-btn:active {
  transform: translateY(-2px) scale(0.98);
}

.auto-scroll-btn.scrolling {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  animation: pulse-scroll 2s infinite;
}

.auto-scroll-btn.scrolling .btn-icon i {
  transform: rotate(0deg);
}

.auto-scroll-btn.scrolling .btn-icon i::before {
  content: '\f04c'; /* pause icon */
}

@keyframes pulse-scroll {
  0%, 100% {
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.3);
  }
  50% {
    box-shadow: 0 12px 40px rgba(239, 68, 68, 0.5);
  }
}

.btn-icon {
  position: relative;
  z-index: 2;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.btn-icon i {
  transition: all 0.3s ease;
}

.btn-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.progress-ring {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.progress-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 2;
}

.progress-ring-fill {
  fill: none;
  stroke: rgba(255, 255, 255, 0.8);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 163.36; /* 2 * π * 26 */
  stroke-dashoffset: 163.36;
  transition: stroke-dashoffset 0.3s ease;
}

.auto-scroll-btn.scrolling .progress-ring-fill {
  stroke: rgba(255, 255, 255, 1);
  animation: progress-fill 4s linear infinite;
}

@keyframes progress-fill {
  0% {
    stroke-dashoffset: 163.36;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.btn-tooltip {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-right: 1rem;
  background: var(--card-bg);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) translateX(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.tooltip-arrow {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid var(--card-bg);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.auto-scroll-btn:hover .btn-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* Section Indicator */
.section-indicator {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 0.75rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-nav:hover .section-indicator,
.auto-scroll-btn.scrolling + .section-indicator {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.indicator-dots {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.dot::before {
  content: attr(title);
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-right: 0.75rem;
  background: var(--card-bg);
  color: var(--text-primary);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) translateX(-5px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.dot:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.dot:hover {
  background: var(--primary-color);
  transform: scale(1.3);
}

.dot.active {
  background: var(--primary-color);
  transform: scale(1.2);
  box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.3);
}

.dot.visited {
  background: var(--secondary-color);
}

/* Floating Nav Animations */
@keyframes float-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.floating-nav {
  animation: float-bounce 3s ease-in-out infinite;
}

.auto-scroll-btn:hover {
  animation: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .floating-nav {
    top: 4rem;
    right: 1rem;
  }
  
  .auto-scroll-btn {
    width: 50px;
    height: 50px;
  }
  
  .btn-icon {
    font-size: 1rem;
  }
  
  .progress-ring {
    width: 50px;
    height: 50px;
  }
  
  .progress-ring-bg,
  .progress-ring-fill {
    r: 21;
    stroke-dasharray: 131.95; /* 2 * π * 21 */
  }
  
  .progress-ring-fill {
    stroke-dashoffset: 131.95;
  }
  
  .btn-tooltip {
    display: none; /* Hide tooltip on mobile to save space */
  }
  
  .section-indicator {
    padding: 0.5rem;
  }
  
  .dot {
    width: 6px;
    height: 6px;
  }
  
  .dot::before {
    display: none; /* Hide dot tooltips on mobile */
  }
}

@media (max-width: 480px) {
  .floating-nav {
    top: 3.5rem;
    right: 0.75rem;
  }
  
  .auto-scroll-btn {
    width: 45px;
    height: 45px;
  }
  
  .btn-icon {
    font-size: 0.9rem;
  }
}

/* ===== PDF VIEWER MODAL ===== */
.pdf-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  backdrop-filter: blur(10px);
}

.pdf-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.3s ease;
}

.pdf-modal-content {
  position: relative;
  width: 95%;
  height: 95%;
  max-width: 1200px;
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-large);
  display: flex;
  flex-direction: column;
}

.pdf-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.pdf-modal-header h3 {
  color: var(--text-primary);
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.pdf-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pdf-control-btn {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
}

.pdf-control-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.pdf-control-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pdf-control-btn:disabled:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

#pdf-page-info,
#pdf-zoom-level {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  min-width: 60px;
  text-align: center;
}

.pdf-modal-close {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: color var(--transition-fast);
  margin-left: 1rem;
}

.pdf-modal-close:hover {
  color: var(--primary-color);
}

.pdf-viewer-container {
  flex: 1;
  position: relative;
  overflow: auto;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .pdf-viewer-container {
  background: #2a2a2a;
}

#pdf-canvas {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  background: white;
  cursor: grab;
}

#pdf-canvas:active {
  cursor: grabbing;
}

.pdf-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--text-secondary);
}

.pdf-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

.pdf-loading p {
  margin: 0;
  font-size: 0.875rem;
}

/* ===== PUBLICATION ACTIONS ===== */
.publication-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.pdf-viewer-btn {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: #dc2626;
}

.pdf-viewer-btn:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

.project-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: rgba(255, 255, 255, 0.8);
  font-size: 3rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.project-placeholder i {
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.project-placeholder span {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.6;
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-medium);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-link {
  width: 3rem;
  height: 3rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  transition: var(--transition-fast);
}

.project-link:hover {
  background: var(--primary-color);
  transform: scale(1.1);
}

.youtube-modal-btn {
  background: rgba(255, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.youtube-modal-btn:hover {
  background: rgba(255, 0, 0, 0.9) !important;
}

.project-tech-stack {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.project-content {
  padding: 1.5rem;
}

.project-content h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.project-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  animation: badgePulse 2s ease-in-out infinite;
}

.project-badge.ongoing {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

@keyframes badgePulse {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
  }
  50% { 
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
  }
}

.project-content p {
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.project-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.feature {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ===== RESEARCH SECTION ===== */
.research {
  padding: 6rem 0;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.research::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(var(--accent-primary-rgb), 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(var(--accent-secondary-rgb), 0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* Research Overview */
.research-overview {
  margin: 3rem 0;
}

.research-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.metric-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.metric-card:hover::before {
  opacity: 0.05;
}

.metric-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.metric-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

.metric-content {
  position: relative;
  z-index: 2;
}

.metric-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metric-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.metric-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Research Areas */
.research-areas {
  margin: 4rem 0;
}

.research-areas-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.research-areas-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

.research-areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.research-area-card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.research-area-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.research-area-card:hover::before {
  opacity: 0.05;
}

.research-area-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.area-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 2;
}

.research-area-card h4 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.research-area-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

.area-technologies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.tech-badge {
  background: rgba(var(--accent-primary-rgb), 0.1);
  color: var(--primary-color);
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(var(--accent-primary-rgb), 0.2);
  transition: all 0.3s ease;
}

.tech-badge:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* Publications Timeline */
.publications-timeline {
  margin: 4rem 0;
}

.timeline-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.timeline-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

.publication-item {
  background: var(--card-bg);
  border-radius: 24px;
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
  overflow: hidden;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.publication-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.publication-item:hover::before {
  opacity: 0.02;
}

.publication-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.publication-item.featured {
  border: 2px solid var(--primary-color);
  background: linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.05), rgba(var(--accent-secondary-rgb), 0.05));
}

.publication-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  /* Perf: backdrop-filter removed; raised bg opacity to compensate. */
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  z-index: 2;
}

.publication-type-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

.publication-type-badge.journal {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.publication-type-badge.conference {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

.publication-date {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
}

.publication-content {
  padding: 2rem;
  position: relative;
  z-index: 2;
}

.publication-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

.publication-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.venue-info, .doi-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.venue-name {
  font-weight: 700;
  color: var(--text-primary);
}

.impact-factor, .conference-location {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

.doi-info span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.publication-abstract {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  border-left: 4px solid var(--primary-color);
}

.publication-abstract p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
  font-style: italic;
}

.publication-media {
  margin: 1.5rem 0;
  border-radius: 16px;
  overflow: hidden;
}

.media-preview {
  position: relative;
  width: 100%;
  height: 250px;
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
}

.media-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.media-preview:hover .media-thumbnail {
  transform: scale(1.05);
}

.media-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background: rgba(255, 0, 0, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.media-preview:hover .media-play-button {
  background: #ff0000;
  transform: translate(-50%, -50%) scale(1.1);
}

.media-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 1.5rem;
  color: white;
}

.media-duration {
  font-size: 1rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.25rem;
}

.media-type {
  font-size: 0.8rem;
  opacity: 0.8;
}

.publication-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.research-tag {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.research-tag.primary {
  background: linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.15), rgba(var(--accent-primary-rgb), 0.1));
  color: var(--primary-color);
  border: 1px solid rgba(var(--accent-primary-rgb), 0.3);
}

.research-tag.secondary {
  background: linear-gradient(135deg, rgba(var(--accent-secondary-rgb), 0.15), rgba(var(--accent-secondary-rgb), 0.1));
  color: var(--secondary-color);
  border: 1px solid rgba(var(--accent-secondary-rgb), 0.3);
}

.research-tag.accent {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.1));
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.research-tag.neutral {
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.15), rgba(107, 114, 128, 0.1));
  color: #6b7280;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

.research-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.publication-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.action-btn:hover::before {
  left: 100%;
}

.action-btn.primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(var(--accent-primary-rgb), 0.3);
}

.action-btn.secondary {
  background: rgba(var(--accent-primary-rgb), 0.1);
  color: var(--primary-color);
  border: 1px solid rgba(var(--accent-primary-rgb), 0.3);
}

.action-btn.secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.action-btn.tertiary {
  background: rgba(107, 114, 128, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(107, 114, 128, 0.3);
}

.action-btn.tertiary:hover {
  background: #6b7280;
  color: white;
  transform: translateY(-2px);
}

/* Research Impact */
.research-impact {
  margin: 4rem 0;
}

.impact-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.impact-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.impact-card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.impact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.impact-card:hover::before {
  opacity: 0.05;
}

.impact-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.impact-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem;
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 2;
}

.impact-card h4 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.impact-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  z-index: 2;
}

/* ===== PUBLICATION VIDEO ===== */
.publication-video {
  margin: 1rem 0;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

.publication-video .youtube-preview {
  height: 200px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.publication-video .youtube-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-medium);
}

.publication-video .youtube-preview:hover .youtube-thumbnail {
  transform: scale(1.05);
}

.publication-video .youtube-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 0, 0, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  transition: all var(--transition-medium);
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.publication-video .youtube-preview:hover .youtube-play-button {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

.publication-video .youtube-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 0.75rem;
  color: white;
}

.publication-video .youtube-duration {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== CONTACT SECTION ===== */
.contact {
  padding: clamp(3rem, 8vw, 6rem) 0;
  background: 
    linear-gradient(135deg, var(--bg-secondary) 0%, rgba(var(--accent-tertiary-rgb), 0.02) 100%),
    radial-gradient(circle at 50% 50%, rgba(var(--accent-primary-rgb), 0.05) 0%, transparent 50%);
  margin-top: -2rem;
  position: relative;
}

.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><path d="M25,5 L45,25 L25,45 L5,25 Z" fill="none" stroke="rgba(6,182,212,0.1)" stroke-width="0.5"/></svg>');
  background-size: 50px 50px;
  animation: diamondPattern 18s linear infinite;
  opacity: 0.3;
  z-index: 0;
}

@keyframes diamondPattern {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(25px, 25px) scale(1.1); }
  100% { transform: translate(50px, 50px) scale(1); }
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-icon {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.contact-details h4 {
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.contact-details a {
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.contact-details a:hover {
  color: var(--primary-color);
}

.contact-form {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition-fast);
  background: var(--bg-primary);
  color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-link {
  width: 3rem;
  height: 3rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.25rem;
  transition: var(--transition-medium);
}

.social-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 2rem 0;
  text-align: center;
}

.footer-content p {
  margin-bottom: 0.5rem;
}

.footer-content p:last-child {
  margin-bottom: 0;
  font-style: italic;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
    padding: 0 1rem;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .research-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .timeline-item {
    padding-left: 4rem;
  }
  
  .timeline-marker {
    left: 0.75rem;
  }
  
  .timeline::before {
    left: 1.5rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
    max-width: 100%;
  }
  
  section {
    margin-bottom: 0.5rem;
  }
  
  .hero {
    padding: max(calc(4rem + var(--safe-area-inset-top)), 6rem) 0 clamp(1.5rem, 8vw, 3rem) 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    display: flex;
    align-items: center;
  }
  
  .about,
  .experience,
  .projects,
  .research,
  .contact {
    padding: clamp(2.5rem, 8vw, 4rem) 0;
    margin-top: -0.5rem;
  }
  
  /* Mobile Navigation */
  .nav-menu {
    position: fixed;
    top: 4rem;
    left: -100%;
    width: 100%;
    height: calc(100vh - 4rem);
    background: var(--bg-primary);
    flex-direction: column;
    justify-content: start;
    align-items: center;
    padding-top: 3rem;
    transition: var(--transition-medium);
    border-top: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    z-index: 999;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-link {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
  }
  
  .nav-link:last-child {
    border-bottom: none;
  }
  
  .hamburger {
    display: flex;
    z-index: 1001;
  }
  
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  /* Hero Section Mobile */
  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1rem;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    align-items: center;
    justify-items: center;
  }
  
  .hero-text {
    width: 100%;
    max-width: 100%;
    text-align: center;
  }
  
  .hero-title {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  .hero-title .gradient-text {
    display: inline-block;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .hero-subtitle {
    font-size: clamp(1.25rem, 5vw, 1.5rem);
    line-height: 1.3;
    margin-bottom: 1rem;
  }
  
  .hero-description {
    font-size: clamp(1rem, 3.5vw, 1.125rem);
    line-height: 1.5;
    margin-bottom: 2rem;
    max-width: 100%;
  }
  
  .hero-stats {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
  }
  
  .stat {
    min-width: 120px;
  }
  
  .hero-buttons {
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
  }
  
  .hero-image {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
  
  .image-container {
    width: 280px;
    height: 280px;
    border-radius: 16px;
    margin: 0 auto;
  }
  
  .floating-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .tech-label {
    font-size: 0.5rem;
  }
  
  .avatar-container {
    width: 60px;
    height: 60px;
  }
  
  .avatar-content {
    font-size: 1.5rem;
  }
  
  .code-animation {
    font-size: 0.6rem;
  }
  
  .data-viz {
    height: 30px;
  }
  
  /* Team Image Mobile */
  .team-image-container {
    width: 380px;
    height: 250px;
  }
  
  .team-placeholder {
    font-size: 2rem;
  }
  
  .team-placeholder span {
    font-size: 0.8rem;
  }

  /* Timeline Mobile */
  .timeline::before {
    left: 1rem;
  }
  
  .timeline-item {
    padding-left: 3rem;
    margin-bottom: 2rem;
  }
  
  .timeline-marker {
    left: 0.25rem;
    width: 1rem;
    height: 1rem;
  }
  
  .timeline-header {
    flex-direction: column;
    align-items: start;
    gap: 0.5rem;
  }
  
  .timeline-content {
    padding: 1.5rem;
  }
  
  /* Projects Mobile */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .project-card {
    margin: 0 0.5rem;
  }
  
  /* Featured Banner Mobile */
  .featured-banner {
    margin-bottom: 2rem;
  }
  
  .banner-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  
  .banner-title {
    font-size: 1.5rem;
  }
  
  .banner-description {
    font-size: 1rem;
  }
  
  .btn-banner {
    width: 100%;
    justify-content: center;
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
  }
  
  .banner-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .preview-container {
    min-height: 200px;
  }
  
  /* Research Section Mobile */
  .research-metrics {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
  }

  .metric-card {
    padding: 1.5rem;
  }

  .metric-number {
    font-size: 2rem;
  }

  .research-areas-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .research-area-card {
    padding: 2rem;
  }

  .area-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .publication-item {
    border-radius: 16px;
  }

  .publication-header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    text-align: center;
  }

  .publication-content {
    padding: 1.5rem;
  }

  .publication-title {
    font-size: 1.2rem;
  }

  .publication-details {
    padding: 0.75rem;
  }

  .publication-abstract {
    padding: 1rem;
  }

  .media-preview {
    height: 200px;
  }

  .media-play-button {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .publication-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .action-btn {
    justify-content: center;
    padding: 0.75rem 1rem;
  }

  .impact-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .impact-card {
    padding: 2rem;
  }

  .impact-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
    /* About Section Mobile */
  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .profile-card {
    padding: 2rem;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .profile-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .profile-actions .btn {
    padding: 0.75rem 1.25rem;
  }

  .profile-stats {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .stat-item {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .stat-icon {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .stat-number {
    font-size: 1.25rem;
  }

  .skills-container {
    gap: 1rem;
  }

  .skill-category-card {
    padding: 1.25rem;
  }

  .category-header {
    gap: 0.75rem;
  }

  .category-icon {
    width: 45px;
    height: 45px;
    font-size: 1.125rem;
  }

  .progress-ring {
    width: 50px;
    height: 50px;
  }

  .education-card-modern {
    padding: 1.5rem;
  }

  .education-header {
    gap: 1rem;
  }

  .education-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }

  .education-achievements {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .achievement-badge {
    padding: 0.75rem;
    min-width: auto;
  }

  .honor-badges {
    justify-content: center;
  }


  
  /* Profile Image Mobile */
  .profile-image-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
  }
  
  .profile-overlay p {
    font-size: 0.8rem;
    padding: 0.75rem;
  }
  
  .profile-placeholder {
    font-size: 2.5rem;
  }
  
  .profile-placeholder span {
    font-size: 0.7rem;
  }
  
  /* YouTube Modal Mobile */
  .youtube-modal-content {
    width: 95%;
    margin: 0 1rem;
  }
  
  .youtube-modal-close {
    top: -35px;
    font-size: 1.5rem;
  }
  
  .youtube-play-button {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  /* PDF Modal Mobile */
  .pdf-modal-content {
    width: 98%;
    height: 98%;
  }
  
  .pdf-modal-header {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .pdf-modal-header h3 {
    font-size: 1rem;
    order: 1;
    width: 100%;
  }
  
  .pdf-controls {
    order: 2;
    gap: 0.25rem;
    flex-wrap: wrap;
  }
  
  .pdf-control-btn {
    min-width: 32px;
    height: 32px;
    padding: 0.375rem;
  }
  
  .pdf-modal-close {
    order: 3;
    margin-left: 0;
  }
  
  #pdf-page-info,
  #pdf-zoom-level {
    font-size: 0.75rem;
    min-width: 50px;
  }
  
  .publication-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .publication-link {
    width: 100%;
    justify-content: center;
  }

  /* Publication Video Mobile */
  .publication-video .youtube-preview {
    height: 150px;
  }

  .publication-video .youtube-play-button {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  /* Image Modal Mobile */
  .image-modal-content {
    max-width: 98vw;
    max-height: 98vh;
    border-radius: 15px;
  }

  .image-modal-header {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .image-modal-header h3 {
    font-size: 1rem;
    order: 1;
    width: 100%;
  }

  .image-controls {
    gap: 0.25rem;
    order: 2;
  }

  .image-control-btn {
    padding: 0.4rem;
    min-width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .image-modal-close {
    font-size: 1.2rem;
    padding: 0.4rem;
    order: 3;
    margin-left: 0;
  }

  #image-zoom-level {
    font-size: 0.8rem;
    min-width: 45px;
  }

  .image-viewer-container {
    max-width: 95vw;
    max-height: 75vh;
  }

  /* Education Card Mobile */
  .education-card {
    padding: 1.5rem;
    margin: 0 0.5rem;
  }
  
  /* Contact Mobile */
  .contact-content {
    gap: 2rem;
  }
  
  .contact-form {
    padding: 1.5rem;
    margin: 0 0.5rem;
  }
  
  .social-links {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Experience Mobile */
  .experience-grid {
    gap: 1.5rem;
  }

  .experience-card {
    padding: 1.5rem;
  }

  .experience-header {
    flex-direction: column;
    gap: 1rem;
  }

  .experience-meta {
    flex-direction: column;
    gap: 0.75rem;
  }

  .company-logo {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }

  .project-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .experience-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .stat-card {
    padding: 1.5rem;
  }

  .stat-card .stat-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }

  .stat-card .stat-content h4 {
    font-size: 1.5rem;
  }

  /* Cultural Section Mobile */
  .cultural-content {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 0 1rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .cultural-placeholder {
    font-size: 2.5rem;
  }

  .cultural-placeholder span {
    font-size: 0.9rem;
  }

  .cultural-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .cultural-stats .stat-card {
    padding: 1.5rem;
  }

  .cultural-stats .stat-card .stat-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }

  .cultural-stats .stat-card .stat-content h4 {
    font-size: 1.5rem;
  }

  .leadership-card {
    padding: 2rem 1.5rem;
    margin-bottom: 1.5rem;
  }

  .achievement-item {
    padding: 1rem;
    gap: 1rem;
  }

  .achievement-item i {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }

  .current-role {
    padding: 1.5rem;
  }

  .gallery-image {
    height: 250px;
  }

  .leadership-header {
    flex-direction: column;
    align-items: start;
    gap: 0.5rem;
  }

  .achievement-item {
    flex-direction: column;
    align-items: start;
    gap: 0.5rem;
    text-align: left;
  }


}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  /* Hero Mobile Small */
  .hero {
    padding: clamp(1rem, 6vw, 2rem) 0;
    min-height: 85vh;
  }
  
  .hero-content {
    gap: 1.5rem;
    padding: 0 0.5rem;
  }
  
  .hero-title {
    font-size: clamp(2rem, 8vw, 2.5rem);
    line-height: 1.1;
  }
  
  .hero-subtitle {
    font-size: clamp(1.125rem, 4vw, 1.25rem);
  }
  
  .hero-description {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .stat {
    min-width: 100px;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .image-container {
    width: 220px;
    height: 220px;
    border-radius: 12px;
  }
  
  .floating-icon {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
  
  .tech-label {
    font-size: 0.45rem;
  }
  
  .avatar-container {
    width: 50px;
    height: 50px;
  }
  
  .avatar-content {
    font-size: 1.25rem;
  }
  
  .code-animation {
    font-size: 0.55rem;
    top: 15%;
    left: 5%;
    width: 90%;
  }
  
  .data-viz {
    height: 25px;
    bottom: 15%;
    right: 5%;
  }
  
  /* Navigation Mobile Small */
  .nav-container {
    padding: 0 1rem;
  }
  
  .nav-logo a {
    font-size: 1.25rem;
  }
  
  .nav-menu {
    padding-top: 2rem;
  }
  
  .nav-link {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  /* Sections Mobile Small */
  .about,
  .experience,
  .projects,
  .research,
  .contact {
    padding: clamp(2rem, 6vw, 3rem) 0;
  }
  
  .section-header {
    margin-bottom: clamp(2rem, 5vw, 3rem);
    padding: 0 0.5rem;
  }
  
  .section-title {
    font-size: clamp(1.75rem, 6vw, 2.25rem);
  }
  
  .section-subtitle {
    font-size: 0.95rem;
  }
  
  /* Team Image Mobile Small */
  .team-image-container {
    width: 320px;
    height: 210px;
  }
  
  .team-placeholder {
    font-size: 1.75rem;
  }
  
  .team-placeholder span {
    font-size: 0.7rem;
  }

  /* Timeline Mobile Small */
  .timeline-item {
    padding-left: 2.5rem;
    margin-bottom: 1.5rem;
  }
  
  .timeline-marker {
    left: 0rem;
    width: 0.75rem;
    height: 0.75rem;
  }
  
  .timeline::before {
    left: 0.375rem;
    width: 1px;
  }
  
  .timeline-content {
    padding: 1rem;
  }
  
  .timeline-header h3 {
    font-size: 1.125rem;
  }
  
  .timeline-date {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
  }
  
  /* Projects Mobile Small */
  .project-card {
    margin: 0;
  }
  
  .project-content {
    padding: 1.25rem;
  }
  
  .project-content h3 {
    font-size: 1.125rem;
  }
  
  .project-content p {
    font-size: 0.875rem;
  }
  
  .tech-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }
  
  .feature {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }
  
  /* About Section Small Mobile */
  .profile-card {
    padding: 1.5rem;
    margin: 0 0.5rem;
  }

  .avatar-image {
    width: 70px;
    height: 70px;
  }

  .profile-name {
    font-size: 1.25rem;
  }

  .profile-title {
    font-size: 0.9rem;
  }

  .badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }

  .profile-actions {
    gap: 0.5rem;
  }

  .profile-actions .btn {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }

  .profile-stats {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .stat-item {
    padding: 0.75rem;
    flex-direction: row;
    text-align: left;
    gap: 0.75rem;
  }

  .stat-icon {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }

  .stat-number {
    font-size: 1.125rem;
  }

  .skills-header h3 {
    font-size: 1.5rem;
  }

  .skills-header p {
    font-size: 0.875rem;
  }

  .skill-category-card {
    padding: 1rem;
    margin: 0 0.5rem;
  }

  .category-header {
    gap: 0.5rem;
  }

  .category-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .category-info h4 {
    font-size: 1.125rem;
  }

  .skill-count {
    font-size: 0.8rem;
  }

  .progress-ring {
    width: 45px;
    height: 45px;
  }

  .progress-text {
    font-size: 0.7rem;
  }

  .skill-bar {
    width: 80px;
  }

  .education-card-modern {
    padding: 1.25rem;
    margin: 0 0.5rem;
  }

  .education-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .education-icon {
    width: 45px;
    height: 45px;
    font-size: 1.125rem;
    align-self: center;
  }

  .education-content h4 {
    font-size: 1.125rem;
  }

  .education-content p {
    font-size: 0.875rem;
  }

  .achievement-badge {
    padding: 0.625rem;
  }

  .gpa-score {
    font-size: 1.125rem;
  }

  .honor-badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }


  
  /* Profile Image Mobile Small */
  .profile-image-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
  }
  
  .profile-overlay p {
    font-size: 0.7rem;
    padding: 0.5rem;
  }
  
  .profile-placeholder {
    font-size: 2rem;
  }
  
  .profile-placeholder span {
    font-size: 0.6rem;
  }
  
  /* YouTube Modal Mobile Small */
  .youtube-modal-content {
    width: 98%;
    margin: 0 0.5rem;
  }
  
  .youtube-modal-close {
    top: -30px;
    font-size: 1.25rem;
  }
  
  .youtube-play-button {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
  
  /* PDF Modal Mobile Small */
  .pdf-modal-content {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
  
  .pdf-modal-header {
    padding: 0.5rem 0.75rem;
  }
  
  .pdf-modal-header h3 {
    font-size: 0.9rem;
  }
  
  .pdf-controls {
    gap: 0.125rem;
  }
  
  .pdf-control-btn {
    min-width: 28px;
    height: 28px;
    padding: 0.25rem;
    font-size: 0.8rem;
  }
  
  #pdf-page-info,
  #pdf-zoom-level {
    font-size: 0.7rem;
    min-width: 40px;
  }

  /* Education Card Mobile Small */
  .education-card {
    padding: 1.25rem;
    margin: 0;
  }
  
  .card-header {
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  
  .card-header i {
    font-size: 1.25rem;
  }
  
  .education-item h5 {
    font-size: 1rem;
  }
  
  /* Research Mobile Small */
  .publication-card {
    padding: 1.25rem;
    margin: 0 0.5rem;
  }
  
  .publication-card h4 {
    font-size: 1rem;
    line-height: 1.4;
  }
  
  .publication-venue {
    font-size: 0.8rem;
  }
  
  .tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }

  /* Publication Video Small Mobile */
  .publication-video .youtube-preview {
    height: 120px;
  }

  .publication-video .youtube-play-button {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
  
  /* Contact Mobile Small */
  .contact-item {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .contact-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.125rem;
  }
  
  .contact-details h4 {
    font-size: 1rem;
  }
  
  .contact-form {
    padding: 1.25rem;
    margin: 0;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
  }
  
  .social-links {
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .social-link {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.125rem;
  }
  
  /* Theme toggle positioning on mobile */
  .theme-toggle {
    bottom: 15px !important;
    right: 15px !important;
    width: 45px !important;
    height: 45px !important;
    font-size: 1rem !important;
  }
  
  /* Work Showcase Small Mobile */
  .work-image,
  .rover-image {
    height: 180px;
  }

  .rover-image {
    padding: 0;
  }

  /* Cultural Section Small Mobile */
  .gallery-image {
    height: 200px;
  }

  .cultural-stat {
    padding: 1.5rem 1rem;
    border-radius: 16px;
  }

  .cultural-stat .stat-number {
    font-size: 1.5rem;
  }

  .leadership-card,
  .current-role {
    padding: 1.5rem;
    margin: 0 0.5rem;
    border-radius: 16px;
  }

  .achievement-item {
    padding: 1rem;
    border-radius: 12px;
  }

  .achievement-item i {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
  }

  .cultural-content {
    gap: 2rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .cultural-placeholder {
    font-size: 2rem;
  }

  .cultural-placeholder span {
    font-size: 0.8rem;
  }

  .cultural-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .cultural-stats .stat-card {
    padding: 1.25rem;
  }

  .cultural-stats .stat-card .stat-icon {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  .cultural-stats .stat-card .stat-content h4 {
    font-size: 1.25rem;
  }



  /* Floating icons mobile */
  .floating-icon {
    width: 45px;
    height: 45px;
    font-size: 1.25rem;
  }
}

/* ===== EXTRA SMALL MOBILE DEVICES ===== */
@media (max-width: 360px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .hero {
    padding: clamp(0.75rem, 5vw, 1.5rem) 0;
    min-height: 80vh;
  }
  
  .hero-content {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 0.25rem;
    text-align: center;
    justify-items: center;
  }
  
  .hero-text {
    width: 100%;
    max-width: 100%;
  }
  
  .hero-title {
    font-size: clamp(1.75rem, 7vw, 2rem);
    line-height: 1.1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  .hero-title .gradient-text {
    display: inline-block;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .hero-subtitle {
    font-size: clamp(1rem, 3.5vw, 1.125rem);
    line-height: 1.3;
  }
  
  .hero-description {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  .hero-stats {
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .stat-number {
    font-size: 1.25rem;
  }
  
  .stat-label {
    font-size: 0.75rem;
  }
  
  .image-container {
    width: 180px;
    height: 180px;
  }
  
  .floating-icon {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
  
  .section-title {
    font-size: clamp(1.5rem, 5vw, 1.875rem);
  }
  
  .section-subtitle {
    font-size: 0.875rem;
  }
  
  .timeline-item {
    padding-left: 2rem;
  }
  
  .timeline-marker {
    left: -0.25rem;
  }
  
  .timeline::before {
    left: 0.125rem;
  }
  
  .nav-container {
    padding: 0 0.75rem;
  }
  
  .nav-logo a {
    font-size: 1.125rem;
  }
  
  .theme-toggle {
    bottom: 10px !important;
    right: 10px !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 0.9rem !important;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition-slow);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== PARALLAX EFFECTS ===== */
.parallax {
  transform: translateY(0);
  will-change: transform;
}

/* ===== SCROLL PERFORMANCE OPTIMIZATIONS ===== */
.hero-content,
.project-card,
.timeline-item,
.stat-card {
  will-change: transform;
}

/* Mobile performance optimizations */
@media (max-width: 768px) {
  .parallax {
    will-change: auto;
  }
  
  .floating-icon {
    will-change: auto;
  }
  
  /* Reduce animations on mobile for better performance */
  @media (prefers-reduced-motion: no-preference) {
    .hero,
    .floating-icon {
      animation-duration: 0.5s;
    }
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .parallax {
    transform: none !important;
  }
}

/* ===== LOADING ANIMATION ===== */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ===== SELECTION STYLES ===== */
::selection {
  background: var(--primary-color);
  color: white;
}

::-moz-selection {
  background: var(--primary-color);
  color: white;
}

/* ============================================================
   AESTHETIC ENHANCEMENT PACK v2.0
   Film grain · Glassmorphism · Spotlight cards · Glitch text
   Scroll-fade hero · Animated borders · Clip-path reveals
   ============================================================ */

/* ===== FILM GRAIN OVERLAY — disabled (caused flicker) ===== */
.grain-svg {
  display: none;
}

.grain-overlay {
  display: none;
}


/* ===== PERF NOTE: content-visibility was removed =====
   content-visibility:auto on the animated sections caused ScrollTrigger to
   mis-measure trigger positions (off-screen sections reported their
   contain-intrinsic-size placeholder height, not real layout), which left
   section headers / cards stuck hidden when scrolled to after the one-time
   reveal failsafe. Lenis + GSAP already keep scrolling smooth, so the modest
   perf gain wasn't worth the visibility bug. (Reveal robustness is now also
   backed by an IntersectionObserver safety net in reveal-motion.js.) */


/* ===== GLASSMORPHISM CARD UPGRADE ===== */
/* Perf: backdrop-filter removed from the 12 project cards (biggest
   scroll-jank offender). Bumped bg opacity to keep a near-glass look
   without the per-frame blur compositing cost. */
.project-card {
  background: rgba(var(--bg-primary-rgb, 255, 255, 255), 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .project-card {
  background: rgba(15, 15, 30, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* Perf: experience-card blur removed (see opaque bg in base rule above). */

[data-theme="dark"] .experience-card {
  background: rgba(15, 15, 30, 0.6) !important;
  border-color: rgba(var(--accent-primary-rgb), 0.12) !important;
}

/* ===== SPOTLIGHT CARD EFFECT (JS sets --sx --sy) ===== */
.project-card,
.research-area-card,
.metric-card,
.cert-card {
  --sx: -200px;
  --sy: -200px;
}

.project-card::after,
.research-area-card::after,
.metric-card::after,
.cert-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    260px circle at var(--sx) var(--sy),
    rgba(var(--accent-primary-rgb), 0.1),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.project-card:hover::after,
.research-area-card:hover::after,
.metric-card:hover::after,
.cert-card:hover::after {
  opacity: 1;
}

/* ===== ANIMATED GLOW BORDER — FEATURED CARDS (flicker-free) ===== */
.experience-card.featured,
.publication-item.featured {
  will-change: box-shadow;
  animation: borderGlow 5s ease-in-out infinite;
}

@keyframes borderGlow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(var(--accent-primary-rgb), 0.35),
      0 0 18px rgba(var(--accent-primary-rgb), 0.12),
      0 20px 44px rgba(0, 0, 0, 0.14);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(var(--accent-secondary-rgb), 0.35),
      0 0 18px rgba(var(--accent-secondary-rgb), 0.12),
      0 20px 44px rgba(0, 0, 0, 0.14);
  }
}

/* ===== HERO CONTENT SCROLL FADE (JS drives --hero-fade) ===== */
.hero-content {
  will-change: opacity, filter;
  /* JS sets opacity and filter directly via style for performance */
}

/* ===== GLITCH TEXT — removed (caused flicker on hover) ===== */
.hero-title {
  position: relative;
}


/* ===== SECTION TITLE CLIP-PATH WIPE REVEAL ===== */
.section-title {
  overflow: hidden;
  display: inline-block;
}

[data-aos="fade-up"].aos-animate .section-title,
.section-header[data-aos="fade-up"].aos-animate .section-title {
  animation: clipReveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes clipReveal {
  from {
    clip-path: inset(0 100% 0 0);
    opacity: 0.8;
  }
  to {
    clip-path: inset(0 0% 0 0);
    opacity: 1;
  }
}

/* ===== HERO AMBIENT ORBS (additional, subtler than blobs) ===== */
.hero::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(var(--accent-primary-rgb), 0.18) 0%, transparent 70%);
  top: 20%;
  left: 10%;
  pointer-events: none;
  z-index: 0;
  animation: orbPulse 6s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(var(--accent-tertiary-rgb), 0.15) 0%, transparent 70%);
  bottom: 15%;
  right: 15%;
  pointer-events: none;
  z-index: 0;
  animation: orbPulse 8s ease-in-out infinite reverse;
}

@keyframes orbPulse {
  0%, 100% { transform: scale(1) translate(0, 0); opacity: 0.7; }
  50%       { transform: scale(1.3) translate(10px, -10px); opacity: 1; }
}

/* ===== STAT NUMBER PULSE ON ANIMATE ===== */
.stat-item.animated .stat-number {
  animation: numberPulse 0.4s ease-out;
}

@keyframes numberPulse {
  0%    { transform: scale(1.3); color: var(--primary-color); }
  100%  { transform: scale(1);   color: inherit; }
}

/* ===== BUTTON SHIMMER SWEEP ===== */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transform: skewX(-20deg);
  transition: none;
  pointer-events: none;
}

.btn-primary:hover::before {
  animation: btnShimmer 0.65s ease forwards;
}

@keyframes btnShimmer {
  0%   { left: -100%; }
  100% { left: 160%;  }
}

/* ===== LENIS SMOOTH SCROLL INTEGRATION ===== */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

/* ===== NAV BLUR ON SCROLL (reinforced) ===== */
.navbar.scrolled {
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  background: rgba(var(--bg-primary-rgb, 255, 255, 255), 0.78) !important;
}

[data-theme="dark"] .navbar.scrolled {
  background: rgba(10, 10, 20, 0.82) !important;
}

/* ===== TECH TAG HOVER GLOW ===== */
.tech-tag,
.tech-badge {
  transition: all var(--transition-fast);
}

.tech-tag:hover,
.tech-badge:hover {
  background: var(--primary-color) !important;
  color: white !important;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(var(--accent-primary-rgb), 0.4);
}

/* ===== PROJECT PLACEHOLDER ICON ANIMATION ===== */
.project-placeholder i {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-card:hover .project-placeholder i {
  transform: scale(1.25) rotate(-8deg);
  filter: drop-shadow(0 0 12px var(--primary-color));
}

/* ===== SOCIAL LINK RING PULSE ===== */
.social-link {
  position: relative;
}

.social-link::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--primary-color);
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.4s ease;
}

.social-link:hover::after {
  opacity: 0.5;
  transform: scale(1.2);
}

/* ===== STAGGERED CARD ENTRANCE ===== */
.project-card,
.experience-card,
.metric-card,
.stat-card,
.cultural-card,
.research-area-card {
  transition-property: opacity, transform, box-shadow;
  transition-duration: 0.65s;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== RESPONSIVE: disable expensive effects on mobile ===== */
@media (max-width: 768px) {
  /* Kill grain — too noisy on small screens */
  .grain-overlay {
    display: none;
  }

  /* Kill spotlight — no hover on touch */
  .project-card::after,
  .experience-card::after,
  .research-area-card::after,
  .metric-card::after,
  .cert-card::after {
    display: none;
  }

  /* Kill ambient orbs — saves rendering on low-end devices */
  .hero::before,
  .hero::after {
    display: none;
  }

  /* Kill border glow animation on mobile (saves battery) */
  .experience-card.featured,
  .publication-item.featured {
    animation: none;
    box-shadow:
      0 0 0 1px rgba(var(--accent-primary-rgb), 0.3),
      0 12px 30px rgba(0, 0, 0, 0.12);
    will-change: auto;
  }

  /* Hero scroll fade can cause issues on mobile — disable blur */
  .hero-content {
    will-change: auto;
  }

  /* Glitch text — no hover on touch devices, so disable */
  .hero-title:hover .gradient-text {
    animation: none;
  }

  /* Custom cursor — hidden on touch */
  .custom-cursor,
  .cursor-dot {
    display: none !important;
  }

  /* Social link ring — too small on mobile */
  .social-link::after {
    display: none;
  }

  /* Scroll progress ring — reposition for mobile safe area */
  .scroll-progress-ring {
    bottom: calc(20px + env(safe-area-inset-bottom));
    left: calc(15px + env(safe-area-inset-left));
  }

  /* Hero parallax — disable on touch */
  .hero-text,
  .hero-image,
  .hero-text-parallax,
  .hero-image-parallax {
    transform: none !important;
    will-change: auto;
  }

  /* Perf: project-card backdrop-filter fully removed (desktop + mobile)
     to eliminate scroll jank on the 12-card grid. */
}

/* Very small screens */
@media (max-width: 480px) {
  .hero-blob-1,
  .hero-blob-2 {
    width: 250px;
    height: 250px;
    filter: blur(40px);
  }

  .section-divider {
    height: 40px;
  }
}

/* ============================================================
   ABOUT SECTION — LAYOUT REORGANIZATION
   Profile card fixed width | Skills 2-col grid | Education full
   ============================================================ */

/* Desktop: give profile a fixed comfortable width, skills take the rest */
.about-content {
  grid-template-columns: 360px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* Skills section: remove any fixed height constraints */
.skills-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Skills container: 2-column grid instead of single vertical flex */
.skills-container {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  flex-direction: unset;
}

/* 3rd skill card (Hardware & Robotics) spans full width for balance */
.skills-container .skill-category-card:nth-child(3) {
  grid-column: 1 / -1;
}

/* When scroll-revealed, the spanned card keeps its skills visible */
.skills-container .skill-category-card:nth-child(3)[data-scroll-revealed] .skills-list {
  max-height: 350px !important;
  opacity: 1 !important;
}

/* Education card — full width, comfortable spacing */
.education-card-modern {
  margin-top: 0.25rem;
  width: 100%;
}

/* Skills header breathing room */
.skills-header {
  margin-bottom: 0.5rem;
}

/* ===== ABOUT SECTION — RESPONSIVE ===== */

/* Laptop/tablet (≤1200px): shrink profile column slightly */
@media (max-width: 1200px) {
  .about-content {
    grid-template-columns: 320px 1fr;
    gap: 2rem;
  }
}

/* Tablet (≤1024px): stack to full-width single column */
@media (max-width: 1024px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Keep 2-col skills grid on tablet */
  .skills-container {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Hardware card no longer needs to span full on tablet (enough room) */
  .skills-container .skill-category-card:nth-child(3) {
    grid-column: span 1;
  }
}

/* Mobile (≤640px): single-column everything */
@media (max-width: 640px) {
  .skills-container {
    grid-template-columns: 1fr !important;
  }

  .skills-container .skill-category-card:nth-child(3) {
    grid-column: span 1;
  }
}