/* ===========================
   CSS Variables & Reset
   =========================== */
:root {
  --bg: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #16161f;
  --text: #e8e8ed;
  --text-muted: #8888a0;
  --accent: #6c63ff;
  --accent-light: #8b83ff;
  --accent-glow: rgba(108, 99, 255, 0.3);
  --gradient-1: linear-gradient(135deg, #6c63ff, #3b82f6);
  --gradient-2: linear-gradient(135deg, #f472b6, #6c63ff);
  --border: rgba(255, 255, 255, 0.06);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
}

/* ===========================
   Light Theme
   =========================== */
[data-theme="light"] {
  --bg: #fafafa;
  --bg-secondary: #f0f0f5;
  --bg-card: #ffffff;
  --text: #0f0f1a;
  --text-muted: #4a4a68;
  --accent: #4f46e5;
  --accent-light: #6366f1;
  --accent-glow: rgba(79, 70, 229, 0.18);
  --gradient-1: linear-gradient(135deg, #4f46e5, #2563eb);
  --gradient-2: linear-gradient(135deg, #ec4899, #4f46e5);
  --border: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .noise { opacity: 0.02; }
[data-theme="light"] .loader { background: var(--bg); }
[data-theme="light"] .cursor { mix-blend-mode: normal; }
[data-theme="light"] .cursor-follower { border-color: var(--accent); opacity: 0.35; }
[data-theme="light"] .nav { background: rgba(250,250,250,0.82); border-bottom-color: rgba(0,0,0,0.05); box-shadow: 0 1px 12px rgba(0,0,0,0.04); }
[data-theme="light"] .nav.scrolled { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
[data-theme="light"] .nav-menu-btn span { background: var(--text); }
[data-theme="light"] .mobile-menu { background: rgba(250,250,250,0.97); }
[data-theme="light"] .hero-name-first, [data-theme="light"] .hero-name-last {
  background: linear-gradient(135deg, #4f46e5, #2563eb, #7c3aed);
  -webkit-background-clip: text; background-clip: text;
}
[data-theme="light"] .hero-side-text { color: rgba(0,0,0,0.06); }
[data-theme="light"] .marquee { background: var(--bg-secondary); border-color: rgba(0,0,0,0.04); }
[data-theme="light"] .btn-primary { box-shadow: 0 8px 30px rgba(79,70,229,0.15); }
[data-theme="light"] .btn-ghost { color: var(--text); border-color: rgba(0,0,0,0.12); background: rgba(0,0,0,0.02); }
[data-theme="light"] .btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
[data-theme="light"] .about-image-frame { border-color: rgba(0,0,0,0.06); box-shadow: 0 12px 40px rgba(0,0,0,0.08); }
[data-theme="light"] .about-image-placeholder { background: linear-gradient(135deg, #e8e8f0, #f5f5fa); color: #b0b0c8; }
[data-theme="light"] .about-image-decoration { border-color: var(--accent); opacity: 0.15; }
[data-theme="light"] .about-stats { border-top-color: rgba(0,0,0,0.06); }
[data-theme="light"] .stat { background: var(--bg-card); border-color: rgba(0,0,0,0.05); box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
[data-theme="light"] .stat:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
[data-theme="light"] .about-detail { background: var(--bg-card); border-color: rgba(0,0,0,0.05); box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
[data-theme="light"] .about-detail:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); border-color: rgba(79,70,229,0.15); }
[data-theme="light"] .about-detail strong { color: var(--text); }
[data-theme="light"] .skill-card { background: var(--bg-card); border-color: rgba(0,0,0,0.05); box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
[data-theme="light"] .skill-card:hover { box-shadow: 0 0 0 1px rgba(79,70,229,0.15), 0 12px 40px rgba(0,0,0,0.08); border-color: rgba(79,70,229,0.15); }
[data-theme="light"] .skill-tags span { background: rgba(79,70,229,0.06); color: var(--accent); border-color: rgba(79,70,229,0.1); }
[data-theme="light"] .skill-bar { background: rgba(0,0,0,0.06); }
[data-theme="light"] .project-card { border-color: rgba(0,0,0,0.05); box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
[data-theme="light"] .project-card:hover { box-shadow: 0 0 0 1px rgba(79,70,229,0.15), 0 12px 40px rgba(0,0,0,0.08); }
[data-theme="light"] .project-overlay { background: rgba(255,255,255,0.9); backdrop-filter: blur(4px); }
[data-theme="light"] .project-link { color: var(--text); border-color: rgba(0,0,0,0.15); }
[data-theme="light"] .project-link:hover { background: rgba(79,70,229,0.08); border-color: var(--accent); color: var(--accent); }
[data-theme="light"] .project-tech span { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .timeline::before { background: rgba(0,0,0,0.08); }
[data-theme="light"] .timeline-dot { background: var(--bg); }
[data-theme="light"] .timeline-content { background: var(--bg-card); border-color: rgba(0,0,0,0.05); box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
[data-theme="light"] .timeline-item:hover .timeline-content { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
[data-theme="light"] .timeline-item:hover .timeline-dot { box-shadow: 0 0 16px var(--accent-glow); }
[data-theme="light"] .form-group input, [data-theme="light"] .form-group textarea { border-bottom-color: rgba(0,0,0,0.1); color: var(--text); }
[data-theme="light"] .social-link { border-color: rgba(0,0,0,0.1); color: var(--text-muted); }
[data-theme="light"] .social-link:hover { box-shadow: 0 8px 20px rgba(79,70,229,0.15); }
[data-theme="light"] .footer { border-top-color: rgba(0,0,0,0.06); }
[data-theme="light"] .section-title::after { background: rgba(0,0,0,0.08); }
[data-theme="light"] .back-to-top { background: var(--bg-card); border-color: rgba(0,0,0,0.08); box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
[data-theme="light"] .scroll-progress { background: var(--gradient-1); }
[data-theme="light"] .theme-toggle { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .theme-toggle:hover { background: rgba(79,70,229,0.08); border-color: var(--accent); color: var(--accent); }
[data-theme="light"] .theme-icon.sun { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .theme-icon.moon { opacity: 0; transform: rotate(90deg) scale(0.5); }
[data-theme="light"] .shape { opacity: 0.06; }

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg);
}

body {
  font-family: var(--font-primary);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
  transition: background 0.5s ease, color 0.5s ease;
}

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

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

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===========================
   Noise Overlay
   =========================== */
.noise {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}

/* ===========================
   Scroll Progress
   =========================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--gradient-1);
  z-index: 10001;
  transition: none;
}

/* ===========================
   Custom Cursor
   =========================== */
.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
  mix-blend-mode: difference;
}

.cursor-follower {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
  opacity: 0.5;
}

/* ===========================
   Loader
   =========================== */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.8s, visibility 0.8s;
}

.loader.hidden { opacity: 0; visibility: hidden; transition: opacity 1s cubic-bezier(0.4,0,0,1), visibility 1s; }

.loader-counter {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.15;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-variant-numeric: tabular-nums;
}

.loader-text { display: flex; gap: 4px; position: relative; z-index: 1; }

.loader-letter {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0;
  transform: translateY(40px);
  animation: loaderLetterIn 0.5s forwards;
  animation-delay: calc(var(--i) * 0.1s);
}

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

.loader-bar { width: 200px; height: 2px; background: var(--border); border-radius: 2px; overflow: hidden; }

.loader-bar-fill {
  height: 100%;
  width: 0;
  background: var(--gradient-1);
  border-radius: 2px;
}

/* ===========================
   Navigation
   =========================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transform: translateY(-100%);
  animation: navSlideIn 0.6s 2.8s forwards;
  transition: padding 0.3s, box-shadow 0.3s, background 0.3s;
}

@keyframes navSlideIn { to { transform: translateY(0); } }

.nav.scrolled { padding: 14px 40px; box-shadow: 0 4px 30px rgba(0,0,0,0.3); }

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.nav-logo span { color: var(--accent); }

.nav-links { display: flex; gap: 32px; }

.nav-link {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-link:hover { color: var(--accent); }
.nav-link:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 16px; }

/* Theme Toggle */
.theme-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  transition: all var(--transition);
  cursor: none;
  overflow: hidden;
}

.theme-toggle:hover { border-color: var(--accent); color: var(--accent); background: rgba(108, 99, 255, 0.1); transform: rotate(15deg); }

.theme-icon {
  width: 20px;
  height: 20px;
  position: absolute;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-icon.sun { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.theme-icon.moon { opacity: 1; transform: rotate(0) scale(1); }

.nav-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}

.nav-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-menu-btn.active span:nth-child(2) { opacity: 0; }
.nav-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.mobile-menu.active { opacity: 1; visibility: visible; }

.mobile-link {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
}

.mobile-menu.active .mobile-link { opacity: 1; transform: translateY(0); }
.mobile-menu.active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.active .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu.active .mobile-link:nth-child(5) { transition-delay: 0.3s; }
.mobile-link:hover { color: var(--accent); }

/* ===========================
   Hero Section
   =========================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 40px 80px;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Floating shapes */
.hero-shapes { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.shape {
  position: absolute;
  border: 1px solid rgba(108, 99, 255, 0.15);
  opacity: 0.12;
  animation: shapeFloat 20s infinite ease-in-out;
}

.shape-1 {
  width: 300px; height: 300px;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  top: 10%; right: 10%;
  animation-duration: 18s;
}

.shape-2 {
  width: 200px; height: 200px;
  border-radius: 50%;
  bottom: 20%; left: 8%;
  animation-duration: 22s;
  animation-delay: -5s;
}

.shape-3 {
  width: 150px; height: 150px;
  border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%;
  top: 60%; right: 20%;
  animation-duration: 25s;
  animation-delay: -10s;
}

.shape-4 {
  width: 80px; height: 80px;
  border-radius: 50%;
  top: 25%; left: 15%;
  border-color: rgba(244, 114, 182, 0.15);
  animation-duration: 15s;
  animation-delay: -3s;
}

.shape-5 {
  width: 120px; height: 120px;
  border-radius: 30% 70% 50% 50% / 50% 30% 70% 50%;
  bottom: 30%; right: 35%;
  animation-duration: 28s;
  animation-delay: -8s;
}

@keyframes shapeFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(30px, -40px) rotate(90deg); }
  50% { transform: translate(-20px, 20px) rotate(180deg); }
  75% { transform: translate(15px, -15px) rotate(270deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-greeting {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* FIXED: gradient applied to each text span individually */
.hero-name {
  font-family: var(--font-display);
  margin-bottom: 20px;
}

.hero-name-first {
  display: block;
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -3px;
  background: var(--gradient-1);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s linear infinite alternate;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.hero-name-last {
  display: block;
  font-size: clamp(1.2rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 1px;
  margin-top: 8px;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.75;
}

/* Typed text effect */
.hero-typed-wrapper {
  display: flex;
  align-items: center;
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 24px;
  height: 36px;
}

.hero-typed-prefix { opacity: 0.5; margin-right: 4px; }

.hero-typed-cursor {
  animation: cursorBlink 0.8s infinite;
  margin-left: 2px;
  font-weight: 300;
}

@keyframes cursorBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* Side text decoration */
.hero-side-text {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 6px;
  color: rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 60px;
  border: none;
  cursor: none;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-1);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0) 70%,
    transparent 100%
  );
  transition: left 0.6s ease;
  pointer-events: none;
}

.btn-primary:hover::after {
  left: 120%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeInUp 0.6s 3.2s forwards;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.5; transform: scaleY(0.6); }
}

.hero-scroll-indicator span {
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ===========================
   Marquee
   =========================== */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 18px 0;
  position: relative;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track {
  display: flex;
  gap: 40px;
  align-items: center;
  white-space: nowrap;
  animation: marqueeScroll 30s linear infinite;
  width: max-content;
}

.marquee-track span {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  flex-shrink: 0;
}

.marquee-dot {
  width: 6px !important;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

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

/* ===========================
   Sections Common
   =========================== */
.section {
  padding: 120px 0;
  position: relative;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  height: 1px;
  background: radial-gradient(ellipse at center, var(--border) 0%, transparent 70%);
  pointer-events: none;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  max-width: 300px;
}

.section-number {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
}

/* ===========================
   About Section
   =========================== */
.about-grid {
  display: grid;
  /* Change to "1fr 1.5fr" when adding the image back */
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

.about-image { position: relative; }

.about-image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.about-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  color: var(--text-muted);
}

.about-image-decoration {
  position: absolute;
  top: 20px;
  left: 20px;
  right: -20px;
  bottom: -20px;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  z-index: -1;
  opacity: 0.3;
  transition: all var(--transition);
}

.about-image:hover .about-image-decoration { top: 12px; left: 12px; opacity: 0.6; }

.about-lead {
  font-size: 1.35rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 40px;
  max-width: 700px;
}

.about-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 8px;
}

.about-detail {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.about-detail:hover {
  border-color: rgba(108, 99, 255, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.about-detail h4 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.about-detail p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}

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

.about-text p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.about-stats.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  column-span: all;
}

.stat {
  text-align: center;
  padding: 24px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.stat:hover {
  transform: translateY(-4px);
  border-color: rgba(108, 99, 255, 0.2);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-plus {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===========================
   Skills Section
   =========================== */
.skills { background: var(--bg-secondary); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-card:hover::before { transform: scaleX(1); }

.skill-card:hover {
  transform: translateY(-4px);
  border-color: rgba(108, 99, 255, 0.2);
  box-shadow: 0 0 0 1px rgba(108, 99, 255, 0.15), 0 12px 40px rgba(0, 0, 0, 0.3);
}

.skill-icon { width: 48px; height: 48px; margin-bottom: 20px; color: var(--accent); }
.skill-icon svg { width: 100%; height: 100%; }

.skill-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
}

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

.skill-tags span {
  padding: 4px 14px;
  background: rgba(108, 99, 255, 0.1);
  color: var(--accent-light);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(108, 99, 255, 0.15);
}

.skill-bar { height: 4px; background: var(--border); border-radius: 4px; overflow: hidden; }

.skill-bar-fill {
  height: 100%;
  width: 0;
  background: var(--gradient-1);
  border-radius: 4px;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================
   Projects Section
   =========================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(108, 99, 255, 0.2);
  box-shadow: 0 0 0 1px rgba(108, 99, 255, 0.15), 0 12px 40px rgba(0, 0, 0, 0.3);
}

.project-image {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.project-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, hsla(var(--hue),60%,20%,1), hsla(var(--hue),40%,10%,1));
  color: hsla(var(--hue),60%,60%,0.6);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-image-placeholder { transform: scale(1.05); }

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  transition: opacity var(--transition);
}

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

.project-link {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--text-muted);
  border-radius: 50%;
  color: var(--text);
  transition: all var(--transition);
  transform: translateY(10px);
}

.project-card:hover .project-link { transform: translateY(0); }
.project-link:hover { border-color: var(--accent); color: var(--accent); background: rgba(108, 99, 255, 0.1); }

.project-info { padding: 28px; }

.project-category {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.project-info h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 8px 0 12px;
}

.project-info p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 16px; }

.project-tech { display: flex; flex-wrap: wrap; gap: 8px; }

.project-tech span {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
}

/* ===========================
   Experience / Timeline
   =========================== */
.timeline { position: relative; padding-left: 40px; }

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline.visible::before {
  transform: scaleY(1);
}

.timeline-item { position: relative; margin-bottom: 48px; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -40px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  z-index: 1;
  transition: all var(--transition);
}

.timeline-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  transform: scale(1);
}

@keyframes dotPulse {
  0% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}

.timeline-item:hover .timeline-dot { background: var(--accent); box-shadow: 0 0 20px var(--accent-glow); }

.timeline-item:hover .timeline-dot::after {
  animation: dotPulse 1.2s ease-in-out infinite;
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
}

.timeline-item:hover .timeline-content { border-color: rgba(108, 99, 255, 0.2); transform: translateX(8px); }

.timeline-date { font-size: 0.82rem; font-weight: 600; color: var(--accent); letter-spacing: 1px; }

.timeline-content h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 8px 0 4px;
}

.timeline-company { color: var(--text-muted); font-weight: 500; margin-bottom: 12px; }

.timeline-content p:last-child { color: var(--text-muted); font-size: 0.95rem; }

/* ===========================
   Contact Section
   =========================== */
.contact { background: var(--bg-secondary); }
.contact-content { max-width: 700px; margin: 0 auto; }

.contact-text { text-align: center; color: var(--text-muted); font-size: 1.1rem; margin-bottom: 48px; }

.contact-form { display: flex; flex-direction: column; gap: 28px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }

.form-group { position: relative; }

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 16px 0 8px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-primary);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.1);
}

.form-group label {
  position: absolute;
  top: 16px;
  left: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: all var(--transition);
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
  top: -8px;
  font-size: 0.75rem;
  color: var(--accent);
}

.form-line {
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:focus ~ .form-line,
.form-group textarea:focus ~ .form-line { width: 100%; }

.contact-form .btn { align-self: center; margin-top: 16px; }

.contact-socials {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.social-link {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  transition: all var(--transition);
}

.social-link svg { width: 20px; height: 20px; }

.social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px var(--accent-glow);
}

/* ===========================
   Footer
   =========================== */
.footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer p { font-size: 0.9rem; color: var(--text-muted); }
.footer strong { color: var(--accent); }
.footer-note { font-size: 0.8rem; margin-top: 4px; opacity: 0.6; }

/* ===========================
   Back to Top
   =========================== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--accent);
  z-index: 100;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition);
  cursor: none;
}

.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--accent); color: #fff; transform: translateY(-4px); box-shadow: 0 8px 24px var(--accent-glow); }

/* ===========================
   Animations
   =========================== */
.anim-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: calc(var(--stagger, 0) * 0.1s);
}

.anim-reveal.visible { opacity: 1; transform: translateY(0); }

/* Magnetic effect class */
.magnetic { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

/* ===========================
   Side Navigation Dots
   =========================== */
.side-nav {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  transition: opacity 0.4s;
}

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

.side-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: none;
}

.side-dot span {
  position: absolute;
  right: 24px;
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition: all 0.3s;
  pointer-events: none;
}

.side-dot:hover span {
  opacity: 1;
  transform: translateX(0);
}

.side-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.3);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ===========================
   Click Ripple Effect
   =========================== */
.ripple-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
}

.ripple {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.3), transparent 70%);
  transform: translate(-50%, -50%) scale(0);
  animation: rippleExpand 0.6s ease-out forwards;
}

@keyframes rippleExpand {
  to { transform: translate(-50%, -50%) scale(12); opacity: 0; }
}

/* ===========================
   Mouse Gradient Follower
   =========================== */
.mouse-gradient {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.04), transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

[data-theme="light"] .mouse-gradient {
  background: radial-gradient(circle, rgba(79, 70, 229, 0.03), transparent 70%);
}

/* ===========================
   Project Filters
   =========================== */
.project-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 500;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 30px;
  cursor: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}

[data-theme="light"] .filter-btn {
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--text-muted);
}

[data-theme="light"] .filter-btn.active {
  background: var(--accent);
  color: #fff;
}

.project-card.filtered-out {
  display: none;
}

/* ===========================
   Animated Gradient Border Cards
   =========================== */
.skill-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: conic-gradient(from var(--card-angle, 0deg), transparent 40%, var(--accent) 50%, transparent 60%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s;
}

.skill-card:hover::after {
  opacity: 0.15;
}

/* ===========================
   Section Text Scramble Titles
   =========================== */
.section-title .scramble-text {
  display: inline-block;
}

/* ===========================
   Smooth Section Reveal Line
   =========================== */
.section-title::after {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

.section-title.visible::after {
  transform: scaleX(1);
}

/* ===========================
   Enhanced Footer
   =========================== */
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.3s;
}

.footer-links a:hover { color: var(--accent); }

/* ===========================
   Presentations Password Modal
   =========================== */
.pres-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10002;
  background: rgba(6, 6, 11, 0.85);
  backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pres-modal-overlay.active {
  display: flex;
  animation: modalFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pres-modal {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 44px 36px;
  text-align: center;
  position: relative;
  animation: modalSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.pres-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: none;
  transition: all 0.3s;
}

.pres-modal-close:hover {
  color: var(--text);
  border-color: var(--text-muted);
}


.pres-modal-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.pres-modal-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 28px;
}

.pres-modal-input-wrap {
  position: relative;
  margin-bottom: 16px;
}

.pres-modal-input {
  width: 100%;
  padding: 14px 44px 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s;
}

.pres-modal-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.pres-modal-input::placeholder { color: var(--text-muted); }


.pres-modal-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent), #3b82f6);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.pres-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.pres-modal-error {
  color: #ef4444;
  font-size: 0.82rem;
  margin-top: 14px;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.3s;
}

.pres-modal-error.show {
  opacity: 1;
  transform: translateY(0);
}

/* Nav link accent for presentations */
.nav-link-pres {
  color: var(--accent) !important;
  position: relative;
}

.nav-link-pres::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
  top: -2px;
  right: -6px;
  animation: pulse 2s infinite;
}

/* Light theme */
[data-theme="light"] .pres-modal-overlay { background: rgba(245, 245, 247, 0.85); }
[data-theme="light"] .pres-modal { background: var(--bg-card); box-shadow: 0 24px 80px rgba(0,0,0,0.12); }
[data-theme="light"] .pres-modal-input { border-color: rgba(0,0,0,0.08); }

/* ===========================
   Responsive
   =========================== */
@media (max-width: 1024px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  body { cursor: auto; }
  .cursor, .cursor-follower { display: none; }

  .nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .nav-menu-btn { display: flex; }

  .hero { padding: 100px 20px 60px; }
  .hero-name-first { letter-spacing: -1px; }
  .hero-side-text { display: none; }

  .section { padding: 80px 0; }
  .section-title { font-size: 1.8rem; margin-bottom: 40px; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-details { grid-template-columns: 1fr; }
  .about-image-frame { max-width: 300px; margin: 0 auto; }
  .about-stats { grid-template-columns: repeat(3, 1fr); gap: 16px; }

  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }

  .form-row { grid-template-columns: 1fr; }
  .timeline { padding-left: 32px; }

  .side-nav { display: none; }
  .project-filters { justify-content: center; }
}

@media (max-width: 480px) {
  .about-stats { grid-template-columns: 1fr; }
  .stat { border-bottom: 1px solid var(--border); padding-bottom: 16px; }
  .stat:last-child { border-bottom: none; padding-bottom: 0; }
}
