/* ============================================
   CYBERPUNK PORTFOLIO — Design System
   Premium Dynamic Overhaul
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Cyberpunk Palette */
  --bg-primary: #0a0a0f;
  --bg-secondary: #0d0d1a;
  --bg-card: rgba(17, 17, 34, 0.7);
  --bg-card-solid: #111122;
  --bg-card-hover: #161633;

  --neon-cyan: #00f0ff;
  --neon-magenta: #ff00e6;
  --neon-purple: #7b2ff7;
  --neon-pink: #ff2d95;
  --neon-green: #39ff14;
  --neon-yellow: #f0ff00;

  --text-primary: #e0e0e8;
  --text-secondary: #8888aa;
  --text-muted: #555577;

  --border-color: rgba(26, 26, 51, 0.8);
  --border-glow: rgba(0, 240, 255, 0.15);

  /* Typography */
  --font-heading: 'Orbitron', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --section-padding: 100px 0;
  --container-width: 1100px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-med: 0.4s ease;
  --transition-slow: 0.6s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

ul { list-style: none; }

img { max-width: 100%; display: block; }

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

/* --- Cursor Glow Follower --- */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.06) 0%, rgba(123, 47, 247, 0.03) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

/* --- Scanline Overlay --- */
.scanline-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 240, 255, 0.012) 2px,
    rgba(0, 240, 255, 0.012) 4px
  );
}

/* --- Particle Canvas --- */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  /* GPU Acceleration for smooth particle animation */
  transform: translateZ(0);
  will-change: transform;
}

/* --- Section Base --- */
.section {
  padding: var(--section-padding);
  position: relative;
  z-index: 1;
  contain: layout style;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin-bottom: 60px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 16px;
  will-change: transform;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  max-width: 300px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta), transparent);
  background-size: 200% 100%;
  animation: gradient-sweep 4s ease infinite;
}

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

.section-number {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--neon-cyan);
  font-weight: 400;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
  animation: number-glow 3s ease-in-out infinite;
}

@keyframes number-glow {
  0%, 100% { text-shadow: 0 0 8px rgba(0, 240, 255, 0.5); }
  50% { text-shadow: 0 0 16px rgba(0, 240, 255, 0.8), 0 0 32px rgba(0, 240, 255, 0.3); }
}

.highlight {
  color: var(--neon-cyan);
}

/* --- Section Divider --- */
.section-divider {
  width: 100%;
  height: 1px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.section-divider::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-magenta), transparent);
  animation: divider-flow 6s linear infinite;
}

@keyframes divider-flow {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--transition-med);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid var(--border-glow);
  padding: 12px 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 2px;
  transition: text-shadow var(--transition-med);
}

.nav-logo:hover {
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

.logo-bracket {
  color: var(--neon-cyan);
}

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

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  position: relative;
  padding: 4px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan), 0 0 20px rgba(0, 240, 255, 0.3);
  transition: width var(--transition-med);
}

.nav-link:hover,
.nav-link.active {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

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

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background: var(--neon-cyan);
  transition: all var(--transition-fast);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(0, 240, 255, 0.4);
}

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

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

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

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  position: relative;
  z-index: 1;
  padding: 120px 24px 80px;
  max-width: var(--container-width);
  margin: 0 auto;
}

/* Ambient glow orbs */
.hero-glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: orb-float 8s ease-in-out infinite;
}

.hero-glow-orb:nth-child(1) {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.12) 0%, transparent 70%);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.hero-glow-orb:nth-child(2) {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 0, 230, 0.1) 0%, transparent 70%);
  bottom: 15%;
  right: 10%;
  animation-delay: -3s;
  animation-duration: 10s;
}

.hero-glow-orb:nth-child(3) {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(123, 47, 247, 0.08) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -5s;
  animation-duration: 12s;
}

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

.hero-glow-orb:nth-child(3) {
  animation-name: orb-float-center;
}

@keyframes orb-float-center {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  25% { transform: translate(-45%, -55%) scale(1.08); }
  50% { transform: translate(-55%, -45%) scale(0.92); }
  75% { transform: translate(-48%, -52%) scale(1.05); }
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 2; /* Above the portrait */
  padding-right: 40px; /* Leave space if it overlaps too much */
}

