/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */

:root {
  /* Font Families */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Theme variables - DARK (Default) */
  --bg-primary: hsl(230, 25%, 6%);
  --bg-secondary: hsl(230, 25%, 9%);
  --surface: rgba(18, 20, 29, 0.6);
  --surface-hover: rgba(26, 29, 41, 0.85);
  --border: rgba(255, 255, 255, 0.06);
  --border-focus: rgba(37, 99, 235, 0.5);

  --text-primary: hsl(210, 40%, 98%);
  --text-secondary: hsl(215, 20%, 75%);
  --text-muted: hsl(215, 15%, 55%);

  --primary: hsl(221, 95%, 56%);
  /* Electric Blue */
  --primary-light: hsl(213, 94%, 68%);
  --primary-gradient: linear-gradient(135deg, hsl(221, 95%, 56%), hsl(263, 90%, 55%));
  --accent: hsl(263, 90%, 55%);
  /* Indigo/Purple */

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.4);

  --backdrop-blur: 16px;

  /* Blob colors */
  --blob-1: rgba(37, 99, 235, 0.15);
  --blob-2: rgba(139, 92, 246, 0.12);
  --blob-3: rgba(6, 182, 212, 0.1);

  /* Status colors */
  --color-success: hsl(142, 72%, 40%);
  --color-progress: hsl(38, 92%, 50%);
}

/* Light Theme overrides */
html.light {
  --bg-primary: hsl(210, 40%, 98%);
  --bg-secondary: hsl(210, 40%, 95%);
  --surface: rgba(255, 255, 255, 0.65);
  --surface-hover: rgba(255, 255, 255, 0.85);
  --border: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(37, 99, 235, 0.4);

  --text-primary: hsl(222, 47%, 11%);
  --text-secondary: hsl(217, 19%, 27%);
  --text-muted: hsl(215, 16%, 47%);

  --primary: hsl(221, 83%, 53%);
  --primary-light: hsl(221, 83%, 63%);
  --primary-gradient: linear-gradient(135deg, hsl(221, 83%, 53%), hsl(258, 83%, 60%));
  --accent: hsl(258, 83%, 60%);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);

  --blob-1: rgba(37, 99, 235, 0.06);
  --blob-2: rgba(139, 92, 246, 0.05);
  --blob-3: rgba(6, 182, 212, 0.04);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

button,
input,
textarea {
  font-family: inherit;
  outline: none;
  border: none;
}

ul {
  list-style: none;
}

/* ==========================================================================
   BACKGROUND BLOBS (Dynamic Design)
   ========================================================================== */

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
  width: 500px;
  height: 500px;
  top: -100px;
  right: -50px;
  background-color: var(--blob-1);
}

.blob-2 {
  width: 600px;
  height: 600px;
  top: 40%;
  left: -200px;
  background-color: var(--blob-2);
  animation-delay: -5s;
}

.blob-3 {
  width: 400px;
  height: 400px;
  bottom: 50px;
  right: -50px;
  background-color: var(--blob-3);
  animation-delay: -10s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(50px, 40px) scale(1.1);
  }

  100% {
    transform: translate(-30px, -20px) scale(0.95);
  }
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: all 0.4s ease;
}

.navbar.scrolled {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: var(--backdrop-blur);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.5px;
}

.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-gradient);
}

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

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

.nav-link {
  font-weight: 550;
  font-size: 0.95rem;
  color: var(--text-secondary);
  position: relative;
  padding: 0.25rem 0;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: width 0.3s ease;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Button Component */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  backdrop-filter: var(--backdrop-blur);
}

.btn-secondary:hover {
  background-color: var(--surface-hover);
  border-color: var(--text-muted);
}

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

