/* ==========================================================================
   Base & Reset
   ========================================================================== */
:root {
  /* Colors - Light Theme Default */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e2e8f0;

  --text-primary: #020617; /* Slate 950 */
  --text-secondary: #334155; /* Slate 700 */
  --text-muted: #64748b; /* Slate 500 */

  --accent-primary: #2563eb; /* Blue 600 */
  --accent-secondary: #db2777; /* Pink 600 */
  --accent-tertiary: #7c3aed; /* Violet 600 */
  --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
  --neon-glow: 0 0 15px rgba(37, 99, 235, 0.3), 0 0 30px rgba(219, 39, 119, 0.15);

  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(37, 99, 235, 0.2);
  --glass-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.1);

  /* Layout */
  --nav-height: 80px;
  --container-width: 1200px;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'JetBrains Mono', monospace;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

[data-theme='dark'] {
  /* Colors - Dark Theme Redesign (Slate and vibrant neon) */
  --bg-primary: #020617;
  --bg-secondary: #0f172a;
  --bg-tertiary: #1e293b;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;

  --accent-primary: #3b82f6;
  --accent-secondary: #ec4899;
  --accent-tertiary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
  --neon-glow: 0 0 15px rgba(59, 130, 246, 0.4), 0 0 30px rgba(236, 72, 153, 0.2);

  --glass-bg: rgba(15, 23, 42, 0.65);
  --glass-border: rgba(59, 130, 246, 0.15);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  
  --gradient-primary-color: #3b82f6;
  --gradient-secondary-color: #8b5cf6;
  --gradient-primary-rgba: rgba(59, 130, 246, 0);
  --gradient-secondary-rgba: rgba(139, 92, 246, 0);
  --shimmer-color: rgba(59, 130, 246, 0.1);
  --card-hover-border: rgba(236, 72, 153, 0.4);
  --progress-glow: 0 0 10px rgba(139, 92, 246, 0.5);
}

/* Base default is Dark Mode as requested "tech-focused" preference */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --accent-primary: #3b82f6;
    --accent-secondary: #ec4899;
    --accent-gradient: linear-gradient(135deg, #3b82f6, #ec4899, #8b5cf6);
    --neon-glow: 0 0 15px rgba(59, 130, 246, 0.4), 0 0 30px rgba(236, 72, 153, 0.2);
    --glass-bg: rgba(15, 23, 42, 0.65);
    --glass-border: rgba(59, 130, 246, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  }
}

[data-theme='light'] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent-primary: #0284c7;
  --accent-secondary: #059669;
  --accent-gradient: linear-gradient(135deg, #0284c7, #059669);
  --neon-glow: 0 4px 14px rgba(2, 132, 199, 0.2);
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(2, 132, 199, 0.15);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  
  --gradient-primary-color: #0284c7;
  --gradient-secondary-color: #059669;
  --gradient-primary-rgba: rgba(2, 132, 199, 0);
  --gradient-secondary-rgba: rgba(5, 150, 105, 0);
  --shimmer-color: rgba(2, 132, 199, 0.1);
  --card-hover-border: rgba(2, 132, 199, 0.4);
  --progress-glow: 0 0 10px rgba(2, 132, 199, 0.5);
}

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

html {
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

body {
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  /* Using custom cursor via HTML divs to avoid sluggish cursor on image */
}

/* Custom Cursor Elements */
.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-primary);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s ease, opacity 0.2s ease;
  opacity: 0;
}

.cursor-dot.cursor-active {
  opacity: 1;
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 2px solid var(--accent-primary);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.15s ease-out, width 0.2s, height 0.2s, background-color 0.2s, opacity 0.2s ease;
  opacity: 0;
}

.cursor-outline.cursor-active {
  opacity: 0.8;
  animation: cursor-pulse 1.5s infinite ease-in-out;
}

