/* =========================================================
   CSS Variables — Nephoos Brand
   Palette: terracotta / marron chaud, inspirée du logo
   ========================================================= */
:root {
  /* Light theme */
  --bg: #FAF6F2;
  --bg-secondary: #FFFFFF;
  --bg-glass: rgba(255, 252, 249, 0.80);
  --text-primary: #1C0E08;
  --text-secondary: #7A5C4E;
  --accent: #C85930;
  --accent-hover: #B04A24;
  --accent-rgb: 200, 89, 48;
  --accent-soft: rgba(200, 89, 48, 0.10);
  --border: rgba(28, 14, 8, 0.08);
  --tag-bg: rgba(28, 14, 8, 0.06);
  --tag-color: #3D1F14;
  --tag-hl-bg: rgba(200, 89, 48, 0.12);
  --tag-hl-color: #9C3D1C;
  --card-shadow: 0 2px 20px rgba(28, 14, 8, 0.06), 0 1px 4px rgba(28, 14, 8, 0.04);
  --card-shadow-hover: 0 12px 40px rgba(200, 89, 48, 0.12), 0 2px 8px rgba(28, 14, 8, 0.08);
  --nav-bg: rgba(250, 246, 242, 0.92);
  --orb-1: rgba(200, 89, 48, 0.18);
  --orb-2: rgba(180, 80, 30, 0.10);
  --orb-3: rgba(220, 130, 80, 0.12);
  --badge-bg: rgba(34, 197, 94, 0.10);
  --badge-color: #1a6b35;
  --badge-dot: #22c55e;
  --badge-neutral-bg: rgba(28, 14, 8, 0.06);
  --badge-neutral-color: #5A3A28;
  --logo-eye: #F5EDE4;
  --timeline-line: rgba(200, 89, 48, 0.20);
  --placeholder-bg: rgba(200, 89, 48, 0.05);
  --placeholder-border: rgba(200, 89, 48, 0.25);
  --placeholder-color: rgba(200, 89, 48, 0.5);
}

[data-theme="dark"] {
  --bg: #0D0705;
  --bg-secondary: #180D09;
  --bg-glass: rgba(24, 13, 9, 0.80);
  --text-primary: #F5EDE4;
  --text-secondary: #9E7A68;
  --accent: #E06B42;
  --accent-hover: #F07A50;
  --accent-rgb: 224, 107, 66;
  --accent-soft: rgba(224, 107, 66, 0.12);
  --border: rgba(245, 237, 228, 0.08);
  --tag-bg: rgba(245, 237, 228, 0.07);
  --tag-color: #D4B8A8;
  --tag-hl-bg: rgba(224, 107, 66, 0.15);
  --tag-hl-color: #F09070;
  --card-shadow: 0 2px 20px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 12px 40px rgba(224, 107, 66, 0.15), 0 2px 8px rgba(0, 0, 0, 0.4);
  --nav-bg: rgba(10, 6, 4, 0.92);
  --orb-1: rgba(224, 107, 66, 0.16);
  --orb-2: rgba(180, 70, 30, 0.10);
  --orb-3: rgba(240, 140, 80, 0.08);
  --badge-bg: rgba(34, 197, 94, 0.10);
  --badge-color: #4ade80;
  --badge-dot: #22c55e;
  --badge-neutral-bg: rgba(245, 237, 228, 0.07);
  --badge-neutral-color: #B8907A;
  --logo-eye: #1C0E08;
  --timeline-line: rgba(224, 107, 66, 0.20);
  --placeholder-bg: rgba(224, 107, 66, 0.05);
  --placeholder-border: rgba(224, 107, 66, 0.20);
  --placeholder-color: rgba(224, 107, 66, 0.4);
}

/* =========================================================
   Reset & Base
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

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

ul,
ol {
  list-style: none;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 120px 0;
}

/* =========================================================
   ACCESSIBILITY — Skip Link
   ========================================================= */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  background: var(--accent);
  color: #fff;
  padding: 0.65rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 1rem;
}

/* =========================================================
   NAVBAR
   ========================================================= */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s;
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.nav-logo:hover {
  opacity: 0.8;
}

.nav-logo strong {
  font-weight: 800;
}

.nav-logo-domain {
  color: var(--accent);
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
}

.nav-logomark {
  border-radius: 8px;
  transition: transform 0.3s;
  display: block;
  flex-shrink: 0;
}

.nav-logo:hover .nav-logomark {
  transform: rotate(-5deg) scale(1.05);
}

/* Logo theme switching */
body.light .logo-dark {
  display: none;
}