/* ---- Hero Portrait Background ---- */
.hero-portrait-bg {
  position: absolute;
  right: -15vw; /* Push significantly more to the right */
  bottom: 5vh; /* Shifted a few cm to the top */
  height: 90vh; /* Scaled to fit naturally */
  width: 50vw;
  max-width: 800px;
  z-index: 1; /* Behind the text */
  pointer-events: none; /* Ignore pointer events on the square bounding box */
  opacity: 0;
  /* GPU Acceleration for smooth reveal */
  transform: translateZ(0);
  will-change: transform, opacity;
  animation: fadeInRightBg 1.5s ease 1s forwards;
  
  /* Smooth radial mask to completely melt all edges (including the right) into darkness */
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}



@keyframes fadeInRightBg {
  from {
    opacity: 0;
    transform: translate3d(40px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.hero-portrait-bg-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right bottom; /* Pin to the bottom right corner */
  
  /* Natural blending using the actual background canvas */
  mix-blend-mode: screen; 
  opacity: 0.92; /* Increased opacity makes the image look much crisper and higher quality */
  /* Higher contrast for sharpness, slight warmth (less grayscale) to make the face look alive */
  filter: grayscale(0.85) contrast(1.15) brightness(0.95);
  
  /* Smooth, elegant transition for the hover effect */
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, filter, opacity;
}

/* Hover Animation: Portrait "wakes up" and floats slightly */
.hero-portrait-bg.is-hovered .hero-portrait-bg-img {
  transform: scale(1.02) translateY(-8px);
  opacity: 1; /* Fully solid */
  /* Pulls back grayscale slightly to reveal life, boosts brightness, adds faint cyber glow */
  filter: grayscale(0.4) contrast(1.2) brightness(1.05) drop-shadow(0 0 25px rgba(0, 240, 255, 0.2));
}


.hero-greeting {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--neon-cyan);
  margin-bottom: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

/* Glitch Text Effect — Enhanced */
.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 10vw, 5.5rem);
  font-weight: 900;
  letter-spacing: 6px;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
  text-shadow:
    0 0 10px rgba(0, 240, 255, 0.3),
    0 0 40px rgba(0, 240, 255, 0.1);
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.4s forwards, name-breathe 4s ease-in-out 1.2s infinite;
}

@keyframes name-breathe {
  0%, 100% {
    text-shadow:
      0 0 10px rgba(0, 240, 255, 0.3),
      0 0 40px rgba(0, 240, 255, 0.1);
  }
  50% {
    text-shadow:
      0 0 20px rgba(0, 240, 255, 0.5),
      0 0 60px rgba(0, 240, 255, 0.2),
      0 0 100px rgba(0, 240, 255, 0.08);
  }
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.glitch::before {
  animation: glitch-1 3s infinite linear alternate-reverse;
  color: var(--neon-cyan);
  z-index: -1;
  clip-path: inset(0 0 65% 0);
}

.glitch::after {
  animation: glitch-2 3s infinite linear alternate-reverse;
  color: var(--neon-magenta);
  z-index: -2;
  clip-path: inset(35% 0 0 0);
}

@keyframes glitch-1 {
  0%, 85%, 100% { transform: translate(0); opacity: 0.8; }
  86% { transform: translate(-5px, 3px); clip-path: inset(10% 0 80% 0); opacity: 1; }
  88% { transform: translate(5px, -3px); clip-path: inset(50% 0 30% 0); opacity: 1; }
  90% { transform: translate(-3px, -3px); clip-path: inset(20% 0 60% 0); opacity: 1; }
  92% { transform: translate(3px, 3px); clip-path: inset(70% 0 5% 0); opacity: 1; }
  94% { transform: translate(0); clip-path: inset(0 0 65% 0); opacity: 0.8; }
}

@keyframes glitch-2 {
  0%, 85%, 100% { transform: translate(0); opacity: 0.8; }
  87% { transform: translate(4px, -2px); clip-path: inset(60% 0 10% 0); opacity: 1; }
  89% { transform: translate(-4px, 2px); clip-path: inset(30% 0 50% 0); opacity: 1; }
  91% { transform: translate(2px, 4px); clip-path: inset(5% 0 70% 0); opacity: 1; }
  93% { transform: translate(-2px, -4px); clip-path: inset(40% 0 40% 0); opacity: 1; }
  95% { transform: translate(0); clip-path: inset(35% 0 0 0); opacity: 0.8; }
}

/* Typewriter */
.hero-title-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 16px 0 24px;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.6s forwards;
}

