/* ==========================================================================
   Modern Game Developer Portfolio CSS
   Built with CSS Grid, Flexbox, and Custom Properties
   ========================================================================== */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* Remove text cursor globally */
  cursor: default;
  /* Disable text selection and caret globally */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* Disable text highlighting */
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Restore text cursor and selection only for form elements and editable content */
input,
textarea,
select,
[contenteditable="true"],
[contenteditable=""],
.form-input,
.form-textarea,
.form-select {
  cursor: text !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

/* Netlify Forms - Hide honeypot field */
.hidden {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

/* Keep pointer cursor for interactive elements */
a,
button,
[role="button"],
[onclick],
.btn,
.nav-link,
.filter-btn,
.carousel-nav,
.carousel-dot,
.project-link,
.social-link,
.project-card,
.skill-card,
.contact-method {
  cursor: pointer !important;
}


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

:root {
  /* Color Palette - Haze Teal Theme */
  --primary-color: #20D9B6;
  --secondary-color: #1AC5A3;
  --accent-color: #20D9B6;
  --success-color: #4ADE80;
  --warning-color: #FBBF24;
  --error-color: #F87171;

  /* Dark Theme - Haze Dark */
  --bg-primary: #050505;
  --bg-secondary: #0A0A0A;
  --bg-tertiary: #111111;
  --text-primary: #EDEDED;
  --text-secondary: rgba(237, 237, 237, 0.60);
  --text-muted: rgba(237, 237, 237, 0.40);

  /* Terminal-specific variables */
  --terminal-green: #20D9B6;
  --terminal-green-dim: #1AB89E;
  --terminal-green-glow: rgba(32, 217, 182, 0.15);
  --terminal-border: rgba(237, 237, 237, 0.10);
  --terminal-header-bg: #0A0A0A;
  --glow-strength: 0.4;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Typography */
  --font-primary: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
  --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
  --font-body: "Figtree", "DM Sans", "Inter", sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Border Radius - Sharp terminal corners */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-xl: 8px;
  --radius-2xl: 8px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-modal-overlay: 1055;
  --z-popover: 1060;
  --z-tooltip: 1070;

  /* Transitions */
  --transition-fast: 0.15s ease-out;
  --transition-base: 0.25s ease-out;
  --transition-slow: 0.5s ease-out;

  /* Container */
  --container-padding: var(--space-lg);
  --container-max-width: 1400px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-base),
    color var(--transition-base);
  scroll-snap-type: y mandatory;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Custom Cursor — Valorant angular style */
/* Crosshair Cursor System */
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--primary-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-tooltip);
  opacity: 0;
  will-change: transform;
  mix-blend-mode: difference;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cursor-ring.hover {
  width: 56px;
  height: 56px;
}

.cursor-ring.click {
  width: 24px;
  height: 24px;
}

.cursor-h-line,
.cursor-v-line {
  position: fixed;
  pointer-events: none;
  z-index: var(--z-tooltip);
  opacity: 0;
  background: var(--primary-color);
  will-change: transform;
  mix-blend-mode: difference;
}

.cursor-h-line {
  width: 20px;
  height: 1px;
  top: 0;
  left: 0;
}

.cursor-v-line {
  width: 1px;
  height: 20px;
  top: 0;
  left: 0;
}

.cursor-h-line.click,
.cursor-v-line.click {
  transform: scale(0.6);
}

@media (hover: hover) and (pointer: fine) {
  .cursor-ring,
  .cursor-h-line,
  .cursor-v-line {
    opacity: 1;
  }
}

@media (max-width: 1024px) {
  .cursor-ring,
  .cursor-h-line,
  .cursor-v-line {
    display: none !important;
  }
}

/* Game of Life Background Canvas */
#gol-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9;
  opacity: 1;
}

/* Particle Background Canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  opacity: 0.7;
}


.text-reveal {
  opacity: 0;
  transform: translateY(30px);
  animation: textReveal 1s ease-out forwards;
}

@keyframes textReveal {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  50% {
    opacity: 0.5;
    transform: translateY(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ═══════════════════════════════════════════
   Scroll Reveal System
   ═══════════════════════════════════════════ */

/* Section reveal: starts hidden, animates in */
.reveal-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Staggered children within revealed sections */
.reveal-section > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-section.revealed > * {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for children */
.reveal-section.revealed > *:nth-child(1) { transition-delay: 0s; }
.reveal-section.revealed > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-section.revealed > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-section.revealed > *:nth-child(4) { transition-delay: 0.3s; }
.reveal-section.revealed > *:nth-child(5) { transition-delay: 0.4s; }
.reveal-section.revealed > *:nth-child(6) { transition-delay: 0.5s; }

/* Scan-line sweep on reveal */
.reveal-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}

.reveal-section.scanning::after {
  animation: scanLineReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scanLineReveal {
  0% { transform: translateX(-100%); opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

/* ═══════════════════════════════════════════
   Enhanced Card Tilt
   ═══════════════════════════════════════════ */

.project-card,
.skill-card,
.contact-method {
  transform-style: preserve-3d;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s ease;
}

/* ═══════════════════════════════════════════
   Magnetic Button Effect
   ═══════════════════════════════════════════ */

.btn {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ═══════════════════════════════════════════
   Stats Counter Glow
   ═══════════════════════════════════════════ */

.stat-number.counted {
  animation: counterGlow 0.6s ease-out;
}

@keyframes counterGlow {
  0% { text-shadow: 0 0 0 transparent; }
  50% { text-shadow: 0 0 20px rgba(32, 217, 182, 0.6), 0 0 40px rgba(32, 217, 182, 0.2); }
  100% { text-shadow: 0 0 0 transparent; }
}

/* Container */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-content {
  text-align: center;
}

.loading-logo {
  font-size: var(--text-2xl);
  font-weight: 600;
  margin-bottom: var(--space-lg);
  font-family: var(--font-mono);
  color: var(--terminal-green);
  text-shadow: 0 0 10px rgba(32, 217, 182, 0.5);
}


.loading-bar {
  width: 300px;
  height: 6px;
  background: rgba(32, 217, 182, 0.08);
  border-radius: 0;
  overflow: hidden;
  margin: 0 auto var(--space-md);
  border: 1px solid rgba(32, 217, 182, 0.2);
  box-shadow:
    0 0 8px rgba(32, 217, 182, 0.15),
    0 0 20px rgba(32, 217, 182, 0.08);
}

.loading-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--terminal-green), rgba(32, 217, 182, 0.85), var(--terminal-green));
  border-radius: 0;
  width: 0%;
  transition: width 0.3s ease-out;
  box-shadow:
    0 0 6px rgba(32, 217, 182, 0.6),
    0 0 15px rgba(32, 217, 182, 0.3),
    0 0 30px rgba(32, 217, 182, 0.15);
  position: relative;
  overflow: hidden;
}

/* Heartbeat line sweep — ECG monitor style */
.loading-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 30%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    rgba(255, 255, 255, 0.8),
    rgba(32, 217, 182, 1),
    rgba(255, 255, 255, 0.8),
    rgba(255, 255, 255, 0.4),
    transparent
  );
  border-radius: 0;
  animation: loadingSweep 1.5s ease-in-out infinite;
  will-change: transform;
}

@keyframes loadingSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

.loading-text {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-family: var(--font-mono);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  z-index: var(--z-fixed);
  transition: background-color var(--transition-base);
  box-shadow: 0 2px 20px rgba(32, 217, 182, 0.1);
  border-bottom: 1px solid var(--terminal-border);
}

.header.scrolled {
  background: rgba(10, 10, 10, 0.98);
  box-shadow: 0 4px 30px rgba(32, 217, 182, 0.15);
  border-bottom-color: rgba(32, 217, 182, 0.2);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-weight: 800;
  font-size: var(--text-xl);
  color: var(--text-primary);
}

.logo-text {
  font-family: var(--font-mono);
  color: var(--primary-color);
}

.logo-dot {
  width: 8px;
  height: 8px;
  background: var(--secondary-color);
  border-radius: 50%;
  margin-left: var(--space-xs);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2);
  }
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: var(--space-xl);
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
  padding: var(--space-xs) 0;
}

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

.nav-text {
  font-size: var(--text-sm);
  font-weight: 500;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transform: translateX(-50%);
  transition: width var(--transition-fast);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.theme-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 2px solid var(--bg-tertiary);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.theme-toggle i {
  font-size: var(--text-lg);
  color: var(--text-primary);
  transition: transform var(--transition-base);
}

.theme-toggle .bx-sun {
  display: none;
}

/* ── Sound Toggle Button ── */
.sound-toggle-btn {
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--terminal-border);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.15rem;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
  flex-shrink: 0;
}
.sound-toggle-btn:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
  background: rgba(32, 217, 182, 0.08);
}
.sound-toggle-btn.sound-muted {
  color: var(--text-muted);
  border-color: rgba(237, 237, 237, 0.06);
}
.sound-toggle-btn.sound-muted:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

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

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left var(--transition-slow);
}

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

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(26, 197, 163, 0.4), 0 0 40px rgba(26, 197, 163, 0.15);
  background: var(--secondary-color);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 2px solid var(--bg-tertiary);
}

.btn-secondary:hover {
  background: transparent;
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

/* Info Section */
.info {
  /* Scroll snap removed for better user experience */
  position: relative;
}

.info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 30%, rgba(32, 217, 182, 0.06), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.info .container {
  align-items: center;
}

.info-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
  width: 100%;
  min-height: 400px;
}

.info-text {
  animation: fadeInUp 0.8s ease 0.3s both;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.info-greeting {
  margin-bottom: var(--space-sm);
}

.greeting-text {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  font-weight: 500;
}

.info-name {
  font-size: clamp(var(--text-4xl), 5vw, var(--text-6xl));
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-md);
}

.name-line {
  display: block;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: slideInLeft 1s ease-out;
}

.name-line:nth-child(2) {
  animation-delay: 0.2s;
}

.info-title {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.title-text {
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.title-cursor {
  width: 3px;
  height: 30px;
  background: var(--primary-color);
  margin-left: var(--space-xs);
  animation: blink 1s infinite;
}

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

/* Desktop layout: Float-based approach for better compatibility */
@media (min-width: 1025px) {
  /* Create a bottom section layout */
  .info-description-wrapper {
    float: right;
    width: 48%;
    text-align: center;
    margin: var(--space-xl) 0 0 0;
    max-width: none;
    clear: none;
  }

  /* Float the action elements to the left */
  .info-stats,
  .info-buttons,
  .social-links {
    float: left;
    width: 48%;
    clear: left;
    margin-right: 4%;
  }

  .info-stats {
    justify-content: flex-start;
    margin-top: var(--space-xl) !important;
    margin-bottom: 3rem !important;
  }

  .info-buttons {
    justify-content: flex-start;
    margin-bottom: 3rem !important;
    margin-top: 0 !important;
  }

  .social-links {
    justify-content: flex-start;
    margin-top: 0 !important;
    margin-bottom: 2rem !important;
  }

  /* Add clearfix to container */
  .info .container::after {
    content: "";
    display: table;
    clear: both;
  }

  /* Ensure description is vertically centered relative to left content */
  .info-description-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 300px;
    padding: var(--space-lg);
  }
}

.info-description {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0;
}

.info-description strong {
  color: var(--primary-color);
  font-weight: 600;
}

.info-stats {
  display: flex;
  gap: var(--space-xl);
  margin: 0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--primary-color);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
}

.info-buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin: 0;
}

.info-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  animation: fadeInUp 0.8s ease 0.5s both;
}

.info-visual:hover .profile-card {
  animation: parallaxFloat 3s ease-in-out infinite;
}