@keyframes cursor-pulse {
  0% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
  70% { transform: translate(-50%, -50%) scale(1.2); box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
  100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

[data-theme='light'] body {
  cursor: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--text-primary);
}

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

ul {
  list-style: none;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
#matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
  opacity: 0.6; /* Increased visibility of the binary rain */
}

main {
  position: relative;
  z-index: 2;
}

.section {
  padding: 100px 5%;
  max-width: var(--container-width);
  margin: 0 auto;
}

.section-header {
  margin-bottom: 60px;
  text-align: center;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  display: inline-block;
  background: var(--accent-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: rotate-gradient 4s ease infinite;
}

.divider {
  height: 4px;
  width: 60px;
  background: var(--accent-gradient);
  border-radius: 2px;
  margin: 0 auto;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  box-shadow: var(--glass-shadow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(800px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%), rgba(255, 255, 255, 0.06), transparent 40%);
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

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

.glass-card > * {
  position: relative;
  z-index: 1;
}

.glass-card:hover {
  border-color: var(--card-hover-border, rgba(236, 72, 153, 0.4));
  box-shadow: 0 10px 40px -10px rgba(37, 99, 235, 0.3);
  transform: translateY(-5px);
}

.glass-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--border-radius-md);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
header {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  transition: background-color var(--transition-normal), backdrop-filter var(--transition-normal);
}

header.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 5%;
  height: 100%;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

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

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition-normal);
  position: relative;
  padding: 8px 0;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--accent-gradient);
  transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.theme-toggle:hover {
  background-color: var(--accent-primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(59, 130, 246, 0.3);
}

.theme-toggle .moon-icon {
  display: none;
}

[data-theme='light'] .theme-toggle .moon-icon {
  display: block;
}

[data-theme='light'] .theme-toggle .sun-icon {
  display: none;
}

[data-theme='dark'] .theme-toggle .moon-icon {
  display: none;
}

[data-theme='dark'] .theme-toggle .sun-icon {
  display: block;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) .theme-toggle .moon-icon {
    display: block;
  }

  :root:not([data-theme='dark']) .theme-toggle .sun-icon {
    display: none;
  }
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  position: relative;
  transition: background 0.2s;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--text-primary);
  left: 0;
  transition: transform 0.2s;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  bottom: -8px;
}

/* ==========================================================================
   Floating Animation & Particle Effects
   ========================================================================== */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-20px) rotate(5deg); }
  50% { transform: translateY(-10px) rotate(0deg); }
  75% { transform: translateY(-15px) rotate(-5deg); }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: var(--neon-glow), var(--glass-shadow); }
  50% { box-shadow: 0 0 30px rgba(14, 165, 233, 0.6), 0 0 50px rgba(16, 185, 129, 0.3), var(--glass-shadow); }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes blob-bounce {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
  100% { transform: translate(0, 0) scale(1); }
}

.floating {
  animation: float 6s ease-in-out infinite;
}

.glowing {
  animation: glow-pulse 3s ease-in-out infinite;
}

/* Particle system */
.particle {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--nav-height) + 40px) 5% 40px;
  max-width: var(--container-width);
  margin: 0 auto;
  position: relative;
}

/* Base gradients and dynamic vibes */
.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
  opacity: 0.15;
  filter: blur(60px);
  z-index: -1;
  border-radius: 50%;
  animation: blob-bounce 15s infinite alternate ease-in-out;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
  opacity: 0.15;
  filter: blur(60px);
  z-index: -1;
  border-radius: 50%;
  animation: blob-bounce 12s infinite alternate-reverse ease-in-out;
}

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

.badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 4.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -1px;
}

.glitch-wrapper {
  display: inline-block;
  position: relative;
}

.glitch {
  position: relative;
  display: inline-block;
}

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

.glitch-wrapper:hover .glitch::before,
.glitch-wrapper:hover .glitch::after {
  opacity: 1;
}

