/* ByteDispatch — news site styling */

:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --ink-soft: #4a4a52;
  --line: #e6e6ec;
  --accent: #ff0066;
  --accent-2: #00d4ff;
  --accent-3: #b8ff00;
  --hero-bg: #0a0a0a;
  --section-ai: #ff0066;
  --section-hardware: #00d4ff;
  --section-software: #b8ff00;
  --section-startups: #ff8c00;
  --section-reviews: #c084fc;
  --section-tech: #00d4ff;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a.story-link:hover .headline { color: var(--accent); }
a.external:hover { color: var(--accent); text-decoration: underline; }

.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(180%) blur(8px);
}
.masthead-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.brand-mark {
  display: inline-block;
  background: var(--ink);
  color: var(--accent-3);
  font-weight: 900;
  width: 28px; height: 28px;
  border-radius: 6px;
  text-align: center;
  line-height: 28px;
  transform: translateY(2px);
}
.brand-name {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.brand-tagline {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 500;
}
.section-nav {
  display: flex;
  gap: 22px;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.section-nav a:hover { color: var(--accent); }
.masthead-meta {
  font-size: 12px;
  color: var(--ink-soft);
  text-align: right;
}

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.hero {
  position: relative;
  background: var(--hero-bg);
  color: #fff;
  border-radius: 24px;
  padding: 48px 56px;
  margin-bottom: 48px;
  overflow: hidden;
  isolation: isolate;
}
.hero-inner {
  max-width: 720px;
  position: relative;
  z-index: 2;
}
.hero-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero .hero-headline {
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 0 0 18px 0;
}
.hero .hero-deck {
  font-size: clamp(16px, 1.5vw, 19px);
  color: #d0d0d8;
  margin: 0 0 24px 0;
  max-width: 640px;
  line-height: 1.55;
}
.hero .byline { color: #fff; }
.hero .timestamp, .hero .read-time { color: #b0b0b8; }
.hero-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #b0b0b8;
  margin-bottom: 24px;
}
.hero-cta {
  display: inline-block;
  font-weight: 800;
  color: var(--accent-3);
  border-bottom: 2px solid var(--accent-3);
  padding-bottom: 2px;
  font-size: 16px;
}
.hero-cta:hover { color: var(--accent-2); border-color: var(--accent-2); }
.hero-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}
.hero-blob-1 {
  width: 360px; height: 360px;
  background: var(--accent);
  top: -80px; right: -60px;
}
.hero-blob-2 {
  width: 300px; height: 300px;
  background: var(--accent-2);
  bottom: -100px; right: 180px;
}
.hero-blob-3 {
  width: 220px; height: 220px;
  background: var(--accent-3);
  top: 40%; right: 80px;
  opacity: 0.35;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
}
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .hero { padding: 32px 24px; }
}

.section-rule {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-top: 3px solid var(--ink);
  padding-top: 12px;
  margin: 0 0 24px 0;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 28px;
}
@media (max-width: 700px) {
  .story-grid { grid-template-columns: 1fr; }
}
.story-grid .section-rule { grid-column: 1 / -1; }

.story-card {
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
}
.story-card .story-link { display: block; }
.section-tag {
  display: inline-block;
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
  color: #fff;
  background: #444;
}
.section-ai { background: var(--section-ai); }
.section-hardware { background: var(--section-hardware); color: #001b22; }
.section-software { background: var(--section-software); color: #1a2200; }
.section-startups { background: var(--section-startups); }
.section-reviews { background: var(--section-reviews); color: #220a36; }
.section-tech { background: var(--section-tech); color: #001b22; }

.headline {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 8px 0;
  transition: color 120ms ease;
}
.deck {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 12px 0;
}
.story-meta, .article-meta {
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.byline { font-weight: 700; color: var(--ink); }
.meta-sep { opacity: 0.5; }

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.sidebar-block {
  border-top: 3px solid var(--ink);
  padding-top: 14px;
}
.sidebar-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 16px 0;
}
.rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rank-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}
.rank-list .rank {
  font-family: "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  min-width: 22px;
}
.rank-list a:hover { color: var(--accent); }

.sidebar-newsletter {
  background: var(--ink);
  color: #fff;
  padding: 24px;
  border-radius: 16px;
  border-top: none;
}
.sidebar-newsletter .sidebar-title { color: var(--accent-3); }
.sidebar-newsletter p {
  margin: 0 0 16px 0;
  color: #c8c8d0;
  font-size: 14px;
  line-height: 1.5;
}
.newsletter-form {
  display: flex;
  gap: 8px;
}
.newsletter-form input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #333;
  background: #1a1a20;
  color: #fff;
  font-size: 14px;
}
.newsletter-form input::placeholder { color: #888; }
.newsletter-form button {
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: var(--accent-3);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  font-size: 14px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fafafa;
  padding: 40px 24px 32px;
  margin-top: 64px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.footer-brand { display: flex; gap: 12px; align-items: center; font-weight: 800; }
.footer-nav, .footer-social {
  display: flex;
  gap: 22px;
  font-size: 13px;
  font-weight: 700;
  flex-wrap: wrap;
}
.footer-social { justify-content: flex-end; }
.footer-fineprint {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-soft);
}
@media (max-width: 700px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-social { justify-content: flex-start; }
}

/* Article page */
.article-page .page { padding-top: 32px; }
.article {
  max-width: 760px;
  margin: 32px auto 64px;
  padding: 0 24px;
}
.article-headline {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  margin: 12px 0 16px;
  font-weight: 900;
}
.article-deck {
  font-size: 20px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 24px;
}
.article-body {
  font-size: 18px;
  line-height: 1.7;
  margin-top: 32px;
}
.article-body p {
  margin: 0 0 22px 0;
}
.article-related {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 3px solid var(--ink);
}
.article-related h2 {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 16px 0;
}
.article-related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.article-related a {
  font-weight: 700;
  font-size: 17px;
}
.article-related a:hover { color: var(--accent); }

/* Mobile */
@media (max-width: 720px) {
  .masthead-inner {
    padding: 12px 16px;
    gap: 12px;
    grid-template-columns: 1fr auto;
  }
  .brand { gap: 8px; }
  .brand-name { font-size: 18px; }
  .brand-tagline { display: none; }
  .section-nav { display: none; }
  .masthead-meta { font-size: 11px; line-height: 1.2; }
  .masthead-date { white-space: nowrap; }

  .page { padding: 20px 16px 48px; }

  .hero {
    padding: 28px 20px;
    border-radius: 18px;
    margin-bottom: 32px;
  }
  .hero .hero-headline { font-size: clamp(28px, 7vw, 36px); }
  .hero .hero-deck { font-size: 16px; }
  .hero-blob { filter: blur(60px); opacity: 0.4; }
  .hero-blob-1 { width: 240px; height: 240px; }
  .hero-blob-2 { width: 200px; height: 200px; bottom: -80px; right: 80px; }
  .hero-blob-3 { width: 140px; height: 140px; right: 40px; }

  .content-grid { gap: 32px; }
  .story-grid { gap: 24px 20px; }
  .headline { font-size: 20px; }
  .deck { font-size: 14px; }

  .sidebar-newsletter { padding: 20px; }
  .newsletter-form { flex-direction: column; gap: 8px; }
  .newsletter-form button { padding: 12px 16px; }

  .site-footer { padding: 28px 16px 20px; margin-top: 48px; }
  .footer-fineprint { font-size: 11px; }

  .article { margin: 24px auto 48px; padding: 0 16px; }
  .article-deck { font-size: 17px; }
  .article-body { font-size: 17px; line-height: 1.65; }
  .article-related { margin-top: 40px; }
  .article-related a { font-size: 16px; }
}

@media (max-width: 480px) {
  .masthead-meta { display: none; }
  .masthead-inner { grid-template-columns: 1fr; }
}