.profile-card {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.profile-card:hover {
  animation: morphGlow 2s ease-in-out infinite;
}

.visual-container {
  position: relative;
}

.profile-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-2xl);
  padding: var(--space-sm);
  padding-bottom: var(--space-md);
  border: 2px solid var(--bg-tertiary);
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color),
    var(--accent-color)
  );
}

.profile-image {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin: 0 auto var(--space-md) auto !important;
  background: linear-gradient(135deg, #1AB89E, #20D9B6);
  padding: 0 !important;
  box-sizing: border-box;
  display: block !important;
  align-self: center !important;
  justify-self: center !important;
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition-slow);
  border-radius: var(--radius-xl); /* Match parent radius */
  background: transparent; /* Let the parent background show through */
}

.profile-card:hover .profile-img {
  transform: scale(1.05);
}

/* Profile overlay removed - only background color behind image */

.profile-info {
  text-align: center;
}

.profile-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--success-color);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border: 1px solid rgba(74, 222, 128, 0.25);
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
  animation: statusPulse 2s infinite;
  box-shadow: 0 0 8px var(--primary-color);
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--primary-color); }
  50% { opacity: 0.4; box-shadow: 0 0 16px var(--primary-color); }
}

.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.floating-icon {
  position: absolute;
  width: 60px;
  height: 60px;
  background: var(--bg-secondary);
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 3s ease-in-out infinite;
}

.floating-icon i {
  font-size: var(--text-xl);
  color: var(--primary-color);
}

.unity-icon {
  top: 20%;
  right: -10%;
  animation-delay: 0s;
}

.code-icon {
  bottom: 30%;
  left: -10%;
  animation-delay: 1s;
}

.game-icon {
  top: 60%;
  right: -5%;
  animation-delay: 2s;
}

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

.social-links {
  display: flex;
  gap: var(--space-md);
  margin: 0;
}

.social-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--terminal-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  font-family: var(--font-mono);
}

.social-link:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.social-link i {
  font-size: var(--text-lg);
}

.social-link span {
  font-size: var(--text-sm);
  font-weight: 500;
}


/* Section Headers */
.section-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  margin-bottom: var(--space-3xl);
}

.section-number {
  font-size: var(--text-6xl);
  font-weight: 900;
  color: rgba(32, 217, 182, 0.08);
  line-height: 1;
  font-family: var(--font-mono);
}

.section-title-wrapper {
  flex: 1;
}

.section-title {
  font-size: var(--text-5xl);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  line-height: 1.2;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Projects Section */
.projects {
  /* Scroll snap removed for better user experience */
}

/* Project Carousel */
.projects-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  margin-bottom: var(--space-xl);
  display: block;
  border: 1px solid var(--terminal-border);
  min-height: 500px;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 500px;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.carousel-track.dragging {
  transition: none;
}

.carousel-track.bouncing {
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Glitch flash during slide transition */
.carousel-track.transitioning {
  animation: carouselGlitch 0.35s ease-out;
}

@keyframes carouselGlitch {
  0%   { filter: none; }
  15%  { filter: hue-rotate(30deg) brightness(1.15); }
  30%  { filter: hue-rotate(-20deg) brightness(0.9); }
  50%  { filter: brightness(1.1); }
  100% { filter: none; }
}

.carousel-slide {
  min-width: 100%;
  width: 100%;
  padding: var(--space-xl) var(--space-2xl); /* Increased horizontal padding for button space */
  flex-shrink: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide .project-card {
  width: 100%;
  max-width: 380px; /* Slightly reduced to accommodate button space */
  margin: 0 auto;
}

/* Section visibility and animations */
.project-card,
.skill-card,
.contact-method {
  opacity: 1; /* Make visible by default */
  transform: translateY(0) scale(1); /* Normal position by default */
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card.visible,
.skill-card.visible,
.contact-method.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* First section (info) always visible, animates on page load */
.info .terminal-window {
  animation: fadeInUp 0.8s ease 0.2s both;
}

/* Tablet carousel - show 2 slides */
@media (min-width: 769px) and (max-width: 1024px) {
  .carousel-slide {
    min-width: 50%;
    padding: var(--space-md);
  }

  .carousel-slide .project-card {
    min-height: 380px;
  }
}

/* === Active Slide HUD Highlight === */
.carousel-slide.active {
  opacity: 1;
  transform: scale(1);
}

.carousel-slide.active .project-card {
  transform: translateY(-4px);
  box-shadow:
    0 0 20px rgba(32, 217, 182, 0.15),
    0 15px 35px rgba(0, 0, 0, 0.35);
  border-color: var(--terminal-green);
}

.carousel-slide:not(.active) .project-card {
  transform: scale(0.94);
  opacity: 0.5;
  filter: saturate(0.3) brightness(0.7);
}

.carousel-slide.entering {
  animation: slideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.carousel-slide.exiting {
  animation: slideOut 0.35s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateX(40px) scale(0.85);
    filter: brightness(1.5) hue-rotate(15deg);
  }
  40% {
    filter: brightness(0.8);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: brightness(1) hue-rotate(0deg);
  }
}

@keyframes slideOut {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: none;
  }
  60% {
    filter: brightness(1.3) hue-rotate(-10deg);
  }
  100% {
    opacity: 0;
    transform: translateX(-30px) scale(0.9);
    filter: brightness(0.5);
  }
}

.carousel-slide .project-card {
  margin: 0;
  width: 100%;
  max-width: 380px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border: 1px solid var(--terminal-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  backdrop-filter: blur(10px);
}

/* === HUD Carousel Nav Buttons === */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(5, 10, 5, 0.92);
  border: 1px solid var(--terminal-green);
  border-radius: 4px;
  width: 44px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 20;
  backdrop-filter: blur(15px);
  opacity: 0.85;
  clip-path: polygon(0 8px, 8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

/* HUD bracket accents on nav buttons */
.carousel-nav::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--terminal-green);
  border-left: 1px solid var(--terminal-green);
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.carousel-nav::after {
  content: '';
  position: absolute;
  bottom: 3px;
  right: 3px;
  width: 10px;
  height: 10px;
  border-bottom: 1px solid var(--terminal-green);
  border-right: 1px solid var(--terminal-green);
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.carousel-nav:not([style*="pointer-events: none"]):hover {
  opacity: 1;
}

.carousel-nav:hover {
  background: rgba(32, 217, 182, 0.1);
  border-color: var(--terminal-green);
  box-shadow:
    0 0 20px rgba(32, 217, 182, 0.3),
    inset 0 0 15px rgba(32, 217, 182, 0.05);
  transform: translateY(-50%) scale(1.05);
}

.carousel-nav:hover::before,
.carousel-nav:hover::after {
  opacity: 1;
}

.carousel-nav:active {
  transform: translateY(-50%) scale(0.96);
  transition: transform 0.1s ease;
  background: rgba(32, 217, 182, 0.15);
}

.carousel-nav i {
  font-size: var(--text-xl);
  color: var(--terminal-green);
  transition: transform 0.3s ease, text-shadow 0.3s ease;
  position: relative;
  z-index: 1;
}

.carousel-nav:hover i {
  color: var(--terminal-green);
  text-shadow: 0 0 10px rgba(32, 217, 182, 0.6);
}

/* Directional arrow nudge on hover */
.carousel-prev:hover i {
  transform: translateX(-3px);
}

.carousel-next:hover i {
  transform: translateX(3px);
}

.carousel-prev {
  left: -22px;
  top: 50%;
  transform: translateY(-50%);
}

.carousel-next {
  right: -22px;
  top: 50%;
  transform: translateY(-50%);
}

/* === Terminal-Styled Carousel Indicators === */
.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-lg);
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.carousel-dot {
  width: 20px;
  height: 3px;
  border-radius: 1px;
  background: rgba(32, 217, 182, 0.15);
  border: none;
  cursor: pointer;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.carousel-dot:hover {
  background: rgba(32, 217, 182, 0.35);
}

.carousel-dot.active {
  width: 36px;
  background: var(--terminal-green);
  box-shadow: 0 0 10px rgba(32, 217, 182, 0.5), 0 0 3px rgba(32, 217, 182, 0.8);
  animation: dotGlow 2s ease-in-out infinite;
}

@keyframes dotGlow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(32, 217, 182, 0.5), 0 0 3px rgba(32, 217, 182, 0.8);
  }
  50% {
    box-shadow: 0 0 15px rgba(32, 217, 182, 0.7), 0 0 5px rgba(32, 217, 182, 1);
  }
}

/* Scan sweep on dot */
.carousel-dot::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(32, 217, 182, 0.6), transparent);
  transition: left 0.4s ease;
}

.carousel-dot:hover::before {
  left: 100%;
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-3xl);
  justify-content: center;
}

.filter-btn {
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--terminal-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(32, 217, 182, 0.1);
}

.projects-grid {
  display: none;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
  padding: 0;
}

.project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--terminal-border);
  border-radius: var(--radius-md);
  overflow: visible;
  transition: transform var(--transition-base),
              box-shadow var(--transition-base),
              border-color var(--transition-base);
  cursor: pointer;
  position: relative;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  opacity: 1;
  visibility: visible;
  contain: layout style;
}

/* === Desktop Landscape Cards === */
@media (min-width: 769px) {
  .projects-grid .project-card {
    flex-direction: row !important;
    min-height: 220px;
    height: auto;
  }

  .projects-grid .project-image {
    width: 40%;
    height: auto;
    min-height: 220px;
    flex-shrink: 0;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    align-self: stretch;
  }

  .projects-grid .project-img {
    min-height: 100%;
    height: 100%;
  }

  .projects-grid .project-content {
    width: 60%;
    padding: var(--space-lg) var(--space-xl);
    justify-content: center;
  }

  .projects-grid .project-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--space-sm);
  }

  .projects-grid .project-title {
    font-size: var(--text-2xl);
  }

  .projects-grid .project-hud-id {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    opacity: 0.3;
    font-size: var(--text-sm);
  }

  .projects-grid .project-card:hover .project-hud-id {
    opacity: 1;
  }
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px rgba(32, 217, 182, 0.1), 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* === HUD Corner Brackets === */
.project-card::before,
.project-card::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--terminal-green);
  border-style: solid;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.project-card::before {
  top: -5px;
  left: -5px;
  border-width: 2px 0 0 2px;
}

.project-card::after {
  bottom: -5px;
  right: -5px;
  border-width: 0 2px 2px 0;
}

.project-card:hover::before,
.project-card:hover::after {
  opacity: 1;
  transform: scale(1);
  filter: drop-shadow(0 0 4px rgba(32, 217, 182, 0.5));
}

/* === Animated Pulsing Border Glow === */
.project-card:hover {
  border-color: var(--terminal-green);
  animation: rotateBorder 3s linear infinite;
  box-shadow:
    0 0 20px rgba(32, 217, 182, 0.1),
    0 15px 30px rgba(0, 0, 0, 0.3),
    inset 0 0 12px rgba(32, 217, 182, 0.05),
    0 0 4px rgba(32, 217, 182, 0.3);
}

@keyframes rotateBorder {
  0%   { border-color: var(--terminal-green); }
  25%  { border-color: rgba(32, 217, 182, 0.4); }
  50%  { border-color: var(--terminal-green); }
  75%  { border-color: rgba(32, 217, 182, 0.4); }
  100% { border-color: var(--terminal-green); }
}

/* === Green Scan Line Sweep === */
.project-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(32, 217, 182, 0.4),
    transparent
  );
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  will-change: transform;
}

.project-card:hover .project-image::after {
  opacity: 1;
  animation: scanLineSweep 1.8s ease-in-out infinite;
}

@keyframes scanLineSweep {
  0% { transform: translateY(-8px); }
  100% { transform: translateY(300px); }
}

/* === Image Glitch Micro-effect === */
.project-card:hover .project-img {
  transform: scale(1.05);
  animation: imgGlitch 0.4s ease-out;
}

