:root {
  --max-width: 64rem;
  --gap: 1rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;
  /* Primary sans */
  --font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Fira Mono", ui-monospace, monospace;
  --yellow: oklch(85% 0.18 85.65);
  --yellow-dark: oklch(55% 0.12 85.65);
  --blue: oklch(70% 0.13 255.5);
  --blue-dark: oklch(40% 0.08 255.5);
  --background: oklch(98.4% 0.003 247.858);
  --foreground: oklch(20.8% 0.042 265.755);
  --surface: oklch(96.8% 0.007 247.896);
  --surface-raised: oklch(94.85% 0.01 251.7);
  --border: oklch(92.9% 0.013 255.508);
  --muted: oklch(70.4% 0.04 256.788);
  --snap-type: x mandatory;
}

html[data-theme="dark"] {
  --background: oklch(21% 0.02 265);
  --foreground: oklch(96% 0.01 250);
  --surface: oklch(26% 0.02 260);
  --surface-raised: oklch(30% 0.02 260);
  --border: oklch(38% 0.03 260);
  --muted: oklch(65% 0.02 250);
}

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

html {
  scroll-behavior: smooth;
  background: var(--surface);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.32vi + 0.92rem, 1.13rem);
  line-height: 1.6;
  color: var(--foreground);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  margin-top: 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-2xl);
  background: var(--surface);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 768px) {
  .site-header {
    margin-top: 2rem;
  }
}

.site-header.is-scrolled {
  border-color: var(--border);
  background: var(--background);
  box-shadow: 0 8px 30px oklch(0% 0 0 / 0.06);
}

