:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #15181d;
  --muted: #5b6370;
  --border: #e3e6eb;
  --accent: #0f8f7e;
  --accent-text: #ffffff;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.05), 0 8px 24px rgb(16 24 40 / 0.06);
  --shadow-hover: 0 2px 4px rgb(16 24 40 / 0.06), 0 16px 40px rgb(16 24 40 / 0.12);
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1014;
    --surface: #161a20;
    --text: #e8ebef;
    --muted: #9aa3ae;
    --border: #262c35;
    --accent: #3ad1bb;
    --accent-text: #06231f;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3);
    --shadow-hover: 0 12px 36px rgb(0 0 0 / 0.45);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.site-header, main, .site-footer {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 16px;
}

@media (min-width: 640px) {
  .site-header, main, .site-footer { padding-inline: 32px; }
}

/* Header */
.site-header { padding-top: 72px; padding-bottom: 48px; }

.handle {
  margin: 0 0 8px;
  font: 500 0.875rem/1 "JetBrains Mono", ui-monospace, monospace;
  color: var(--accent);
}

.site-header h1 {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.lede {
  margin: 16px 0 20px;
  max-width: 34em;
  font-size: 1.125rem;
  color: var(--muted);
}

.profile {
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
}
.profile:hover { border-color: var(--accent); color: var(--accent); }

/* Cards */
.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.shot {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--border);
}
.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 22px 22px;
}

.body h2, .body h3 {
  margin: 0 0 6px;
  font: 600 1.125rem/1.3 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.body p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.95rem;
}

.body code {
  font: 500 0.85em "JetBrains Mono", ui-monospace, monospace;
  overflow-wrap: anywhere;
}

.links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { border-color: var(--muted); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn--primary:hover { filter: brightness(1.08); border-color: var(--accent); }

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

/* Featured */
.featured {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
@media (min-width: 860px) {
  .featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.card--feature .body { padding: 24px 26px 26px; }
.card--feature h2 { font-size: 1.5rem; }
.card--feature p { font-size: 1rem; }

/* Grid */
.section-title {
  margin: 64px 0 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 20px;
}

/* Footer */
.site-footer {
  padding-top: 56px;
  padding-bottom: 56px;
  font-size: 0.9rem;
  color: var(--muted);
}
.site-footer a { text-decoration-color: var(--border); text-underline-offset: 3px; }
.site-footer a:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .card, .btn { transition: none; }
  .card:hover { transform: none; }
}
