/* ========================================
   CSS Custom Properties & Theming
   ======================================== */

:root {
  /* Typography */
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Sora', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme (Default) */
[data-theme="dark"] {
  --bg-primary: #0a0a0b;
  --bg-secondary: #111113;
  --bg-tertiary: #1a1a1d;
  --text-primary: #fafafa;
  --text-secondary: #a1a1a6;
  --text-muted: #6b6b70;
  --accent: #c4f042;
  --accent-secondary: #42f0c4;
  --accent-glow: rgba(196, 240, 66, 0.4);
  --border: rgba(255, 255, 255, 0.08);
  --gradient-1: #6b21a8;
  --gradient-2: #0891b2;
  --gradient-3: #65a30d;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-hover: rgba(255, 255, 255, 0.08);
  --orb-1: rgba(139, 92, 246, 0.6);
  --orb-2: rgba(6, 182, 212, 0.5);
  --orb-3: rgba(196, 240, 66, 0.4);
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #fafaf9;
  --bg-secondary: #f0f0ee;
  --bg-tertiary: #e5e5e3;
  --text-primary: #0a0a0b;
  --text-secondary: #52525b;
  --text-muted: #a1a1aa;
  --accent: #7c3aed;
  --accent-secondary: #06b6d4;
  --accent-glow: rgba(124, 58, 237, 0.3);
  --border: rgba(0, 0, 0, 0.08);
  --gradient-1: #c084fc;
  --gradient-2: #22d3ee;
  --gradient-3: #a3e635;
  --card-bg: rgba(0, 0, 0, 0.02);
  --card-hover: rgba(0, 0, 0, 0.05);
  --orb-1: rgba(192, 132, 252, 0.5);
  --orb-2: rgba(34, 211, 238, 0.4);
  --orb-3: rgba(163, 230, 53, 0.4);
}

/* Mono Theme */
[data-theme="mono"] {
  --bg-primary: #0d0d0d;
  --bg-secondary: #141414;
  --bg-tertiary: #1f1f1f;
  --text-primary: #00ff88;
  --text-secondary: #00cc6a;
  --text-muted: #006633;
  --accent: #00ff88;
  --accent-secondary: #88ff00;
  --accent-glow: rgba(0, 255, 136, 0.4);
  --border: rgba(0, 255, 136, 0.15);
  --gradient-1: #00ff88;
  --gradient-2: #00cc6a;
  --gradient-3: #88ff00;
  --card-bg: rgba(0, 255, 136, 0.03);
  --card-hover: rgba(0, 255, 136, 0.08);
  --orb-1: rgba(0, 255, 136, 0.3);
  --orb-2: rgba(136, 255, 0, 0.2);
  --orb-3: rgba(0, 204, 106, 0.25);
}

[data-theme="mono"] body {
  font-family: var(--font-mono) !important;
}

[data-theme="mono"] .hero-title,
[data-theme="mono"] .section-title,
[data-theme="mono"] .project-title {
  font-family: var(--font-mono) !important;
}

/* ========================================
   Reset & Base Styles
   ======================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ========================================
   ENHANCED Animated Background
   ======================================== */

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

/* Floating Orbs */
.bg-gradient::before,
.bg-gradient::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.bg-gradient::before {
  width: 600px;
  height: 600px;
  top: -200px;
  left: -100px;
  background: var(--orb-1);
  animation: orbFloat1 8s ease-in-out infinite;
}

.bg-gradient::after {
  width: 500px;
  height: 500px;
  bottom: -150px;
  right: -100px;
  background: var(--orb-2);
  animation: orbFloat2 10s ease-in-out infinite;
}

/* Third orb via extra element in HTML or pseudo on body */
.noise-overlay::before {
  content: '';
  position: fixed;
  width: 400px;
  height: 400px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--orb-3);
  border-radius: 50%;
  filter: blur(100px);
  animation: orbFloat3 12s ease-in-out infinite;
  z-index: -1;
}

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

@keyframes orbFloat2 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(-80px, -60px) scale(1.15);
  }
  66% {
    transform: translate(60px, -80px) scale(0.85);
  }
}

@keyframes orbFloat3 {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate(-30%, -70%) scale(1.3);
    opacity: 0.8;
  }
}

/* Animated Grid Pattern */
.bg-gradient .grid-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 20s linear infinite;
  opacity: 0.5;
}

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

/* Noise Overlay */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.04;
  pointer-events: none;
  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");
  animation: noiseShift 0.5s steps(10) infinite;
}

