/* 
/* 
========================================================================
   1. VARIABLES & THEME SETUP
======================================================================== 
*/
:root {
  /* Colors - Light Theme (Default) - overridden by JS if preference is dark */
  --bg-body: #ffffff;
  --bg-surface: #f8f9fa;
  --bg-glass: rgba(245, 245, 245, 0.85);

  --text-main: #111827;
  --text-muted: #374151;
  /* Was #6b7280 - Darkened for Light Mode Contrast */
  --text-light: #4b5563;
  /* Was #9ca3af - Darkened for Light Mode Contrast */

  --primary: #2563eb;
  /* Royal Blue */
  --primary-light: rgba(37, 99, 235, 0.5);
  /* Semi-transparent Primary for Glow */
  --primary-hover: #1d4ed8;
  --accent: #06b6d4;
  /* Cyan */
  --hero-subtitle-color: #0891b2;
  /* Darker cyan for hero subtitle (better contrast on light bg) */

  --border-light: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Spacing & Sizes */
  --header-height: 68px;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;

  --container-width: 1200px;
  --gap-section: 6rem;

  /* Transitions */
  --transition-fast: 200ms ease;
  --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Data Attribute */
/* Dark Theme Data Attribute OR System Preference */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* Updated to Deep Night Blue (AuthKit/Snoweb inspired) */
    --bg-body: #020617;
    --bg-surface: #0f172a;
    --bg-glass: rgba(2, 6, 23, 0.85);

    --text-main: #f3f4f6;
    --text-muted: #94a3b8;
    --text-light: #64748b;

    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --accent: #22d3ee;

    /* More subtle borders for dark mode */
    --border-light: rgba(255, 255, 255, 0.08);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  }
}

[data-theme="dark"] {
  /* Updated to Deep Night Blue (AuthKit/Snoweb inspired) */
  --bg-body: #020617;
  --bg-surface: #0f172a;
  --bg-glass: rgba(2, 6, 23, 0.85);

  --text-main: #f3f4f6;
  --text-muted: #94a3b8;
  --text-light: #64748b;

  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --accent: #22d3ee;
  --hero-subtitle-color: #22d3ee;
  /* Lighter cyan for hero subtitle in dark mode */

  /* More subtle borders */
  --border-light: rgba(255, 255, 255, 0.08);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

/* 
   DARK MODE BACKGROUND: Snoweb Style (100% Match)
   Clean Deep Navy + Soft Depth + No Grid + Bottom Wave
*/
/*
   DARK MODE BACKGROUND: Snoweb Reference (Final)
   Base: Deepest Navy. Wave: Smooth Dark Hill.
*/
/*
   DARK MODE BACKGROUND: Snoweb Reference (Final)
   Base: Deepest Navy. Wave: Smooth Dark Hill.
   + RIGHT SIDE ARC (Snoweb Layout)
*/
[data-theme="dark"] body {
  background-color: #020617;
  /* Slate 950 */

  background-image:
    /* 1. Large Dark Arc (Restricted Width) to avoid overlap with tags */
    radial-gradient(ellipse 60% 100% at 100% 50%, rgba(2, 6, 23, 0.8) 0%, transparent 70%),

    /* 2. Very subtle accent glow (top center) */
    radial-gradient(circle at 50% -20%, rgba(56, 189, 248, 0.1) 0%, transparent 60%);

  background-size: 100% 100%, 100% 100%;
  background-attachment: fixed;
}




/* Hide Heavy Legacy Background Animation in Dark Mode */
[data-theme="dark"] #bg-canvas {
  display: none !important;
}

/* =========================================
   1.1. THEME SWITCH (TOGGLE)
   ========================================= */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
}

.theme-switch {
  display: inline-block;
  height: 30px;
  position: relative;
  width: 56px;
}

.theme-switch input {
  display: none;
}

.slider {
  background-color: #ffc72b;
  /* Light Mode BG */
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: .4s;
  border-radius: 34px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
}

.slider:before {
  background-color: #fff;
  bottom: 3px;
  content: "";
  height: 24px;
  left: 3px;
  position: absolute;
  transition: .4s;
  width: 24px;
  border-radius: 50%;

  /* Sun Icon */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cline x1='12' y1='1' x2='12' y2='3'/%3E%3Cline x1='12' y1='21' x2='12' y2='23'/%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'/%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'/%3E%3Cline x1='1' y1='12' x2='3' y2='12'/%3E%3Cline x1='21' y1='12' x2='23' y2='12'/%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'/%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px;
}

