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

:root {
  --bg: #1c1c1e;
  --bg2: #242426;
  --bg3: #2c2c2e;
  --accent: #c96a2a;
  --accent-dim: rgba(201, 106, 42, 0.10);
  --text: #e4e0da;
  --muted: #8a8480;
  --border: #333130;
}

:root.light {
  --bg: #f5f4f2;
  --bg2: #eceae7;
  --bg3: #e0deda;
  --accent: #c96a2a;
  --accent-dim: rgba(201, 106, 42, 0.10);
  --text: #1c1c1e;
  --muted: #5a5652;
  --border: #cac6c2;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem 2rem;
  height: 72px;
  background: rgba(28, 28, 30, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

:root.light nav { background: rgba(245, 244, 242, 0.9); }

.nav-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
}

.theme-toggle {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.theme-toggle:hover { color: var(--text); border-color: var(--muted); }

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ── SECTIONS ── */
section {
  padding: clamp(1.75rem, 4vw, 2.5rem) clamp(1.25rem, 5vw, 2rem);
  max-width: 820px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

h2 {
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.75rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  left: 0; bottom: -8px;
  width: 40px; height: 2px;
  background: var(--accent);
}

/* ── HERO ── */
#hero {
  padding: 6rem clamp(1.25rem, 5vw, 2rem) clamp(1.75rem, 4vw, 2.5rem);
}

.hero-name {
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-name span { color: var(--accent); }

.hero-sub {
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero-socials {
  display: flex;
  gap: 0.625rem;
}

.hero-social-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}

.hero-social-btn:hover {
  color: var(--text);
  border-color: var(--muted);
}

/* ── PARCOURS ── */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--border);
}

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

.timeline-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.timeline-sub {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── EXPÉRIENCE ── */
.exp-grid {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.exp-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  transition: border-color 0.2s, transform 0.2s;
}

.exp-card:hover {
  border-color: var(--muted);
  transform: translateX(4px);
}

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

.exp-role {
  font-size: 1.05rem;
  font-weight: 700;
}

.exp-date {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 20px;
}

.exp-company {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.exp-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  background: var(--bg3);
  color: var(--muted);
  border-radius: 4px;
  letter-spacing: 0.03em;
}

/* ── PROJETS ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.875rem;
}

.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}

.project-card:hover {
  border-color: var(--muted);
  transform: translateY(-4px);
}

a.project-card {
  cursor: pointer;
  position: relative;
}

a.project-card::after {
  content: 'Détails →';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: calc(120px + 2rem);
  background: rgba(0, 0, 0, 0);
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s;
}

a.project-card:hover::after { opacity: 1; }

div.project-card:hover {
  border-color: var(--border);
  transform: none;
  cursor: default;
}

.project-thumb {
  width: 100%;
  height: 120px;
  border-radius: 6px;
  margin-bottom: 0.875rem;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.project-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.project-title-arrow {
  font-size: 1.6rem;
  color: var(--muted);
  flex-shrink: 0;
  line-height: 1;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}

.project-links {
  display: flex;
  gap: 0.75rem;
}

.project-link {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: opacity 0.2s;
}

.project-link:hover { opacity: 0.7; }

.project-link::before { content: '→ '; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 820px;
  margin: 0 auto;
}

.footer-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 0.75rem;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}

.footer-link:hover { color: var(--text); border-color: var(--muted); }

/* ── FADE-IN ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; }
  .nav-links.open {
    display: flex;
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem clamp(1.25rem, 5vw, 2rem);
    gap: 1.25rem;
  }
  .burger { display: flex; }
}