.hero-title-prefix {
  color: var(--neon-green);
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
}

.hero-title {
  color: var(--neon-magenta);
  min-height: 1.5em;
}

.cursor {
  color: var(--neon-cyan);
  animation: blink-glow 0.8s infinite;
  font-weight: 300;
}

@keyframes blink-glow {
  0%, 100% { opacity: 1; text-shadow: 0 0 8px var(--neon-cyan), 0 0 16px rgba(0, 240, 255, 0.4); }
  50% { opacity: 0; text-shadow: none; }
}

.hero-summary {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 0 40px;
  line-height: 1.8;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.8s forwards;
}

/* CTA Buttons */
.hero-cta {
  display: flex;
  gap: 20px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 1s forwards;
}

.hero-cta .btn {
  justify-content: center;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 14px 32px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-med);
  will-change: transform;
}

/* Button border shimmer */
.btn::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 6px;
  background: conic-gradient(from var(--shimmer-angle, 0deg), transparent 60%, var(--neon-cyan) 80%, transparent 100%);
  opacity: 0;
  z-index: -1;
  transition: opacity var(--transition-med);
  animation: border-shimmer 4s linear infinite;
}

@keyframes border-shimmer {
  0% { --shimmer-angle: 0deg; }
  100% { --shimmer-angle: 360deg; }
}

/* Fallback for browsers not supporting @property */
@supports not (background: conic-gradient(from 0deg, red, blue)) {
  .btn::before { display: none; }
}

.btn:hover::before {
  opacity: 0.6;
}

.btn-primary {
  background: transparent;
  color: var(--neon-cyan);
  border: 1px solid var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.15),
              inset 0 0 15px rgba(0, 240, 255, 0.05);
}

.btn-primary:hover {
  background: rgba(0, 240, 255, 0.1);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.3),
              inset 0 0 30px rgba(0, 240, 255, 0.1);
}

.btn-glow {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.2), transparent);
  transition: left 0.6s;
}

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

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

.btn-outline:hover {
  border-color: var(--neon-magenta);
  color: var(--neon-magenta);
  box-shadow: 0 0 20px rgba(255, 0, 230, 0.2), 0 0 40px rgba(255, 0, 230, 0.05);
}

.btn-resume {
  background: transparent;
  color: var(--neon-green);
  border: 1px solid var(--neon-green);
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.15),
              inset 0 0 15px rgba(57, 255, 20, 0.05);
}

.btn-resume:hover {
  background: rgba(57, 255, 20, 0.1);
  box-shadow: 0 0 30px rgba(57, 255, 20, 0.3),
              inset 0 0 30px rgba(57, 255, 20, 0.1);
}

.btn-resume:hover .btn-glow {
  left: 100%;
}

.btn-resume .btn-glow {
  background: linear-gradient(90deg, transparent, rgba(57, 255, 20, 0.2), transparent);
}

.btn-resume svg {
  flex-shrink: 0;
}

.btn-large {
  padding: 18px 48px;
  font-size: 0.9rem;
}

/* Hero Socials */
.hero-socials {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  gap: 24px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 1.2s forwards;
}

.social-link {
  color: var(--text-muted);
  transition: all var(--transition-med);
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.social-link::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, var(--neon-cyan), transparent);
  opacity: 0;
  transition: opacity var(--transition-med);
  z-index: -1;
  animation: spin-slow 4s linear infinite;
}

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

.social-link:hover {
  color: var(--neon-cyan);
  transform: translateY(-3px) scale(1.1);
  filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.6));
}

.social-link:hover::before {
  opacity: 0.5;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeInUpCenter 0.8s ease 1.4s forwards;
}

.scroll-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-right: -3px;
}

.scroll-arrow {
  color: var(--neon-cyan);
  animation: bounce 2s infinite;
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.5));
}

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

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text {
  background: rgba(10, 12, 18, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 240, 255, 0.05);
  border-left: 3px solid var(--neon-cyan);
  padding: 32px 40px;
  border-radius: 0 16px 16px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(0, 240, 255, 0.02);
  position: relative;
  overflow: hidden;
}

