/* pre.empt.blog — site styles
 * Ported from the Claude Design prototype. Purple accent, terminal flair.
 */

:root {
  --bg: #0a0a0c;
  --bg-2: #0f0f12;
  --bg-3: #15151a;
  --fg: #e8e8ed;
  --fg-dim: rgba(232,232,237,.62);
  --fg-mute: rgba(232,232,237,.38);
  --fg-faint: rgba(232,232,237,.20);
  --line: rgba(255,255,255,.07);
  --line-2: rgba(255,255,255,.12);
  --accent: oklch(0.72 0.22 300);
  --accent-deep: oklch(0.58 0.20 300);
  --accent-soft: oklch(0.72 0.22 300 / 0.12);
  --accent-glow: oklch(0.72 0.22 300 / 0.4);

  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --max-w: 1180px;
  --max-w-prose: 720px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { min-height: 100vh; }
::selection { background: var(--accent); color: #1a0033; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  background: rgba(10,10,12,.72);
  border-bottom: .5px solid var(--line);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  height: 60px;
  display: flex; align-items: center;
  padding: 0 28px; gap: 24px;
}
.nav-logo {
  font-family: var(--font-mono); font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; letter-spacing: -0.01em;
}
.nav-logo .prompt { color: var(--accent); }
.nav-logo .host { color: var(--fg); }
.nav-logo .tld { color: var(--fg-mute); font-weight: 400; }
.nav-links { display: flex; gap: 4px; margin-left: 22px; }
.nav-link {
  padding: 6px 12px; border-radius: 7px;
  font-size: 13.5px; color: var(--fg-dim);
  transition: color .15s, background .15s;
  cursor: pointer;
}
.nav-link:hover { color: var(--fg); background: rgba(255,255,255,.05); }
.nav-link.active { color: var(--accent); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-icon {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px; color: var(--fg-dim);
  cursor: pointer;
}
.nav-icon:hover { color: var(--fg); background: rgba(255,255,255,.05); }

/* ── Layout ──────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; }
.container-prose { max-width: var(--max-w-prose); margin: 0 auto; padding: 0 28px; }

/* ── About page ──────────────────────────────────────── */
.about-wrap { padding: 72px 0 120px; }
.about-h {
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  line-height: 1;
}
.about-h .prompt { color: var(--accent); }
.about-lead {
  font-size: 17px; line-height: 1.6;
  color: var(--fg-dim); max-width: 620px;
  margin: 0 0 14px;
  text-wrap: pretty;
}
.about-lead-dim { color: var(--fg-mute); font-size: 15.5px; }
.team-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  margin-top: 48px;
}
@media (max-width: 760px) {
  .team-grid { grid-template-columns: 1fr; }
}
.team-term { background: #08080a; }
.team-body {
  padding: 22px 22px 18px !important;
  display: flex; flex-direction: column;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.55;
}
.team-prompt { color: var(--fg); display: flex; gap: 2px; margin-bottom: 18px; }
.team-prompt .team-acc { color: var(--accent); }
.team-prompt .team-dim { color: var(--fg-mute); }
.team-prompt .team-path { color: var(--fg-dim); }
.team-name {
  font-family: var(--font-ui);
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--fg);
  margin-bottom: 4px;
}
.team-role {
  font-family: var(--font-ui);
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 14px;
}
.team-note {
  color: var(--fg-mute);
  font-style: italic;
  margin-bottom: 18px;
  font-size: 12.5px;
}
.team-kv {
  display: grid;
  grid-template-columns: 70px 1fr;
  row-gap: 6px; column-gap: 14px;
  margin-bottom: 20px;
}
.team-k { color: var(--fg-mute); }
.team-v { color: var(--fg); }
.team-follow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--accent-soft);
  border: .5px solid oklch(0.72 0.22 300 / 0.3);
  border-radius: 7px;
  color: var(--accent) !important;
  font-family: var(--font-mono); font-size: 12px;
  text-decoration: none !important;
  align-self: flex-start;
  cursor: pointer;
  transition: background .15s;
}
.team-follow:hover { background: oklch(0.72 0.22 300 / 0.2); }
.about-foot {
  margin-top: 56px;
  font-family: var(--font-mono); font-size: 13px;
  color: var(--fg-dim);
}
.about-foot .prompt { color: var(--accent); margin-right: 8px; }
.about-link { color: var(--accent) !important; text-decoration: underline; text-decoration-color: oklch(0.72 0.22 300 / 0.4); text-underline-offset: 3px; }