@keyframes imgGlitch {
  0%   { filter: none; transform: scale(1.05) translate(0, 0); }
  15%  { filter: hue-rotate(90deg) brightness(1.3); transform: scale(1.05) translate(-2px, 1px); }
  30%  { filter: hue-rotate(-90deg) brightness(0.8); transform: scale(1.05) translate(2px, -1px); }
  50%  { filter: hue-rotate(45deg); transform: scale(1.05) translate(-1px, 0); }
  100% { filter: none; transform: scale(1.05) translate(0, 0); }
}

/* === Status Badge Pulse Ring === */
.project-status.in-development {
  position: relative;
}

.project-status.in-development::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 1px solid var(--warning-color);
  animation: statusPulseRing 2s ease-out infinite;
  pointer-events: none;
}

@keyframes statusPulseRing {
  0%   { transform: scale(1); opacity: 0.7; }
  70%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* === HUD Project ID === */
.project-hud-id {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  opacity: 0.4;
  letter-spacing: 0.1em;
  transition: opacity 0.3s ease, color 0.3s ease;
  margin-bottom: -4px;
}

.project-card:hover .project-hud-id {
  opacity: 1;
  color: var(--terminal-green);
}

/* === Footer Links Staggered Reveal === */
.project-link {
  opacity: 0.6;
  transform: translateY(6px);
}

.project-card:hover .project-link {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover .project-link:nth-child(1) { transition-delay: 0ms; }
.project-card:hover .project-link:nth-child(2) { transition-delay: 60ms; }
.project-card:hover .project-link:nth-child(3) { transition-delay: 120ms; }
.project-card:hover .project-link:nth-child(4) { transition-delay: 180ms; }

/* === Info Button Purple Pulse Glow === */
.project-link[title="More Info"] {
  position: relative;
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.3);
  background: rgba(168, 85, 247, 0.08);
  animation: infoBtnPulse 2.5s ease-in-out infinite;
}

.project-link[title="More Info"] i {
  color: #a855f7;
  transition: color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease;
}

.project-link[title="More Info"]:hover {
  background: #a855f7;
  border-color: #a855f7;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.5), 0 0 6px rgba(168, 85, 247, 0.8);
  transform: scale(1.1);
  animation: none;
}

.project-link[title="More Info"]:hover i {
  color: var(--bg-primary);
  transform: scale(1.15);
}

@keyframes infoBtnPulse {
  0%, 100% {
    box-shadow: 0 0 6px rgba(168, 85, 247, 0.2), 0 0 2px rgba(168, 85, 247, 0.4);
  }
  50% {
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.4), 0 0 4px rgba(168, 85, 247, 0.6);
  }
}

/* Attention ring pulse on info button */
.project-link[title="More Info"]::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 1px solid rgba(168, 85, 247, 0.4);
  animation: infoRingPulse 2.5s ease-out infinite;
  pointer-events: none;
}

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

/* === Terminal Flicker Entrance Animation === */
@keyframes terminalFlickerIn {
  0%   { opacity: 0; filter: brightness(0); }
  10%  { opacity: 0.8; filter: brightness(2); }
  20%  { opacity: 0.2; filter: brightness(0.5); }
  35%  { opacity: 0.9; filter: brightness(1.5); }
  50%  { opacity: 0.4; filter: brightness(0.8); }
  70%  { opacity: 1; filter: brightness(1.2); }
  100% { opacity: 1; filter: brightness(1); }
}

.project-card.flicker-in {
  animation: terminalFlickerIn 0.6s ease-out both;
  animation-delay: var(--entrance-delay, 0ms);
}

/* === Tech Tag Enhancements === */
.tech-tag {
  border-left: 2px solid var(--terminal-green);
  transition: all 0.25s ease;
  animation: tagSlideIn 0.3s ease-out backwards;
  animation-delay: var(--tag-delay, 0ms);
}

.tech-tag:hover {
  background: rgba(32, 217, 182, 0.15);
  box-shadow: 0 0 8px rgba(32, 217, 182, 0.2);
}

@keyframes tagSlideIn {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}

.project-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-tertiary);
  display: block;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition-slow);
  display: block;
  min-height: 180px;
  background: var(--bg-tertiary);
}

.project-status {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
}

.project-status.completed {
  color: var(--success-color);
}

.project-status.in-development {
  color: var(--warning-color);
}

.project-content {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  min-height: 0;
  overflow: visible;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.project-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.project-engine {
  font-size: var(--text-sm);
  color: var(--primary-color);
  font-weight: 600;
  background: rgba(32, 217, 182, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.project-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.project-technologies {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.tech-tag {
  font-size: var(--text-xs);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.project-year {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.project-links {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.project-link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  font-size: 18px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.project-link:hover {
  background: var(--primary-color);
  color: var(--bg-primary);
  transform: scale(1.05);
}

.project-link:active {
  transform: scale(0.95);
}

.projects-cta {
  text-align: center;
  padding: var(--space-xl);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--terminal-border);
}

.projects-cta p {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

/* Skills Section */
.skills {
  background: var(--bg-primary);
  /* Scroll snap removed for better user experience */
}

.skills-content {
  display: grid;
  gap: var(--space-3xl);
}

.skills-category {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 1px solid var(--terminal-border);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.category-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
}

.category-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--primary-color);
  box-shadow:
    0 0 12px rgba(32, 217, 182, 0.2),
    inset 0 0 8px rgba(32, 217, 182, 0.05);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-fast);
  animation: iconGlow 3s ease-in-out infinite;
}

.category-icon::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(32, 217, 182, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.skills-category:hover .category-icon::before {
  left: 100%;
}

.skills-category:hover .category-icon {
  border-color: var(--text-primary);
  box-shadow:
    0 0 20px rgba(32, 217, 182, 0.4),
    0 0 40px rgba(32, 217, 182, 0.1),
    inset 0 0 12px rgba(32, 217, 182, 0.1);
  transform: scale(1.1) rotate(5deg);
}

@keyframes iconGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(32, 217, 182, 0.2), inset 0 0 8px rgba(32, 217, 182, 0.05); }
  50% { box-shadow: 0 0 18px rgba(32, 217, 182, 0.3), inset 0 0 10px rgba(32, 217, 182, 0.08); }
}

.category-icon i {
  font-size: var(--text-xl);
  color: var(--primary-color);
  z-index: 2;
  position: relative;
  transition: all var(--transition-fast);
  filter: drop-shadow(0 0 4px rgba(32, 217, 182, 0.5));
}

.skills-category:hover .category-icon i {
  transform: scale(1.15);
  color: var(--text-primary);
  filter: drop-shadow(0 0 8px rgba(32, 217, 182, 0.8));
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  padding: var(--space-md);
}

.skill-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--terminal-border);
  transition: all var(--transition-fast);
}

.skill-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 40px rgba(32, 217, 182, 0.2);
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
}

.skill-icon {
  width: 60px;
  height: 60px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.skill-icon::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(32, 217, 182, 0.4),
    transparent
  );
  transition: left 0.5s ease;
}

.skill-card:hover .skill-icon::before {
  left: 100%;
}

.skill-icon i {
  font-size: var(--text-2xl);
  color: var(--primary-color);
  transition: all var(--transition-fast);
  z-index: 2;
  position: relative;
}

.skill-card:hover .skill-icon i {
  transform: scale(1.1) rotate(5deg);
  color: var(--text-primary);
}

.skill-info {
  flex: 1;
}

.skill-name {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.skill-level {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.skill-bar {
  height: 4px;
  background: rgba(32, 217, 182, 0.1);
  border-radius: 0;
  overflow: hidden;
  border: 1px solid rgba(32, 217, 182, 0.1);
}

.skill-progress {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--terminal-green-dim),
    var(--terminal-green)
  );
  border-radius: 0;
  width: 0;
  transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(32, 217, 182, 0.3);
}

.skill-progress::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: progressShine 2s ease-in-out infinite;
  will-change: transform;
}

.skill-progress.animated::before {
  animation-delay: 0.5s;
}

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

/* Removed section transition animations to prevent double animation */

/* Enhanced section styles for normal scrolling */
section {
  position: relative;
  padding: calc(80px + var(--space-xl)) 0 var(--space-xl) 0;
  min-height: 100vh;
  /* Allow natural heights and normal scrolling */
}

section .container {
  /* Restore normal container behavior */
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Custom scrollbar styles removed - using normal page scrolling */

/* Responsive adjustments for mobile devices */
@media (max-width: 768px) {
  section {
    padding: calc(80px + var(--space-md)) 0 var(--space-md) 0;
  }

  section .container {
    padding: 0 var(--space-md);
  }
}

@media (max-width: 480px) {
  section {
    padding: calc(70px + var(--space-sm)) 0 var(--space-sm) 0;
  }

  section .container {
    padding: 0 var(--space-sm);
  }
}

/* Contact Section */
.contact {
  /* Scroll snap removed for better user experience */
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.contact-text {
  margin-bottom: var(--space-xl);
}

.contact-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.contact-description {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.6;
}

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

.contact-method {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--terminal-border);
  transition: transform var(--transition-fast),
              border-color var(--transition-fast),
              box-shadow var(--transition-fast);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.contact-method:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(32, 217, 182, 0.1);
}

.method-icon {
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1.5px solid var(--primary-color);
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(32, 217, 182, 0.15);
}

.method-icon i {
  font-size: var(--text-lg);
  color: var(--primary-color);
  transform: rotate(-45deg);
}

.method-content {
  flex: 1;
}

.method-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.method-value {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  display: block;
}

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-tertiary);
  color: var(--success-color);
  border: 1px solid var(--success-color);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.method-link {
  font-size: var(--text-sm);
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: opacity var(--transition-fast);
}

.method-link:hover {
  opacity: 0.8;
}

.contact-form-container {
  background: var(--bg-secondary);
  padding: var(--space-md) var(--space-sm);
  border: 1px solid var(--terminal-border);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  position: relative;
}

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

.form-group {
  position: relative;
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: var(--space-xs);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.form-label::before {
  content: '> ';
  color: var(--primary-color);
  opacity: 0.8;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-primary);
  border: 1px solid var(--terminal-border);
  border-radius: 0;
  color: var(--terminal-green);
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  transition: all var(--transition-fast);
  resize: vertical;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--terminal-green);
  box-shadow: 0 0 15px rgba(32, 217, 182, 0.2), inset 0 0 15px rgba(32, 217, 182, 0.05);
}

.form-focus {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width var(--transition-fast);
  box-shadow: 0 0 8px var(--primary-color);
}

.form-input:focus + .form-focus,
.form-textarea:focus + .form-focus {
  width: 100%;
}

.form-submit {
  position: relative;
  overflow: hidden;
  width: 100%;
  justify-content: center;
  text-align: center;
}

.btn-text,
.btn-loading {
  transition: opacity var(--transition-fast);
}

.btn-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}

.form-submit.loading .btn-text {
  opacity: 0;
}

.form-submit.loading .btn-loading {
  opacity: 1;
}

.btn-loading i {
  animation: spin 1s linear infinite;
}

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

/* Footer */
.footer {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  background: var(--bg-primary);
  padding-bottom: var(--space-md);
}

/* HUD top border */
.footer-hud-border {
  display: flex;
  align-items: center;
  padding: 0 var(--container-padding);
  margin-bottom: var(--space-lg);
}

.footer-hud-bracket {
  color: var(--terminal-border);
  font-size: var(--text-base);
  line-height: 1;
}

.footer-hud-label {
  color: var(--primary-color);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0 8px;
  text-shadow: 0 0 8px rgba(32, 217, 182, 0.3);
}

.footer-hud-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--terminal-border) 0%, transparent 100%);
  min-width: 20px;
}