html[data-theme="dark"] .site-header.is-scrolled {
  box-shadow: 0 8px 30px oklch(0% 0 0 / 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.logo {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  min-width: 0;
  transition: color 0.15s ease;
}

.logo-wordmark {
  white-space: nowrap;
}

.logo:hover {
  color: var(--yellow-dark);
  font-style: normal;
}

html[data-theme="dark"] .logo:hover {
  color: var(--yellow);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-desktop > a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding-block: 0.35rem;
  transition: color 0.15s ease;
}

.nav-desktop > a:hover {
  color: var(--muted);
}

.nav-dropdown {
  position: relative;
}

.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding-block: 0.35rem;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  color: inherit;
  transition: color 0.15s ease;
}

.nav-trigger:hover {
  color: var(--muted);
}

.nav-trigger .caret {
  transition: transform 0.2s ease;
}

.nav-dropdown:hover .caret,
.nav-dropdown:focus-within .caret {
  transform: rotate(180deg);
}

.nav-panel {
  position: absolute;
  z-index: 50;
  top: calc(100% + 0.35rem);
  left: 50%;
  translate: -50% 0;
  min-width: 12rem;
  padding: 0.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 12px 40px oklch(0% 0 0 / 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s;
}

.nav-dropdown:hover .nav-panel,
.nav-dropdown:focus-within .nav-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-panel a {
  display: block;
  padding: 0.5rem 0.65rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.nav-panel a:hover {
  background: var(--surface-raised);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.icon-btn:hover {
  color: var(--muted);
}

.theme-icon--dark {
  display: none;
  transform: rotate(180deg);
}

.hidden {
  display: none !important;
}

html[data-theme="dark"] .theme-icon--light {
  display: none;
}

html[data-theme="dark"] .theme-icon--dark {
  display: block;
}

.mobile-bar {
  position: fixed;
  z-index: 50;
  left: 1rem;
  right: 1rem;
  bottom: 1.25rem;
  pointer-events: none;
}

@media (min-width: 768px) {
  .mobile-bar {
    display: none;
  }
}

.mobile-menu {
  pointer-events: auto;
  border-radius: var(--radius-3xl);
  background: oklch(26.8% 0.007 34.298);
  color: #fff;
  font-family: var(--font-mono);
  box-shadow: 0 12px 40px oklch(0% 0 0 / 0.25);
}

.mobile-menu summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.5rem;
  padding: 0 1rem;
  cursor: pointer;
  list-style: none;
  font-size: 1rem;
  font-weight: 500;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.mobile-menu[open] .menu-icon-open {
  display: none;
}

.mobile-menu[open] .menu-icon-close {
  display: block !important;
}

.mobile-panel {
  list-style: none;
  margin: 0;
  padding: 0 0.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.mobile-panel a {
  display: block;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-xl);
  font-size: 1rem;
}

.mobile-panel a:hover {
  background: oklch(100% 0 0 / 0.08);
}

.hero {
  padding-top: clamp(4rem, 12vw, 7rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.hero-grid {
  display: grid;
  gap: 2rem;
}

.hero-title {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hero-title__emoji {
  font-size: clamp(3.5rem, 16vw, 6.25rem);
  line-height: 1;
  display: block;
}

.hero-title__text {
  display: block;
  font-size: clamp(2.05rem, 4.2vw, 2.85rem);
  line-height: 1.22;
  font-weight: 800;
}

.hero-title__text .accent {
  color: var(--yellow-dark);
}

html[data-theme="dark"] .hero-title__text .accent {
  color: var(--yellow);
}

.hero-lede {
  margin: 1.5rem 0 0;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.section {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.section-head {
  margin-bottom: 1.75rem;
}

.section-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-intro {
  margin: 0;
  max-width: 40rem;
  color: var(--muted);
}

.section-head--with-action {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.section-head--with-action .section-head__text {
  flex: 1 1 min(100%, 28rem);
  min-width: 0;
}

.section-view-all {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 0.2rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--foreground);
  border-bottom: 2px solid var(--yellow-dark);
  padding-bottom: 0.12rem;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}

.section-view-all:hover {
  color: var(--yellow-dark);
}

.rule {
  display: block;
  border: 0;
  height: 1px;
  width: min(1024px, calc(100% - 2rem));
  max-width: 100%;
  margin: 0 auto;
  background: var(--border);
  opacity: 0.85;
}

/* Full-bleed track aligned to .shell text: breakout from centered column, then pad like shell */
.carousel-breakout {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  position: relative;
}

.project-carousel-shell,
.photo-carousel-shell {
  padding-block: 0;
}

.carousel {
  --carousel-gap: var(--gap);
  /* Match .shell inner edge: column offset + same horizontal padding as .shell */
  --pad: calc((100vw - min(100vw, var(--max-width))) / 2 + clamp(1rem, 4vw, 2rem));
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: stretch;
  gap: var(--carousel-gap);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: var(--snap-type);
  scroll-padding-inline: var(--pad);
  padding-inline: var(--pad);
  padding-block: 0.5rem 1.25rem;
  margin-inline: 0;
  width: 100%;
  max-width: 100vw;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.carousel > * {
  flex: 0 0 min(420px, calc(100vw - var(--pad) * 2 - 2rem));
  scroll-snap-align: start;
}

.carousel--feature > * {
  flex: 0 0 min(315px, calc(100vw - var(--pad) * 2 - 2rem));
}

@media (max-width: 768px) {
  .carousel > * {
    flex-basis: calc(100vw - var(--pad) * 2 - 1rem);
  }

  .carousel--feature > * {
    flex-basis: min(315px, calc(100vw - var(--pad) * 2 - 1rem));
  }
}

.carousel * {
  -webkit-user-drag: none;
  user-select: none;
}

.carousel--photos > * {
  flex: 0 0 min(280px, calc(100vw - var(--pad) * 2 - 2rem));
}

/* Standalone Projects / Photography pages: grid inside shell (no horizontal scroll) */
.section--projects-page .project-carousel-shell .carousel.carousel--feature {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--carousel-gap);
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
  overflow-x: visible;
  overflow-y: visible;
  scroll-snap-type: none;
  padding-inline: 0;
  padding-block: 0.5rem 1.25rem;
  cursor: default;
  overscroll-behavior-x: auto;
  -webkit-overflow-scrolling: auto;
}

.section--projects-page .project-carousel-shell .carousel.carousel--feature > * {
  flex: unset;
  min-width: 0;
  max-width: none;
  scroll-snap-align: unset;
}

.section--photo-page .photo-carousel-shell .carousel.carousel--photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--carousel-gap);
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
  overflow: visible;
  scroll-snap-type: none;
  padding-inline: 0;
  padding-block: 0.5rem 1.25rem;
  cursor: default;
  overscroll-behavior-x: auto;
  -webkit-overflow-scrolling: auto;
}

.section--photo-page .photo-carousel-shell .carousel.carousel--photos > * {
  flex: unset;
  min-width: 0;
  max-width: none;
  scroll-snap-align: unset;
}

@media (max-width: 900px) {
  .section--projects-page .project-carousel-shell .carousel.carousel--feature,
  .section--photo-page .photo-carousel-shell .carousel.carousel--photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .section--projects-page .project-carousel-shell .carousel.carousel--feature,
  .section--photo-page .photo-carousel-shell .carousel.carousel--photos {
    grid-template-columns: minmax(0, 1fr);
  }
}

.project-card {
  background: var(--background);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  box-shadow: 0 4px 18px oklch(0% 0 0 / 0.05);
  overflow: hidden;
  min-width: 0;
}

html[data-theme="dark"] .project-card {
  background: var(--surface);
}

.project-card-link {
  display: block;
  height: 100%;
}

.project-thumb {
  height: 200px;
  background: var(--thumb, var(--surface-raised));
}

.project-thumb--photo {
  background-size: cover;
  background-position: center;
}

.project-body {
  padding: 1rem 1.1rem 1.25rem;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.project-year {
  font-weight: 500;
}

.badge {
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
}

.project-name {
  margin: 0 0 0.5rem;
  font-family: var(--font-sans);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
  padding: 0;
  list-style: none;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.tag-row li + li::before {
  content: "·";
  margin-right: 0.5rem;
  opacity: 0.45;
}

.project-desc {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

/* —— Projects: year & type filter pills —— */

.project-filters {
  position: relative;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: var(--radius-xl);
  outline-offset: 4px;
}

.project-filters:focus-visible {
  outline: 2px solid var(--yellow-dark);
}

.project-filters__bar {
  display: none;
}

.project-filters__drawer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-filters__group {
  margin: 0;
  padding: 0;
  border: none;
  min-width: 0;
}

.project-filters__legend {
  float: left;
  width: 100%;
  padding: 0;
  margin: 0 0 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-filters__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  clear: both;
}

/* Pointer devices: one-line trigger, full filters in a hover / focus-within panel */
@media (hover: hover) and (pointer: fine) {
  .project-filters {
    margin-bottom: 0.5rem;
  }

  .project-filters__bar {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.2rem 0 0.45rem;
    margin: 0;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    user-select: none;
    pointer-events: none;
  }

  .project-filters__drawer {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 35;
    margin-top: 0;
    padding: 1rem 1.1rem 1.05rem;
    flex-direction: column;
    gap: 1rem;
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 14px 48px oklch(0% 0 0 / 0.14);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-0.35rem);
    transition:
      opacity 0.22s ease,
      transform 0.22s ease,
      visibility 0.22s;
    pointer-events: none;
  }

  .project-filters:hover .project-filters__drawer,
  .project-filters:focus-within .project-filters__drawer {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) and (hover: hover) and (pointer: fine) {
  .project-filters__drawer {
    transition-duration: 0.01ms !important;
    transform: none !important;
  }

  .project-filters:hover .project-filters__drawer,
  .project-filters:focus-within .project-filters__drawer {
    transform: none;
  }
}

.project-filter-pill {
  margin: 0;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--foreground);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.project-filter-pill:hover {
  border-color: var(--muted);
  color: var(--foreground);
}

.project-filter-pill:focus-visible {
  outline: 2px solid var(--yellow-dark);
  outline-offset: 2px;
}

.project-filter-pill.is-active {
  border-color: var(--foreground);
  background: var(--foreground);
  color: var(--background);
}

html[data-theme="dark"] .project-filter-pill.is-active {
  border-color: oklch(92% 0.02 250);
  background: oklch(92% 0.02 250);
  color: oklch(18% 0.02 265);
}

/* —— GuaRDEB-style full-bleed card (image + glass UI, hover reveals lede) —— */

.project-card--feature {
  border: none;
  box-shadow: 0 9px 30px oklch(0% 0 0 / 0.16);
}

html[data-theme="dark"] .project-card--feature {
  box-shadow: 0 12px 36px oklch(0% 0 0 / 0.42);
}

.project-card-link--feature {
  border-radius: inherit;
  color: #fff;
}

.project-feature-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 4 / 5;
  min-height: 16.5rem;
  border-radius: var(--radius-2xl);
  overflow: hidden;
}

.project-feature-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: transform 0.5s ease;
}

.project-card--feature:hover .project-feature-bg,
.project-card--feature:focus-within .project-feature-bg {
  transform: scale(1.06);
}

.project-feature-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    oklch(0% 0 0 / 0.35) 0%,
    oklch(0% 0 0 / 0.1) 38%,
    oklch(0% 0 0 / 0.55) 100%
  );
  pointer-events: none;
}

.project-feature-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.85rem 0.85rem 0;
}

.project-feature-bottom {
  position: relative;
  z-index: 1;
  padding: 0.95rem 0.85rem 0.95rem;
}

.glass-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.04em;
  background: oklch(100% 0 0 / 0.18);
  border: 1px solid oklch(100% 0 0 / 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 2px 9px oklch(0% 0 0 / 0.1);
}

.glass-pill--round svg {
  width: 14px;
  height: 14px;
}

.glass-pill--year {
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.6rem;
  text-transform: uppercase;
}

.glass-pill--round {
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border-radius: 50%;
  flex-shrink: 0;
}

.glass-pill--tag {
  padding: 0.22rem 0.48rem;
  border-radius: 999px;
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.glass-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.42rem 0 0;
  padding: 0;
  list-style: none;
}

.glass-tag-row li {
  margin: 0;
}

.glass-tag-row li::before {
  display: none;
}

.project-feature-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1.2rem, 3.2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 1px 18px oklch(0% 0 0 / 0.35);
}

.project-feature-lede {
  margin: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(0.35rem);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.45;
  color: oklch(100% 0 0 / 0.95);
  text-shadow: 0 1px 12px oklch(0% 0 0 / 0.4);
  transition:
    max-height 0.4s ease,
    opacity 0.35s ease,
    margin 0.35s ease,
    transform 0.35s ease;
}

.project-card--feature:hover .project-feature-lede,
.project-card--feature:focus-within .project-feature-lede {
  max-height: 5.5rem;
  opacity: 1;
  margin-top: 0.55rem;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .project-feature-bg {
    transform: none;
    transition: none;
  }

  .project-card--feature:hover .project-feature-bg,
  .project-card--feature:focus-within .project-feature-bg {
    transform: none;
  }

  .project-feature-lede {
    transition: none;
  }
}

@media (hover: none) {
  .project-feature-lede {
    max-height: none;
    opacity: 1;
    margin-top: 0.55rem;
    transform: none;
  }
}

.photo-card {
  margin: 0;
  scroll-snap-align: start;
}

.photo-frame {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  background-size: cover;
  background-position: center;
  box-shadow: 0 8px 28px oklch(0% 0 0 / 0.08);
}

.photo-frame[data-photo-src] {
  cursor: zoom-in;
}

.photo-frame[data-photo-src]:focus-visible {
  outline: 2px solid var(--yellow-dark);
  outline-offset: 3px;
}

.photo-card figcaption {
  margin-top: 0.65rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* —— Project password gate —— */

.password-gate {
  position: fixed;
  inset: 0;
  z-index: 205;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.password-gate[hidden] {
  display: none !important;
}

.password-gate.is-open {
  opacity: 1;
  visibility: visible;
}

.password-gate__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: oklch(0% 0 0 / 0.72);
  cursor: pointer;
}

.password-gate__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 22rem);
  padding: 1.35rem 1.25rem 1.25rem;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  background: var(--surface, var(--background));
  box-shadow: 0 24px 80px oklch(0% 0 0 / 0.28);
  transform: translateY(0.75rem);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.32, 1);
}

.password-gate.is-open .password-gate__dialog {
  transform: translateY(0);
}

.password-gate__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.password-gate__desc {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}

.password-gate__form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

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

.password-gate__input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  font: inherit;
  font-size: 1rem;
  background: var(--background);
  color: var(--foreground);
}

.password-gate__input:focus-visible {
  outline: 2px solid var(--yellow-dark);
  outline-offset: 2px;
}

.password-gate__error {
  margin: 0;
  font-size: 0.82rem;
  color: oklch(52% 0.2 25);
}

html[data-theme="dark"] .password-gate__error {
  color: oklch(72% 0.14 25);
}

.password-gate__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.password-gate__submit,
.password-gate__cancel {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-xl);
  cursor: pointer;
  border: 1px solid transparent;
}