body.dark .logo-light {
  display: none;
}

/* Contact logomark */
.contact-logomark {
  border-radius: 18px;
  transition: transform 0.4s ease;
  display: block;
  margin: 0 auto;
}

.contact-logomark:hover {
  transform: rotate(-8deg) scale(1.06);
}

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

.nav-links a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
}

/* Nav controls group */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Lang segmented control */
.lang-segmented {
  display: flex;
  align-items: center;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  border-radius: 50px;
  height: 28px;
  padding: 0 0.75rem;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-secondary);
  transition: all 0.18s ease;
  letter-spacing: 0.05em;
}

.lang-btn[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.30);
}

.lang-btn[aria-pressed="false"]:hover {
  color: var(--text-primary);
}

/* Theme toggle — clean SVG version */
#theme-toggle {
  background: var(--tag-bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  color: var(--text-secondary);
  flex-shrink: 0;
}

#theme-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.20);
}

#theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Show/hide sun and moon based on theme */
body.light .icon-moon {
  display: none;
}

body.dark .icon-sun {
  display: none;
}

/* =========================================================
   MOBILE HAMBURGER MENU
   ========================================================= */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 36px;
  height: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 2px;
  border-radius: 6px;
  transition: background 0.2s;
}

.mobile-menu-btn:hover {
  background: var(--tag-bg);
}

.mobile-menu-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animated X when open */
.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Mobile dropdown menu */
.mobile-menu {
  display: none;
  background: var(--nav-bg);
  border-top: 1px solid var(--border);
  padding: 1rem 2rem 1.5rem;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.mobile-menu.open {
  display: block;
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

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

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-menu ul li a {
  display: block;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s, padding-left 0.2s;
}

.mobile-menu ul li:last-child a {
  border-bottom: none;
}

.mobile-menu ul li a:hover {
  color: var(--accent);
  padding-left: 0.5rem;
}

/* =========================================================
   HERO
   ========================================================= */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 100px 2rem 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  animation: float 10s ease-in-out infinite;
}

.orb-1 {
  width: 700px;
  height: 700px;
  background: var(--orb-1);
  top: -200px;
  left: -150px;
  animation-delay: 0s;
}

.orb-2 {
  width: 450px;
  height: 450px;
  background: var(--orb-2);
  top: 20%;
  right: -100px;
  animation-delay: -4s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: var(--orb-3);
  bottom: -80px;
  left: 30%;
  animation-delay: -7s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-25px) scale(1.03);
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  max-width: 1080px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.80rem;
  font-weight: 500;
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
}

.badge-green {
  background: var(--badge-bg);
  color: var(--badge-color);
  border: 1px solid rgba(34, 197, 94, 0.18);
}

.badge-neutral {
  background: var(--badge-neutral-bg);
  color: var(--badge-neutral-color);
  border: 1px solid var(--border);
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--badge-dot);
  border-radius: 50%;
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

.hero-name {
  font-size: clamp(3.2rem, 8vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin-bottom: 1.2rem;
}

.hero-name em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent) 0%, #E8935A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  min-height: 1.6em;
  display: flex;
  align-items: center;
  gap: 2px;
}

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

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2rem;
}

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

/* Hero visual */
.hero-visual {
  display: flex;
  justify-content: center;
}

.photo-frame {
  position: relative;
  width: 320px;
  height: 380px;
}

.hero-photo {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  object-fit: cover;
  object-position: center top;
  box-shadow: var(--card-shadow-hover);
}

/* One clean float keyframe — pure translateY, GPU-composited */
@keyframes badge-float {

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

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

.photo-badge {
  position: absolute;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--card-shadow);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: default;
  will-change: transform;
  transition: box-shadow 0.3s ease;
}

.photo-badge:hover {
  box-shadow: var(--card-shadow-hover);
}

/* EPITA — bas gauche */
.photo-badge-epita {
  bottom: 35px;
  left: -36px;
  animation: badge-float 3.6s ease-in-out infinite;
  animation-delay: 0s;
}

/* Nanjing — bas droite (évite le visage) */
.photo-badge-nanjing {
  bottom: 120px;
  right: -36px;
  animation: badge-float 4.2s ease-in-out infinite;
  animation-delay: -1.4s;
}

/* Apple — haut gauche */
.photo-badge-apple {
  top: 35px;
  left: -36px;
  animation: badge-float 3.9s ease-in-out infinite;
  animation-delay: -2.1s;
}

.scroll-hint {
  display: block;
  margin-top: 3rem;
  width: 32px;
  opacity: 0.35;
  animation: bounce 2.2s ease infinite;
  position: relative;
  z-index: 1;
}