.btn-outline:hover {
  background-color: var(--surface);
  border-color: var(--primary);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

/* Theme Toggle Button */
.theme-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.theme-btn:hover {
  background-color: var(--surface-hover);
  border-color: var(--primary-light);
  transform: scale(1.05);
}

.sun-icon {
  display: none;
  width: 20px;
  height: 20px;
}

.moon-icon {
  display: block;
  width: 20px;
  height: 20px;
}

html.light .sun-icon {
  display: block;
}

html.light .moon-icon {
  display: none;
}

/* Hamburger Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  width: 100%;
  height: 2.5px;
  background-color: var(--text-primary);
  border-radius: 5px;
  transition: all 0.3s ease;
}

/* Mobile Nav Drawer */
.mobile-nav {
  position: fixed;
  top: 75px;
  left: 0;
  width: 100%;
  height: 0;
  overflow: hidden;
  background-color: var(--bg-primary);
  border-bottom: 0 solid var(--border);
  z-index: 999;
  transition: all 0.4s ease;
}

.mobile-nav.open {
  height: calc(100vh - 75px);
  border-bottom: 1px solid var(--border);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  gap: 1.5rem;
}

.mobile-nav-link {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.mobile-nav-link:hover {
  color: var(--primary);
  padding-left: 5px;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem 2rem;
  text-align: center;
}

.hero-container {
  max-width: 850px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
  box-shadow: var(--shadow-sm);
  backdrop-filter: var(--backdrop-blur);
}

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

.hero-title {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -2px;
  color: var(--text-primary);
}

.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  line-height: 1.6;
  font-weight: 400;
}

.hero-ctas {
  display: flex;
  gap: 1.25rem;
  margin-top: 1rem;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.mouse-icon {
  width: 26px;
  height: 42px;
  border: 2px solid var(--text-muted);
  border-radius: 20px;
  position: relative;
}

.wheel {
  width: 4px;
  height: 8px;
  background-color: var(--primary-light);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 1.5s infinite;
}

@keyframes scrollWheel {
  0% {
    top: 8px;
    opacity: 1;
  }

  50% {
    top: 18px;
    opacity: 0.3;
  }

  100% {
    top: 8px;
    opacity: 1;
  }
}

/* ==========================================================================
   SECTIONS GENERAL STYLE
   ========================================================================== */

.section {
  padding: 7rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4.5rem auto;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   PROJECTS SECTION & BENTO GRID
   ========================================================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

/* Project Card */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  backdrop-filter: var(--backdrop-blur);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
}

/* Interactive Glowing Spotlight border */
.project-card.glow-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  background: radial-gradient(400px circle at var(--mouse-x, 0) var(--mouse-y, 0),
      rgba(37, 99, 235, 0.25),
      transparent 40%);
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card.glow-card:hover::before {
  opacity: 1;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: var(--shadow-lg);
}

.project-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background-color: var(--bg-secondary);
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s ease;
}

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

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 16, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.project-link-icon {
  background-color: var(--primary);
  color: white;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.project-link-icon svg {
  width: 22px;
  height: 22px;
}

.project-coming-soon-badge {
  background: rgba(26, 29, 41, 0.8);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.project-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary-light);
  letter-spacing: 0.5px;
}

.project-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.05);
}

.project-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

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

.project-status.live::before {
  background-color: var(--color-success);
}

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

.project-status.progress::before {
  background-color: var(--color-progress);
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.project-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 8px;
  font-weight: 550;
}

.project-btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary-light);
  align-self: flex-start;
  margin-top: auto;
}

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

.arrow-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.project-btn-link:hover .arrow-icon {
  transform: translateX(4px);
}

.project-btn-link.disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

.lock-icon {
  width: 14px;
  height: 14px;
}

/* Bento Grid Placeholder Card */
.project-card.project-placeholder {
  grid-column: span 1;
  background: repeating-linear-gradient(135deg,
      rgba(255, 255, 255, 0.01),
      rgba(255, 255, 255, 0.01) 10px,
      rgba(255, 255, 255, 0.02) 10px,
      rgba(255, 255, 255, 0.02) 20px);
  border: 2px dashed var(--border);
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 3rem 2rem;
  min-height: 400px;
}

.project-card.project-placeholder:hover {
  border-color: var(--primary);
  background-color: var(--surface);
  transform: scale(1.01);
}

.placeholder-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.placeholder-icon {
  width: 24px;
  height: 24px;
}

.placeholder-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.placeholder-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 320px;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   SKILLS SECTION
   ========================================================================== */

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

.skill-category-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.skill-category-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-md);
}

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.category-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-icon-wrapper svg {
  width: 24px;
  height: 24px;
}

.category-icon-wrapper.blue {
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.category-icon-wrapper.purple {
  background-color: rgba(139, 92, 246, 0.1);
  color: var(--accent);
}

.category-icon-wrapper.green {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}

.category-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

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

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.skill-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  position: relative;
  padding-left: 1.25rem;
}

.skill-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary-light);
}

