:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #111827;
  --muted: #667085;
  --line: #dde3ea;
  --accent: #1677ff;
  --accent-dark: #0b56c9;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 22px 18px;
  display: flex;
  align-items: baseline;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  font-weight: 900;
  letter-spacing: -1px;
}

.brand-geek {
  font-size: 2.2rem;
}

.brand-atoz {
  color: var(--accent);
  font-size: 1.55rem;
}

.tagline {
  color: var(--muted);
  font-size: .95rem;
}

.main-nav {
  border-top: 1px solid var(--line);
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 52px;
  overflow-x: auto;
  white-space: nowrap;
  font-size: .85rem;
  font-weight: 800;
  letter-spacing: .035em;
}

.main-nav a {
  padding: 17px 0 14px;
  border-bottom: 3px solid transparent;
}

.main-nav a:hover {
  border-bottom-color: var(--accent);
}

.search-link {
  margin-left: auto;
  font-size: 1.2rem;
}

.site-main {
  min-height: 60vh;
}

.home-shell,
.listing-shell,
.article-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 42px 22px 64px;
}

.hero {
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  min-height: 390px;
  overflow: hidden;
}

.hero-copy {
  padding: 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-copy h1 {
  margin: 8px 0 14px;
  font-size: clamp(2.3rem, 5vw, 4.7rem);
  line-height: .98;
  letter-spacing: -3px;
}

.hero-copy p {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.1rem;
}

.hero-art {
  min-height: 320px;
  background: #101827;
}

.hero-art img,
.card-image img,
.article-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-art {
  height: 100%;
  min-height: 390px;
  display: grid;
  place-items: center;
  color: white;
  font-size: clamp(3rem, 7vw, 6.4rem);
  font-weight: 900;
  line-height: .85;
  text-align: center;
  letter-spacing: -5px;
}

.button {
  display: inline-block;
  align-self: flex-start;
  margin-top: 12px;
  background: var(--accent);
  color: white;
  padding: 11px 17px;
  font-weight: 800;
  border-radius: 4px;
}

.button:hover {
  color: white;
  background: var(--accent-dark);
}

.eyebrow,
.kicker {
  color: var(--accent);
  text-transform: uppercase;
  font-size: .76rem;
  letter-spacing: .12em;
  font-weight: 900;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 48px 0 18px;
}

.section-heading h2,
.listing-header h1 {
  margin: 2px 0 0;
  font-size: 2rem;
  letter-spacing: -1px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 190px 1fr;
  min-height: 190px;
}

.card-image {
  background: #e9edf2;
  min-height: 190px;
}

.card-placeholder {
  width: 100%;
  height: 100%;
  min-height: 190px;
  display: grid;
  place-items: center;
  padding: 20px;
  font-weight: 900;
  text-align: center;
  color: #344054;
  background: linear-gradient(135deg, #e8edf3, #f9fafb);
}

.card-body {
  padding: 21px;
}

.card-body h3,
.list-item h2 {
  margin: 5px 0 8px;
  line-height: 1.15;
  letter-spacing: -.5px;
}

.card-body p,
.list-item p,
.dek {
  color: var(--muted);
}

.meta {
  color: #8a94a3;
  font-size: .84rem;
  margin-top: 14px;
}

.article-shell {
  max-width: 860px;
}

.article-header {
  padding: 20px 0 30px;
}

.article-header h1 {
  margin: 8px 0 14px;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  line-height: 1;
  letter-spacing: -3px;
}

.dek {
  font-size: 1.2rem;
  max-width: 760px;
}

.article-hero-image {
  max-height: 520px;
  margin-bottom: 34px;
}

.article-content {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: clamp(26px, 5vw, 58px);
  font-size: 1.08rem;
}

.article-content h2,
.article-content h3 {
  margin-top: 1.7em;
  line-height: 1.15;
}

.article-content a {
  color: var(--accent-dark);
  text-decoration: underline;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tag {
  background: #e9eef5;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .82rem;
}

.listing-header {
  margin-bottom: 28px;
}

.article-list {
  display: grid;
  gap: 14px;
}

.list-item {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 28px;
}

.site-footer {
  background: #101827;
  color: #e5e7eb;
  padding: 34px 22px 20px;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.copyright {
  max-width: var(--max);
  margin: 20px auto 0;
  padding-top: 16px;
  border-top: 1px solid #293241;
  color: #9ca3af;
  font-size: .82rem;
}

@media (max-width: 850px) {
  .brand-wrap {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 34px 28px;
  }

  .hero-art {
    min-height: 240px;
  }

  .placeholder-art {
    min-height: 240px;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand-geek { font-size: 1.8rem; }
  .brand-atoz { font-size: 1.25rem; }

  .main-nav {
    gap: 18px;
  }

  .card {
    grid-template-columns: 1fr;
  }

  .card-image,
  .card-placeholder {
    min-height: 180px;
  }

  .article-header h1 {
    letter-spacing: -2px;
  }

  .footer-inner {
    flex-direction: column;
  }
}
