:root {
  --bg: #f6f4ef;
  --text: #16161a;
  --muted: #6b6b73;
  --line: #d9d6cc;
  --accent: #ff5a36;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1.0625rem;
}

/* Hero */
header,
main {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

header {
  padding-top: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}

header h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-role {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1rem;
}

.hero-recherche {
  color: var(--muted);
}

.hero-liens {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

a.bouton {
  border: 2px solid var(--text);
  border-radius: 999px;
  padding: 0.4rem 1.25rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

a.bouton:hover {
  border-color: var(--accent);
}

a.bouton-principal {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

a.bouton-principal:hover {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

header h1::after {
  content: ".";
  color: var(--accent);
}

/* Sections en 2 colonnes : titre à gauche, contenu à droite */
section {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  padding: 3rem 0;
  border-bottom: 1px solid var(--line);
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

section > *:not(h2) {
  grid-column: 2;
}

section > h2 {
  grid-column: 1;
  grid-row: 1;
}

section p {
  font-size: 1.125rem;
  max-width: 34em;
}

/* Projets */
article {
  padding: 1.5rem 0;
  border-top: 1px solid var(--text);
  transition: padding-left 0.25s ease;
}

article:hover {
  padding-left: 1rem;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h4 {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0.25rem 0 0.75rem;
}

article p {
  font-size: 1.05rem;
  color: var(--muted);
}

/* Compétences */
ul {
  list-style: none;
}

li {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.4;
  border-bottom: 1px solid var(--line);
  padding: 0.4rem 0;
  transition: color 0.2s, padding-left 0.25s;
}

li:hover {
  color: var(--accent);
  padding-left: 0.75rem;
}

/* Contact */
a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  transition: color 0.2s;
}

a:hover {
  color: var(--accent);
}

section#contact p {
  font-size: 1.0625rem;
}

main section:last-child {
  border-bottom: none;
  padding-bottom: 4rem;
}

@media (max-width: 700px) {
  section {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 3rem 0;
  }

  section > *:not(h2),
  section > h2 {
    grid-column: 1;
    grid-row: auto;
  }

  li {
    font-size: 1.5rem;
  }
}

/* Cartes projets envoyée par le JS */
article p {
  margin-bottom: 1rem;
}

.techs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.badge {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid var(--text);
  border-radius: 999px;
  padding: 0.1rem 0.7rem;
}

article a {
  font-size: 0.95rem;
  font-weight: 600;
}

/* Grille de cartes (projets et compétences) */
.grille {
  display: grid;
  gap: 1.5rem;
}

.carte {
  border-top: 1px solid var(--text);
  padding: 1.5rem 0;
}

.carte h3 {
  margin-bottom: 0.75rem;
}

/* Section École */
.ecole-carte {
  padding-top: 0;
}

section .ecole-nom {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

section .ecole-formation {
  font-size: 1.125rem;
  color: var(--muted);
  margin: 0.25rem 0 1rem;
}

.ecole-carte .badge {
  display: inline-block;
  color: var(--accent);
  border-color: var(--accent);
}

#projets .techs {
  margin-top: auto;
}