@keyframes noiseShift {
  0% { transform: translate(0, 0); }
  10% { transform: translate(-1%, -1%); }
  20% { transform: translate(1%, 1%); }
  30% { transform: translate(-1%, 1%); }
  40% { transform: translate(1%, -1%); }
  50% { transform: translate(-1%, 0); }
  60% { transform: translate(1%, 0); }
  70% { transform: translate(0, 1%); }
  80% { transform: translate(0, -1%); }
  90% { transform: translate(1%, 1%); }
  100% { transform: translate(0, 0); }
}

/* ========================================
   Floating Shapes (Added via JS)
   ======================================== */

.floating-shapes {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  border: 1px solid var(--accent);
  opacity: 0.2;
  animation: shapeFloat 15s ease-in-out infinite;
}

.shape--circle {
  border-radius: 50%;
}

.shape--square {
  border-radius: 4px;
}

.shape:nth-child(1) {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 12s;
}

.shape:nth-child(2) {
  width: 60px;
  height: 60px;
  top: 60%;
  right: 15%;
  animation-delay: -3s;
  animation-duration: 15s;
}

.shape:nth-child(3) {
  width: 40px;
  height: 40px;
  bottom: 20%;
  left: 30%;
  animation-delay: -6s;
  animation-duration: 18s;
}

.shape:nth-child(4) {
  width: 100px;
  height: 100px;
  top: 40%;
  right: 30%;
  animation-delay: -9s;
  animation-duration: 20s;
}

@keyframes shapeFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.15;
  }
  25% {
    transform: translateY(-30px) rotate(90deg);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-10px) rotate(180deg);
    opacity: 0.2;
  }
  75% {
    transform: translateY(-40px) rotate(270deg);
    opacity: 0.25;
  }
}

/* ========================================
   Theme Navigation
   ======================================== */

.theme-nav {
  position: fixed;
  top: var(--space-md);
  right: var(--space-md);
  z-index: 100;
  display: flex;
  gap: var(--space-xs);
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  padding: var(--space-xs);
  border-radius: 100px;
  border: 1px solid var(--border);
  animation: slideDown 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 0.2s;
  opacity: 0;
  transform: translateY(-20px);
}

@keyframes slideDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.theme-btn {
  font-family: inherit;
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 100px;
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}

.theme-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
  z-index: -1;
  border-radius: 100px;
}

.theme-btn:hover {
  color: var(--text-primary);
}

.theme-btn:hover::before {
  transform: scaleX(1);
}

.theme-btn.active {
  background: var(--text-primary);
  color: var(--bg-primary);
}

/* ========================================
   Header & Navigation
   ======================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: var(--space-md);
  z-index: 99;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.logo {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-style: italic;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  animation: logoReveal 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
  transform: translateX(-20px);
}

@keyframes logoReveal {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.logo:hover {
  color: var(--accent);
  text-shadow: 0 0 30px var(--accent-glow);
}

.nav {
  position: fixed;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.nav-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  transition: all var(--transition-fast);
  position: relative;
  opacity: 0;
  transform: translateX(-20px);
  animation: navReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.nav-link:nth-child(1) { animation-delay: 0.4s; }
.nav-link:nth-child(2) { animation-delay: 0.5s; }
.nav-link:nth-child(3) { animation-delay: 0.6s; }
.nav-link:nth-child(4) { animation-delay: 0.7s; }

@keyframes navReveal {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.nav-link .dot {
  font-size: 0.5rem;
  opacity: 0;
  transform: translateX(-10px) scale(0);
  transition: all var(--transition-fast);
  color: var(--accent);
}

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

.nav-link:hover .dot,
.nav-link.active .dot {
  opacity: 1;
  transform: translateX(0) scale(1);
}

/* Glowing line on active */
.nav-link.active::after {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 10px var(--accent-glow);
  }
  50% {
    opacity: 0.6;
    box-shadow: 0 0 20px var(--accent-glow), 0 0 40px var(--accent-glow);
  }
}

/* ========================================
   Sections Base
   ======================================== */

.section {
  min-height: 100vh;
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 400;
  font-style: italic;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-title.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Hero Section - ENHANCED ANIMATIONS
   ======================================== */

.hero {
  padding-left: calc(var(--space-xl) + 100px);
  position: relative;
}

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

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1;
  margin-bottom: var(--space-sm);
  overflow: hidden;
  position: relative;
}

.hero-title .line {
  display: block;
  opacity: 0;
  transform: translateY(120%) rotateX(-80deg);
  animation: heroReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: top;
}

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

