/* =========================================================================
   SHARED SHELL — defined once, inherited by every page.
   Design principle: OVERFLOW + CONTRAST (the grand écart).
   Refined editorial serif against plain technical mono.
   Calm space against dense bursts. One hot accent, used sparingly.
   ========================================================================= */

:root {
  /* Palette — ink & paper with a single "ember" accent and a cool counter-accent.
     Not Hugo's red/black; not the cream-serif-terracotta AI default. */
  --paper:      #faf8f3;   /* warm off-white, but quieter than the trendy cream */
  --paper-deep: #f0ece2;
  --ink:        #1a1714;   /* near-black, warm */
  --ink-soft:   #4a4540;
  --ink-faint:  #8a8278;
  --ember:      #d4521f;   /* the hot accent — burnt orange, used with restraint */
  --cool:       #2f4858;   /* the counter — deep slate-teal, the "other hat" */
  --line:       #ddd6c8;

  --serif: "Georgia", "Iowan Old Style", "Palatino", serif;
  --mono:  "SF Mono", "JetBrains Mono", "Menlo", "Consolas", monospace;

  --measure: 38rem;
  --maxw: 72rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---- Layout shell ---- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

/* =========================================================================
   HEADER — menu line + email capture worked INTO the header (per Mireille).
   ========================================================================= */
header.site {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky; top: 0; z-index: 50;
}
.bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem 1.5rem; max-width: var(--maxw); margin: 0 auto;
}
.brand {
  font-family: var(--mono);
  font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 600; text-decoration: none; color: var(--ink);
  white-space: nowrap;
}
.brand span { color: var(--ember); }

nav.menu { display: flex; align-items: center; gap: 1.5rem; }
nav.menu a {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .08em;
  text-transform: uppercase; text-decoration: none; color: var(--ink-soft);
  padding: .25rem 0; border-bottom: 2px solid transparent; transition: .15s;
}
nav.menu a:hover, nav.menu a[aria-current="page"] { color: var(--ink); border-color: var(--ember); }

/* the persistent JOIN button — stays visible even when menu collapses on mobile */
.join-btn {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .08em;
  text-transform: uppercase; font-weight: 600;
  background: var(--ink); color: var(--paper);
  text-decoration: none; padding: .55rem .9rem; border-radius: 2px;
  white-space: nowrap; transition: .15s;
}
.join-btn:hover { background: var(--ember); }

/* FR/EN language toggle — sits in the header bar, deliberately quiet */
.lang-toggle {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-soft);
  text-decoration: none; padding: .55rem .4rem;
  border-bottom: 1px solid transparent; transition: .15s; white-space: nowrap;
}
.lang-toggle:hover { color: var(--ink); border-color: var(--ember); }

/* email capture line UNDER the menu line */
.capture-strip {
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
}
.capture-strip .inner {
  max-width: var(--maxw); margin: 0 auto; padding: .7rem 1.5rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.capture-strip p {
  margin: 0; font-family: var(--mono); font-size: .8rem;
  letter-spacing: .03em; color: var(--ink-soft);
}
.capture-strip form { display: flex; gap: .5rem; flex: 1; min-width: 16rem; max-width: 30rem; }
.capture-strip input[type=email] {
  flex: 1; font-family: var(--mono); font-size: .85rem;
  padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 2px;
  background: var(--paper); color: var(--ink);
}
.capture-strip input[type=email]:focus { outline: 2px solid var(--ember); outline-offset: 1px; }
.capture-strip button {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .06em;
  text-transform: uppercase; font-weight: 600; cursor: pointer;
  background: var(--ember); color: #fff; border: 0; border-radius: 2px;
  padding: .5rem .9rem; transition: .15s;
}
.capture-strip button:hover { background: var(--ink); }

/* mobile menu toggle */
.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.menu-toggle svg { display: block; }

@media (max-width: 720px) {
  nav.menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: .5rem 1.5rem 1rem;
  }
  nav.menu.open { display: flex; }
  nav.menu a { padding: .6rem 0; width: 100%; }
  .menu-toggle { display: block; }
  /* JOIN stays visible next to the hamburger */
}

/* =========================================================================
   HERO — the thesis. The grand écart, stated.
   ========================================================================= */
.hero { padding: 5.5rem 0 4rem; }
.hero .eyebrow {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ember); margin: 0 0 1.5rem;
}
.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.05;
  letter-spacing: -.02em; margin: 0 0 1.5rem; max-width: 20ch;
}
.hero h1 em { font-style: italic; color: var(--ember); }
.hero .lede {
  font-size: clamp(1.15rem, 2.4vw, 1.4rem); color: var(--ink-soft);
  max-width: var(--measure); margin: 0;
}

/* the contrast device: a mono "spec line" under the serif hero */
.spec-line {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .04em;
  color: var(--ink-faint); margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 1.5rem;
}
.spec-line b { color: var(--ink); font-weight: 600; }

/* =========================================================================
   SECTIONS
   ========================================================================= */
section.block { padding: 3.5rem 0; border-top: 1px solid var(--line); }
.section-label {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--cool); margin: 0 0 1.75rem;
}
h2.big {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.1;
  letter-spacing: -.015em; margin: 0 0 1.25rem; max-width: 24ch;
}
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.1rem; }
.prose p:last-child { margin-bottom: 0; }
.prose em { color: var(--ember); font-style: italic; }

