@font-face {
  font-family: 'Inter Tight';
  src: url('/assets/fonts/inter-tight.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --lime: #e1fb98;
  --lime-deep: #b6d94a;
  --ink: #14150f;
  --ink-soft: #4a4d40;
  --paper: #fbfbf7;
  --line: #e2e3d8;
  --card: #ffffff;
  --measure: 68ch;
  --wrap: 1080px;
  --pad: clamp(1.25rem, 5vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f3ea;
    --ink-soft: #a8ab9c;
    --paper: #14150f;
    --line: #2e3025;
    --card: #1c1e15;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter Tight', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 1.6rem + 3vw, 3.75rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem); margin-top: 2em; }
h3 { font-size: clamp(1.2rem, 1.1rem + 0.6vw, 1.4rem); margin-top: 1.8em; }
h4 { font-size: 1.05rem; margin-top: 1.6em; }

p, ul, ol { margin: 0 0 1.15em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.4em; }
li > p { margin-bottom: 0.4em; }

a { color: inherit; text-decoration-color: var(--lime-deep); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { text-decoration-color: currentColor; }

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

hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

:focus-visible { outline: 3px solid var(--lime-deep); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--lime); color: #14150f; padding: 0.75rem 1.25rem; z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- layout ---------- */

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

main { flex: 1 0 auto; padding-bottom: 5rem; }

.prose { max-width: var(--measure); }

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
}

.site-header .wrap {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 72px; flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; margin-right: auto; flex-shrink: 0; }
.brand img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.brand span { font-weight: 600; font-size: 1.15rem; letter-spacing: -0.03em; }

.site-nav { display: flex; gap: clamp(0.9rem, 2.5vw, 1.75rem); flex-wrap: wrap; }
.site-nav a {
  text-decoration: none; font-size: 0.95rem; font-weight: 500;
  color: var(--ink-soft); padding: 0.25rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current='page'] { color: var(--ink); border-bottom-color: var(--lime-deep); }

/* A two-row header is fine on narrow screens, but not a two-row *sticky* one --
   it eats the viewport. Release the sticky positioning and let the nav wrap, so
   every link stays visible rather than scrolling off the edge. */
@media (max-width: 760px) {
  .site-header { position: static; }
  .site-header .wrap { padding-block: 0.75rem; min-height: 0; gap: 0.5rem 1.25rem; }
  .brand { margin-right: 0; flex-basis: 100%; }
  .site-nav a { white-space: nowrap; }
}

/* ---------- hero + marquee ---------- */

/* padding-block, not the padding shorthand: .hero shares its element with .wrap,
   and the shorthand would reset .wrap's padding-inline to 0. */
.hero { padding-block: clamp(3rem, 9vw, 6.5rem) clamp(2rem, 5vw, 3.5rem); }
.hero h1 { max-width: 15ch; }
.hero .lede { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); color: var(--ink-soft); max-width: 52ch; }

.marquee {
  background: var(--lime); color: #14150f;
  overflow: hidden; padding: 0.7rem 0;
  border-top: 1px solid var(--lime-deep); border-bottom: 1px solid var(--lime-deep);
  user-select: none;
}
.marquee__track { display: flex; width: max-content; animation: slide 34s linear infinite; }
.marquee span {
  font-size: clamp(1.1rem, 0.9rem + 1vw, 1.6rem); font-weight: 600;
  letter-spacing: -0.02em; padding-right: 1.5rem; white-space: nowrap;
}
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  .marquee { text-align: center; }
}

/* ---------- buttons ---------- */

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 0.7rem 1.4rem; border-radius: 999px; border: 1.5px solid var(--ink);
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--lime); border-color: var(--lime); color: #14150f; }
.btn--primary:hover { background: var(--lime-deep); border-color: var(--lime-deep); }

/* ---------- cards / grids ---------- */

.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 2.5rem 0; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 1.5rem;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.section { padding-top: clamp(2rem, 5vw, 3.5rem); }

.pill {
  display: inline-block; background: var(--lime); color: #14150f;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.28rem 0.7rem; border-radius: 999px; margin-bottom: 1rem;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 1.5rem 0; list-style: none; }
.tag-list li {
  margin: 0; font-size: 0.9rem; padding: 0.35rem 0.85rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
}

.callout {
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--lime-deep);
  border-radius: 0 12px 12px 0; padding: 1.35rem 1.5rem; margin: 2rem 0;
}
.callout p:last-child { margin-bottom: 0; }

.embed { margin: 2rem 0; }
.embed iframe { width: 100%; max-width: 660px; height: 175px; border: 0; border-radius: 12px; }

/* ---------- blog ---------- */

.post-list { list-style: none; padding: 0; margin: 2.5rem 0 0; }
.post-list li { border-top: 1px solid var(--line); margin: 0; }
.post-list li:last-child { border-bottom: 1px solid var(--line); }
.post-list a {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 1.25rem;
  padding: 1.4rem 0; text-decoration: none;
}
.post-list a:hover h3 { text-decoration: underline; text-decoration-color: var(--lime-deep); text-decoration-thickness: 2px; }
.post-list h3 { margin: 0; font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem); flex: 1 1 20ch; }
.post-meta { color: var(--ink-soft); font-size: 0.875rem; font-variant-numeric: tabular-nums; }

.post-header { padding-block: clamp(2.5rem, 6vw, 4rem) 0; }
.post-header .post-meta { display: block; margin-bottom: 1rem; }

.post-nav {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  border-top: 1px solid var(--line); margin-top: 3.5rem; padding-top: 1.5rem;
  font-size: 0.95rem;
}
.post-nav a { text-decoration: none; font-weight: 500; }
.post-nav a:hover { text-decoration: underline; }
.post-nav span { color: var(--ink-soft); display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- legal ---------- */

.legal { max-width: var(--measure); }
.legal p { margin-bottom: 1em; }
.legal h1 { font-size: clamp(1.9rem, 1.5rem + 2vw, 2.75rem); }
.legal h2 { font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.6rem); }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 3rem 0 2.5rem;
  font-size: 0.925rem;
  flex-shrink: 0;
}
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 0.9rem; color: var(--ink-soft); font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { text-decoration: none; color: var(--ink-soft); }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer address { font-style: normal; color: var(--ink-soft); }
.colophon {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  color: var(--ink-soft); font-size: 0.85rem;
}
