:root {
  --bg: #faf7f2;
  --ink: #2b2620;
  --muted: #8a7f70;
  --accent: #b3542e;
  --code-bg: #f0eae0;
  --rule: color-mix(in srgb, var(--muted) 30%, transparent);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1916;
    --ink: #e8e2d8;
    --muted: #93897b;
    --accent: #e07a4a;
    --code-bg: #262119;
  }
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  min-height: 100svh;
  padding: 2rem;
}

/* --- Page d'accueil : bloc centré --- */
body.home { display: grid; place-items: center; }
body.home main { max-width: 34rem; text-align: center; }

h1 {
  font-size: clamp(2.8rem, 9vw, 4.5rem);
  font-weight: normal;
  letter-spacing: 0.04em;
}
body.home h1::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 2px;
  background: var(--accent);
  margin: 1.4rem auto;
}

p.def {
  color: var(--muted);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
}
p.def b { color: var(--ink); font-style: normal; font-weight: normal; }

p.status,
.label {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
p.status { margin-top: 3rem; }

/* --- Cartes --- */
.work {
  margin-top: 3.5rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--rule);
  text-align: left;
}
.work h2 {
  font-size: 0.8rem;
  font-weight: normal;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  margin-bottom: 1rem;
}
a.card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 1.1rem 1.2rem;
  border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
  border-radius: 8px;
  transition: border-color 0.15s ease;
}
a.card + a.card { margin-top: 0.8rem; }
a.card:hover { border-color: var(--accent); }
.card .name { font-size: 1.05rem; }
.card .name span { color: var(--accent); }
.card .desc {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
}

/* --- Articles --- */
article, body.list main {
  max-width: 38rem;
  margin: 0 auto;
  padding: 1rem 0 5rem;
}

.nav {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 3rem;
}
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--accent); }

article h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
}
article .meta {
  margin-top: 1rem;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}
article h2 {
  font-size: 1.35rem;
  font-weight: normal;
  margin: 3rem 0 1rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
}
article h3 {
  font-size: 1.08rem;
  font-weight: normal;
  font-style: italic;
  margin: 2rem 0 0.7rem;
  color: var(--accent);
}
article p, article li {
  line-height: 1.75;
  font-size: 1.02rem;
}
article p { margin: 1.1rem 0; }
article ul, article ol { margin: 1.1rem 0 1.1rem 1.4rem; }
article li { margin: 0.45rem 0; }
article a { color: var(--accent); }

article blockquote {
  margin: 1.6rem 0;
  padding: 0.2rem 0 0.2rem 1.2rem;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}

code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.86em;
  background: var(--code-bg);
  padding: 0.12em 0.35em;
  border-radius: 3px;
}
pre {
  background: var(--code-bg);
  border-radius: 6px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  margin: 1.4rem 0;
  line-height: 1.6;
}
pre code {
  background: none;
  padding: 0;
  font-size: 0.84rem;
}

.callout {
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin: 1.8rem 0;
  font-size: 0.96rem;
}
.callout strong { font-weight: normal; color: var(--accent); }

.endnote {
  margin-top: 4rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.7;
}
.endnote a { color: var(--accent); }

/* --- Liste d'articles --- */
body.list h1 { font-size: clamp(2rem, 6vw, 2.8rem); margin-bottom: 2.5rem; }
.post-link {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 1.3rem 0;
  border-top: 1px solid var(--rule);
}
.post-link:hover .title { color: var(--accent); }
.post-link .title { font-size: 1.15rem; line-height: 1.4; }
.post-link .date {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}
.post-link .excerpt {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.94rem;
  font-style: italic;
  line-height: 1.6;
}