.glitch::before {
  left: 3px;
  text-shadow: -2px 0 #ff00c1;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
  left: -3px;
  text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
  animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% {
    clip: rect(40px, 9999px, 86px, 0);
  }

  5% {
    clip: rect(3px, 9999px, 81px, 0);
  }

  10% {
    clip: rect(98px, 9999px, 98px, 0);
  }

  15% {
    clip: rect(74px, 9999px, 66px, 0);
  }

  20% {
    clip: rect(61px, 9999px, 1px, 0);
  }

  25% {
    clip: rect(51px, 9999px, 100px, 0);
  }

  30% {
    clip: rect(65px, 9999px, 3px, 0);
  }

  35% {
    clip: rect(78px, 9999px, 93px, 0);
  }

  40% {
    clip: rect(8px, 9999px, 44px, 0);
  }

  45% {
    clip: rect(80px, 9999px, 17px, 0);
  }

  50% {
    clip: rect(2px, 9999px, 7px, 0);
  }

  55% {
    clip: rect(82px, 9999px, 57px, 0);
  }

  60% {
    clip: rect(80px, 9999px, 90px, 0);
  }

  65% {
    clip: rect(2px, 9999px, 20px, 0);
  }

  70% {
    clip: rect(78px, 9999px, 13px, 0);
  }

  75% {
    clip: rect(84px, 9999px, 63px, 0);
  }

  80% {
    clip: rect(79px, 9999px, 7px, 0);
  }

  85% {
    clip: rect(91px, 9999px, 69px, 0);
  }

  90% {
    clip: rect(51px, 9999px, 7px, 0);
  }

  95% {
    clip: rect(11px, 9999px, 2px, 0);
  }

  100% {
    clip: rect(74px, 9999px, 57px, 0);
  }
}

@keyframes glitch-anim2 {
  0% {
    clip: rect(48px, 9999px, 43px, 0);
  }

  5% {
    clip: rect(83px, 9999px, 38px, 0);
  }

  10% {
    clip: rect(25px, 9999px, 58px, 0);
  }

  15% {
    clip: rect(98px, 9999px, 39px, 0);
  }

  20% {
    clip: rect(12px, 9999px, 11px, 0);
  }

  25% {
    clip: rect(18px, 9999px, 57px, 0);
  }

  30% {
    clip: rect(96px, 9999px, 90px, 0);
  }

  35% {
    clip: rect(91px, 9999px, 67px, 0);
  }

  40% {
    clip: rect(89px, 9999px, 49px, 0);
  }

  45% {
    clip: rect(27px, 9999px, 37px, 0);
  }

  50% {
    clip: rect(64px, 9999px, 68px, 0);
  }

  55% {
    clip: rect(72px, 9999px, 60px, 0);
  }

  60% {
    clip: rect(17px, 9999px, 31px, 0);
  }

  65% {
    clip: rect(82px, 9999px, 4px, 0);
  }

  70% {
    clip: rect(32px, 9999px, 27px, 0);
  }

  75% {
    clip: rect(48px, 9999px, 60px, 0);
  }

  80% {
    clip: rect(26px, 9999px, 34px, 0);
  }

  85% {
    clip: rect(69px, 9999px, 44px, 0);
  }

  90% {
    clip: rect(10px, 9999px, 44px, 0);
  }

  95% {
    clip: rect(38px, 9999px, 38px, 0);
  }

  100% {
    clip: rect(20px, 9999px, 27px, 0);
  }
}

.highlight-text {
  background: var(--accent-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 90%;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.cta-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: var(--border-radius-lg); /* Pill shape for premium feel */
  font-weight: 700;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
  z-index: 1;
}

.cta-btn.primary {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  box-shadow: 0 10px 20px -10px var(--accent-primary);
}

.cta-btn.primary::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent-tertiary), var(--accent-primary));
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.cta-btn.primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 30px -10px var(--accent-primary), 0 0 20px rgba(236, 72, 153, 0.4);
}

.cta-btn.primary:hover::before {
  opacity: 1;
}