.about-text::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.05) 0%, transparent 100%);
  pointer-events: none;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 1.05rem;
  line-height: 1.9;
  font-weight: 300;
  letter-spacing: 0.3px;
  position: relative;
  z-index: 1;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-text .highlight {
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-size: 0.95em;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.about-interests {
  margin-top: 32px;
}

.about-interests-title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--neon-green);
  margin-bottom: 16px;
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.interest-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 6px 16px;
  border: 1px solid var(--neon-purple);
  color: var(--neon-purple);
  border-radius: 20px;
  background: rgba(123, 47, 247, 0.05);
  transition: all var(--transition-med);
}

.interest-tag:hover {
  background: rgba(123, 47, 247, 0.15);
  box-shadow: 0 0 15px rgba(123, 47, 247, 0.2);
}

/* Stats */
.about-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stat-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  transition: transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med);
  position: relative;
  overflow: hidden;
  will-change: transform;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-purple));
  background-size: 100% 200%;
  animation: bar-flow 3s ease-in-out infinite;
}

@keyframes bar-flow {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 0% 100%; }
}

.stat-card:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.12), 0 0 50px rgba(0, 240, 255, 0.04);
  transform: translateX(4px);
}

/* Glow burst after counter completes */
.stat-card.counted::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.3) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  animation: stat-burst 0.8s ease-out forwards;
  pointer-events: none;
}

@keyframes stat-burst {
  0% { width: 0; height: 0; opacity: 1; }
  100% { width: 200px; height: 200px; opacity: 0; }
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--neon-cyan);
  display: inline;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.stat-suffix {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--neon-cyan);
}

.stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 4px;
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.skill-category {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 28px;
  transition: transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med);
  position: relative;
  overflow: hidden;
  will-change: transform;
}

.skill-category::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta), var(--neon-purple));
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity var(--transition-med);
  animation: gradient-sweep 3s ease infinite;
}

.skill-category:hover {
  border-color: rgba(0, 240, 255, 0.3);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(0, 240, 255, 0.06);
  transform: translate3d(0, -6px, 0);
}

.skill-category:hover::after {
  opacity: 1;
}

.skill-category-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-category-title svg {
  color: var(--neon-cyan);
  filter: drop-shadow(0 0 4px rgba(0, 240, 255, 0.4));
}

.skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 6px 14px;
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 6px;
  color: var(--neon-cyan);
  transition: all var(--transition-med);
  cursor: default;
  position: relative;
  overflow: hidden;
}

/* Shimmer sweep on hover */
.skill-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 80%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  transition: left 0.6s ease;
  transform: skewX(-20deg);
}

.skill-badge:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.25), 0 0 40px rgba(0, 240, 255, 0.05);
  transform: translateY(-2px);
}

.skill-badge:hover::before {
  left: 150%;
}

/* Color variations for skill categories */
.skill-category:nth-child(2) .skill-badge {
  background: rgba(255, 0, 230, 0.05);
  border-color: rgba(255, 0, 230, 0.15);
  color: var(--neon-magenta);
}

.skill-category:nth-child(2) .skill-badge:hover {
  background: rgba(255, 0, 230, 0.15);
  border-color: var(--neon-magenta);
  box-shadow: 0 0 18px rgba(255, 0, 230, 0.25);
}

.skill-category:nth-child(2) .skill-badge::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.skill-category:nth-child(3) .skill-badge {
  background: rgba(123, 47, 247, 0.05);
  border-color: rgba(123, 47, 247, 0.15);
  color: var(--neon-purple);
}

.skill-category:nth-child(3) .skill-badge:hover {
  background: rgba(123, 47, 247, 0.15);
  border-color: var(--neon-purple);
  box-shadow: 0 0 18px rgba(123, 47, 247, 0.25);
}

.skill-category:nth-child(3) .skill-badge::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.skill-category:nth-child(4) .skill-badge {
  background: rgba(57, 255, 20, 0.05);
  border-color: rgba(57, 255, 20, 0.15);
  color: var(--neon-green);
}

.skill-category:nth-child(4) .skill-badge:hover {
  background: rgba(57, 255, 20, 0.15);
  border-color: var(--neon-green);
  box-shadow: 0 0 18px rgba(57, 255, 20, 0.25);
}