.password-gate__submit {
  border-color: var(--foreground);
  background: var(--foreground);
  color: var(--background);
}

.password-gate__submit:hover {
  opacity: 0.92;
}

.password-gate__cancel {
  border-color: var(--border);
  background: transparent;
  color: var(--foreground);
}

.password-gate__cancel:hover {
  border-color: var(--muted);
  color: var(--muted);
}

.password-gate__submit:focus-visible,
.password-gate__cancel:focus-visible {
  outline: 2px solid var(--yellow-dark);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .password-gate,
  .password-gate__dialog {
    transition-duration: 0.01ms !important;
  }

  .password-gate__dialog {
    transform: none !important;
  }
}

/* —— Photo lightbox —— */

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.photo-lightbox[hidden] {
  display: none !important;
}

.photo-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.photo-lightbox__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: oklch(0% 0 0 / 0.72);
  cursor: pointer;
}

.photo-lightbox__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(96vw, 1200px);
  max-height: 100%;
  transform: translateY(110%);
  transition: transform 0.48s cubic-bezier(0.22, 1, 0.32, 1);
}

.photo-lightbox.is-open .photo-lightbox__dialog {
  transform: translateY(0);
}

.photo-lightbox__close {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--foreground);
  cursor: pointer;
  box-shadow: 0 4px 20px oklch(0% 0 0 / 0.2);
  transition:
    color 0.15s ease,
    transform 0.15s ease;
}