.footer-hud-marker {
  color: var(--primary-color);
  font-size: 8px;
  padding: 0 8px;
  text-shadow: 0 0 6px rgba(32, 217, 182, 0.4);
  animation: hud-pulse 3s ease-in-out infinite;
}

/* Footer content grid */
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--space-sm);
}

/* Social links */
.footer-social {
  display: flex;
  gap: var(--space-sm);
}

.footer-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-secondary);
  border: 1px solid var(--terminal-border);
  border-radius: var(--radius-sm);
  font-size: 18px;
  text-decoration: none;
  transition: color 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}

.footer-link:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(32, 217, 182, 0.15), inset 0 0 10px rgba(32, 217, 182, 0.05);
}

/* Center status line */
.footer-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: var(--text-xs);
}

.footer-prompt {
  color: var(--primary-color);
  font-weight: 700;
}

.footer-separator {
  color: var(--terminal-border);
  margin: 0 2px;
}

.footer-heart {
  color: var(--error-color);
  font-size: 10px;
}

/* Back to top */
.footer-top-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 250ms ease;
  padding: var(--space-xs);
}

.footer-top-btn i {
  font-size: 18px;
  transition: transform 250ms ease;
}

.footer-top-btn:hover {
  color: var(--primary-color);
}

.footer-top-btn:hover i {
  transform: translateY(-2px);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base),
              visibility var(--transition-base);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.modal-container {
  position: relative;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--terminal-border);
  overflow: hidden;
  transform: scale(0.9);
  transition: transform var(--transition-base);
}

.modal.active .modal-container {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px var(--space-lg);
  border-bottom: 1px solid var(--terminal-border);
  background: var(--terminal-header-bg);
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  padding: var(--space-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  color: var(--accent-color);
}

.modal-close i {
  font-size: var(--text-xl);
  color: var(--error-color);
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

.modal-close:hover i {
  color: var(--error-color);
  text-shadow: 0 0 8px rgba(255, 71, 87, 0.6);
}

.modal-content {
  padding: var(--space-lg);
  max-height: calc(90vh - 120px);
  overflow-y: auto;
}

/* === Modal HUD Enhancements === */

/* HUD Corner Brackets on Modal Container (inset to avoid overflow clip) */
.modal-container::before,
.modal-container::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--terminal-green);
  border-style: solid;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease 0.3s;
}

.modal-container::before {
  top: 6px;
  left: 6px;
  border-width: 2px 0 0 2px;
}

.modal-container::after {
  bottom: 6px;
  right: 6px;
  border-width: 0 2px 2px 0;
}

.modal.active .modal-container::before,
.modal.active .modal-container::after {
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(32, 217, 182, 0.5));
}

/* Pulsing green border on active modal */
.modal.active .modal-container {
  border-color: var(--terminal-green);
  box-shadow:
    0 0 30px rgba(32, 217, 182, 0.08),
    0 25px 50px rgba(0, 0, 0, 0.4),
    inset 0 0 15px rgba(32, 217, 182, 0.03);
  animation: modalBorderPulse 3s ease-in-out infinite;
}

@keyframes modalBorderPulse {
  0%, 100% { border-color: var(--terminal-green); box-shadow: 0 0 30px rgba(32, 217, 182, 0.08), 0 25px 50px rgba(0, 0, 0, 0.4); }
  50%      { border-color: rgba(32, 217, 182, 0.5); box-shadow: 0 0 40px rgba(32, 217, 182, 0.12), 0 25px 50px rgba(0, 0, 0, 0.4); }
}

/* CRT Flicker Entrance for Modal Container */
@keyframes modalFlickerIn {
  0%   { opacity: 0; transform: scale(0.95); filter: brightness(0); }
  8%   { opacity: 0.7; transform: scale(0.98); filter: brightness(2); }
  16%  { opacity: 0.2; transform: scale(0.96); filter: brightness(0.4); }
  30%  { opacity: 0.85; transform: scale(0.99); filter: brightness(1.4); }
  50%  { opacity: 0.5; transform: scale(0.97); filter: brightness(0.7); }
  70%  { opacity: 0.95; transform: scale(1); filter: brightness(1.1); }
  100% { opacity: 1; transform: scale(1); filter: brightness(1); }
}

.modal.active .modal-container {
  animation: modalFlickerIn 0.5s ease-out forwards, modalBorderPulse 3s ease-in-out 0.5s infinite;
}

/* Backdrop with scanline grid texture */
.modal-backdrop {
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(32, 217, 182, 0.008) 2px,
      rgba(32, 217, 182, 0.008) 4px
    ),
    rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
}

/* Header scan line effect */
.modal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--terminal-green) 20%,
    var(--terminal-green) 80%,
    transparent 100%
  );
  opacity: 0.5;
}

.modal-header {
  position: relative;
}

/* Modal Section Staggered Reveal */
.modal-section {
  opacity: 0;
  transform: translateY(10px);
  animation: modalSectionReveal 0.4s ease-out forwards;
}

.modal-section:nth-child(1) { animation-delay: 0.1s; }
.modal-section:nth-child(2) { animation-delay: 0.2s; }
.modal-section:nth-child(3) { animation-delay: 0.3s; }
.modal-section:nth-child(4) { animation-delay: 0.4s; }
.modal-section:nth-child(5) { animation-delay: 0.5s; }

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

/* Modal Project Header staggered reveal */
.modal-project-header {
  opacity: 0;
  transform: translateY(8px);
  animation: modalSectionReveal 0.4s ease-out forwards;
  animation-delay: 0.05s;
}

/* Terminal prefix on section headings */
.modal-section h5 {
  font-family: var(--font-mono);
  color: var(--terminal-green);
  letter-spacing: 0.05em;
}

.modal-section h5::before {
  content: '// ';
  opacity: 0.5;
  color: var(--text-muted);
}

/* Detail items terminal styling */
.modal-details {
  font-family: var(--font-mono);
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-left: 2px solid rgba(32, 217, 182, 0.2);
  background: rgba(32, 217, 182, 0.02);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.detail-item:hover {
  border-left-color: var(--terminal-green);
  background: rgba(32, 217, 182, 0.05);
}

.detail-item strong {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 400;
}

.detail-item strong::after {
  content: '';
  flex: 1;
}

/* Modal link buttons enhanced */
.modal-links .btn {
  position: relative;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.modal-links .btn:hover {
  box-shadow: 0 0 15px rgba(32, 217, 182, 0.2), 0 0 4px rgba(32, 217, 182, 0.3);
  transform: translateY(-2px);
}

.modal-links .btn-outline {
  border-color: var(--terminal-green);
}

.modal-links .btn-outline:hover {
  background: rgba(32, 217, 182, 0.1);
  border-color: var(--terminal-green);
  color: var(--terminal-green);
  box-shadow: 0 0 15px rgba(32, 217, 182, 0.15), inset 0 0 10px rgba(32, 217, 182, 0.05);
}

.modal-links .btn i {
  transition: transform 0.2s ease;
}

.modal-links .btn:hover i {
  transform: scale(1.15);
}

/* Platform tags enhanced */
.platform-tag {
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.platform-tag:hover {
  box-shadow: 0 0 8px rgba(32, 217, 182, 0.3);
  transform: translateY(-1px);
}

/* Modal status badge with pulse (matching card enhancement) */
.modal-status.in-development {
  position: relative;
}

.modal-status.in-development::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 1px solid var(--warning-color);
  animation: statusPulseRing 2s ease-out infinite;
  pointer-events: none;
}

/* Modal image scan line */
.modal-project-img {
  position: relative;
}

/* Scrollbar styling for modal content */
.modal-content::-webkit-scrollbar {
  width: 4px;
}

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

.modal-content::-webkit-scrollbar-thumb {
  background: rgba(32, 217, 182, 0.3);
  border-radius: 2px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(32, 217, 182, 0.5);
}

/* === All-Projects Modal Enhancements === */

/* All-projects items HUD hover */
.all-projects-item {
  border-left: 2px solid transparent;
  transition: border-color 0.3s ease,
              transform 0.3s ease;
}

.all-projects-item:hover {
  border-left-color: var(--terminal-green);
  border-color: var(--terminal-green);
  background: rgba(32, 217, 182, 0.02);
  box-shadow: 0 0 15px rgba(32, 217, 182, 0.05), 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Staggered entrance for all-projects items */
.all-projects-item {
  opacity: 0;
  transform: translateX(-8px);
  animation: allProjectItemReveal 0.35s ease-out forwards;
}

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

.all-projects-item:nth-child(1) { animation-delay: 0.05s; }
.all-projects-item:nth-child(2) { animation-delay: 0.1s; }
.all-projects-item:nth-child(3) { animation-delay: 0.15s; }
.all-projects-item:nth-child(4) { animation-delay: 0.2s; }
.all-projects-item:nth-child(5) { animation-delay: 0.25s; }
.all-projects-item:nth-child(6) { animation-delay: 0.3s; }
.all-projects-item:nth-child(7) { animation-delay: 0.35s; }
.all-projects-item:nth-child(8) { animation-delay: 0.4s; }

/* Scan line on all-projects image hover */
.all-projects-item-image {
  position: relative;
}

.all-projects-item-image::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to bottom, transparent, rgba(32, 217, 182, 0.4), transparent);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.all-projects-item:hover .all-projects-item-image::after {
  opacity: 1;
  animation: scanLineSweep 1.5s ease-in-out infinite;
}

/* All-projects title glow on hover */
.all-projects-item:hover .all-projects-item-title {
  color: var(--terminal-green);
  text-shadow: 0 0 6px rgba(32, 217, 182, 0.2);
}

/* All-projects container enhanced */
.all-projects-modal.active .all-projects-container {
  border-color: var(--terminal-green);
  animation: modalFlickerIn 0.5s ease-out forwards, modalBorderPulse 3s ease-in-out 0.5s infinite;
}

/* All-projects container corner brackets (inset) */
.all-projects-container::before,
.all-projects-container::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--terminal-green);
  border-style: solid;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease 0.3s;
}

.all-projects-container::before {
  top: 6px;
  left: 6px;
  border-width: 2px 0 0 2px;
}

.all-projects-container::after {
  bottom: 6px;
  right: 6px;
  border-width: 0 2px 2px 0;
}

.all-projects-modal.active .all-projects-container::before,
.all-projects-modal.active .all-projects-container::after {
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(32, 217, 182, 0.5));
}

/* All-projects scrollbar */
.all-projects-content::-webkit-scrollbar {
  width: 4px;
}

.all-projects-content::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

.all-projects-content::-webkit-scrollbar-thumb {
  background: rgba(32, 217, 182, 0.3);
  border-radius: 2px;
}

.all-projects-content::-webkit-scrollbar-thumb:hover {
  background: rgba(32, 217, 182, 0.5);
}

/* CV Download Modal Specific Styles */
.cv-modal-container {
  max-width: 500px;
  min-height: auto;
}

.cv-modal-content {
  text-align: center;
}

.cv-modal-description {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.cv-download-form {
  text-align: left;
}

.cv-modal-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-lg);
}

.cv-modal-actions .btn {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  font-size: 0.7rem;
  clip-path: none;
  border-radius: var(--radius-sm);
}

#cv-cancel-btn {
  background: transparent;
  color: var(--error-color);
  border: 2px solid var(--error-color);
}

#cv-cancel-btn:hover {
  background: var(--error-color);
  color: var(--bg-primary);
}

.cv-submit-btn .btn-loading {
  display: none;
}

.cv-submit-btn.loading .btn-text {
  display: none;
}

.cv-submit-btn.loading .btn-loading {
  display: inline-flex;
  animation: spin 1s linear infinite;
}

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

