/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Fira Code', 'Share Tech Mono', 'Courier New', Courier, monospace;
  background: #fff;
  color: #000;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #000;
  text-decoration: none;
  transition: opacity 220ms ease;
}

a:hover {
  opacity: 0.6;
}

p {
  line-height: 1.7;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Fira Code', 'Share Tech Mono', monospace;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.8rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.2rem, 3vw, 2rem); }
h3 { font-size: clamp(1rem, 2.5vw, 1.4rem); }

/* ===== LAYOUT CONTAINER ===== */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== HEADER & NAV ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #000;
  color: #fff;
  border-bottom: 1px solid #222;
}

.site-header nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header nav > p {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  min-height: 56px;
  padding: 0.5rem 0;
}

.site-header nav > p a {
  color: #fff;
  font-family: 'Fira Code', monospace;
  font-size: 0.78rem;
  font-weight: 400;
  padding: 0.55rem 0.75rem;
  border-radius: 0;
  white-space: nowrap;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.01em;
  transition: background 220ms ease, color 220ms ease;
}

.site-header nav > p a:hover {
  background: #fff;
  color: #000;
  opacity: 1;
}

.brand-center {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  border: 1px solid #fff;
  padding: 0.4rem 1rem !important;
  margin-right: 0.5rem;
}

.nav-cta {
  margin-left: 0.5rem;
}

/* ===== PILL BUTTONS ===== */
.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: 28px;
  border: 1.5px solid #000;
  background: transparent;
  color: #000;
  font-family: 'Fira Code', monospace;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  min-height: 40px;
  transition: background 220ms ease, color 220ms ease, border-color 220ms ease;
  white-space: nowrap;
  text-decoration: none;
}

.pill-btn:hover {
  background: #000;
  color: #fff;
  opacity: 1;
}

.pill-btn.primary {
  background: #000;
  color: #fff;
}

.pill-btn.primary:hover {
  background: #fff;
  color: #000;
}

.site-header .pill-btn {
  border-color: #fff;
  color: #fff;
}

.site-header .pill-btn:hover {
  background: #fff;
  color: #000;
}

/* ===== EYEBROW TAG ===== */
.eyebrow-tag {
  display: inline-block;
  font-family: 'Fira Code', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid #000;
  padding: 0.2rem 0.6rem;
  border-radius: 28px;
  margin-bottom: 1rem;
}

/* ===== HERO SECTION (HOME) ===== */
.hero-section {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid #000;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  min-height: 40vh;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
}

.hero-text h1 {
  margin: 0;
}

.hero-desc {
  font-size: 1rem;
  line-height: 1.7;
  max-width: 480px;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img {
  width: 100%;
  border-radius: 4px;
  object-fit: cover;
}

.hero-grid-decor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #000;
  border: 1px solid #000;
  width: 100%;
  aspect-ratio: 4/3;
}

.grid-num {
  background: #fff;
  font-family: 'Fira Code', monospace;
  font-size: 2.5rem;
  font-weight: 700;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.05em;
  transition: background 220ms ease, color 220ms ease;
}

.hero-grid-decor:hover .grid-num {
  background: #000;
  color: #fff;
}

/* ===== CONTENT SECTION (shared) ===== */
.content-section {
  padding: 3rem 0;
}

.content-inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}

/* ===== ASIDE ===== */
aside {
  position: sticky;
  top: 80px;
  border-right: 1px solid #000;
  padding-right: 2rem;
}

.aside-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.aside-title span {
  display: inline;
}