/* Hover Effect Light */
.slider:hover {
  box-shadow: 0 0 10px rgba(255, 199, 43, 0.6);
}

/* Checked State (Dark Mode) */
input:checked+.slider {
  background-color: #2c0b47;
  /* Dark Purple */
}

input:checked+.slider:hover {
  box-shadow: 0 0 10px rgba(113, 62, 230, 0.6);
}

input:checked+.slider:before {
  transform: translateX(26px);
  /* Moon Icon */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232c0b47' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E");
  background-size: 16px;
}

/*
========================================================================
   2. RESET & BASE STYLES
========================================================================
*/
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Inter', 'Poppins', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
  overflow-x: hidden;
  /* Prevent horizontal scroll */
}

/*
   LIGHT MODE: TEXTURED CONCRETE / GRUNGE
   Industrial aesthetic with vertical scratches and subtle shimmer.
*/
[data-theme="light"] body {
  background-color: #e5e5e5;
  /* Concrete base */

  /*
     Layers:
     1. Digital Noise (Grain)
     2. Vertical Scratches (Repeated gradients)
     3. Subtle Radial Vignette
  */
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.07'/%3E%3C/svg%3E"),
    repeating-linear-gradient(90deg, transparent 0, transparent 4px, rgba(0, 0, 0, 0.03) 4px, rgba(0, 0, 0, 0.03) 5px),
    repeating-linear-gradient(90deg, transparent 0, transparent 15px, rgba(0, 0, 0, 0.02) 15px, rgba(0, 0, 0, 0.02) 16px),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.4) 0%, rgba(0, 0, 0, 0.1) 100%);

  background-attachment: fixed;
}

/* SHEEN ANIMATION (Reflet LumiÃ¨re) */
[data-theme="light"] body::before {
  content: '';
  position: fixed;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(115deg,
      transparent 0%,
      transparent 40%,
      rgba(255, 255, 255, 0.4) 45%,
      rgba(255, 255, 255, 0.6) 50%,
      rgba(255, 255, 255, 0.4) 55%,
      transparent 60%,
      transparent 100%);
  z-index: -1;
  pointer-events: none;
  animation: lightSheen 10s infinite linear;
  opacity: 0.3;
  filter: blur(5px);
}

@keyframes lightSheen {
  0% {
    transform: translateX(-30%) skewX(-15deg);
  }

  50% {
    transform: translateX(10%) skewX(-15deg);
    ;
  }

  100% {
    transform: translateX(-30%) skewX(-15deg);
    ;
  }

  /* Loop back smoothly or reset */
}

/* Ensure no other pseudo-elements conflict */
[data-theme="light"] body::after {
  content: none;
}

[data-theme="light"] .light-mode-orb {
  display: none;
}

/* Canvas Visibility Control */
#bg-canvas {
  transition: opacity 0.5s ease;
  opacity: 1;
}

[data-theme="light"] #bg-canvas {
  opacity: 0;
  /* Hide dark space in light mode */
  pointer-events: none;
}

/* Stronger Button Outline in Light Mode */
[data-theme="light"] .btn-outline {
  border-color: var(--primary);
  /* More visible border */
  color: var(--primary);
  /* More visible text */
  font-weight: 700;
}

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

ul {
  list-style: none;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

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

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

.section-padding {
  padding-top: var(--gap-section);
  padding-bottom: var(--gap-section);
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
  font-size: 1rem;
}

.btn:active {
  transform: scale(0.98);
}

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

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

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

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

/* Typography clamp */
h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 700;
  margin-bottom: 3rem;
  text-align: center;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/*
========================================================================
   3. HEADER & NAVIGATION
========================================================================
*/
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background-color: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: background-color var(--transition-smooth), border-color var(--transition-smooth);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo Styles */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
  transition: transform var(--transition-fast);
}

.brand:hover .brand-logo {
  transform: scale(1.05);
  /* Subtle hover effect */
}

@media (max-width: 768px) {
  .brand-logo {
    width: auto;
    height: 42px;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  cursor: pointer;
  color: var(--text-main);
  padding: 0.5rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast);
}

