:root {
  color-scheme: light;
  --bg: #f7f5f1;
  --ink: #1c1b18;
  --muted: #6a6257;
  --accent: #435a7c;
  --surface: #ffffff;
  --border: #d8d2c9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 24px 6vw;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 5;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.95rem;
  color: var(--muted);
}

.site-nav a {
  padding: 6px 8px;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.site-nav a:hover {
  background: rgba(67, 90, 124, 0.12);
  color: var(--ink);
}

.site-main {
  padding: 48px 6vw 72px;
}

.hero {
  max-width: 720px;
  margin-bottom: 48px;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
}

.hero-intro {
  font-size: 1.1rem;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.card {
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(28, 27, 24, 0.08);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 6px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.section {
  max-width: 720px;
}

.playground {
  max-width: 1100px;
}

.section-intro {
  color: var(--muted);
  margin-bottom: 24px;
}

.placeholder {
  padding: 20px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.6);
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.button,
button,
.playground-actions button {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.prose {
  line-height: 1.7;
}

.stack-list {
  display: grid;
  gap: 20px;
}

.stack-item {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.stack-form p {
  margin-bottom: 12px;
}

.section.narrow {
  max-width: 420px;
}

.project-links {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.photo-card {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.photo-card img,
.featured-image {
  width: 100%;
  display: block;
  object-fit: cover;
}

.photo-card figcaption {
  padding: 16px;
}

.playground-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 24px;
  max-width: 1100px;
}

.playground-sidebar {
  font-size: 0.9rem;
}

.example-list,
.schema-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.example-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.example-button {
  flex: 1;
  text-align: left;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: 8px;
}

#sql-editor {
  width: 100%;
  font-family: "SFMono-Regular", Menlo, monospace;
  font-size: 0.95rem;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  resize: vertical;
}

.playground-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 20px;
}

.query-status {
  color: var(--muted);
  font-size: 0.9rem;
}

.query-results table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.query-results th,
.query-results td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.query-results th {
  background: rgba(67, 90, 124, 0.08);
}

@media (max-width: 800px) {
  .playground-layout {
    grid-template-columns: 1fr;
  }
}
