/*
  PORTFOLIO SYSTEM STYLES (styles.css)
  Aesthetics: Dark Mode, Glassmorphism, Neon/Electric Highlights, Premium Layouts, 60fps Animations
*/

:root {
  /* Color System */
  --bg-dark: #070d19;
  --bg-card: rgba(15, 23, 42, 0.45);
  --border-glass: rgba(255, 255, 255, 0.08);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --color-bg-light: #f8fafc;

  /* Accent Colors matching Starter Pokemon / Gym Badges */
  --color-primary: #facc15;     /* Pikachu Electric Yellow */
  --color-primary-glow: rgba(250, 204, 21, 0.4);

  --color-water: #06b6d4;       /* Squirtle Cyan */
  --color-water-glow: rgba(6, 182, 212, 0.4);

  --color-grass: #22c55e;       /* Bulbasaur Leaf Green */
  --color-grass-glow: rgba(34, 197, 94, 0.4);

  --color-fire: #ef4444;        /* Charmander Fire Red */
  --color-fire-glow: rgba(239, 68, 68, 0.4);

  --color-devops: #a855f7;      /* Purple Devops */

  /* Global Constants */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --border-radius: 16px;
  --border-radius-sm: 8px;
  --color-primary-dark: #a16207;
  --transition-speed: 0.4s;
  --transition-bezier: cubic-bezier(0.16, 1, 0.3, 1);
  --font-main: var(--font-body);
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Premium Custom Theme-Matching Scrollbar (Desktop Only) */
@media (hover: hover) and (pointer: fine) {
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }

  ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
  }

  ::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
  }

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

  /* Firefox scrollbar compatibility */
  html {
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) rgba(0, 0, 0, 0.2);
  }
}

/* Loading Overlay */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #030712;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease, transform 0.5s ease;
  overflow: hidden;
}

#loading-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.05);
}

#thunder-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.loader-container {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  z-index: 2;
  transition: transform 0.05s ease;
}

/* Shake and Flash Animations for Thunder Loader */
@keyframes thunder-shake {
  0% { transform: translate(0, 0) rotate(0deg); }
  10% { transform: translate(-4px, 3px) rotate(-1deg); }
  20% { transform: translate(4px, -3px) rotate(1deg); }
  30% { transform: translate(-4px, -3px) rotate(0deg); }
  40% { transform: translate(3px, 4px) rotate(1deg); }
  50% { transform: translate(-2px, 3px) rotate(-1deg); }
  60% { transform: translate(-4px, 2px) rotate(0deg); }
  70% { transform: translate(3px, 2px) rotate(-1deg); }
  80% { transform: translate(-2px, -2px) rotate(1deg); }
  90% { transform: translate(3px, -3px) rotate(0deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

.loader-container.shake {
  animation: thunder-shake 0.35s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes thunder-flash-white {
  0% { background-color: rgba(255, 255, 255, 0.95); }
  100% { background-color: #030712; }
}

@keyframes thunder-flash-yellow {
  0% { background-color: rgba(250, 204, 21, 0.65); }
  100% { background-color: #030712; }
}

#loading-overlay.flash-white {
  animation: thunder-flash-white 0.25s ease-out forwards;
}

#loading-overlay.flash-yellow {
  animation: thunder-flash-yellow 0.3s ease-out forwards;
}

.thunderbolt-wrapper {
  width: 120px;
  height: 120px;
  position: relative;
}

.thunderbolt-svg {
  width: 100%;
  height: 100%;
}

.bolt-bg {
  fill: none;
  stroke: var(--color-bg-light);
  stroke-width: 4;
}

.bolt-outer {
  fill: none;
  stroke: var(--color-primary); /* Bright Yellow */
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  filter: drop-shadow(0 0 12px rgba(250, 204, 21, 0.8));
  animation: draw-bolt-outer 2.5s infinite linear;
}

.bolt-inner {
  fill: none;
  stroke: #ffff00; /* Neon Yellow */
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: draw-bolt-inner 2.5s infinite linear;
}

@keyframes draw-bolt-outer {
  0% {
    stroke-dashoffset: 400;
  }
  50% {
    stroke-dashoffset: 0;
    fill: transparent;
  }
  60% {
    fill: #ffff00; /* Neon Yellow fill inside */
  }
  80% {
    fill: #ffff00;
    filter: drop-shadow(0 0 15px rgba(250, 204, 21, 1.0));
  }
  100% {
    stroke-dashoffset: -400;
    fill: transparent;
  }
}

@keyframes draw-bolt-inner {
  0% {
    stroke-dashoffset: 400;
  }
  50% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -400;
  }
}

.loading-bar-container {
  width: 200px;
  height: 4px;
  background-color: var(--color-bg-light);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.loading-bar {
  width: 100%;
  height: 100%;
  background-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.8);
  transform: translateX(-100%);
  animation: load-progress 2.2s forwards cubic-bezier(0.1, 0.7, 0.1, 1);
}

@keyframes load-progress {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(-40%); }
  80% { transform: translateX(-15%); }
  100% { transform: translateX(0); }
}

.loading-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--color-primary);
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.6);
}

/* Background Canvas */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Global Navigation Header */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(7, 13, 25, 0.7);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
}

.logo-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.logo-text .dot {
  color: var(--color-primary);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-family: var(--font-display);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color var(--transition-speed), text-shadow var(--transition-speed);
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
  box-shadow: 0 0 8px var(--color-primary-glow);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-speed) var(--transition-bezier);
}

.nav-link.active::after, .nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.btn-cta {
  background-color: var(--color-primary);
  color: var(--bg-dark) ;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease ;
}

.btn-cta::after {
  display: none;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--color-primary-glow);
}

/* Sound & Theme Controls */
.global-controls {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.control-btn {
  background: rgba(30, 41, 59, 0.4);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 0.6rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

.control-btn svg {
  width: 16px;
  height: 16px;
}

.control-btn:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary-glow);
}

.hidden {
  display: none ;
}

/* Sections Structure */
.section-container {
  min-height: 100vh;
  padding: 7rem 10% 4rem;
  display: none;
  flex-direction: column;
  justify-content: center;
  animation: section-fade-in 0.6s var(--transition-bezier) forwards;
  opacity: 0;
}

.section-container.active {
  display: flex;
}

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

.section-header {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-header::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--color-primary);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--color-primary-glow);
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 3rem;
  max-width: 600px;
}

/* Glassmorphism Panel Base */
.glass-panel {
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  /* Enforce border-radius clipping during child transitions/transforms */
  mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
  backface-visibility: hidden;
}

.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.03) 0%, transparent 60%);
  pointer-events: none;
  transition: transform 0.5s ease;
}

.glass-panel:hover .card-glow {
  transform: translate(10%, 10%);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s var(--transition-bezier);
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--bg-dark);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(250, 204, 21, 0.3);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-main);
  transform: translateY(-3px);
}

.btn-glow {
  position: relative;
  overflow: hidden;
  /* Enforce border-radius clipping during child transitions/transforms */
  mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.btn-glow::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: skewX(-25deg);
  transition: 0.75s;
}

.btn-glow:hover::after {
  left: 125%;
}

/* HERO SECTION SPECIFICS */
#hero {
  flex-direction: row;
  align-items: center;
  gap: 5%;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.2);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-primary);
}

.animate-pulse {
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.badge-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  font-weight: 600;
}

.hero-name {
  font-family: var(--font-display);
  font-size: 4.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  text-shadow: 0 0 10px var(--color-primary-glow);
}

.hero-tagline {
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 400px;
}

/* Poke Ball Hologram CSS */
.pokeball-hologram {
  position: relative;
  width: 300px;
  height: 300px;
  perspective: 1000px;
  animation: floating-hologram 4s ease-in-out infinite;
  will-change: transform;
}

@keyframes floating-hologram {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.hologram-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px dashed var(--color-primary);
  opacity: 0.2;
  transform: translate(-50%, -50%) rotateX(75deg);
  will-change: transform, opacity;
}

.hologram-ring-1 {
  width: 380px;
  height: 380px;
  animation: spin-ring 15s linear infinite;
}

.hologram-ring-2 {
  width: 440px;
  height: 440px;
  border-style: solid;
  border-width: 2px;
  border-color: var(--color-primary) transparent;
  animation: spin-ring-reverse 10s linear infinite;
}

.hologram-ring-3 {
  width: 280px;
  height: 280px;
  animation: spin-ring 8s linear infinite;
}

@keyframes spin-ring {
  from { transform: translate(-50%, -50%) rotateX(75deg) rotateZ(0deg); }
  to { transform: translate(-50%, -50%) rotateX(75deg) rotateZ(360deg); }
}

@keyframes spin-ring-reverse {
  from { transform: translate(-50%, -50%) rotateX(75deg) rotateZ(360deg); }
  to { transform: translate(-50%, -50%) rotateX(75deg) rotateZ(0deg); }
}

.pokeball-core {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  border: 4px solid var(--bg-dark);
  box-shadow: 0 0 30px var(--color-primary-glow), inset 0 0 40px rgba(255, 255, 255, 0.05);
  animation: pokeball-default-movement 8s ease-in-out infinite;
  /* Enforce border-radius clipping during child transitions/transforms */
  mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  will-change: transform, opacity;
}

.pokeball-core.avatar-mode-active {
  animation: avatar-hologram-movement 6s ease-in-out infinite;
}

@keyframes pokeball-default-movement {
  0%, 100% {
    transform: rotateZ(4deg) rotateY(-15deg) scale(1);
  }
  50% {
    transform: rotateZ(-4deg) rotateY(15deg) scale(1.04);
  }
}

@keyframes avatar-hologram-movement {
  0%, 100% {
    transform: rotateX(6deg) rotateY(-10deg) scale(0.97);
    box-shadow: 0 0 25px var(--color-primary-glow), inset 0 0 30px rgba(255, 255, 255, 0.05);
  }
  50% {
    transform: rotateX(-6deg) rotateY(10deg) scale(1.03);
    box-shadow: 0 0 35px var(--color-primary-glow), inset 0 0 50px rgba(255, 255, 255, 0.1);
  }
}

@keyframes avatar-hologram-movement-mobile {
  0%, 100% {
    transform: rotateX(6deg) rotateY(-10deg) scale(0.97);
  }
  50% {
    transform: rotateX(-6deg) rotateY(10deg) scale(1.03);
  }
}

.pokeball-top {
  flex: 1;
  background: linear-gradient(135deg, #ef4444 30%, #b91c1c 90%);
}

.pokeball-middle-line {
  height: 16px;
  background-color: var(--bg-dark);
  position: relative;
  z-index: 5;
}

.pokeball-bottom {
  flex: 1;
  background: linear-gradient(135deg, #f8fafc 30%, #cbd5e1 90%);
}

.pokeball-center-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  background-color: var(--text-main);
  border: 12px solid var(--bg-dark);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  box-shadow: 0 0 10px var(--color-primary-glow);
}

.pokeball-center-button::after {
  content: '';
  position: absolute;
  top: -12px;
  left: -12px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 0 20px var(--color-primary);
  opacity: 0.3;
  animation: center-glow-opacity 2s infinite ease-in-out;
  pointer-events: none;
  will-change: opacity;
}

@keyframes center-glow-opacity {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ABOUT SECTION SPECIFICS */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

.about-bio-card h3, .companion-panel h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}

.bio-text, .goals-text {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.sub-heading {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.interests-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
}

.interests-tags li {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.interests-tags li:hover {
  background-color: var(--color-primary-glow);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

/* Pokemon Companion Selection Panel */
.companion-panel {
  display: flex;
  flex-direction: column;
}

.companion-instruction {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.starter-select {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.starter-btn {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  flex: 1 1 calc(33.33% - 0.5rem);
  min-width: 120px;
}

.starter-btn:hover {
  border-color: var(--color-primary);
  color: var(--text-main);
}

.btn-pk-icon {
  font-size: 1.1rem;
}

.icon-sylveon {
  display: inline-block;
}

/* Color states for starter btns and active indicators */
.starter-btn[data-pokemon="pikachu"].active {
  background-color: rgba(250, 204, 21, 0.1);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.15);
}

.starter-btn[data-pokemon="bulbasaur"].active {
  background-color: rgba(34, 197, 94, 0.1);
  border-color: var(--color-grass);
  color: var(--color-grass);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.15);
}

.starter-btn[data-pokemon="charmander"].active {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: var(--color-fire);
  color: var(--color-fire);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.15);
}

.starter-btn[data-pokemon="squirtle"].active {
  background-color: rgba(6, 182, 212, 0.1);
  border-color: var(--color-water);
  color: var(--color-water);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
}

.starter-btn[data-pokemon="sylveon"].active {
  background-color: rgba(244, 114, 182, 0.1);
  border-color: #f472b6;
  color: #f472b6;
  box-shadow: 0 0 15px rgba(244, 114, 182, 0.15);
}

/* Companion Display area */
.companion-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1rem;
}

.companion-bubble {
  position: relative;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  width: 100%;
  margin-bottom: 1.5rem;
}

.companion-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 10px 10px 0;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.05) transparent;
  display: block;
  width: 0;
}