.skill-category:nth-child(4) .skill-badge::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.skill-category:nth-child(5) .skill-badge {
  background: rgba(240, 255, 0, 0.05);
  border-color: rgba(240, 255, 0, 0.15);
  color: var(--neon-yellow);
}

.skill-category:nth-child(5) .skill-badge:hover {
  background: rgba(240, 255, 0, 0.15);
  border-color: var(--neon-yellow);
  box-shadow: 0 0 18px rgba(240, 255, 0, 0.25);
}

.skill-category:nth-child(5) .skill-badge::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.project-card {
  --card-accent: var(--neon-cyan);
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 32px;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

/* Decorative project number watermark */
.project-card[data-number]::before {
  content: attr(data-number);
  position: absolute;
  top: -10px;
  right: 16px;
  font-family: var(--font-heading);
  font-size: 7rem;
  font-weight: 900;
  color: var(--card-accent);
  opacity: 0.04;
  line-height: 1;
  pointer-events: none;
  z-index: 0;
  transition: opacity var(--transition-med), text-shadow var(--transition-med);
}

.project-card:hover[data-number]::before {
  opacity: 0.1;
  text-shadow: 0 0 40px color-mix(in srgb, var(--card-accent) 20%, transparent);
}

/* Card inner bg overlay for gradient border effect */
.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: border-color var(--transition-med), box-shadow var(--transition-med);
  pointer-events: none;
}

.project-card:hover {
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5), 0 0 30px color-mix(in srgb, var(--card-accent) 8%, transparent);
}

.project-card:hover::after {
  border-color: var(--card-accent);
  box-shadow: 0 0 25px color-mix(in srgb, var(--card-accent) 30%, transparent),
              inset 0 0 25px color-mix(in srgb, var(--card-accent) 5%, transparent);
}

/* --- Featured Project Card --- */
.project-card.featured {
  grid-column: 1 / -1;
  flex-direction: row;
  gap: 40px;
  padding: 40px;
  background: linear-gradient(135deg, rgba(17, 17, 34, 0.8) 0%, rgba(22, 22, 51, 0.8) 100%);
}

.project-card.featured .project-header {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  min-width: 80px;
  gap: 20px;
}

.project-card.featured .project-icon svg {
  width: 36px;
  height: 36px;
}

.project-card.featured .project-links {
  flex-direction: column;
  gap: 16px;
}

.project-card.featured .project-title {
  font-size: 1.4rem;
}

.project-card.featured .project-desc {
  max-height: none;
}

.project-card.featured .project-desc:not(.expanded)::after {
  display: none;
}

.project-card.featured .read-more-btn {
  display: none;
}

/* Featured label */
.featured-label {
  position: absolute;
  top: 16px;
  right: 20px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  padding: 4px 12px;
  border-radius: 4px;
  z-index: 1;
  animation: label-pulse 3s ease-in-out infinite;
}

@keyframes label-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(0, 240, 255, 0); }
  50% { box-shadow: 0 0 12px rgba(0, 240, 255, 0.2); }
}

/* --- Per-card accent colors --- */
.project-icon {
  color: var(--card-accent);
  opacity: 0.8;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--card-accent) 40%, transparent));
}

.project-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-project {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: color-mix(in srgb, var(--card-accent) 5%, transparent);
  color: var(--card-accent);
  border: 1px solid color-mix(in srgb, var(--card-accent) 30%, transparent);
  border-radius: 6px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-project:hover {
  background: color-mix(in srgb, var(--card-accent) 15%, transparent);
  border-color: color-mix(in srgb, var(--card-accent) 60%, transparent);
  box-shadow: 0 0 20px color-mix(in srgb, var(--card-accent) 30%, transparent);
  transform: translateY(-2px);
  color: var(--card-accent);
}

.btn-project svg {
  flex-shrink: 0;
}



.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.project-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--card-accent);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.project-subtitle {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--card-accent);
  margin-bottom: 16px;
  opacity: 0.85;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 20px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--card-accent);
  padding: 4px 12px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--card-accent) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--card-accent) 20%, transparent);
  transition: all var(--transition-fast);
}

.project-tag:hover {
  background: color-mix(in srgb, var(--card-accent) 15%, transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--card-accent) 20%, transparent);
  transform: translateY(-1px);
}