/* the "overflow" two-column contrast: serif story | mono facts */
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: start; }
.split .facts {
  font-family: var(--mono); font-size: .9rem; line-height: 1.7; color: var(--ink-soft);
}
.split .facts .fact { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.split .facts .fact:first-child { border-top: 1px solid var(--line); }
.split .facts b { color: var(--ink); }
@media (max-width: 720px) { .split { grid-template-columns: 1fr; gap: 1.5rem; } }

/* =========================================================================
   JOURNAL / POST LIST
   ========================================================================= */
.post-list { max-width: 48rem; }
.post-item { display: block; text-decoration: none; color: inherit;
  padding: 1.5rem 0; border-top: 1px solid var(--line); transition: .15s; }
.post-item:hover { padding-left: .5rem; }
.post-item:hover h3 { color: var(--ember); }
.post-item .meta { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-faint); margin: 0 0 .4rem; }
.post-item h3 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem;
  line-height: 1.2; margin: 0 0 .4rem; transition: .15s; }
.post-item p { margin: 0; color: var(--ink-soft); font-size: 1.05rem; }

/* =========================================================================
   PROJECTS / TOOLS  (framed now, fills in within days)
   ========================================================================= */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
@media (max-width: 720px) { .cards { grid-template-columns: 1fr; } }
.card { border: 1px solid var(--line); border-radius: 3px; padding: 1.75rem;
  background: var(--paper); transition: .15s; }
.card.soon { border-style: dashed; color: var(--ink-faint); }
.card .tag { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--cool); margin: 0 0 .75rem; }
.card.soon .tag { color: var(--ink-faint); }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; margin: 0 0 .5rem; }
.card p { margin: 0; font-size: 1rem; color: var(--ink-soft); }

/* =========================================================================
   FOOTER — capture again + the bio's closing line
   ========================================================================= */
footer.site { border-top: 1px solid var(--line); background: var(--ink); color: var(--paper);
  padding: 3.5rem 0 2.5rem; margin-top: 2rem; }
footer.site .foot-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; }
@media (max-width: 720px) { footer.site .foot-grid { grid-template-columns: 1fr; gap: 2rem; } }
footer.site h3 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; margin: 0 0 1rem; max-width: 18ch; }
footer.site h3 em { color: var(--ember); font-style: italic; }
footer.site form { display: flex; gap: .5rem; max-width: 26rem; margin-top: 1rem; }
footer.site input[type=email] { flex: 1; font-family: var(--mono); font-size: .85rem;
  padding: .6rem .8rem; border: 1px solid #3a352f; border-radius: 2px; background: #2a261f; color: var(--paper); }
footer.site input[type=email]:focus { outline: 2px solid var(--ember); }
footer.site button { font-family: var(--mono); font-size: .78rem; letter-spacing: .06em;
  text-transform: uppercase; font-weight: 600; cursor: pointer; background: var(--ember);
  color: #fff; border: 0; border-radius: 2px; padding: .6rem 1rem; }
footer.site button:hover { background: var(--paper); color: var(--ink); }
footer.site .colophon { font-family: var(--mono); font-size: .76rem; line-height: 1.8;
  color: var(--ink-faint); }
footer.site .colophon a { color: var(--paper); text-decoration: none; border-bottom: 1px solid #3a352f; }
footer.site .tagline { font-family: var(--serif); font-style: italic; font-size: 1.05rem;
  color: var(--paper-deep); margin-top: 2rem; opacity: .85; }

/* =========================================================================
   POPUP — gentle, one-time, remembers dismissal (in-memory; see note)
   ========================================================================= */
.pop { position: fixed; inset: 0; background: rgba(26,23,20,.55); display: none;
  align-items: center; justify-content: center; z-index: 100; padding: 1.5rem; }
.pop.show { display: flex; }
.pop .panel { background: var(--paper); max-width: 26rem; width: 100%; padding: 2.25rem;
  border-radius: 4px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.pop .panel .eyebrow { font-family: var(--mono); font-size: .75rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ember); margin: 0 0 .75rem; }
.pop .panel h3 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; margin: 0 0 .5rem; }
.pop .panel p { margin: 0 0 1.25rem; color: var(--ink-soft); font-size: 1rem; }
.pop .panel form { display: flex; gap: .5rem; }
.pop .panel input[type=email] { flex: 1; font-family: var(--mono); font-size: .85rem;
  padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 2px; background: #fff; }
.pop .panel input[type=email]:focus { outline: 2px solid var(--ember); }
.pop .panel button.go { font-family: var(--mono); font-size: .78rem; letter-spacing: .06em;
  text-transform: uppercase; font-weight: 600; cursor: pointer; background: var(--ember);
  color: #fff; border: 0; border-radius: 2px; padding: .6rem 1rem; }
.pop .panel .close { position: absolute; top: .75rem; right: .9rem; background: none; border: 0;
  font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink-faint); }

/* Article body for individual posts */
article.post { padding: 3.5rem 0; }
article.post .meta { font-family: var(--mono); font-size: .78rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-faint); margin: 0 0 1rem; }
article.post h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem,5vw,3rem);
  line-height: 1.1; letter-spacing: -.02em; margin: 0 0 2rem; max-width: 22ch; }
article.post .body { max-width: var(--measure); }
article.post .body p { margin: 0 0 1.3rem; }
article.post .body h2 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; margin: 2.5rem 0 1rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
