@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Anton&family=Playfair+Display:ital,wght@0,400;1,400;1,700&display=swap');

:root {
  --bg:      #f0ead8;
  --paper:   #e8e0c8;
  --ink:     #0e0e0e;
  --ink2:    #1a1a1a;
  --muted:   #6b6250;
  --dim:     #a89e88;
  --border:  #c8bda8;
  --red:     #c0250a;
  --yellow:  #e8c210;
  --blue:    #1a3a6a;
  --cyan:    #00706a;
  --surface: #ddd5be;
  --stamp:   rgba(192,37,10,0.12);
  --noise:   rgba(14,14,14,0.03);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Space Mono', monospace;
  font-size: 15px;
  line-height: 1.85;
  overflow-x: hidden;
}

/* ── Paper texture ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9998;
}

/* ── PROGRESS ── */
#progress {
  position: fixed; top: 0; left: 0;
  height: 3px; background: var(--red);
  width: 0%; z-index: 10000;
  transition: width 0.1s linear;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 3px solid var(--ink);
  position: relative;
  overflow: hidden;
}

@media(max-width:700px){ .hero { grid-template-columns: 1fr; } }

.hero-left {
  background: var(--ink);
  color: var(--bg);
  padding: 5rem 4vw 4rem;
  display: flex; flex-direction: column; justify-content: flex-end;
  position: relative;
  border-right: 3px solid var(--ink);
}

.hero-left::before {
  content: '//';
  position: absolute; top: 3rem; left: 4vw;
  font-family: 'Anton', sans-serif;
  font-size: 6rem; color: rgba(255,255,255,0.04);
  line-height: 1;
}

.issue-label {
  font-size: 0.62rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--dim);
  margin-bottom: 2rem;
}

h1.hero-title {
  font-family: 'Anton', sans-serif;
  font-size: clamp(5rem, 13vw, 10rem);
  line-height: 0.88;
  letter-spacing: -0.01em;
  color: var(--bg);
  margin-bottom: 2rem;
}

h1.hero-title .hl { color: var(--yellow); }
h1.hero-title .hl2 { color: var(--red); }

.hero-byline {
  font-size: 0.7rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--muted);
  border-top: 1px solid #333;
  padding-top: 1rem;
  font-style: italic;
}

.hero-right {
  background: var(--paper);
  padding: 5rem 4vw 4rem;
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
}

/* Big decorative quote */
.hero-right::before {
  content: '"';
  position: absolute;
  top: -1rem; right: 2rem;
  font-family: 'Playfair Display', serif;
  font-size: 20rem; color: var(--border);
  line-height: 1; pointer-events: none;
  z-index: 0;
}

.hero-manifesto {
  position: relative; z-index: 1;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-style: italic; color: var(--ink);
  line-height: 1.6;
  border-left: 4px solid var(--red);
  padding-left: 1.5rem;
}

.hero-manifesto cite {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted);
  font-style: normal; margin-top: 1.2rem;
}

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--ink); display: flex;
  flex-wrap: wrap; border-bottom: 3px solid var(--ink);
}

nav a {
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--dim);
  text-decoration: none; padding: 0.9rem 1.3rem;
  border-right: 1px solid #222;
  transition: background 0.15s, color 0.15s;
}

nav a:hover { background: var(--red); color: var(--bg); }

/* ── MAIN ── */
main { max-width: 1200px; margin: 0 auto; padding: 0 4vw; }

/* ── SECTION ── */
.section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section.visible { opacity: 1; transform: none; }

.section-label {
  font-size: 0.62rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--red);
  margin-bottom: 0.8rem;
  display: flex; align-items: center; gap: 0.8rem;
}

.section-label::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

h2 {
  font-family: 'Anton', sans-serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: 0.02em; line-height: 1;
  color: var(--ink); margin-bottom: 2.5rem;
}

h2 .acc { color: var(--red); }
h2 .acc2 { color: var(--blue); }

p { color: var(--ink2); max-width: 680px; }
p + p { margin-top: 1rem; }
strong { color: var(--ink); }
em { color: var(--cyan); font-style: italic; }

/* ── TWO COL ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
@media(max-width:700px){ .two-col { grid-template-columns: 1fr; gap: 2rem; } }

/* ── PULL QUOTE ── */
.pull-quote {
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  padding: 2rem 0;
  margin: 3rem 0;
}

.pull-quote p {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-style: italic; max-width: 100%;
  color: var(--ink); line-height: 1.4;
}

.pull-quote cite {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted);
  margin-top: 1rem; font-style: normal;
}

/* ── STAMP ── */
.stamp {
  display: inline-block;
  border: 3px solid var(--red);
  color: var(--red);
  padding: 0.3rem 0.8rem;
  font-size: 0.6rem; letter-spacing: 0.3em;
  text-transform: uppercase;
  transform: rotate(-2deg);
  background: var(--stamp);
  margin-bottom: 1rem;
}

/* ── TIMELINE ── */
.timeline { margin-top: 2.5rem; }

.tl-item {
  display: grid; grid-template-columns: 90px 1fr;
  gap: 2rem; margin-bottom: 0;
  border-bottom: 1px dashed var(--border);
  padding: 1.8rem 0;
}

.tl-year {
  font-family: 'Anton', sans-serif;
  font-size: 1.4rem; color: var(--muted);
  padding-top: 0.2rem; line-height: 1;
}

.tl-event { font-size: 0.82rem; color: var(--ink2); }
.tl-title { font-weight: 700; color: var(--ink); margin-bottom: 0.3rem; font-size: 0.9rem; }