.aside-nav p {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.aside-nav a {
  font-size: 0.82rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid transparent;
  display: block;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: border-color 220ms ease;
}

.aside-nav a:hover {
  border-bottom-color: #000;
  opacity: 1;
}

.aside-divider {
  height: 1px;
  background: #000;
  margin: 1.2rem 0;
}

.aside-count {
  font-size: 0.85rem;
}

.aside-stat {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

.aside-stat p {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.stat-num {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 400;
}

.aside-brand-info {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.aside-brand-desc {
  font-size: 0.78rem;
  line-height: 1.6;
  font-weight: 300;
}

.aside-note {
  font-size: 0.78rem;
  line-height: 1.6;
  font-weight: 300;
}

/* ===== TOPIC TAGS ===== */
.topic-tags {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

.topic-tag {
  font-size: 0.78rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid #000;
  border-radius: 28px;
  display: inline-block;
  text-align: center;
  transition: background 220ms ease, color 220ms ease;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topic-tag:hover {
  background: #000;
  color: #fff;
  opacity: 1;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  min-width: 0;
}

.page-content {
  font-size: 1rem;
  line-height: 1.8;
  font-weight: 300;
}

.page-content h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
  border-top: 1px solid #000;
  padding-top: 1rem;
}

.page-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.page-content p {
  margin-bottom: 1rem;
}

.page-content ul, .page-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.page-content li {
  margin-bottom: 0.4rem;
}

.page-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-content blockquote {
  border-left: 3px solid #000;
  padding-left: 1rem;
  font-style: italic;
  margin: 1.5rem 0;
  font-weight: 300;
}

/* ===== HOME CARDS ===== */
.child-cards {
  margin-top: 3rem;
  border-top: 1px solid #000;
  padding-top: 2rem;
}

.child-cards h2 {
  margin-bottom: 1.5rem;
}

.child-cards h2 span {
  display: inline;
}

.home-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto auto;
  gap: 0.4rem 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid #000;
  align-items: start;
  border-radius: 28px;
  padding: 1.2rem;
  background: #f8f8f8;
  margin-bottom: 1rem;
}

.home-card .card-date {
  grid-column: 1 / -1;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  font-weight: 400;
  color: #555;
}

.home-card h3 {
  grid-column: 1 / 3;
  font-size: 1.05rem;
}

.home-card h3 span {
  display: inline;
}

.home-card .card-desc {
  grid-column: 1 / 3;
  font-size: 0.88rem;
  line-height: 1.6;
  font-weight: 300;
}

.home-card .pill-btn {
  grid-column: 3;
  grid-row: 2 / 4;
  align-self: center;
}

/* ===== TOPIC HERO ===== */
.page-hero {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid #000;
}

.topic-hero-inner,
.about-header-inner,
.privacy-header-inner {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-width: 720px;
}

.topic-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topic-meta time {
  font-size: 0.78rem;
  font-weight: 400;
  color: #555;
  letter-spacing: 0.05em;
}

.topic-desc,
.about-lead,
.privacy-lead {
  font-size: 1.05rem;
  line-height: 1.7;
  font-weight: 300;
}

/* ===== TOPIC CHILD CARDS ===== */
.child-list {
  margin-top: 3rem;
  border-top: 1px solid #000;
  padding-top: 2rem;
}

.child-list h2 {
  margin-bottom: 1.5rem;
}

.child-list h2 span {
  display: inline;
}

.topic-card {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  grid-template-rows: auto auto auto;
  gap: 0.3rem 1rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid #e0e0e0;
  align-items: start;
}

.topic-card:last-child {
  border-bottom: none;
}

.card-num {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding-top: 0.15rem;
  grid-row: 1 / 3;
}

.topic-card .card-date {
  grid-column: 2;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: #555;
}

.topic-card h3 {
  grid-column: 2;
  font-size: 1rem;
}

.topic-card h3 span {
  display: inline;
}

.topic-card .card-desc {
  grid-column: 2;
  font-size: 0.85rem;
  line-height: 1.6;
  font-weight: 300;
}

.topic-card .pill-btn {
  grid-column: 3;
  grid-row: 1 / 4;
  align-self: center;
}

/* ===== ARTICLE HEADER ===== */
.article-header-section {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid #000;
}

.article-header-inner {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-width: 800px;
}

.article-breadcrumb {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.bc-sep {
  opacity: 0.4;
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.pub-date, .mod-date {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: #555;
}

.article-lead {
  font-size: 1.05rem;
  line-height: 1.7;
  font-weight: 300;
}

.article-hero-img {
  margin-top: 1rem;
}

.article-hero-img img {
  width: 100%;
  border-radius: 4px;
  max-height: 360px;
  object-fit: cover;
}

/* ===== ARTICLE BODY ===== */
.article-body {
  padding-top: 0.5rem;
}

.article-footer-nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #000;
}

/* ===== RELATED LINKS ===== */
.related-links {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.related-link {
  font-size: 0.78rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  min-height: 40px;
  transition: border-color 220ms ease;
  line-height: 1.4;
}

.related-link:hover {
  border-bottom-color: #000;
  opacity: 1;
}

.rel-num {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* ===== ABOUT / PRIVACY SECTIONS ===== */
.about-header-section,
.privacy-header-section {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid #000;
}

/* ===== FOOTER ===== */
footer {
  margin-top: auto;
  background: #000;
  color: #fff;
  padding: 4rem 1.5rem 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 2rem 3rem;
  max-width: 100%;
}

footer > div {
  padding-bottom: 2rem;
}

.footer-brand {
  grid-column: 1;
  grid-row: 1;
}

.footer-big-brand {
  font-family: 'Fira Code', monospace;
  font-size: clamp(1.5rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.75rem;
  color: #fff;
}

.footer-slogan {
  font-size: 0.82rem;
  font-weight: 300;
  color: #aaa;
  max-width: 360px;
  line-height: 1.6;
}

.footer-nav {
  grid-column: 2;
  grid-row: 1;
}

.footer-info {
  grid-column: 3;
  grid-row: 1;
}

footer h3 {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 1rem;
}

footer h3 span {
  display: inline;
}

footer nav p {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

footer a {
  color: #ccc;
  font-size: 0.82rem;
  padding: 0.4rem 0;
  display: block;
  border-bottom: 1px solid transparent;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: color 220ms ease, border-color 220ms ease;
}

footer a:hover {
  color: #fff;
  border-bottom-color: #fff;
  opacity: 1;
}

footer p a {
  display: flex;
}

.footer-info p {
  display: flex;
}

.footer-copy {
  grid-column: 1 / -1;
  grid-row: 2;
  border-top: 1px solid #222;
  padding: 1rem 0;
}

.footer-copy p {
  font-size: 0.72rem;
  color: #555;
  letter-spacing: 0.05em;
}

/* ===== TIME ELEMENTS ===== */
time {
  font-family: 'Fira Code', monospace;
}

/* ===== SCROLL REVEAL ===== */
@media (prefers-reduced-motion: no-preference) {
  .home-card,
  .topic-card,
  .hero-text,
  .hero-media {
    opacity: 0;
    transform: translateY(16px);
    animation: reveal 400ms ease forwards;
  }

  .home-card:nth-child(2) { animation-delay: 60ms; }
  .home-card:nth-child(3) { animation-delay: 120ms; }
  .home-card:nth-child(4) { animation-delay: 180ms; }
  .topic-card:nth-child(2) { animation-delay: 60ms; }
  .topic-card:nth-child(3) { animation-delay: 120ms; }
  .topic-card:nth-child(4) { animation-delay: 180ms; }
  .hero-media { animation-delay: 100ms; }

  @keyframes reveal {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  footer {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-copy {
    grid-column: 1 / -1;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    min-height: auto;
  }

  .hero-grid-decor {
    max-width: 360px;
    margin: 0 auto;
  }

  .content-inner {
    grid-template-columns: 1fr;
  }

  aside {
    position: static;
    border-right: none;
    border-bottom: 1px solid #000;
    padding-right: 0;
    padding-bottom: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .aside-nav p {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .aside-nav a {
    border: 1px solid #000;
    border-radius: 28px;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    min-height: 40px;
  }

  .topic-tags {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .site-header nav > p {
    gap: 0.15rem;
    padding: 0.4rem 0;
  }

  .site-header nav > p a {
    font-size: 0.7rem;
    padding: 0.45rem 0.5rem;
  }

  .brand-center {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.7rem !important;
  }

  .hero-section {
    padding: 2.5rem 0 2rem;
  }

  .hero-text {
    gap: 0.8rem;
  }

  footer {
    grid-template-columns: 1fr;
    padding: 2.5rem 1.5rem 0;
    gap: 1.5rem 0;
  }

  .footer-nav,
  .footer-info {
    grid-column: 1;
    grid-row: auto;
  }

  .home-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .home-card .pill-btn {
    grid-column: 1;
    grid-row: auto;
    width: fit-content;
  }

  .topic-card {
    grid-template-columns: 2rem 1fr;
  }

  .topic-card .pill-btn {
    grid-column: 1 / -1;
    grid-row: auto;
    width: fit-content;
  }

  .article-footer-nav {
    flex-direction: column;
  }

  .article-footer-nav .pill-btn {
    text-align: center;
    width: 100%;
    justify-content: center;
  }

  h1 {
    font-size: 1.6rem;
  }
}