.theme-toggle:hover {
  background-color: var(--bg-surface);
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Mobile Menu Button */
.burger-menu {
  display: flex;
  background: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
  z-index: 1001;
}

.nav-links {
  display: none;
}

@media (min-width: 992px) {
  .burger-menu {
    display: none;
  }

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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text-main);
}

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

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

.burger-line {
  width: 24px;
  height: 2px;
  background-color: var(--text-main);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  background-color: var(--bg-body);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: right 0.4s ease;
  z-index: 999;
}

.mobile-nav-overlay.active {
  right: 0;
}

.mobile-nav-overlay .nav-link {
  font-size: 1.5rem;
  color: var(--text-main);
}

/*
========================================================================
   4. SECTIONS (HERO, ABOUT, SKILLS, ETC)
========================================================================
*/

/* --- HERO --- */
#top {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--header-height);
  position: relative;
  overflow: hidden;
  /* Prevent blob spill */
  position: relative;
}

/* SNOWEB STYLE WAVE (Dark Mode Only)
   Smooth "Hill" Silhouette at the bottom of the Hero.
*/
[data-theme="dark"] #top::after {
  display: none !important;
  /* Force kill the wave to ensure 100% clean background */
}

/* 
   PATCH OVERLAY for Credibility Tags (Safe Fix)
   Ensures the background behind tags is 100% Uniform Navy (#020617)
*/
[data-theme="dark"] .credibility-line {
  position: relative;
  z-index: 5;
}

[data-theme="dark"] .credibility-line::before {
  content: "";
  position: absolute;
  inset: -40px -40vw -40px -40px;
  /* Cover wide area */
  background: #020617;
  /* Exact base color */
  z-index: -1;
  box-shadow: 0 0 30px 30px #020617;
  /* Feathered blend */
  pointer-events: none;
}




/* New Hero Grid Container */
.hero-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  /* Ensure stacking context */
  z-index: 10;
  /* Ensure above background elements */
}


/* Default Mobile: Centered */
.hero-content-wrapper {
  text-align: center;
}

.hero-intro {
  display: block;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.875rem;
}



/* --- HERO V2 TYPOGRAPHY (Pro & Compact) --- */