#companion-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-main);
  text-align: center;
}

.companion-character-wrapper {
  width: 120px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Sprite integration and companion display area */
.companion-avatar {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: companion-idle 2s infinite ease-in-out;
  will-change: transform;
}

@keyframes companion-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Glowing pedestal base under the sprite */
.companion-avatar::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 12px;
  background: radial-gradient(ellipse, var(--color-primary-glow) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
  animation: companion-shadow 2s infinite ease-in-out;
  pointer-events: none;
}

@keyframes companion-shadow {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.8; }
  50% { transform: translateX(-50%) scale(0.8); opacity: 0.35; }
}

.companion-avatar-img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  position: relative;
  z-index: 2;
  display: block;
}

/* SKILLS SECTION SPECIFICS */
.skills-layout {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.skills-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.filter-skill-btn {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 0.6rem 1.4rem;
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 500;
  transition: all 0.3s ease;
}

.filter-skill-btn:hover, .filter-skill-btn.active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--bg-dark);
  box-shadow: 0 0 15px var(--color-primary-glow);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

/* Skill card styled like a Game Boy Cartridge shell / Trading card */
.skill-card {
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--transition-bezier);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  will-change: transform;
  /* Enforce border-radius clipping during child transitions/transforms */
  mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.skill-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--card-border-active);
  box-shadow: 0 10px 25px var(--card-shadow-active);
}

.skill-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.skill-badge-container {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  border: 2px solid var(--border-glass);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  transition: transform 0.5s ease;
  flex-shrink: 0;
}

.skill-card:hover .skill-badge-container {
  transform: rotate(360deg) scale(1.1);
  border-color: var(--card-border-active);
  background: rgba(255,255,255,0.08);
}

.skill-badge-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.skill-info {
  display: flex;
  flex-direction: column;
}

.skill-cat {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.skill-name-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}

.skill-stat-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  margin-top: 1rem;
}

.skill-stat-val {
  color: var(--text-main);
  font-weight: bold;
}

.skill-progress-container {
  width: 100%;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.skill-progress-bar {
  height: 100%;
  width: 0%; /* Animated on load via JS */
  background: linear-gradient(to right, var(--card-border-active), var(--card-border-active));
  border-radius: 4px;
  box-shadow: 0 0 10px var(--card-shadow-active);
  transition: width 1.5s cubic-bezier(0.1, 0.8, 0.1, 1);
}

.skill-desc-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
  line-height: 1.5;
}

/* Category styling values dynamically generated by JS variables */

/* TIMELINE EXPERIENCE SECTION */
.timeline-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

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

.timeline-node {
  position: relative;
  padding-left: 80px;
  margin-bottom: 3.5rem;
}

.timeline-connector {
  position: absolute;
  left: 20px;
  top: 6px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  max-width: 28px;
  max-height: 28px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  box-sizing: border-box;
  background: linear-gradient(180deg, #ef4444 43%, #111111 43%, #111111 57%, #ffffff 57%);
  border: 3px solid #111111;
  border-radius: 50% ;
  overflow: hidden;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Button indicator on Poké Ball node */
.timeline-connector::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background-color: white;
  border: 2px solid #111111;
  border-radius: 50%;
  box-sizing: border-box;
}

.timeline-node:hover .timeline-connector {
  transform: rotate(360deg) scale(1.2);
  border-color: var(--color-primary);
  box-shadow: 0 0 15px var(--color-primary-glow);
}

.timeline-connector.has-icon {
  background: rgba(255, 255, 255, 0.05) ;
  border: 2px solid var(--border-glass) ;
  display: flex ;
  justify-content: center ;
  align-items: center ;
  overflow: visible ;
}

.timeline-connector.has-icon::after {
  display: none ;
}

.experience-badge-icon {
  width: 55%;
  height: 55%;
  object-fit: contain;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
}

.timeline-content {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius);
  padding: 2rem;
  position: relative;
  transition: all 0.3s ease;
}

.timeline-node:hover .timeline-content {
  border-color: var(--border-glass);
  background: rgba(15, 23, 42, 0.65);
}

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

.timeline-role {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
}

.timeline-company {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-primary);
  margin-top: 0.25rem;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  background-color: rgba(255,255,255,0.03);
  padding: 0.3rem 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
}

.timeline-bullets {
  list-style: none;
  margin-bottom: 1.5rem;
}

.timeline-bullets li {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 1.25rem;
}

.timeline-bullets li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

.timeline-achieve {
  display: block;
  font-size: 0.85rem;
  background-color: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.15);
  color: #4ade80;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  white-space: pre-wrap;
  line-height: 1.5;
}

.timeline-achieve::before {
  content: '⭐ ';
  display: inline-block;
  margin-right: 0.25rem;
}

/* TRAINING ACADEMY (EDUCATION & CERTS) */
.academy-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.academy-layout .glass-panel {
  padding: 1.75rem;
}

.academy-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.edu-item {
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.85rem;
  margin-bottom: 0.35rem;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.edu-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.edu-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}

.edu-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.edu-inst-text {
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 0.1rem;
}

.edu-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin-top: 0.2rem;
}

.edu-ach-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  display: block;
}

@media (max-width: 600px) {
  .edu-item {
    flex-direction: column;
    gap: 0.25rem;
  }
  .edu-date {
    margin-top: 0;
  }
}

/* Certifications grid */
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.cert-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-left: 3px solid var(--color-primary);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  transition: all 0.3s ease;
  will-change: transform;
}

.cert-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(250, 204, 21, 0.08);
}

.cert-card h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.cert-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.cert-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.75rem;
}

.cert-meta span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.cert-link {
  color: var(--color-primary);
  font-size: 0.8rem;
  text-decoration: none;
  font-weight: 500;
  margin-top: auto;
}

.cert-link:hover {
  text-decoration: underline;
}

/* PROJECTS SHOWCASE */
.projects-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
  padding: 1.25rem 2rem;
}

.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-wrapper input {
  width: 100%;
  background-color: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  padding: 0.75rem 1.25rem;
  color: var(--text-main);
  border-radius: 20px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.search-wrapper input:focus {
  outline: none;
  border-color: var(--color-primary);
  background-color: rgba(255,255,255,0.05);
  box-shadow: 0 0 10px var(--color-primary-glow);
}

.projects-filters {
  display: flex;
  gap: 0.75rem;
}

.filter-proj-btn {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 500;
  transition: all 0.3s ease;
}

.filter-proj-btn:hover, .filter-proj-btn.active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--bg-dark);
  box-shadow: 0 0 10px var(--color-primary-glow);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem;
}

.project-card {
  display: flex;
  flex-direction: column;
}

.project-thumbnail-wrapper {
  position: relative;
  width: 100%;
  height: 190px;
  overflow: hidden;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  border: 1px solid var(--border-glass);
  border-bottom: none;
  /* Enforce border-radius clipping during child transitions/transforms */
  mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

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

.project-card:hover .project-thumbnail {
  transform: scale(1.06);
}

.project-badge-featured {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--color-primary);
  color: var(--bg-dark);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.project-details {
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  border-top: none;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-details h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.project-category-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.project-desc-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 4.5em; /* Exactly 3 lines * 1.5 line-height */
}

.project-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  margin-bottom: 1.5rem;
  list-style: none;
}

.project-tech-tags li {
  background-color: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.project-links {
  display: flex;
  gap: 1rem;
  border-top: 1px solid var(--border-glass);
  padding-top: 1rem;
}

.proj-link-btn {
  flex: 1;
  text-align: center;
  font-size: 0.85rem;
  padding: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.proj-link-btn-git {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-glass);
}

.proj-link-btn-git:hover {
  background-color: rgba(255,255,255,0.05);
}

.proj-link-btn-demo {
  background-color: var(--color-primary);
  color: var(--bg-dark);
}

.proj-link-btn-demo:hover {
  box-shadow: 0 0 10px var(--color-primary-glow);
}

/* CONTACT & CHALLENGE SECTION */
.contact-layout {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.coordinates-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

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

.coord-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background-color: rgba(255,255,255,0.02);
  border: 1px solid var(--border-glass);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
}

.coord-details {
  display: flex;
  flex-direction: column;
}

.coord-details label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.coord-details span {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  margin-top: 0.15rem;
}

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

.social-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.02);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
  text-decoration: none;
  will-change: transform;
}

.social-icon-btn svg {
  width: 18px;
  height: 18px;
}

.social-icon-btn:hover {
  background-color: var(--color-primary-glow);
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-3px);
}

/* Contact Form Specifics */
.contact-form-panel form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: flex;
  gap: 1.25rem;
}

.flex-1 {
  flex: 1;
}

.contact-form-panel input,
.contact-form-panel textarea {
  width: 100%;
  background-color: rgba(255,255,255,0.02);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.contact-form-panel input:focus,
.contact-form-panel textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background-color: rgba(255,255,255,0.04);
  box-shadow: 0 0 10px var(--color-primary-glow);
}

/* FOOTER SECTION */
.main-footer {
  border-top: 1px solid var(--border-glass);
  background: rgba(7, 13, 25, 0.8);
  padding: 3rem 10% 2.5rem;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-content p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

#footer-copy {
  max-width: 850px;
  margin: 0 auto;
}

.footer-disclaimer {
  opacity: 0.5;
  font-size: 0.75rem ;
  max-width: 700px;
  margin: 0.5rem auto 0;
  line-height: 1.5;
}

/* SUCCESS MODAL UI */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(3, 7, 18, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-card {
  max-width: 400px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  transform: translateY(20px);
  transition: transform 0.3s var(--transition-bezier);
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.pokeball-spinner-container {
  width: 80px;
  height: 80px;
}

.pokeball-spinner {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ef4444 48%, #0f172a 48%, #0f172a 52%, #f8fafc 52%);
  border: 4px solid var(--bg-dark);
  border-radius: 50%;
  position: relative;
  animation: poke-spin-anim 1.5s infinite linear;
  will-change: transform;
}

.pokeball-spinner::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background-color: white;
  border: 4px solid var(--bg-dark);
  border-radius: 50%;
}

@keyframes poke-spin-anim {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Poke Ball Wipe Section transition elements */
.pokeball-wipe-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  transition: visibility 0s linear 0.6s;
}

.pokeball-wipe-overlay.active {
  visibility: visible;
  transition-delay: 0s;
}

.wipe-top, .wipe-bottom {
  flex: 1;
  position: relative;
  transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1);
  pointer-events: auto;
  overflow: hidden;
  will-change: transform;
}

.wipe-top {
  transform: translateY(-100%);
  background: linear-gradient(180deg, #ff1f1f 0%, #c60e0e 80%, #800000 100%);
  border-bottom: 12px solid #111111;
  box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.4);
}


