/* frostvex.icu — minimal indie dev site */

:root {
  --bg: #0c1018;
  --bg-panel: #161c28;
  --bg-elevated: #1c2334;
  --border: #2a3245;
  --border-strong: #3a4358;
  --fg: #dce2eb;
  --fg-dim: #82909b;
  --fg-faint: #525c6c;
  --accent: #5eead4;
  --accent-dim: #2d8477;
  --accent-deep: #134e4a;
  --warm: #f0a260;
  --green: #a0dc82;
  --red: #f06f7c;
  --code-bg: #0a0e16;
  --max-width: 800px;
  --max-width-wide: 1100px;
  --radius: 6px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Text", system-ui, sans-serif;
  --font-mono: "SF Mono", "Menlo", "Consolas", "DejaVu Sans Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms;
}
a:hover { border-bottom-color: var(--accent); }

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

/* ─── Top nav ─── */
.nav {
  border-bottom: 1px solid var(--border);
  background: rgba(12, 16, 24, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  border: 0;
}
.nav-brand:hover { border: 0; color: var(--accent); }
.nav-brand svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
}
.nav-links {
  display: flex;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.nav-links a {
  color: var(--fg-dim);
  border: 0;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--fg); }

@media (max-width: 640px) {
  .nav-links { gap: 12px; font-size: 12px; }
}

/* ─── Hero ─── */
.hero {
  position: relative;
  padding: 90px 0 60px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/01-hero.jpg") center/cover no-repeat;
  opacity: 0.55;
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, var(--bg) 92%);
  z-index: 1;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 24px;
}
.hero h1 {
  font-family: var(--font-mono);
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.hero h1 .accent { color: var(--accent); }
.hero .ver {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-dim);
  margin-bottom: 20px;
}
.hero p.lead {
  font-size: clamp(18px, 2vw, 24px);
  max-width: 640px;
  color: var(--fg);
  margin: 0 0 32px;
  line-height: 1.45;
}
.hero .cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: all 150ms;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

/* ─── Code block ─── */
pre, code {
  font-family: var(--font-mono);
  font-size: 14px;
}
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow-x: auto;
  line-height: 1.55;
  color: #c8d0db;
}
:not(pre) > code {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.92em;
  color: var(--accent);
}
pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
}

