/* ============================================
   thinkingmeat.club
   ============================================ */

:root {
  --ink: #0a0a0a;
  --paper: #f4f1ea;
  --paper-shadow: #e8e3d8;
  --muted: #6b6660;
  --rule: #2a2a2a;
  --accent: #8b0000;

  --serif: 'EB Garamond', 'Iowan Old Style', 'Apple Garamond', Garamond, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', 'Space Mono', 'Courier New', monospace;

  --measure: 38rem;
  --gutter: clamp(1.5rem, 5vw, 4rem);
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(0,0,0,0.015) 1px, transparent 1px),
    radial-gradient(circle at 70% 60%, rgba(0,0,0,0.02) 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(0,0,0,0.015) 1px, transparent 1px);
  background-size: 8px 8px, 12px 12px, 16px 16px;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Texture papier journal subtile */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 1;
  mix-blend-mode: multiply;
  opacity: 0.5;
}

main, header, footer, nav {
  position: relative;
  z-index: 2;
}

/* ============================================
   Layout
   ============================================ */

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

main {
  padding: 4rem 0 6rem;
}

/* ============================================
   Header / Nav
   ============================================ */

header {
  padding: 2rem 0 0;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

nav .brand {
  color: var(--ink);
  font-weight: 500;
}

nav .brand a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

nav .brand a:hover {
  border-bottom-color: var(--ink);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.8rem;
}

nav ul a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  padding-bottom: 2px;
}

nav ul a:hover,
nav ul a.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.lang-toggle {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.lang-toggle a {
  color: var(--muted);
  text-decoration: none;
}

.lang-toggle a.active {
  color: var(--ink);
}

.lang-toggle .sep {
  color: var(--muted);
  margin: 0 0.4rem;
}

/* ============================================
   Hero (landing)
   ============================================ */

.hero {
  margin: 5rem 0 4rem;
  animation: fadeUp 1.2s ease-out;
}

.hero-figure {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
}

.hero-figure img {
  max-width: 280px;
  width: 100%;
  height: auto;
  filter: contrast(1.05);
  mix-blend-mode: multiply;
}

.epigraph {
  text-align: center;
  font-size: 1.6rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 0.8rem;
}

.epigraph-cite {
  text-align: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ============================================
   Manifeste
   ============================================ */

.manifesto {
  margin: 5rem 0;
  font-size: 1.25rem;
  line-height: 1.55;
  animation: fadeUp 1.4s ease-out;
}

.manifesto p {
  margin-bottom: 1.4rem;
}

.manifesto .lead {
  font-size: 1.4rem;
  line-height: 1.4;
  font-style: italic;
  margin-bottom: 2rem;
}

.manifesto strong {
  font-weight: 600;
  font-style: italic;
}

/* Drop cap */
.dropcap::first-letter {
  float: left;
  font-size: 4.5rem;
  line-height: 0.85;
  padding: 0.3rem 0.6rem 0 0;
  font-weight: 500;
  font-style: normal;
  color: var(--ink);
}

/* ============================================
   Rule / Separator
   ============================================ */

.rule {
  border: none;
  height: 1px;
  background: var(--rule);
  margin: 3rem auto;
  max-width: 4rem;
  opacity: 0.4;
}

.rule-ornament {
  text-align: center;
  margin: 3rem 0;
  font-family: var(--mono);
  color: var(--muted);
  letter-spacing: 1em;
  font-size: 0.8rem;
}

/* ============================================
   Section / Article
   ============================================ */

article {
  animation: fadeUp 1s ease-out;
}

article h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.6rem;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

article .subtitle {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3rem;
}

article h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.6rem;
  margin: 3rem 0 1rem;
  letter-spacing: -0.005em;
}

article h3 {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 2rem 0 0.8rem;
  color: var(--muted);
}

article p {
  margin-bottom: 1.4rem;
}

article em {
  font-style: italic;
}

article strong {
  font-weight: 600;
}

article a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--muted);
  transition: border-color 0.2s, color 0.2s;
}

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

article blockquote {
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.45;
  border-left: 2px solid var(--ink);
  padding-left: 1.5rem;
  margin: 2rem 0;
  color: var(--ink);
}

article blockquote cite {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.8rem;
}

article ul, article ol {
  margin: 1rem 0 1.4rem 1.5rem;
}

article li {
  margin-bottom: 0.5rem;
}

/* ============================================
   Pact / Code block
   ============================================ */

.pact {
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.6;
  background: var(--paper-shadow);
  padding: 1.8rem 2rem;
  margin: 2.5rem 0;
  border-left: 3px solid var(--ink);
  position: relative;
}

.pact::before {
  content: '// pacte';
  position: absolute;
  top: -0.7rem;
  left: 1.5rem;
  background: var(--paper);
  padding: 0 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================
   Liens / contact
   ============================================ */

.contact {
  margin: 4rem 0;
  font-family: var(--mono);
  font-size: 0.9rem;
}

.contact .label {
  display: inline-block;
  width: 5rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  transition: color 0.2s, border-color 0.2s;
}

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

.contact-line {
  margin: 0.6rem 0;
}

/* ============================================
   Footer
   ============================================ */

footer {
  margin-top: 6rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid rgba(10,10,10,0.1);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

footer .signature {
  color: var(--ink);
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 640px) {
  html {
    font-size: 17px;
  }

  nav ul {
    gap: 1.2rem;
  }

  .epigraph {
    font-size: 1.3rem;
  }

  article h1 {
    font-size: 2rem;
  }

  .manifesto {
    font-size: 1.15rem;
  }

  .manifesto .lead {
    font-size: 1.25rem;
  }

  .dropcap::first-letter {
    font-size: 3.5rem;
  }

  .contact .label {
    display: block;
    width: auto;
    margin-bottom: 0.2rem;
  }
}

/* ============================================
   Print
   ============================================ */

@media print {
  body::before { display: none; }
  body { background: white; }
  nav, footer { display: none; }
}

/* ============================================
   Reduced motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