/* ── Terminal block ──────────────────────────────────── */
.term {
  background: #08080a;
  border: .5px solid var(--line-2);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 50px -20px rgba(0,0,0,.5), 0 0 0 .5px rgba(255,255,255,.03) inset;
}
.term-head {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,.025);
  border-bottom: .5px solid var(--line);
  font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-mute);
}
.term-lights { display: flex; gap: 6px; }
.term-lights span {
  width: 11px; height: 11px; border-radius: 50%;
  border: .5px solid rgba(0,0,0,.2);
}
.term-lights .r { background: #ff5f57; }
.term-lights .y { background: #febc2e; }
.term-lights .g { background: #28c840; }
.term-title { color: var(--fg-mute); }
.term-lang { color: var(--accent); font-weight: 500; }
.term-body {
  padding: 18px 0; font-family: var(--font-mono);
  font-size: 13px; line-height: 1.62;
  overflow-x: auto;
}
.term-body pre {
  margin: 0; padding: 0 18px;
  font-family: var(--font-mono);
  font-size: 13px; line-height: 1.62;
  color: var(--fg);
  white-space: pre;
  overflow-x: auto;
}
.term-body pre code {
  font-family: inherit; font-size: inherit; line-height: inherit;
  background: transparent; padding: 0; border: 0;
  color: inherit;
}

/* ── Index — post list ────────────────────────────────── */
.post-list { display: flex; flex-direction: column; }
.post-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  padding: 24px 0;
  border-bottom: .5px solid var(--line);
  cursor: pointer;
  transition: background .15s;
  position: relative;
  align-items: flex-start;
}
.post-row::before {
  content: ''; position: absolute; inset: 0 -16px;
  background: transparent; border-radius: 8px;
  transition: background .15s;
  z-index: -1;
}
.post-row:hover::before { background: rgba(255,255,255,.025); }
.post-row:first-child { border-top: .5px solid var(--line); }
.post-row .date {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--fg-mute);
  padding-top: 4px;
  letter-spacing: 0.02em;
}
.post-row .body { min-width: 0; }
.post-row .title {
  font-size: 22px; font-weight: 600; letter-spacing: -0.015em;
  line-height: 1.25; margin: 0 0 8px;
  color: var(--fg);
  transition: color .15s;
  text-wrap: balance;
}
.post-row:hover .title { color: var(--accent); }
.post-row .summary {
  color: var(--fg-dim); font-size: 14.5px; line-height: 1.55;
  margin: 0 0 10px;
  max-width: 640px;
  text-wrap: pretty;
}
.post-row .arrow {
  display: inline-block; opacity: 0;
  transition: transform .15s, opacity .15s;
  color: var(--accent);
  margin-left: 8px;
}
.post-row:hover .arrow { opacity: 1; transform: translateX(4px); }

/* ── Post page ───────────────────────────────────────── */
.post-header {
  padding: 64px 0 40px;
  border-bottom: .5px solid var(--line);
}
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--fg-mute); cursor: pointer;
  margin-bottom: 32px;
}
.back-link:hover { color: var(--accent); }
.post-title {
  font-size: clamp(36px, 5.5vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 24px;
  text-wrap: balance;
}
.post-title .accent { color: var(--accent); }
.post-lead {
  font-size: 20px; line-height: 1.55;
  color: var(--fg-dim);
  max-width: 640px; margin: 0 0 36px;
  text-wrap: pretty;
}
.post-meta {
  display: flex; align-items: center; gap: 18px;
  color: var(--fg-dim); font-size: 13.5px;
  flex-wrap: wrap;
}
.post-meta .avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #1a0033; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 13px;
}
.post-meta .author-name { color: var(--fg); font-weight: 500; font-size: 14px; }
.post-meta .author-handle { color: var(--accent); font-family: var(--font-mono); font-size: 12px; }
.post-meta .sep { width: 3px; height: 3px; background: var(--fg-faint); border-radius: 50%; }
.post-meta .dim { font-family: var(--font-mono); font-size: 12px; color: var(--fg-mute); }
.post-meta .author { display: flex; align-items: center; gap: 12px; }
.post-meta .avatar-group {
  display: flex;
  align-items: center;
}
.post-meta .avatar-group .avatar-overlap {
  margin-left: -10px;
  box-shadow: 0 0 0 2px var(--bg);
}