.photo-lightbox__close:hover {
  color: var(--muted);
}

.photo-lightbox__close:focus-visible {
  outline: 2px solid var(--yellow-dark);
  outline-offset: 2px;
}

.photo-lightbox__figure {
  margin: 0;
  padding: 14px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px oklch(0% 0 0 / 0.35);
  max-height: calc(100vh - 5rem);
  max-width: 100%;
  box-sizing: border-box;
}

.photo-lightbox__figure img {
  display: block;
  max-width: min(calc(92vw - 28px), 1100px);
  max-height: calc(100vh - 8rem);
  width: auto;
  height: auto;
  object-fit: contain;
}

.photo-lightbox__caption {
  margin: 0.75rem 0 0;
  padding: 0 0.25rem;
  max-width: 42rem;
  text-align: center;
  font-size: 0.95rem;
  color: #fff;
  text-shadow: 0 1px 12px oklch(0% 0 0 / 0.5);
}

.photo-lightbox__caption:empty {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .photo-lightbox,
  .photo-lightbox__dialog {
    transition-duration: 0.01ms !important;
  }

  .photo-lightbox__dialog {
    transform: none !important;
  }
}

.text-link {
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.1rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.text-link:hover {
  color: var(--muted);
  border-color: transparent;
}

/* —— Blog index (year + list rows) —— */

.section--blog .blog-index {
  margin-top: 0.25rem;
}

.blog-year-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.blog-year-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  padding-bottom: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--border);
}