/* 1. Eyebrow */
.hero-intro {
  /* Existing class, just ensuring it's not too big */
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

/* 2. Main Title (H1) - Compact & Responsive */
.hero-title-v2 {
  font-size: clamp(2.0rem, 3.2vw, 3.0rem);
  /* Max 3rem instead of 4rem+ */
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

/* 3. Accent Line - Pro Style */
.hero-accent-v2 {
  display: block;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 600;
  color: var(--hero-subtitle-color);
  /* Dedicated variable: darker in light, lighter in dark */
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
  opacity: 0.95;
}

/* 4. Description Paragraph - Controlled Width */
.hero-desc-v2 {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 2.25rem;
  max-width: 55ch;
  /* Optimal reading length */
  margin-left: auto;
  margin-right: auto;
}

/* Desktop Alignment Override */
@media (min-width: 992px) {
  .hero-desc-v2 {
    margin-left: 0;
    margin-right: 0;
    font-size: 1.1rem;
  }
}

.hero-title span {
  display: block;
  margin-top: 0.5rem;
}

.hero-desc {
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
  color: var(--text-muted);
}

@media (max-width: 991px) {
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
    max-width: 600px;
  }
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 991px) {
  .hero-btns {
    justify-content: center;
  }
}

.credibility-line {
  margin-top: 3rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

@media (max-width: 991px) {
  .credibility-line {
    justify-content: center;
  }
}

.credibility-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* --- DESKTOP OVERRIDES (Previously misplaced) --- */
@media (min-width: 992px) {
  .hero-container {
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
  }

  .hero-content-wrapper {
    text-align: left;
    order: 1;
  }

  .hero-visual {
    order: 2;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .hero-btns {
    justify-content: flex-start;
  }

  .credibility-line {
    justify-content: flex-start;
  }
}

/* --- HERO IMAGE & ANIMATION (BLOB) --- */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-img-blob {
  position: relative;
  width: 300px;
  height: 300px;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  overflow: hidden;
  animation: blob-bounce 6s ease-in-out infinite;
  box-shadow: var(--shadow-xl);
  border: 4px solid var(--border-light);
  background-color: var(--bg-surface);
  transition: border-color var(--transition-smooth);
}

.hero-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

@media (min-width: 768px) {
  .hero-img-blob {
    width: 380px;
    height: 380px;
  }
}

@keyframes blob-bounce {
  0% {
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    transform: translateY(0);
  }

  33% {
    border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
    transform: translateY(-10px);
  }

  66% {
    border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%;
    transform: translateY(5px);
  }

  100% {
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    transform: translateY(0);
  }
}

/* Hover Effect for Image */
.hero-img-blob:hover {
  border-color: var(--primary);
  animation-play-state: paused;
}

/* --- ABOUT --- */
.about-grid-single {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-text h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
}

.highlights-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.highlight-item {
  background-color: var(--bg-surface);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

/* --- SKILLS --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.skill-card {
  background-color: var(--bg-surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.skill-icon-img {
  width: 56px;
  height: 56px;
  display: block;
  object-fit: contain;
  margin-bottom: 1rem;
  opacity: 0.95;
}

@media (max-width: 768px) {
  .skill-icon-img {
    width: 48px;
    height: 48px;
  }
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  background-color: var(--bg-body);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

/* Enhanced Light Mode Tag Contrast */
[data-theme="light"] .tag {
  background-color: #f3f4f6;
  /* Light gray bg */
  color: #1f2937;
  /* Dark text */
  border-color: #d1d5db;
  /* Stronger border */
  font-weight: 500;
}

/* --- PROJECTS --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* Centrage dynamique pour 1 ou 2 projets visibles (via JS) */
@media (min-width: 992px) {
  .projects-grid.grid-center-1 {
    grid-template-columns: calc(33.333% - 1.34rem);
    justify-content: center;
  }
  .projects-grid.grid-center-2 {
    grid-template-columns: repeat(2, calc(33.333% - 1.34rem));
    justify-content: center;
  }
}

.project-card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.project-cover {
  width: 100%;
  overflow: hidden;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  border-bottom: 1px solid var(--border-light);
}

.project-cover-img {
  width: 100%;
  height: 180px;
  /* Slightly taller */
  display: block;
  object-fit: contain;
  padding: 2rem;
  /* More spacing to reduce upscaling blur and look pro */
  background-color: white;
  transition: transform var(--transition-fast);
}

.project-card:hover .project-cover-img {
  transform: scale(1.05);
  /* Subtle zoom on hover */
}

@media (max-width: 768px) {
  .project-cover-img {
    height: 150px;
  }
}

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

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
}

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

/* --- EXPERIENCE --- */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  border-left: 2px solid var(--border-light);
  padding-left: 2rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.6rem;
  top: 0.25rem;
  width: 1rem;
  height: 1rem;
  background-color: var(--primary);
  border: 4px solid var(--bg-body);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--border-light);
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.timeline-company {
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 1rem;
  display: block;
}

.timeline-details li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.timeline-details li::before {
  content: '\25B8';
  /* Triangle right (safe unicode) */
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* --- SERVICES --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  padding: 2rem;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  text-align: center;
  transition: transform var(--transition-fast);
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.service-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 18px;
  color: #0b0f19;
  /* Default to black for light mode */
}

.service-icon-img {
  width: 52px;
  height: 52px;
  display: block;
}

/* Dark Mode Service Icons - Invert to white */
[data-theme="dark"] .service-icon {
  color: #ffffff;
}

[data-theme="dark"] .service-icon-img {
  filter: invert(1);
}

/* --- CAREER OBJECTIVE --- */
.objective-card {
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-body));
  border: 1px solid var(--border-light);
  padding: 3rem;
  border-radius: var(--radius-lg);
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

.objective-text {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.8;
}

/* --- CONTACT --- */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 800px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .contact-wrapper {
    grid-template-columns: 1fr 1fr;
  }
}

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

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

.contact-icon {
  font-size: 1.5rem;
}

