/* ================================================================
   CV Gabriel Béras — site web
   Palette : hero #14202C / encre #1B2733 / gris #5B6570
             accent #C15E08 (fond clair) / #E8823D (fond sombre)
   Type    : Archivo (titres) / IBM Plex Sans (texte) / IBM Plex Mono (méta)
   ================================================================ */

/* ---------- Fonts (auto-hébergées) ---------- */
@font-face { font-family: "Archivo"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("assets/fonts/archivo-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("assets/fonts/archivo-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex"; font-weight: 400; font-style: italic; font-display: swap;
  src: url("assets/fonts/ibm-plex-sans-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Plex"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("assets/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("assets/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "PlexMono"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "PlexMono"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --hero:          #14202C;
  --hero-soft:     #1D2C3B;
  --ink:           #1B2733;
  --muted:         #5B6570;
  --accent:        #C15E08;
  --accent-bright: #E8823D;
  --line:          #E5E2DC;
  --paper:         #FFFFFF;
  --wash:          #F7F6F3;
  --display: "Archivo", "Segoe UI", system-ui, sans-serif;
  --body:    "Plex", "Segoe UI", system-ui, sans-serif;
  --mono:    "PlexMono", ui-monospace, "Cascadia Mono", monospace;
}

/* ---------- Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

.mono { font-family: var(--mono); }
.accent { color: var(--accent); }
strong { font-weight: 600; }

a { color: inherit; text-decoration: none; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 28px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(20, 32, 44, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-brand {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  display: flex; align-items: center; gap: 10px;
}
.nav-mono {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-bright);
  border: 1px solid rgba(232, 130, 61, 0.5);
  padding: 3px 6px;
}

.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.2s;
}
.nav-links a:hover { color: #fff; }

.nav-pdf {
  font-family: var(--mono);
  font-size: 13px !important;
  color: var(--accent-bright) !important;
  border: 1px solid rgba(232, 130, 61, 0.5);
  padding: 7px 14px;
  transition: background 0.2s, color 0.2s;
}
.nav-pdf:hover { background: var(--accent-bright); color: var(--hero) !important; }

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(rgba(245, 243, 239, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 243, 239, 0.035) 1px, transparent 1px),
    radial-gradient(1000px 500px at 85% -10%, var(--hero-soft), transparent 60%),
    var(--hero);
  background-size: 34px 34px, 34px 34px, auto, auto;
  color: #F5F3EF;
  padding: 150px 0 90px;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}
.hero-text { min-width: 0; }

.hero-avatar {
  flex: 0 0 auto;
  width: 216px; height: 216px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent-bright);
  box-shadow: 0 0 0 8px rgba(232, 130, 61, 0.12);
  background: #fff;
}
.hero-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }

.hero-kicker {
  font-size: 13px;
  color: var(--accent-bright);
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 7vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.hero .surname { text-transform: uppercase; letter-spacing: 0.02em; }

.hero-headline {
  margin-top: 14px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(18px, 3vw, 24px);
  color: var(--accent-bright);
}
.hero-sep { color: rgba(245, 243, 239, 0.4); }

.hero-sub {
  margin-top: 6px;
  font-size: 13.5px;
  color: rgba(245, 243, 239, 0.6);
}

.hero-type {
  margin-top: 32px;
  font-size: 14px;
  color: rgba(245, 243, 239, 0.85);
  min-height: 22px;
}
.cursor {
  display: inline-block;
  width: 8px; height: 16px;
  margin-left: 3px;
  vertical-align: -2px;
  background: var(--accent-bright);
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-contact {
  list-style: none;
  margin-top: 36px;
  display: flex; flex-wrap: wrap;
  gap: 8px 0;
  font-size: 14px;
  color: rgba(245, 243, 239, 0.75);
}
.hero-contact li { display: flex; align-items: center; }
.hero-contact li + li::before { content: "·"; margin: 0 12px; color: rgba(245, 243, 239, 0.3); }
.hero-contact a { border-bottom: 1px solid rgba(245, 243, 239, 0.25); transition: color 0.2s, border-color 0.2s; }
.hero-contact a:hover { color: var(--accent-bright); border-bottom-color: var(--accent-bright); }

/* ---------- Sections ---------- */
.section { padding: 72px 0 8px; }
main .section:last-of-type { padding-bottom: 72px; }

.label {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.lede { font-size: 17.5px; max-width: 760px; }
.lede + .lede { margin-top: 14px; }
.accent-line {
  font-weight: 500;
  border-left: 3px solid var(--accent);
  padding-left: 16px;
}

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 8px; bottom: 8px;
  width: 1px;
  background: var(--line);
}

.tl-item { position: relative; margin-bottom: 40px; }
.tl-item:last-child { margin-bottom: 0; }

.tl-marker {
  position: absolute;
  left: -26px; top: 7px;
  width: 11px; height: 11px;
  background: var(--paper);
  border: 2px solid var(--accent);
  border-radius: 50%;
}

.tl-when { font-size: 13px; color: var(--accent); margin-bottom: 4px; }

.tl-card h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
}

.tl-org { margin-top: 2px; font-size: 14.5px; color: var(--muted); font-weight: 500; }

.tl-points { list-style: none; margin-top: 14px; }
.tl-points li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  font-size: 15px;
  max-width: 760px;
}
.tl-points li::before {
  content: "—";
  position: absolute; left: 0;
  color: var(--accent);
}

.tl-note { margin-top: 10px; font-size: 13.5px; font-style: italic; color: var(--muted); }

/* ---------- Compétences ---------- */
.section-dark {
  background:
    linear-gradient(rgba(245, 243, 239, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 243, 239, 0.03) 1px, transparent 1px),
    var(--hero);
  background-size: 34px 34px;
  color: #F5F3EF;
  margin-top: 64px;
  padding: 72px 0;
}
.section-dark .label {
  color: var(--accent-bright);
  border-bottom-color: rgba(245, 243, 239, 0.15);
}
.section-dark .skill-group h3 { color: #fff; }
.section-dark .hist { color: rgba(245, 243, 239, 0.5); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px 36px;
}

.skill-group h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 12px;
}
.skill-group .hist { font-weight: 400; color: var(--muted); font-size: 13px; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-family: var(--mono);
  font-size: 12.5px;
  color: #EDEAE4;
  background: rgba(245, 243, 239, 0.06);
  border: 1px solid rgba(245, 243, 239, 0.16);
  padding: 5px 10px;
  border-radius: 3px;
  transition: border-color 0.2s, background 0.2s;
}
.chips li:hover {
  border-color: var(--accent-bright);
  background: rgba(232, 130, 61, 0.1);
}

.skill-ai .chips li { border-color: rgba(232, 130, 61, 0.55); }

/* ---------- Projets ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.project-card {
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  padding: 24px 26px 20px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(27, 39, 51, 0.08);
}

.project-card h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
}
.project-card p { margin-top: 10px; font-size: 14.5px; }
.project-stack { font-size: 12px !important; color: var(--muted); margin-top: 14px !important; }

/* ---------- Langues / Formation ---------- */
.section-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}
.plain { list-style: none; font-size: 15px; }
.plain li { margin-bottom: 8px; }