.wipe-bottom {
  transform: translateY(100%);
  background: linear-gradient(180deg, #8a8a8a 0%, #e2e8f0 12%, #ffffff 30%, #dcdcdc 100%);
  border-top: 12px solid #111111;
  box-shadow: inset 0 10px 20px rgba(0, 0, 0, 0.3);
}

.wipe-center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0) rotate(-45deg);
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, #2d3748 0%, #0f172a 100%);
  border: 10px solid #111111;
  border-radius: 50%;
  z-index: 100000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1);
  pointer-events: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), inset 0 4px 10px rgba(255, 255, 255, 0.1);
  will-change: transform;
}

.wipe-center-circle::before {
  content: '';
  position: absolute;
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 50%, #94a3b8 100%);
  border: 5px solid #111111;
  border-radius: 50%;
  box-shadow: inset 0 2px 5px rgba(255,255,255,0.8), 0 3px 6px rgba(0,0,0,0.3);
}

.wipe-center-circle::after {
  content: '';
  position: absolute;
  width: 52px;
  height: 52px;
  background: radial-gradient(circle, #ffffff 40%, #e2e8f0 80%, #cbd5e1 100%);
  border: 5px solid #111111;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4), inset 0 1px 3px rgba(255,255,255,0.9);
  z-index: 100001;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.pokeball-wipe-overlay.active .wipe-top {
  transform: translateY(0);
}

.pokeball-wipe-overlay.active .wipe-bottom {
  transform: translateY(0);
}

.pokeball-wipe-overlay.active .wipe-center-circle {
  transform: translate(-50%, -50%) scale(1) rotate(0deg);
}

.pokeball-wipe-overlay.active .wipe-center-circle::after {
  animation: pokeball-capture-sequence 1.2s infinite ease-in-out;
}

@keyframes pokeball-capture-sequence {
  0% {
    background: radial-gradient(circle, #ffffff 40%, #e2e8f0 80%);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  }
  25% {
    background: radial-gradient(circle, #ff5e5e 30%, #ef4444 70%, #991b1b 100%);
    box-shadow: 0 0 25px #ef4444, inset 0 0 8px rgba(0,0,0,0.4);
  }
  50% {
    background: radial-gradient(circle, #ffffff 40%, #e2e8f0 80%);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  }
  75% {
    background: radial-gradient(circle, #ff5e5e 30%, #ef4444 70%, #991b1b 100%);
    box-shadow: 0 0 25px #ef4444, inset 0 0 8px rgba(0,0,0,0.4);
  }
  90% {
    background: radial-gradient(circle, #86efac 30%, #22c55e 70%, #166534 100%);
    box-shadow: 0 0 25px #22c55e, inset 0 0 8px rgba(0,0,0,0.4);
  }
  100% {
    background: radial-gradient(circle, #ffffff 40%, #e2e8f0 80%);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  }
}

/* Responsive Navigation adjustments */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
}

.mobile-nav-toggle .bar {
  width: 24px;
  height: 3px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-nav-drawer {
  position: fixed;
  top: 73px;
  left: 0;
  width: 100%;
  background: rgba(7, 13, 25, 0.95);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-glass);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 95;
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
  transform: translateY(-20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.mobile-nav-drawer.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-link {
  font-family: var(--font-display);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 500;
}

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

/* RESPONSIVENESS AND RESPONSIVE BREAKPOINTS */

/* Prevent any horizontal overflow on all devices */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

@media (max-width: 1024px) {
  .section-container {
    padding: 7rem 5% 4rem;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  #hero {
    flex-direction: column;
    text-align: center;
    gap: 2.5rem;
    padding-top: 8rem;
  }
  .hero-content {
    max-width: 100%;
  }
  .hero-buttons {
    justify-content: center;
  }
  .hero-tagline {
    margin-left: auto;
    margin-right: auto;
  }
  .academy-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }

  .desktop-nav .nav-link {
    font-size: 0.85rem;
    padding: 0.35rem 0.6rem;
  }

  .desktop-nav .btn-cta {
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
  }

  .main-header {
    padding: 0.75rem 1rem;
  }

  /* Hero section */
  .hero-name {
    font-size: 2.8rem;
  }
  .hero-title {
    font-size: 1.4rem;
  }
  .hero-tagline {
    font-size: 1.05rem;
  }
  .hero-visual {
    min-height: 250px;
    margin-top: 1.5rem;
  }

  /* Section headers */
  .section-header {
    font-size: 2rem;
  }
  .section-desc {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  /* Pokéball hologram size reduction */
  .pokeball-hologram {
    width: 220px;
    height: 220px;
  }
  .hologram-ring-1 { width: 280px; height: 280px; }
  .hologram-ring-2 { width: 320px; height: 320px; }
  .hologram-ring-3 { width: 200px; height: 200px; }

  /* Companion panel */
  .starter-select {
    gap: 0.5rem;
  }
  .starter-btn {
    flex: 1 1 calc(33.33% - 0.35rem);
    min-width: 95px;
    padding: 0.55rem 0.7rem;
    font-size: 0.82rem;
  }

  /* Timeline experience */
  .timeline-container::before {
    left: 21px;
  }
  .timeline-node {
    padding-left: 55px;
    margin-bottom: 2.5rem;
  }
  .timeline-connector {
    left: 8px;
  }
  .timeline-content {
    padding: 1.5rem;
  }
  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .timeline-role {
    font-size: 1.2rem;
  }
  .timeline-company {
    font-size: 0.95rem;
  }
  .timeline-date {
    align-self: flex-start;
    font-size: 0.8rem;
  }
  .timeline-bullets li {
    font-size: 0.9rem;
  }

  /* Projects */
  .projects-controls {
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem;
    gap: 1rem;
  }
  .projects-filters {
    flex-wrap: wrap;
    justify-content: center;
  }
  .search-wrapper {
    max-width: 100%;
  }
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Skills */
  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
  }
  .skills-filters {
    gap: 0.5rem;
  }
  .filter-skill-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  /* Contact form */
  .form-row {
    flex-direction: column;
    gap: 1rem;
  }
  .contact-info-panel {
    padding: 1.75rem;
  }

  /* Glass panels */
  .glass-panel {
    padding: 1.75rem;
  }

  /* Global controls: floating circle icons on mobile bottom-right stacked above companion */
  .global-controls {
    bottom: 95px; /* Above the 70px companion + 15px bottom + 10px spacing */
    left: auto;
    right: 15px;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }
  .control-btn {
    padding: 0;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
  }
  .control-btn svg {
    width: 20px;
    height: 20px;
  }
  .control-btn span {
    display: none;
  }
  #lang-toggle span {
    display: inline-block;
  }
  #lang-toggle svg {
    display: none;
  }
  #lang-toggle .lang-text {
    font-size: 0;
  }
  #lang-toggle .lang-text::before {
    content: attr(data-alt-lang);
    font-size: 0.65rem;
    font-weight: 700;
  }


  /* Footer */
  .main-footer {
    padding: 2.5rem 5% 2rem;
  }
  .footer-disclaimer {
    font-size: 0.7rem ;
  }

  /* Loading overlay scaling */
  .thunderbolt-wrapper {
    width: 100px;
    height: 100px;
  }
  .loading-bar-container {
    width: 160px;
  }
  .loading-text {
    font-size: 0.75rem;
  }

  /* Modal */
  .modal-card {
    width: 85%;
    max-width: 380px;
  }

  /* Pokéball wipe center circle */
  .wipe-center-circle {
    width: 110px;
    height: 110px;
  }
  .wipe-center-circle::before {
    width: 70px;
    height: 70px;
  }
  .wipe-center-circle::after {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .section-container {
    padding: 5.5rem 1rem 2.5rem;
  }

  /* Hero */
  .hero-name {
    font-size: 2rem;
  }
  .hero-title {
    font-size: 1.1rem;
  }
  .hero-tagline {
    font-size: 0.95rem;
    margin-bottom: 2rem;
  }
  .hero-badge {
    margin-bottom: 1rem;
  }
  .badge-text {
    font-size: 0.65rem;
  }
  .hero-buttons {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }
  .hero-buttons .btn {
    width: 100%;
    padding: 0.75rem 1.2rem;
    font-size: 0.95rem;
  }
  .hero-visual {
    min-height: 180px;
    margin-top: 0.75rem;
  }

  /* Pokéball hologram */
  .pokeball-hologram {
    width: 160px;
    height: 160px;
  }
  .hologram-ring-1 { width: 200px; height: 200px; }
  .hologram-ring-2 { width: 230px; height: 230px; }
  .hologram-ring-3 { width: 140px; height: 140px; }

  /* Section headers */
  .section-header {
    font-size: 1.75rem;
  }
  .section-desc {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  /* About */
  .about-bio-card h3, .companion-panel h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
  .bio-text, .goals-text {
    font-size: 0.9rem;
  }
  .sub-heading {
    font-size: 0.95rem;
    margin-top: 1.25rem;
  }
  .interests-tags li {
    font-size: 0.78rem;
    padding: 0.35rem 0.7rem;
  }

  /* Companion panel */
  .companion-instruction {
    font-size: 0.82rem;
  }
  .starter-select {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }
  .starter-btn {
    min-width: unset;
    padding: 0.5rem 0.4rem;
    font-size: 0.78rem;
    gap: 0.3rem;
  }
  /* Make the 5th button span full width to center it */
  .starter-select .starter-btn:nth-child(5) {
    grid-column: 1 / -1;
    max-width: 60%;
    margin: 0 auto;
  }
  .companion-bubble {
    padding: 0.6rem 0.8rem;
  }
  #companion-text {
    font-size: 0.78rem;
  }
  .companion-character-wrapper {
    width: 100px;
    height: 100px;
  }

  /* Skills */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .skills-filters {
    gap: 0.4rem;
  }
  .filter-skill-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.78rem;
  }
  .skill-card {
    padding: 1.25rem;
  }
  .skill-name-text {
    font-size: 1.05rem;
  }

  /* Timeline experience */
  .timeline-node {
    padding-left: 48px;
    margin-bottom: 2rem;
  }
  .timeline-content {
    padding: 1.25rem;
  }
  .timeline-role {
    font-size: 1.1rem;
  }
  .timeline-company {
    font-size: 0.9rem;
  }
  .timeline-date {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
  }
  .timeline-bullets li {
    font-size: 0.85rem;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
  }
  .timeline-achieve {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
  }

  /* Projects */
  .projects-controls {
    padding: 1rem;
    gap: 0.75rem;
  }
  .projects-filters {
    gap: 0.4rem;
  }
  .filter-proj-btn {
    padding: 0.35rem 0.8rem;
    font-size: 0.78rem;
  }
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .project-thumbnail-wrapper {
    height: 160px;
  }
  .project-details h3 {
    font-size: 1.15rem;
  }
  .project-desc-text {
    font-size: 0.85rem;
  }
  .project-tech-tags li {
    font-size: 0.7rem;
  }

  /* Education & Certifications */
  .academy-layout {
    gap: 1.5rem;
  }
  .certifications-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .edu-title {
    font-size: 1.05rem;
  }
  .edu-inst-text {
    font-size: 0.88rem;
  }
  .cert-card {
    padding: 0.85rem;
  }

  /* Contact */
  .contact-layout {
    gap: 1.75rem;
  }
  .coord-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 1rem;
  }
  .coord-details label {
    font-size: 0.7rem;
  }
  .coord-details span {
    font-size: 0.88rem;
  }
  .social-icon-btn {
    width: 40px;
    height: 40px;
  }

  /* Glass panels */
  .glass-panel {
    padding: 1.25rem;
  }

  /* Modal */
  .modal-card {
    width: 92%;
    max-width: 340px;
  }
  .modal-card h2 {
    font-size: 1.3rem;
  }
  .modal-card p {
    font-size: 0.9rem;
  }
  .pokeball-spinner-container {
    width: 64px;
    height: 64px;
  }

  /* Loading overlay */
  .thunderbolt-wrapper {
    width: 80px;
    height: 80px;
  }
  .loading-bar-container {
    width: 140px;
  }
  .loading-text {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
  }

  /* Global controls: stacked above the 55px mobile companion */
  .global-controls {
    bottom: 75px; /* Above 55px companion + 10px bottom + 10px spacing */
    right: 10px;
    left: auto;
    flex-direction: column;
    gap: 0.4rem;
    align-items: center;
  }
  .control-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
  .control-btn svg {
    width: 18px;
    height: 18px;
  }

  /* Footer */
  .main-footer {
    padding: 2rem 1rem 1.5rem;
  }
  .footer-content p {
    font-size: 0.78rem;
  }
  .footer-disclaimer {
    font-size: 0.65rem ;
  }

  /* Wipe overlay */
  .wipe-center-circle {
    width: 90px;
    height: 90px;
    border-width: 8px;
  }
  .wipe-center-circle::before {
    width: 56px;
    height: 56px;
    border-width: 4px;
  }
  .wipe-center-circle::after {
    width: 34px;
    height: 34px;
    border-width: 4px;
  }
}

/* Ultra-small screens (≤360px) */
@media (max-width: 360px) {
  .section-container {
    padding: 5rem 0.75rem 2rem;
  }
  .hero-name {
    font-size: 1.75rem;
  }
  .hero-title {
    font-size: 1rem;
  }
  .hero-tagline {
    font-size: 0.88rem;
  }
  .section-header {
    font-size: 1.5rem;
  }
  .section-desc {
    font-size: 0.85rem;
  }
  .pokeball-hologram {
    width: 140px;
    height: 140px;
  }
  .hologram-ring-1 { width: 175px; height: 175px; }
  .hologram-ring-2 { width: 200px; height: 200px; }
  .hologram-ring-3 { width: 120px; height: 120px; }
  .glass-panel {
    padding: 1rem;
    border-radius: 12px;
  }
  .about-bio-card h3, .companion-panel h3 {
    font-size: 1.15rem;
  }
  .starter-btn {
    padding: 0.4rem 0.3rem;
    font-size: 0.72rem;
  }
  .btn-pk-icon {
    font-size: 0.9rem;
  }
  .companion-character-wrapper {
    width: 85px;
    height: 85px;
  }
  .timeline-node {
    padding-left: 42px;
  }
  .timeline-connector {
    left: 5px;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    max-width: 24px;
    max-height: 24px;
    border-width: 2px;
  }
  .timeline-connector::after {
    width: 6px;
    height: 6px;
    border-width: 2px;
  }
  .timeline-container::before {
    left: 16px;
  }
  .timeline-role {
    font-size: 1rem;
  }
  .timeline-content {
    padding: 1rem;
  }
  .main-header {
    padding: 0.75rem 1rem;
  }
  .logo-text {
    font-size: 1.25rem;
  }
  .mobile-nav-drawer {
    top: 49px;
    padding: 1rem;
  }
  .mobile-nav-link {
    font-size: 1rem;
  }
  .modal-card {
    width: 95%;
    padding: 1.25rem;
  }
}

/* =============================================
   LIGHT THEME OVERRIDES (POKÉ BALL PALETTE)
   ============================================= */
body.light-theme {
  --bg-dark: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.9);
  --border-glass: rgba(17, 24, 39, 0.1);
  --text-main: #111827;
  --text-muted: #374151;

  /* Primary Poke Ball red for brand alignment */
  --color-primary: #dc2626;
  --color-primary-glow: rgba(220, 38, 38, 0.15);

  --color-water: #0284c7;
  --color-water-glow: rgba(2, 132, 199, 0.2);

  --color-grass: #15803d;
  --color-grass-glow: rgba(21, 128, 61, 0.2);

  --color-fire: #b91c1c;
  --color-fire-glow: rgba(185, 28, 28, 0.2);

  --color-devops: #6d28d9;
}

/* Light Theme Header, Nav & Footers */
body.light-theme .main-header {
  background: rgba(248, 250, 252, 0.9);
  border-bottom-color: rgba(17, 24, 39, 0.08);
}
body.light-theme .logo-text {
  color: #111827;
}
body.light-theme .nav-link {
  color: #374151;
}
body.light-theme .nav-link:hover,
body.light-theme .nav-link.active {
  color: #111827;
  text-shadow: none;
}
body.light-theme .mobile-nav-drawer {
  background: rgba(248, 250, 252, 0.98);
  border-bottom-color: rgba(17, 24, 39, 0.08);
}
body.light-theme .mobile-nav-link {
  color: #374151;
}
body.light-theme .mobile-nav-link:hover {
  color: var(--color-primary);
}
body.light-theme .main-footer {
  background: rgba(248, 250, 252, 0.9);
  border-top-color: rgba(17, 24, 39, 0.08);
}
body.light-theme .mobile-nav-toggle .bar {
  background-color: #111827;
}

/* Light Theme Form Controls and Search Input Fields */
body.light-theme .contact-form-panel input,
body.light-theme .contact-form-panel textarea,
body.light-theme .search-wrapper input,
body.light-theme .starter-btn {
  background-color: rgba(17, 24, 39, 0.03);
  border-color: rgba(17, 24, 39, 0.08);
  color: var(--text-main);
}

body.light-theme .contact-form-panel input:focus,
body.light-theme .contact-form-panel textarea:focus,
body.light-theme .search-wrapper input:focus {
  background-color: rgba(255, 255, 255, 0.95);
  border-color: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary-glow);
}

/* Light Theme Starter Companion Bubble & Selectors */
body.light-theme .companion-bubble {
  background-color: rgba(17, 24, 39, 0.03);
  border-color: rgba(17, 24, 39, 0.06);
}
body.light-theme .companion-bubble::after {
  border-color: rgba(17, 24, 39, 0.03) transparent;
}
body.light-theme .starter-btn:hover {
  border-color: var(--color-primary);
  color: var(--text-main);
}

/* Light Theme Certifications & Experience elements */
body.light-theme .cert-card {
  background: rgba(17, 24, 39, 0.01);
}
body.light-theme .timeline-bullets li {
  color: #1f2937;
}
body.light-theme .timeline-date {
  background-color: rgba(17, 24, 39, 0.02);
  border-color: rgba(17, 24, 39, 0.05);
  color: #374151;
}
body.light-theme .timeline-achieve {
  background-color: rgba(21, 128, 61, 0.08);
  border-color: rgba(21, 128, 61, 0.15);
  color: #15803d;
}

/* Light Theme Buttons & Project items */
body.light-theme .btn-secondary {
  border-color: rgba(17, 24, 39, 0.12);
  color: #111827;
}
body.light-theme .btn-secondary:hover {
  background: rgba(17, 24, 39, 0.03);
}
body.light-theme .project-card:hover .project-details {
  border-color: var(--color-primary);
}
body.light-theme .project-badge-featured {
  background-color: #dc2626;
  color: white;
}
body.light-theme .proj-link-btn-git {
  border-color: rgba(17, 24, 39, 0.12);
  color: #111827;
}
body.light-theme .proj-link-btn-git:hover {
  background-color: rgba(17, 24, 39, 0.03);
}
body.light-theme .proj-link-btn-demo {
  color: white;
}

/* Light Theme Coordinates Contact Icons */
body.light-theme .coord-icon,
body.light-theme .social-icon-btn {
  background-color: rgba(17, 24, 39, 0.02);
  color: #374151;
}
body.light-theme .social-icon-btn:hover {
  background-color: var(--color-primary-glow);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

body.light-theme .interests-tags li {
  background-color: rgba(17, 24, 39, 0.03);
  color: #1f2937;
}
body.light-theme .interests-tags li:hover {
  background-color: var(--color-primary-glow);
  border-color: var(--color-primary);
  color: #111827;
}

body.light-theme .control-btn {
  background: rgba(255, 255, 255, 0.95);
  color: #111827;
  border-color: rgba(17, 24, 39, 0.1);
}
body.light-theme .control-btn:hover {
  background: #ffffff;
  border-color: var(--color-primary);
}

/* Experience card hover state contrast fix in light theme */
body.light-theme .timeline-node:hover .timeline-content {
  background: #ffffff ;
  border-color: var(--color-primary) ;
  box-shadow: 0 10px 25px var(--color-primary-glow) ;
}

body.light-theme .timeline-node:hover .timeline-role {
  color: #111827 ;
}

body.light-theme .timeline-node:hover .timeline-company {
  color: var(--color-primary) ;
}

body.light-theme .timeline-node:hover .timeline-date {
  color: #374151 ;
  background-color: rgba(0, 0, 0, 0.05) ;
  border-color: rgba(0, 0, 0, 0.1) ;
}

body.light-theme .timeline-node:hover .timeline-bullets li {
  color: #1f2937 ;
}

body.light-theme .timeline-node:hover .timeline-bullets li::before {
  color: var(--color-primary) ;
}

body.light-theme .timeline-node:hover .timeline-achieve {
  background-color: #f0fdf4 ;
  border-color: #bbf7d0 ;
  color: #15803d ;
}

/* Success Modal */
body.light-theme .modal-overlay {
  background-color: rgba(17, 24, 39, 0.4);
}

/* =============================================
   POKÉMON AUTHENTIC VISUAL ANIMATIONS
   ============================================= */

/* 1. Rare Shiny TCG Holographic Shimmer Effect */
.glass-panel, .skill-card {
  position: relative;
}
.glass-panel::after, .skill-card::after {
  content: '';
  position: absolute;
  top: -150%;
  left: -150%;
  width: 300%;
  height: 300%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0.06) 48%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.06) 52%,
    rgba(255, 255, 255, 0) 60%
  );
  transform: rotate(25deg);
  transition: none;
  pointer-events: none;
  z-index: 5;
}
.glass-panel:hover::after, .skill-card:hover::after {
  transition: transform 1.2s cubic-bezier(0.1, 0.8, 0.3, 1);
  transform: translate(100%, 100%) rotate(25deg);
}

/* 2. Poké Ball Wobble/Shake Animation on hover */
@keyframes pokeball-shake-wobble {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  15% { transform: translate3d(0, 0, 0) rotate(-15deg); }
  30% { transform: translate3d(0, 0, 0) rotate(15deg); }
  45% { transform: translate3d(0, 0, 0) rotate(-10deg); }
  60% { transform: translate3d(0, 0, 0) rotate(10deg); }
  75% { transform: translate3d(0, 0, 0) rotate(-5deg); }
  90% { transform: translate3d(0, 0, 0) rotate(5deg); }
  100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}

.timeline-node:hover .timeline-connector {
  animation: pokeball-shake-wobble 0.6s ease-in-out;
}
.pokeball-hologram:hover .pokeball-core {
  animation: pokeball-shake-wobble 0.6s ease-in-out;
}

/* 3. Retro Active Arrow Selection Indicators */
@keyframes menu-arrow-blink {
  0%, 100% { opacity: 0; transform: translateY(-50%) translateX(-4px); }
  50% { opacity: 1; transform: translateY(-50%) translateX(0); }
}
.nav-link.active::before {
  content: '▶';
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-primary);
  font-size: 0.7rem;
  animation: menu-arrow-blink 0.8s infinite steps(2);
}

.filter-skill-btn.active::before,
.filter-proj-btn.active::before {
  content: '▶';
  margin-right: 0.3rem;
  color: var(--bg-dark);
  font-size: 0.75rem;
  display: inline-block;
}
body.light-theme .filter-skill-btn.active::before,
body.light-theme .filter-proj-btn.active::before {
  color: #ffffff;
}

/* 4. Full Screen Electric Shock Overlay */
.electric-shock-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  pointer-events: none;
  display: none;
}
body.electric-shock-active .electric-shock-overlay {
  display: block;
  animation: shock-flash-sequence 0.5s ease-out forwards;
}
@keyframes shock-flash-sequence {
  0% { background-color: rgba(250, 204, 21, 0.15); }
  15% { background-color: rgba(255, 255, 255, 0.8); }
  30% { background-color: rgba(250, 204, 21, 0.4); }
  45% { background-color: rgba(6, 182, 212, 0.4); }
  60% { background-color: rgba(250, 204, 21, 0.4); }
  75% { background-color: rgba(255, 255, 255, 0.8); }
  100% { background-color: rgba(250, 204, 21, 0); }
}

