/* oscarflaviojr.com — single stylesheet. Black, quiet, typographic. */

/* ---------- tokens ---------- */

:root {
  --bg: #000;
  --bg-raised: #0d0d0f;
  --surface: #161618;
  --surface-2: #1d1d1f;
  --border: #242426;
  --border-strong: #3a3a3d;
  --fg: #f5f5f7;
  --fg-body: #d2d2d7;
  --muted: #a1a1a6;
  --subtle: #86868b;
  --link: #2997ff;
  --blue: #0071e3;
  --ok: #30d158;

  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  --step-4: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem);
  --step-5: clamp(3.5rem, 1.5rem + 9vw, 8.5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 5rem;
  --space-9: 8rem;

  --radius: 18px;
  --radius-lg: 28px;
  --page: 70rem;
  --measure: 40rem;
  --gutter: 1.25rem;
  --header-h: 3rem;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);

  color-scheme: dark;
}

@media (min-width: 48rem) {
  :root {
    --gutter: 2.5rem;
  }
}

@media (max-width: 47.99rem) {
  :root {
    --header-h: 5.5rem;
  }
}

/* ---------- base ---------- */

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: 400 var(--step-0) / 1.5 var(--font-sans);
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

main {
  flex: 1;
  padding-top: var(--header-h);
}

img,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

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

::selection {
  background: rgba(41, 151, 255, 0.4);
}

h1,
h2,
h3,
h4 {
  color: var(--fg);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 0;
}

p {
  text-wrap: pretty;
}

p,
ul,
ol,
dl,
figure {
  margin: 0;
}

code,
kbd,
pre {
  font-family: var(--font-mono);
  letter-spacing: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 500;
}

.skip-link:focus {
  top: var(--space-2);
}

.container {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.125em;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(22, 22, 23, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-6);
  min-height: 3rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--fg);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
  opacity: 0.8;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 7px;
  background: linear-gradient(145deg, #fafafa, #a8a8ad);
  color: #000;
  font: 700 0.625rem/1 var(--font-sans);
  letter-spacing: 0;
}

.site-nav ul {
  display: flex;
  justify-content: center;
  gap: var(--space-1);
  list-style: none;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 0.25rem 0.75rem;
  color: rgba(245, 245, 247, 0.8);
  font-size: 0.8125rem;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}

.site-nav a:hover {
  color: #fff;
  text-decoration: none;
}

.site-nav a[aria-current] {
  color: #fff;
}

.site-tools {
  display: flex;
  align-items: center;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  height: 1.625rem;
  padding: 0 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--fg);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.lang-switch:hover {
  background: rgba(255, 255, 255, 0.18);
  text-decoration: none;
}

@media (max-width: 47.99rem) {
  .site-header__inner {
    grid-template-columns: 1fr auto;
    gap: 0 var(--space-4);
    padding-top: var(--space-2);
  }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: calc(var(--gutter) - 0.75rem);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav ul {
    justify-content: flex-start;
    padding-block: var(--space-2);
  }

  .site-nav a {
    font-size: 0.875rem;
  }
}

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

.site-footer {
  margin-top: var(--space-9);
  padding-block: var(--space-7) var(--space-6);
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-size: 0.8125rem;
}

.site-footer__grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.site-footer__about {
  max-width: 20rem;
}

.site-footer__about p + p,
.site-footer__about .brand + p {
  margin-top: var(--space-3);
}

.site-footer h2 {
  margin-bottom: var(--space-3);
  color: var(--fg);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.site-footer ul {
  display: grid;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
}

.site-footer a {
  color: var(--subtle);
}

.site-footer a:hover {
  color: var(--fg);
  text-decoration: none;
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}

/* ---------- small shared pieces ---------- */

.eyebrow {
  display: block;
  color: var(--muted);
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.eyebrow a {
  color: inherit;
}

.lead {
  color: var(--muted);
  font-size: clamp(1.1875rem, 1rem + 0.7vw, 1.5rem);
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.meta {
  color: var(--subtle);
  font-size: 0.875rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  color: var(--link);
  font-size: var(--step-0);
  white-space: nowrap;
}

.link-arrow .icon {
  width: 0.8em;
  height: 0.8em;
  stroke-width: 2.25;
  transition: transform 0.2s var(--ease);
}

.link-arrow:hover .icon {
  transform: translateX(2px);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.4rem;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: var(--step-0);
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease);
}

.pill:hover {
  background: #0077ed;
  text-decoration: none;
}

.pill--ghost {
  background: transparent;
  color: var(--link);
  box-shadow: inset 0 0 0 1px var(--link);
}

.pill--ghost:hover {
  background: rgba(41, 151, 255, 0.1);
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 1.625rem;
  padding: 0 0.7rem;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font: 500 0.75rem/1 var(--font-sans);
  letter-spacing: 0;
  white-space: nowrap;
}

a.tag:hover,
button.tag:hover {
  color: var(--fg);
  background: var(--border-strong);
  text-decoration: none;
}

button.tag {
  cursor: pointer;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
}

.status-dot {
  position: relative;
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--ok);
  flex: none;
}

@media (prefers-reduced-motion: no-preference) {
  .status-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--ok);
    animation: pulse 2.6s var(--ease) infinite;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  70%,
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) 0;
  list-style: none;
  padding: 0;
  color: var(--subtle);
  font-size: 0.8125rem;
}

.breadcrumbs li + li::before {
  content: "›";
  padding-inline: 0.5rem;
}

.breadcrumbs a {
  color: var(--subtle);
}

.breadcrumbs a:hover {
  color: var(--fg);
  text-decoration: none;
}

.breadcrumbs [aria-current] {
  color: var(--muted);
}

/* app-style icon */

