/* ---------------------------------------------------------------------- */
/* Reset & tokens                                                          */
/* ---------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-gutter: stable; }
img, picture, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
input, button { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

:root {
  --bg: #f2f2f2;
  --bg-subtle: #e9e9e9;
  --surface: #ffffff;
  --border: #dddddd;
  --text: #1f1f1f;
  --text-muted: #555555;
  --text-faint: #7c7c7c;
  --accent: #1f1f1f;
  --accent-contrast: #ffffff;
  --button-secondary: #e4e4e4;
  --button-secondary-hover: #d9d9d9;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 28px rgba(0, 0, 0, 0.06);

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --container: 1120px;
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4.5rem;
  --space-8: 6.5rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212;
    --bg-subtle: #1b1b1b;
    --surface: #1a1a1a;
    --border: #2b2b2b;
    --text: #f2f2f2;
    --text-muted: #b0b0b0;
    --text-faint: #7f7f7f;
    --accent: #f2f2f2;
    --accent-contrast: #121212;
    --button-secondary: #262626;
    --button-secondary-hover: #313131;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 28px rgba(0, 0, 0, 0.35);
  }
}

:root[data-theme="dark"] {
  --bg: #121212;
  --bg-subtle: #1b1b1b;
  --surface: #1a1a1a;
  --border: #2b2b2b;
  --text: #f2f2f2;
  --text-muted: #b0b0b0;
  --text-faint: #7f7f7f;
  --accent: #f2f2f2;
  --accent-contrast: #121212;
  --button-secondary: #262626;
  --button-secondary-hover: #313131;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 28px rgba(0, 0, 0, 0.35);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
h3 { font-size: 1.15rem; }

p { color: var(--text-muted); }

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

.vh {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0; padding: 0; margin: -1px;
}

.vh-input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  pointer-events: none;
}

.skip-link {
  position: fixed;
  top: -100%;
  left: var(--space-3);
  z-index: 200;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.6em 1em;
  border-radius: var(--radius-s);
  transition: top 0.15s ease;
}

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

/* ---------------------------------------------------------------------- */
/* Layout helpers                                                         */
/* ---------------------------------------------------------------------- */

.section {
  padding: var(--space-6) var(--space-4);
  max-width: var(--container);
  margin: 0 auto;
}

.section--narrow { max-width: 720px; }
.section--center { text-align: center; }

.section--cta {
  border-top: 1px solid var(--border);
  padding-top: var(--space-6);
}

.section__head {
  max-width: 620px;
  margin-bottom: var(--space-5);
}

.section__head p { margin-top: var(--space-1); }

.section__more {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-top: var(--space-4);
  font-weight: 600;
  color: var(--accent);
}

.section__more:hover { text-decoration: underline; }

/* Page headers share the full container's left edge with the content below; only the text width is capped. */
.page-header { padding-bottom: 0; }
.page-header > * { max-width: 720px; }
.page-header h1 { margin-bottom: var(--space-2); }

.prose { color: var(--text); max-width: 68ch; }
.prose h2 { margin-top: var(--space-5); margin-bottom: var(--space-2); }
.prose h3 { margin-top: var(--space-4); margin-bottom: var(--space-2); }
.prose p { margin-bottom: var(--space-3); color: var(--text-muted); }
.prose ul { margin-bottom: var(--space-3); }
.prose li { position: relative; padding-left: 1.2em; color: var(--text-muted); margin-bottom: 0.4em; }
.prose li::before { content: "–"; position: absolute; left: 0; color: var(--text-faint); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding-left: var(--space-3);
  color: var(--text-muted);
  font-style: italic;
  margin: var(--space-3) 0;
}
.prose code {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.9em;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.7em 1.3em;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.button--primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.button--primary:hover { transform: translateY(-1px); }

.button--ghost {
  background: var(--button-secondary);
  color: var(--text);
}

.button--ghost:hover { background: var(--button-secondary-hover); }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}

.tag-list li {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3em 0.75em;
}

.highlight-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin-bottom: var(--space-4);
}

.highlight-list li {
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45em 0.9em;
  color: var(--text);
}