.cred {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 14px;
  margin-bottom: 14px !important;
}
.cred-meta { font-size: 12.5px; color: var(--muted); }
.cred-meta a { color: var(--accent); border-bottom: 1px solid rgba(193, 94, 8, 0.4); }
.cred-meta a:hover { border-bottom-color: var(--accent); }

/* ---------- Colophon ---------- */
.colophon {
  background: var(--hero);
  color: rgba(245, 243, 239, 0.6);
  padding: 34px 0;
}
.colophon p { font-size: 12.5px; }
.colophon .accent { color: var(--accent-bright); }
.colophon-links { margin-top: 10px; }
.colophon-links a { color: rgba(245, 243, 239, 0.8); border-bottom: 1px solid rgba(245, 243, 239, 0.3); }
.colophon-links a:hover { color: var(--accent-bright); border-bottom-color: var(--accent-bright); }

/* ---------- Reveal (scroll) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Focus / a11y ---------- */
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .cursor { animation: none; }
  .project-card, .project-card:hover { transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav { padding: 12px 18px; }
  .nav-links { gap: 14px; }
  .nav-links a:not(.nav-pdf) { display: none; }
  .wrap { padding: 0 20px; }
  .hero { padding: 120px 0 64px; }
  .section { padding: 52px 0 8px; }
  .section-dark { padding: 52px 0; margin-top: 48px; }
  .hero-inner { flex-direction: column-reverse; align-items: flex-start; gap: 28px; }
  .hero-avatar { width: 132px; height: 132px; }
  .section-duo { grid-template-columns: 1fr; gap: 8px; }
  .timeline { padding-left: 22px; }
  .tl-marker { left: -22px; }
}

/* ---------- Print de secours ----------
   Le vrai PDF est généré depuis print.html ; si quelqu'un imprime
   la page web, on neutralise le superflu. */
@media print {
  .nav, .hero-type, .cursor { display: none; }
  .hero { background: #fff; color: var(--ink); padding: 0 0 20px; }
  .hero-headline { color: var(--accent); }
  .hero-sub, .hero-contact { color: var(--muted); }
  .reveal { opacity: 1; transform: none; }
  .section, .section-dark { padding: 20px 0; margin-top: 0; background: #fff; color: var(--ink); }
  .colophon { background: #fff; color: var(--muted); }
}