.app-icon {
  --c1: #2997ff;
  --c2: #0040a0;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  flex: none;
  border-radius: 22%;
  background: linear-gradient(160deg, var(--c1), var(--c2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 24px -8px color-mix(in srgb, var(--c1) 55%, transparent);
  color: #fff;
}

.app-icon .icon {
  width: 52%;
  height: 52%;
  stroke-width: 1.9;
}

.app-icon--sm {
  width: 2.75rem;
  height: 2.75rem;
}

/* ---------- hero (home) ---------- */

.hero {
  position: relative;
  padding-block: clamp(5rem, 3rem + 10vw, 10rem) var(--space-8);
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: min(70rem, 140vw);
  height: 32rem;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(41, 151, 255, 0.13), transparent);
  pointer-events: none;
}

.hero__inner {
  position: relative;
}

.hero__eyebrow {
  color: var(--muted);
  font-size: clamp(1.0625rem, 0.9rem + 0.6vw, 1.375rem);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.hero__title {
  margin-top: var(--space-3);
  font-size: var(--step-5);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.95;
  background: linear-gradient(180deg, #fff 30%, #9a9aa0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.06em;
}

.hero__statement {
  max-width: 40rem;
  margin: var(--space-5) auto 0;
  color: var(--fg-body);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-3) var(--space-6);
  margin-top: var(--space-7);
}

.hero__location {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-7);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: var(--step--1);
}

.hero__social {
  display: flex;
  justify-content: center;
  gap: var(--space-5);
  margin-top: var(--space-5);
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
}

.hero__social a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
}

.hero__social a:hover {
  color: var(--fg);
  text-decoration: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: rise 0.9s var(--ease) both;
  }

  .reveal--2 {
    animation-delay: 0.1s;
  }

  .reveal--3 {
    animation-delay: 0.2s;
  }

  .reveal--4 {
    animation-delay: 0.3s;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ---------- page hero (inner pages) ---------- */

.page-hero {
  padding-block: var(--space-8) var(--space-7);
}

.page-hero .breadcrumbs {
  margin-bottom: var(--space-6);
}

.page-hero .eyebrow {
  margin-bottom: var(--space-3);
}

.page-hero h1 {
  max-width: 18ch;
  font-size: var(--step-4);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.page-hero .lead {
  max-width: 42rem;
  margin-top: var(--space-5);
}

.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-6);
  margin-top: var(--space-6);
}

.page-hero .app-icon {
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: var(--space-5);
}

.feature-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-5);
  margin-top: var(--space-6);
  color: var(--muted);
  font-size: var(--step--1);
}

.feature-meta dl {
  display: contents;
}

.feature-meta dl div {
  display: flex;
  gap: var(--space-2);
}

.feature-meta dt {
  color: var(--subtle);
}

.feature-meta dd {
  margin: 0;
  color: var(--fg-body);
}

.byline__author {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.byline__author a {
  color: var(--fg);
  font-weight: 600;
}

.avatar {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #fafafa, #a8a8ad);
  color: #000;
  font: 700 0.6875rem/1 var(--font-sans);
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- sections ---------- */

.section {
  padding-top: var(--space-9);
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
  margin-bottom: var(--space-6);
}

.section__head h2 {
  font-size: var(--step-3);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.section__head .eyebrow {
  margin-bottom: var(--space-2);
}

.section__head p {
  flex-basis: 100%;
  max-width: 40rem;
  color: var(--muted);
}

.section__intro {
  max-width: 40rem;
  color: var(--muted);
  margin-bottom: var(--space-6);
}

.split {
  display: grid;
  gap: var(--space-4) var(--space-8);
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: 18rem 1fr;
  }

  .split > .section__head {
    display: block;
  }
}

.text-body {
  color: var(--fg-body);
  font-size: var(--step-1);
  line-height: 1.6;
  max-width: var(--measure);
}

.text-body > * + * {
  margin-top: var(--space-4);
}

.text-body strong {
  color: var(--fg);
  font-weight: 600;
}

.statement {
  max-width: 52rem;
  color: var(--subtle);
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.statement strong {
  color: var(--fg);
  font-weight: 600;
}

/* ---------- cards / bento ---------- */

.grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 44rem) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .grid--bento > :first-child {
    grid-column: span 2;
  }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 100%;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.4s var(--ease), background-color 0.3s var(--ease);
}

.card--link:hover {
  background: #1b1b1e;
}

@media (prefers-reduced-motion: no-preference) {
  .card--link:hover {
    transform: scale(1.012);
  }
}

.card .app-icon {
  margin-bottom: var(--space-3);
}

.card__eyebrow {
  color: var(--subtle);
  font-size: 0.875rem;
  font-weight: 600;
}

.card h3 {
  font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.card h3 a {
  color: var(--fg);
}

.card h3 a:hover {
  text-decoration: none;
}

.card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.card p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.card__more {
  margin-top: auto;
  padding-top: var(--space-3);
  color: var(--link) !important;
  font-size: 1rem;
}

.card__glow {
  position: absolute;
  right: -20%;
  bottom: -40%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c1) 22%, transparent), transparent);
  pointer-events: none;
}

@media (min-width: 44rem) and (max-width: 63.99rem) {
  .grid--bento > :last-child:nth-child(odd) {
    grid-column: span 2;
  }
}

@media (min-width: 64rem) {
  .card--feature {
    padding: var(--space-7);
  }

  .grid--bento > .card--feature h3 {
    max-width: 18ch;
    font-size: clamp(1.8rem, 1.2rem + 1.4vw, 2.5rem);
  }

  .grid--bento > .card--feature p {
    max-width: 34rem;
    font-size: var(--step-1);
  }
}

.card ul {
  display: grid;
  gap: 0.35rem;
  margin-top: var(--space-2);
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9375rem;
}

.card ul li::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 0.6rem;
  border-radius: 50%;
  background: var(--subtle);
  vertical-align: middle;
}

.principles {
  display: grid;
  gap: var(--space-4);
  list-style: none;
  padding: 0;
  counter-reset: p;
}

