/* =====================================================
   MODERN PORTFOLIO CSS - duarte.io
   A beautiful, modern dark theme with glassmorphism
   ===================================================== */

/* CSS Variables */
:root {
  /* Colors - Dark Theme */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a25;
  
  /* Accent Gradient */
  --accent-1: #7c94f6;
  --accent-2: #9066c9;
  --accent-3: #f093fb;
  --gradient-primary: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent-2) 0%, var(--accent-3) 100%);
  
  /* Text Colors - Improved contrast ratios */
  --text-primary: #ffffff;
  --text-secondary: #c4c4cc;
  --text-muted: #9898a3;
  
  /* Glass Effect */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  
  /* Spacing */
  --section-padding: 120px;
  --container-max: 1200px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-primary: #fafafa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f4f4f5;
  
  --text-primary: #18181b;
  --text-secondary: #3f3f46;
  --text-muted: #71717a;
  
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* =====================================================
   BASE STYLES
   ===================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* =====================================================
   ANIMATED BACKGROUND
   ===================================================== */

.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  background: var(--bg-primary);
}

.gradient-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 20s ease-in-out infinite;
  will-change: transform;
  contain: layout paint;
}

.sphere-1 {
  width: 600px;
  height: 600px;
  background: var(--accent-1);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.sphere-2 {
  width: 500px;
  height: 500px;
  background: var(--accent-2);
  bottom: -150px;
  left: -100px;
  animation-delay: -7s;
}

.sphere-3 {
  width: 400px;
  height: 400px;
  background: var(--accent-3);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
  opacity: 0.3;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(50px, -50px) scale(1.1);
  }
  50% {
    transform: translate(-30px, 30px) scale(0.95);
  }
  75% {
    transform: translate(-50px, -30px) scale(1.05);
  }
}

/* =====================================================
   NAVIGATION
   ===================================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition-medium);
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 15px 0;
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(255, 255, 255, 0.8);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 24px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: -1px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 40px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition-medium);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.theme-toggle {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 16px;
  transition: var(--transition-medium);
}

.theme-toggle:hover {
  background: var(--glass-border);
  color: var(--text-primary);
  transform: rotate(15deg);
}

/* Nav Right Container */
.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  transition: var(--transition-medium);
}

.hamburger:hover {
  background: var(--glass-border);
}

.hamburger-line {
  width: 18px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition-medium);
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* =====================================================
   SCROLL PROGRESS
   ===================================================== */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-primary);
  z-index: 1001;
  width: 0%;
  transition: width 0.1s linear;
  will-change: width;
}

/* =====================================================
   HERO SECTION
   ===================================================== */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 40px 80px;
  position: relative;
}

.hero-content {
  max-width: 800px;
}

.hero-image-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 30px;
}

.hero-image-glow {
  position: absolute;
  inset: -10px;
  background: var(--gradient-primary);
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.6;
  animation: pulse-glow 3s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

.hero-image {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  border: 3px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.hero-title {
  margin-bottom: 20px;
}

.greeting {
  display: block;
  font-size: 18px;
  font-weight: 400;
  color: var(--accent-1);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.name {
  display: block;
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -2px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 600;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 15px;
}

.hero-tagline {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 40px;
}

.hero-cta {
  margin-bottom: 50px;
}

.hero-social {
  display: flex;
  justify-content: center;
  gap: 20px;
}

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

.social-link:hover {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.mouse {
  width: 26px;
  height: 40px;
  border: 2px solid var(--text-muted);
  border-radius: 20px;
  position: relative;
}

.wheel {
  width: 4px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 2s infinite;
}

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

@keyframes scroll-wheel {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
}

/* =====================================================
   BUTTONS
   ===================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: var(--radius-xl);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition-medium);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.btn-primary i {
  transition: var(--transition-medium);
}

.btn-primary:hover i {
  transform: translateY(3px);
}

.btn-large {
  padding: 20px 40px;
  font-size: 16px;
}

/* =====================================================
   SECTIONS
   ===================================================== */

.section {
  padding: var(--section-padding) 40px;
  position: relative;
}

.section-alt {
  background: var(--bg-secondary);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
}

.section-title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 60px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.title-number {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 20px;
  font-weight: 500;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =====================================================
   GLASS CARD
   ===================================================== */

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  transition: var(--transition-medium);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
}

/* Make links inside glass cards more visible on hover */
.glass-card:hover .doc-link {
  color: var(--text-primary);
  font-weight: 500;
}

.glass-card:hover .timeline-company {
  color: var(--text-primary);
  font-weight: 600;
}

/* =====================================================
   ABOUT SECTION
   ===================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  align-items: start;
  margin-bottom: 60px;
}

.about-text p {
  margin-bottom: 20px;
  font-size: 17px;
  line-height: 1.8;
}

.about-text .lead {
  font-size: 20px;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.7;
}

.about-text strong {
  color: var(--text-primary);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.stat-card {
  padding: 30px;
  text-align: center;
}

.stat-number {
  font-size: 42px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.travel-note {
  padding: 30px 40px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.travel-note i {
  font-size: 28px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}

.travel-note p {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
}

/* =====================================================
   TIMELINE
   ===================================================== */

.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-1), var(--accent-2), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -40px;
  top: 30px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent-1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-marker-inner {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-primary);
}

.timeline-content {
  padding: 30px;
}

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

.timeline-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.timeline-company {
  color: var(--accent-1);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.timeline-company:hover {
  color: var(--accent-2);
}

.timeline-company i {
  font-size: 11px;
}

.acquisition-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
  color: var(--accent-1);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  margin-left: 10px;
  text-decoration: none;
  transition: var(--transition-fast);
  border: 1px solid rgba(102, 126, 234, 0.3);
  line-height: 1.4;
}

.acquisition-badge:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4));
  color: var(--text-primary);
  transform: translateY(-1px);
}

.ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(40, 167, 69, 0.15);
  color: #28a745;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  margin-left: 8px;
  text-decoration: none;
  transition: var(--transition-fast);
  border: 1px solid rgba(40, 167, 69, 0.3);
  line-height: 1.4;
}

.ticker-badge:hover {
  background: rgba(40, 167, 69, 0.25);
  color: #34ce57;
  transform: translateY(-1px);
}

.ticker-badge i {
  font-size: 10px;
}

.ticker-symbol {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  letter-spacing: 0.5px;
}

.ticker-price {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  opacity: 0.8;
}

.ticker-price.up {
  color: #28a745;
}

.ticker-price.down {
  color: #dc3545;
}

.acquisition-badge i {
  font-size: 10px;
}

.timeline-date {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.timeline-description {
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 20px;
}

.timeline-achievements {
  margin-bottom: 20px;
}

.achievement {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 8px;
}

.achievement i {
  color: var(--accent-1);
  font-size: 12px;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tag {
  background: rgba(102, 126, 234, 0.1);
  color: var(--accent-1);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.timeline-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-link-group {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 13px;
}

.doc-link-group i {
  font-size: 14px;
  width: 16px;
}

.doc-link-group span {
  flex: 1;
}

.flag-link {
  font-size: 16px;
  text-decoration: none;
  opacity: 0.7;
  transition: var(--transition-fast);
  filter: grayscale(30%);
}

.flag-link:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.2);
}

.glass-card:hover .doc-link-group {
  color: var(--text-primary);
}

.glass-card:hover .flag-link {
  opacity: 1;
  filter: grayscale(0%);
}

.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: var(--transition-fast);
}

.doc-link:hover {
  color: var(--accent-1);
}

.doc-link i {
  font-size: 14px;
}

/* =====================================================
   PUBLICATIONS
   ===================================================== */

.publications-grid {
  display: grid;
  gap: 20px;
}

.publication-card {
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 30px;
  text-decoration: none;
  cursor: pointer;
}

.publication-card:hover {
  transform: translateY(-5px) translateX(5px);
}

.publication-card:hover .publication-arrow {
  transform: translateX(5px);
  color: var(--accent-1);
}

.publication-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.publication-icon i {
  font-size: 24px;
  color: white;
}

.publication-content {
  flex: 1;
}

.publication-type {
  font-size: 12px;
  color: var(--accent-1);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

.publication-content h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.5;
}

.publication-content p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.publication-arrow {
  color: var(--text-muted);
  font-size: 18px;
  transition: var(--transition-medium);
}

/* =====================================================
   CONTACT
   ===================================================== */

.contact-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.contact-text {
  font-size: 20px;
  line-height: 1.8;
  margin-bottom: 50px;
}

.contact-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 50px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
}

.contact-card:hover {
  color: var(--text-primary);
}

