:root {
  --bg: #0e0f12;
  --surface: #16181d;
  --surface-2: #1c1f26;
  --fg: #f3f5f7;
  --muted: #9aa3ad;
  --accent: #22d3ee;
  --accent-dim: #0e7490;
  --accent-2: #a78bfa;
  --border: #23262d;
  --maxw: 1140px;
  --radius: 14px;
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #06131a; padding: .5rem 1rem; font-weight: 600;
}
.skip:focus { left: 0; z-index: 20; }

:where(a, button):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}

/* Header / nav */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: var(--maxw); margin-inline: auto;
  padding: .9rem 1.25rem;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em;
  text-decoration: none; font-size: 1.15rem;
}
.site-nav { display: flex; gap: 1.4rem; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500;
  transition: color .15s ease;
}
.site-nav a:hover { color: var(--accent); }

main { max-width: var(--maxw); margin-inline: auto; padding-inline: 1.25rem; }

/* Hero */
.hero { position: relative; padding-block: 5.5rem 2.5rem; overflow: hidden; }
/* Twin aurora glows fill the desktop void: teal anchored left behind the text,
   violet drifting on the right where the layout would otherwise be empty. */
.hero::before {
  content: ""; position: absolute; inset: -60% -20% auto -15%;
  height: 760px;
  background:
    radial-gradient(45% 55% at 22% 35%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%),
    radial-gradient(40% 50% at 80% 30%, color-mix(in srgb, var(--accent-2) 24%, transparent), transparent 72%);
  pointer-events: none; z-index: 0;
  animation: aurora 18s ease-in-out infinite alternate;
}
@keyframes aurora {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.08); }
}
/* Wide enough that the display word never clips against .hero's overflow:hidden;
   the tagline keeps its own narrower 34ch measure below. */
.hero__inner { position: relative; z-index: 1; max-width: 34ch; }
.hero__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.8rem, 8vw, 5rem); line-height: 1.0; letter-spacing: -.04em;
  margin: 0 0 .6rem;
  background: linear-gradient(120deg, var(--fg) 30%, var(--accent) 70%, var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__tagline { font-size: clamp(1.1rem, 2.5vw, 1.4rem); color: var(--muted); margin: 0; max-width: 34ch; }
.hero__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  margin: 1.8rem 0 0; font-size: .9rem;
}
.hero__count {
  color: var(--accent); font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 999px; padding: .25rem .8rem;
}
.hero__meta a { color: var(--muted); text-decoration: none; }
.hero__meta a:hover { color: var(--fg); }

/* Groups + grid */
.group { margin-block: 3.5rem; }
.group__title {
  font-family: var(--font-display); font-size: 1.45rem; letter-spacing: -.02em;
  margin: 0 0 1.4rem; display: flex; align-items: center; gap: .6rem;
}
.group__title::before {
  content: ""; width: 10px; height: 10px; border-radius: 3px;
  background: var(--accent); box-shadow: 0 0 16px var(--accent);
}
.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Cards */
.card {
  position: relative; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: 0 14px 40px rgba(0,0,0,.45), 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent);
}
.card__link { display: block; text-decoration: none; color: inherit; }
.card__shot {
  aspect-ratio: 1200 / 630; object-fit: cover; width: 100%; height: auto;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
  transition: transform .45s cubic-bezier(.2,.6,.2,1);
}
.card:hover .card__shot { transform: scale(1.05); }
.card__title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin: 1rem 1.1rem .4rem; }
.card__blurb { color: var(--muted); margin: 0 1.1rem 1rem; font-size: .94rem; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 1.1rem 1.1rem; padding: 0; }
.tag {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px; padding: .18rem .6rem;
}
.card__live {
  display: inline-block; margin: 0 1.1rem 1.1rem; font-size: .85rem;
  color: var(--accent); text-decoration: none; font-weight: 600;
}
.card__live:hover { text-decoration: underline; }

/* Detail page */
.breadcrumb { color: var(--muted); font-size: .9rem; margin-block: 1.5rem .5rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.detail__title { font-family: var(--font-display); font-size: clamp(1.9rem, 5vw, 2.8rem); letter-spacing: -.03em; margin: .25rem 0 1.2rem; }
.detail__shot { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1.5rem; }
.detail__summary { font-size: 1.12rem; max-width: 65ch; color: var(--fg); }
.detail__stack { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; list-style: none; margin: 1.5rem 0; }
.detail__links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0; }
.detail__links a {
  background: var(--accent); color: #06131a; text-decoration: none;
  padding: .6rem 1.1rem; border-radius: 10px; font-weight: 600;
  transition: filter .15s ease;
}
.detail__links a:hover { filter: brightness(1.12); }
/* Further reading — blog posts about a project. Quiet text links, not CTAs,
   so they sit below the action buttons without competing with them. */
.further { border-top: 1px solid var(--border); margin-top: 2.5rem; padding-top: 1.5rem; }
.further__title {
  font-family: var(--font-display); font-size: .8rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  margin: 0 0 .8rem;
}
.further__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.further__list a {
  color: var(--fg); text-decoration: none; font-size: 1rem;
  border-bottom: 1px solid transparent; transition: border-color .15s ease, color .15s ease;
}
.further__list a:hover { color: var(--accent); border-bottom-color: color-mix(in srgb, var(--accent) 45%, transparent); }

.prevnext { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--border); margin-top: 2.5rem; padding-top: 1.5rem; }
.prevnext a { color: var(--accent); text-decoration: none; font-weight: 600; }

/* Footer */
.site-footer {
  max-width: var(--maxw); margin-inline: auto; padding: 3rem 1.25rem;
  color: var(--muted); font-size: .9rem; border-top: 1px solid var(--border); margin-top: 3rem;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

@media (max-width: 560px) {
  .site-nav { gap: 1rem; }
  .site-header { padding-inline: 1rem; }
}
/* Native scroll-driven reveal — cards fade/rise as they enter the viewport.
   Uses the `translate` property so it composes with the hover `transform` lift.
   Progressive enhancement: skipped where view timelines or motion aren't wanted. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .grid .card {
      animation: card-reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 18%;
    }
    @keyframes card-reveal {
      from { opacity: 0; translate: 0 28px; }
      to   { opacity: 1; translate: 0 0; }
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .card__shot { transition: none; }
  .card:hover { transform: none; }
  .card:hover .card__shot { transform: none; }
  .hero::before { animation: none; }
}