/* ============================================
   EXPERIENCE SECTION
   ============================================ */
.experience-wrapper {
  display: grid;
  gap: 60px;
}

.timeline-heading {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--neon-green);
  margin-bottom: 32px;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.3);
}

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

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-purple), var(--neon-magenta), transparent);
  background-size: 100% 200%;
  animation: timeline-flow 4s linear infinite;
}

@keyframes timeline-flow {
  0% { background-position: 0% 0%; }
  100% { background-position: 0% 200%; }
}

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

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

.timeline-dot {
  position: absolute;
  left: -36px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
  animation: pulse-ring 2.5s ease-out infinite;
}

/* Expanding ring pulse */
.timeline-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--neon-cyan);
  animation: ring-expand 2.5s ease-out infinite;
}

@keyframes ring-expand {
  0% { width: 14px; height: 14px; opacity: 0.8; }
  100% { width: 40px; height: 40px; opacity: 0; }
}

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 12px rgba(0, 240, 255, 0.5); }
  50% { box-shadow: 0 0 24px rgba(0, 240, 255, 0.8), 0 0 40px rgba(0, 240, 255, 0.2); }
}

.timeline-content {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  transition: transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med);
  will-change: transform;
}

.timeline-content:hover {
  border-color: rgba(0, 240, 255, 0.3);
  box-shadow: 0 8px 35px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 240, 255, 0.08);
  transform: translate3d(0, -3px, 0);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.08);
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 12px;
  border: 1px solid rgba(0, 240, 255, 0.2);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.timeline-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 6px;
  letter-spacing: 0.5px;
}

.timeline-company {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--neon-magenta);
  margin-top: 2px;
  text-shadow: 0 0 6px rgba(255, 0, 230, 0.2);
}

.timeline-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 12px;
  line-height: 1.7;
}

ul.timeline-desc {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

ul.timeline-desc li {
  position: relative;
  padding-left: 20px;
}

ul.timeline-desc li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--neon-cyan);
  font-weight: bold;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.5);
}

.timeline-score {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--neon-green);
  margin-top: 8px;
  display: inline-block;
  padding: 3px 12px;
  background: rgba(57, 255, 20, 0.06);
  border: 1px solid rgba(57, 255, 20, 0.2);
  border-radius: 4px;
}

/* Certifications */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.cert-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med);
  will-change: transform;
}

.cert-card:hover {
  border-color: rgba(240, 255, 0, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(240, 255, 0, 0.06);
  transform: translate3d(0, -3px, 0);
}

.cert-icon {
  color: var(--neon-yellow);
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(240, 255, 0, 0.3));
}

.cert-title {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.cert-issuer {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-content {
  text-align: center;
}

.contact-intro {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 550px;
  margin: 0 auto 48px;
  line-height: 1.8;
}

.contact-cta-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.contact-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
  transition: transform var(--transition-med), box-shadow var(--transition-med);
  cursor: pointer;
  display: block;
  position: relative;
  overflow: hidden;
  will-change: transform;
}

/* Animated gradient border on hover */
.contact-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  padding: 1px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta), var(--neon-purple), var(--neon-cyan));
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-med);
  animation: gradient-rotate 4s ease infinite;
}

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

.contact-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 240, 255, 0.1);
  transform: translate3d(0, -6px, 0);
}

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

.contact-card-icon {
  color: var(--neon-cyan);
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  transition: all var(--transition-med);
}

.contact-card:hover .contact-card-icon {
  filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.6));
  transform: scale(1.15);
}

.contact-card-title {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.contact-card-value {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  word-break: break-all;
}

.contact-cta-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.btn-resume {
  border-color: var(--neon-green);
  color: var(--neon-green);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.1), inset 0 0 10px rgba(57, 255, 20, 0.05);
}

.btn-resume:hover {
  background: rgba(57, 255, 20, 0.1);
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.3), inset 0 0 20px rgba(57, 255, 20, 0.1);
  color: var(--neon-green);
}

.btn-resume .btn-glow {
  background: var(--neon-green);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid transparent;
  position: relative;
  z-index: 1;
}

/* Neon footer separator */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-magenta), var(--neon-cyan), transparent);
  animation: footer-pulse 3s ease-in-out infinite;
}