.blog-year-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.blog-year-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--foreground);
}

.blog-year-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.blog-year-list > li {
  margin: 0;
  padding: 0;
}

.blog-row {
  display: grid;
  grid-template-columns: 3.75rem minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  margin-inline: 0;
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 1px 3px oklch(0% 0 0 / 0.04);
  transition:
    background 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

html[data-theme="dark"] .blog-row {
  background: var(--surface);
  box-shadow: 0 2px 12px oklch(0% 0 0 / 0.25);
}

.blog-row:hover {
  box-shadow: 0 6px 22px oklch(0% 0 0 / 0.09);
  border-color: color-mix(in oklch, var(--border) 75%, var(--foreground));
}

html:not([data-theme="dark"]) .blog-row:hover {
  background: #fff;
}

html[data-theme="dark"] .blog-row:hover {
  background: var(--surface-raised);
  box-shadow: 0 6px 24px oklch(0% 0 0 / 0.4);
}

.blog-row:focus-visible {
  outline: 2px solid var(--yellow-dark);
  outline-offset: 2px;
}

.blog-row__date {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.blog-row__main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.blog-row__title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.blog-row__subtitle {
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--muted);
}

.blog-row__arrow {
  justify-self: end;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--muted);
  transition:
    transform 0.2s ease,
    color 0.2s ease;
}