/* ── Article body ───────────────────────────────────── */
.article {
  padding: 56px 0 64px;
  font-size: 16.5px; line-height: 1.78;
  color: rgba(232,232,237,.86);
}
.article > * { margin-bottom: 22px; }
.article p { text-wrap: pretty; margin: 0 0 22px; }
.article p b, .article p strong { color: var(--fg); font-weight: 600; }
.article h2 {
  font-size: 28px; line-height: 1.2;
  font-weight: 700; letter-spacing: -0.022em;
  color: var(--fg);
  margin: 56px 0 18px;
  display: flex; align-items: center; gap: 14px;
}
.article h2::before {
  content: '##';
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 17px; font-weight: 500;
  opacity: 0.75;
}
.article h3 {
  font-size: 20px; line-height: 1.3;
  font-weight: 600; letter-spacing: -0.012em;
  color: var(--fg);
  margin: 40px 0 14px;
  display: flex; align-items: center; gap: 10px;
}
.article h3::before {
  content: '###';
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 13px; opacity: 0.7;
}
.article h4 {
  font-size: 17px; line-height: 1.3;
  font-weight: 600; letter-spacing: -0.008em;
  color: var(--fg);
  margin: 32px 0 12px;
  display: flex; align-items: center; gap: 10px;
}
.article h4::before {
  content: '####';
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 12px; opacity: 0.65;
}
.article ul, .article ol {
  list-style: none; padding: 0; margin: 0 0 22px;
}
.article ul li, .article ol li {
  position: relative; padding-left: 24px;
  margin-bottom: 10px; font-size: 16px; line-height: 1.65;
}
.article ul li::before {
  content: '▸'; position: absolute; left: 0; top: 0;
  color: var(--accent); font-family: var(--font-mono);
}
.article ol { counter-reset: ol-counter; }
.article ol li { counter-increment: ol-counter; }
.article ol li::before {
  content: counter(ol-counter) '.'; position: absolute; left: 0; top: 0;
  color: var(--accent); font-family: var(--font-mono); font-size: 13px;
}
.article ul li b, .article ol li b { color: var(--fg); font-weight: 600; }
.article :not(pre) > code, .article p code, .article li code, .article h2 code, .article h3 code, .article h4 code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 1px 7px; border-radius: 5px;
  border: .5px solid oklch(0.72 0.22 300 / 0.18);
  white-space: nowrap;
}
.article .ic {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 1px 7px; border-radius: 5px;
  border: .5px solid oklch(0.72 0.22 300 / 0.18);
  white-space: nowrap;
}
.article a:not(.back-link):not(.author-card a) {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: oklch(0.72 0.22 300 / 0.4);
  text-underline-offset: 3px;
}
.article img {
  max-width: 100%; height: auto;
  border-radius: 8px;
  border: .5px solid var(--line-2);
  margin: 8px 0;
}
.article blockquote {
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  padding: 14px 22px;
  border-radius: 0 10px 10px 0;
  margin: 28px 0;
  color: var(--fg-dim);
  font-style: italic;
}
.article blockquote p { margin-bottom: 0; }
.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 14.5px;
}
.article table th, .article table td {
  padding: 10px 14px;
  border-bottom: .5px solid var(--line);
  text-align: left;
}
.article table th {
  font-weight: 600;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.article hr {
  border: 0;
  border-top: .5px solid var(--line);
  margin: 40px 0;
}

/* Callouts */
.callout {
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  padding: 18px 22px;
  border-radius: 0 10px 10px 0;
  margin: 28px 0;
  font-size: 15.5px; line-height: 1.66;
}
.callout.warn { border-left-color: #febc2e; background: rgba(254,188,46,.06); }
.callout.info { border-left-color: rgba(255,255,255,.3); background: rgba(255,255,255,.03); }
.callout-label {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--accent); letter-spacing: 0.1em;
  margin-bottom: 6px; font-weight: 600;
}
.callout.warn .callout-label { color: #febc2e; }
.callout.info .callout-label { color: var(--fg-dim); }

/* Post footer */
.post-footer {
  padding: 48px 0;
  border-top: .5px solid var(--line);
}
.author-card {
  display: flex; gap: 18px; align-items: center;
  padding: 24px;
  background: rgba(255,255,255,.025);
  border: .5px solid var(--line-2);
  border-radius: 14px;
  margin-bottom: 14px;
}
.author-card:last-of-type { margin-bottom: 0; }
.author-card .avatar-lg {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #1a0033; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 18px;
}
.author-card .name { font-size: 15px; font-weight: 600; }
.author-card .role { color: var(--fg-dim); font-size: 13px; margin-top: 2px; }
.author-card .handle { color: var(--accent); font-family: var(--font-mono); font-size: 12px; margin-top: 4px; }
.author-card .follow {
  margin-left: auto;
  padding: 8px 14px; border-radius: 8px;
  background: var(--accent); color: #1a0033;
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: 0;
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.author-card .follow:hover { filter: brightness(1.08); }

.next-posts {
  margin-top: 40px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.next-card {
  padding: 22px;
  background: rgba(255,255,255,.025);
  border: .5px solid var(--line-2);
  border-radius: 12px;
  cursor: pointer;
  transition: all .15s;
}
.next-card:hover { background: rgba(255,255,255,.045); border-color: var(--accent); }
.next-card .label { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-mute); letter-spacing: .08em; margin-bottom: 10px; }
.next-card .title { font-size: 15px; font-weight: 600; line-height: 1.35; }
.next-card.next .label::before { content: '→  '; color: var(--accent); }
.next-card.prev .label::before { content: '←  '; color: var(--accent); }

/* 404 */
.notfound {
  padding: 120px 28px;
  text-align: center;
}
.notfound .code {
  font-family: var(--font-mono);
  color: var(--accent);
  margin-bottom: 20px;
  font-size: 14px;
}
.notfound h1 {
  font-size: 48px;
  margin: 0 0 16px;
  letter-spacing: -.02em;
}
.notfound p {
  color: var(--fg-dim);
  font-size: 17px;
}
.notfound a { color: var(--accent); }

/* Responsive */
@media (max-width: 768px) {
  .nav-inner { padding: 0 18px; gap: 12px; }
  .nav-links { display: none; }
  .container, .container-prose { padding: 0 18px; }
  .post-row { grid-template-columns: 1fr; gap: 6px; }
  .post-row .date { padding-top: 0; }
  .next-posts { grid-template-columns: 1fr; }
  .author-card { flex-wrap: wrap; }
  .author-card .follow { margin-left: 0; }
}