/* ==========================================================================
   ABOUT ME SECTION
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.about-tag {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.about-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.about-paragraph {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* About Visual card (Glassmorphic details card) */
.about-visual-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-md);
  backdrop-filter: var(--backdrop-blur);
}

.avatar-box {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.avatar-glow {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: var(--primary-gradient);
  filter: blur(8px);
  opacity: 0.6;
  animation: rotateGlow 8s linear infinite;
}

@keyframes rotateGlow {
  100% {
    transform: rotate(360deg);
  }
}

.avatar-inner {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: var(--bg-secondary);
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-initials {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.visual-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.visual-title {
  font-size: 0.9rem;
  color: var(--primary-light);
  font-weight: 600;
  margin-bottom: 1rem;
}

.visual-tags {
  display: flex;
  gap: 0.5rem;
}

.visual-tags span {
  font-size: 0.75rem;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

/* ==========================================================================
   CONTACT SECTION & FORM
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 3.5rem;
}

.contact-info-panel {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.info-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.info-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.contact-details-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.detail-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.detail-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.detail-icon svg {
  width: 20px;
  height: 20px;
}

.detail-content {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.detail-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

.detail-value:hover {
  color: var(--primary-light);
}

/* Contact Form Panel */
.contact-form-panel {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: var(--backdrop-blur);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--border-focus);
}

.btn-submit {
  align-self: flex-start;
  margin-top: 1rem;
  gap: 0.5rem;
}

.send-icon {
  width: 16px;
  height: 16px;
}

.form-success-msg {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--color-success);
  color: var(--color-success);
  padding: 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 1rem;
}

.form-success-msg svg {
  width: 18px;
  height: 18px;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  border-top: 1px solid var(--border);
  background-color: var(--bg-secondary);
  padding: 2.5rem 2rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 550;
}

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

/* ==========================================================================
   MEDIA QUERIES (Responsive Design)
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-title {
    font-size: 3.25rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-visual-card {
    max-width: 450px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .btn-nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-title {
    font-size: 2.5rem;
    letter-spacing: -1px;
  }

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

  .section-title {
    font-size: 2.25rem;
  }

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

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

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-container {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
}

/* ==========================================================================
   HERO DISCLAIMER
   ========================================================================== */

.hero-disclaimer {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.25rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(37, 99, 235, 0.1));
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  backdrop-filter: var(--backdrop-blur);
}

.disclaimer-icon {
  font-size: 1.1rem;
}

/* ==========================================================================
   CV / MA VIE SECTION
   ========================================================================== */

.cv-section {
  padding: 7rem 2rem;
}

.cv-section-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(37, 99, 235, 0.1));
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* Identity Card */
.cv-identity-card {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2.5rem;
  margin-bottom: 4rem;
  backdrop-filter: var(--backdrop-blur);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cv-identity-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.cv-avatar {
  position: relative;
  flex-shrink: 0;
}

.cv-avatar-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: var(--primary-gradient);
  opacity: 0.3;
  filter: blur(16px);
  animation: pulseGlow 3s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes pulseGlow {
  from { opacity: 0.2; transform: scale(0.95); }
  to   { opacity: 0.5; transform: scale(1.05); }
}

.cv-avatar-inner {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: white;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.4);
}

.cv-identity-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cv-name {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-primary);
}

