/* =========================================================
   DESIGN TOKENS
========================================================= */
:root {
  --bg: #0B0E14;
  --surface: #12151F;
  --surface-2: #171B27;
  --border: #232838;
  --text: #E6E8EB;
  --muted: #8891A3;
  --amber: #E8A33D;
  --amber-dim: #8A6425;
  --red: #D64545;
  --green: #4CAF7D;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Inter', system-ui, sans-serif;
  --maxw: 920px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
h1, h2, h3 { font-family: var(--mono); margin: 0; letter-spacing: -0.01em; }
sup { font-size: 0.6em; }

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

/* Subtle CRT scanline overlay — signature texture, kept faint */
.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background: repeating-linear-gradient(
    to bottom, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px,
    transparent 1px, transparent 3px
  );
  mix-blend-mode: overlay;
}

/* =========================================================
   NAV
========================================================= */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 64px);
  background: rgba(11,14,20,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav__logo { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }
.nav__name { color: var(--amber); }
.nav__links { display: flex; gap: clamp(14px, 3vw, 28px); font-family: var(--mono); font-size: 0.8rem; }
.nav__links a { text-decoration: none; color: var(--muted); transition: color 0.15s; }
.nav__links a:hover { color: var(--amber); }

/* =========================================================
   HERO
========================================================= */
.hero {
  max-width: var(--maxw);
  margin: clamp(32px, 8vw, 80px) auto 0;
  padding: 0 clamp(20px, 5vw, 24px) 40px;
  display: grid;
  gap: 36px;
}

.hero__terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
}
.hero__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot--red { background: #D64545; }
.dot--amber { background: #E8A33D; }
.dot--green { background: #4CAF7D; }
.hero__barTitle { margin-left: 8px; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }

.hero__body {
  margin: 0;
  padding: 22px clamp(16px, 4vw, 26px) 26px;
  font-family: var(--mono);
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  color: var(--green);
  white-space: pre-wrap;
  min-height: 190px;
}
.cursor {
  color: var(--amber);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.eyebrow {
  font-family: var(--mono); font-size: 0.78rem; color: var(--amber);
  text-transform: lowercase; margin: 0 0 10px;
}
.hero__intro h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 14px;
}
.hero__tagline { color: var(--muted); font-size: 1.02rem; max-width: 56ch; margin: 0 0 26px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 12px 20px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--amber); color: #1a1204; font-weight: 700; }
.btn--primary:hover { background: #f0b155; }
.btn--ghost { border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--amber); color: var(--amber); }

/* =========================================================
   SECTIONS
========================================================= */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 84px) clamp(20px, 5vw, 24px);
  border-top: 1px solid var(--border);
}
.section__log {
  font-family: var(--mono); font-size: 0.75rem; color: var(--amber-dim);
  margin: 0 0 8px;
}
.section h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  text-transform: lowercase;
  margin-bottom: 10px;
}
.section__sub { color: var(--muted); margin-top: -4px; max-width: 60ch; }

/* about */
.about__grid {
  display: grid; gap: 32px;
  grid-template-columns: 1.3fr 1fr;
  margin-top: 24px;
}
.about__text p { color: var(--text); margin: 0 0 14px; }
.about__stack { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; align-content: start; }
.about__stack li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
}
.stack__label { color: var(--muted); font-family: var(--mono); }
.stack__value { color: var(--text); text-align: right; }

/* timeline (parcours) */
.timeline {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  border-left: 1px solid var(--border);
}
.timeline__item {
  position: relative;
  padding: 2px 0 30px 26px;
}
.timeline__item::before {
  content: '';
  position: absolute;
  left: -5px; top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--amber);
}
.timeline__date {
  font-family: var(--mono); font-size: 0.75rem; color: var(--amber);
  margin-bottom: 6px;
}
.timeline__dur { color: var(--muted); }
.timeline__body h3 { font-size: 1rem; margin-bottom: 2px; }
.timeline__type {
  font-family: var(--mono); font-size: 0.65rem; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--border); border-radius: 4px;
  padding: 2px 6px; margin-left: 8px; vertical-align: middle;
}
.timeline__place { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); margin: 4px 0 8px; }
.timeline__body p { margin: 0 0 8px; color: var(--text); font-size: 0.92rem; }
.timeline__body ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 0.88rem; }
.timeline__body ul li { margin-bottom: 3px; }

.formation {
  margin-top: 34px;
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.formation__item {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
}
.formation__degree { font-family: var(--mono); font-size: 0.88rem; color: var(--text); }
.formation__school { font-size: 0.85rem; color: var(--muted); }
.formation__date { font-family: var(--mono); font-size: 0.72rem; color: var(--amber-dim); }

/* certifications */
.cert__list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 8px;
  flex: 1 1 320px;
}
.cert__list li {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 0.88rem;
}
.cert__name { color: var(--text); }
.cert__year { font-family: var(--mono); color: var(--muted); font-size: 0.78rem; }

/* projects */
.projects__grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 28px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color 0.15s;
}
.card:hover { border-color: var(--amber-dim); }
.card--planned { opacity: 0.7; border-style: dashed; }
.card__head { display: flex; justify-content: space-between; align-items: center; }
.card__status {
  font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px; letter-spacing: 0.04em;
}
.status--live { background: rgba(76,175,125,0.12); color: var(--green); }
.status--wip { background: rgba(232,163,61,0.12); color: var(--amber); }
.status--planned { background: rgba(136,145,163,0.12); color: var(--muted); }
.card__lang { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.card h3 { font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.card__tags { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 0; padding: 0; }
.card__tags li {
  font-family: var(--mono); font-size: 0.68rem; color: var(--muted);
  border: 1px solid var(--border); border-radius: 4px; padding: 2px 7px;
}
.card__link { margin-top: auto; font-family: var(--mono); font-size: 0.82rem; color: var(--amber); text-decoration: none; }
.card__link:hover { text-decoration: underline; }

/* thm */
.thm__panel {
  margin-top: 24px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
}
.thm__stat { display: flex; flex-direction: column; }
.thm__num { font-family: var(--mono); font-size: 1.7rem; font-weight: 700; color: var(--amber); }
.thm__label { font-size: 0.78rem; color: var(--muted); }
.thm__cta { margin-left: auto; }

/* cv */
.cv__panel {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
}
.cv__panel p { margin: 0; color: var(--muted); }

/* contact */
.contact__grid {
  margin-top: 24px;
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.contact__item {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.contact__item:hover { border-color: var(--amber-dim); transform: translateY(-2px); }
.contact__item--static { cursor: default; }
.contact__item--static:hover { border-color: var(--border); transform: none; }
.contact__label { font-family: var(--mono); font-size: 0.7rem; color: var(--amber); text-transform: uppercase; letter-spacing: 0.05em; }
.contact__value { font-size: 0.92rem; color: var(--text); word-break: break-word; }

/* footer */
.footer {
  text-align: center;
  padding: 36px 20px 50px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 720px) {
  .nav__links { gap: 12px; font-size: 0.72rem; }
  .about__grid { grid-template-columns: 1fr; }
  .thm__cta { margin-left: 0; width: 100%; text-align: center; }
  .cv__panel { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .nav__links { gap: 10px; font-size: 0.68rem; }
  .nav__logo { display: none; } /* laisse la place aux liens sur très petit écran */
}