/* Glowing effect on title */
.hero-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  animation: lineExpand 1s ease forwards 1s;
}

@keyframes lineExpand {
  to {
    transform: scaleX(1);
  }
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  opacity: 0;
  transform: translateY(20px);
  animation: subtitleReveal 0.8s ease forwards 0.8s;
  position: relative;
  display: inline-block;
}

@keyframes subtitleReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typing cursor effect */
.hero-subtitle::after {
  content: '|';
  position: absolute;
  right: -10px;
  animation: blink 1s step-end infinite;
  color: var(--accent);
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-bio {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.bio-line {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--text-secondary);
  opacity: 0;
  transform: translateX(-30px);
  animation: bioReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.bio-line:nth-child(1) { animation-delay: 1.0s; }
.bio-line:nth-child(2) { animation-delay: 1.1s; }
.bio-line:nth-child(3) { animation-delay: 1.2s; }
.bio-line:nth-child(4) { animation-delay: 1.3s; }
.bio-line:nth-child(5) { animation-delay: 1.4s; }
.bio-line:nth-child(6) { animation-delay: 1.5s; }
.bio-line:nth-child(7) { animation-delay: 1.6s; }
.bio-line:nth-child(8) { animation-delay: 1.7s; }
.bio-line:nth-child(9) { animation-delay: 1.8s; }
.bio-line:nth-child(10) { animation-delay: 1.9s; }

@keyframes bioReveal {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.bio-line.accent {
  color: var(--accent);
  font-weight: 500;
  text-shadow: 0 0 30px var(--accent-glow);
}

/* Scroll Indicator - ENHANCED */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-lg);
  right: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0;
  animation: fadeInUp 1s ease forwards 2.5s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
  }
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 20px;
  background: var(--accent);
  animation: scrollDown 1.5s ease-in-out infinite;
  box-shadow: 0 0 10px var(--accent-glow);
}

@keyframes scrollDown {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(300%);
    opacity: 0;
  }
}

/* ========================================
   Projects Section - ENHANCED
   ======================================== */

.projects {
  padding-left: calc(var(--space-xl) + 100px);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-md);
  max-width: 1400px;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  opacity: 0;
  transform: translateY(60px) scale(0.95);
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
  pointer-events: none;
}

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

.project-card.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Staggered reveal for cards */
.project-card:nth-child(1).revealed { transition-delay: 0s; }
.project-card:nth-child(2).revealed { transition-delay: 0.1s; }
.project-card:nth-child(3).revealed { transition-delay: 0.2s; }
.project-card:nth-child(4).revealed { transition-delay: 0.3s; }
.project-card:nth-child(5).revealed { transition-delay: 0.4s; }
.project-card:nth-child(6).revealed { transition-delay: 0.5s; }

.project-card:hover {
  background: var(--card-hover);
  transform: translateY(-12px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 30px var(--accent-glow);
}

.project-image {
  aspect-ratio: 16/10;
  background: var(--bg-tertiary);
  overflow: hidden;
  position: relative;
}

.project-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-primary), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.project-card:hover .project-image::after {
  opacity: 0.5;
}

.project-placeholder {
  width: 100%;
  height: 100%;
  background-color: var(--bg-tertiary);
  background-image: radial-gradient(var(--text-muted) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
  opacity: 0.4;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-placeholder {
  opacity: 0.7;
  background-image: radial-gradient(var(--accent) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  animation: polkaShift 0.5s ease forwards;
}

@keyframes polkaShift {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 10px 10px;
  }
}

.project-info {
  padding: var(--space-md);
  position: relative;
  z-index: 2;
}

.project-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  margin-bottom: var(--space-xs);
  transition: color 0.3s ease;
}

.project-card:hover .project-title {
  color: var(--accent);
}

.project-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========================================
   About Section - ENHANCED
   ======================================== */

.about {
  padding-left: calc(var(--space-xl) + 100px);
}

.about-content {
  max-width: 1000px;
}

.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-lg);
}

.about-text {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-text.revealed {
  opacity: 1;
  transform: translateY(0);
}

.about-text p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

/* CV Download Button */
.cv-download-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  margin-top: var(--space-md);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.cv-download-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.cv-download-btn:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cv-download-btn:hover::before {
  opacity: 1;
}

.cv-download-btn .btn-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.cv-download-btn:hover .btn-icon {
  transform: translateY(3px);
}

.cv-download-btn .btn-text {
  position: relative;
  z-index: 1;
}

.about-skills {
  opacity: 0;
  transform: translateX(40px);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.about-skills.revealed {
  opacity: 1;
  transform: translateX(0);
}

.about-skills h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.skills-list li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.3s ease;
  position: relative;
  padding-left: 0;
}

.skills-list li::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.5s ease;
}