/* ---------------------------------------------------------------------- */
/* Header / nav                                                           */
/* ---------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-s);
}

.nav-toggle__icon {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.nav-toggle__icon::before { top: -6px; }
.nav-toggle__icon::after { top: 6px; }

.primary-nav {
  position: fixed;
  inset: 64px var(--space-4) auto var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.primary-nav.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.primary-nav__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-weight: 600;
}

.primary-nav__links a {
  display: block;
  padding: 0.4em 0;
  color: var(--text-muted);
}

.primary-nav__links a:hover,
.primary-nav__links a[aria-current="page"] {
  color: var(--text);
}

.primary-nav__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.lang-switch a { color: var(--text-faint); }
.lang-switch a[aria-current="true"] { color: var(--text); }
.lang-switch__sep { color: var(--border); }

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-contrast);
  transition: opacity 0.15s ease;
}

.theme-toggle:hover { opacity: 0.85; }

.theme-toggle__icon { display: none; }
.theme-toggle[data-active-mode="system"] .theme-toggle__icon--system,
.theme-toggle[data-active-mode="light"] .theme-toggle__icon--light,
.theme-toggle[data-active-mode="dark"] .theme-toggle__icon--dark {
  display: block;
}

@media (min-width: 860px) {
  .nav-toggle { display: none; }

  .primary-nav {
    position: static;
    flex-direction: row;
    align-items: center;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    gap: var(--space-5);
  }

  .primary-nav__links {
    flex-direction: row;
    gap: var(--space-4);
  }

  .primary-nav__links a { padding: 0; }

  .primary-nav__controls {
    padding-top: 0;
    border-top: 0;
    gap: var(--space-3);
  }
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */

.hero {
  padding: var(--space-8) var(--space-4) var(--space-6);
  max-width: var(--container);
  margin: 0 auto;
}

.hero__inner { max-width: 760px; }

.hero__eyebrow {
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.hero__name {
  font-size: clamp(2.4rem, 1.9rem + 2.5vw, 3.8rem);
  margin-bottom: var(--space-2);
}

.hero__stack {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.hero__intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 56ch;
  margin-bottom: var(--space-4);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ---------------------------------------------------------------------- */
/* Project grid / cards                                                   */
/* ---------------------------------------------------------------------- */

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

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

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

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.project-card:hover { border-color: var(--accent); }

.project-card__cover {
  aspect-ratio: 3 / 2;
  background: var(--bg-subtle);
  overflow: hidden;
}

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

.project-card__cover--shots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-4) 0;
}

.project-card__cover--shots img {
  width: auto;
  height: 100%;
  flex: 0 1 auto;
  min-width: 0;
  aspect-ratio: 390 / 844;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius-s) var(--radius-s) 0 0;
  box-shadow: var(--shadow);
}

.project-card__body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

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

.project-card__icon {
  border-radius: 22%;
  border: 1px solid var(--border);
}

.project-card__title a::after { content: ""; position: absolute; inset: 0; }
.project-card__title { position: relative; }

.project-card__platforms {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.project-card__description { color: var(--text-muted); flex: 1; }

.project-card__link {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.9rem;
}

/* ---------------------------------------------------------------------- */
/* Timeline (experience)                                                  */
/* ---------------------------------------------------------------------- */

.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  border-left: 2px solid var(--border);
  padding-left: var(--space-4);
}

.timeline--compact { gap: var(--space-4); }

.timeline-item { position: relative; }

.timeline-item__marker {
  position: absolute;
  left: calc(-1 * var(--space-4) - 5px);
  top: 0.35em;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-item__role { margin-bottom: 0.2em; }
.timeline-item__company { font-weight: 600; color: var(--text-muted); margin-bottom: 0.2em; }
.timeline-item__meta { font-size: 0.85rem; color: var(--text-faint); margin-bottom: var(--space-2); }
.timeline-item__description { color: var(--text-muted); margin-bottom: var(--space-2); max-width: 68ch; }
.timeline-item__description p:not(:last-child) { margin-bottom: 0.6em; }

/* ---------------------------------------------------------------------- */
/* Education                                                              */
/* ---------------------------------------------------------------------- */

.education-list {
  display: grid;
  gap: var(--space-3);
}

@media (min-width: 720px) {
  .education-list { grid-template-columns: repeat(2, 1fr); }
}

.education-item__content {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: var(--space-4);
  height: 100%;
}

.education-item__degree { margin-bottom: 0.2em; }
.education-item__school { font-weight: 600; color: var(--text-muted); margin-bottom: 0.2em; }
.education-item__meta { font-size: 0.85rem; color: var(--text-faint); margin-bottom: var(--space-2); }
.education-item__description { color: var(--text-muted); }

/* ---------------------------------------------------------------------- */
/* Skills                                                                 */
/* ---------------------------------------------------------------------- */

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

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

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

.skills-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: var(--space-4);
}