@media (min-width: 44rem) {
  .principles--cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .principles--cards {
    grid-template-columns: repeat(6, 1fr);
  }

  .principles--cards li {
    grid-column: span 2;
  }

  .principles--cards li:nth-child(4),
  .principles--cards li:nth-child(5) {
    grid-column: span 3;
  }
}

.principles li {
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--surface);
  counter-increment: p;
}

.principles li::before {
  content: counter(p, decimal-leading-zero);
  display: block;
  margin-bottom: var(--space-5);
  color: var(--subtle);
  font: 500 0.875rem/1 var(--font-mono);
}

.principles strong {
  display: block;
  color: var(--fg);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.principles span {
  display: block;
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: 1rem;
}

.cta {
  padding: var(--space-8) var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.cta h2 {
  max-width: 20ch;
  margin-inline: auto;
  font-size: var(--step-4);
  font-weight: 700;
  letter-spacing: -0.045em;
}

.cta p {
  max-width: 34rem;
  margin: var(--space-4) auto 0;
  color: var(--muted);
  font-size: var(--step-1);
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-3) var(--space-6);
  margin-top: var(--space-6);
}

/* ---------- post list ---------- */

.post-list {
  list-style: none;
  padding: 0;
}

.post-row {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4) var(--space-5);
  padding-block: var(--space-5);
  border-top: 1px solid var(--border);
}

.post-list > .post-row:first-child {
  border-top: 0;
}

.post-row h3 {
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.post-row h3 a {
  color: var(--fg);
}

.post-row h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.post-row:hover h3 a {
  color: var(--link);
  text-decoration: none;
}

.post-row p {
  margin-top: var(--space-1);
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: 44rem;
}

.post-row__kicker {
  margin: 0 0 var(--space-1) !important;
  color: var(--subtle) !important;
  font-size: 0.8125rem !important;
}

.post-row__meta {
  margin-top: var(--space-3);
}

.post-row__meta .tag-list {
  position: relative;
  z-index: 1;
}

/* ---------- writing finder ---------- */

.finder {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.search {
  position: relative;
  max-width: 34rem;
}

.search .icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--subtle);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 2.875rem;
  padding: 0 1rem 0 2.6rem;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
}

.search input::placeholder {
  color: var(--subtle);
}

.search input:focus {
  outline: 2px solid var(--link);
  outline-offset: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 2.125rem;
  padding: 0 0.95rem;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg-body);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s var(--ease);
}

.chip:hover {
  background: var(--surface-2);
}

.chip[aria-pressed="true"] {
  background: var(--fg);
  color: #000;
  font-weight: 500;
}

.chip__count {
  color: inherit;
  opacity: 0.55;
  font-size: 0.8125rem;
}

.finder__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  min-height: 1.5rem;
  color: var(--subtle);
  font-size: 0.875rem;
}

.finder__clear {
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  cursor: pointer;
}

.empty-state {
  padding: var(--space-6) 0;
  color: var(--muted);
}

/* ---------- article ---------- */

.article-layout {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 64rem) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 15rem;
    gap: var(--space-8);
  }

  .article-aside {
    order: 2;
  }

  .article-aside__inner {
    position: sticky;
    top: calc(var(--header-h) + var(--space-6));
  }
}

.article-main {
  min-width: 0;
  max-width: var(--measure);
}

.toc {
  font-size: 0.875rem;
}

.toc h2 {
  margin-bottom: var(--space-3);
  color: var(--fg);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.toc ol {
  display: grid;
  gap: 0.15rem;
  list-style: none;
  padding: 0;
  border-left: 1px solid var(--border);
}

.toc a {
  display: block;
  margin-left: -1px;
  padding: 0.3rem 0 0.3rem var(--space-4);
  border-left: 1px solid transparent;
  color: var(--subtle);
  line-height: 1.4;
}

.toc a:hover,
.toc a[aria-current="true"] {
  color: var(--fg);
  border-left-color: var(--fg);
  text-decoration: none;
}

@media (max-width: 63.99rem) {
  .toc {
    padding: var(--space-5);
    border-radius: var(--radius);
    background: var(--surface);
  }
}

.summary-box {
  margin-bottom: var(--space-7);
  padding: var(--space-6);
  border-radius: var(--radius);
  background: var(--surface);
}

.summary-box h2 {
  margin-bottom: var(--space-2);
  color: var(--fg);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.summary-box p {
  color: var(--fg-body);
  font-size: var(--step-1);
  line-height: 1.55;
  letter-spacing: -0.02em;
}

/* prose */

.prose {
  color: var(--fg-body);
  font-size: 1.125rem;
  line-height: 1.7;
  letter-spacing: -0.014em;
}

.prose > * + * {
  margin-top: 1.25em;
}

.prose h2 {
  margin-top: 2.2em;
  font-size: var(--step-3);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.prose h3 {
  margin-top: 1.8em;
  font-size: var(--step-2);
  letter-spacing: -0.025em;
}

.prose h2 + *,
.prose h3 + * {
  margin-top: 0.7em;
}

.prose strong {
  color: var(--fg);
  font-weight: 600;
}

.prose ul,
.prose ol {
  padding-left: 1.25em;
}

.prose li + li {
  margin-top: 0.5em;
}

.prose li::marker {
  color: var(--subtle);
}

.prose :not(pre) > code {
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--fg);
  font-size: 0.85em;
}

.prose pre {
  overflow-x: auto;
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius);
  background: var(--bg-raised);
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--fg-body);
  font-size: 0.875rem;
  line-height: 1.65;
  tab-size: 2;
}

.prose blockquote {
  margin: 0;
  padding-left: var(--space-5);
  border-left: 2px solid var(--border-strong);
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  background: var(--bg-raised);
  box-shadow: inset 0 0 0 1px var(--border);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.prose th,
.prose td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--fg);
  font-weight: 600;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.figure {
  margin-block: 2.2em;
}