/* Advanced Scroll Animations */
.section-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.section-slide-in {
  opacity: 0;
  transform: translateX(-100px);
  transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.section-slide-in.visible {
  opacity: 1;
  transform: translateX(0);
}

.section-scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.section-scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

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

@keyframes sectionSlideIn {
  from {
    opacity: 0;
    transform: translateY(100px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


@keyframes parallaxFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes morphGlow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(32, 217, 182, 0.3);
    border-color: rgba(32, 217, 182, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(32, 217, 182, 0.6),
      0 0 60px rgba(26, 197, 163, 0.4);
    border-color: rgba(32, 217, 182, 0.8);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* Terminal Card Boot-Up Reveal */
@keyframes terminalCardReveal {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    border-color: transparent;
    box-shadow: none;
  }
  30% {
    opacity: 0.5;
    transform: translateY(20px) scale(0.97);
    border-color: rgba(32, 217, 182, 0.2);
  }
  60% {
    opacity: 0.8;
    transform: translateY(8px) scale(0.99);
    border-color: rgba(32, 217, 182, 0.4);
    box-shadow: 0 0 15px rgba(32, 217, 182, 0.1);
  }
  80% {
    opacity: 0.95;
    transform: translateY(2px) scale(1);
    border-color: rgba(32, 217, 182, 0.3);
  }
  100% {
    opacity: 1;
    transform: none;
    border-color: var(--terminal-border);
    box-shadow: 0 0 10px rgba(32, 217, 182, 0.05);
  }
}

/* Carousel slide entrance animation */
.carousel-slide .project-card {
  will-change: transform, opacity;
}

/* Terminal card boot-up for carousel cards */
.carousel-slide.card-reveal .project-card {
  animation: terminalCardReveal 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Project card inner text stagger animation (works in both grid and carousel) */
.project-card .project-title,
.project-card .project-engine,
.project-card .project-description,
.project-card .tech-tag,
.project-card .project-footer {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Projects Grid Layout */
.projects-container {
  margin-bottom: var(--space-3xl);
  padding-bottom: 120px;
}

/* Grid: visible on desktop, hidden on mobile. Carousel visible everywhere. */
@media (min-width: 769px) {
  .projects-grid {
    display: grid !important;
  }
}

@media (max-width: 768px) {
  .projects-grid {
    display: none !important;
  }
}

/* All Projects Modal */
.all-projects-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.all-projects-modal.active {
  opacity: 1;
  visibility: visible;
}

.all-projects-container {
  position: relative;
  max-width: 90vw;
  width: 1200px;
  max-height: 85vh;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  border: 2px solid var(--bg-tertiary);
  overflow: hidden;
  transform: scale(0.9);
  transition: transform var(--transition-base);
}

.all-projects-modal.active .all-projects-container {
  transform: scale(1);
}

.all-projects-content {
  max-height: calc(85vh - 80px);
  overflow-y: auto;
  padding: var(--space-lg);
}

.all-projects-list {
  display: grid;
  gap: var(--space-md);
}

.all-projects-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 2px solid var(--bg-tertiary);
  transition: transform var(--transition-fast),
              border-color var(--transition-fast),
              box-shadow var(--transition-fast);
  cursor: pointer;
  contain: layout style;
}

.all-projects-item:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.all-projects-item-image {
  width: 120px;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

.all-projects-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.all-projects-item-content {
  flex: 1;
  min-width: 0;
}

.all-projects-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-xs);
  gap: var(--space-sm);
}

.all-projects-item-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.all-projects-item-date {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.all-projects-item-description {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.4;
  margin-bottom: var(--space-xs);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.all-projects-item-meta {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  flex-wrap: wrap;
}

.all-projects-item-engine {
  padding: 2px 6px;
  background: var(--primary-color);
  color: var(--bg-primary);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
}

.all-projects-item-status {
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: capitalize;
}

.all-projects-item-status.completed {
  background: rgba(74, 222, 128, 0.2);
  color: var(--success-color);
}

.all-projects-item-status.in-development {
  background: rgba(255, 184, 0, 0.2);
  color: var(--warning-color);
}



/* Desktop and Tablet Navigation */
@media (min-width: 769px) {
  .carousel-prev {
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
  }

  .carousel-next {
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  :root {
    --container-padding: var(--space-md);
    --space-3xl: 4rem;
  }

  .info-content {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    text-align: center;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .profile-image {
    width: 300px !important;
    height: 300px !important;
    margin: 0 auto var(--space-md) auto !important;
    display: block !important;
  }

  .floating-elements {
    display: none;
  }

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

@media (max-width: 768px) {
  :root {
    --container-padding: var(--space-md);
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
  }


  .header {
    position: relative;
  }

  .info {
    margin-top: var(--space-sm);
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid var(--bg-tertiary);
    padding: var(--space-xl) var(--space-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: calc(var(--z-fixed) - 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center;
  }

  .nav-toggle {
    display: flex;
    z-index: var(--z-modal);
  }

  .section-header {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
    margin-bottom: var(--space-xl);
    padding: 0;
  }

  .section-number {
    font-size: var(--text-3xl);
  }

  .section-title {
    font-size: var(--text-3xl);
  }

  .info-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    align-items: center;
    min-height: 300px;
  }

  .info-text {
    order: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
  }

  .info-visual {
    order: 2;
    justify-self: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .profile-image {
    width: 240px !important;
    height: 240px !important;
    margin: 0 auto var(--space-md) auto !important;
    display: block !important;
  }

  .info-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    text-align: center;
    margin: var(--space-md) 0;
  }

  .stat-item {
    padding: var(--space-xs);
  }

  .stat-number {
    font-size: var(--text-lg);
  }

  .stat-label {
    font-size: 10px;
    line-height: 1.2;
  }

  .info-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    margin-top: var(--space-md);
  }

  .btn {
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-sm);
    justify-self: stretch;
    clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
    letter-spacing: 0.05em;
  }

  .social-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xs);
    margin-top: var(--space-md);
    margin-bottom: var(--space-2xl);
    grid-column: 1 / -1;
  }

  .social-link {
    padding: var(--space-xs);
    font-size: var(--text-xs);
    justify-self: stretch;
    text-align: center;
    min-height: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
  }

  .social-link span {
    display: block;
    font-size: var(--text-xs);
    margin-top: 1px;
    white-space: nowrap;
  }

  .social-link i {
    font-size: var(--text-base);
  }

  .projects-grid {
    display: none; /* Hide grid on mobile */
  }

  .projects-carousel {
    display: block; /* Show carousel on mobile */
  }

  .carousel-slide .project-card {
    min-height: 340px;
  }

  .project-image {
    height: 160px;
    flex-shrink: 0;
  }

  .carousel-nav {
    width: 42px;
    height: 50px;
    opacity: 0.95;
    z-index: 25;
    background: rgba(5, 10, 5, 0.95);
  }

  .carousel-nav:hover {
    transform: scale(1.05);
  }

  .carousel-nav:active {
    transform: scale(0.96);
  }

  .carousel-nav i {
    font-size: var(--text-base);
  }

  .projects-container {
    padding-bottom: 100px;
  }

  .carousel-prev {
    bottom: -70px;
    left: calc(50% - 70px);
    top: auto;
    transform: none;
  }

  .carousel-next {
    bottom: -70px;
    right: calc(50% - 70px);
    top: auto;
    transform: none;
  }

  .project-card {
    min-height: 320px;
    margin: 0;
  }

  .project-image {
    height: 180px;
  }

  .project-content {
    padding: var(--space-md);
    gap: var(--space-sm);
  }

  .project-header {
    flex-direction: column;
    gap: var(--space-xs);
    align-items: flex-start;
  }

  .project-title {
    font-size: var(--text-lg);
    line-height: 1.3;
  }

  .project-description {
    font-size: var(--text-sm);
    line-height: 1.5;
    margin-bottom: var(--space-sm);
  }

  .project-technologies {
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
  }

  .tech-tag {
    font-size: 10px;
    padding: 2px 4px;
    line-height: 1;
  }

  .project-footer {
    flex-direction: column;
    gap: var(--space-sm);
    align-items: stretch;
  }

  .project-links {
    justify-content: center;
    gap: var(--space-md);
  }

  .project-link {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  .project-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    padding: 0;
  }

  .filter-btn {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
    text-align: center;
    flex: 0 1 auto;
  }

  .filter-label-full {
    display: none;
  }

  .skills-category {
    padding: var(--space-lg);
  }

  .category-header {
    margin-bottom: var(--space-lg);
  }

  .category-title {
    font-size: var(--text-lg);
  }

  .category-icon {
    width: 44px;
    height: 44px;
  }

  .category-icon i {
    font-size: var(--text-lg);
  }

  .contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    padding: 0 var(--space-sm);
    align-items: stretch;
    height: auto;
    max-height: none;
  }

  .contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-sm);
  }

  .contact-method {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-sm);
    align-items: center;
    padding: var(--space-sm);
    text-align: left;
  }

  .method-content {
    justify-self: start;
  }

  .footer {
    padding-bottom: calc(var(--space-xs) + 64px);
  }

  .footer-hud-border {
    margin-bottom: var(--space-sm);
  }

  .footer-content {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0;
  }

  .footer-social {
    display: flex;
    gap: 6px;
  }

  .footer-link {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .footer-status {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 10px;
    gap: 4px;
  }

  .footer-back-top {
    display: none;
  }
}

@media (max-width: 480px) {
  :root {
    --container-padding: var(--space-xs);
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --space-3xl: 3rem;
  }

  .info {
    margin-top: var(--space-sm);
  }

  .info-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    align-items: center;
    text-align: center;
    justify-items: center;
  }

  .info-text {
    order: 2;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .info-visual {
    order: 1;
    justify-self: center;
    flex-shrink: 0;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .profile-image {
    width: 260px !important;
    height: 260px !important;
    margin: 0 auto var(--space-md) auto !important;
    display: block !important;
  }

  .info-name {
    font-size: var(--text-lg);
    line-height: 1.1;
    margin-bottom: var(--space-xs);
  }

  .info-title .title-text {
    font-size: var(--text-base);
  }

  .title-cursor {
    height: 20px;
    width: 2px;
  }

  .info-description {
    font-size: var(--text-xs);
    line-height: 1.4;
    margin-bottom: var(--space-sm);
    padding: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .info-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xs);
    margin: var(--space-sm) 0;
  }

  .stat-number {
    font-size: var(--text-base);
  }

  .stat-label {
    font-size: 9px;
  }

  .info-buttons {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
  }

  .btn {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-xs);
    white-space: nowrap;
    clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px);
    letter-spacing: 0.04em;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .btn span {
    font-size: var(--text-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .btn i {
    margin-left: var(--space-xs);
    font-size: var(--text-sm);
    flex-shrink: 0;
  }

  .projects-grid {
    display: none; /* Hide grid on small mobile */
  }

  .projects-carousel {
    display: block; /* Show carousel on small mobile */
  }

  .carousel-slide .project-card {
    min-height: 300px;
  }

  .project-image {
    height: 140px;
    flex-shrink: 0;
  }

  .carousel-nav {
    width: 38px;
    height: 46px;
    opacity: 0.95;
    z-index: 25;
    background: rgba(5, 10, 5, 0.95);
  }

  .carousel-nav:hover {
    transform: scale(1.05);
  }

  .carousel-nav:active {
    transform: scale(0.96);
  }

  .carousel-nav i {
    font-size: var(--text-sm);
  }

  .projects-container {
    padding-bottom: 90px;
  }

  .carousel-prev {
    bottom: -60px;
    left: calc(50% - 60px);
    top: auto;
    transform: none;
  }

  .carousel-next {
    bottom: -60px;
    right: calc(50% - 60px);
    top: auto;
    transform: none;
  }

  .project-card {
    min-height: 350px;
    margin: 0;
  }

  .project-image {
    height: 160px;
  }

  .project-content {
    padding: var(--space-sm);
    gap: var(--space-xs);
  }

  .project-title {
    font-size: var(--text-sm);
    line-height: 1.2;
  }

  .project-description {
    font-size: var(--text-xs);
    line-height: 1.3;
    margin-bottom: var(--space-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .project-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0;
    position: relative !important;
    z-index: 100 !important;
    margin-bottom: var(--space-lg) !important;
    pointer-events: auto !important;
  }

  .filter-btn {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-xs);
    text-align: center;
    flex: 0 1 auto;
    pointer-events: auto !important;
    z-index: 100 !important;
    position: relative !important;
    min-height: 44px !important; /* Ensure touch target size */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .project-link {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .modal {
    padding: var(--space-md) !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .modal-container {
    max-width: calc(100vw - 2rem) !important;
    width: calc(100vw - 2rem) !important;
    max-height: calc(100vh - 4rem) !important;
    margin: 0 auto !important;
    left: 50% !important;
    transform: translateX(-50%) scale(0.9) !important;
  }

  .modal.active .modal-container {
    transform: translateX(-50%) scale(1) !important;
  }

  .all-projects-container {
    max-width: calc(100vw - 2rem) !important;
    width: 100% !important;
    max-height: calc(100vh - 4rem) !important;
    margin: 0 !important;
  }

  .all-projects-item {
    padding: var(--space-sm);
    margin-bottom: var(--space-sm);
  }

  /* Fix individual project modal centering in mobile */
  #project-modal .modal-container {
    max-width: calc(100vw - 2rem) !important;
    width: calc(100vw - 2rem) !important;
    max-height: calc(100vh - 4rem) !important;
    margin: 0 auto !important;
    left: 50% !important;
    transform: translateX(-50%) scale(0.9) !important;
  }

  #project-modal.active .modal-container {
    transform: translateX(-50%) scale(1) !important;
  }

  /* Ensure modal content has proper spacing */
  .modal-content {
    padding: var(--space-sm) !important;
    overflow-y: auto !important;
    max-height: calc(100vh - 8rem) !important;
  }

  .modal-header {
    padding: var(--space-sm) var(--space-md) !important;
    flex-shrink: 0 !important;
  }

  .contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    padding: 0 var(--space-sm);
    align-items: stretch;
    height: auto;
  }

  .contact-info {
    order: 2;
  }

  .contact-form-container {
    order: 1;
    padding: var(--space-sm) var(--space-xs);
  }

  .contact-form {
    padding: 0;
    gap: var(--space-xs);
  }

  .form-group {
    margin-bottom: var(--space-xs);
  }

  .section-header {
    padding: 0;
    margin-bottom: var(--space-lg);
  }

  .section-title {
    font-size: var(--text-2xl);
  }

  .section-number {
    font-size: var(--text-2xl);
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .skill-card {
    flex-direction: row;
    text-align: left;
    gap: var(--space-sm);
    padding: var(--space-sm);
  }

  .skill-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }

  .skills-category {
    padding: var(--space-md);
  }

  .category-header {
    margin-bottom: var(--space-md);
  }

  .category-title {
    font-size: var(--text-base);
  }

  .category-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
  }

  .category-icon i {
    font-size: var(--text-base);
  }

  .skill-name {
    font-size: var(--text-sm);
  }

  .skill-level {
    font-size: var(--text-xs);
    margin-bottom: var(--space-xs);
  }
}

/* Utilities */
.hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Scrollbar - Terminal Green */
::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--terminal-border);
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--terminal-green-dim);
}

