/* Modern Portfolio CSS */

/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 62.5%; /* 1rem = 10px */
}

@media (max-width: 480px) {
  html {
    font-size: 56.25%; /* 1rem = 9px pour les petits écrans */
  }
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.6rem;
  line-height: 1.6;
  color: #e2e8f0;
  background: #0f172a;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* ===== CUSTOM PROPERTIES ===== */
:root {
  /* Colors */
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --secondary: #8b5cf6;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  
  /* Background Colors */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: #1e293b;
  --bg-surface: #0f172a;
  
  /* Border Colors */
  --border-primary: #334155;
  --border-secondary: #475569;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Transitions */
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
}

/* ===== UTILITY CLASSES ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-sm);
  }
}

/* Container spécial pour le header avec plus d'espacement */
.nav .container {
  padding: 0 var(--space-xl);
}

@media (max-width: 768px) {
  .nav .container {
    padding: 0 var(--space-lg);
  }
}

@media (max-width: 480px) {
  .nav .container {
    padding: 0 var(--space-md);
  }
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-tag {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-primary);
  font-size: 1.4rem;
  font-weight: 500;
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-description {
  font-size: 1.8rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-xl);
  font-size: 1.6rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

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

.btn--secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--primary);
  color: var(--primary);
}

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

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

.btn--small {
  padding: var(--space-sm) var(--space-lg);
  font-size: 1.4rem;
}

/* ===== HEADER & NAVIGATION ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-primary);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.header[data-scroll-header] {
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.header[data-scroll-header="true"] {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: var(--shadow-xl);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) 0;
  margin: 0 var(--space-xl);
}

@media (max-width: 768px) {
  .nav { margin: 0 var(--space-lg); }
}

.nav__brand { display: flex; align-items: center; }

.nav__logo {
  font-size: 2.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.nav__menu {
  display: flex;
  list-style: none;
  gap: var(--space-xl);
  margin: 0;
  padding: 0;
}

.nav__link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-normal);
  position: relative;
}

.nav__link:hover { color: var(--primary); }

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -5px; left: 0; width: 0; height: 2px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  transition: width var(--transition-normal);
}

.nav__link:hover::after { width: 100%; }

/* Hide checkbox */
.nav__checkbox { display: none; }

.nav__toggle {
  display: none;
  flex-direction: column;
  background: none; border: none; cursor: pointer; padding: var(--space-xs);
}

.nav__toggle span {
  width: 25px; height: 3px; background: var(--text-primary);
  margin: 3px 0; transition: all var(--transition-normal); border-radius: var(--radius-sm);
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav__menu {
    position: fixed; top: 100%; left: 0; width: 100%;
    background: var(--bg-secondary);
    flex-direction: column; padding: var(--space-xl);
    transform: translateY(-100%); opacity: 0; visibility: hidden;
    transition: all var(--transition-normal);
    border-top: 1px solid var(--border-primary); z-index: 1000; max-width: 100vw; box-sizing: border-box;
  }
  .nav__checkbox:checked ~ .nav__menu { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav__toggle { display: flex; }
  /* Burger menu animation */
  .nav__checkbox:checked + .nav__toggle span:nth-child(1) { transform: rotate(45deg) translate(9px, 9px); }
  .nav__checkbox:checked + .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav__checkbox:checked + .nav__toggle span:nth-child(3) { transform: rotate(-45deg) translate(9px, -9px); }
}

@media (max-width: 480px) {
  .nav__menu { padding: var(--space-lg); }
  .nav__logo { font-size: 2rem; }
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--space-3xl) + 80px) 0 var(--space-3xl) 0;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}

.hero__content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3xl);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero__greeting {
  display: block;
  color: var(--primary);
  font-size: 1.8rem;
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.hero__title {
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  line-height: 1.1;
}

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

.hero__subtitle {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--accent);
  font-weight: 600;
  margin-bottom: var(--space-lg);
}

.hero__description {
  font-size: 1.8rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  max-width: 600px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.hero__social {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--transition-normal);
  border: 1px solid var(--border-primary);
}

.social-link:hover {
  background: var(--primary);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.discord-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
}

.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__avatar {
  position: relative;
}

.avatar-circle {
  width: 250px;
  height: 250px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--shadow-xl);
  padding: 8px;
}

.avatar-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