.blog-row:hover .blog-row__arrow,
.blog-row:focus-visible .blog-row__arrow {
  color: var(--foreground);
  transform: translateX(4px);
}

@media (max-width: 52rem) {
  .blog-row {
    grid-template-columns: 3.25rem minmax(0, 1fr) auto;
    gap: 0.5rem 0.75rem;
    padding: 0.85rem 0.9rem;
  }

  .blog-row__arrow {
    align-self: center;
  }
}

/* —— Blog article (mock / text-only) —— */

.article-page {
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
  padding-bottom: clamp(3rem, 8vw, 5rem);
}

.article-page__inner {
  max-width: 38rem;
}

.article-page__meta {
  margin: 0 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.article-page__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-sans);
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.article-page__lede {
  margin: 0 0 2.25rem;
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--muted);
}

.article-prose h2 {
  margin: 2.25rem 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.article-prose h2:first-child {
  margin-top: 0;
}

.article-prose p {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--foreground);
}

.article-prose p:last-child {
  margin-bottom: 0;
}

/* —— Project detail (case study) —— */

.project-detail {
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
  padding-bottom: clamp(3rem, 8vw, 5rem);
}

.project-detail__inner {
  max-width: var(--max-width);
}

.project-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  transition: color 0.15s ease, transform 0.15s ease;
}

.project-back:hover {
  color: var(--foreground);
}

.project-back:active {
  transform: translateX(-2px);
}

.project-detail__meta {
  margin: 0 0 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-detail__title {
  margin: 0 0 1rem;
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.project-detail__intro {
  margin: 0 0 2rem;
  max-width: 40rem;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--muted);
}

.project-detail__figure {
  margin: 0;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface-raised);
  box-shadow: 0 8px 32px oklch(0% 0 0 / 0.08);
}

html[data-theme="dark"] .project-detail__figure {
  box-shadow: 0 12px 40px oklch(0% 0 0 / 0.35);
}

.project-detail__figure img {
  display: block;
  width: 100%;
  height: auto;
}