.skills-list li:hover {
  color: var(--accent);
  padding-left: 10px;
}

.skills-list li:hover::before {
  width: 100%;
}

/* ========================================
   Contact Section - ENHANCED
   ======================================== */

.contact {
  padding-left: calc(var(--space-xl) + 100px);
}

.contact-content {
  max-width: 800px;
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-content.revealed {
  opacity: 1;
  transform: translateY(0);
}

.contact-text {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.contact-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.contact-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.4s ease;
}

.contact-link:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  transform: translateX(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.contact-link:hover::before {
  transform: scaleY(1);
}

.link-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.link-value {
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.contact-link:hover .link-value {
  color: var(--accent);
}

/* ========================================
   Contact Form
   ======================================== */

.contact-content {
  max-width: 1200px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-group {
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
  transition: color 0.3s ease;
}

.form-group:focus-within .form-label {
  color: var(--accent);
}

.form-input {
  width: 100%;
  padding: var(--space-md);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
}

.form-input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.form-input:focus {
  border-color: var(--accent);
  background: var(--card-hover);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

/* Animated focus line */
.input-focus {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 0 8px 8px;
}

.form-group:focus-within .input-focus {
  transform: scaleX(1);
}

/* Submit Button */
.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  align-self: flex-start;
}

.form-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.form-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px var(--accent-glow);
}

.form-submit:hover::before {
  transform: translateX(100%);
}

.form-submit:active {
  transform: translateY(-1px);
}

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

.form-submit:hover .btn-icon {
  transform: translateX(5px);
}

/* Form Status Message */
.form-status {
  font-size: 0.9rem;
  padding: var(--space-sm);
  border-radius: 6px;
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(66, 240, 196, 0.1);
  color: var(--accent-secondary);
  border: 1px solid var(--accent-secondary);
}

.form-status.error {
  display: block;
  background: rgba(240, 66, 66, 0.1);
  color: #f04242;
  border: 1px solid #f04242;
}

/* Contact Sidebar */
.contact-sidebar {
  position: sticky;
  top: var(--space-xl);
}

.sidebar-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

/* Responsive Form */
@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .contact-sidebar {
    position: static;
  }
}

/* ========================================
   Footer
   ======================================== */

.footer {
  padding: var(--space-lg);
  padding-left: calc(var(--space-xl) + 100px);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ========================================
   Cursor Follower (optional via JS)
   ======================================== */

.cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease, opacity 0.3s ease;
  mix-blend-mode: difference;
}

.cursor.hover {
  transform: scale(2);
  background: var(--accent);
  opacity: 0.5;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
  .nav {
    position: fixed;
    left: 0;
    right: 0;
    top: auto;
    bottom: var(--space-md);
    transform: none;
    display: flex;
    justify-content: center;
  }
  
  .nav-list {
    flex-direction: row;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: var(--space-sm);
    border-radius: 100px;
    border: 1px solid var(--border);
  }
  
  .nav-link .dot {
    display: none;
  }
  
  .nav-link.active::after {
    display: none;
  }
  
  .hero,
  .projects,
  .about,
  .contact,
  .footer {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }
  
  .theme-nav {
    top: auto;
    bottom: calc(var(--space-md) + 60px);
    left: 0;
    right: 0;
    margin: 0 auto;
    width: fit-content;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: clamp(1.75rem, 8vw, 3rem);
  }
  
  .about-grid {
    grid-template-columns: 1fr;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .section {
    padding: var(--space-lg) var(--space-md);
  }
  
  .scroll-indicator {
    display: none;
  }
  
  .floating-shapes {
    display: none;
  }
}

@media (max-width: 480px) {
  .theme-nav {
    left: 0;
    right: 0;
    margin: 0 auto;
    width: fit-content;
  }
  
  .contact-link {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }
}

/* ========================================
   Selection & Scrollbar
   ======================================== */

::selection {
  background: var(--accent);
  color: var(--bg-primary);
}

::-webkit-scrollbar {
  width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

/* ========================================
   Page Load Animation
   ======================================== */

.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: loaderFade 0.5s ease forwards 2s;
}

.page-loader::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes loaderFade {
  to {
    opacity: 0;
    visibility: hidden;
  }
}