.cv-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.cv-identity-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.cv-chip {
  padding: 0.4rem 0.9rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.cv-chip-blue {
  background: rgba(37, 99, 235, 0.12);
  color: hsl(213, 94%, 72%);
  border-color: rgba(37, 99, 235, 0.25);
}

.cv-chip-purple {
  background: rgba(139, 92, 246, 0.12);
  color: hsl(263, 90%, 75%);
  border-color: rgba(139, 92, 246, 0.25);
}

.cv-chip-orange {
  background: rgba(245, 158, 11, 0.12);
  color: hsl(38, 92%, 65%);
  border-color: rgba(245, 158, 11, 0.25);
}

.cv-honest-note {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.honest-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.cv-honest-note strong {
  color: var(--text-primary);
}

/* Story divider */
.cv-story-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  margin: 1.1rem 0;
}

/* ==========================================================================
   EASTER EGG — SYSTÈME 2 ÉTAPES
   ========================================================================== */

@keyframes avatarShake {
  0%,100% { transform: translateX(0) rotate(0deg); }
  20%     { transform: translateX(-6px) rotate(-4deg); }
  40%     { transform: translateX(6px) rotate(4deg); }
  60%     { transform: translateX(-4px) rotate(-2deg); }
  80%     { transform: translateX(4px) rotate(2deg); }
}
.avatar-shake .cv-avatar-inner {
  animation: avatarShake 0.4s ease;
}

.egg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.egg-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.egg-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  transform: scale(0.9);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.egg-overlay.open .egg-box {
  transform: scale(1);
}

.egg-lock-anim {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  animation: lockBounce 0.6s ease;
}
@keyframes lockBounce {
  0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
  60%  { transform: scale(1.2) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.egg-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  line-height: 1.25;
}
.egg-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.egg-btns {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.egg-btn {
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  font-family: var(--font-body);
}
.egg-btn-yes {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(37,99,235,0.35);
}
.egg-btn-yes:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(37,99,235,0.5); }
.egg-btn-no {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.egg-btn-no:hover { background: var(--surface); color: var(--text-primary); }

.egg-sequence {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin: 1.25rem 0 1rem;
  flex-wrap: wrap;
}
.egg-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  box-shadow: 0 4px 0 rgba(0,0,0,0.3);
}

.egg-progress {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.egg-progress span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s ease, transform 0.2s ease;
}
.egg-progress span.done {
  background: var(--primary);
  transform: scale(1.25);
  box-shadow: 0 0 8px rgba(37,99,235,0.5);
}

.egg-hint {
  font-size: 0.88rem;
  color: var(--text-muted);
  min-height: 1.3rem;
  transition: color 0.2s;
}

.egg-story-box {
  max-width: 580px;
  text-align: left;
}
.egg-story-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.egg-story-icon { font-size: 2.2rem; flex-shrink: 0; }
.egg-story-header h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}
.egg-story-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0;
}
.egg-story-header .secret-close-btn { margin-left: auto; }

.egg-story-content {
  max-height: 52vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-right: 0.5rem;
  margin-bottom: 1.5rem;
}
.egg-story-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.egg-story-content p strong { color: var(--text-primary); }

.egg-story-footer {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.secret-close-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.secret-close-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

/* ---- Timeline ---- */
.cv-timeline-wrapper {
  margin-bottom: 4rem;
}

.cv-timeline-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 2.5rem;
  position: relative;
  padding-left: 1.25rem;
}

.cv-timeline-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 2px;
  background: var(--primary-gradient);
}

.cv-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 2rem;
}

.cv-timeline::before {
  content: '';
  position: absolute;
  left: 0.45rem;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 2px;
  background: linear-gradient(to bottom, 
    hsl(221, 95%, 56%),
    hsl(38, 92%, 50%),
    hsl(263, 90%, 55%),
    hsl(142, 72%, 40%),
    hsl(263, 90%, 55%)
  );
  border-radius: 2px;
  opacity: 0.35;
}

.cv-timeline-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1.5rem;
  align-items: start;
  padding-bottom: 2.5rem;
  position: relative;
}

.cv-timeline-dot {
  position: absolute;
  left: -1.575rem;
  top: 0.4rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
  z-index: 1;
}

.cv-dot-blue   { background-color: hsl(221, 95%, 56%); box-shadow: 0 0 12px hsl(221, 95%, 56%, 0.5); }
.cv-dot-yellow { background-color: hsl(38, 92%, 50%);  box-shadow: 0 0 12px hsla(38, 92%, 50%, 0.5); }
.cv-dot-orange { background-color: hsl(22, 90%, 52%);  box-shadow: 0 0 12px hsla(22, 90%, 52%, 0.5); }
.cv-dot-green  { background-color: hsl(142, 72%, 40%); box-shadow: 0 0 12px hsla(142, 72%, 40%, 0.5); }
.cv-dot-purple { background-color: hsl(263, 90%, 55%); box-shadow: 0 0 12px hsla(263, 90%, 55%, 0.5); }

.cv-dot-pulse {
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 10px hsla(142, 72%, 40%, 0.5); transform: scale(1); }
  50% { box-shadow: 0 0 20px hsla(142, 72%, 40%, 0.8); transform: scale(1.25); }
}

.cv-timeline-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: right;
  padding-top: 0.85rem;
  white-space: nowrap;
  line-height: 1.4;
}

.cv-timeline-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  backdrop-filter: var(--backdrop-blur);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.cv-timeline-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: var(--shadow-md);
}

