:root {
  --bg: #0b0d12;
  --bg-2: #11141b;
  --card: #151922;
  --line: #232837;
  --text: #e6e8ee;
  --muted: #9aa1b2;
  --accent: #f97316;
  --accent-2: #38bdf8;
  --radius: 14px;
  --mono: ui-monospace, "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(249, 115, 22, .14), transparent 60%),
    radial-gradient(700px 400px at -10% 30%, rgba(56, 189, 248, .08), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
b, strong { color: #fff; font-weight: 600; }
.wrap { width: min(1100px, 100% - 40px); margin-inline: auto; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(11, 13, 18, .75);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.logo span {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent); color: var(--bg); font-family: var(--mono); font-size: 14px;
}
.nav nav { display: flex; gap: 24px; align-items: center; }
.nav nav a { color: var(--muted); font-size: 15px; transition: color .2s; }
.nav nav a:hover { color: var(--text); }
.btn-small {
  color: var(--text) !important; border: 1px solid var(--line);
  padding: 6px 14px; border-radius: 999px;
}

/* Accroche */
.hero {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center;
  padding: 90px 0 60px;
}
.kicker { font-family: var(--mono); color: var(--accent); font-size: 14px; margin-bottom: 16px; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.12; letter-spacing: -.02em; margin-bottom: 20px; }
h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), #fbbf24);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { color: var(--muted); font-size: 1.1rem; max-width: 560px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px; font-weight: 600;
  background: var(--accent); color: var(--bg); transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(249, 115, 22, .3); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { box-shadow: none; border-color: var(--muted); }

.terminal {
  background: #0d1017; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .45); overflow: hidden;
}
.term-bar {
  display: flex; align-items: center; gap: 7px; padding: 12px 14px;
  background: var(--bg-2); border-bottom: 1px solid var(--line);
}
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 10px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.terminal pre {
  padding: 20px; font-family: var(--mono); font-size: 13.5px; line-height: 1.75;
  color: #c9d1e0; white-space: pre-wrap;
}
.terminal .p { color: var(--accent-2); }
.cursor { animation: blink 1s steps(1) infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }

/* Chiffres */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius); background: rgba(21, 25, 34, .6);
}
.stats div { padding: 22px; text-align: center; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats b { display: block; font-size: 1.8rem; color: var(--accent); }
.stats span { color: var(--muted); font-size: 14px; }

/* Sections */
.section { padding: 90px 0 0; }
h2 { font-size: 1.9rem; margin-bottom: 32px; display: flex; align-items: baseline; gap: 14px; }
h2 span { font-family: var(--mono); font-size: 1rem; color: var(--accent); }
h2 small { font-size: .95rem; color: var(--muted); font-weight: 500; }
h3 { font-size: 1.12rem; }
.badge {
  display: inline-block; font-family: var(--mono); font-size: 12px; font-weight: 500;
  padding: 2px 9px; border-radius: 999px; vertical-align: middle;
  background: rgba(249, 115, 22, .12); color: var(--accent); border: 1px solid rgba(249, 115, 22, .3);
}
.badge.live { background: rgba(56, 189, 248, .12); color: var(--accent-2); border-color: rgba(56, 189, 248, .3); }

/* Parcours */
.timeline { display: grid; gap: 20px; border-left: 2px solid var(--line); padding-left: 28px; }
.job {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 28px;
}
.job::before {
  content: ""; position: absolute; left: -37px; top: 32px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg);
}
.job-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.company { color: var(--muted); font-weight: 600; display: flex; gap: 10px; align-items: center; }
.job ul, .points { list-style: none; display: grid; gap: 8px; color: var(--muted); }
.job li, .points li { padding-left: 20px; position: relative; }
.job li::before, .points li::before { content: "›"; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }

/* Projets */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: border-color .2s, transform .2s;
}
.card:hover { border-color: rgba(249, 115, 22, .45); transform: translateY(-3px); }
.card.perso:hover { border-color: rgba(56, 189, 248, .45); }
.card.perso .badge { background: rgba(56, 189, 248, .12); color: var(--accent-2); border-color: rgba(56, 189, 248, .3); }
.card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card p { color: var(--muted); }
.link { color: var(--accent); font-size: 14px; font-weight: 600; white-space: nowrap; }
.link:hover { text-decoration: underline; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.tags span {
  font-family: var(--mono); font-size: 12px; padding: 4px 10px; border-radius: 6px;
  background: var(--bg-2); border: 1px solid var(--line); color: #c9d1e0;
}

/* Compétences */
.skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.skill { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.skill h3 { font-size: .95rem; color: var(--accent); margin-bottom: 8px; font-family: var(--mono); font-weight: 600; }
.skill p { color: var(--muted); font-size: 14.5px; }

/* Formation */
.edu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.edu-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.edu-item h3 { margin-bottom: 8px; }
.edu-item p { color: var(--muted); font-size: 14.5px; }
.edu-item.current { border-color: rgba(56, 189, 248, .4); }
.edu-item .badge { margin-bottom: 12px; }

/* Contact & pied de page */
.contact { text-align: center; padding-bottom: 40px; }
.contact h2 { justify-content: center; }
.contact .lead { margin-inline: auto; }
.contact .cta { justify-content: center; }
.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; margin-top: 60px; color: var(--muted); font-size: 14px; text-align: center; }

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 50px; gap: 36px; }
  .skills { grid-template-columns: repeat(2, 1fr); }
  .edu { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav nav a:not(.btn-small) { display: none; }
  .grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(2) { border-right: 0; }
  .stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .section { padding-top: 64px; }
  .timeline { padding-left: 18px; }
  .job { padding: 20px; }
  .job::before { left: -27px; top: 26px; }
  .card { padding: 20px; }
}
@media (max-width: 480px) {
  .skills { grid-template-columns: 1fr; }
  .terminal pre { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
}