.avatar-text {
  font-size: 4rem;
  font-weight: 800;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .hero__content {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    text-align: center;
  }
  
  .hero__actions {
    flex-direction: column;
    align-items: center;
  }
  
  .hero__social {
    justify-content: center;
  }
  
  .avatar-circle {
    width: 200px;
    height: 200px;
  }
  
  .avatar-text {
    font-size: 3rem;
  }
}

/* ===== ABOUT SECTION ===== */
.about {
  padding: var(--space-3xl) 0;
  background: var(--bg-secondary);
}

.about__content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.about__subtitle {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-lg);
}

.about__description {
  font-size: 1.8rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.7;
}

.about__highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.highlight {
  padding: var(--space-lg);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
}

.highlight h4 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

.highlight p {
  color: var(--text-secondary);
  font-size: 1.5rem;
}

.about__visual {
  display: flex;
  justify-content: center;
}

.profile-card {
  background: var(--bg-card);
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-lg);
  text-align: center;
  max-width: 300px;
  width: 100%;
}

.profile-info h4 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.profile-info p {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  justify-content: center;
  font-size: 1.4rem;
  color: var(--success);
}

.status-dot {
  width: 10px;
  height: 10px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

@media (max-width: 768px) {
  .about__content {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  
  .about__highlights {
    grid-template-columns: 1fr;
  }
}

/* ===== EXPERIENCE SECTION ===== */
.experience {
  padding: var(--space-3xl) 0;
  background: var(--bg-primary);
  position: relative;
}

.experience-timeline {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  padding: var(--space-xl) 0;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, 
    var(--primary) 0%, 
    var(--secondary) 50%, 
    var(--accent) 100%);
  transform: translateX(-50%);
  border-radius: var(--radius-full);
  box-shadow: 0 0 20px rgba(96, 165, 250, 0.3);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-4xl);
  display: flex;
  align-items: flex-start;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  z-index: 10;
}

.marker-dot {
  width: 20px;
  height: 20px;
  background: var(--bg-primary);
  border: 4px solid var(--primary);
  border-radius: 50%;
  position: relative;
  z-index: 2;
}

.timeline-item.active .marker-dot {
  background: var(--primary);
  border-color: var(--bg-primary);
  box-shadow: 0 0 20px rgba(96, 165, 250, 0.6);
}

.marker-pulse {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 36px;
  height: 36px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  opacity: 0;
  animation: pulse 2s infinite;
}

.timeline-item.active .marker-pulse {
  opacity: 1;
}

@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.timeline-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-xl);
  padding: var(--space-xl);
  margin: 0 var(--space-xl);
  width: calc(50% - var(--space-xl));
  position: relative;
  transition: all 0.3s ease;
}

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

.timeline-card::before {
  content: '';
  position: absolute;
  top: 20px;
  width: 0;
  height: 0;
  border: 15px solid transparent;
}

.timeline-item:nth-child(odd) .timeline-card::before {
  right: -30px;
  border-left-color: var(--border-primary);
}

.timeline-item:nth-child(even) .timeline-card::before {
  left: -30px;
  border-right-color: var(--border-primary);
}

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

.date-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-md);
}

.date-badge.current {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from { box-shadow: 0 0 10px rgba(96, 165, 250, 0.5); }
  to { box-shadow: 0 0 20px rgba(96, 165, 250, 0.8); }
}

.company-name {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.position-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.location {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 1.4rem;
  color: var(--text-secondary);
}

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

.achievement-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  transition: background 0.3s ease;
}

.achievement-item:hover {
  background: rgba(96, 165, 250, 0.05);
}

.achievement-icon {
  font-size: 2.4rem;
  min-width: 40px;
  text-align: center;
}

.achievement-text h5 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.achievement-text p {
  color: var(--text-secondary);
  font-size: 1.5rem;
}

.timeline-footer {
  border-top: 1px solid var(--border-secondary);
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.timeline-skills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.skill-tag {
  padding: var(--space-xs) var(--space-sm);
  background: rgba(96, 165, 250, 0.1);
  color: var(--primary);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: var(--radius-md);
  font-size: 1.2rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.skill-tag.primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-color: transparent;
}

.skill-tag:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

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

.project-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-primary);
  color: var(--primary);
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 1px solid var(--primary);
  font-weight: 500;
  transition: all 0.3s ease;
}