.contact-card i {
  font-size: 18px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.email-card {
  cursor: default;
}

/* =====================================================
   FOOTER
   ===================================================== */

.footer {
  padding: 40px;
  text-align: center;
  background: var(--bg-primary);
  border-top: 1px solid var(--glass-border);
}

.footer-content p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-note {
  margin-top: 8px !important;
  font-size: 13px !important;
  color: var(--text-muted);
}

/* =====================================================
   SIDE NAVIGATION INDICATOR
   ===================================================== */

.side-nav {
  position: fixed;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.side-nav.visible {
  opacity: 1;
  visibility: visible;
}

.side-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
  margin: 0;
  position: relative;
}

.side-nav-item {
  position: relative;
}

.side-nav-link {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-decoration: none;
  padding: 8px 0;
  position: relative;
}

.side-nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--text-muted);
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  flex-shrink: 0;
}

.side-nav-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient-primary);
  opacity: 0.3;
  transition: transform 0.3s ease;
}

.side-nav-label {
  position: absolute;
  right: 24px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s ease;
  white-space: nowrap;
}

/* Hover States */
.side-nav-link:hover .side-nav-label {
  opacity: 1;
  transform: translateX(0);
}

.side-nav-link:hover .side-nav-dot {
  border-color: var(--accent-1);
  background: #1a2040;
}

/* Active State */
.side-nav-item.active .side-nav-dot {
  background: #7c94f6;
  border-color: var(--accent-1);
  box-shadow: 0 0 15px rgba(102, 126, 234, 0.5);
}

.side-nav-item.active .side-nav-dot::before {
  transform: translate(-50%, -50%) scale(1);
  animation: pulse-ring 2s ease-out infinite;
}

.side-nav-item.active .side-nav-label {
  color: var(--accent-1);
  opacity: 1;
  transform: translateX(0);
}

/* Passed sections get a lighter dot - improved contrast */
.side-nav-item.passed .side-nav-dot {
  background: #4a5a8a;
  border-color: #6a7ab0;
}

.side-nav-item.passed .side-nav-label {
  color: rgba(124, 148, 246, 0.85);
  opacity: 1;
  transform: translateX(0);
}