.contact-form {
  background-color: var(--bg-surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background-color: var(--bg-body);
  color: var(--text-main);
  transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--primary);
  outline: 2px solid rgba(59, 130, 246, 0.2);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form-actions {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.contact-form-actions .btn {
  min-width: 200px;
}

/* Contact Links (Deprecated text links removed, kept for reference if needed) */
.contact-link {
  text-decoration: none;
  color: inherit;
  transition: opacity var(--transition-fast);
}

.contact-actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  /* Light mode border */
  background: transparent;
  transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

[data-theme="dark"] .icon-btn {
  border-color: rgba(255, 255, 255, 0.18);
}

.icon-btn:hover {
  transform: translateY(-1px);
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.icon-btn img {
  display: block;
  filter: none;
  opacity: 0.95;
}

[data-theme="dark"] .icon-btn img {
  filter: invert(1);
}

/* --- FOOTER --- */
footer {
  border-top: 1px solid var(--border-light);
  padding: 0.5rem 0;
  background-color: var(--bg-surface);
  margin-top: var(--gap-section);
}

.footer-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
  font-size: 1.1rem;
}

.footer-content p {
  margin: 0;
}

.back-to-top {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
}

/* --- ANIMATIONS & UTILS --- */
.hidden-scroll {
  /* Visible par défaut (Progressive Enhancement) */
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Masqué UNIQUEMENT par JavaScript (avant animation) */
.hidden-scroll.js-hidden:not(.show-scroll) {
  opacity: 0;
  transform: translateY(30px);
}

.show-scroll {
  opacity: 1;
  transform: translateY(0);
}

/*
========================================================================
   5. SYSTEM DARK MODE OVERRIDES (For Auto Mode)
========================================================================
   Mirrors [data-theme="dark"] styles for specific elements
   Applies when system is Dark AND we are NOT forcing Light
*/
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .service-icon {
    color: #ffffff;
  }

  html:not([data-theme="light"]) .service-icon-img {
    filter: invert(1);
  }

  html:not([data-theme="light"]) .icon-btn {
    border-color: rgba(255, 255, 255, 0.18);
  }

  html:not([data-theme="light"]) .icon-btn:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  html:not([data-theme="light"]) .icon-btn img {
    filter: invert(1);
  }
}

/*
========================================================================
   6. LOADER (Newton's Cradle Bulbs)
========================================================================
*/
.loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-body);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  /* Hang from top */
  padding-top: 0;
  /* Attach to ceiling */
  z-index: 9999;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader-wrapper.loaded {
  opacity: 0;
  visibility: hidden;
}

.cradle {
  display: flex;
  border-top: 5px solid var(--text-main);
  padding: 0 10px;
}

.bulb-container {
  position: relative;
  width: 40px;
  height: 150px;
  transform-origin: top center;
}

.wire {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100px;
  background-color: var(--text-muted);
  transform: translateX(-50%);
}

.bulb {
  position: absolute;
  top: 100px;
  left: 50%;
  width: 30px;
  height: 30px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #ffdb4d;
  /* Always On (Yellow) */
  box-shadow: 0 0 10px #ffdb4d, inset -2px -2px 6px rgba(0, 0, 0, 0.1);
}

.bulb-container:first-child {
  animation: swing-left 1.2s infinite ease-in-out;
}

.bulb-container:last-child {
  animation: swing-right 1.2s infinite ease-in-out;
  animation-delay: 0.6s;
}

@keyframes swing-left {
  0% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(45deg);
  }

  50% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

@keyframes swing-right {
  0% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(-45deg);
  }

  50% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

[data-theme="dark"] .cradle {
  border-color: #f3f4f6;
}

/*
========================================================================
   7. NAVBAR GLOW INDICATOR
========================================================================
*/
.nav-links {
  position: relative;
  /* Ensure indicator positions relative to this container */
}

.nav-indicator {
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 4px;
  background: var(--primary);
  border-radius: 4px;
  box-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  pointer-events: none;
  z-index: 10;
}

/* Change glow color for secondary effect if desired, or stick to primary */
[data-theme="dark"] .nav-indicator {
  background: #22d3ee;
  /* Cyan for dark mode */
  box-shadow: 0 0 10px #22d3ee, 0 0 20px #22d3ee, 0 0 40px #22d3ee;
  height: 3px;
}

/*
========================================================================
   8. PREMIUM CARD HOVER EFFECTS (Skills, Projects, Services)
========================================================================
*/
.skill-card,
.project-card,
.service-card {
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1),
    box-shadow 0.5s ease,
    border-color 0.5s ease,
    filter 0.5s ease;
  /* Ensure positioned for z-index manipulation if needed */
  position: relative;
  z-index: 1;
}