/* —— Places map (postcard-style card) —— */

.section--places {
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.places-map-card {
  --places-map-card-bg: oklch(98.2% 0.004 250);
  --places-map-stroke: oklch(86% 0.014 252);
  --places-map-highlight: #5b9bd5;
  --places-map-highlight-stroke: #4a89c7;

  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--places-map-card-bg);
  box-shadow: 0 2px 12px oklch(0% 0 0 / 0.04);
  overflow: hidden;
}

html[data-theme="dark"] .places-map-card {
  --places-map-card-bg: oklch(24% 0.02 260);
  --places-map-stroke: oklch(40% 0.03 260);
  --places-map-highlight: #5b9bd5;
  --places-map-highlight-stroke: #6aa9dc;
}

.places-map-card__body {
  padding: 1rem;
}

.places-map-wrap {
  position: relative;
  width: 100%;
  border-radius: calc(var(--radius-xl) - 2px);
  overflow: hidden;
  background: var(--places-map-card-bg);
}

.work-map-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  max-width: min(18rem, calc(100vw - 1.5rem));
  padding: 0.4rem 0.65rem;
  margin: 0;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 10px 36px oklch(0% 0 0 / 0.16);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--foreground);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.12s ease,
    visibility 0.12s ease;
}

.work-map-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
}

