:root {
  --bg: #1A1A1B;
  --text: #F5F5F5;
  --muted: #808080;
  --border: #2D2D2E;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* ── Homepage layout ───────────────────── */

body.home {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.home .site-header {
  padding: 40px;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  border-bottom: none;
}

.hero {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 8%;
}

.hero-logo {
  height: 3rem;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.brand-title {
  font-family: 'Plaster', serif;
  font-size: clamp(3rem, 15vw, 12rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.85;
  margin-bottom: 20px;
  color: var(--text);
}

.tagline {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--muted);
  max-width: 400px;
}

/* ── Inner page layout ─────────────────── */

body:not(.home) {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

body:not(.home) .site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
}

.header-wordmark {
  font-family: 'Plaster', serif;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.header-logo {
  height: 1.8rem;
  width: auto;
}

.header-nav {
  display: flex;
  gap: 2rem;
}

.header-nav .nav-link {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: var(--transition);
}

.header-nav .nav-link:hover {
  color: var(--text);
}

/* ── Content ───────────────────────────── */

.content h1 {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-top: 3rem;
  margin-bottom: 0.75rem;
  color: var(--muted);
}

.content h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.content p {
  color: #c8c8c8;
  margin-bottom: 1rem;
  max-width: 62ch;
}

.content ul, .content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.content li {
  color: #c8c8c8;
  margin-bottom: 0.4rem;
}

.content a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content a:hover {
  color: var(--muted);
}

.date {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

code {
  font-size: 0.85em;
  background: #111;
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

pre {
  background: #111;
  padding: 1.25rem;
  overflow-x: auto;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

/* ── Footer nav grid ───────────────────── */

.site-footer {
  padding: 40px;
}

body:not(.home) .site-footer {
  padding: 0;
  margin-top: 4rem;
}

.nav-grid {
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  padding-top: 30px;
  gap: 40px;
}

.grid-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 4px;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.social-link {
  color: var(--muted);
  transition: var(--transition);
  display: flex;
  align-items: center;
}

.social-link:hover {
  color: var(--text);
}

.grid-body {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.grid-right {
  text-align: right;
}

.nav-link {
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  width: fit-content;
  transition: var(--transition);
}

.nav-link:hover {
  padding-left: 8px;
  color: var(--muted);
}

.grid-right .nav-link:hover {
  padding-left: 0;
  padding-right: 8px;
}

/* ── Responsive ────────────────────────── */

@media (max-width: 768px) {
  .nav-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .hero {
    padding-left: 40px;
  }
  body.home {
    overflow: auto;
  }
  .grid-right {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .nav-grid {
    grid-template-columns: 1fr;
  }
  body:not(.home) .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}