.skill-card:hover,
.project-card:hover,
.service-card:hover {
  transform: translateY(-10px) scale(1.03);
  z-index: 10;
  /* Premium Glow */
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25),
    0 0 20px var(--primary-light);
  border-color: var(--primary);
}

/* SIBLING SHIFT EFFECT (The "Look Right" push) */
.skill-card:hover~.skill-card,
.project-card:hover~.project-card,
.service-card:hover~.service-card {
  transform: translateX(15px);
  /* Push siblings slightly right */
  filter: brightness(0.9);
  /* Focus effect: dim interactions */
}

/* Dark Mode Intensity & Adjustments */
[data-theme="dark"] .skill-card:hover,
[data-theme="dark"] .project-card:hover,
[data-theme="dark"] .service-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5),
    0 0 25px rgba(34, 211, 238, 0.5);
  border-color: #22d3ee;
}

/*
========================================================================
   11. MODERN SLIDING NAVBAR (Neon Glow)
========================================================================
*/

/* Main Navigation Context */
.nav-links {
  position: relative;
  /* Context for absolute indicator */
  /* Ensure no gap interference */
}

/* Nav Link Styling Override */
.nav-link {
  /* Reset previous underline styles if any */
}

.nav-link::after {
  display: none !important;
  /* Remove old underline */
}

/* Sliding Indicator */
.nav-indicator {
  position: absolute;
  bottom: -6px;
  /* Position under text */
  left: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary);
  /* Neon glow */
  width: 0;
  transform: translateX(0);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.2s ease;
  pointer-events: none;
  opacity: 0;
  z-index: 10;
}

/*
========================================================================
   12. SCROLL PROGRESS BUTTON
========================================================================
*/

.progress-wrap {
  position: fixed;
  right: 30px;
  bottom: 30px;
  height: 50px;
  width: 50px;
  cursor: pointer;
  display: block;
  border-radius: 50px;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 200ms linear;
  background-color: var(--bg-surface);
  /* Adaptive background */
  color: var(--primary);
  /* Adaptive arrow color */
}

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

.progress-wrap svg.progress-circle path {
  fill: none;
  stroke: var(--primary);
  /* Progress color */
  stroke-width: 4;
  transition: stroke-dashoffset 10ms linear;
}

.progress-arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  transition: all 200ms linear;
}

.progress-wrap:hover .progress-arrow {
  transform: translate(-50%, -60%);
  /* Slight jump effect */
}

/* 
   DARK MODE HERO IMAGE OVERRIDE (Snoweb Style)
   Transform "Blob" -> "Isometric Floating 3D Block"
*/
/* 
   DARK MODE HERO PHOTO: 
   Identical to Light Mode (Blob + Animation).
   Only Z-Index is adjusted to sit above background patches.
*/
[data-theme="dark"] .hero-img-blob {
  position: relative;
  z-index: 25;
}



/* DARK MODE BUTTONS (Snoweb Style) */
[data-theme="dark"] .hero-btns {
  position: relative;
  z-index: 20;
  /* Ensure above all patches and backgrounds */
}

[data-theme="dark"] .hero-btns .btn {
  border-radius: 6px;
  /* Snoweb specific radius */
  font-weight: 600;
  padding: 0.8rem 1.8rem;
  letter-spacing: 0.02em;
}

[data-theme="dark"] .hero-btns .btn-primary {
  background-color: var(--primary);
  /* Keep brand blue */
  border: 1px solid var(--primary);
  color: #fff;
}

[data-theme="dark"] .hero-btns .btn-outline {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
}

[data-theme="dark"] .hero-btns .btn-outline:hover {
  border-color: #fff;
  background-color: rgba(255, 255, 255, 0.05);
}

/* DARK MODE TYPOGRAPHY OVERRIDES */
[data-theme="dark"] .hero-title-v2 {
  color: #ffffff;
}

[data-theme="dark"] .hero-accent-v2 {
  color: var(--accent);
  /* Ensure blue pop */
}


/* Light Mode Specific tweaks if needed */
[data-theme="light"] .progress-wrap {
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.05);
}