.project-link:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .timeline-line {
    left: 30px;
  }
  
  .timeline-item {
    flex-direction: column !important;
    margin-left: 60px;
  }
  
  .timeline-marker {
    left: 30px;
    transform: translateX(-50%);
  }
  
  .timeline-card {
    width: 100%;
    margin: 0;
  }
  
  .timeline-card::before {
    display: none;
  }
  
  .timeline-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .timeline-links .project-link {
    flex-direction: row;
    align-items: center;
  }
  
  .achievement-item {
    flex-direction: column;
    text-align: left;
  }
  
  .achievement-icon {
    font-size: 2rem;
    margin-bottom: var(--space-xs);
  }
}

@media (max-width: 480px) {
  .experience-timeline {
    padding: var(--space-lg) 0;
  }
  
  .timeline-line {
    left: 20px;
  }
  
  .timeline-item {
    margin-left: 40px;
    margin-bottom: var(--space-2xl);
  }
  
  .timeline-marker {
    left: 20px;
  }
  
  .timeline-card {
    padding: var(--space-lg);
  }
  
  .achievement-item {
    padding: var(--space-sm);
    margin-bottom: var(--space-md);
  }
  
  .achievement-text h5 {
    font-size: 1.4rem;
  }
  
  .achievement-text p {
    font-size: 1.4rem;
    line-height: 1.5;
  }
  
  .company-name {
    font-size: 1.8rem;
  }
  
  .position-title {
    font-size: 1.4rem;
  }
}

.timeline-links {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.timeline-links .project-link {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: var(--space-xs) !important;
  padding: var(--space-sm) var(--space-md) !important;
  background: var(--bg-primary) !important;
  color: var(--primary) !important;
  text-decoration: none !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--primary) !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
  width: auto !important;
  height: auto !important;
  justify-content: flex-start !important;
  margin-left: 0 !important;
}

/* Hover pour les liens projets */
.projects .project-link:hover {
  background: var(--primary);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Hover pour les liens timeline */
.timeline-links .project-link:hover {
  background: var(--primary) !important;
  color: white !important;
  transform: translateY(-2px) !important;
}

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

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

.tech-tag {
  padding: var(--space-xs) var(--space-sm);
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent);
  font-size: 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.projects-cta {
  text-align: center;
  margin-top: var(--space-2xl);
}

@media (max-width: 768px) {
  .projects-cta {
    margin-top: var(--space-xl);
  }
}

/* ===== PORTFOLIO SHOWCASE SECTION ===== */
.portfolio-showcase {
  padding: var(--space-3xl) 0;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.portfolio-carousel {
  max-width: 100%;
  margin: 0 auto;
}

.carousel-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px var(--border-primary);
}

/* Hide radio buttons */
.carousel-container input[type="radio"] {
  display: none;
}

.carousel-track {
  display: flex;
  width: 500%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item {
  width: 20%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-xl);
  text-align: center;
}

.portfolio-image {
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16/10;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-lg);
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.3);
  background: var(--bg-tertiary);
  position: relative;
}

.portfolio-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(59, 130, 246, 0.1) 0%,
    rgba(139, 92, 246, 0.1) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.portfolio-item:hover .portfolio-image::before {
  opacity: 1;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-image img {
  transform: scale(1.05);
}

.portfolio-caption {
  max-width: 600px;
}

.portfolio-caption h4 {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.portfolio-caption p {
  font-size: 1.6rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto;
}

/* CSS-only carousel navigation */
#slide1:checked ~ .carousel-track { transform: translateX(0%); }
#slide2:checked ~ .carousel-track { transform: translateX(-20%); }
#slide3:checked ~ .carousel-track { transform: translateX(-40%); }
#slide4:checked ~ .carousel-track { transform: translateX(-60%); }
#slide5:checked ~ .carousel-track { transform: translateX(-80%); }

/* Navigation arrows */
.carousel-arrows {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 var(--space-lg);
  pointer-events: none;
  z-index: 10;
}

.arrow {
  width: 50px;
  height: 50px;
  background: rgba(15, 23, 42, 0.8);
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: auto;
  backdrop-filter: blur(10px);
  color: var(--primary);
}

.arrow:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(96, 165, 250, 0.5);
}

.arrow svg {
  width: 24px;
  height: 24px;
  stroke-width: 3;
}

/* Dynamic arrow targets */
.arrow {
  display: none;
}

/* Show appropriate arrows based on current slide */
#slide1:checked ~ .carousel-arrows .slide1-prev,
#slide1:checked ~ .carousel-arrows .slide1-next,
#slide2:checked ~ .carousel-arrows .slide2-prev,
#slide2:checked ~ .carousel-arrows .slide2-next,
#slide3:checked ~ .carousel-arrows .slide3-prev,
#slide3:checked ~ .carousel-arrows .slide3-next,
#slide4:checked ~ .carousel-arrows .slide4-prev,
#slide4:checked ~ .carousel-arrows .slide4-next,
#slide5:checked ~ .carousel-arrows .slide5-prev,
#slide5:checked ~ .carousel-arrows .slide5-next {
  display: flex;
}