/* =============================================
   MOBILE TOUCH & ACCESSIBILITY OPTIMIZATIONS
   ============================================= */

/* Safe area padding for notched devices (iPhone X+, etc.) */
@supports (padding: max(0px)) {
  @media (max-width: 768px) {
    .main-header {
      padding-left: max(1.25rem, env(safe-area-inset-left));
      padding-right: max(1.25rem, env(safe-area-inset-right));
    }
    .section-container {
      padding-left: max(1rem, env(safe-area-inset-left));
      padding-right: max(1rem, env(safe-area-inset-right));
    }
    .main-footer {
      padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }
    .fixed-companion {
      bottom: max(15px, env(safe-area-inset-bottom));
      right: max(15px, env(safe-area-inset-right));
    }
    .global-controls {
      bottom: calc(max(15px, env(safe-area-inset-bottom)) + 80px); /* 70px companion + 10px spacing */
      right: max(15px, env(safe-area-inset-right));
    }
  }
  @media (max-width: 480px) {
    .fixed-companion {
      bottom: max(10px, env(safe-area-inset-bottom));
      right: max(10px, env(safe-area-inset-right));
    }
    .global-controls {
      bottom: calc(max(10px, env(safe-area-inset-bottom)) + 65px); /* 55px companion + 10px spacing */
      right: max(10px, env(safe-area-inset-right));
    }
  }
}

