/* -------- fonts -------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('Inter_18pt-ExtraLight.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('Inter_24pt-SemiBold.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('Inter_28pt-ExtraBold.ttf') format('truetype');
}

/* -------- reset-ish -------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; }

/* -------- tokens -------- */
:root {
  --bg: #0a0a0a;
  --fg: #ffffff;
  --muted: #9a9a9a;          /* AA on #0a0a0a */
  --muted-strong: #c8c8c8;
  --icon: #d0d0d0;
  --header-pad-y: 1.75rem;
  --side-pad: 2rem;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
          Arial, "Segoe UI", Roboto, sans-serif;
}

/* -------- base -------- */
html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: #fff;
  color: #000;
  z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* -------- header -------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--header-pad-y) var(--side-pad);
  z-index: 20;
}

.brand {
  /* invisible anchor — keeps space-between balance, also a "go home" target */
  display: inline-block;
  width: 1px; height: 1px;
}

/* desktop nav */
.nav-desktop { display: none; }
.nav-desktop ul {
  display: flex;
  gap: 3rem;
}
.nav-desktop a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 200;
  letter-spacing: 0.02em;
  transition: color 150ms ease;
}
.nav-desktop a:hover,
.nav-desktop a:focus-visible { color: var(--fg); }

/* hamburger */
.menu-toggle {
  color: var(--icon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 4px;
}
.menu-toggle:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-bars { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* -------- hero -------- */
.hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem var(--side-pad) 8rem;
}
.wordmark {
  margin: 0;
  font-weight: 600;
  font-size: clamp(4.5rem, 14vw, 12rem);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--fg);
}
.tagline {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  font-weight: 200;
}

/* -------- content pages -------- */
.page-main {
  width: min(100%, 52rem);
  margin: 0 auto;
  padding: 9rem var(--side-pad) 5rem;
}
.page-kicker {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.page-title {
  margin: 0;
  font-size: clamp(3rem, 9vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.page-intro {
  max-width: 38rem;
  margin: 1.5rem 0 0;
  color: var(--muted-strong);
  font-size: 1.05rem;
  line-height: 1.7;
  font-weight: 200;
}
.page-meta {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.placeholder-card {
  margin-top: 3rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
}
.placeholder-label {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--fg);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.placeholder-card p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.7;
  font-weight: 200;
}
.page-backlink {
  display: inline-flex;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 150ms ease;
}
.page-backlink:hover,
.page-backlink:focus-visible {
  color: var(--fg);
}

.detail-content {
  margin-top: 3rem;
  color: var(--muted-strong);
  font-size: 1.02rem;
  line-height: 1.8;
  font-weight: 200;
}
.detail-content p {
  margin: 0 0 1.25rem;
}
.detail-content p:last-child {
  margin-bottom: 0;
}

/* -------- archives -------- */
.archive-list {
  margin-top: 3rem;
}
.archive-empty {
  margin-top: 3rem;
  color: var(--muted-strong);
  font-size: 1rem;
  line-height: 1.7;
}
.archive-entry {
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.02);
  overflow: clip;
}
.archive-entry:last-child {
  margin-bottom: 0;
}
.archive-entry.is-open {
  background: rgba(255, 255, 255, 0.035);
}
.archive-entry-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 1rem;
  align-items: center;
  width: 100%;
  padding: 1.1rem 1.25rem;
}
.archive-entry-title {
  min-width: 0;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.archive-entry-date {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}
.archive-entry-toggle {
  width: auto;
  height: auto;
  color: var(--fg);
  padding: 0;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}
.archive-entry-toggle:hover,
.archive-entry-toggle:focus-visible {
  color: var(--muted-strong);
}
.archive-entry.is-open .archive-entry-toggle {
  transform: rotate(45deg);
}
.archive-entry-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 180ms ease;
}
.archive-entry.is-open .archive-entry-panel {
  grid-template-rows: 1fr;
}
.archive-entry-panel-inner {
  min-height: 0;
  overflow: hidden;
}
.archive-entry-body {
  padding: 0 1.25rem 1.25rem;
  color: var(--muted-strong);
  line-height: 1.75;
  font-weight: 200;
}
.archive-entry-body p {
  margin: 0 0 1rem;
}
.archive-entry-body p:last-child {
  margin-bottom: 0;
}
.archive-entry-body a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 0.16em;
}
.archive-entry-body a:hover,
.archive-entry-body a:focus-visible {
  text-decoration-color: rgba(255, 255, 255, 0.75);
}
.archive-readmore {
  display: inline-flex;
  margin-top: 0.75rem;
  color: var(--fg);
  font-size: 0.95rem;
  font-weight: 600;
}

/* -------- mobile menu overlay -------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 15;
  padding: calc(var(--header-pad-y) + 5rem) var(--side-pad) var(--side-pad);
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
  overflow-y: auto;
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
}
.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 4rem;
}
.mobile-menu a {
  display: inline-block;
  font-size: 2rem;
  font-weight: 600;
  color: var(--muted-strong);
  padding: 0.25rem 0;
}
.mobile-menu a:hover,
.mobile-menu a:focus-visible { color: var(--fg); }

@media (prefers-reduced-motion: reduce) {
  .mobile-menu { transition: none; }
  .archive-entry-toggle,
  .archive-entry-panel { transition: none; }
}

/* -------- breakpoint -------- */
@media (min-width: 768px) {
  .nav-desktop { display: block; }
  .menu-toggle { display: none; }
  .mobile-menu { display: none; }
  :root { --side-pad: 3.5rem; }
  .page-main { padding-top: 11rem; }
}

@media (max-width: 640px) {
  .archive-entry-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .archive-entry-date {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
  }
  .archive-entry-toggle {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    align-self: center;
  }
}
