:root {
  --bg: #faf9fc;
  --surface: rgba(255, 255, 255, 0.93);
  --surface-hover: #ffffff;
  --border: #e9e5f3;
  --border-strong: #d5cce9;
  --text: #181426;
  --text-muted: #524c66;
  --text-subtle: #736c8a;
  --pill-bg: #f4f1fa;
  --pill-text: #2c2540;
  --accent: #7c5cbf;
  --accent-soft: #f5f1fc;
  --shadow:
    0 22px 54px -20px rgba(124, 92, 191, 0.24),
    0 4px 16px -6px rgba(124, 92, 191, 0.1);
  --shadow-soft:
    0 8px 22px -12px rgba(124, 92, 191, 0.2),
    0 2px 6px rgba(124, 92, 191, 0.08);
  --shadow-card:
    0 14px 30px -12px rgba(124, 92, 191, 0.3),
    0 4px 12px -4px rgba(124, 92, 191, 0.14);
  --radius-sheet: 28px;
  --radius-card: 18px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  position: relative;
  overflow-x: hidden;
}

/* Halo lumineux subtil en haut de page */
.ambient-glow {
  position: fixed;
  inset: 0 0 auto 0;
  height: 400px;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 0%, rgba(221, 214, 254, 0.52), transparent 44%),
    radial-gradient(circle at 88% 0%, rgba(233, 213, 255, 0.48), transparent 42%);
}

.page {
  max-width: 940px;
  margin: 0 auto;
  padding: 52px 24px 80px;
}

.sheet {
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(233, 229, 243, 0.85);
  border-radius: var(--radius-sheet);
  box-shadow: var(--shadow);
  padding: 56px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* En-tête / Hero */
.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-subtle);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.28);
  flex-shrink: 0;
}

.hero-name {
  margin: 0;
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.hero-tagline {
  margin: 0;
  max-width: 58ch;
  font-size: 0.96rem;
  color: var(--text-muted);
}

.hero-tagline strong {
  color: var(--text);
  font-weight: 600;
}

.hero-location {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-subtle);
}

/* Avatar */
.avatar-wrap {
  flex-shrink: 0;
}

.avatar,
.avatar-fallback {
  width: 108px;
  height: 108px;
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 26px -10px rgba(124, 92, 191, 0.28);
}

.avatar {
  display: block;
  object-fit: cover;
  background: var(--pill-bg);
}

.avatar-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
}

/* Badges / Pills */
.pill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill-text);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid transparent;
}

.pill-muted {
  background: #faf9fc;
  border-color: var(--border);
  color: var(--text-muted);
}

.pill-sm {
  padding: 3px 9px;
  font-size: 0.72rem;
  background: var(--pill-bg);
  color: var(--text-muted);
}

.pill-accent {
  padding: 3px 9px;
  font-size: 0.72rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(124, 92, 191, 0.2);
}

/* Boutons réseaux */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    color 0.16s ease;
}

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

.social-btn:focus-visible,
.project-card:focus-visible,
.section-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Sections */
.section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 44px;
  padding-top: 44px;
  border-top: 1px solid #d6caef;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  font-size: clamp(1.45rem, 2.2vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-subtle);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

.body-text {
  margin: 0;
  max-width: 68ch;
  font-size: 0.96rem;
  line-height: 1.75;
  color: var(--text-muted);
}

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

/* Expérience & Formation — sans contours de card, lecture aérée */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.entry-card {
  padding: 6px 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: flex-start;
  gap: 22px;
}

.entry-card + .entry-card {
  margin-top: 24px;
  padding-top: 26px;
  border-top: 1px dashed rgba(213, 204, 233, 0.65);
}

.entry-logo-wrap {
  width: 52px;
  height: 44px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 3px;
}

.entry-logo {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.entry-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.entry-heading-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.entry-title {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 600;
  color: var(--text);
}

.entry-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-subtle);
  white-space: nowrap;
}

.entry-role {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.entry-desc {
  margin: 2px 0 0;
  max-width: 64ch;
  font-size: 0.9rem;
  line-height: 1.68;
  color: var(--text-muted);
}

.entry-desc strong,
.entry-bullets strong {
  color: var(--text);
  font-weight: 600;
}

.entry-bullets {
  margin: 6px 0 0;
  padding-left: 18px;
  max-width: 64ch;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.inline-link {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(124, 92, 191, 0.35);
  transition: border-color 0.15s ease;
}

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

.entry-meta {
  margin: 4px 0 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-subtle);
}

/* Compétences — ouvert, sans cards */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 44px;
}

.skill-group {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-group-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

/* Projets GitHub — ouvert, sans cards, survol subtil */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 44px;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  margin: -14px -16px;
  border-radius: 16px;
  border: none;
  background: transparent;
  box-shadow: none;
  text-decoration: none;
  color: inherit;
  transition:
    background-color 0.18s ease,
    transform 0.18s ease;
}

.project-card:hover {
  background: rgba(245, 241, 252, 0.75);
  transform: translateY(-2px);
}

.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-title {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  transition: color 0.15s ease;
}

.project-card:hover .project-title {
  color: var(--accent);
}

.project-arrow {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-subtle);
  flex-shrink: 0;
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease;
}

.project-card:hover .project-arrow {
  background: var(--accent-soft);
  color: var(--accent);
  transform: translate(2px, -2px);
}

.project-desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-muted);
  flex: 1;
}

.project-card .pill-list {
  margin-top: 4px;
  padding-top: 0;
  border-top: none;
}

/* Icônes */
.icon-xs {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.icon-sm {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Footer */
.footer {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid #d6caef;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-subtle);
}

.footer-sep {
  opacity: 0.5;
}

/* Responsive */
@media (max-width: 720px) {
  .page {
    padding: 20px 14px 44px;
  }

  .sheet {
    padding: 32px 24px;
    border-radius: 22px;
    gap: 0;
  }

  .section {
    margin-top: 32px;
    padding-top: 32px;
  }

  .footer {
    margin-top: 32px;
  }

  .hero {
    flex-direction: column-reverse;
    gap: 22px;
  }

  .avatar,
  .avatar-fallback {
    width: 88px;
    height: 88px;
    border-radius: 18px;
  }

  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .entry-card {
    gap: 14px;
    padding: 4px 0;
  }

  .entry-card + .entry-card {
    margin-top: 20px;
    padding-top: 22px;
  }

  .entry-logo-wrap {
    width: 44px;
    height: 38px;
  }

  .project-card {
    padding: 12px;
    margin: -12px;
  }
}

/* Impression / Export PDF */
@media print {
  .ambient-glow {
    display: none;
  }

  body {
    background: #ffffff;
  }

  .page {
    padding: 0;
    max-width: none;
  }

  .sheet {
    border: none;
    box-shadow: none;
    padding: 0;
    background: transparent;
  }

  .project-card {
    break-inside: avoid;
    box-shadow: none;
  }
}