/* Particle Effects */
.particle {
  position: absolute;
  background: var(--primary-color);
  border-radius: 50%;
  pointer-events: none;
  animation: float 6s ease-in-out infinite;
  box-shadow: 0 0 8px var(--primary-color);
  opacity: 0.8 !important;
  z-index: 2;
}

.particle.large {
  width: 8px !important;
  height: 8px !important;
  opacity: 0.9 !important;
  box-shadow: 0 0 12px var(--primary-color) !important;
}

.particle.medium {
  width: 5px !important;
  height: 5px !important;
  opacity: 0.8 !important;
  box-shadow: 0 0 10px var(--primary-color) !important;
}

.particle.small {
  width: 3px !important;
  height: 3px !important;
  opacity: 0.7 !important;
  box-shadow: 0 0 8px var(--primary-color) !important;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.7;
  }
  25% {
    transform: translateY(-20px) rotate(90deg);
    opacity: 1;
  }
  50% {
    transform: translateY(-40px) rotate(180deg);
    opacity: 0.8;
  }
  75% {
    transform: translateY(-20px) rotate(270deg);
    opacity: 1;
  }
}

/* Glitch Effects */
.glitch {
  position: relative;
  display: inline-block;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
}


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

.glitch::before {
  animation: glitch-1 0.3s ease-in-out infinite;
  color: var(--secondary-color);
  z-index: -1;
}

.glitch::after {
  animation: glitch-2 0.3s ease-in-out infinite;
  color: #1AB89E;
  z-index: -2;
}

.glitch.animate::before,
.glitch.animate::after {
  opacity: 0.8;
}

@keyframes glitch-1 {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
  100% {
    transform: translate(0);
  }
}

@keyframes glitch-2 {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(2px, 2px);
  }
  40% {
    transform: translate(2px, -2px);
  }
  60% {
    transform: translate(-2px, 2px);
  }
  80% {
    transform: translate(-2px, -2px);
  }
  100% {
    transform: translate(0);
  }
}

/* Selection */
/* ============================================================
   Terminal Chrome - Window frames, scanlines, glow effects
   ============================================================ */

/* Terminal Window */
.terminal-window {
  background: var(--bg-secondary);
  border: 1px solid var(--terminal-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-lg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 1px var(--terminal-border);
}

/* ── HUD Overlay Header ── */
.hud-header {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 10px 16px;
  background: var(--terminal-header-bg);
  border-bottom: 1px solid var(--terminal-border);
  font-family: var(--font-mono);
  user-select: none;
}

.hud-bracket {
  color: var(--terminal-border);
  font-size: var(--text-base);
  line-height: 1;
  flex-shrink: 0;
}

.hud-label {
  color: var(--primary-color);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  white-space: nowrap;
  padding: 0 8px;
  flex-shrink: 0;
}

.hud-line {
  flex: 1;
  height: 1px;
  background: var(--terminal-border);
  min-width: 20px;
}

.hud-marker {
  color: var(--primary-color);
  font-size: 10px;
  flex-shrink: 0;
  padding: 0 8px;
  text-shadow: 0 0 6px rgba(32, 217, 182, 0.4);
  animation: hud-pulse 3s ease-in-out infinite;
}

@keyframes hud-pulse {
  0%, 100% {
    text-shadow: 0 0 6px rgba(32, 217, 182, 0.4);
    opacity: 1;
  }
  50% {
    text-shadow: 0 0 12px rgba(32, 217, 182, 0.7), 0 0 20px rgba(32, 217, 182, 0.3);
    opacity: 0.85;
  }
}

.hud-bracket-end {
  color: var(--terminal-border);
  font-size: var(--text-sm);
  line-height: 1;
  flex-shrink: 0;
}

/* Modal HUD header adjustments */
.modal-header.hud-header {
  justify-content: flex-start;
  padding: 10px var(--space-lg);
}

.modal-header.hud-header .modal-close {
  margin-left: auto;
  flex-shrink: 0;
}

.modal-header.hud-header .hud-label {
  font-size: var(--text-sm);
  letter-spacing: 0.15em;
}

@media (max-width: 768px) {
  .modal-header.hud-header .hud-label {
    font-size: var(--text-sm);
    letter-spacing: 0.12em;
  }
  .modal-header.hud-header .hud-bracket,
  .modal-header.hud-header .hud-bracket-end {
    font-size: var(--text-base);
  }
}

@media (max-width: 480px) {
  .modal-header.hud-header .hud-label {
    font-size: var(--text-xs);
    letter-spacing: 0.1em;
  }
  .modal-header.hud-header .hud-bracket,
  .modal-header.hud-header .hud-bracket-end {
    font-size: var(--text-sm);
  }
}

.terminal-body {
  padding: var(--space-lg);
}

.skills .terminal-body {
  padding: var(--space-lg) var(--space-xl) var(--space-2xl);
}

.contact .terminal-body {
  padding: var(--space-md) var(--space-sm);
}

/* Scanlines overlay — disabled */

/* Green Glow utilities */
.text-glow {
  text-shadow: 0 0 8px rgba(32, 217, 182, var(--glow-strength));
}

.text-glow-strong {
  text-shadow: 0 0 10px rgba(32, 217, 182, 0.6), 0 0 20px rgba(32, 217, 182, 0.3), 0 0 40px rgba(32, 217, 182, 0.1);
}

.box-glow {
  box-shadow: 0 0 15px rgba(32, 217, 182, 0.15), 0 0 30px rgba(32, 217, 182, 0.05);
}

/* Command prompt prefix */
.cmd-prompt::before {
  content: '$ ';
  color: var(--terminal-green);
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Terminal cursor */
.terminal-cursor::after {
  content: '_';
  animation: termBlink 1s step-end infinite;
  color: var(--terminal-green);
  font-weight: 700;
}

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

/* Typing text animation */
.typing-text {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--terminal-green);
  animation: typing 2s steps(30) forwards, typingBlink 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes typingBlink {
  0%, 50% { border-color: var(--terminal-green); }
  51%, 100% { border-color: transparent; }
}

/* Glitch hover effect for cards */
.glitch-hover {
  position: relative;
}

.glitch-hover:hover {
  animation: glitchHover 0.3s ease-in-out;
}

@keyframes glitchHover {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 1px); }
  40% { transform: translate(2px, -1px); }
  60% { transform: translate(-1px, -1px); }
  80% { transform: translate(1px, 1px); }
  100% { transform: translate(0); }
}

/* Code comment style form labels */
.form-label-code::before {
  content: '// ';
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Tech tags as inline code */
.tech-tag {
  font-family: var(--font-mono);
  background: rgba(32, 217, 182, 0.08);
  color: var(--terminal-green-dim);
  border: 1px solid rgba(32, 217, 182, 0.15);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
}

.tech-tag::before {
  content: '\`';
  opacity: 0.5;
}

.tech-tag::after {
  content: '\`';
  opacity: 0.5;
}

/* Boot loading screen */
.loading-boot-msg {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--terminal-green-dim);
  text-align: left;
  max-width: 400px;
  margin: var(--space-md) auto 0;
  line-height: 1.8;
}

.loading-boot-msg .boot-line {
  opacity: 0;
  animation: bootFadeIn 0.3s ease forwards;
}

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

/* Selection */
::selection {
  background: var(--primary-color);
  color: var(--bg-primary);
}

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