.cta-btn.secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--bg-tertiary);
  backdrop-filter: blur(10px);
}

.cta-btn.secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -10px var(--accent-primary);
}

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

.profile-card {
  width: 320px;
  height: 400px;
  border-radius: var(--border-radius-lg);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-muted);
  border: 3px solid transparent;
  background-image: linear-gradient(var(--bg-primary), var(--bg-primary)), var(--accent-gradient);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.3), 0 0 40px rgba(16, 185, 129, 0.15);
  overflow: hidden;
}

.floating-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  animation: float 6s ease-in-out infinite;
}

.badge-1 {
  top: 40px;
  left: -30px;
  color: #10b981;
}

.badge-2 {
  bottom: 60px;
  right: -40px;
  color: #f59e0b;
  animation-delay: -3s;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-15px);
  }

  100% {
    transform: translateY(0px);
  }
}

/* ==========================================================================
   Terminal Section
   ========================================================================== */
.terminal {
  padding: 60px 5%;
  max-width: 800px;
  margin: 0 auto;
}

.terminal-container {
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-header {
  background: var(--bg-tertiary);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-buttons {
  display: flex;
  gap: 8px;
  margin-right: 20px;
}

.terminal-buttons span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.close {
  background-color: #ff5f56;
}

.minimize {
  background-color: #ffbd2e;
}

.maximize {
  background-color: #27c93f;
}

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex: 1;
  text-align: center;
  margin-right: 56px;
  /* Offset for buttons to keep text centered */
}

.terminal-body {
  background: rgba(5, 5, 5, 0.85);
  /* Darker background for the terminal body */
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-primary);
  height: 350px;
  overflow-y: auto;
  line-height: 1.5;
}

.terminal-prompt {
  color: var(--accent-secondary);
  /* Green color */
  margin-bottom: 8px;
}

.terminal-response {
  color: var(--text-secondary);
  margin-bottom: 16px;
  white-space: pre-wrap;
  /* Preserve formatting for command outputs */
}

.terminal-input-line {
  display: flex;
  align-items: center;
}

.terminal-prefix {
  color: var(--accent-primary);
  /* Blue/Cyan color */
  margin-right: 10px;
}

.terminal-input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  flex: 1;
  outline: none;
}

/* Custom scrollbar for terminal */
.terminal-body::-webkit-scrollbar {
  width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
  background: transparent;
}

.terminal-body::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

.typing-cursor {
  display: inline-block;
  vertical-align: bottom;
  width: 8px;
  height: 16px;
  background-color: var(--accent-secondary);
  animation: blink 1s step-end infinite;
  margin-left: 4px;
}

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

/* ==========================================================================
   About Section
   ========================================================================== */
.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

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

.about-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.about-stats {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 20px;
}

.stat-icon {
  font-size: 2.5rem;
  background: rgba(37, 99, 235, 0.1);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
}

.stat-info h3 {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.stat-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   Skills Section (Radar Chart)
   ========================================================================== */
.skills-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 50px;
  max-width: 1000px;
  margin: 0 auto;
}

.radar-chart-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

.skills-legend {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.legend-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border-radius: var(--border-radius-md);
  background: rgba(var(--accent-primary-rgb, 37, 99, 235), 0.03);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-normal);
  cursor: default;
}

.legend-item:hover {
  background: rgba(var(--accent-primary-rgb, 37, 99, 235), 0.08);
  border-color: var(--accent-primary);
  transform: translateX(10px) scale(1.02);
  box-shadow: var(--glass-shadow);
}

.legend-item .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.legend-item .dot.programming { background: var(--accent-primary); box-shadow: 0 0 15px var(--accent-primary); }
.legend-item .dot.security { background: var(--accent-secondary); box-shadow: 0 0 15px var(--accent-secondary); }
.legend-item .dot.fullstack { background: var(--accent-tertiary); box-shadow: 0 0 15px var(--accent-tertiary); }