.figure__frame {
  padding: var(--space-6);
  border-radius: var(--radius);
  background: var(--bg-raised);
  box-shadow: inset 0 0 0 1px var(--border);
}

.figure svg {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 40rem) {
  .figure__frame {
    overflow-x: auto;
    padding: var(--space-4);
  }

  .figure svg {
    min-width: 34rem;
  }
}

.figure figcaption {
  margin-top: var(--space-3);
  color: var(--subtle);
  font-size: 0.875rem;
  line-height: 1.5;
}

.dg-box {
  fill: var(--surface);
  stroke: var(--border-strong);
}

.dg-box--accent {
  fill: rgba(41, 151, 255, 0.14);
  stroke: var(--link);
}

.dg-text {
  fill: var(--fg);
  font: 500 13px var(--font-sans);
}

.dg-label {
  fill: var(--muted);
  font: 400 11px var(--font-mono);
}

.dg-line {
  fill: none;
  stroke: var(--subtle);
  stroke-width: 1.25;
}

.dg-head {
  fill: var(--subtle);
}

/* article footer */

.article-end {
  display: grid;
  gap: var(--space-7);
  margin-top: var(--space-8);
}

.article-end h2 {
  margin-bottom: var(--space-4);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.references ol {
  display: grid;
  gap: var(--space-3);
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.references li::marker {
  color: var(--subtle);
}

.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.share__label {
  margin-right: var(--space-2);
  color: var(--fg);
  font-size: 0.9375rem;
  font-weight: 600;
}

.share a,
.share button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 2.25rem;
  padding: 0 0.95rem;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg-body);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s var(--ease);
}

.share a:hover,
.share button:hover {
  background: var(--surface-2);
  color: var(--fg);
  text-decoration: none;
}

.author-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  padding: var(--space-6);
  border-radius: var(--radius);
  background: var(--surface);
}

.author-card .avatar {
  width: 3.25rem;
  height: 3.25rem;
  font-size: 0.9rem;
}

.author-card h2 {
  margin: 0;
  font-size: var(--step-1);
}

.author-card h2 a {
  color: var(--fg);
}

.author-card p {
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: 0.9375rem;
}

.author-card .link-row {
  margin-top: var(--space-3);
}

.translation-note {
  color: var(--subtle);
  font-size: var(--step--1);
}

/* ---------- project page ---------- */

.facts {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-7);
  max-width: 56rem;
}

@media (min-width: 44rem) {
  .facts {
    grid-template-columns: repeat(4, 1fr);
  }
}

.facts div {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  background: var(--surface);
}

.facts dt {
  color: var(--subtle);
  font-size: 0.8125rem;
  font-weight: 500;
}

.facts dd {
  margin: var(--space-1) 0 0;
  color: var(--fg);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}

/* ---------- about / now / contact ---------- */

.timeline {
  display: grid;
  gap: var(--space-4);
  list-style: none;
  padding: 0;
}

@media (min-width: 44rem) {
  .timeline {
    grid-template-columns: repeat(2, 1fr);
  }
}

.timeline li {
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.timeline h3 {
  font-size: var(--step-1);
  letter-spacing: -0.02em;
}

.timeline p {
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: 1rem;
}

.definition-list {
  display: grid;
}

.definition-list > div {
  display: grid;
  gap: var(--space-1) var(--space-6);
  padding-block: var(--space-4);
  border-top: 1px solid var(--border);
}

.definition-list > div:first-child {
  border-top: 0;
  padding-top: 0;
}

@media (min-width: 44rem) {
  .definition-list > div {
    grid-template-columns: 12rem 1fr;
  }
}

.definition-list dt {
  color: var(--fg);
  font-weight: 600;
}

.definition-list dd {
  margin: 0;
  color: var(--muted);
}

.updated-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8125rem;
}

.contact-list {
  display: grid;
  gap: var(--space-3);
  list-style: none;
  padding: 0;
}

.contact-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--fg);
  transition: background-color 0.2s var(--ease);
}

.contact-list a:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.contact-list .icon {
  color: var(--link);
  font-size: 1.25rem;
}

.contact-list strong {
  display: block;
  font-weight: 600;
}

.contact-list span {
  display: block;
  color: var(--muted);
  font-size: var(--step--1);
}

.contact-list .icon-arrow {
  color: var(--subtle);
}

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .article-aside,
  .share {
    display: none;
  }

  main {
    padding-top: 0;
  }

  body {
    background: #fff;
    color: #000;
  }
}

/* ---------- immersive project hero (case studies only) ---------- */

.feature-head {
  --accent: #ff4f3d;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  position: relative;
  margin-top: calc(-1 * var(--header-h));
  padding-block: calc(var(--header-h) + var(--space-8)) var(--space-7);
  overflow: hidden;
  isolation: isolate;
}

.feature-head__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.feature-head .cover {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(110% 95% at 88% 12%, color-mix(in srgb, var(--c1) 85%, transparent) 0%, transparent 58%),
    radial-gradient(80% 80% at 0% 100%, color-mix(in srgb, var(--c2) 90%, transparent) 0%, transparent 70%),
    linear-gradient(155deg, var(--c2) 0%, #07070a 85%);
}

.feature-head .cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: var(--noise);
  mix-blend-mode: overlay;
  opacity: 0.35;
}

.feature-head .cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.7) 45%, rgba(0, 0, 0, 0.25) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 55%);
}

.feature-head .cover__art {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(60rem, 80%);
  height: 100%;
  color: #fff;
  opacity: 0.9;
}

.feature-head .breadcrumbs {
  margin-bottom: var(--space-6);
}

.feature-head .breadcrumbs ol,
.feature-head .breadcrumbs a {
  color: rgba(255, 255, 255, 0.7);
}