/* Hide prev arrow on first slide and next arrow on last slide */
#slide1:checked ~ .carousel-arrows .slide1-prev {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

#slide5:checked ~ .carousel-arrows .slide5-next {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* Update arrow targets dynamically */
#slide1:checked ~ .carousel-arrows .arrow-prev { cursor: default; opacity: 0.5; }
#slide1:checked ~ .carousel-arrows .arrow-next { cursor: pointer; }

#slide2:checked ~ .carousel-arrows .arrow-prev { cursor: pointer; }
#slide2:checked ~ .carousel-arrows .arrow-next { cursor: pointer; }

#slide3:checked ~ .carousel-arrows .arrow-prev { cursor: pointer; }
#slide3:checked ~ .carousel-arrows .arrow-next { cursor: pointer; }

#slide4:checked ~ .carousel-arrows .arrow-prev { cursor: pointer; }
#slide4:checked ~ .carousel-arrows .arrow-next { cursor: pointer; }

#slide5:checked ~ .carousel-arrows .arrow-prev { cursor: pointer; }
#slide5:checked ~ .carousel-arrows .arrow-next { cursor: default; opacity: 0.5; }

/* Portfolio tags */
.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  justify-content: center;
  margin-top: var(--space-md);
}

.portfolio-tags .tag {
  padding: var(--space-xs) var(--space-sm);
  background: rgba(96, 165, 250, 0.1);
  color: var(--primary);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  font-weight: 500;
}

/* Navigation arrows (hidden for CSS-only version) */
.carousel-nav {
  display: none;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  padding: var(--space-md) 0;
}

.carousel-indicators {
  display: flex;
  gap: var(--space-sm);
}

.indicator {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  background: var(--border-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  display: block;
}

.indicator:hover {
  background: var(--primary);
  transform: scale(1.1);
}

/* Active states for indicators */
#slide1:checked ~ .carousel-controls .carousel-indicators label:nth-child(1),
#slide2:checked ~ .carousel-controls .carousel-indicators label:nth-child(2),
#slide3:checked ~ .carousel-controls .carousel-indicators label:nth-child(3),
#slide4:checked ~ .carousel-controls .carousel-indicators label:nth-child(4),
#slide5:checked ~ .carousel-controls .carousel-indicators label:nth-child(5) {
  background: var(--primary);
  transform: scale(1.2);
}

@media (max-width: 768px) {
  .portfolio-item {
    padding: var(--space-lg) var(--space-md);
  }
  
  .portfolio-caption h4 {
    font-size: 2rem;
  }
  
  .portfolio-caption p {
    font-size: 1.4rem;
  }
  
  .carousel-controls {
    gap: var(--space-md);
  }
  
  .carousel-arrows {
    padding: 0 var(--space-sm);
  }
  
  .arrow {
    width: 40px;
    height: 40px;
  }
  
  .arrow svg {
    width: 20px;
    height: 20px;
  }
}

/* ===== VEILLE SECTION ===== */
.veille {
  padding: var(--space-3xl) 0;
  background: var(--bg-primary);
}

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

.veille-card {
  background: var(--bg-card);
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-primary);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.veille-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.veille-card.primary {
  border: 2px solid var(--primary);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
}

.veille-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.veille-card h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.veille-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.veille-resources h4 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

.resource-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.resource-links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 1.4rem;
  transition: color var(--transition-normal);
}

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

@media (max-width: 768px) {
  .veille-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== SKILLS SECTION ===== */
.skills {
  padding: var(--space-3xl) 0;
  background: var(--bg-secondary);
}

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

.skill-category {
  background: var(--bg-card);
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-primary);
}

.skill-category h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.skill-category h3::before {
  content: '';
  width: 4px;
  height: 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-sm);
}

.skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.skill-item {
  padding: var(--space-sm) var(--space-md);
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid rgba(59, 130, 246, 0.2);
  transition: all 0.3s ease;
}

