:root {
  --bg: #07090f;
  --bg-soft: #0c1220;
  --surface-1: rgba(14, 20, 33, 0.78);
  --surface-2: rgba(16, 24, 40, 0.92);
  --surface-3: rgba(10, 16, 29, 0.72);
  --surface-4: rgba(10, 16, 29, 0.68);
  --text: #edf2ff;
  --text-strong: #eaf2ff;
  --text-muted: #a8b3ca;
  --text-soft: #ccd7ed;
  --line: rgba(148, 163, 184, 0.25);
  --line-strong: rgba(125, 211, 252, 0.7);
  --brand: #7dd3fc;
  --brand-2: #a78bfa;
  --chip-text: #d8e6ff;
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  --radius-pill: 999px;
  --radius-card: 16px;
  --radius-md: 12px;
  --space-1: 0.4rem;
  --space-2: 0.7rem;
  --space-3: 1rem;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at -10% -20%, rgba(125, 211, 252, 0.18), transparent 60%),
    radial-gradient(900px 550px at 110% -20%, rgba(167, 139, 250, 0.18), transparent 60%),
    radial-gradient(1100px 700px at 50% 140%, rgba(59, 130, 246, 0.14), transparent 70%),
    linear-gradient(180deg, #060910, #080c14 35%, #070a10 100%);
  line-height: 1.65;
}

.wrap {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

a {
  color: #c5f3ff;
  text-underline-offset: 2px;
}

a:hover { color: #e8faff; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  background: rgba(7, 10, 16, 0.72);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.brand {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #dbeafe;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface-3);
  color: var(--chip-text);
  border-radius: var(--radius-pill);
  padding: 0.34rem 0.75rem;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle:hover { border-color: var(--line-strong); }

.topnav,
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.topnav a,
.nav a {
  text-decoration: none;
  border: 1px solid var(--line);
  color: var(--chip-text);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.8rem;
  font-size: 0.92rem;
  background: transparent;
}

.topnav a:hover,
.nav a:hover { border-color: var(--line-strong); }

.hero {
  padding: 4.5rem 0 2.2rem;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--brand);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5.4vw, 4rem);
  line-height: 1.08;
  max-width: 16ch;
}

.lede {
  margin-top: 1.1rem;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.9vw, 1.22rem);
  max-width: 68ch;
}

.pill-row {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  border: 1px solid rgba(125, 211, 252, 0.35);
  border-radius: var(--radius-pill);
  padding: 0.26rem 0.7rem;
  font-size: 0.8rem;
  color: #cff8ff;
  background: rgba(13, 25, 39, 0.74);
}

.cta-row {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  font-weight: 640;
  border-radius: var(--radius-md);
  padding: 0.65rem var(--space-3);
  border: 1px solid transparent;
}

.button.primary {
  color: #08101d;
  background: linear-gradient(95deg, var(--brand), var(--brand-2));
}

.button.ghost {
  color: #dde9ff;
  border-color: var(--line);
  background: rgba(11, 18, 31, 0.75);
}

.section {
  margin: 1rem 0 1.3rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-3);
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: linear-gradient(160deg, var(--surface-1), var(--surface-2));
  box-shadow: var(--shadow);
  padding: 1.05rem;
}

.card h2,
.card h3 {
  margin-top: 0.1rem;
}

.card p { color: var(--text-soft); }

.profile-card .profile-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0.15rem 0 0.55rem;
}

.profile-card .avatar {
  width: 110px;
  height: 110px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
  flex: 0 0 auto;
}

.profile-card .profile-lede {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.48;
}

.card ul { margin: 0.4rem 0 0.3rem; padding-left: 1.1rem; }

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

.kicker {
  color: #9fc5ff;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.nav { margin-top: 1rem; gap: 0.55rem; }

.muted { color: var(--text-muted); }

.mono-list {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0;
}

.mono-list li {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.92rem;
  margin-bottom: 0.45rem;
}

.agent-block {
  margin-top: 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(8, 13, 24, 0.9);
  padding: 0.8rem;
  overflow-x: auto;
  color: #d5def2;
  font-size: 0.88rem;
  line-height: 1.48;
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.post-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-3);
  padding: 0.8rem;
}

.post-meta {
  margin: 0 0 0.3rem;
  color: #9ec5ff;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.post-title {
  margin: 0 0 0.38rem;
  font-size: 1.05rem;
  line-height: 1.35;
}

.post-title a {
  color: var(--text-strong);
  text-decoration: none;
}

.post-title a:hover {
  color: #c8f6ff;
  text-decoration: underline;
}

.post-summary {
  margin: 0;
  color: #b8c6df;
  font-size: 0.94rem;
}

.archive-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}

.archive-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.archive-control-label {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.density-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(9, 14, 24, 0.82);
  padding: 0.15rem;
}

.density-chip {
  border: 0;
  background: transparent;
  color: var(--chip-text);
  border-radius: var(--radius-pill);
  padding: 0.26rem 0.62rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.density-chip.is-active {
  background: rgba(125, 211, 252, 0.18);
  color: #e8f7ff;
}

.archive-list {
  display: grid;
  gap: 0.65rem;
}

.archive-group {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-4);
  padding: 0.58rem 0.7rem;
}

.archive-summary {
  cursor: pointer;
  color: #dce9ff;
  font-weight: 600;
}

.archive-posts {
  margin: 0.6rem 0 0.15rem;
  padding-left: 1rem;
}

.archive-posts li { margin-bottom: 0.28rem; }
.archive-posts li[hidden] { display: none; }
.archive-posts a { color: #cde7ff; text-decoration: none; }
.archive-posts a:hover { text-decoration: underline; }

.archive-more {
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(10, 16, 29, 0.5);
  color: var(--chip-text);
  padding: 0.24rem 0.64rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.archive-more:hover { border-color: var(--line-strong); }

.archive-density-compact .archive-group { padding: 0.45rem 0.6rem; }
.archive-density-compact .archive-posts { margin-top: 0.45rem; }
.archive-density-compact .archive-posts li {
  margin-bottom: 0.12rem;
  font-size: 0.92rem;
}

.site-header {
  padding: 3.6rem 0 1.8rem;
}

main.wrap {
  padding-bottom: 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

th,
td {
  border: 1px solid var(--line);
  padding: 0.52rem;
  text-align: left;
}

th {
  background: rgba(125, 211, 252, 0.1);
}

code {
  background: rgba(148, 163, 184, 0.16);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 7px;
  padding: 0.08rem 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9em;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 1.8rem;
  padding: 1rem 0 2rem;
  color: var(--text-muted);
}

@media (max-width: 960px) {
  .col-4,
  .col-6,
  .col-8 { grid-column: span 12; }
  .split,
  .feed-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 3.2rem; }
}

@media (max-width: 680px) {
  .topbar-inner {
    min-height: 58px;
    padding: 0.5rem 0;
    position: relative;
  }

  .nav-toggle { display: inline-flex; }

  .topnav {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 0.35rem);
    flex-direction: column;
    gap: 0.35rem;
    width: min(78vw, 240px);
    padding: 0.52rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(8, 12, 20, 0.96);
    box-shadow: var(--shadow);
  }

  .topbar-inner.is-nav-open .topnav { display: flex; }

  .topnav a {
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    padding: 0.34rem 0.68rem;
  }

  .archive-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-card .profile-head {
    align-items: flex-start;
  }

  .profile-card .avatar {
    width: 92px;
    height: 92px;
    border-radius: 14px;
  }

  .site-header { padding-top: 2.5rem; }
  .card { padding: 0.95rem 0.9rem; }
}
