/* =========================================
   Tokens
   ========================================= */
:root {
  --ink: #0D0F12;
  --surface: #14171D;
  --surface-2: #1B1F26;
  --border: #262B33;
  --text: #E7E5E0;
  --muted: #8B93A1;
  --accent: #F2A93B;
  /* amber - keywords */
  --accent-2: #45D9C4;
  /* teal - strings/links */

  --font-display: "JetBrains Mono", ui-monospace, monospace;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --radius: 10px;
  --wrap: 880px;
}

/* =========================================
   Reset & base
   ========================================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

a:hover,
a:focus-visible {
  border-color: var(--accent-2);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================
   Header
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13, 15, 18, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  border-bottom: none;
}

.logo .dot {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 24px;
}

.nav a {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--muted);
  border-bottom: none;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--accent-2);
}

/* =========================================
   Hero
   ========================================= */
.hero {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: start;
  padding: 64px 24px 56px;
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.eyebrow {
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 0.85rem;
  margin: 0 0 8px;
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.tagline {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 46ch;
  margin: 0 0 28px;
}

/* Code card — signature element */
.code-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 420px;
}

.code-card-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.code-card-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.red {
  background: #E5645B;
}

.dot.yellow {
  background: #E5C158;
}

.dot.green {
  background: #5FB878;
}

.code-card-title {
  margin-left: 8px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--muted);
}

.code-card-body {
  margin: 0;
  padding: 18px 20px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
}

.code-card-body .kw {
  color: var(--accent);
}

.code-card-body .str {
  color: var(--accent-2);
}

.code-card-body .prop {
  color: var(--text);
}

.code-card-body .var {
  color: #C792EA;
}

/* =========================================
   Content sections (rendered markdown)
   ========================================= */
.content-section {
  padding: 24px 24px 80px;
  border-top: 1px solid var(--border);
}

.content-section .loading {
  font-family: var(--font-display);
  color: var(--muted);
}

.content-section h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text);
  margin: 56px 0 16px;
  padding-top: 8px;
  scroll-margin-top: 88px;
}

.content-section h2::before {
  content: "// ";
  color: var(--accent);
}

.content-section h2:first-child {
  margin-top: 0;
}

.content-section p {
  color: var(--muted);
  max-width: 68ch;
}

.content-section strong {
  color: var(--text);
  font-weight: 600;
}

.content-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.content-section li {
  color: var(--muted);
  padding-left: 22px;
  position: relative;
  max-width: 68ch;
}

.content-section li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--accent-2);
  font-family: var(--font-display);
}

.content-section li strong {
  color: var(--text);
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-family: var(--font-display);
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 640px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 40px 20px 40px;
  }

  .hero-photo {
    width: 140px;
  }

  .nav {
    gap: 14px;
  }

  .nav a {
    font-size: 0.75rem;
  }
}

/* =========================================
   Reduced motion
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  a,
  .nav a {
    transition: none;
  }
}