.skill-item:hover {
  background: rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

.skill-name {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Special category for technical skills */
.skill-category.special {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
  border: 2px solid var(--border-secondary);
  margin-top: var(--space-lg);
}

.skill-category.special h3 {
  font-size: 2rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.skill-category.special h3::before {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  width: 6px;
  height: 24px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* Skills summary section */
.skills-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

@media (max-width: 1024px) {
  .skills-summary {
    grid-template-columns: 1fr;
  }
}

.skill-summary-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}

.skill-summary-item:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Dark mode styles for skill summary */
@media (prefers-color-scheme: dark) {
  .skill-summary-item {
    background: #1e293b;
    border-color: #334155;
  }
  
  .skill-summary-item:hover {
    background: #334155;
    border-color: #64748b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
}

.skill-emoji {
  font-size: 2.4rem;
  min-width: 40px;
  text-align: center;
}

.skill-desc {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.skill-desc strong {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
}

.skill-desc span {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .skills-summary {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
  
  .skill-summary-item {
    padding: var(--space-sm);
    gap: var(--space-sm);
  }
  
  .skill-emoji {
    font-size: 2rem;
    min-width: 35px;
  }
  
  .skill-desc strong {
    font-size: 1.3rem;
  }
  
  .skill-desc span {
    font-size: 1.1rem;
  }
  
  .skill-desc strong {
    font-size: 1.3rem;
  }
  
  .skill-desc span {
    font-size: 1.1rem;
  }
}

/* ===== EDUCATION SECTION ===== */
.education {
  padding: var(--space-3xl) 0;
  background: var(--bg-primary);
}

.education-grid {
  display: grid;
  gap: var(--space-xl);
  max-width: 800px;
  margin: 0 auto;
}

.education-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-xl);
  background: var(--bg-card);
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-primary);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.education-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.education-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

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

.education-card.current {
  border: 2px solid var(--primary);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(6, 182, 212, 0.05));
}

.education-card.current::before {
  opacity: 1;
}

.education-year {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-primary);
  font-size: 1.8rem;
  font-weight: 700;
  border-radius: var(--radius-xl);
  flex-shrink: 0;
}

.education-content h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.education-content h4 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.education-content p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.education-status {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-xl);
  font-size: 1.2rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.education-status.completed {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.education-status:not(.completed) {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

@media (max-width: 768px) {
  .education-card {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: center;
  }
  
  .education-year {
    justify-self: center;
  }
}

/* ===== INLINE LINK STYLE ===== */
.inline-link {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(59, 130, 246, 0.3);
  transition: all var(--transition-normal);
  word-break: break-all;
  overflow-wrap: break-word;
}

.inline-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ===== CONTACT SECTION ===== */
.contact {
  padding: var(--space-3xl) 0;
  background: var(--bg-primary);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  margin-top: var(--space-xl);
}

.contact-info h3,
.contact-links h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xl);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  padding: var(--space-lg);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
  transition: all var(--transition-normal);
}

.contact-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.contact-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

.contact-item h4 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.contact-item p,
.contact-item a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-normal);
}

.contact-item a:hover {
  color: var(--primary);
}

.social-grid {
  display: grid;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.social-card {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
  text-decoration: none;
  transition: all var(--transition-normal);
}

.social-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.social-card svg {
  color: var(--primary);
  flex-shrink: 0;
}

.social-card h4 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.social-card p {
  color: var(--text-secondary);
  font-size: 1.4rem;
}

.discord-contact {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
}

.discord-contact svg {
  color: #5865f2;
  flex-shrink: 0;
}

.discord-contact h4 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.discord-contact strong {
  color: #5865f2;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
  padding: var(--space-3xl) 0 var(--space-xl) 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3xl);
  margin-bottom: var(--space-xl);
}

.footer-main h3 {
  font-size: 2.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-sm);
}

.footer-main p {
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.footer-links {
  display: flex;
  gap: var(--space-3xl);
}

.footer-section h4 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: var(--space-sm);
}

.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-normal);
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-primary);
  font-size: 1.4rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  
  .footer-links {
    gap: var(--space-xl);
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--primary-hover), var(--secondary));
}

/* ===== SELECTION ===== */
::selection {
  background: var(--primary);
  color: var(--text-primary);
}

/* ===== PRINT STYLES ===== */
@media print {
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }
  
  .header,
  .nav__toggle,
  .hero__actions,
  .hero__social {
    display: none !important;
  }
  
  .hero {
    min-height: auto;
    padding: 2rem 0;
  }
  
  section {
    page-break-inside: avoid;
    margin-bottom: 2rem;
  }
}

/* ===== LOADING SCREEN ===== */
#loading-screen {
  position: fixed;
  inset: 0;
  background: #0f172a;
  display: grid;
  place-items: center;
  z-index: 2000;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#loading-screen.hidden { opacity: 0; visibility: hidden; }