/* TABLET RESPONSIVENESS - iPad Air to Surface Pro 7 - FINAL OVERRIDE */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  /* Create 50-50 layout for tablets */
  .info .info-content {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: var(--space-2xl) !important;
    align-items: center !important;
    width: 100% !important;
  }

  /* Left side: Text content aligned to left */
  .info .info-text {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    text-align: left !important;
    order: 1 !important;
  }

  /* Right side: Profile card */
  .info .info-visual {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    order: 2 !important;
  }

  /* Fix profile card and image sizing */
  .info .profile-card {
    width: 100% !important;
    max-width: 280px !important;
    margin: 0 auto !important;
    padding: var(--space-lg) !important;
  }

  .info .profile-image {
    width: 180px !important;
    height: 180px !important;
  }

  .info .profile-card {
    width: 100% !important;
    max-width: 280px !important;
    padding: var(--space-lg) !important;
  }

  /* Reset the desktop float layout for bottom elements */
  .info .info-stats,
  .info .info-buttons,
  .info .social-links {
    float: none !important;
    width: 100% !important;
    clear: none !important;
    margin-right: 0 !important;
    text-align: center !important;
    justify-content: center !important;
  }

  .info .info-description-wrapper {
    float: none !important;
    width: 100% !important;
    text-align: center !important;
    margin: var(--space-xl) auto !important;
    max-width: 600px !important;
  }

  .info .info-stats {
    margin-top: var(--space-xl) !important;
    margin-bottom: var(--space-lg) !important;
  }

  .info .info-buttons {
    margin-bottom: var(--space-lg) !important;
    margin-top: 0 !important;
  }

  .info .social-links {
    margin-top: 0 !important;
    margin-bottom: var(--space-xl) !important;
  }

  /* Fix contact section for tablets */
  .contact .contact-content {
    grid-template-columns: 1fr !important;
    gap: var(--space-xl) !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .contact .contact-form-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* ALL PROJECTS MODAL RESPONSIVE */

/* Desktop Grid View (default) */
.all-projects-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
  padding: var(--space-lg);
  max-height: 80vh;
  overflow-y: auto;
  visibility: visible !important;
  opacity: 1 !important;
}

.all-projects-carousel {
  display: none !important; /* Hidden on desktop */
}

/* Grid project cards */
.all-projects-grid .project-card {
  background: var(--bg-secondary) !important;
  border-radius: var(--radius-xl);
  padding: 0 !important;
  border: 2px solid var(--bg-tertiary);
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  display: flex !important;
  flex-direction: column !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 400px !important;
  color: var(--text-primary) !important;
  overflow: hidden;
}

/* Project image styling */
.all-projects-grid .project-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.all-projects-grid .project-status {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.all-projects-grid .project-status.completed {
  background: var(--success-color);
  color: var(--bg-primary);
}

.all-projects-grid .project-status.in-progress {
  background: var(--warning-color);
  color: var(--bg-primary);
}

.all-projects-grid .project-status.planned {
  background: var(--text-secondary);
  color: var(--bg-primary);
}

.all-projects-grid .project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.all-projects-grid .project-card:hover .project-image img {
  transform: scale(1.05);
}

/* Project content */
.all-projects-grid .project-content {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.all-projects-grid .project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-sm);
}

.all-projects-grid .project-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.all-projects-grid .project-type {
  background: var(--primary-color);
  color: var(--bg-primary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
}

.all-projects-grid .project-meta {
  display: flex;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.all-projects-grid .project-description {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.all-projects-grid .project-technologies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.all-projects-grid .tech-tag {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
}

.all-projects-grid .project-links {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  justify-content: flex-start;
  align-items: center;
}

.all-projects-grid .project-link {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  border: 2px solid var(--bg-tertiary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  font-size: 18px;
}

.all-projects-grid .project-link:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(32, 217, 182, 0.1);
  transform: translateY(-2px);
}

.all-projects-grid .btn-sm {
  padding: 0.5rem 1rem;
  font-size: var(--text-sm);
}

/* Make sure grid items are visible */
.all-projects-grid .grid-item {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.all-projects-grid .project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

/* Tablet - 2 columns */
@media (max-width: 1024px) and (min-width: 769px) {
  .all-projects-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: var(--space-md);
    padding: var(--space-md);
  }
  
  .all-projects-grid .project-card {
    min-height: 350px !important;
  }
  
  .all-projects-grid .project-image {
    height: 180px;
  }
  
  .all-projects-carousel {
    display: none !important;
  }
}

/* Mobile - Carousel */
@media (max-width: 768px) {
  .all-projects-grid {
    display: none !important;
  }
  
  .all-projects-carousel {
    display: flex !important;
    position: relative;
    width: 100%;
    height: 80vh;
    overflow: hidden;
    align-items: center;
    justify-content: center;
  }
  
  .all-projects-carousel .carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 52px;
    border-radius: 4px;
    background: rgba(5, 10, 5, 0.92);
    border: 1px solid var(--terminal-green);
    color: var(--terminal-green);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    font-size: 20px;
    clip-path: polygon(0 8px, 8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  }

  .all-projects-carousel .carousel-nav:hover {
    background: rgba(32, 217, 182, 0.1);
    color: var(--terminal-green);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 0 20px rgba(32, 217, 182, 0.3);
  }
  
  .all-projects-carousel .carousel-prev {
    left: 10px;
  }
  
  .all-projects-carousel .carousel-next {
    right: 10px;
  }
  
  .all-projects-carousel .carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
  }

  .all-projects-carousel .carousel-dot {
    width: 20px;
    height: 3px;
    border-radius: 1px;
    background: rgba(32, 217, 182, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.35s ease;
  }

  .all-projects-carousel .carousel-dot.active {
    width: 36px;
    background: var(--terminal-green);
    box-shadow: 0 0 10px rgba(32, 217, 182, 0.5);
  }
  
  .all-projects-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
    width: 100%;
  }
  
  .all-projects-slide {
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    opacity: 0.7;
    transform: scale(0.9);
    transition: all 0.6s ease;
  }
  
  .all-projects-slide.active {
    opacity: 1;
    transform: scale(1);
  }
  
  .all-projects-slide .project-card {
    width: 100%;
    max-width: 350px;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 0;
    border: 2px solid var(--bg-tertiary);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .all-projects-slide .project-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }
  
  .all-projects-slide .project-status {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .all-projects-slide .project-status.completed {
    background: var(--success-color);
    color: var(--bg-primary);
  }
  
  .all-projects-slide .project-status.in-progress {
    background: var(--warning-color);
    color: var(--bg-primary);
  }
  
  .all-projects-slide .project-status.planned {
    background: var(--text-secondary);
    color: var(--bg-primary);
  }
  
  .all-projects-slide .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  
  .all-projects-slide .project-content {
    padding: var(--space-md);
    flex: 1;
  }
  
  .all-projects-slide .project-links {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    justify-content: flex-start;
    align-items: center;
  }
  
  .all-projects-slide .project-link {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 2px solid var(--bg-tertiary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    font-size: 18px;
  }
  
  .all-projects-slide .project-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(32, 217, 182, 0.1);
    transform: translateY(-2px);
  }
}

/* IMAGE CENTER VIA TEXT-ALIGN */
.profile-image,
.profile-card .profile-image,
.info .profile-image,
.info-visual .profile-image,
.visual-container .profile-image {
  text-align: center !important;
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  float: none !important;
}

.profile-img,
.profile-image .profile-img,
.profile-card .profile-img {
  display: inline-block !important;
  margin: 0 auto !important;
  text-align: center !important;
  vertical-align: middle !important;
}

/* ============================================================
   Terminal Theme - Mobile Optimizations
   ============================================================ */

@media (max-width: 768px) {
  .hud-header {
    padding: 8px 12px;
  }

  .hud-label {
    font-size: var(--text-xs);
    letter-spacing: 0.1em;
  }

  .hud-marker {
    font-size: 9px;
  }

  .terminal-body {
    padding: var(--space-md);
  }

  /* Shorter prompt on mobile */
  .cmd-prompt::before {
    content: '> ';
  }

  /* Scanlines removed */

  /* Reduce glow intensity */
  .text-glow {
    text-shadow: 0 0 4px rgba(32, 217, 182, 0.2);
  }

  .text-glow-strong {
    text-shadow: 0 0 6px rgba(32, 217, 182, 0.3);
  }

  /* Font size adjustments for monospace (wider chars) */
  .btn {
    font-size: calc(var(--text-sm) * 0.9);
  }

  .nav-text {
    font-size: calc(var(--text-sm) * 0.9);
  }
}

@media (max-width: 480px) {
  .hud-header {
    padding: 6px 10px;
  }

  .hud-label {
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .hud-bracket,
  .hud-bracket-end {
    font-size: var(--text-sm);
  }

  .terminal-body {
    padding: var(--space-sm);
  }
}

/* ═══════════════════════════════════════
   Bottom Navigation (Mobile Only)
   ═══════════════════════════════════════ */

.bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .bottom-nav {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(32, 217, 182, 0.15);
    box-shadow: 0 -2px 20px rgba(32, 217, 182, 0.05);
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1),
                opacity 350ms cubic-bezier(0.4, 0, 0.2, 1),
                visibility 350ms;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .bottom-nav.visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .bottom-nav-track {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 400px;
    margin: 0 auto;
    padding: 6px 0;
  }

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    padding: 4px 12px;
    text-decoration: none;
    color: var(--text-secondary, #888);
    position: relative;
    transition: color 250ms ease;
    -webkit-tap-highlight-color: transparent;
  }

  .bottom-nav-icon {
    font-size: 22px;
    transition: transform 250ms ease, color 250ms ease;
  }

  .bottom-nav-label {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 10px;
    letter-spacing: 0.5px;
    text-transform: lowercase;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 250ms ease, opacity 200ms ease, margin-top 250ms ease;
    margin-top: 0;
  }

  /* Active item */
  .bottom-nav-item.active {
    color: var(--primary, #20D9B6);
  }

  .bottom-nav-item.active .bottom-nav-icon {
    transform: translateY(-1px);
    filter: drop-shadow(0 0 6px rgba(32, 217, 182, 0.4));
  }

  .bottom-nav-item.active .bottom-nav-label {
    max-height: 16px;
    opacity: 1;
    margin-top: 2px;
  }

  /* Active indicator line */
  .bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    background: var(--primary, #20D9B6);
    border-radius: 0 0 2px 2px;
    box-shadow: 0 0 8px rgba(32, 217, 182, 0.3);
  }

  /* Prevent body content from hiding behind bottom nav */
  body.bottom-nav-active {
    padding-bottom: 64px;
  }
}

/* ═══ Mobile Performance Optimizations ═══ */
@media (max-width: 768px) {
  /* Pause all infinite box-shadow animations (constant repaints) */
  .carousel-dot,
  .project-link[title="More Info"],
  .project-link[title="More Info"]::after,
  .category-icon,
  .modal.active .modal-container,
  .all-projects-modal.active .all-projects-container,
  .project-status.in-development::after {
    animation-play-state: paused !important;
    animation: none !important;
  }

  /* Disable filter-heavy animations on mobile */
  .project-card:hover .project-img {
    animation: none;
  }

  .carousel-track {
    animation: none !important;
  }

  /* Simplify modal entrance — no filter flicker */
  .modal.active .modal-container {
    animation: none !important;
    opacity: 1;
    transform: scale(1);
  }

  /* Disable scan line sweep on mobile (hover doesn't apply anyway) */
  .project-card:hover .project-image::after,
  .all-projects-item:hover .all-projects-item-image::after {
    animation: none;
    opacity: 0;
  }

  /* Disable HUD pulse text-shadow animations */
  .hud-bracket-start,
  .hud-bracket-end,
  .hud-dot {
    animation: none !important;
  }

  /* Simplify float animations */
  .parallax-shape,
  .contact-decoration {
    animation: none !important;
  }

  /* Disable glitch effects */
  .glitch::before,
  .glitch::after {
    display: none;
  }

  /* GPU containment on grid containers */
  .projects-grid,
  .skills-grid,
  .contact-grid,
  .all-projects-grid {
    contain: layout style;
  }

  /* Remove will-change from carousel when not needed on mobile */
  .carousel-track {
    will-change: auto;
  }
}

/* Accessibility: Disable animations for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  /* Scanlines already removed */

  .typing-text {
    animation: none;
    border-right: none;
    width: auto;
  }

  .glitch-hover:hover {
    animation: none;
  }

  .glitch::before,
  .glitch::after {
    animation: none;
    display: none;
  }

  .terminal-cursor::after {
    animation: none;
  }

  .loading-progress {
    transition: none;
  }

  .boot-line {
    animation: none;
    opacity: 1;
  }

  .bottom-nav,
  .bottom-nav-item,
  .bottom-nav-icon,
  .bottom-nav-label {
    transition: none !important;
  }

  /* HUD enhancements: disable all animations */
  .project-card::before,
  .project-card::after {
    display: none;
  }

  .project-card:hover {
    animation: none;
  }

  .project-card:hover .project-image::after {
    display: none;
  }

  .project-card:hover .project-img {
    animation: none;
  }

  .project-status.in-development::after {
    display: none;
  }

  .project-card.flicker-in {
    animation: none;
    opacity: 1;
  }

  .tech-tag {
    animation: none;
  }

  /* Modal enhancements: disable all animations */
  .modal-container::before,
  .modal-container::after,
  .all-projects-container::before,
  .all-projects-container::after {
    display: none;
  }

  .modal.active .modal-container,
  .all-projects-modal.active .all-projects-container {
    animation: none;
    opacity: 1;
    transform: scale(1);
  }

  .modal-section,
  .modal-project-header {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .all-projects-item {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .all-projects-item:hover .all-projects-item-image::after {
    display: none;
  }

  .modal-status.in-development::after {
    display: none;
  }

  /* Carousel enhancements: disable animations */
  .carousel-track.transitioning {
    animation: none;
  }

  .carousel-slide.entering,
  .carousel-slide.exiting {
    animation: none;
  }

  .carousel-dot.active {
    animation: none;
  }

  .carousel-slide:not(.active) .project-card {
    filter: none;
  }

  /* Info button: disable pulse */
  .project-link[title="More Info"] {
    animation: none;
  }

  .project-link[title="More Info"]::after {
    display: none;
  }

  /* Disable all remaining infinite glow/pulse animations */
  .category-icon,
  .skill-progress::before,
  .hud-bracket-start,
  .hud-bracket-end,
  .hud-dot,
  .parallax-shape,
  .contact-decoration {
    animation: none !important;
  }

  /* Kill all transitions for true reduced motion */
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   WHACK-A-BUG MINI GAME — All Devices
═══════════════════════════════════════════════════════════ */

/* ── Play button (profile section) ── */
.btn-game {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background var(--transition-base), color var(--transition-base), box-shadow var(--transition-base);
}
.btn-game:hover {
  background: rgba(32, 217, 182, 0.12);
  box-shadow: 0 0 12px rgba(32, 217, 182, 0.3);
}

/* ── Modal overlay ── */
.game-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}
.game-modal.active {
  opacity: 1;
  visibility: visible;
}
.game-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0.88);
  backdrop-filter: blur(6px);
}
.game-modal-container {
  position: relative;
  z-index: 1;
  width: min(92vw, 640px);
  max-height: 90dvh;
  background: var(--bg-secondary);
  border: 1px solid var(--terminal-border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: game-modal-enter 0.22s ease-out;
}
@keyframes game-modal-enter {
  from { transform: scale(0.96) translateY(-8px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);    opacity: 1; }
}
.game-modal-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--terminal-border);
  background: var(--bg-tertiary);
  flex-shrink: 0;
}
.game-modal-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0;
  transition: color var(--transition-fast);
}
.game-modal-close:hover { color: var(--primary-color); }

/* ── Modal body (game content) ── */
.game-modal-body {
  padding: var(--space-lg) var(--space-md);
  overflow-y: auto;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

/* ── Intro Screen ── */
.game-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
  max-width: 560px;
}

.game-intro-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 0.15em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-shadow: 0 0 20px rgba(32, 217, 182, 0.5);
}