.scroll-arrow {
  width: 18px;
  height: 18px;
  border-right: 2px solid var(--text-primary);
  border-bottom: 2px solid var(--text-primary);
  transform: rotate(45deg);
  margin: 4px auto;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }

  50% {
    transform: translateY(8px);
    opacity: 0.6;
  }
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: 980px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s ease;
  border: none;
  font-family: inherit;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 18px rgba(var(--accent-rgb), 0.30);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(var(--accent-rgb), 0.38);
}

.btn-ghost {
  background: var(--tag-bg);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg-secondary);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 1rem 1.8rem;
  font-size: 1rem;
}

/* =========================================================
   SECTION COMMON
   ========================================================= */
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.section-title {
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin-bottom: 2.5rem;
  color: var(--text-primary);
}

.accent {
  background: linear-gradient(135deg, var(--accent) 0%, #E8935A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =========================================================
   ABOUT
   ========================================================= */
#about {
  background: var(--bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: 0.97rem;
}

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

.about-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.chip {
  background: var(--tag-bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.35rem 0.8rem;
  border-radius: 50px;
  transition: border-color 0.2s, color 0.2s;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.about-right {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
}

.stat-row {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.75rem;
}

.stat {
  flex: 1;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.2rem;
}

.stat-plus {
  font-size: 1.4rem;
  color: var(--accent);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.currently {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--badge-bg);
  color: var(--badge-color);
  padding: 0.7rem 1rem;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid rgba(34, 197, 94, 0.15);
}

.currently-dot {
  width: 8px;
  height: 8px;
  background: var(--badge-dot);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-dot 2s ease infinite;
}

/* China photo */
.china-photo-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: 160px;
}

.china-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  border-radius: 16px;
  transition: transform 0.4s ease;
}

.china-photo-wrap:hover .china-photo {
  transform: scale(1.04);
}

.china-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 0.85rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: 0 0 16px 16px;
}

/* =========================================================
   EXPERIENCE — Timeline
   ========================================================= */
#experience {
  background: var(--bg-secondary);
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: var(--timeline-line);
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -1.85rem;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--bg-secondary);
  box-shadow: 0 0 0 2px var(--border);
  transition: background 0.2s;
}

.timeline-dot-accent {
  background: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-soft) !important;
}

.timeline-item:hover .timeline-dot {
  background: var(--accent);
}

.timeline-content {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.timeline-item:hover .timeline-content {
  box-shadow: var(--card-shadow);
  border-color: rgba(var(--accent-rgb), 0.2);
}

.timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.timeline-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.timeline-tag {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--tag-hl-bg);
  color: var(--tag-hl-color);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
}

.timeline-tag-accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.timeline-org {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.timeline-date {
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.timeline-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 0.5rem;
}

/* =========================================================
   PROJECTS
   ========================================================= */
#projects {
  background: var(--bg);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

/* HomeLab: full-width horizontal card */
#project-homelab {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
}

#project-homelab .project-title,
#project-homelab .project-desc,
#project-homelab .project-tags {
  flex: 1;
}

#project-homelab .project-header {
  margin-bottom: 0;
  flex-shrink: 0;
}


.project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(var(--accent-rgb), 0.25);
}

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

.project-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.project-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.project-badge {
  font-size: 0.70rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.2rem 0.55rem;
  border-radius: 50px;
}

.project-links a {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.project-links a:hover {
  color: var(--accent);
}

.project-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Project screenshot — phone portrait proportions */
.project-screenshot {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: 320px;
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.project-screenshot img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  transition: transform 0.35s ease;
}

.project-card:hover .project-screenshot img {
  transform: scale(1.02) translateY(-4px);
}

.project-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.project-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex-grow: 1;
  margin-bottom: 1rem;
}

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

/* Store Links Container */
.project-store-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
}

/* Store Button styles */
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  background-color: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

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

.store-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* CTA link on project cards */
.project-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.2s, opacity 0.2s;
}

.project-cta-link:hover {
  gap: 0.5rem;
  opacity: 0.8;
}

.project-cta-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.projects-cta {
  text-align: center;
}

/* =========================================================
   SKILLS
   ========================================================= */
#skills {
  background: var(--bg-secondary);
}

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

