/* ── reset & base ──────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #F5F0E8;
  --text: #111;
  --accent: #D1462F;
  --code-bg: #111;
  --code-text: #F5F0E8;
  --border: #bbb;
  --muted: #555;
  --section-gap: 4.5rem;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Space Mono", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* ── typography ────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&family=Space+Mono:wght@400;700&display=swap');

h1, h2, h3, h4 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 1.75rem; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

.section-label {
  font-family: "Space Mono", monospace;
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
  display: block;
}

p { max-width: 680px; margin-bottom: 0.75rem; font-size: 0.9rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── layout ────────────────────────────────────────────── */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: var(--section-gap) 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type { border-bottom: none; }

/* ── nav ───────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 0.75rem 0;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo {
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.05em;
}

nav .links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

nav .links a {
  font-family: "Space Mono", monospace;
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

nav .links a:hover,
nav .links a.active {
  color: var(--text);
}

/* ── hero ──────────────────────────────────────────────── */
.hero {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--border);
}

.hero-readout {
  margin-bottom: 1.5rem;
}

.readout-line {
  font-family: "Space Mono", monospace;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  display: block;
}

.hero-badge {
  display: inline-block;
  font-family: "Space Mono", monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: var(--accent);
  color: var(--bg);
  padding: 0.35rem 0.9rem;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 0.5rem;
}

.hero .subline {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  max-width: 500px;
  font-family: "Space Mono", monospace;
}

.hero-stats {
  margin: 1.5rem 0;
}

.hero-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  font-family: "Space Mono", monospace;
  font-size: 0.8rem;
  padding: 0.6rem 1.25rem;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.15s;
}

.btn:hover { text-decoration: none; opacity: 0.85; }

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
}

/* ── stat boxes ────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin: 2rem 0;
}

.stat-box {
  background: var(--bg);
  padding: 1.25rem 1rem;
  text-align: center;
}

.stat-box .number {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 0.15rem;
}

.stat-box .label {
  font-family: "Space Mono", monospace;
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-box-text {
  text-align: left;
  padding: 1.25rem 1.25rem;
}

.tech-name {
  font-family: "Space Mono", monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-bottom: 0.15rem;
}

/* ── two-column blocks ─────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 1.5rem;
}

/* ── three-column blocks ───────────────────────────────── */
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 1.5rem;
}

.block {
  background: var(--bg);
  padding: 1.5rem;
}

.block h3 {
  font-family: "Space Mono", monospace;
  font-size: 0.9rem;
  font-weight: 700;
}

.block p {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── video ─────────────────────────────────────────────── */
.video-wrapper {
  position: relative;
  width: 100%;
  margin: 1.5rem 0 0;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  background: var(--code-bg);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── terminal ─────────────────────────────────────────── */
.terminal {
  border: 1px solid var(--border);
  margin: 1.5rem 0;
  overflow: hidden;
}

.terminal-bar {
  background: #2a2a2a;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #555;
  display: inline-block;
}

.terminal-dot:nth-child(1) { background: #ff5f57; }
.terminal-dot:nth-child(2) { background: #ffbd2e; }
.terminal-dot:nth-child(3) { background: #28c840; }

.terminal-title {
  font-family: "Space Mono", monospace;
  font-size: 0.7rem;
  color: #888;
  margin-left: 0.5rem;
}

.terminal-body {
  margin: 0;
  padding: 1.25rem;
  font-size: 0.75rem;
  line-height: 1.5;
  background: var(--code-bg);
  color: #ccc;
}

.t-arrow {
  color: var(--accent);
  font-weight: 700;
}

/* ── link cards ────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 1.5rem;
}

.card {
  background: var(--bg);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
  display: block;
}

.card:hover {
  background: #ede8df;
  text-decoration: none;
}

.card h3 {
  margin-bottom: 0.35rem;
  font-family: "Space Mono", monospace;
  font-size: 0.9rem;
}

.card p {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── photos grid ───────────────────────────────────────── */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 1.5rem;
}

.photos-grid.photos-2 {
  grid-template-columns: repeat(2, 1fr);
}

.photos-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--bg);
  aspect-ratio: 4 / 3;
}

/* ── footer ────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 1.5rem;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

footer .footer-left {
  font-family: "Space Mono", monospace;
  font-size: 0.75rem;
  color: var(--muted);
}

footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

/* ── responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  h2 { font-size: 1.35rem; }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .two-col,
  .three-col,
  .card-grid {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  nav .container {
    flex-direction: column;
    gap: 0.5rem;
  }

  nav .links { gap: 1rem; }

  .hero { padding: 3rem 0 2.5rem; }

  footer .container {
    flex-direction: column;
    text-align: center;
  }

  .photos-grid {
    grid-template-columns: 1fr;
  }

  pre { padding: 1rem; font-size: 0.75rem; }

  :root { --section-gap: 3rem; }
}
