/* styles.css — minimal, responsive theme inspired by Twenty Twenty-Five */
/* 1. Root tokens */
:root{
  /* fluid type scale */
  --step--1: clamp(0.83rem, 0.77rem + 0.26vw, 0.94rem);
  --step-0: clamp(1.00rem, 0.93rem + 0.35vw, 1.13rem);
  --step-1: clamp(1.20rem, 1.11rem + 0.47vw, 1.35rem);
  --step-2: clamp(1.44rem, 1.32rem + 0.61vw, 1.62rem);
  --step-3: clamp(1.73rem, 1.57rem + 0.79vw, 1.94rem);
  --step-4: clamp(2.07rem, 1.87rem + 1.01vw, 2.33rem);
  --step-5: clamp(2.49rem, 2.22rem + 1.29vw, 2.80rem);

  /* color system (auto dark mode) */
  color-scheme: light dark;
  --bg: light-dark(#fafafa, #0b0b0c);
  --surface: light-dark(#ffffff, #111216);
  --text: light-dark(#101114, #e9eaee);
  --muted: light-dark(#5d606c, #b7bac5);
  --border: light-dark(#e6e7eb, #2a2c33);
  --primary: light-dark(#0c62f3, #6aa2ff);
  --primary-ink: light-dark(#ffffff, #0b0b0c);

  --radius: 1.25rem;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.08);
}

/* 2. Reset & base */
*,
*::before,
*::after{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, Arial, sans-serif;
  line-height: 1.6;
  font-size: var(--step-0);
  background: var(--bg);
  color: var(--text);
  text-rendering: optimizeLegibility;
}
img, svg, video{ max-width: 100%; height: auto; }
a{ color: var(--primary); text-decoration-thickness: .08em; text-underline-offset: .12em; }
a:hover{ text-decoration: none; }
:focus-visible{ outline: 3px solid var(--primary); outline-offset: 2px; }
.container{ width: min(1100px, 92vw); margin-inline: auto; }
.skip-link{
  position: absolute; left: -999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus{ left: 1rem; top: 1rem; width: auto; height: auto; padding: .5rem .75rem; background: var(--surface); border-radius: .5rem; box-shadow: var(--shadow); }

/* 3. Header & nav */
.site-header{
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in oklab, var(--surface) 85%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner{
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 0;
}
.site-title{
  font-weight: 700; letter-spacing: .2px;
  font-size: var(--step-1); color: var(--text); text-decoration: none;
}
.primary-nav .nav-toggle{
  display: inline-flex; align-items: center; gap: .5rem;
  background: transparent; border: 1px solid var(--border); border-radius: .6rem;
  padding: .45rem .7rem; color: var(--text); cursor: pointer;
}
.menu{
  list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0;
}
.menu a{
  display: inline-block; padding: .5rem .65rem; border-radius: .5rem; color: var(--text); text-decoration: none;
}
.menu a:hover{ background: color-mix(in oklab, var(--border) 45%, transparent); }
.menu .is-current{ background: var(--text); color: var(--primary-ink); }
@media (max-width: 800px){
  .menu{ display: none; position: absolute; right: 4vw; top: 64px; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: .8rem; padding: .5rem; box-shadow: var(--shadow); }
  .menu.is-open{ display: flex; }
}

/* 4. Hero */
.hero{ position: relative; padding: 5rem 0 3rem; overflow: clip; }
.hero-title{ font-size: var(--step-5); line-height: 1.06; letter-spacing: -0.02em; margin: 0 0 1rem; }
.hero-subtitle{ color: var(--muted); font-size: var(--step-1); margin: 0 0 1.25rem; max-width: 60ch; }
.hero-cta{ display: flex; gap: .75rem; flex-wrap: wrap; }
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1rem; border-radius: .9rem; border: 1px solid var(--border);
  background: var(--text); color: var(--primary-ink); text-decoration: none; font-weight: 600;
  box-shadow: var(--shadow);
}
.btn:hover{ transform: translateY(-1px); }
.btn-ghost{ background: transparent; color: var(--text); }

.hero-art{
  position: absolute; inset: auto 0 0 0; height: 240px; pointer-events: none;
}
.hero-art svg{ width: 100%; height: 100%; display: block; }
.hero-art stop:first-child{ stop-color: color-mix(in oklab, var(--primary) 34%, transparent); }
.hero-art stop:last-child{ stop-color: color-mix(in oklab, var(--primary) 10%, transparent); }
.hero-art .dot{ fill: color-mix(in oklab, var(--primary) 18%, transparent); }

/* 5. Grid section */
.section-header{ display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 3rem 0 1rem; }
.section-header h2{ font-size: var(--step-3); margin: 0; }
.link-more{ white-space: nowrap; }

.post-grid{
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}
.card{
  grid-column: span 3;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; min-height: 100%;
  box-shadow: var(--shadow);
}
.card-media{ display: block; }
.media-placeholder{
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(45% 45% at 30% 35%, color-mix(in oklab, var(--primary) 24%, transparent), transparent 60%),
    radial-gradient(60% 60% at 80% 30%, color-mix(in oklab, var(--primary) 18%, transparent), transparent 60%),
    linear-gradient(180deg, color-mix(in oklab, var(--primary) 10%, transparent), transparent);
  border-bottom: 1px solid var(--border);
}
.card-body{ padding: 1rem; display: grid; gap: .4rem; }
.eyebrow{ color: var(--muted); font-size: var(--step--1); text-transform: uppercase; letter-spacing: .08em; margin: 0; }
.card-title{ font-size: var(--step-1); margin: 0; line-height: 1.2; }
.card-title a{ color: inherit; text-decoration: none; }
.card-title a:hover{ text-decoration: underline; text-decoration-thickness: .08em; }
.card-excerpt{ margin: 0 0 .25rem; color: var(--muted); }
.card-read{ font-weight: 600; text-decoration: none; }
.card-read:hover{ text-decoration: underline; }

@media (max-width: 1100px){
  .card{ grid-column: span 4; }
}
@media (max-width: 700px){
  .card{ grid-column: 1 / -1; }
}

/* 6. CTA */
.cta{ margin: 4rem auto; }
.cta-inner{
  border: 2px dashed var(--border); border-radius: calc(var(--radius) + .25rem);
  padding: 2rem; text-align: center; background: color-mix(in oklab, var(--surface) 60%, transparent);
}
.cta-inner h2{ margin: 0 0 .25rem; font-size: var(--step-3); }
.cta-inner p{ margin: 0 0 1rem; color: var(--muted); }

/* 7. Footer */
.site-footer{
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
.footer-inner{
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.social{ list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; }
.social a{ text-decoration: none; }
@media (max-width: 700px){
  .footer-inner{ flex-direction: column; align-items: flex-start; }
}

/* 8. Utilities */
.hidden{ display: none !important; }
.visually-hidden{ position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