.cv-card-highlighted {
  border-color: rgba(34, 197, 94, 0.3) !important;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.06), var(--surface)) !important;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.1) !important;
}

.cv-card-highlighted:hover {
  border-color: rgba(34, 197, 94, 0.5) !important;
  box-shadow: 0 8px 30px rgba(34, 197, 94, 0.15) !important;
}

.cv-card-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: var(--bg-secondary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.cv-card-content {
  flex: 1;
}

.cv-card-content h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.3px;
}

.cv-card-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.cv-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cv-card-tags span {
  padding: 0.25rem 0.7rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.cv-tags-green span {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.25);
  color: hsl(142, 72%, 55%);
}

/* ---- Philosophy ---- */
.cv-philosophy {
  margin-top: 1rem;
}

.cv-philosophy-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 2rem;
  text-align: center;
}

.cv-philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.cv-philo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  text-align: center;
  backdrop-filter: var(--backdrop-blur);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.cv-philo-card:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 12px 30px rgba(139, 92, 246, 0.12);
}

.cv-philo-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.cv-philo-card h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.cv-philo-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ---- Responsive CV ---- */
@media (max-width: 900px) {
  .cv-identity-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .cv-identity-chips {
    justify-content: center;
  }

  .cv-philosophy-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .cv-timeline-item {
    grid-template-columns: 80px 1fr;
    gap: 1rem;
  }

  .cv-timeline-date {
    font-size: 0.72rem;
    padding-top: 0.9rem;
  }
}

@media (max-width: 600px) {
  .cv-timeline {
    padding-left: 1.5rem;
  }

  .cv-timeline-item {
    grid-template-columns: 1fr;
    padding-left: 0.5rem;
  }

  .cv-timeline-date {
    text-align: left;
    font-size: 0.8rem;
    padding-top: 0;
    color: var(--primary-light);
  }

  .cv-timeline-card {
    flex-direction: column;
  }

  .cv-card-icon {
    width: 42px;
    height: 42px;
    font-size: 1.4rem;
  }
}

/* ==========================================================================
   TAB SECTION LAYOUT
   ========================================================================== */

.tab-section {
  display: none !important;
}

.tab-section.tab-active {
  display: block !important;
  animation: tabFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* ==========================================================================
   MOBILE SCROLL FIXES
   ========================================================================== */

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Stack about stats on mobile to prevent horizontal overflow */
@media (max-width: 600px) {
  .about-stats {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 1.5rem !important;
  }
  
  .nav-container {
    padding: 1.25rem 1.25rem !important;
  }
}

/* ==========================================================================
   PARTICLE NETWORK BACKGROUND
   ========================================================================== */

#grid-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  background-color: var(--bg-primary);
}

/* ==========================================================================
   DEVELOPER TERMINAL CONSOLE DRAWER
   ========================================================================== */

.terminal-panel {
  position: fixed;
  bottom: -400px; /* Hide by default */
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 900px;
  height: 320px;
  background: rgba(10, 12, 20, 0.95);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.5);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
  transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1), height 0.4s ease;
  font-family: 'Courier New', Courier, monospace;
}

.terminal-panel.open {
  bottom: 0;
}

.terminal-panel.maximized {
  height: 90vh;
  width: 100%;
  max-width: 100%;
}

.terminal-panel.minimized {
  height: 45px;
  overflow: hidden;
}

/* Header */
.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: rgba(5, 6, 10, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 15px 15px 0 0;
}

.terminal-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.terminal-controls {
  display: flex;
  gap: 0.5rem;
}

.terminal-control-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.terminal-control-btn.close { background: #ff5f56; }
.terminal-control-btn.min { background: #ffbd2e; }
.terminal-control-btn.max { background: #27c93f; }

/* Body */
.terminal-body {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #00ffcc; /* Glowing retro green/cyan */
}

.terminal-line {
  line-height: 1.4;
  white-space: pre-wrap;
}

.terminal-line.system {
  color: var(--text-muted);
}

.terminal-line.header {
  color: var(--primary-light);
  font-weight: 700;
  margin-top: 0.5rem;
}

.terminal-line.error {
  color: hsl(0, 80%, 65%);
}

.terminal-line.warning {
  color: hsl(38, 92%, 60%);
}

.terminal-line.success {
  color: var(--color-success);
}

.terminal-line .highlight {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

.terminal-input-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.terminal-prompt {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

#terminal-input {
  flex: 1;
  background: transparent;
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: inherit;
  outline: none;
  caret-color: #00ffcc;
}

/* ==========================================================================
   ENEDIS DISPATCHING GRID SIMULATOR
   ========================================================================== */

.simulator-container {
  max-width: 1000px;
  margin: 0 auto;
}

.simulator-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  backdrop-filter: var(--backdrop-blur);
  display: flex;
  flex-direction: column;
}

.sim-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  background: rgba(10, 12, 20, 0.6);
  border-bottom: 1px solid var(--border);
}

.sim-header-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sim-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--color-success);
  box-shadow: 0 0 10px var(--color-success);
  animation: pulseDot 2s infinite alternate;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.5; }
  100% { transform: scale(1.1); opacity: 1; }
}