.legend-text h4 {
  font-size: 1.2rem;
  margin-bottom: 6px;
  color: var(--text-primary);
  font-family: var(--font-heading);
}

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

@media (max-width: 992px) {
  .skills-container {
    grid-template-columns: 1fr;
    padding: 30px;
    gap: 40px;
  }
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.project-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 8px 20px;
  background: transparent;
  border: 1px solid var(--bg-tertiary);
  border-radius: 30px;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  background: rgba(37, 99, 235, 0.05);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.filter-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

/* Hide matching projects securely */
.project-card.hidden {
  display: none !important;
}

.project-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  border: 1px solid transparent;
}

.project-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary), var(--accent-primary));
  background-size: 200% 200%;
  border-radius: var(--border-radius-md);
  opacity: 0;
  z-index: -1;
  transition: opacity var(--transition-normal);
}

.project-card:hover::before {
  opacity: 0.3;
  animation: rotate-gradient 3s ease infinite;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.project-card:hover .project-icon {
  color: var(--accent-primary);
  transform: scale(1.15) rotate(10deg);
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
}

.project-content {
  padding: 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-icon {
  width: 50px;
  height: 50px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.project-icon {
  width: 50px;
  height: 50px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.project-card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 24px;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.project-tags span {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  padding: 4px 10px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
  border-radius: 4px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--transition-fast);
  margin-top: auto;
}

.project-link:hover {
  color: var(--accent-primary);
}

/* ==========================================================================
   Certifications / Timeline Section
   ========================================================================== */
.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 19px;
  height: 100%;
  width: 2px;
  background: var(--bg-tertiary);
}

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

.timeline-dot {
  position: absolute;
  left: 12px;
  top: 24px;
  width: 16px;
  height: 16px;
  background: var(--bg-primary);
  border: 4px solid var(--accent-primary);
  border-radius: 50%;
  z-index: 1;
}

.timeline-content {
  padding: 24px;
}

.timeline-content h3 {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

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

/* ==========================================================================
   Blog Section
   ========================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.blog-card {
  padding: 30px;
  transition: transform var(--transition-fast);
}

.blog-card:hover {
  transform: translateY(-5px);
}

.blog-category {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: block;
}

.blog-card h3 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

.blog-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.read-more span {
  transition: transform var(--transition-fast);
}

.read-more:hover {
  color: var(--accent-primary);
}

.read-more:hover span {
  transform: translateX(4px);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-info {
  padding: 40px;
}

.contact-info h3 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.contact-info p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 1.1rem;
}

.info-item svg {
  color: var(--accent-primary);
}

.social-links-contact {
  display: flex;
  gap: 16px;
}

.social-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.social-icon:hover {
  background: var(--accent-primary);
  color: #fff;
  transform: translateY(-4px);
}

.contact-form {
  padding: 40px;
}

.form-group {
  margin-bottom: 28px;
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 18px;
  background: var(--bg-secondary); /* Darker glass feel */
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
  transition: opacity 0.3s ease;
}

.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder {
  opacity: 0.5;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  background: var(--bg-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), inset 0 2px 4px rgba(0,0,0,0.05);
  transform: translateY(-2px);
}

.submit-btn {
  width: 100%;
  padding: 16px;
  background: var(--accent-gradient);
  color: white;
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--transition-fast);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* ==========================================================================
   Footer & Scroll Top
   ========================================================================== */
footer {
  padding: 40px 5%;
  text-align: center;
  background: var(--bg-secondary);
  border-top: 1px solid var(--bg-tertiary);
}

footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 99;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--accent-gradient);
  color: white;
  transform: translateY(-4px);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media screen and (max-width: 1024px) {
  .hero-title {
    font-size: 3.5rem;
  }

  .about-container {
    gap: 40px;
  }

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

  .contact-container {
    gap: 40px;
  }
}

@media screen and (max-width: 768px) {
  :root {
    --nav-height: 70px;
  }

  .section {
    padding: 80px 5%;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 20px 5%;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    border-bottom: 1px solid var(--glass-border);
  }

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

  .nav-links li {
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: 16px 0;
    border-bottom: 1px solid var(--bg-tertiary);
  }

  .nav-toggle {
    display: block;
  }

  .nav-toggle.open .hamburger {
    background: transparent;
  }

  .nav-toggle.open .hamburger::before {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle.open .hamburger::after {
    transform: translateY(-8px) rotate(-45deg);
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: calc(var(--nav-height) + 60px);
    gap: 60px;
  }

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

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

  .about-container {
    grid-template-columns: 1fr;
  }

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

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

  .timeline::before {
    left: 19px;
  }

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

@media screen and (max-width: 480px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.4rem;
  }

  .cta-buttons {
    flex-direction: column;
    width: 100%;
  }

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

  .section-header h2 {
    font-size: 2rem;
  }

  .profile-card {
    width: 100%;
    max-width: 320px;
  }
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--accent-primary);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: var(--border-radius-md);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(14, 165, 233, 0.4);
  z-index: 9999;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
  pointer-events: none;
}

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

.toast::before {
  content: '>';
  color: var(--accent-primary);
  margin-right: 8px;
  font-weight: bold;
}

/* ==========================================================================
   Ultimate Premium Typography Upgrades
   ========================================================================== */
.section-header h2 {
  font-size: 3.5rem;
  font-weight: 800;
  color: transparent;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 5px;
}

.bio, .contact-text {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
  margin-bottom: 24px;
}

/* ==========================================================================
   Hero Visual / Profile Card Fix
   ========================================================================== */
.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  max-width: 450px;
}