#loading-screen .loader { text-align: center; color: var(--text-secondary); }
.spinner {
  width: 48px; height: 48px;
  border: 4px solid rgba(255,255,255,0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto var(--space-md);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== SCROLL PROGRESS BAR ===== */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; background: transparent; z-index: 1500; }
.scroll-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--secondary)); box-shadow: 0 0 10px rgba(59,130,246,0.6); }

/* ===== CUSTOM CURSOR ===== */
.custom-cursor { position: fixed; inset: 0; pointer-events: none; z-index: 3000; }
.cursor-dot { position: fixed; width: 6px; height: 6px; background: var(--primary); border-radius: 50%; transform: translate(-50%, -50%); mix-blend-mode: difference; }
.cursor-ring { position: fixed; width: 36px; height: 36px; border: 2px solid var(--primary); border-radius: 50%; transform: translate(-50%, -50%); transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease, opacity 0.2s ease; opacity: 0.7; }
.custom-cursor.hover .cursor-ring { width: 50px; height: 50px; opacity: 1; }

/* Hide custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) { .custom-cursor { display:none; } }

/* ===== BACK TO TOP FAB ===== */
.fab { position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--primary); color: #fff; font-size: 20px; cursor: pointer; box-shadow: var(--shadow-xl); display: grid; place-items: center; opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.3s ease; z-index: 1400; }
.fab.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.fab:hover { background: var(--primary-hover); }

/* ===== REVEAL ANIMATIONS ===== */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.revealed { opacity: 1 !important; transform: translateY(0) !important; }

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); width: 28px; height: 44px; border: 2px solid var(--border-secondary); border-radius: 18px; background: transparent; cursor: pointer; }
.scroll-indicator::after { content: ''; position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; background: var(--border-secondary); border-radius: 2px; transform: translateX(-50%); animation: wheel 1.3s ease-in-out infinite; }
@keyframes wheel { 0%{opacity:0; transform: translate(-50%,0);} 50%{opacity:1;} 100%{opacity:0; transform: translate(-50%,12px);} }

/* ===== PARTICLES BACKGROUND ===== */
#particles-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.particle { position: absolute; width: 6px; height: 6px; background: radial-gradient(circle, rgba(59,130,246,0.8), rgba(59,130,246,0)); border-radius: 50%; animation: floatParticle linear infinite; }
@keyframes floatParticle { from { transform: translateY(0); } to { transform: translateY(-120vh); } }

/* ===== BUTTON RIPPLE (support JS) ===== */
.btn__ripple { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 0; height: 0; background: rgba(255,255,255,0.15); border-radius: 50%; transition: width 0.45s ease, height 0.45s ease; pointer-events: none; }

/* ===== SKILL BARS ===== */
.skill-bars { display: grid; gap: var(--space-md); }
.skill-bar { position: relative; height: 10px; background: rgba(148,163,184,0.2); border-radius: 999px; overflow: hidden; }
.skill-bar span { position: absolute; left: 12px; top: -26px; font-size: 1.2rem; color: var(--text-secondary); }
.skill-bar.animate::before { width: var(--progress, 0%); }
.skill-bar::before { content: ''; position: absolute; inset: 0; width: 0; background: linear-gradient(90deg, var(--accent), var(--primary)); box-shadow: 0 6px 12px rgba(59,130,246,0.25) inset; transition: width 1.2s ease; }

/* ===== THEMES ===== */
:root[data-theme="light"] { --bg-primary: #f8fafc; --bg-secondary: #ffffff; --bg-card: #ffffff; --text-primary: #0f172a; --text-secondary: #334155; --text-muted: #64748b; --border-primary: #e2e8f0; --border-secondary: #cbd5e1; }

/* ===== PROJECTS SECTION (cards grid) ===== */
.projects {
  padding: var(--space-3xl) 0;
}

.projects .projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-xl);
}

.projects .project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.projects .project-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 16px 32px rgba(0,0,0,0.18);
}

.projects .project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.projects .project-header h3 {
  margin: 0;
  font-size: 1.8rem;
}

/* Icon-only link on project cards */
.projects .external-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
  background: transparent;
  padding: 0;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

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

.projects .external-link svg {
  width: 18px;
  height: 18px;
}

/* Hide custom cursor styles if markup reappears accidentally */
.custom-cursor, .cursor-dot, .cursor-ring { display: none !important; }