@keyframes pulse-ring {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.3;
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

/* Connecting Guide Line (Background) */
.side-nav-list::before {
  content: '';
  position: absolute;
  top: 14px;
  height: calc(100% - 28px);
  right: 5px;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  z-index: 0;
}

/* Active Progress Line (Foreground) */
.side-nav-list::after {
  content: '';
  position: absolute;
  top: 14px;
  right: 5px;
  width: 2px;
  height: var(--scroll-progress, 0%);
  max-height: calc(100% - 28px);
  background: var(--gradient-primary);
  border-radius: 2px;
  transition: height 0.1s linear;
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.6);
  z-index: 1;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .about-stats {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .side-nav {
    right: 20px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 80px;
  }
  
  /* Mobile Navigation */
  .hamburger {
    display: flex;
  }
  
  .nav-links {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 30px 20px;
    gap: 0;
    border-bottom: 1px solid var(--glass-border);
  }
  
  [data-theme="light"] .nav-links {
    background: rgba(255, 255, 255, 0.95);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .nav-links li {
    border-bottom: 1px solid var(--glass-border);
  }
  
  .nav-links li:last-child {
    border-bottom: none;
  }
  
  .nav-links a {
    display: block;
    padding: 15px 0;
    font-size: 16px;
  }
  
  .nav-links a::after {
    display: none;
  }
  
  .nav-container {
    padding: 0 20px;
  }
  
  .section {
    padding: var(--section-padding) 20px;
  }
  
  .hero {
    padding: 100px 20px 60px;
  }
  
  .hero-image {
    width: 150px;
    height: 150px;
  }
  
  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Hide side nav on mobile */
  .side-nav {
    display: none;
  }
  
  .travel-note {
    flex-direction: column;
    text-align: center;
    padding: 25px;
  }
  
  .travel-note p {
    font-size: 14px;
    line-height: 1.8;
  }
  
  .timeline {
    padding-left: 30px;
  }
  
  .timeline::before {
    left: 5px;
  }
  
  .timeline-marker {
    left: -30px;
    width: 14px;
    height: 14px;
  }
  
  .timeline-marker-inner {
    width: 6px;
    height: 6px;
  }
  
  .timeline-content {
    padding: 20px;
  }
  
  .timeline-header {
    flex-direction: column;
    gap: 10px;
  }
  
  .timeline-title {
    font-size: 18px;
  }
  
  .publication-card {
    flex-direction: column;
    text-align: center;
    padding: 25px;
  }
  
  .publication-arrow {
    display: none;
  }
  
  .contact-cards {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .name {
    font-size: 36px;
  }
  
  .about-stats {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .stat-number {
    font-size: 32px;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* =====================================================
   ANIMATIONS
   ===================================================== */

/* Fade animations handled by AOS library */

/* Smooth link transitions */
a {
  transition: var(--transition-fast);
}

/* Custom cursor for interactive elements */
.btn, .social-link, .contact-card, .publication-card, .doc-link, .timeline-company {
  cursor: pointer;
}

/* Focus states for accessibility */
a:focus, button:focus {
  outline: 2px solid var(--accent-1);
  outline-offset: 3px;
}

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

/* =====================================================
   ✨ INCREDIBLE EFFECTS ✨
   ===================================================== */

/* Cursor Glow - Subtle spotlight following mouse */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

[data-theme="light"] .cursor-glow {
  background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
}

/* Enhanced glass card with 3D transform support */
.glass-card {
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.03, 0.98, 0.52, 0.99), 
              border-color 0.3s ease,
              box-shadow 0.3s ease;
  will-change: transform;
}

.glass-card:hover {
  box-shadow: 
    var(--glass-shadow),
    0 0 40px rgba(102, 126, 234, 0.1),
    inset 0 0 60px rgba(255, 255, 255, 0.02);
}

/* Magnetic button transition */
.btn, .social-link, .contact-card {
  transition: transform 0.2s cubic-bezier(0.03, 0.98, 0.52, 0.99),
              background 0.3s ease,
              box-shadow 0.3s ease;
}

/* Shimmer effect on buttons */
.btn-primary {
  position: relative;
  overflow: hidden;
}

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

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

/* Glowing border on hover for timeline items */
.timeline-content::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.timeline-content {
  position: relative;
}

.timeline-content:hover::before {
  opacity: 0.5;
}

/* Pulsing glow on hero image */
.hero-image-glow {
  animation: pulse-glow 3s ease-in-out infinite;
  will-change: transform, opacity;
}

/* Removed rotate-glow animation as filter animations are not composited */

/* Floating animation for social links */
.social-link {
  animation: float-subtle 3s ease-in-out infinite;
  will-change: transform;
}

.social-link:nth-child(1) { animation-delay: 0s; }
.social-link:nth-child(2) { animation-delay: 0.2s; }
.social-link:nth-child(3) { animation-delay: 0.4s; }

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

.social-link:hover {
  animation: none;
}

/* Gradient text - static (removed animation for performance) */
.hero-subtitle {
  background-size: 200% auto;
}

/* Stats counter glow when counting */
.stat-number.counted {
  animation: glow-pulse 0.5s ease;
}

@keyframes glow-pulse {
  0%, 100% { text-shadow: none; }
  50% { text-shadow: 0 0 20px var(--accent-1), 0 0 40px var(--accent-2); }
}

/* Timeline marker pulse */
.timeline-marker-inner {
  animation: marker-pulse 2s ease-in-out infinite;
}

@keyframes marker-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
}

/* Noise texture overlay for depth */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 1000;
}

/* Stagger animation for tags */
.timeline-tags .tag {
  opacity: 0;
  animation: tag-appear 0.3s ease forwards;
}

.timeline-content:hover .tag:nth-child(1) { animation-delay: 0s; }
.timeline-content:hover .tag:nth-child(2) { animation-delay: 0.05s; }
.timeline-content:hover .tag:nth-child(3) { animation-delay: 0.1s; }
.timeline-content:hover .tag:nth-child(4) { animation-delay: 0.15s; }

.timeline-content .tag {
  opacity: 1;
}

/* Clickable tag links */
.tag-link {
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag-link:hover {
  background: var(--accent-1);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

@keyframes tag-appear {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Publication card arrow animation */
.publication-card:hover .publication-arrow {
  animation: arrow-bounce 0.6s ease infinite;
}

@keyframes arrow-bounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(8px); }
}

/* Scroll indicator enhanced animation */
.scroll-indicator {
  opacity: 0;
  animation: fade-in-up 1s ease 2s forwards;
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Section title underline animation */
.section-title::after {
  content: '';
  display: block;
  width: 0;
  height: 3px;
  background: var(--gradient-primary);
  margin-top: 15px;
  border-radius: 2px;
  transition: width 0.6s ease;
}

.section-title:hover::after {
  width: 100px;
}

/* Footer heart beat */
.footer-note::after {
  content: ' ❤️';
  display: inline-block;
  animation: heartbeat 1.5s ease infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.1); }
  50% { transform: scale(1); }
  75% { transform: scale(1.2); }
}

/* =====================================================
   REDUCED MOTION PREFERENCES (Accessibility)
   ===================================================== */

@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;
  }
  
  .gradient-sphere,
  .hero-image-glow,
  .scroll-indicator,
  .cursor-glow {
    animation: none !important;
  }
}
