:root {
  color-scheme: dark light;
  --bg: #1b1e20;
  --surface: #26292c;
  --border: #34383c;
  --text: #e8eaed;
  --muted: #9aa0a6;
  --accent-from: #6a85e8;
  --accent-to: #8a4fb8;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --border: #dde0e5;
    --text: #1d2125;
    --muted: #5f6670;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

header, main {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

header { padding-top: 1.5rem; padding-bottom: 1.5rem; }
header a { color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.25rem; }
main { padding-bottom: 4rem; }

section { margin-bottom: 3rem; }
h2 { font-size: 1.4rem; margin: 0 0 1rem; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.list { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }

.card {
  display: grid;
  grid-template-columns: 280px 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}

.card:hover { border-color: var(--accent-from); transform: translateY(-2px); }

.thumb { position: relative; display: block; min-height: 160px; background: var(--border); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.body { display: flex; flex-direction: column; padding: 1.1rem 1.25rem; }
.body h3 { margin: 0 0 0.4rem; font-size: 1.15rem; line-height: 1.3; }
.body h3 a { color: var(--text); text-decoration: none; }
.subtitle { margin: 0; color: var(--muted); font-size: 0.95rem; }

.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.btn {
  background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
  color: #fff;
  text-decoration: none;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}

.post { max-width: 720px; margin: 0 auto; }
.post h1 { margin-bottom: 0.25rem; }
.post img { max-width: 100%; height: auto; border-radius: 10px; }
.post a { color: var(--accent-from); }
.post pre {
  overflow-x: auto;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

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

@media (max-width: 520px) {
  .card { grid-template-columns: 1fr; }
  .thumb { min-height: 0; aspect-ratio: 16 / 9; }
}