/* Prevent accidental text selection during swipes on mobile */
@media (max-width: 768px) {
  .starter-btn,
  .filter-skill-btn,
  .filter-proj-btn,
  .nav-link,
  .mobile-nav-link,
  .control-btn,
  .btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
}

/* Suppress hover effects on touch devices to avoid sticky hover states */
@media (hover: none) and (pointer: coarse) {
  .skill-card:hover {
    transform: none;
  }
  .glass-panel:hover::after, .skill-card:hover::after {
    transform: rotate(25deg);
  }
  .timeline-node:hover .timeline-connector {
    animation: none;
    transform: none;
  }
  .timeline-node:hover .timeline-content {
    background: var(--bg-card);
    border-color: var(--border-glass);
  }
  .pokeball-hologram:hover .pokeball-core:not(.avatar-mode-active) {
    animation: pokeball-default-movement 8s ease-in-out infinite;
  }
  .pokeball-hologram:hover .pokeball-core.avatar-mode-active {
    animation: avatar-hologram-movement 6s ease-in-out infinite;
  }
  .cert-card:hover {
    transform: none;
  }
  .interests-tags li:hover {
    transform: none;
  }
  .social-icon-btn:hover {
    transform: none;
  }
}

/* =============================================
   EXPANDABLE PROJECTS & GALLERY STYLING
   ============================================= */

.project-card {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform;
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-card:focus-visible {
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.project-expand-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out, margin 0.4s ease-in-out;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-card.expanded .project-expand-details {
  max-height: 1200px;
  opacity: 1;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.expand-toggle-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  font-size: 0.75rem;
  color: var(--color-primary);
  font-family: var(--font-mono);
  border-top: 1px dashed var(--border-glass);
  padding-top: 0.75rem;
  opacity: 0.8;
  width: 100%;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.project-card.expanded .expand-arrow {
  transform: rotate(180deg);
}

.expand-arrow {
  transition: transform 0.3s ease;
  font-size: 0.85rem;
}

.project-expand-details .project-tech-tags {
  margin-top: 0;
  margin-bottom: 0;
}

/* Inline expanded details inside project grid cards */
.project-long-desc-inline {
  border-top: 1px dashed var(--border-glass);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}

.project-long-desc-inline h4 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.project-long-desc-inline p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0;
}

.project-links-inline {
  display: flex;
  gap: 0.75rem;
  border-top: 1px solid var(--border-glass);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}

.project-links-inline .proj-link-btn-git,
.project-links-inline .proj-link-btn-demo {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.project-links-inline .proj-link-btn-git {
  background: rgba(255,255,255,0.04);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
}

.project-links-inline .proj-link-btn-git:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--text-main);
}

.project-links-inline .proj-link-btn-demo {
  background: var(--color-primary);
  color: var(--bg-dark);
}

.project-links-inline .proj-link-btn-demo:hover {
  background: #fef08a;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.3);
}

body.light-theme .project-links-inline .proj-link-btn-demo {
  background: #dc2626;
  color: white;
}

body.light-theme .project-links-inline .proj-link-btn-demo:hover {
  background: #b91c1c;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.2);
}

.project-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.gallery-main-wrapper {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--border-glass);
}

.gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease;
}

.gallery-thumbnails {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 4px;
}

.gallery-thumbnails::-webkit-scrollbar {
  height: 4px;
}
.gallery-thumbnails::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 2px;
}

.gallery-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border-glass);
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.gallery-thumb:hover, .gallery-thumb.active {
  opacity: 1;
  border-color: var(--color-primary);
  box-shadow: 0 0 8px var(--color-primary-glow);
}

.project-long-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.01);
  border-left: 3px solid var(--color-primary);
  padding: 0.75rem 1rem;
  border-radius: 0 6px 6px 0;
}

.project-long-desc h4 {
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 0.35rem;
  font-family: var(--font-display);
}

.full-width-coordinates {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

/* Persistent Companion Display (Bottom Right) */
.fixed-companion {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  width: 90px;
  height: 90px;
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  will-change: transform, opacity;
}

/* Transparent chat bubble for bottom-right companion */
.fixed-companion-bubble {
  position: fixed;
  bottom: 125px;
  right: 20px;
  width: 200px;
  background: rgba(15, 23, 42, 0.75);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  font-size: 0.8rem;
  line-height: 1.4;
  font-family: var(--font-display);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10000;
}

.fixed-companion-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 35px;
  width: 12px;
  height: 12px;
  background: rgba(15, 23, 42, 0.75);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transform: rotate(45deg);
}

body.light-theme .fixed-companion-bubble {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(17, 24, 39, 0.12);
  color: #1f2937;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body.light-theme .fixed-companion-bubble::after {
  background: rgba(255, 255, 255, 0.85);
  border-right: 1px solid rgba(17, 24, 39, 0.12);
  border-bottom: 1px solid rgba(17, 24, 39, 0.12);
}

.fixed-companion-bubble.active {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .fixed-companion-bubble {
    bottom: 100px;
    right: 15px;
    width: 170px;
    font-size: 0.75rem;
  }
}
@media (max-width: 480px) {
  .fixed-companion-bubble {
    bottom: 80px;
    right: 10px;
    width: 150px;
    font-size: 0.72rem;
  }
}

.fixed-companion img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.35));
}

@media (max-width: 768px) {
  .fixed-companion {
    width: 70px;
    height: 70px;
    bottom: 15px;
    right: 15px;
  }
}

@media (max-width: 480px) {
  .fixed-companion {
    width: 55px;
    height: 55px;
    bottom: 10px;
    right: 10px;
  }
}

/* LANGUAGES SECTION IN ACADEMY */
.languages-grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.lang-detail-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-left: 3px solid var(--color-primary);
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  transition: all 0.3s ease;
  position: relative;
  will-change: transform;
}

.lang-detail-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(250, 204, 21, 0.08);
}

.lang-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.lang-icon {
  font-size: 1.2rem;
  filter: drop-shadow(0 0 5px var(--color-primary-glow));
}

.lang-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  line-height: 1.2;
}

.lang-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.3);
  color: var(--color-primary);
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  text-transform: uppercase;
  font-weight: 600;
  margin-left: auto;
}

@media (max-width: 480px) {
  .lang-badge {
    margin-left: 0;
    margin-top: 0.25rem;
  }
}

.lang-cert {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 0.4rem 0;
  line-height: 1.4;
}

.lang-notes {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
  opacity: 0.85;
}

/* Light Theme overrides for Languages */
body.light-theme .lang-badge {
  background: rgba(220, 38, 38, 0.05);
  border-color: rgba(220, 38, 38, 0.2);
  color: #dc2626;
}
body.light-theme .lang-detail-card {
  background: rgba(17, 24, 39, 0.01);
}

/* =============================================
   PROJECT DETAILS MODAL STYLING
   ============================================= */
html.modal-open, body.modal-open {
  overflow: hidden ;
  height: 100% ;
}

.project-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(3, 7, 18, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.project-modal-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.project-modal-card {
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  height: auto;
  display: block;
  overflow: hidden;
  padding: 2.25rem;
  position: relative;
  border-radius: var(--border-radius);
  transform: translateY(20px);
  transition: transform 0.3s var(--transition-bezier);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(250, 204, 21, 0.05);
}

.project-modal-overlay:not(.hidden) .project-modal-card {
  transform: translateY(0);
}

.project-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.project-modal-close:hover {
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.05);
}

.project-modal-body {
  margin-top: 0.5rem;
  overflow-y: auto;
  max-height: calc(85vh - 5rem);
  scrollbar-width: thin;
  padding-right: 0.5rem;
  overflow-anchor: none; /* Prevent scroll anchoring jumps when content loads */
}

/* Modal Internal Layout */
.modal-project-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (max-width: 768px) {
  .modal-project-layout {
    gap: 1.25rem;
  }
  .project-modal-card {
    padding: 1.25rem;
    max-height: 90vh;
    height: auto;
  }
  .project-modal-body {
    max-height: calc(90vh - 3.5rem);
    overflow-anchor: none;
  }
  .modal-gallery-main {
    max-height: 250px;
  }
  .modal-gallery-main img {
    max-height: 250px;
  }
}

.modal-project-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-gallery-main {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: zoom-in;
  position: relative;
}

.modal-gallery-main::after {
  content: attr(data-click-expand);
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(7, 13, 25, 0.8);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  color: var(--text-main);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  border: 1px solid var(--border-glass);
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.modal-gallery-main:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.modal-gallery-main img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.modal-gallery-main:hover img {
  transform: scale(1.02);
}

.modal-gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.modal-gallery-thumbs img {
  width: 70px;
  height: 45px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.5;
  border: 1px solid var(--border-glass);
  transition: all 0.2s ease;
}

.modal-gallery-thumbs img:hover,
.modal-gallery-thumbs img.active {
  opacity: 1;
  border-color: var(--color-primary);
  transform: scale(1.05);
}

.modal-project-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.modal-project-info h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0.5rem 0 1rem 0;
  line-height: 1.2;
}

.modal-project-info p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.modal-project-info .project-long-desc {
  width: 100%;
  border-top: 1px solid var(--border-glass);
  padding-top: 1rem;
  margin-bottom: 1.25rem;
}

.modal-project-info .project-long-desc h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.modal-project-info .project-long-desc p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0;
}

.modal-project-info .project-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.modal-project-info .project-tech-tags li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background-color: rgba(255,255,255,0.03);
  color: var(--color-primary);
  border: 1px solid var(--border-glass);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

body.light-theme .modal-project-info .project-tech-tags li {
  background-color: rgba(17,24,39,0.02);
  color: #dc2626;
}

.modal-project-links {
  display: flex;
  gap: 1rem;
  width: 100%;
  margin-top: 1.5rem;
}

.modal-project-links .proj-link-btn {
  flex: 1;
  max-width: 200px;
  text-align: center;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  transition: all 0.2s ease;
}

.modal-project-links .proj-link-btn-git {
  background: rgba(255,255,255,0.04);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
}

.modal-project-links .proj-link-btn-git:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--text-main);
}