.work-map-tooltip__flag {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.work-map-tooltip__name {
  min-width: 0;
}

@media (prefers-reduced-motion: reduce) {
  .work-map-tooltip {
    transition: none;
  }
}

.work-map-svg {
  display: block;
  width: 100%;
  height: auto;
}

.work-map-svg path.country {
  fill: var(--places-map-card-bg);
  stroke: var(--places-map-stroke);
  stroke-width: 0.55;
  stroke-linejoin: round;
  cursor: help;
}

.work-map-svg path.country.is-highlight {
  fill: var(--places-map-highlight);
  stroke: var(--places-map-highlight-stroke);
}

.places-map-fallback {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .carousel {
    scroll-behavior: auto;
  }
}

/* —— Standalone CV page (EN / ES) —— */

body.cv-body {
  background: var(--surface);
}

.nav-desktop > a[aria-current="page"] {
  color: var(--foreground);
  font-weight: 700;
}

.cv-page {
  padding: clamp(1.25rem, 3vw, 2rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.cv-shell {
  max-width: 72rem;
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 4vw, 2.5rem);
  align-items: stretch;
}

.cv-hero {
  padding: 1.35rem 1.5rem 1.65rem;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  background: var(--surface-raised);
}

.cv-hero__top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.cv-hero__top .cv-lang {
  margin: 0;
}

.cv-hero__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
  text-align: center;
}

.cv-hero__photo-slot {
  flex: 0 0 auto;
  line-height: 0;
}

.cv-hero__photo {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  border: 1px solid var(--border);
  background: var(--surface);
}

.cv-hero__text {
  width: 100%;
  max-width: 40rem;
  margin-inline: auto;
  min-width: 0;
}

.cv-hero__text .cv-sidebar__name,
.cv-hero__text .cv-sidebar__role {
  text-align: center;
}

.cv-lang {
  margin: 0 0 1.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.cv-lang a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.cv-lang a:hover {
  color: var(--foreground);
}

.cv-lang a[aria-current="true"] {
  color: var(--foreground);
  font-weight: 800;
}

.cv-lang__sep {
  margin: 0 0.35rem;
  opacity: 0.45;
}

.cv-sidebar__name {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-align: left;
}

.cv-sidebar__role {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--muted);
  text-align: left;
  line-height: 1.4;
}

.cv-main {
  min-width: 0;
  padding-top: 0.25rem;
}

.cv-section {
  margin-bottom: clamp(2.25rem, 4vw, 3rem);
}

.cv-section:last-child {
  margin-bottom: 0;
}

.cv-section__title {
  margin: 0 0 1.1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.cv-section--split {
  display: grid;
  grid-template-columns: minmax(5rem, 7rem) minmax(0, 1fr);
  gap: 0.75rem clamp(1rem, 3vw, 2.5rem);
  align-items: start;
}

.cv-section--split .cv-section__title--side {
  margin-bottom: 0;
  padding-top: 0.2rem;
}

@media (max-width: 40rem) {
  .cv-section--split {
    grid-template-columns: 1fr;
  }

  .cv-section--split .cv-section__title--side {
    margin-bottom: 0.65rem;
  }
}

.cv-edu-block {
  margin-bottom: 1.35rem;
}

.cv-edu-block:last-child {
  margin-bottom: 0;
}

.cv-edu-dates {
  display: block;
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.cv-edu-school {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cv-edu-degree {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--foreground);
}

.cv-company__name {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cv-company__name--continued {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.cv-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.35rem;
  border-left: 1px solid var(--border);
}

.cv-timeline--continuous {
  padding-bottom: 0.15rem;
}

.cv-timeline__item {
  position: relative;
  padding: 0 0 1.35rem 0;
}

.cv-timeline__item--new-org {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
}

.cv-timeline__item:last-child {
  padding-bottom: 0;
}

.cv-timeline__node {
  position: absolute;
  left: calc(-1.35rem - 1px);
  top: 0.52rem;
  transform: translateX(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--muted);
  background: var(--background);
  box-sizing: border-box;
  z-index: 1;
}

.cv-timeline__dates {
  display: block;
  margin: 0 0 0.3rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.cv-timeline__role {
  margin: 0 0 0.2rem;
  font-size: 0.98rem;
  font-weight: 700;
}

.cv-timeline__meta {
  margin: 0;
  font-size: 0.88rem;
  color: var(--foreground);
  line-height: 1.45;
}

.cv-skills__group {
  margin-bottom: 1.35rem;
}

.cv-skills__group:last-child {
  margin-bottom: 0;
}

.cv-skills__heading {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.cv-pills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cv-pills li {
  margin: 0;
  padding: 0.28rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--foreground);
}

/* —— Contact end card —— */
.section--end-cards {
  padding-top: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.end-cards {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.end-card {
  display: grid;
  grid-template-columns: minmax(0, 10.5rem) minmax(0, 1fr);
  gap: 1.25rem 2rem;
  align-items: start;
  padding: clamp(1.35rem, 3.2vw, 2rem);
  border-radius: var(--radius-3xl);
  background: var(--surface-raised);
  border: 1px solid var(--border);
}

.end-card__title {
  margin: 0;
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.end-card-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: color 0.15s ease, background-color 0.15s ease;
  border-radius: var(--radius-lg);
  margin: 0 calc(-0.35rem);
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.end-card-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.end-card-row__lead {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.end-card-row__icon {
  flex-shrink: 0;
  opacity: 0.72;
  transition: opacity 0.15s ease;
}

.end-card-row:hover .end-card-row__icon {
  opacity: 0.95;
}

.end-card-row:hover {
  color: var(--muted);
}

.end-card-row__label {
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.02em;
}

.end-card-row__value {
  flex: 1 1 12rem;
  min-width: 0;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.86rem;
  font-weight: 500;
  word-break: break-word;
}

.end-card-row__go {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 1.05rem;
  line-height: 1;
  font-weight: 500;
  opacity: 0.5;
}

.end-card-row:hover .end-card-row__go {
  opacity: 0.9;
}

@media (max-width: 40rem) {
  .end-card {
    grid-template-columns: 1fr;
  }

  .end-card-row__lead {
    flex: 1 1 100%;
  }

  .end-card-row__value {
    flex: 1 1 calc(100% - 2.5rem);
  }

  .end-card-row__go {
    margin-left: 0;
  }
}

/* —— Site footer —— */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.15rem 0 2rem;
  margin-top: 0;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.site-footer__copy {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}