.skills-group h3 { margin-bottom: var(--space-2); font-size: 1rem; }

.skills-group ul {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  color: var(--text-muted);
}

.skills-group li {
  position: relative;
  padding-left: 1.1em;
}

.skills-group li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------------------------------------------------------------------- */
/* Press                                                                  */
/* ---------------------------------------------------------------------- */

.press-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  margin-bottom: var(--space-4);
}

.press-filter label {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5em 1em;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
}

.press-filter label:hover { border-color: var(--accent); color: var(--text); }

.press-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

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

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

.press-grid--compact { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .press-grid--compact { grid-template-columns: repeat(2, 1fr); }
}

.press-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--surface);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.press-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.press-card__preview {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
}

/* Same 1.91:1 ratio as Open Graph images, so previews look like shared links. */
.press-card__media {
  aspect-ratio: 1.91 / 1;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

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

.press-card__media--contain {
  display: grid;
  place-items: center;
}

.press-card__media--contain img {
  width: 26%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 22%;
}

.press-card__placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  padding: var(--space-4);
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-faint);
}

.press-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  flex: 1;
  padding: var(--space-3) var(--space-4) var(--space-4);
}

.press-card__meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.press-card__title {
  font-size: 1.05rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.press-card__description {
  color: var(--text-muted);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.press-card__footer {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
}

.press-card__org {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.press-card__date { flex-shrink: 0; }

.press-card__type { color: var(--text-faint); }
.press-card__project { color: var(--text); }
.press-card__project:hover { text-decoration: underline; }

/* CSS-only filter (no JS): show all cards, hide non-matching ones when a
   given radio is checked. Requires :has() support (all evergreen browsers). */
.press-filter-wrapper:has(#filter-press:checked) .press-grid .press-card:not([data-filter="press"]) { display: none; }
.press-filter-wrapper:has(#filter-awards:checked) .press-grid .press-card:not([data-filter="awards"]) { display: none; }
.press-filter-wrapper:has(#filter-appstore:checked) .press-grid .press-card:not([data-filter="appstore"]) { display: none; }
.press-filter-wrapper:has(#filter-interviews:checked) .press-grid .press-card:not([data-filter="interviews"]) { display: none; }

.press-filter-wrapper:has(#filter-press:checked) label[for="filter-press"],
.press-filter-wrapper:has(#filter-awards:checked) label[for="filter-awards"],
.press-filter-wrapper:has(#filter-appstore:checked) label[for="filter-appstore"],
.press-filter-wrapper:has(#filter-interviews:checked) label[for="filter-interviews"],
.press-filter-wrapper:has(#filter-all:checked) label[for="filter-all"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

/* ---------------------------------------------------------------------- */
/* Project case study                                                     */
/* ---------------------------------------------------------------------- */

.breadcrumb {
  display: inline-flex;
  gap: 0.4em;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.breadcrumb:hover { color: var(--accent); }

.project-hero { padding: var(--space-6) var(--space-4) 0; max-width: var(--container); margin: 0 auto; }
.project-hero__inner { max-width: 820px; }

.project-hero__head {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin-bottom: var(--space-4);
}

.project-hero__icon { border-radius: 22%; border: 1px solid var(--border); flex-shrink: 0; }
.project-hero__description { font-size: 1.05rem; margin-top: 0.3em; }

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-bottom: var(--space-4);
}

.project-meta dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  margin-bottom: 0.4em;
}

.project-hero__cover {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-l);
  border: 1px solid var(--border);
  margin-top: var(--space-5);
}

.screenshot-gallery {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  scroll-snap-type: x proximity;
}

.screenshot-gallery img {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: 220px;
  height: auto;
  aspect-ratio: 390 / 844;
  object-fit: cover;
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
}

.recognition-list {
  display: grid;
  gap: var(--space-3);
}

.recognition-list__org {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-faint);
  margin-bottom: 0.2em;
}

.recognition-list__title { font-weight: 600; }
a.recognition-list__title:hover { color: var(--accent); }

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: var(--space-7);
}

.site-footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-5) var(--space-4);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.site-footer__name { font-weight: 700; }
.site-footer__role { font-size: 0.85rem; color: var(--text-muted); }

.site-footer__links {
  display: flex;
  gap: var(--space-3);
  font-weight: 600;
  font-size: 0.9rem;
}

.site-footer__links a:hover { color: var(--accent); }

.site-footer__meta {
  width: 100%;
  font-size: 0.8rem;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
  padding-top: var(--space-3);
}

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

/* App logo carousel ------------------------------------------------------- */

.app-carousel {
  padding: var(--space-6) 0;
  overflow: hidden;
}

.app-carousel__head {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.app-carousel__viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.app-carousel__track {
  display: flex;
  width: max-content;
  animation: app-carousel-scroll 40s linear infinite;
}

.app-carousel__viewport:hover .app-carousel__track {
  animation-play-state: paused;
}

.app-carousel__list {
  display: flex;
  gap: 40px;
  padding: 0 20px;
  margin: 0;
  list-style: none;
}

.app-carousel__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 104px;
  text-align: center;
}

.app-carousel__logo {
  width: 64px;
  height: 64px;
  border-radius: 22.5%;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.app-carousel__logo--monogram {
  display: grid;
  place-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.app-carousel__name {
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--text-muted);
}

@keyframes app-carousel-scroll {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .app-carousel__viewport {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .app-carousel__track {
    width: auto;
    animation: none !important;
  }

  .app-carousel__list {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 24px;
  }

  .app-carousel__list[aria-hidden="true"] {
    display: none;
  }
}

/* Hero app fan ------------------------------------------------------------ */

.app-fan {
  /* 5 cards overlapping by 40% span ~3.4 card widths; keep that inside the hero gutters. */
  --fan-card: clamp(70px, calc((100vw - 2 * var(--space-4)) / 3.6), 260px);
  display: flex;
  justify-content: center;
  padding: var(--space-6) 0 var(--space-4);
  margin: 0;
  list-style: none;
}

.app-fan__item {
  position: relative;
  flex: 0 0 var(--fan-card);
  margin-inline-start: calc(var(--fan-card) * -0.4);
  transform: translateY(var(--fan-y, 0)) rotate(var(--fan-r, 0deg));
  transition: transform 0.25s ease;
}

.app-fan__item:first-child { margin-inline-start: 0; }

.app-fan__item:nth-child(1) { --fan-r: -4deg; --fan-y: 12px; }
.app-fan__item:nth-child(2) { --fan-r: -3deg; --fan-y: -6px; }
.app-fan__item:nth-child(3) { --fan-r: 5deg;  --fan-y: 10px; }
.app-fan__item:nth-child(4) { --fan-r: -2deg; --fan-y: -4px; }
.app-fan__item:nth-child(5) { --fan-r: 3deg;  --fan-y: 6px; }

.app-fan__item:hover,
.app-fan__item:focus-within {
  z-index: 1;
  transform: translateY(calc(var(--fan-y, 0px) - 12px)) rotate(0deg) scale(1.04);
}

.app-fan__card {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  perspective: 600px;
  border-radius: calc(var(--fan-card) * 0.1);
}

/* Raised, glossy icon: a darker bottom edge gives it thickness, the overlay adds a top highlight. */
.app-fan__icon {
  position: relative;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 22.5%;
  transform: rotateX(8deg) rotateY(-6deg);
  transform-style: preserve-3d;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.18),
    0 3px 0 rgba(0, 0, 0, 0.22),
    0 8px 12px -4px rgba(0, 0, 0, 0.3),
    0 22px 36px -12px rgba(0, 0, 0, 0.5);
}

.app-fan__icon img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.app-fan__icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.08) 38%, rgba(255, 255, 255, 0) 55%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.6),
    inset 0 -3px 4px rgba(0, 0, 0, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.app-fan__item:hover .app-fan__icon,
.app-fan__item:focus-within .app-fan__icon {
  transform: rotateX(16deg) rotateY(-14deg) translateZ(24px) scale(1.06);
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.18),
    0 4px 0 rgba(0, 0, 0, 0.22),
    0 14px 18px -6px rgba(0, 0, 0, 0.32),
    0 34px 48px -14px rgba(0, 0, 0, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  .app-fan__item,
  .app-fan__icon { transition: none; }
}

/* -------------------------------------------------------------------------- */
/* Privacy page: audience measurement opt-out                                 */
/* -------------------------------------------------------------------------- */

.site-footer__meta a {
  color: inherit;
}

.optout {
  max-width: 68ch;
  margin-top: var(--space-5);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--bg-subtle);
}

.optout[hidden] {
  display: none;
}

.optout__title {
  font-size: 1.05rem;
  margin-bottom: var(--space-2);
}

.optout__switch {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  cursor: pointer;
}

.optout__switch input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
}

.optout__status {
  margin-top: var(--space-2);
  font-size: 0.9rem;
  color: var(--text-muted);
}