.skill-category {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.skill-category:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.skill-cat-icon {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.skill-cat-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.85rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Tags */
.tag {
  background: var(--tag-bg);
  color: var(--tag-color);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  border: 1px solid var(--border);
  transition: all 0.15s;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tag-highlight {
  background: var(--tag-hl-bg);
  color: var(--tag-hl-color);
  border-color: transparent;
  font-weight: 600;
}

.tag-sm {
  font-size: 0.75rem;
  padding: 0.22rem 0.6rem;
}

/* Certifications */
.certifs-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.certifs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.certif-badge {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.75rem 1.1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.certif-badge:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.10);
}

.certif-icon {
  font-size: 1.2rem;
}

.certif-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.certif-org {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* =========================================================
   CONTACT
   ========================================================= */
#contact {
  background: var(--bg);
}

.contact-center {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.contact-logo-wrap {
  margin-bottom: 1.5rem;
}

.contact-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

.contact-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  font-weight: 500;
  transition: opacity 0.2s;
}

.contact-links a:hover {
  opacity: 0.75;
}

.contact-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.separator {
  color: var(--border);
}

/* =========================================================
   FOOTER
   ========================================================= */
#footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-logo {
  font-weight: 700;
  font-size: 0.9rem;
}

.footer-domain {
  font-size: 0.78rem;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
}

.footer-copy {
  font-size: 0.80rem;
  color: var(--text-secondary);
}

.footer-year {
  font-size: 0.80rem;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

/* =========================================================
   SCROLL REVEAL
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* =========================================================
   RESPONSIVE — Tablet (900px)
   ========================================================= */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero-badges {
    justify-content: center;
  }

  .hero-actions {
    justify-content: center;
  }

  /* Centre le typewriter sous le nom (mobile uniquement) */
  .hero-title {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .photo-frame {
    width: 240px;
    height: 290px;
  }

  /* EPITA — bas gauche, légèrement rentré */
  .photo-badge-epita {
    left: -8px;
    bottom: 14px;
  }

  /* Nanjing — bas droite, sous le milieu pour ne pas cacher le visage */
  .photo-badge-nanjing {
    right: -8px;
    bottom: 60px;
    top: auto;
  }

  /* Apple — haut gauche */
  .photo-badge-apple {
    left: -8px;
    top: 14px;
  }

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

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

  /* HomeLab becomes vertical on smaller screens */
  #project-homelab {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-logo-domain {
    display: none;
  }
}

/* =========================================================
   RESPONSIVE — Mobile (768px)
   ========================================================= */
@media (max-width: 768px) {
  section {
    padding: 80px 0;
  }

  /* Hide desktop nav, show hamburger */
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .nav-logo-text {
    font-size: 0.82rem;
  }

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

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  /* Timeline adjustments */
  .timeline-header {
    flex-direction: column;
    gap: 0.3rem;
  }

  .timeline-date {
    white-space: normal;
  }

  /* Reduce photo badge overflow */
  .photo-badge {
    font-size: 0.70rem;
    padding: 0.35rem 0.65rem;
  }

  .photo-badge-epita {
    left: -4px;
  }

  .photo-badge-nanjing {
    right: -4px;
    bottom: 50px;
    top: auto;
  }

  .photo-badge-apple {
    left: -4px;
    top: 10px;
  }
}

/* =========================================================
   FORMATION (Education)
   ========================================================= */
.formation-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.formation-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.4rem 1.5rem;
  border-radius: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.formation-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.formation-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 0.1rem;
}

.formation-body {
  flex: 1;
  min-width: 0;
}

.formation-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}

.formation-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.formation-degree {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.formation-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* =========================================================
   VOLUNTEER
   ========================================================= */
.volunteer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.volunteer-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.4rem 1.5rem;
  border-radius: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.volunteer-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.volunteer-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 0.1rem;
}

.volunteer-body {
  flex: 1;
  min-width: 0;
}

.volunteer-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.volunteer-org {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.volunteer-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Certifs row — wrap for more items */
.certifs-row {
  flex-wrap: wrap;
}

/* =========================================================
   RESPONSIVE — Small Mobile (480px)
   ========================================================= */
@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    justify-content: center;
    width: 100%;
  }

  .btn-ghost {
    width: auto;
  }

  .certifs-row {
    flex-direction: column;
  }

  .formation-grid,
  .volunteer-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 1.25rem;
  }

  .photo-frame {
    width: 200px;
    height: 240px;
  }

  .photo-badge {
    font-size: 0.65rem;
    padding: 0.3rem 0.55rem;
  }

  .stat-row {
    gap: 1rem;
  }

  #hero {
    padding: 90px 1.25rem 60px;
  }

  .nav-inner {
    padding: 0 1.25rem;
  }

  .mobile-menu {
    padding: 1rem 1.25rem 1.5rem;
  }

  .section-title {
    margin-bottom: 1.5rem;
  }
}

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