/*
========================================================================
   13. CUSTOM LOGO PRELOADER
======================================================================== 
*/
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--bg-body);
  /* Theme adaptive background */
  z-index: 99999;
  /* Above everything */
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader-logo-container {
  width: 60px;
  /* Adjust size as needed */
  height: 60px;
  z-index: 2;
}

.loader-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Force color logic for logo if needed - using brightness/invert matches mobile logic */
  filter: brightness(0) invert(1);
  /* Default to White for Dark Mode */
}

/* Light Mode Logo Adaptation */
[data-theme="light"] .loader-logo {
  filter: brightness(0);
  /* Black for Light Mode */
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .loader-logo {
    filter: brightness(0);
  }
}

/* Ring Animation */
.loader-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--primary);
  /* Neon Color */
  animation: spin 1s linear infinite;
  z-index: 1;
}

.loader-ring::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: rgba(34, 211, 238, 0.5);
  /* Lighter/Different shade if possible, or same primary */
  animation: spin 2s linear infinite reverse;
}

.loader-ring::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--primary);
  animation: spin 3s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

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

/* 
   ========================================================================
      SMART PROMPT (UX Toast)
   ========================================================================
*/
.smart-prompt {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 340px;
  max-width: 90vw;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  z-index: 9999;

  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  /* Invisible initially */
}

.smart-prompt.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.smart-prompt.hide {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.smart-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: color 0.2s, background-color 0.2s;
}

.smart-close:hover {
  color: var(--text-main);
  background-color: var(--bg-surface);
}

.smart-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-main);
  padding-right: 20px;
}

.smart-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.smart-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-prompt-primary,
.btn-prompt-secondary {
  flex: 1;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-prompt-primary {
  background-color: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
}

.btn-prompt-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

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

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

/* Mobile Responsive */
@media (max-width: 768px) {
  .smart-prompt {
    bottom: 16px;
    left: 50%;
    right: auto;
    transform: translate(-50%, 20px);
    /* Center X, Offset Y */
  }

  .smart-prompt.visible {
    transform: translate(-50%, 0);
  }

  .smart-prompt.hide {
    transform: translate(-50%, 10px);
  }
}

/* UX OVERLAP FIX: Move scroll button up when toast is visible */
body.ux-toast-open .progress-wrap {
  bottom: calc(var(--ux-toast-height, 0px) + 36px) !important;
  /* 24px initial + 12px gap */
  transition: bottom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease-out, visibility 0.5s ease-out, transform 200ms linear;
}


/* 
   ========================================================================
      UX IMPROVEMENTS (Recruiter-Proof)
   ========================================================================
*/

/* 1. STATUS BADGE (Hero) */
.status-container {
  margin-bottom: 1rem;
  display: flex;
  justify-content: flex-start;
  /* Align left */
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 50px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s;
}

.status-badge:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10B981;
  /* Emerald 500 */
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* 2. ACCESSIBILITY: Visible Focus */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn:focus-visible,
a:focus-visible {
  transition: none;
  /* Instant feedback */
}

/* 3. PREFERS-REDUCED-MOTION */
@media (prefers-reduced-motion: reduce) {

  *,
  ::before,
  ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .status-dot {
    animation: none;
  }

  .hero-img-blob {
    animation: none;
  }

  .smart-prompt {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* 4. NAVIGATION ACTIVE STATE */
.nav-link.active {
  color: var(--primary) !important;
  position: relative;
  font-weight: 700;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary);
  border-radius: 2px;
  transform-origin: left;
  transform: scaleX(1);
}

[data-theme="dark"] .nav-link.active::after {
  box-shadow: 0 2px 8px rgba(34, 211, 238, 0.4);
}


/* CV Link (Hero) */
.hero-cv-wrapper {
  display: flex;
  justify-content: flex-start;
}

.link-cv {
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
  padding: 0.5rem 0;
}

.link-cv:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}


/* PREMIUM CV PILL (Recruiter-Proof) */
.cv-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  white-space: nowrap;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 50px;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.cv-pill:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 5px 15px rgba(var(--primary-rgb, 37, 99, 235), 0.15);
  /* Fallback to blue if var missing */
}

.cv-pill svg {
  color: var(--primary);
  transition: transform 0.2s;
}