/* Token coloring (manually applied with .tok-* classes) */
.tok-comment { color: var(--fg-faint); font-style: italic; }
.tok-keyword { color: #c084fc; }
.tok-string  { color: #fda4af; }
.tok-number  { color: #fbbf24; }
.tok-prompt  { color: var(--warm); font-weight: 600; }
.tok-flag    { color: var(--accent); }
.tok-fn      { color: var(--accent); }

/* ─── Sections ─── */
section { padding: 64px 0; }
section + section { border-top: 1px solid var(--border); }

h2 {
  font-family: var(--font-mono);
  font-size: clamp(24px, 3vw, 32px);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
  color: var(--fg);
}
h2 .hash { color: var(--accent-dim); margin-right: 6px; }

h3 {
  font-family: var(--font-mono);
  font-size: 18px;
  margin: 32px 0 8px;
  color: var(--fg);
}

p { margin: 0 0 16px; color: var(--fg); }
p.muted, .muted { color: var(--fg-dim); }

ul, ol { padding-left: 22px; }
li { margin: 6px 0; }

hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }

/* ─── Feature grid ─── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  margin-top: 36px;
}
.feature {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  transition: border-color 200ms;
}
.feature:hover { border-color: var(--border-strong); }
.feature-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  color: var(--accent);
}
.feature-icon img,
.feature-icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.feature h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--fg);
}
.feature p {
  margin: 0;
  font-size: 14px;
  color: var(--fg-dim);
  line-height: 1.5;
}

/* ─── Terminal screenshot ─── */
.terminal {
  margin: 32px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.45);
  max-width: 100%;
}
.terminal img { display: block; width: 100%; height: auto; }

/* ─── Install one-liner ─── */
.install-block {
  display: flex;
  align-items: stretch;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 36px 0;
  overflow-x: auto;
}
.install-block pre {
  flex: 1;
  margin: 0;
  border: 0;
  padding: 18px 20px;
  background: transparent;
  font-size: 14px;
}
.install-block .install-copy {
  border: 0;
  border-left: 1px solid var(--border);
  background: transparent;
  color: var(--fg-dim);
  padding: 0 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  letter-spacing: 0.05em;
}
.install-block .install-copy:hover { color: var(--accent); }

/* ─── Doc layout (sidebar + content) ─── */
.doc-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  padding: 60px 0;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
@media (max-width: 800px) {
  .doc-layout { grid-template-columns: 1fr; gap: 24px; }
}
.doc-side {
  font-family: var(--font-mono);
  font-size: 13px;
  position: sticky;
  top: 70px;
  align-self: start;
}
.doc-side h4 {
  margin: 24px 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-faint);
  font-weight: 500;
}
.doc-side h4:first-child { margin-top: 0; }
.doc-side ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.doc-side li { margin: 4px 0; }
.doc-side a {
  color: var(--fg-dim);
  border: 0;
  display: block;
  padding: 4px 10px;
  border-left: 2px solid transparent;
}
.doc-side a:hover { color: var(--accent); }
.doc-side a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: linear-gradient(90deg, var(--accent-deep) 0%, transparent 100%);
}
.doc-content { min-width: 0; }
.doc-content h1 {
  font-family: var(--font-mono);
  font-size: 32px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.doc-content > .muted { margin-bottom: 32px; }
.doc-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
  font-size: 14px;
  font-family: var(--font-mono);
}
.doc-content th, .doc-content td {
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}
.doc-content th { color: var(--fg-faint); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.doc-content code { white-space: nowrap; }

/* ─── Blog ─── */
.posts {
  display: grid;
  gap: 28px;
  margin-top: 36px;
}
.post-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  overflow: hidden;
  transition: border-color 200ms, transform 200ms;
}
.post-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.post-card a { color: var(--fg); border: 0; display: contents; }
.post-card .cover {
  background-size: cover;
  background-position: center;
  min-height: 140px;
}
.post-card .body { padding: 22px; }
.post-card h3 { margin: 0 0 6px; font-size: 17px; color: var(--fg); }
.post-card .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-faint);
  margin-bottom: 8px;
}
.post-card p { margin: 0; font-size: 14px; color: var(--fg-dim); line-height: 1.55; }
@media (max-width: 640px) {
  .post-card { grid-template-columns: 1fr; }
  .post-card .cover { min-height: 160px; }
}

.post-content {
  padding: 60px 0;
  max-width: var(--max-width);
  margin: 0 auto;
}
.post-content .post-cover {
  width: 100%;
  height: 320px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  margin-bottom: 36px;
}
.post-content .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.post-content h1 {
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}
.post-content blockquote {
  margin: 24px 0;
  padding: 12px 20px;
  border-left: 3px solid var(--accent);
  color: var(--fg-dim);
  background: var(--bg-panel);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ─── Changelog ─── */
.changelog-entry {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.changelog-entry h3 {
  margin: 0 0 4px;
  font-size: 18px;
}
.changelog-entry .date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-faint);
}
.changelog-entry ul { margin-top: 12px; }

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  margin-top: 60px;
}
.footer-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-faint);
  gap: 16px;
  flex-wrap: wrap;
}
.footer a { color: var(--fg-dim); border: 0; }
.footer a:hover { color: var(--accent); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ─── Misc ─── */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-elevated);
  color: var(--fg-dim);
  border: 1px solid var(--border);
  margin-right: 6px;
}
.tag-accent { color: var(--accent); border-color: var(--accent-dim); }

.callout {
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: var(--bg-panel);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 20px 0;
  font-size: 14px;
  color: var(--fg-dim);
}

/* ─── 404 ─── */
.notfound {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}
.notfound .num {
  font-family: var(--font-mono);
  font-size: clamp(80px, 16vw, 160px);
  color: var(--accent);
  margin: 0;
  letter-spacing: -0.02em;
}
.notfound p { font-size: 18px; max-width: 480px; }

/* ─── Selection ─── */
::selection { background: var(--accent); color: var(--bg); }