@keyframes footer-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; box-shadow: 0 0 10px rgba(0, 240, 255, 0.3); }
}

.footer-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.footer-bracket {
  color: var(--neon-cyan);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================
   REVEAL ANIMATION
   ============================================ */
.reveal {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1), transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

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

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  :root {
    --section-padding: 70px 0;
  }

  /* Hide cursor glow on touch devices */
  .cursor-glow {
    display: none;
  }

  /* Hide portrait and revert hero to centered layout on mobile */
  .hero-portrait-bg {
    display: none;
  }

  .hero {
    justify-content: center;
    text-align: center;
  }

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

  .hero-title-wrapper {
    justify-content: center;
  }

  .hero-summary {
    margin: 0 auto 40px;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-socials {
    justify-content: center;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: rgba(13, 13, 26, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    padding: 40px;
    border-left: 1px solid var(--border-glow);
    transition: right var(--transition-med);
    z-index: 1000;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-link {
    font-size: 1rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-stats {
    flex-direction: row;
    justify-content: center;
  }

  .stat-card {
    flex: 1;
    padding: 18px 12px;
  }

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

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

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

  .project-card.featured {
    flex-direction: column;
    gap: 24px;
    padding: 32px;
  }

  .project-card.featured .project-header {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .project-card.featured .project-links {
    flex-direction: row;
  }

  .project-card[data-number]::before {
    font-size: 5rem;
  }

  .featured-label {
    position: static;
    display: inline-block;
    margin-bottom: 12px;
  }

  .hero-name {
    letter-spacing: 3px;
  }

  .section-title {
    margin-bottom: 40px;
  }

  .timeline {
    padding-left: 30px;
  }

  .timeline-dot {
    left: -26px;
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Reduce glow orb sizes on mobile */
  .hero-glow-orb:nth-child(1) {
    width: 300px;
    height: 300px;
  }

  .hero-glow-orb:nth-child(2) {
    width: 250px;
    height: 250px;
  }

  .hero-glow-orb:nth-child(3) {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 480px) {
  .about-stats {
    flex-direction: column;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .cert-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   VIDEO MODAL
   ============================================ */
.video-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-med);
}

.video-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.video-modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  background: var(--bg-card-solid);
  border: 1px solid var(--neon-cyan);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.25), 0 0 80px rgba(0, 240, 255, 0.08);
  transform: scale(0.95);
  transition: transform var(--transition-med);
}

.video-modal-overlay.active .video-modal-content {
  transform: scale(1);
}

.close-modal-btn {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: color var(--transition-fast), transform var(--transition-fast);
  padding: 4px;
}

.close-modal-btn:hover {
  color: var(--neon-magenta);
  transform: scale(1.2) rotate(90deg);
}

#modal-video-player {
  width: 100%;
  height: auto;
  max-height: 80vh;
  border-radius: 8px;
  display: block;
}

/* --- Open Source Custom Icons & Highlight --- */
.os-icon {
  display: inline-flex;
  align-items: center;
  margin-right: 12px;
  color: var(--neon-cyan);
  filter: drop-shadow(0 0 4px rgba(0, 240, 255, 0.4));
}

.glow-highlight {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px var(--neon-cyan), 0 0 16px rgba(0, 240, 255, 0.4);
  font-weight: 700;
  padding: 0 4px;
  background: rgba(0, 240, 255, 0.05);
  border-radius: 4px;
}

/* --- Read More Functionality --- */
.project-desc {
  max-height: 160px;
  overflow: hidden;
  position: relative;
  transition: max-height 0.4s ease;
  flex: none; /* override flex: 1 to allow max-height to work properly */
  margin-bottom: 12px;
}

.project-desc.expanded {
  max-height: 800px;
  margin-bottom: 20px;
}

/* Gradient fade at the bottom when collapsed */
.project-desc:not(.expanded)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(17, 17, 34, 0.95));
  pointer-events: none;
}

.read-more-btn {
  background: none;
  border: none;
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  text-align: left;
  padding: 0;
  margin-bottom: 24px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  width: fit-content;
}

.read-more-btn:hover {
  color: var(--neon-magenta);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-shadow: 0 0 8px rgba(255, 0, 230, 0.3);
}