.game-prompt {
  color: var(--text-secondary);
  font-size: 1.4rem;
}

.game-cursor-blink {
  animation: blink 1s step-end infinite;
  color: var(--primary-color);
}

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

.game-intro-desc {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.game-desc-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: left;
}

.game-highlight {
  color: var(--primary-color);
  font-weight: 600;
}

.game-controls-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.game-key {
  border: 1px solid var(--terminal-border);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 0.75rem;
  background: var(--bg-tertiary);
}

.game-start-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  letter-spacing: 0.1em;
  padding: 0.75rem 2.5rem;
  margin-top: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-base);
}

/* ── Active Game HUD ── */
.game-active {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
}

.game-hud {
  width: 100%;
  max-width: 560px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--terminal-border);
  border-radius: 6px;
  background: var(--bg-tertiary);
  font-family: 'JetBrains Mono', monospace;
}

.game-hud-score,
.game-hud-timer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hud-label-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.hud-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
  min-width: 2.5ch;
  text-align: right;
}

.hud-target {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.hud-timer-val.timer-warning {
  color: var(--warning-color) !important;
  animation: pulse-warn 0.5s ease-in-out infinite alternate;
}

@keyframes pulse-warn {
  from { opacity: 1; }
  to { opacity: 0.5; }
}

.game-hud-timer {
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.timer-bar-wrap {
  width: 100px;
  height: 4px;
  background: var(--bg-secondary);
  border-radius: 2px;
  overflow: hidden;
}

.timer-bar {
  height: 100%;
  width: 100%;
  background: var(--primary-color);
  border-radius: 2px;
  transition: width 1s linear, background 0.3s ease;
}

.timer-bar.timer-low {
  background: var(--warning-color);
}

/* ── Bug Grid ── */
.bug-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 560px;
}

.bug-cell {
  aspect-ratio: 1;
  border: 1px solid var(--terminal-border);
  border-radius: 8px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  font-size: 1.6rem;
  min-height: 72px;
}

.bug-cell.bug-active {
  border-color: var(--primary-color);
  background: rgba(32, 217, 182, 0.08);
  box-shadow: 0 0 12px rgba(32, 217, 182, 0.25);
  cursor: pointer;
}

.bug-cell.bug-active:hover {
  background: rgba(32, 217, 182, 0.15);
  box-shadow: 0 0 20px rgba(32, 217, 182, 0.4);
  transform: scale(1.05);
}

.bug-cell.bug-hit {
  border-color: var(--error-color);
  background: rgba(248, 113, 113, 0.08);
}

.bug-sprite {
  display: block;
  animation: bug-appear 0.15s ease-out;
  pointer-events: none;
}

.hit-sprite {
  animation: hit-flash 0.3s ease-out forwards;
}

@keyframes bug-appear {
  from { transform: scale(0.3) rotate(-20deg); opacity: 0; }
  to { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes hit-flash {
  0% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.5); opacity: 0; }
}

/* ── Result Screens (Win / Lose) ── */
.game-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
  max-width: 480px;
}

.result-icon {
  font-size: 3.5rem;
  line-height: 1;
}

.result-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.game-win .result-title {
  color: var(--primary-color);
  text-shadow: 0 0 20px rgba(32, 217, 182, 0.5);
}

.game-lose .result-title {
  color: var(--error-color);
}

.result-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.result-score-val {
  color: var(--primary-color);
  font-weight: 700;
}

.result-msg {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Email Form (Win Screen) ── */
.game-email-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.email-input-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.game-email-input {
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  background: var(--bg-secondary);
  border: 1px solid var(--terminal-border);
  color: var(--text-primary);
  padding: 0.65rem 1rem;
  border-radius: 6px;
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.game-email-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(32, 217, 182, 0.15);
}

.game-email-input::placeholder {
  color: var(--text-muted);
}

.game-submit-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-base);
}

.game-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.email-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  text-align: left;
  min-height: 1.2em;
}

.status-success { color: var(--success-color); }
.status-error { color: var(--error-color); }

/* ── Retry / Back buttons (Lose Screen) ── */
.game-result .game-retry-btn,
.game-result .game-back-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  padding: 0.65rem 2rem;
  cursor: pointer;
  transition: all var(--transition-base);
}

.game-back-btn {
  background: transparent !important;
  border: 1px solid var(--terminal-border) !important;
  color: var(--text-secondary) !important;
}

.game-back-btn:hover {
  border-color: var(--primary-color) !important;
  color: var(--primary-color) !important;
}

/* ── Mobile responsive tweaks ── */
@media (max-width: 540px) {
  .game-modal-container {
    width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .game-modal-body {
    padding: var(--space-md) var(--space-sm);
  }
  .bug-grid {
    gap: 5px;
  }
  .bug-cell {
    min-height: 54px;
    font-size: 1.25rem;
    border-radius: 6px;
  }
  .game-intro-title {
    font-size: 1.3rem;
  }
  .game-hud {
    padding: 0.4rem 0.75rem;
    gap: 0.5rem;
  }
  .hud-value {
    font-size: 1.25rem;
  }
  .timer-bar-wrap {
    width: 70px;
  }
  .result-title {
    font-size: 1.25rem;
  }
  .email-input-wrap {
    flex-direction: column;
  }
  .game-submit-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ═══════════════════════════════════════
   GAME — Enhanced Animations & Effects
═══════════════════════════════════════ */

/* 3-2-1-GO Countdown */
.game-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  font-family: 'JetBrains Mono', monospace;
}
.countdown-num {
  font-size: 5rem;
  font-weight: 800;
  color: var(--primary-color);
  text-shadow: 0 0 40px rgba(32, 217, 182, 0.6);
  animation: countdown-pop 0.6s ease-out;
  display: block;
}
@keyframes countdown-pop {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Score Pop (+1, +3) */
.bug-cell { position: relative; }
.score-pop {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-color);
  pointer-events: none;
  z-index: 10;
  animation: pop-up 0.6s ease-out forwards;
}
.score-pop-gold { color: gold !important; font-size: 1.1rem !important; }
@keyframes pop-up {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-30px); }
}

/* Combo Display */
.combo-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.combo-display.combo-show { opacity: 1; }
.combo-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.6rem;
  font-weight: 800;
  color: #FF6B35;
  text-shadow: 0 0 20px rgba(255, 107, 53, 0.6);
  animation: combo-pulse 0.3s ease-out;
  white-space: nowrap;
}
@keyframes combo-pulse {
  0% { transform: scale(0.5); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.game-active { position: relative; }

/* Grid Shake */
@keyframes grid-shake {
  0%, 100% { transform: translate(0); }
  25% { transform: translate(-3px, 2px); }
  50% { transform: translate(3px, -2px); }
  75% { transform: translate(-2px, -1px); }
}
.grid-shake { animation: grid-shake 0.15s ease-out; }

/* Miss Flash */
.cell-miss {
  border-color: var(--error-color) !important;
  background: rgba(248, 113, 113, 0.12) !important;
  transition: none !important;
}

/* Special Bug (Spider = 3pts, gold glow) */
.bug-cell.bug-special {
  border-color: gold !important;
  background: rgba(255, 215, 0, 0.08) !important;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.35) !important;
}
.bug-cell.bug-special:hover {
  box-shadow: 0 0 24px rgba(255, 215, 0, 0.5) !important;
}

/* Speed Mode (last 10s) */
.bug-grid.speed-mode {
  outline: 1px solid var(--warning-color);
  outline-offset: 4px;
  border-radius: 10px;
  animation: speed-pulse 0.8s ease-in-out infinite alternate;
}
@keyframes speed-pulse {
  from { outline-color: var(--warning-color); }
  to { outline-color: transparent; }
}

/* Feature Trap (sparkle = -2pts, don't click!) */
.bug-cell.bug-feature {
  border-color: #c084fc !important;
  background: rgba(192, 132, 252, 0.08) !important;
  box-shadow: 0 0 14px rgba(192, 132, 252, 0.3) !important;
  animation: feature-shimmer 0.6s ease-in-out infinite alternate;
}
.bug-cell.bug-feature:hover {
  box-shadow: 0 0 22px rgba(192, 132, 252, 0.5) !important;
}
@keyframes feature-shimmer {
  from { border-color: #c084fc; }
  to { border-color: #e879f9; }
}
.score-pop-red { color: var(--error-color) !important; font-size: 1.1rem !important; }