.feature-head .billboard__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  color: rgba(255, 255, 255, 0.85);
  font: 600 0.8125rem/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.feature-head .badge {
  display: inline-flex;
  align-items: center;
  height: 1.375rem;
  padding: 0 0.45rem;
  border-radius: 3px;
  background: var(--accent);
  color: #fff;
  font: 700 0.75rem/1 "Antonio", var(--font-sans);
  letter-spacing: 0.08em;
}

.feature-head h1 {
  max-width: 22ch;
  margin-top: var(--space-4);
  font: 700 clamp(2.5rem, 1.6rem + 3.6vw, 4rem) / 0.98 "Antonio", "Arial Narrow", sans-serif;
  letter-spacing: 0;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
}

.feature-head .lead {
  max-width: 40rem;
  margin-top: var(--space-5);
  color: var(--fg-body);
}

.feature-head .facts {
  gap: 0;
  max-width: 52rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
}

.feature-head .facts div {
  border-radius: 0;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 44rem) {
  .feature-head .facts div {
    border-bottom: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }

  .feature-head .facts div:last-child {
    border-right: 0;
  }
}

.feature-head .facts div:last-child {
  border-bottom: 0;
}

.feature-head .facts dt {
  font: 500 0.6875rem/1.4 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* =========================================================================
   Motion. Everything below is progressive: without support (or with
   "reduce motion" on) the page is simply static and fully visible.
   ========================================================================= */

/* reading progress (articles and case studies) */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 2px;
  background: linear-gradient(90deg, #2997ff, #b38cff);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

/* card spotlight (pointer position set by site.js) */

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(28rem circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.07), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}

.card--link:hover::before {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  /* ---- cross-page transitions (static pages that feel like an app) ---- */

  @view-transition {
    navigation: auto;
  }

  .site-header {
    view-transition-name: site-header;
  }

  .progress {
    view-transition-name: progress;
  }

  ::view-transition-old(root) {
    animation: vt-out 0.22s var(--ease) both;
  }

  ::view-transition-new(root) {
    animation: vt-in 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  ::view-transition-group(*) {
    animation-duration: 0.5s;
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  @keyframes vt-out {
    to {
      opacity: 0;
      transform: translateY(-8px);
    }
  }

  @keyframes vt-in {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
  }

  /* ---- scroll-driven reveals ---- */

  @supports (animation-timeline: view()) {
    .section__head,
    .card,
    .principles li,
    .timeline li,
    .post-row,
    .contact-list li,
    .definition-list > div,
    .cta,
    .text-body,
    .summary-box,
    .figure,
    .case-prose > *,
    .article-end > * {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 42%;
    }

    .grid > :nth-child(2),
    .principles li:nth-child(2) {
      animation-range: entry 6% entry 48%;
    }

    .grid > :nth-child(3),
    .principles li:nth-child(3) {
      animation-range: entry 12% entry 54%;
    }

    .grid > :nth-child(4),
    .principles li:nth-child(4) {
      animation-range: entry 18% entry 60%;
    }

    .progress {
      animation: progress linear both;
      animation-timeline: scroll(root);
    }

    /* hero art: slow depth while the page scrolls */
    .feature-head__media {
      animation: hero-depth linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100vh;
    }

    .hero__inner {
      animation: hero-away linear both;
      animation-timeline: scroll(root);
      animation-range: 0 70vh;
    }

    /* diagrams draw themselves as they enter */
    .figure {
      view-timeline-name: --figure;
    }

    .figure .dg-line[pathLength] {
      stroke-dasharray: 1;
      animation: draw linear both;
      animation-timeline: --figure;
      animation-range: entry 20% cover 45%;
    }

    .figure .dg-box,
    .figure .dg-text,
    .figure .dg-label {
      animation: fade linear both;
      animation-timeline: --figure;
      animation-range: entry 10% cover 35%;
    }
  }

  @keyframes reveal {
    from {
      opacity: 0;
      transform: translateY(28px) scale(0.985);
    }
  }

  @keyframes progress {
    to {
      transform: scaleX(1);
    }
  }

  @keyframes hero-depth {
    to {
      transform: translateY(18%) scale(1.08);
      opacity: 0.35;
    }
  }

  @keyframes hero-away {
    to {
      transform: translateY(-6vh) scale(0.96);
      opacity: 0;
    }
  }

  @keyframes draw {
    from {
      stroke-dashoffset: 1;
    }
    to {
      stroke-dashoffset: 0;
    }
  }

  @keyframes fade {
    from {
      opacity: 0;
    }
  }

  /* ---- case study entrance ---- */

  .feature-head .cover {
    animation: art-in 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  .feature-head h1 .w {
    display: inline-block;
    animation: word-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: calc(0.15s + var(--i) * 0.055s);
  }

  .feature-head .app-icon,
  .feature-head .billboard__badges,
  .feature-head .breadcrumbs,
  .feature-head .lead {
    animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  .feature-head .app-icon {
    animation-delay: 0.05s;
  }

  .feature-head .billboard__badges {
    animation-delay: 0.1s;
  }

  .feature-head .lead {
    animation-delay: 0.55s;
  }

  .feature-head .facts div {
    animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: calc(0.7s + var(--n, 0) * 0.08s);
  }

  .feature-head .facts div:nth-child(2) {
    --n: 1;
  }

  .feature-head .facts div:nth-child(3) {
    --n: 2;
  }

  .feature-head .facts div:nth-child(4) {
    --n: 3;
  }

  @keyframes art-in {
    from {
      opacity: 0;
      transform: scale(1.08);
    }
  }

  @keyframes word-in {
    from {
      opacity: 0;
      transform: translateY(0.45em);
      filter: blur(6px);
    }
  }

  /* ---- living cover art on case studies ---- */

  .feature-head .m-draw {
    stroke-dasharray: 1;
    animation: draw 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: calc(0.6s + var(--d, 0) * 0.12s);
  }

  .feature-head .m-dot {
    animation: twinkle 3.6s ease-in-out infinite;
    animation-delay: calc(var(--d, 0) * -0.37s);
  }

  .feature-head .m-ring {
    transform-box: fill-box;
    transform-origin: center;
    animation: ring 6s ease-out infinite;
    animation-delay: calc(var(--d, 0) * -1.5s);
  }

  .feature-head .m-sweep {
    transform-origin: 235px 86px;
    animation: spin 8s linear infinite;
  }

  .feature-head .m-blip {
    animation: twinkle 2.8s ease-in-out infinite;
    animation-delay: calc(var(--d, 0) * -0.6s);
  }

  @keyframes twinkle {
    50% {
      opacity: 0.25;
    }
  }

  @keyframes ring {
    0% {
      transform: scale(0.6);
      opacity: 0;
    }
    30% {
      opacity: 1;
    }
    100% {
      transform: scale(1.25);
      opacity: 0;
    }
  }

  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }
}

.feature-head .app-icon {
  margin-bottom: var(--space-5);
}

/* ---------- GPA hero demo: a question, a zoom and a progressive search ---------- */

.feature-head__grid {
  display: grid;
  gap: var(--space-7);
  align-items: center;
}

@media (min-width: 64rem) {
  .feature-head__grid {
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 30rem);
    gap: var(--space-8);
  }
}

.gpa-demo {
  --gd: #30d5c8;
  position: relative;
  margin: 0;
}

.gd-stage {
  position: relative;
  aspect-ratio: 1000 / 1033;
  border-radius: var(--radius-lg);
  background: radial-gradient(80% 70% at 60% 75%, rgba(48, 213, 200, 0.14), transparent 70%), rgba(0, 0, 0, 0.45);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}

.gd-br,
.gd-local {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.gd-br {
  opacity: 0;
  transform-origin: 58.9% 88%;
}

.gd-br img {
  display: block;
  width: 100%;
  height: 100%;
}

.gd-br-pin {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--gd);
  box-shadow: 0 0 0 4px rgba(48, 213, 200, 0.25), 0 0 18px var(--gd);
}

.gd-local {
  overflow: visible;
}

.gd-ring {
  fill: none;
  stroke: var(--gd);
  stroke-opacity: 0.35;
  stroke-width: 0.6;
  stroke-dasharray: 2 2.5;
}

.gd-line {
  fill: none;
  stroke: var(--gd);
  stroke-opacity: 0.55;
  stroke-width: 0.55;
}

.gd-hit {
  fill: var(--gd);
}

.gd-label {
  fill: #fff;
  font: 500 6px var(--font-sans);
  letter-spacing: -0.01em;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.75);
  stroke-width: 1.6px;
}

.gd-origin {
  fill: #fff;
}

.gd-origin-pulse {
  fill: none;
  stroke: #fff;
  stroke-width: 0.6;
}

.gd-origin-label {
  fill: #fff;
  font: 700 7px var(--font-sans);
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.75);
  stroke-width: 1.8px;
}

.gd-ask {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.gd-ask__avatar {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(145deg, #fafafa, #a8a8ad);
  color: #000;
  font-size: 0.95rem;
}

.gd-ask__bubble {
  padding: 0.55rem 0.85rem;
  border-radius: 1rem 1rem 1rem 0.3rem;
  background: rgba(41, 151, 255, 0.95);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
}

.gd-panel {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: rgba(10, 10, 12, 0.78);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font: 400 0.75rem/1.5 var(--font-mono);
  color: var(--muted);
}

.gd-panel__req {
  color: var(--fg);
  font-weight: 500;
}

.gd-panel__req span {
  color: var(--gd);
}

.gd-panel ol {
  display: grid;
  gap: 0.15rem;
  margin-top: 0.4rem;
  padding: 0;
  list-style: none;
}

.gd-panel li b {
  color: var(--gd);
  font-weight: 500;
}

.gpa-demo figcaption {
  margin-top: var(--space-3);
  color: var(--subtle);
  font-size: 0.8125rem;
  line-height: 1.45;
}

@media (prefers-reduced-motion: no-preference) {
  .gpa-demo {
    --t: 15s;
  }

  .gd-br {
    animation: gd-br var(--t) cubic-bezier(0.6, 0, 0.3, 1) infinite;
  }

  .gd-br-pin {
    animation: gd-pin var(--t) ease-out infinite;
  }

  .gd-local {
    animation: gd-local var(--t) cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  }

  .gd-ask {
    animation: gd-ask var(--t) cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  }

  .gd-origin,
  .gd-origin-label {
    animation: gd-origin var(--t) ease-out infinite;
  }

  .gd-origin-pulse {
    transform-box: fill-box;
    transform-origin: center;
    animation: gd-pulse 1.6s ease-out infinite;
  }

  .gd-ring,
  .gd-hit,
  .gd-label,
  .gd-panel li {
    animation-duration: var(--t);
    animation-iteration-count: infinite;
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
    animation-fill-mode: both;
    animation-delay: calc(var(--i, 0) * 0.07s);
  }

  .gd-line {
    stroke-dasharray: 1;
    animation-duration: var(--t);
    animation-iteration-count: infinite;
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
    animation-fill-mode: both;
    animation-delay: calc(var(--i, 0) * 0.07s);
  }

  .gd-ring {
    transform-box: fill-box;
    transform-origin: center;
  }

  .gd-ring.gd-b0, .gd-hit.gd-b0, .gd-label.gd-b0, .gd-panel .gd-b0 { animation-name: gd-show-0; }
  .gd-ring.gd-b1, .gd-hit.gd-b1, .gd-label.gd-b1, .gd-panel .gd-b1 { animation-name: gd-show-1; }
  .gd-ring.gd-b2, .gd-hit.gd-b2, .gd-label.gd-b2, .gd-panel .gd-b2 { animation-name: gd-show-2; }
  .gd-line.gd-b0 { animation-name: gd-draw-0; }
  .gd-line.gd-b1 { animation-name: gd-draw-1; }
  .gd-line.gd-b2 { animation-name: gd-draw-2; }

  .gd-panel {
    animation: gd-panel var(--t) cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  }
}

/* 0–4% question · 8–24% zoom into Gramado · 30/46/62% batches · 88–100% reset */

@keyframes gd-ask {
  0%, 2% { opacity: 0; transform: translateY(8px) scale(0.96); }
  6%, 88% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: translateY(-6px); }
}

@keyframes gd-br {
  0% { opacity: 0; transform: scale(0.94); filter: none; }
  4%, 12% { opacity: 1; transform: scale(1); filter: none; }
  24% { opacity: 0; transform: scale(5); filter: blur(6px); }
  92% { opacity: 0; transform: scale(0.94); filter: none; }
  100% { opacity: 0; transform: scale(0.94); }
}

@keyframes gd-pin {
  0%, 6% { opacity: 0; transform: scale(0); }
  9%, 18% { opacity: 1; transform: scale(1); }
  24%, 100% { opacity: 0; transform: scale(1.6); }
}

@keyframes gd-local {
  0%, 15% { opacity: 0; transform: scale(0.35); filter: blur(6px); }
  27%, 88% { opacity: 1; transform: none; filter: none; }
  95%, 100% { opacity: 0; transform: scale(0.6); filter: blur(4px); }
}

@keyframes gd-origin {
  0%, 24% { opacity: 0; }
  28%, 100% { opacity: 1; }
}

@keyframes gd-pulse {
  from { transform: scale(1); opacity: 0.8; }
  to { transform: scale(3.2); opacity: 0; }
}

@keyframes gd-panel {
  0%, 26% { opacity: 0; transform: translateY(10px); }
  30%, 88% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: translateY(6px); }
}

@keyframes gd-show-0 {
  0%, 31% { opacity: 0; transform: scale(0.4); }
  36%, 88% { opacity: 1; transform: none; }
  93%, 100% { opacity: 0; }
}

@keyframes gd-show-1 {
  0%, 47% { opacity: 0; transform: scale(0.4); }
  52%, 88% { opacity: 1; transform: none; }
  93%, 100% { opacity: 0; }
}

@keyframes gd-show-2 {
  0%, 63% { opacity: 0; transform: scale(0.4); }
  68%, 88% { opacity: 1; transform: none; }
  93%, 100% { opacity: 0; }
}

@keyframes gd-draw-0 {
  0%, 30% { stroke-dashoffset: 1; opacity: 1; }
  35%, 88% { stroke-dashoffset: 0; opacity: 1; }
  93%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes gd-draw-1 {
  0%, 46% { stroke-dashoffset: 1; opacity: 1; }
  51%, 88% { stroke-dashoffset: 0; opacity: 1; }
  93%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes gd-draw-2 {
  0%, 62% { stroke-dashoffset: 1; opacity: 1; }
  67%, 88% { stroke-dashoffset: 0; opacity: 1; }
  93%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

/* ---------- Radar hero demo: one question, several providers, one report ---------- */

.radar-demo {
  --rd: #ff7a66;
  --rd-ok: #30d158;
  --rd-warn: #ffb340;
  --rd-src: #64d2ff;
  margin: 0;
}

.rd-stage {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: radial-gradient(80% 60% at 50% 30%, rgba(255, 122, 102, 0.14), transparent 70%), rgba(0, 0, 0, 0.45);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}

.rd-ask {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  text-align: center;
}

.rd-ask__kicker {
  color: var(--subtle);
  font: 500 0.6875rem/1 var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rd-ask__bubble {
  padding: 0.55rem 0.95rem;
  border-radius: 1rem;
  background: rgba(41, 151, 255, 0.95);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
}

.rd-var {
  padding: 0 0.3em;
  border-radius: 0.35em;
  background: rgba(0, 0, 0, 0.25);
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.rd-wires {
  display: block;
  width: 100%;
  height: 2.25rem;
  overflow: visible;
}

.rd-wire {
  fill: none;
  stroke: var(--rd);
  stroke-opacity: 0.6;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.rd-provs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.rd-prov {
  display: grid;
  gap: 0.55rem;
  padding: 0.65rem;
  border-radius: 12px;
  background: rgba(22, 22, 24, 0.85);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.rd-prov__head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--fg);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.rd-prov__dot {
  display: grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
  border-radius: 6px;
  background: linear-gradient(145deg, var(--rd), #c4271a);
  color: #fff;
  font-size: 0.6rem;
}

.rd-prov__body {
  position: relative;
  display: grid;
  gap: 0.35rem;
}

.rd-bar {
  position: relative;
  display: block;
  width: var(--w);
  height: 0.4rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  transform-origin: left;
}

.rd-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: inherit;
}

.rd-mark--ok { background: var(--rd-ok); }
.rd-mark--warn { background: var(--rd-warn); }
.rd-mark--src { background: var(--rd-src); }

.rd-typing {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  gap: 0.2rem;
  opacity: 0;
}

.rd-typing i {
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: var(--muted);
}

.rd-prov__status {
  color: var(--rd-ok);
  font: 500 0.625rem/1.3 var(--font-mono);
}

.rd-prov--late .rd-bar {
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 4px, transparent 4px 7px);
}

.rd-prov--late .rd-prov__status {
  color: var(--rd-warn);
}

.rd-prov--late {
  box-shadow: 0 0 0 1px rgba(255, 179, 64, 0.35);
}

.rd-report {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: rgba(10, 10, 12, 0.78);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
  font: 400 0.75rem/1.5 var(--font-mono);
  color: var(--muted);
}

.rd-report__head {
  color: var(--fg);
  font-weight: 500;
}

.rd-report__head span {
  color: var(--rd);
}

.rd-report ul {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.4rem;
  padding: 0;
  list-style: none;
}

.rd-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rd-row::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  flex: none;
  border-radius: 2px;
  background: var(--c);
}

.rd-row--ok { --c: var(--rd-ok); }
.rd-row--warn { --c: var(--rd-warn); }
.rd-row--src { --c: var(--rd-src); }
.rd-row--evp { --c: var(--rd); }

@media (max-width: 30rem) {
  .rd-stage {
    padding: 0.75rem;
  }

  .rd-provs {
    gap: 0.35rem;
  }

  .rd-prov {
    padding: 0.55rem 0.5rem;
  }

  .rd-prov__head {
    font-size: 0.6875rem;
  }

  .rd-prov__dot {
    display: none;
  }
}

.radar-demo figcaption {
  margin-top: var(--space-3);
  color: var(--subtle);
  font-size: 0.8125rem;
  line-height: 1.45;
}

/* 0–6% question · 8–16% fan-out · 18–40% answers · 44% timeout · 52% highlights · 58–76% report · 88–100% reset */

@media (prefers-reduced-motion: no-preference) {
  .radar-demo {
    --t: 15s;
  }

  .rd-ask,
  .rd-wire,
  .rd-prov,
  .rd-bar,
  .rd-mark,
  .rd-typing,
  .rd-prov__status,
  .rd-report,
  .rd-row {
    animation-duration: var(--t);
    animation-iteration-count: infinite;
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
    animation-fill-mode: both;
  }

  .rd-ask { animation-name: rd-ask; }

  .rd-wire {
    stroke-dasharray: 1;
    animation-name: rd-wire;
    animation-delay: calc(var(--i) * 0.12s);
  }

  .rd-prov {
    animation-name: rd-prov;
    animation-delay: calc(var(--i) * 0.12s);
  }

  .rd-bar {
    animation-name: rd-bar-a;
    animation-delay: calc(var(--j) * 0.25s);
  }

  .rd-prov:nth-child(2) .rd-bar { animation-name: rd-bar-b; }

  .rd-prov--late .rd-bar { animation-name: rd-bar-late; }

  .rd-typing { animation-name: rd-typing-a; }
  .rd-prov:nth-child(2) .rd-typing { animation-name: rd-typing-b; }
  .rd-prov--late .rd-typing { animation-name: rd-typing-late; }

  .rd-typing i {
    animation: rd-dot 1s ease-in-out infinite;
  }

  .rd-typing i:nth-child(2) { animation-delay: 0.15s; }
  .rd-typing i:nth-child(3) { animation-delay: 0.3s; }

  .rd-prov__status { animation-name: rd-status-a; }
  .rd-prov:nth-child(2) .rd-prov__status { animation-name: rd-status-b; }
  .rd-prov--late .rd-prov__status { animation-name: rd-status-late; }

  .rd-prov--late {
    animation-name: rd-prov-late;
  }

  .rd-mark { animation-name: rd-mark; }

  .rd-report { animation-name: rd-report; }

  .rd-row {
    animation-name: rd-row;
    animation-delay: calc(var(--i) * 0.7s);
  }
}

@keyframes rd-ask {
  0%, 1% { opacity: 0; transform: translateY(8px) scale(0.96); }
  6%, 88% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: translateY(-6px); }
}

@keyframes rd-wire {
  0%, 8% { stroke-dashoffset: 1; opacity: 1; }
  14%, 88% { stroke-dashoffset: 0; opacity: 1; }
  93%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes rd-prov {
  0%, 11% { opacity: 0; transform: translateY(10px) scale(0.96); }
  16%, 88% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: translateY(6px); }
}

@keyframes rd-prov-late {
  0%, 11% { opacity: 0; transform: translateY(10px) scale(0.96); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }
  16%, 42% { opacity: 1; transform: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }
  46%, 88% { opacity: 0.72; transform: none; box-shadow: 0 0 0 1px rgba(255, 179, 64, 0.35); }
  94%, 100% { opacity: 0; transform: translateY(6px); }
}

@keyframes rd-typing-a {
  0%, 15% { opacity: 0; }
  17%, 23% { opacity: 1; }
  25%, 100% { opacity: 0; }
}

@keyframes rd-typing-b {
  0%, 15% { opacity: 0; }
  17%, 28% { opacity: 1; }
  30%, 100% { opacity: 0; }
}

@keyframes rd-typing-late {
  0%, 15% { opacity: 0; }
  17%, 43% { opacity: 1; }
  45%, 100% { opacity: 0; }
}

@keyframes rd-dot {
  0%, 100% { opacity: 0.3; transform: none; }
  50% { opacity: 1; transform: translateY(-2px); }
}

@keyframes rd-bar-a {
  0%, 24% { opacity: 0; transform: scaleX(0); }
  30%, 88% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; }
}

@keyframes rd-bar-b {
  0%, 29% { opacity: 0; transform: scaleX(0); }
  35%, 88% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; }
}

@keyframes rd-bar-late {
  0%, 44% { opacity: 0; transform: scaleX(0.4); }
  48%, 88% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; }
}

@keyframes rd-status-a {
  0%, 30% { opacity: 0; transform: translateY(4px); }
  33%, 88% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; }
}

@keyframes rd-status-b {
  0%, 36% { opacity: 0; transform: translateY(4px); }
  39%, 88% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; }
}

@keyframes rd-status-late {
  0%, 44% { opacity: 0; transform: translateY(4px); }
  47%, 88% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; }
}

@keyframes rd-mark {
  0%, 51% { opacity: 0; filter: none; }
  54% { opacity: 1; filter: brightness(1.6) drop-shadow(0 0 4px currentColor); }
  58%, 88% { opacity: 1; filter: none; }
  94%, 100% { opacity: 0; }
}

@keyframes rd-report {
  0%, 55% { opacity: 0; transform: translateY(10px); }
  59%, 88% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: translateY(6px); }
}

@keyframes rd-row {
  0%, 59% { opacity: 0; transform: translateX(-6px); }
  63%, 88% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; }
}
