/*
Theme Name: fred.lt
Theme URI: https://fred.lt
Author: Fred
Description: Thème personnel monolithe — noir sur blanc, éditorial, pérenne. Sans page-builder.
Version: 0.1.0
Text Domain: fred-lt
Requires at least: 6.5
Requires PHP: 8.1
*/

:root {
  --paper: #fafaf8;
  --paper-pure: #ffffff;
  --ink: #0a0a0a;
  --ink-2: #3d3d3a;
  --ink-3: #75756f;
  --rule: #d9d9d4;

  --serif: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --step--1: 0.8rem;
  --step-0: 1.0625rem;
  --step-1: 1.33rem;
  --step-2: 1.66rem;
  --step-3: 2.08rem;
  --step-4: 2.6rem;
  --step-5: clamp(2.6rem, 6vw, 4.6rem);

  --u: 8px;
  --measure: 62ch;
  --gutter: clamp(20px, 4vw, 48px);
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111110;
    --paper-pure: #0a0a0a;
    --ink: #ecece8;
    --ink-2: #bdbdb6;
    --ink-3: #85857e;
    --rule: #2c2c29;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.65 var(--serif);
  font-feature-settings: "kern", "liga", "onum";
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); font-size: var(--step--1); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* En-tête */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding-block: 20px; flex-wrap: wrap; }
.wordmark { font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.04em; }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.nav span { color: var(--ink-3); margin-right: 6px; }

/* Hero */
.hero { padding-block: clamp(64px, 14vw, 160px) clamp(48px, 8vw, 96px); }
.hero h1 { font-size: var(--step-5); line-height: 1.04; letter-spacing: -0.025em; font-weight: 500; margin: 0 0 32px; max-width: 16ch; }
.hero p { max-width: var(--measure); font-size: var(--step-1); color: var(--ink-2); margin: 0 0 32px; }

/* Sections */
.section { padding-block: clamp(40px, 6vw, 80px); border-top: 1px solid var(--rule); }
.section-head { display: grid; grid-template-columns: 120px 1fr; gap: 24px; margin-bottom: 32px; }
.section-head h2 { font-size: var(--step-3); font-weight: 500; letter-spacing: -0.015em; margin: 0; line-height: 1.15; }

/* Frise */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding-block: 16px; border-top: 1px solid var(--rule); }
.timeline li:first-child { border-top: 0; }
.timeline .future { color: var(--ink-3); font-style: italic; }

/* Projets */
.list { list-style: none; margin: 0; padding: 0; }
.list a { display: grid; grid-template-columns: 120px 1fr auto; gap: 24px; padding-block: 18px; border-top: 1px solid var(--rule); text-decoration: none; align-items: baseline; }
.list a:hover h3 { text-decoration: underline; }
.list h3 { font-size: var(--step-1); font-weight: 500; margin: 0; }
.list p { margin: 4px 0 0; color: var(--ink-2); }

/* Newsletter */
.newsletter form { display: flex; gap: 0; max-width: 520px; border: 1px solid var(--ink); }
.newsletter input { flex: 1; border: 0; background: var(--paper-pure); color: var(--ink); font: inherit; padding: 14px 16px; min-width: 0; }
.newsletter button { border: 0; border-left: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: inherit; font-family: var(--mono); font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.06em; padding: 0 22px; cursor: pointer; }
.newsletter button:hover { background: var(--ink-2); }

/* Grille contributions */
.contrib { display: grid; grid-template-rows: repeat(7, 10px); grid-auto-flow: column; grid-auto-columns: 10px; gap: 3px; overflow: hidden; }
.contrib i { background: var(--rule); }
.contrib i[data-l="1"] { background: color-mix(in srgb, var(--ink) 25%, var(--paper)); }
.contrib i[data-l="2"] { background: color-mix(in srgb, var(--ink) 50%, var(--paper)); }
.contrib i[data-l="3"] { background: color-mix(in srgb, var(--ink) 75%, var(--paper)); }
.contrib i[data-l="4"] { background: var(--ink); }

/* Pied de page */
.site-footer { border-top: 1px solid var(--rule); padding-block: 40px; color: var(--ink-3); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .section-head, .timeline li, .list a { grid-template-columns: 1fr; gap: 6px; }
}
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(8px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.in { opacity: 1; transform: none; }
}