.modal-project-links .proj-link-btn-demo {
  background: var(--color-primary);
  color: var(--bg-dark);
}

.modal-project-links .proj-link-btn-demo:hover {
  background: #fef08a;
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.4);
}

body.light-theme .modal-project-links .proj-link-btn-demo {
  background: #dc2626;
  color: white;
}

body.light-theme .modal-project-links .proj-link-btn-demo:hover {
  background: #b91c1c;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.3);
}

body.light-theme .project-modal-overlay {
  background-color: rgba(255, 255, 255, 0.85);
}

body.light-theme .project-modal-card {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

body.light-theme .modal-gallery-main::after {
  background: rgba(255, 255, 255, 0.95);
  color: #111827;
  border-color: rgba(17, 24, 39, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* =============================================
   HEADER LOGO DROPDOWN STYLING
   ============================================= */
.header-logo {
  position: relative;
}

/* Arrow Bounce Keyframe Animation */
@keyframes arrow-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(2px);
  }
}

/* Smooth color cycling frame around logo */
@keyframes border-rainbow-cycle {
  0% {
    border-color: var(--color-primary, #ef4444);
    box-shadow: 0 0 4px var(--color-primary-glow, rgba(239, 68, 68, 0.2));
  }
  20% {
    border-color: #3b82f6; /* Water Blue */
    box-shadow: 0 0 4px rgba(59, 130, 246, 0.2);
  }
  40% {
    border-color: #10b981; /* Grass Green */
    box-shadow: 0 0 4px rgba(16, 185, 129, 0.2);
  }
  60% {
    border-color: #f59e0b; /* Fire Orange */
    box-shadow: 0 0 4px rgba(245, 158, 11, 0.2);
  }
  80% {
    border-color: #a855f7; /* Fairy Purple */
    box-shadow: 0 0 4px rgba(168, 85, 247, 0.2);
  }
  100% {
    border-color: var(--color-primary, #ef4444);
    box-shadow: 0 0 4px var(--color-primary-glow, rgba(239, 68, 68, 0.2));
  }
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  background: rgba(7, 13, 25, 0.45);
  border: 1px solid var(--border-glass);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: border-rainbow-cycle 8s infinite linear;
}

.logo-link:hover {
  background-color: rgba(7, 13, 25, 0.7);
  animation-duration: 4s; /* Speed up color cycle on hover for visual feedback */
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.1), inset 0 0 4px rgba(255, 255, 255, 0.05);
}

.logo-link.dropdown-open {
  animation: none; /* Lock to current companion theme color when open */
  border-color: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary-glow);
  background-color: rgba(7, 13, 25, 0.85);
}

.logo-arrow {
  font-size: 0.65rem;
  display: inline-block;
  transition: transform 0.3s ease, color 0.3s ease, opacity 0.3s ease;
  color: var(--text-muted);
  opacity: 0.7;
  animation: arrow-bounce 2s infinite ease-in-out;
}

.logo-link:hover .logo-arrow {
  color: var(--color-primary);
  opacity: 1;
  animation: arrow-bounce 1s infinite ease-in-out; /* Bounce faster on hover to encourage interaction */
}

.logo-link.dropdown-open .logo-arrow {
  animation: none;
  transform: rotate(180deg);
  color: var(--color-primary);
  opacity: 1;
}

.logo-dropdown {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 0;
  min-width: 220px;
  background: rgba(10, 18, 30, 0.95);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--color-primary-glow);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 150;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.logo-dropdown.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.logo-dropdown-item {
  padding: 0.75rem 1rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-dropdown-item::after {
  content: '▶';
  font-size: 0.65rem;
  opacity: 0;
  transform: translateX(-5px);
  transition: all 0.2s ease;
  color: var(--color-primary);
}

.logo-dropdown-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  padding-left: 1.25rem;
}

.logo-dropdown-item:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.logo-dropdown-item.active {
  color: var(--color-primary);
  background: rgba(250, 204, 21, 0.1);
  border-left: 3px solid var(--color-primary);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Light theme overrides for dropdown */
body.light-theme .logo-link {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .logo-link:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

body.light-theme .logo-link.dropdown-open {
  background-color: rgba(255, 255, 255, 0.95);
}

body.light-theme .logo-dropdown {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 0 15px rgba(220, 38, 38, 0.1);
}

body.light-theme .logo-dropdown-item:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-main);
}

/* Dynamic Active Tab Container & Fade-In Animation */
#dynamic-active-tab-container {
  display: inline-flex;
  align-items: center;
}

#dynamic-active-tab-container .nav-link {
  animation: tab-fade-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tab-fade-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Lightbox Overlay Styles */
.image-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 7, 18, 0.95);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  z-index: 3000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.image-lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px var(--color-primary-glow);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.image-lightbox-overlay.active .lightbox-image {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2.5rem;
  cursor: pointer;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 10;
}

.lightbox-close:hover {
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.05);
}

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 1rem 1.5rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  border-radius: 8px;
  backdrop-filter: blur(5px);
}

.lightbox-prev {
  left: 2rem;
}

.lightbox-next {
  right: 2rem;
}

.lightbox-prev:hover, .lightbox-next:hover {
  background: rgba(250, 204, 21, 0.8);
  color: #000;
}

.lightbox-counter {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  z-index: 10;
}

@media (max-width: 768px) {
  .lightbox-prev, .lightbox-next {
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 1.5rem;
  }

  .lightbox-prev {
    left: 0.75rem;
  }

  .lightbox-next {
    right: 0.75rem;
  }
}

/* Prevent scrolling when lightbox is open */
html.lightbox-open, body.lightbox-open {
  overflow: hidden ;
  height: 100% ;
}

/* =============================================
   LAYOUT CONTAINMENT — PERFORMANCE
   Reduces layout/paint recalculation cost for
   off-screen or inactive sections and grids.
   ============================================= */
.section-container:not(.active) {
  contain: strict;
}
.skills-grid,
.projects-grid,
.certifications-grid,
.languages-grid-layout {
  contain: layout style;
}

/* =============================================
   PREFERS-REDUCED-MOTION — ACCESSIBILITY
   Respects OS-level motion preferences.
   Disables all decorative animations/transitions
   while keeping content fully visible.
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  /* Disable all keyframe animations globally */
  *, *::before, *::after {
    animation-duration: 0.01ms ;
    animation-iteration-count: 1 ;
    transition-duration: 0.01ms ;
    scroll-behavior: auto ;
  }

  /* Keep static transform states */
  .pokeball-hologram {
    animation: none;
    transform: translateY(0);
  }
  .hologram-ring {
    animation: none;
  }
  .pokeball-core {
    animation: none;
    transform: none;
  }
  .pokeball-core.avatar-mode-active {
    animation: none;
    transform: none;
  }
  .pokeball-center-button {
    animation: none;
  }
  .companion-avatar {
    animation: none;
    transform: translateY(0);
  }
  .companion-avatar::before {
    animation: none;
  }
  .badge-dot.animate-pulse {
    animation: none;
    opacity: 1;
    transform: scale(1);
  }
  .loading-bar {
    animation: none;
    transform: translateX(0);
  }
  .bolt-outer, .bolt-inner {
    animation: none;
    stroke-dashoffset: 0;
  }
  .pokeball-spinner {
    animation: none;
  }

  /* Disable hover transforms */
  .skill-card:hover,
  .cert-card:hover,
  .project-card:hover,
  .social-icon-btn:hover,
  .interests-tags li:hover,
  .lang-detail-card:hover,
  .btn-primary:hover,
  .btn-secondary:hover,
  .btn-cta:hover {
    transform: none ;
  }

  /* Disable shimmer effect */
  .glass-panel:hover::after,
  .skill-card:hover::after {
    transform: rotate(25deg) ;
  }

  /* Timeline connector */
  .timeline-node:hover .timeline-connector {
    animation: none;
    transform: none;
  }

  /* Wipe transition: instant swap */
  .wipe-top, .wipe-bottom, .wipe-center-circle {
    transition-duration: 0.01ms ;
  }

  /* Section fade-in: just appear */
  .section-container {
    animation: none;
    opacity: 1;
  }

  /* Disable backdrop blur for performance */
  .main-header,
  .glass-panel,
  .skill-card,
  .timeline-content,
  .modal-overlay,
  .mobile-nav-drawer,
  .control-btn,
  .fixed-companion-bubble,
  .project-modal-overlay,
  .image-lightbox-overlay,
  .logo-dropdown {
    -webkit-backdrop-filter: none ;
    backdrop-filter: none ;
  }
}

/* =============================================
   BACKDROP-FILTER FALLBACK
   For browsers that don't support backdrop-filter
   (very old Chrome, Firefox < 103, etc.)
   ============================================= */
@supports not ((backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .main-header {
    background: rgba(7, 13, 25, 0.95);
  }
  .glass-panel {
    background: rgba(15, 23, 42, 0.92);
  }
  .skill-card {
    background: rgba(15, 23, 42, 0.85);
  }
  .timeline-content {
    background: rgba(15, 23, 42, 0.85);
  }
  .modal-overlay {
    background-color: rgba(3, 7, 18, 0.95);
  }
  .mobile-nav-drawer {
    background: rgba(7, 13, 25, 0.98);
  }
  .control-btn {
    background: rgba(30, 41, 59, 0.9);
  }
  .fixed-companion-bubble {
    background: rgba(15, 23, 42, 0.95);
  }
  .project-modal-overlay {
    background-color: rgba(3, 7, 18, 0.95);
  }
  .image-lightbox-overlay {
    background: rgba(3, 7, 18, 0.98);
  }
  .logo-dropdown {
    background: rgba(10, 18, 30, 0.98);
  }
  .modal-gallery-main::after {
    background: rgba(7, 13, 25, 0.95);
  }

  /* Light theme fallbacks */
  body.light-theme .main-header {
    background: rgba(248, 250, 252, 0.98);
  }
  body.light-theme .mobile-nav-drawer {
    background: rgba(248, 250, 252, 0.99);
  }
  body.light-theme .glass-panel {
    background: rgba(255, 255, 255, 0.95);
  }
  body.light-theme .fixed-companion-bubble {
    background: rgba(255, 255, 255, 0.95);
  }
  body.light-theme .project-modal-overlay {
    background-color: rgba(255, 255, 255, 0.95);
  }
}

/* =============================================
   FLEXBOX GAP FALLBACK (Safari < 14.1)
   ============================================= */
@supports not (gap: 1rem) {
  .hero-buttons > * + * {
    margin-left: 1.5rem;
  }
  .social-links-container > * + * {
    margin-left: 1rem;
  }
  .projects-filters > * + * {
    margin-left: 0.75rem;
  }
  .starter-select > * + * {
    margin-left: 0.75rem;
  }
  .skills-filters > * + * {
    margin-left: 1rem;
  }
}

/* =============================================
   TOUCH TARGET MINIMUM SIZING ENFORCEMENT
   Ensure all tappable elements meet 44x44px min
   on touch devices per WCAG / Apple HIG.
   ============================================= */
@media (pointer: coarse) {
  .filter-skill-btn,
  .filter-proj-btn {
    min-height: 44px;
    min-width: 44px;
  }
  .starter-btn {
    min-height: 44px;
  }
  .nav-link,
  .mobile-nav-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .cert-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .proj-link-btn {
    min-height: 44px;
  }
  .project-modal-close {
    min-width: 44px;
    min-height: 44px;
  }
  .lightbox-close {
    min-width: 44px;
    min-height: 44px;
  }
}

/* =============================================
   MOBILE PERFORMANCE OPTIMIZATIONS
   ============================================= */
@media (max-width: 768px) {
  body {
    --bg-card: rgba(15, 23, 42, 0.85) ;
  }
  body.light-theme {
    --bg-card: rgba(255, 255, 255, 0.95) ;
  }

  /* Disable backdrop blurs for all layout panels and fixed elements to prevent rendering lag on mobile scroll */
  .glass-panel,
  .skill-card,
  .timeline-content,
  .main-header,
  .mobile-nav-drawer,
  .control-btn,
  .fixed-companion-bubble,
  .modal-overlay,
  .project-modal-overlay,
  .image-lightbox-overlay,
  .logo-dropdown {
    -webkit-backdrop-filter: none ;
    backdrop-filter: none ;
  }

  /* Secure text readability with solid/highly-opaque backgrounds since blur is disabled */
  .main-header {
    background: rgba(7, 13, 25, 0.95) ;
  }
  body.light-theme .main-header {
    background: rgba(248, 250, 252, 0.98) ;
  }

  /* Optimize avatar hologram animation for mobile (use transform-only, no paint-heavy box-shadow animation) */
  .pokeball-core.avatar-mode-active {
    animation: avatar-hologram-movement-mobile 6s ease-in-out infinite ;
    box-shadow: 0 0 25px var(--color-primary-glow), inset 0 0 30px rgba(255, 255, 255, 0.05) ;
  }
}

/* =============================================
   INTERACTIVE TRAINER CARD AND HERO WRAPPER
   ============================================= */
.hero-visual-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}