.sim-header-title h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}

.sim-time {
  font-family: monospace;
  font-size: 1.1rem;
  color: var(--primary-light);
  font-weight: bold;
  letter-spacing: 1px;
}

.sim-badge {
  padding: 0.3rem 0.75rem;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: bold;
}

.sim-header-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Telemetry Section */
.sim-telemetry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
}

.telemetry-gauge {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.gauge-label {
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.gauge-value {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.gauge-unit {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.gauge-bar-container {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  margin-bottom: 0.75rem;
}

.gauge-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gauge-bar.prod { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.gauge-bar.cons { background: linear-gradient(90deg, var(--accent), hsl(280, 80%, 60%)); }
.gauge-bar.balance { 
  background: var(--primary-light);
  width: 0; 
  position: absolute;
}

.gauge-breakdown {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.gauge-status {
  font-size: 0.78rem;
  font-weight: bold;
  color: var(--primary-light);
  text-align: right;
}

/* Map Grid and Switch Controls split */
.sim-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  border-bottom: 1px solid var(--border);
}

.sim-visual-pane {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border);
}

.sim-svg-grid {
  width: 100%;
  height: auto;
  max-height: 330px;
}

/* SVG Line Animations for Electricity Flow */
.grid-wire {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 3;
  transition: stroke 0.4s ease, stroke-width 0.4s ease;
}

.grid-wire.active {
  stroke-width: 4;
  stroke-dasharray: 8 16;
  animation: electricityFlow 1.5s linear infinite;
}

.grid-wire.wire-wind.active { stroke: hsl(190, 100%, 55%); }
.grid-wire.wire-solar.active { stroke: hsl(40, 100%, 50%); }
.grid-wire.wire-grid.active { stroke: hsl(221, 95%, 60%); }
.grid-wire.wire-hospital.active { stroke: hsl(142, 70%, 50%); }
.grid-wire.wire-town.active { stroke: hsl(190, 100%, 55%); }
.grid-wire.wire-factory.active { stroke: hsl(263, 90%, 65%); }

.grid-wire.disabled {
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 2;
  stroke-dasharray: none;
  animation: none;
}

@keyframes electricityFlow {
  from { stroke-dashoffset: 24; }
  to { stroke-dashoffset: 0; }
}

/* SVG Node Styles */
.grid-node {
  transition: transform 0.3s ease;
}

.grid-node .node-bg {
  fill: rgba(18, 20, 29, 0.85);
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 2;
  transition: stroke 0.4s ease, fill 0.4s ease;
}

.grid-node.active .node-bg {
  stroke: var(--primary-light);
  fill: rgba(6, 182, 212, 0.08);
}

.grid-node.source.active.active .node-bg {
  stroke: hsl(190, 100%, 55%);
}

.grid-node.load.critical.active .node-bg {
  stroke: var(--color-success);
  fill: rgba(16, 185, 129, 0.06);
}

.grid-node.load.active:not(.critical) .node-bg {
  stroke: var(--primary-light);
}

.grid-node.load.active#node-factory .node-bg {
  stroke: var(--accent);
}

.grid-node.central-sub.active .sub-bg {
  stroke: var(--primary-light);
  fill: rgba(6, 182, 212, 0.1);
}

.grid-node .sub-bg {
  fill: rgba(18, 20, 29, 0.85);
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 2;
}

.node-icon {
  font-size: 1.25rem;
  text-anchor: middle;
  dominant-baseline: middle;
}

.node-label {
  font-size: 0.65rem;
  fill: var(--text-secondary);
  text-anchor: middle;
  font-family: var(--font-body);
}

.font-bold {
  font-weight: 700;
  fill: var(--text-primary);
}

/* Controls Panel Right Column */
.sim-controls-pane {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: rgba(255, 255, 255, 0.015);
}

.controls-group {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.controls-group h5 {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}

.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.switch-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 550;
}

/* Custom Electric Switch Styling */
.sim-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.sim-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.sim-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 30px;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sim-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  border-radius: 50%;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sim-switch input:checked + .sim-slider {
  background-color: rgba(6, 182, 212, 0.12);
  border-color: var(--primary-light);
}

.sim-switch input:checked + .sim-slider:before {
  transform: translateX(26px);
  background-color: var(--primary-light);
  box-shadow: 0 0 8px var(--primary-light);
}

.sim-switch input:disabled + .sim-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.sim-switch input:disabled + .sim-slider:before {
  background-color: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
}

/* Scenario Trigger Buttons */
.event-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.btn-event {
  padding: 0.65rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-family: var(--font-body);
}

.btn-event-storm {
  background: rgba(37, 99, 235, 0.1);
  color: hsl(213, 94%, 72%);
  border-color: rgba(37, 99, 235, 0.2);
}

.btn-event-storm:hover:not(:disabled) {
  background: rgba(37, 99, 235, 0.2);
  transform: translateY(-1px);
}

.btn-event-peak {
  background: rgba(245, 158, 11, 0.1);
  color: hsl(38, 92%, 65%);
  border-color: rgba(245, 158, 11, 0.2);
}

.btn-event-peak:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.2);
  transform: translateY(-1px);
}

.btn-event:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Dispatching Local logs */
.sim-logs {
  background: rgba(0, 0, 0, 0.3);
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--border);
}