.cv-pill:hover svg {
  transform: translateY(2px);
  /* Down arrow cues download */
}

.cv-ext {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.05);
  /* Very subtle badge */
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
  font-weight: 500;
}



/* Ensure wrapper aligns left with buttons */
.hero-cv-wrapper {
  display: flex;
  justify-content: flex-start;
}


/* 
   ========================================================================
      HERO ALIGNMENT & DARK MODE FIXES
   ========================================================================
*/

/* 1. Hero CTA Group (Flex Wrapper) */
.hero-cta-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-bottom: 2rem;
  gap: 1.5rem;
}

/* 2. Responsive Alignment */
@media (max-width: 991px) {

  /* Mobile/Tablet: Centered */
  .hero-content-wrapper {
    text-align: center;
    align-items: center;
    /* Ensures flex children center */
  }

  .status-container {
    justify-content: center;
    /* Center Badge */
    width: 100%;
    display: flex;
  }

  .hero-cta-group {
    align-items: center;
    /* Center Buttons + CV */
  }

  .hero-cv-wrapper {
    display: flex;
    /* Ensure it takes width necessary */
    justify-content: center;
    width: 100%;
  }

  .cv-pill {
    width: min(100%, 300px);
    /* Visual consistence with buttons */
    justify-content: center;
  }
}

@media (min-width: 992px) {

  /* Desktop: Left Aligned */
  .hero-content-wrapper {
    text-align: left;
    align-items: flex-start;
  }

  .status-container {
    justify-content: flex-start;
    display: flex;
  }

  .hero-cta-group {
    align-items: flex-start;
  }

  .hero-cv-wrapper {
    justify-content: flex-start;
    display: flex;
  }

  .cv-pill {
    width: auto;
    /* Hug content on desktop */
  }
}



/* 3. DARK MODE CV BUTTON - DEFINITIVE 360° VISIBILITY FIX */
/* Forces bottom border visibility using Ring + Inset Shadow strategy */
[data-theme='dark'] .cv-pill {
  position: relative;
  /* Ensure z-index works */
  z-index: 10;

  /* Proportions identiques au mode clair */
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 50px;

  /* A) Border Visible */
  border: 1px solid rgba(255, 255, 255, 0.30);

  /* B + C) RING EXT + INSET BOTTOM (The Fix) */
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    /* Ring externe pour contour net */
    inset 0 -1px 0 rgba(255, 255, 255, 0.28),
    /* Inset pour forcer le bas */
    0 12px 28px rgba(0, 0, 0, 0.35);
  /* Ombre portée détachée */

  background: rgba(255, 255, 255, 0.08);
  /* Fond léger demandé */
  color: rgba(255, 255, 255, 0.92);
  /* Texte blanc cassé haut contraste */

  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* FIX PARENT CLIPPING: Ensure shadow/border is never cut */
[data-theme="dark"] .hero-cv-wrapper {
  overflow: visible !important;
  padding-bottom: 20px !important;
  /* Safety space for shadow/border */
  margin-bottom: -20px;
  /* Offset the padding to keep layout stable */
  position: relative;
  z-index: 20;
}

[data-theme="dark"] .hero-cta-group {
  overflow: visible !important;
}

/* BLOCKERS KILLER: Remove any overlays */
[data-theme='dark'] .cv-pill::before,
[data-theme='dark'] .cv-pill::after {
  content: none !important;
}

/* Icon Styling */
[data-theme='dark'] .cv-pill svg {
  color: rgba(255, 255, 255, 0.92);
  opacity: 1;
  transition: transform 0.2s;
}

/* Hover State */
[data-theme='dark'] .cv-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  /* Boost ring brightness on hover */
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(255, 255, 255, 0.4),
    0 15px 30px rgba(0, 0, 0, 0.4);
}

[data-theme='dark'] .cv-pill:hover svg {
  transform: translateY(2px);
}

/* Focus State */
[data-theme='dark'] .cv-pill:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.75);
  outline-offset: 4px;
}

/* PDF Badge */
[data-theme='dark'] .cv-ext {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
  font-weight: 500;
}

/* Correction alignement horizontal boutons CV */
@media (min-width: 992px) {
  .hero-cv-wrapper,
  [data-theme="dark"] .hero-cv-wrapper {
    flex-wrap: nowrap !important;
  }
}