@media (min-width: 1200px) {
  .hero-visual-wrapper {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
  }
}

.trainer-card {
  width: 100%;
  max-width: 340px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.25rem;
  font-family: var(--font-primary, inherit);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  text-align: left;
}

body.light-theme .trainer-card {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.trainer-card:hover {
  transform: translateY(-5px);
  border-color: rgba(250, 204, 21, 0.4);
  box-shadow: 0 12px 40px 0 rgba(250, 204, 21, 0.15);
}

.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.05) 0%, transparent 70%);
  pointer-events: none;
  transition: transform 0.5s ease;
}

.trainer-card:hover .card-glow {
  transform: translate(10%, 10%);
}

.trainer-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

body.light-theme .trainer-card-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.trainer-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1rem;
  color: var(--color-primary);
}

.trainer-status-dot {
  width: 6px;
  height: 6px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
}

.trainer-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.trainer-stat-row {
  display: flex;
  font-size: 0.85rem;
  line-height: 1.4;
}

.stat-label {
  width: 70px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  letter-spacing: 0.05rem;
}

body.light-theme .stat-label {
  color: rgba(0, 0, 0, 0.5);
}

.stat-value {
  flex: 1;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

body.light-theme .stat-value {
  color: rgba(15, 23, 42, 0.9);
}

.trainer-card-footer {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
}

.exp-bar-container {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

body.light-theme .exp-bar-container {
  background: rgba(0, 0, 0, 0.1);
}

.exp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), #eab308);
  border-radius: 3px;
}

.exp-text {
  color: var(--color-primary);
  font-weight: 700;
  white-space: nowrap;
}

/* =============================================
   DYNAMIC GYM BADGES AND POKEBALL RATINGS (Global)
   ============================================= */
/* Gym Badge container */
.gym-badge {
  display: inline-block;
  position: relative;
  width: 24px;
  height: 24px;
  vertical-align: middle;
  box-sizing: border-box;
  margin-right: 6px;
  flex-shrink: 0;
}

/* 1. Boulder Badge: Grey octagon */
.gym-badge.badge-boulder {
  background: #94a3b8;
  clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
  border: 1.5px solid #475569;
}

/* 2. Cascade Badge: Blue droplet */
.gym-badge.badge-cascade {
  background: #3b82f6;
  border-radius: 50% 50% 50% 50% / 0% 50% 50% 100%;
  transform: rotate(-45deg);
  border: 1.5px solid #1d4ed8;
  width: 20px;
  height: 20px;
  margin-left: 2px;
  margin-right: 8px;
}

/* 3. Thunder Badge: Yellow jagged lightning/star */
.gym-badge.badge-thunder {
  background: #fbbf24;
  clip-path: polygon(50% 0%, 65% 35%, 100% 35%, 75% 60%, 85% 100%, 50% 75%, 15% 100%, 25% 60%, 0% 35%, 35% 35%);
  border: 1.5px solid #d97706;
}

/* 4. Rainbow Badge: Red/Pink flower */
.gym-badge.badge-rainbow {
  background: #ec4899;
  border-radius: 50%;
  border: 1.5px solid #db2777;
  position: relative;
}
.gym-badge.badge-rainbow::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  background: var(--color-primary);
  border-radius: 50%;
  border: 1px solid #d97706;
  box-sizing: border-box;
}

/* 5. Soul Badge: Purple heart */
.gym-badge.badge-soul {
  background: #a855f7;
  border: 1.5px solid #7c3aed;
  clip-path: polygon(50% 15%, 80% 0%, 100% 30%, 50% 100%, 0% 30%, 20% 0%);
}

/* 6. Marsh Badge: Gold concentric circles */
.gym-badge.badge-marsh {
  background: #fbbf24;
  border-radius: 50%;
  border: 3px double #d97706;
  box-sizing: border-box;
}

/* 7. Volcano Badge: Red/orange flame */
.gym-badge.badge-volcano {
  background: #f97316;
  border: 1.5px solid #ea580c;
  clip-path: polygon(50% 0%, 85% 35%, 75% 70%, 50% 100%, 25% 70%, 15% 35%);
}