.sim-logs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  margin-bottom: 0.75rem;
}

.sim-clear-logs {
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.72rem;
  border: none;
}

.sim-clear-logs:hover {
  color: var(--text-primary);
}

.sim-logs-body {
  height: 80px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.log-entry {
  color: var(--text-secondary);
  line-height: 1.3;
}

.log-entry.system { color: var(--text-muted); }
.log-entry.success { color: var(--color-success); }
.log-entry.warning { color: hsl(38, 92%, 60%); }
.log-entry.error { 
  color: hsl(0, 84%, 60%); 
  animation: flashLog 1s ease-in-out infinite alternate;
}

@keyframes flashLog {
  from { opacity: 0.8; }
  to { opacity: 1; text-shadow: 0 0 4px rgba(239,68,68,0.3); }
}

/* ==========================================================================
   TIMELINE & HOLOGRAPHIC CYBER OVERLAYS
   ========================================================================== */

/* Energized timeline nodes */
.cv-timeline-item.energized .cv-timeline-card {
  border-color: var(--primary-light);
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.1);
  transform: translateY(-2px);
}

.cv-timeline-item.energized .cv-timeline-dot {
  transform: scale(1.25);
  box-shadow: 0 0 16px var(--primary-light);
  border-color: #ffffff;
}

/* Glass cyber overlays styling */
.glass-cyber {
  background: rgba(8, 10, 18, 0.95) !important;
  border: 1px solid rgba(6, 182, 212, 0.3) !important;
  position: relative;
  overflow: hidden;
}

.glass-cyber::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg,
    rgba(6, 182, 212, 0.02) 0px,
    rgba(6, 182, 212, 0.02) 1px,
    transparent 1px,
    transparent 3px);
  pointer-events: none;
}

.cyber-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
  animation: scan 4s linear infinite;
  pointer-events: none;
}

@keyframes scan {
  0% { top: 0%; }
  100% { top: 100%; }
}

.glitch-text {
  position: relative;
}

/* Holographic keys caps style */
.egg-key {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 8px;
  box-shadow: 0 3px 0 rgba(0,0,0,0.5);
  transition: all 0.15s ease;
}

.cyber-btn {
  background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
  border: none;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.terminal-text {
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--primary-light);
  text-shadow: 0 0 3px rgba(6, 182, 212, 0.2);
}

/* Grid layout fixes for simulator split on tablet/mobile */
@media (max-width: 900px) {
  .sim-layout {
    grid-template-columns: 1fr !important;
  }
  
  .sim-visual-pane {
    border-right: none !important;
    border-bottom: 1px solid var(--border);
  }
  
  .sim-telemetry {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
}