/* ── HACKER CARDS ── */
.hacker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2px; background: var(--border);
  border: 2px solid var(--ink); margin-top: 2.5rem;
}

.hacker-card {
  background: var(--bg); padding: 2rem;
  transition: background 0.2s;
  position: relative;
}

.hacker-card:hover { background: var(--ink); color: var(--bg); }
.hacker-card:hover .hk-name,
.hacker-card:hover .hk-desc { color: var(--bg); }
.hacker-card:hover .hk-alias { color: var(--yellow); }
.hacker-card:hover .hk-tag { border-color: #444; color: #888; }

.hk-alias {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--red);
  margin-bottom: 0.4rem; display: block;
  transition: color 0.2s;
}

.hk-name {
  font-family: 'Anton', sans-serif;
  font-size: 1.5rem; color: var(--ink);
  margin-bottom: 0.3rem; line-height: 1;
  transition: color 0.2s;
}

.hk-tag {
  display: inline-block;
  font-size: 0.55rem; letter-spacing: 0.2em;
  text-transform: uppercase; padding: 0.15rem 0.5rem;
  border: 1px solid var(--border); color: var(--muted);
  margin-bottom: 0.8rem; transition: all 0.2s;
}

.hk-tag.white { border-color: var(--cyan); color: var(--cyan); }
.hk-tag.grey  { border-color: var(--muted); }
.hk-tag.black { border-color: var(--red); color: var(--red); }
.hk-tag.legend { border-color: var(--blue); color: var(--blue); }

.hk-desc { font-size: 0.8rem; color: var(--ink2); transition: color 0.2s; }

/* ── ETHICS BOXES ── */
.ethics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem; margin-top: 2.5rem;
}

.ethic-item {
  border-left: 3px solid var(--ink);
  padding: 1.2rem 1.5rem;
  background: var(--surface);
  position: relative;
}

.ethic-n {
  font-family: 'Anton', sans-serif;
  font-size: 4rem; color: var(--border);
  position: absolute; top: 0; right: 1rem;
  line-height: 1;
}

.ethic-title {
  font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink); margin-bottom: 0.5rem;
}

.ethic-item p { font-size: 0.8rem; max-width: 100%; }

/* ── TYPE GRID (hat types) ── */
.hat-grid {
  display: grid; gap: 1px;
  grid-template-columns: repeat(3, 1fr);
  background: var(--border); border: 2px solid var(--ink);
  margin-top: 2.5rem;
}

@media(max-width:600px){ .hat-grid { grid-template-columns: 1fr; } }

.hat-cell { background: var(--bg); padding: 2rem; }

.hat-cell.white-hat { background: var(--bg); border-top: 4px solid var(--cyan); }
.hat-cell.grey-hat  { background: var(--surface); border-top: 4px solid var(--muted); }
.hat-cell.black-hat { background: var(--ink); border-top: 4px solid var(--red); color: var(--bg); }

.hat-cell.black-hat p { color: #aaa; }
.hat-cell.black-hat .hat-title { color: var(--bg); }

.hat-icon {
  font-size: 2rem; margin-bottom: 0.5rem; display: block;
}

.hat-title {
  font-family: 'Anton', sans-serif;
  font-size: 1.4rem; color: var(--ink);
  margin-bottom: 0.5rem; line-height: 1;
}

.hat-cell p { font-size: 0.8rem; max-width: 100%; }

/* ── MANIFESTO BLOCK ── */
.manifesto-block {
  background: var(--ink); color: var(--bg);
  padding: 3rem; margin: 3rem 0;
  position: relative; overflow: hidden;
}

.manifesto-block::before {
  content: 'MANIFESTO';
  position: absolute; top: -1rem; right: -1rem;
  font-family: 'Anton', sans-serif; font-size: 8rem;
  color: rgba(255,255,255,0.03); line-height: 1;
  pointer-events: none;
}

.manifesto-block p {
  font-family: 'Space Mono', monospace;
  font-size: 0.82rem; line-height: 2;
  color: #bbb; max-width: 100%;
}

.manifesto-block p + p { margin-top: 1rem; }
.manifesto-block strong { color: var(--yellow); }
.manifesto-block .mf-source {
  margin-top: 1.5rem; padding-top: 1rem;
  border-top: 1px solid #333;
  font-size: 0.62rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: #555;
}

/* ── MEDIA GRID ── */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem; margin-top: 2.5rem;
}

.media-item {
  border: 1px solid var(--border); padding: 1.5rem;
  background: var(--surface); position: relative;
  transition: border-color 0.2s;
}

.media-item:hover { border-color: var(--ink); }

.media-type {
  font-size: 0.55rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 0.4rem; display: block;
}

.media-title {
  font-family: 'Anton', sans-serif;
  font-size: 1.1rem; color: var(--ink);
  line-height: 1.1; margin-bottom: 0.3rem;
}

.media-year { font-size: 0.7rem; color: var(--muted); margin-bottom: 0.7rem; display: block; }
.media-item p { font-size: 0.78rem; max-width: 100%; }

/* ── BACK TOP ── */
#back-top {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 40px; height: 40px;
  border: 2px solid var(--ink); background: var(--bg);
  color: var(--ink); font-family: 'Space Mono', monospace;
  font-size: 0.9rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, background 0.2s, color 0.2s;
}

#back-top.show { opacity: 1; pointer-events: all; }
#back-top:hover { background: var(--ink); color: var(--bg); }

/* ── FOOTER ── */
footer {
  text-align: center; padding: 3rem 2rem;
  background: var(--ink); color: var(--muted);
  font-size: 0.62rem; letter-spacing: 0.2em;
  text-transform: uppercase;
}