/* 8. Earth Badge: Green leaf/feather */
.gym-badge.badge-earth {
  background: #10b981;
  border: 1.5px solid #059669;
  border-radius: 100% 0% 100% 0% / 100% 0% 100% 0%;
  transform: rotate(-15deg);
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

/* Pokéball Stat Indicators */
.pokeballs-stat-row {
  display: inline-flex;
  gap: 4px;
  vertical-align: middle;
  align-items: center;
}

.pokeball-stat-indicator {
  width: 12px;
  height: 12px;
  border: 1px solid #000000;
  border-radius: 50%;
  position: relative;
  display: inline-block;
  background: #cbd5e1; /* Inactive grey */
  box-sizing: border-box;
  vertical-align: middle;
}

.pokeball-stat-indicator.active {
  background: linear-gradient(to bottom, #ef4444 50%, #ffffff 50%); /* Active red/white */
}

.pokeball-stat-indicator::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  width: 10px;
  height: 1px;
  background: #000000;
}

.pokeball-stat-indicator::before {
  content: "";
  position: absolute;
  top: 3.5px;
  left: 3.5px;
  width: 3px;
  height: 3px;
  background: #ffffff;
  border: 1px solid #000000;
  border-radius: 50%;
  z-index: 2;
  box-sizing: border-box;
}

/* Web UI specific badge adjustments */
.academy-card .gym-badge,
.cert-card .gym-badge {
  display: inline-block;
  vertical-align: middle;
  margin-bottom: 4px;
}

/* Hide print container on standard screen displays without using display: none to ensure assets load */
.print-only {
  position: absolute ;
  left: -99999px ;
  top: -99999px ;
  width: 1px ;
  height: 1px ;
  overflow: hidden ;
  opacity: 0 ;
  pointer-events: none ;
}

/* =============================================
   PRINT-ONLY STYLESHEET (A4 layout)
   ============================================= */
@media print {
  @page {
    size: A4;
    margin: 0;
  }

  /* Override screen hidden status */
  .print-only {
    position: static ;
    width: auto ;
    height: auto ;
    overflow: visible ;
    opacity: 1 ;
    pointer-events: auto ;
    display: block ;
  }

  /* Hide all standard webpage elements */
  body > *:not(#print-cv-container) {
    display: none ;
  }

  /* Reset body styles for print */
  body, html {
    background: #ffffff ;
    color: #000000 ;
    margin: 0 ;
    padding: 0 ;
    width: 210mm ;
    height: auto ;
    font-size: 8.5pt ;
    font-family: "Courier New", Courier, monospace, "Inter", sans-serif ;
    overflow: visible ;
    -webkit-print-color-adjust: exact ;
    print-color-adjust: exact ;
  }

  #print-cv-container {
    display: block ;
    width: 210mm ;
    margin: 0 ;
    padding: 0 ;
    box-sizing: border-box ;
    background: #ffffff ;
  }

  /* Explicit A4 Page Containers to simulate margins and control flow */
  .print-page {
    width: 210mm ;
    height: 297mm ;
    box-sizing: border-box ;
    padding: 10mm 12mm ;
    page-break-after: always ;
    page-break-inside: avoid ;
    position: relative ;
    background: #ffffff ;
    overflow: hidden ;
    display: flex ;
    flex-direction: column ;
  }

  .print-page:last-child {
    page-break-after: avoid ;
  }

  /* Retro Double-Border Pokémon Theme Frame */
  .print-page-border {
    border: 4px double #000000 ;
    height: 100% ;
    width: 100% ;
    box-sizing: border-box ;
    padding: 15px ;
    display: flex ;
    flex-direction: column ;
    justify-content: space-between ;
  }

  .print-page-content {
    display: flex ;
    flex-direction: column ;
    gap: 12px ;
  }

  /* Header Area (Trainer Card) */
  .print-header-card {
    display: flex ;
    gap: 15px ;
    border-bottom: 3px double #000000 ;
    padding-bottom: 10px ;
    margin-bottom: 5px ;
    align-items: center ;
  }

  .print-avatar-frame {
    width: 80px ;
    height: 80px ;
    border: 2px solid #000000 ;
    padding: 2px ;
    background: #ffffff ;
    flex-shrink: 0 ;
  }

  .print-avatar-frame img {
    width: 100% ;
    height: 100% ;
    object-fit: cover ;
  }

  .print-qr-frame {
    width: 66px ;
    height: 76px ;
    border: 2px solid #000000 ;
    padding: 3px ;
    background: #ffffff ;
    flex-shrink: 0 ;
    display: flex ;
    flex-direction: column ;
    align-items: center ;
    box-sizing: border-box ;
  }

  .print-qr-frame img {
    width: 56px ;
    height: 56px ;
    object-fit: contain ;
  }

  .print-qr-label {
    font-size: 5pt ;
    font-weight: bold ;
    font-family: "Courier New", Courier, monospace ;
    text-transform: uppercase ;
    text-align: center ;
    margin-top: 2px ;
    color: #000000 ;
  }

  .print-details {
    flex: 1 ;
    text-align: left ;
  }

  .print-card-badge {
    font-size: 7.5pt ;
    font-weight: bold ;
    letter-spacing: 1.5px ;
    border: 1px solid #000000 ;
    padding: 1px 5px ;
    display: inline-block ;
    margin-bottom: 4px ;
    font-family: "Courier New", Courier, monospace ;
  }

  .print-trainer-name {
    font-size: 14pt ;
    margin: 0 0 4px 0 ;
    font-weight: 800 ;
    text-transform: uppercase ;
    font-family: "Courier New", Courier, monospace ;
  }

  .print-meta-grid {
    display: grid ;
    grid-template-columns: repeat(2, 1fr) ;
    gap: 3px ;
    font-size: 7.5pt ;
  }

  .print-contacts {
    display: grid ;
    grid-template-columns: repeat(2, 1fr) ;
    gap: 3px ;
    font-size: 7.5pt ;
    border-top: 1px dashed #000000 ;
    padding-top: 5px ;
    margin-top: 5px ;
  }

  /* Section Headers styled as Retro Pokémon Menu Status Boxes */
  .print-section-header {
    font-size: 8.5pt ;
    font-weight: 800 ;
    text-transform: uppercase ;
    border: 2px solid #000000 ;
    box-shadow: 2px 2px 0px #000000 ;
    padding: 3px 8px ;
    background: #f3f4f6 ;
    margin: 0 0 6px 0 ;
    display: flex ;
    align-items: center ;
    gap: 6px ;
    width: fit-content ;
    font-family: "Courier New", Courier, monospace ;
  }

  .header-icon {
    font-size: 10pt ;
    display: inline-block ;
  }

  .print-section {
    margin-bottom: 5px ;
    text-align: left ;
  }

  /* Profile/Bio Section Columns */
  .print-grid-2col {
    display: grid ;
    grid-template-columns: 2fr 1fr ;
    gap: 12px ;
  }

  .print-bio-left p {
    margin: 0 0 6px 0 ;
    line-height: 1.3 ;
    font-size: 7.5pt ;
  }

  .print-goals-box {
    position: relative ;
    border: 2px solid #000000 ;
    box-shadow: 2px 2px 0px #000000 ;
    padding: 5px 12px 5px 6px ;
    font-size: 7.5pt ;
    background: #ffffff ;
    line-height: 1.25 ;
    margin-top: 4px ;
  }

  .print-goals-box::after {
    content: "▼" ;
    position: absolute ;
    bottom: 2px ;
    right: 5px ;
    font-size: 5.5pt ;
    color: #000000 ;
  }

  .print-bio-right h3 {
    margin: 0 0 4px 0 ;
    font-size: 8pt ;
    text-transform: uppercase ;
    font-weight: bold ;
    font-family: "Courier New", Courier, monospace ;
    border-bottom: 1px solid #000000 ;
    padding-bottom: 1px ;
  }

  .print-interests-list {
    margin: 0 ;
    padding-left: 10px ;
    font-size: 7.5pt ;
    line-height: 1.25 ;
  }

  /* Inline Icon Support */
  .print-type-icon {
    width: 13px ;
    height: 13px ;
    vertical-align: middle ;
    margin-right: 4px ;
    object-fit: contain ;
    display: inline-block ;
  }

  /* Skills Grid Layout */
  .print-skills-grid {
    display: grid ;
    grid-template-columns: repeat(2, 1fr) ;
    gap: 6px ;
  }

  .print-skill-item {
    border: 1px solid #000000 ;
    padding: 5px ;
    font-size: 7.5pt ;
    background: #ffffff ;
  }

  .print-skill-name-row {
    display: flex ;
    justify-content: space-between ;
    align-items: center ;
    border-bottom: 1px solid #000000 ;
    padding-bottom: 1px ;
    margin-bottom: 2px ;
  }

  .print-skill-title {
    display: flex ;
    align-items: center ;
    font-size: 8pt ;
  }

  .print-skill-cat {
    font-size: 6.5pt ;
    font-weight: bold ;
    border: 1px solid #000000 ;
    padding: 0 2px ;
    text-transform: uppercase ;
  }

  .print-skill-bar-row {
    display: flex ;
    justify-content: space-between ;
    align-items: center ;
    font-size: 7.5pt ;
    margin-bottom: 2px ;
  }

  /* Retro Styled HP/PP Progress Bars */
  .print-skill-bar-container {
    flex: 1 ;
    max-width: 120px ;
    height: 8px ;
    border: 1px solid #000000 ;
    background: #ffffff ;
    margin-right: 6px ;
    position: relative ;
    box-sizing: border-box ;
    overflow: hidden ;
    display: inline-block ;
  }

  .print-skill-bar-fill {
    height: 100% ;
    background-color: #888888 ;
  }

  /* Colored Skill Bars based on Pokemon Types */
  .print-skill-bar-fill.type-fire { background-color: #ef4444 ; }
  .print-skill-bar-fill.type-water { background-color: #3b82f6 ; }
  .print-skill-bar-fill.type-grass { background-color: #10b981 ; }
  .print-skill-bar-fill.type-electric { background-color: #eab308 ; }
  .print-skill-bar-fill.type-psychic { background-color: #ec4899 ; }
  .print-skill-bar-fill.type-steel { background-color: #6b7280 ; }
  .print-skill-bar-fill.type-normal { background-color: #9ca3af ; }
  .print-skill-bar-fill.type-fairy { background-color: #f472b6 ; }
  .print-skill-bar-fill.type-ghost { background-color: #6366f1 ; }
  .print-skill-bar-fill.type-dragon { background-color: #8b5cf6 ; }
  .print-skill-bar-fill.type-fighting { background-color: #dc2626 ; }
  .print-skill-bar-fill.type-flying { background-color: #60a5fa ; }
  .print-skill-bar-fill.type-ground { background-color: #d97706 ; }
  .print-skill-bar-fill.type-poison { background-color: #86198f ; }
  .print-skill-bar-fill.type-rock { background-color: #78350f ; }
  .print-skill-bar-fill.type-ice { background-color: #a5f3fc ; }
  .print-skill-bar-fill.type-bug { background-color: #84cc16 ; }
  .print-skill-bar-fill.type-stellar { background-color: #06b6d4 ; }

  .print-skill-val {
    font-size: 7pt ;
    font-weight: bold ;
    font-family: monospace ;
  }

  .print-skill-desc {
    margin: 0 ;
    font-size: 7pt ;
    line-height: 1.2 ;
    color: #444444 ;
  }

  /* Experiences / Adventure Timeline */
  .print-timeline {
    display: flex ;
    flex-direction: column ;
    gap: 8px ;
  }

  .print-experience-item {
    border-left: 2px solid #000000 ;
    padding-left: 8px ;
    margin-left: 4px ;
  }

  .print-exp-header {
    display: flex ;
    justify-content: space-between ;
    align-items: center ;
    margin-bottom: 2px ;
  }

  .print-exp-title {
    display: flex ;
    align-items: center ;
    gap: 2px ;
  }

  .print-exp-title h3 {
    margin: 0 ;
    font-size: 8.5pt ;
    font-weight: bold ;
  }

  .print-exp-company {
    font-weight: normal ;
    font-style: italic ;
  }

  .print-exp-dates {
    font-size: 7.5pt ;
    font-weight: bold ;
  }

  .print-exp-bullets {
    margin: 0 0 4px 0 ;
    padding-left: 12px ;
    font-size: 7.5pt ;
    line-height: 1.3 ;
  }

  /* Achievement box styled like dialog text box */
  .print-achievement-box {
    position: relative ;
    border: 2px solid #000000 ;
    box-shadow: 2px 2px 0px #000000 ;
    padding: 4px 14px 4px 8px ;
    margin-top: 3px ;
    display: flex ;
    gap: 6px ;
    align-items: center ;
    background: #ffffff ;
  }

  .print-achievement-box::after {
    content: "▼" ;
    position: absolute ;
    bottom: 2px ;
    right: 5px ;
    font-size: 5.5pt ;
    color: #000000 ;
  }

  .badge-levelup {
    font-size: 6pt ;
    font-weight: bold ;
    color: #000000 ;
    border: 1px solid #000000 ;
    padding: 1px 3px ;
    white-space: nowrap ;
    background: #e2e8f0 ;
  }

  .print-achievement-box p {
    margin: 0 ;
    font-size: 7pt ;
    line-height: 1.25 ;
  }

  /* Academy Section */
  .print-grid-3col {
    display: grid ;
    grid-template-columns: 1fr 1fr 1fr ;
    gap: 10px ;
  }

  .print-academy-col h3 {
    margin: 0 0 5px 0 ;
    font-size: 8pt ;
    text-transform: uppercase ;
    font-weight: bold ;
    border-bottom: 1px solid #000000 ;
    padding-bottom: 1px ;
    font-family: "Courier New", Courier, monospace ;
  }

  .print-academy-item {
    margin-bottom: 5px ;
    font-size: 7pt ;
    line-height: 1.2 ;
  }

  .print-academy-date {
    font-size: 6.5pt ;
    font-weight: bold ;
  }

  .print-academy-ach {
    font-size: 7pt ;
    font-style: italic ;
    margin-top: 1px ;
  }

  .print-lang-item {
    margin-bottom: 3px ;
    font-size: 7pt ;
  }

  .print-lang-detail {
    font-size: 6.5pt ;
    color: #555555 ;
  }

  /* Custom Page Footer Label */
  .print-page-footer-label {
    font-family: "Courier New", Courier, monospace ;
    font-size: 7.5pt ;
    text-align: center ;
    font-weight: bold ;
    border-top: 1px dashed #000000 ;
    padding-top: 4px ;
    margin-top: auto ; /* Pushes to bottom */
    text-transform: uppercase ;
  }

  .print-page-footer-label-container {
    margin-top: auto ; /* Pushes everything to bottom */
    display: flex ;
    flex-direction: column ;
    gap: 4px ;
  }

  /* Footer */
  .print-footer {
    border-top: 1px dashed #000000 ;
    padding-top: 4px ;
    text-align: center ;
    font-size: 6.5pt ;
    line-height: 1.2 ;
  }

  .print-footer p {
    margin: 0 0 2px 0 ;
  }

  .print-legal-notice {
    font-style: italic ;
    color: #555555 ;
  }

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

  .print-project-item {
    border: 1px solid #000000 ;
    padding: 6px ;
    background: #ffffff ;
    display: flex ;
    flex-direction: column ;
    gap: 4px ;
    box-sizing: border-box ;
  }

  .print-project-header {
    display: flex ;
    justify-content: space-between ;
    align-items: center ;
    border-bottom: 1px solid #000000 ;
    padding-bottom: 2px ;
    margin-bottom: 2px ;
  }

  .print-project-header h3 {
    margin: 0 ;
    font-size: 8pt ;
    font-weight: bold ;
  }

  .print-project-cat {
    font-size: 6pt ;
    font-weight: bold ;
    border: 1px solid #000000 ;
    padding: 0 3px ;
    text-transform: uppercase ;
  }

  .print-project-desc {
    margin: 0 ;
    font-size: 7.2pt ;
    line-height: 1.25 ;
    color: #333333 ;
  }

  .print-project-tech {
    display: flex ;
    flex-wrap: wrap ;
    gap: 3px ;
    margin-top: auto ;
    padding-top: 4px ;
  }

  .print-project-tech-tag {
    font-size: 6pt ;
    border: 1px dashed #666666 ;
    padding: 0 3px ;
    color: #444444 ;
    white-space: nowrap ;
  }

  /* Force background graphics and colors inside print-page */
  .print-page * {
    -webkit-print-color-adjust: exact ;
    print-color-adjust: exact ;
  }
}

/* =============================================
   TOAST NOTIFICATION SYSTEM
   ============================================= */
.toast-notification-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--color-primary);
  color: var(--bg-dark);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  border: 2px solid var(--bg-dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  font-weight: 700;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(1rem);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s ease;
  z-index: 10000;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  will-change: transform, opacity;
}

body.light-theme .toast-notification-container {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary-dark);
}

.toast-notification-container.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* AI Orchestrated Badge */
.ai-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-badge-text {
  background: #EEF2FF;
  color: #4F46E5;
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
}

.badge-connect {
  background: #F1F5F9;
  color: #334155;
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.badge-connect:hover {
  background: #E2E8F0;
  transform: translateY(-1px);
}

.linkedin-icon {
  width: 14px;
  height: 14px;
  fill: #64748B;
}

body:not(.light-theme) .ai-badge-text {
  background: rgba(79, 70, 229, 0.2);
  color: #A5B4FC;
}

body:not(.light-theme) .badge-connect {
  background: rgba(255, 255, 255, 0.1);
  color: #E2E8F0;
}

body:not(.light-theme) .badge-connect:hover {
  background: rgba(255, 255, 255, 0.15);
}

body:not(.light-theme) .linkedin-icon {
  fill: #94A3B8;
}

.desktop-ai-badge {
  display: flex;
}

.mobile-ai-badge {
  display: none;
  justify-content: center;
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .desktop-ai-badge {
    display: none;
  }
  .mobile-ai-badge {
    display: flex;
  }
}

/* =============================================
   UTILITY CLASSES (Added during refactor)
   ============================================= */
.flex-between-center {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.gap-1 { gap: 1rem; }
.gap-05 { gap: 0.5rem; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.object-cover { object-fit: cover; }

.flex-center-gap-1-5 {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.avatar-wrapper-styled {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  border: 1.5px solid var(--color-primary);
  overflow: hidden;
  background: rgba(0,0,0,0.2);
  flex-shrink: 0;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
  position: relative;
  transition: border-color 0.3s;
}
