@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500&display=swap');

:root {
  --bg:      #0B0E14;
  --fg:      #D8D8D2;
  --accent:  #33FF66;
  --dim:     #5a6070;
  --surface: #141820;
  --border:  #1e2430;
  --font: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

/* ─── background grid ──────────────────────────────────────────── */

.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, oklch(22% 0.04 145 / 0.28), transparent 50%),
    linear-gradient(oklch(100% 0 0 / 0.025) 1px, transparent 1px),
    linear-gradient(90deg, oklch(100% 0 0 / 0.025) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
}

/* ─── page shell ────────────────────────────────────────────────── */

.page {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 40px) clamp(20px, 5vw, 32px) clamp(32px, 6vw, 48px);
}

/* ─── status bar ────────────────────────────────────────────────── */

.status-bar {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--dim);
  padding-bottom: clamp(32px, 8vh, 64px);
}

.status-bar .prompt { color: var(--dim); }
.status-bar .ok     { color: var(--accent); }

/* ─── hero ──────────────────────────────────────────────────────── */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 6vh, 48px) 0;
}

/* ─── wordmark ──────────────────────────────────────────────────── */

.wordmark {
  font-size: clamp(28px, 7.5vw, 52px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: clamp(16px, 3vh, 28px);
  word-break: break-word;
}

.wordmark .prompt { color: var(--dim); font-weight: 300; }
.wordmark .flag   { color: var(--accent); }
.wordmark .cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ─── tagline / subline ─────────────────────────────────────────── */

.tagline {
  font-size: clamp(15px, 2.8vw, 18px);
  font-weight: 400;
  color: var(--fg);
  max-width: 42ch;
  margin-bottom: 8px;
}

.subline {
  font-size: clamp(13px, 2.4vw, 15px);
  color: var(--dim);
  max-width: 46ch;
}

.subline em,
.tagline em {
  font-style: normal;
  color: var(--accent);
}

/* ─── channels ──────────────────────────────────────────────────── */

.channels {
  margin-top: clamp(40px, 8vh, 72px);
}

.channels-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 16px;
}

.channels-label::before {
  content: '# ';
  color: var(--dim);
}

.channel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 480px) {
  .channel-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 640px) {
  .channel-grid { grid-template-columns: repeat(3, 1fr); }
}

.channel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
  min-height: 56px;
}

.channel:hover,
.channel:focus-visible {
  border-color: oklch(40% 0.12 145);
  background: oklch(18% 0.03 250);
  outline: none;
}

.channel:focus-visible {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}

.channel-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--dim);
  transition: color 0.15s;
}

.channel:hover .channel-icon,
.channel:focus-visible .channel-icon { color: var(--accent); }

.channel-text {
  min-width: 0;
  flex: 1;
}

.channel-name {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.channel-handle {
  display: block;
  font-size: 11px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-arrow {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--dim);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s, transform 0.15s, color 0.15s;
}

.channel:hover .channel-arrow,
.channel:focus-visible .channel-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent);
}

/* ─── proof note ────────────────────────────────────────────────── */

.proof-note {
  margin-top: 20px;
  font-size: 12px;
  color: var(--dim);
  max-width: 52ch;
}

.proof-note code {
  color: var(--fg);
  font-size: 11px;
}

/* ─── footer ────────────────────────────────────────────────────── */

footer {
  margin-top: auto;
  padding-top: clamp(32px, 6vh, 56px);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.04em;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--border);
  padding-bottom: 8px;
}

footer a {
  color: var(--dim);
  text-decoration: none;
}

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

/* ─── status link ───────────────────────────────────────────────── */

.status-link {
  color: var(--dim);
  text-decoration: none;
}

.status-link:hover { color: var(--accent); }

/* ─── blog index ────────────────────────────────────────────────── */

.log-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 6vh, 48px) 0;
}

.log-heading {
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 8px;
}

.log-heading::before {
  content: '# ';
  color: var(--accent);
}

.log-subhead {
  font-size: 13px;
  color: var(--dim);
  margin-bottom: clamp(32px, 6vh, 56px);
}

.log-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.log-entry a {
  display: flex;
  align-items: baseline;
  gap: 0;
  padding: 10px 0;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}

.log-entry:first-child a {
  border-top: 1px solid var(--border);
}

.log-entry a:hover { color: var(--accent); }
.log-entry a:hover .log-date { color: var(--accent); }
.log-entry a:hover .log-sep  { color: var(--accent); }

.log-date {
  font-size: 11px;
  color: var(--dim);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s;
}

.log-sep {
  font-size: 11px;
  color: var(--border);
  flex-shrink: 0;
  transition: color 0.15s;
}

.log-title {
  font-size: 13px;
  font-weight: 400;
}

.log-empty {
  padding: 10px 0;
  font-size: 12px;
  color: var(--dim);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.log-live {
  margin-top: 20px;
  font-size: 12px;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.log-live-text {
  font-size: 11px;
  letter-spacing: 0.06em;
}

/* ─── blog post ─────────────────────────────────────────────────── */

.post-main {
  flex: 1;
  padding: clamp(24px, 6vh, 48px) 0;
}

.post-header {
  margin-bottom: clamp(32px, 6vh, 56px);
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}

.post-meta {
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.post-title {
  font-size: clamp(20px, 4.5vw, 30px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 10px;
}

.post-description {
  font-size: 13px;
  color: var(--dim);
  max-width: 52ch;
}

.post-body {
  font-size: 14px;
  line-height: 1.75;
  max-width: 64ch;
}

.post-body p { margin-bottom: 1.2em; }

.post-body h2 {
  font-size: 16px;
  font-weight: 500;
  color: var(--fg);
  margin: 2em 0 0.6em;
}

.post-body h2::before {
  content: '## ';
  color: var(--accent);
}

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

.post-body code {
  font-family: var(--font);
  font-size: 12px;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
}

.post-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px;
  overflow-x: auto;
  margin: 1.4em 0;
}

.post-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
}

.post-body ul,
.post-body ol {
  padding-left: 1.6em;
  margin-bottom: 1.2em;
}

.post-body li { margin-bottom: 0.4em; }

/* ─── homepage log link ─────────────────────────────────────────── */

.log-link-section {
  margin-top: clamp(32px, 6vh, 56px);
  padding-top: clamp(24px, 4vh, 36px);
  border-top: 1px solid var(--border);
}

.log-link-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 14px;
}

.log-link-label::before {
  content: '# ';
  color: var(--dim);
}

.log-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.log-link-text {
  font-size: 13px;
  color: var(--dim);
}

.log-link-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg);
  font-family: var(--font);
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}

.log-link-cta:hover {
  border-color: oklch(40% 0.12 145);
  color: var(--accent);
}