.profile-card {
  position: relative;
  padding: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%; /* Make the glass card round behind the image */
  aspect-ratio: 1/1;
  width: 100%;
  max-width: 380px;
  overflow: visible !important; /* Prevents floating badges from being clipped */
}

.profile-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 6px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
}

.profile-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--bg-primary); /* Negative space gap */
  background-color: var(--bg-primary);
}

.floating-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  z-index: 2;
  white-space: nowrap;
}

.floating-badge svg {
  color: var(--accent-primary);
}

.badge-1 {
  top: 15%;
  left: -5%;
  animation: float 5s ease-in-out infinite;
}

.badge-2 {
  bottom: 20%;
  right: -5%;
  animation: float 6s ease-in-out infinite 1s;
}

/* ==========================================================================
   Preloader (System Boot Sequence)
   ========================================================================== */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #020617; /* Slate 950 */
  z-index: 999999;
  display: flex;
  align-items: flex-end; /* Terminal boots from bottom */
  padding: 40px;
  font-family: var(--font-mono);
  color: #10b981; /* Hacker Green */
  font-size: 1.1rem;
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.preloader.fade-out {
  opacity: 0;
  transform: translateY(-50px) scale(1.05); /* Zoom out effect */
  pointer-events: none;
}

.preloader-content {
  width: 100%;
  max-width: 800px;
  display: flex;
}

.boot-text {
  white-space: pre-wrap;
  line-height: 1.6;
}

.boot-cursor {
  display: inline-block;
  width: 12px;
  height: 20px;
  background-color: #10b981;
  animation: blink 1s step-end infinite;
  margin-left: 5px;
}

/* ==========================================================================
   GitHub Stats Containers
   ========================================================================== */
.github-stats {
  display: inline-flex;
  gap: 15px;
  margin-top: 10px;
  padding-top: 15px;
  border-top: 1px solid var(--glass-border);
  width: 100%;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.stat-item svg {
  color: var(--accent-primary);
}

/* ==========================================================================
   Reading Scroll Progress
   ========================================================================== */
.scroll-progress-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: transparent;
  z-index: 9999999;
  pointer-events: none;
}

.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
  transition: width 0.1s ease-out;
}