:root {
  --bg: #050816;
  --bg-soft: #0b1020;
  --card: #111827;
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.15);
  --text: #e5e7eb;
  --text-soft: #9ca3af;
  --border: #1f2937;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
  --shadow-card: 0 14px 30px rgba(15, 23, 42, 0.7);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #1e293b 0, #020617 45%, #000 100%);
  color: var(--text);
}

/* Topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 7vw;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.8), transparent);
  backdrop-filter: blur(18px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.logo-dot {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #a855f7, #4f46e5);
  box-shadow: 0 0 18px rgba(79, 70, 229, 0.9);
}

.logo-text {
  font-size: 1.05rem;
}

.nav {
  display: flex;
  gap: 20px;
  font-size: 0.95rem;
}

.nav a {
  color: var(--text-soft);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(to right, #a855f7, #4f46e5);
  transition: width 0.2s ease;
}

.nav a:hover {
  color: #f9fafb;
}

.nav a:hover::after {
  width: 100%;
}

/* Hero */

.hero {
  padding: 70px 7vw 40px;
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.hero-text {
  max-width: 700px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #c7d2fe;
  font-size: 0.8rem;
  border: 1px solid rgba(129, 140, 248, 0.4);
}

.hero h1 {
  margin-top: 16px;
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  margin-top: 14px;
  font-size: 0.98rem;
  color: var(--text-soft);
  max-width: 520px;
}

.hero-actions {
  margin-top: 22px;
  display: flex;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 17px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn.primary {
  background: linear-gradient(135deg, #4f46e5, #a855f7);
  color: white;
  box-shadow: 0 16px 35px rgba(79, 70, 229, 0.55);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(79, 70, 229, 0.75);
}

.btn.ghost {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(148, 163, 184, 0.5);
  color: var(--text);
}

.btn.ghost:hover {
  background: rgba(15, 23, 42, 0.9);
  transform: translateY(-1px);
}

.hero-meta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--text-soft);
}

/* Sections */

.section {
  padding: 40px 7vw 10px;
}

.section-header {
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.section-header p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-soft);
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 26px;
}

.about-grid p {
  font-size: 0.98rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.about-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-card {
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.2), rgba(15, 23, 42, 0.9));
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-card);
}

.info-card h3 {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 1rem;
}

.info-card p,
.info-card li {
  font-size: 0.9rem;
  color: var(--text-soft);
}

.info-card ul {
  margin: 0;
  padding-left: 18px;
}

/* Filters */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text-soft);
  font-size: 0.8rem;
  cursor: pointer;
}

.filter-btn.active {
  background: var(--accent-soft);
  color: #e0e7ff;
  border-color: #4f46e5;
}

/* Projects */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.project-card {
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, #020617, #020617);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}

.project-pill {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.72rem;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: var(--text-soft);
}

.project-card h3 {
  margin-top: 0;
  margin-bottom: 4px;
  font-size: 1rem;
}

.project-year {
  font-size: 0.78rem;
  color: var(--text-soft);
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text-soft);
  margin: 8px 0;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.project-tag {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(55, 65, 81, 0.9);
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 0.8rem;
}

.project-link {
  color: #c4b5fd;
  text-decoration: none;
}

.project-link:hover {
  text-decoration: underline;
}

/* Skills */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.skill-column {
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(31, 41, 55, 0.9);
  padding: 14px 16px;
  box-shadow: var(--shadow-soft);
}

.skill-column h3 {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 0.98rem;
}

.skill-column ul {
  margin: 0;
  padding-left: 16px;
}

.skill-column li {
  font-size: 0.88rem;
  color: var(--text-soft);
}

/* Contact */

.contact-card {
  margin-top: 4px;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.18), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(55, 65, 81, 0.9);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
}

.contact-card p {
  font-size: 0.95rem;
  color: var(--text-soft);
}

.contact-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.contact-card a {
  color: #a5b4fc;
  text-decoration: none;
}

.contact-card a:hover {
  text-decoration: underline;
}

/* Footer */

.footer {
  margin-top: 40px;
  padding: 14px 7vw 20px;
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.footer a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.8rem;
}

.footer a:hover {
  text-decoration: underline;
}

/* Responsive */

@media (max-width: 900px) {
  .topbar {
    padding-inline: 5vw;
  }

  .nav {
    display: none;
  }

  .hero {
    padding-top: 50px;
  }

  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .hero {
    padding-inline: 5vw;
  }
  .section {
    padding-inline: 5vw;
  }
}

/* ----- Légende du diaporama ----- */

.caption {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 10px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.65), rgba(0,0,0,0));
  color: #f9f9f9;
  font-size: 0.9rem;
  text-align: left;
  box-sizing: border-box;
  border-radius: 0 0 14px 14px;
}

