:root {
  color-scheme: dark;
  --bg: #090709;
  --bg-alt: #120d10;
  --header-bg: rgba(9, 7, 9, 0.78);
  --surface: rgba(20, 15, 18, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.04);
  --surface-strong: #150f12;
  --text: #f8f3f4;
  --muted: #d4c4c8;
  --faint: #a69299;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #9b2f44;
  --accent-2: #d35f77;
  --accent-soft: rgba(155, 47, 68, 0.18);
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.24);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --shell: min(1180px, calc(100vw - 32px));
  --body-font: 'Manrope', 'Segoe UI', sans-serif;
  --display-font: 'Space Grotesk', Georgia, serif;
}

html[data-theme='light'] {
  color-scheme: light;
  --bg: #f6f1f2;
  --bg-alt: #fffdfd;
  --header-bg: rgba(246, 241, 242, 0.86);
  --surface: rgba(255, 255, 255, 0.95);
  --surface-soft: rgba(155, 47, 68, 0.05);
  --surface-strong: #ffffff;
  --text: #181115;
  --muted: #5f4c54;
  --faint: #7b6971;
  --line: rgba(92, 55, 66, 0.14);
  --accent: #8f2a3d;
  --accent-2: #bf5168;
  --accent-soft: rgba(143, 42, 61, 0.1);
  --shadow: 0 24px 60px rgba(94, 36, 50, 0.12);
  --shadow-soft: 0 16px 38px rgba(94, 36, 50, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--body-font);
  line-height: 1.55;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(155, 47, 68, 0.24), transparent 32%),
    radial-gradient(circle at bottom right, rgba(155, 47, 68, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 22%),
    var(--bg);
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background:
    radial-gradient(circle at 18% 14%, rgba(211, 95, 119, 0.12), transparent 22%),
    radial-gradient(circle at 78% 10%, rgba(155, 47, 68, 0.14), transparent 18%),
    radial-gradient(circle at 72% 84%, rgba(255, 255, 255, 0.04), transparent 18%);
  filter: blur(10px);
}

body::after {
  opacity: 0.26;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 92px 92px;
  mix-blend-mode: soft-light;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.shell {
  width: var(--shell);
  margin: 0 auto;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 110;
  width: 100%;
  height: 3px;
}

.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(211, 95, 119, 0.45);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(20px);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 84px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--accent), #651a2a);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 18px 30px rgba(155, 47, 68, 0.28);
}

.brand__copy {
  display: grid;
  gap: 2px;
}

.brand__copy strong {
  font-size: 1rem;
  line-height: 1.1;
}

.brand__copy span {
  color: var(--muted);
  font-size: 0.92rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-inline: auto;
}

.site-nav a {
  position: relative;
  padding: 5px 0;
  color: var(--muted);
  transition: color 0.2s ease;
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

.theme-toggle,
.nav-toggle,
.button,
.filter-bar__button,
.modal-close,
.modal-project__nav {
  border: 1px solid var(--line);
  outline: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover,
.nav-toggle:hover,
.button:hover,
.filter-bar__button:hover,
.modal-close:hover,
.modal-project__nav:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.theme-toggle,
.nav-toggle,
.button,
.filter-bar__button,
.modal-close {
  cursor: pointer;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.theme-toggle__icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 0.8rem;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.nav-toggle__bars {
  display: block;
  width: 18px;
  height: 12px;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 5px / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 10px / 100% 2px no-repeat;
}

.section {
  padding: 88px 0 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 36px;
  align-items: center;
  padding-top: 38px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.panel h3,
.skill-card h3,
.project-card__body h3,
.contact-panel__copy h2,
.media-modal__header h3 {
  margin: 0;
  font-family: var(--display-font);
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(3.25rem, 7vw, 6.2rem);
}

.hero__lead,
.section-heading p,
.panel p,
.skill-card p,
.project-card__summary,
.project-card__list,
.contact-panel__copy p,
.cert-card p,
.media-modal__meta,
.modal-project__content p,
.empty-state {
  color: var(--muted);
}

.hero__lead {
  max-width: 64ch;
  margin: 20px 0 0;
  font-size: 1.05rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
}

.button--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #681b2d);
  box-shadow: 0 18px 30px rgba(155, 47, 68, 0.28);
}

.button--accent {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}

.button--accent:hover {
  background: color-mix(in srgb, var(--accent) 24%, var(--surface));
}

.button--ghost {
  color: var(--text);
  background: var(--surface);
}

.contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.contact-strip a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.contact-strip a:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  color: var(--text);
  background: rgba(155, 47, 68, 0.12);
}

.hero__highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.hero__highlights article,
.panel,
.project-card,
.cert-card,
.contact-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.hero__highlights article {
  padding: 18px;
}

.hero__highlights span,
.floating-note__label,
.timeline span,
.cert-card span,
.project-card__badge,
.modal-project__counter,
.caption-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero__highlights strong {
  display: block;
  margin-top: 10px;
  font-size: 0.98rem;
  line-height: 1.45;
}

.hero__visual {
  position: relative;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.portrait-card {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 28%, rgba(211, 95, 119, 0.16), transparent 36%), var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  transform: perspective(1200px) translateY(var(--lift, 0px)) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  will-change: transform;
}

.portrait-card__glow {
  position: absolute;
  inset: auto 8% 8% auto;
  width: 42%;
  height: 42%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(211, 95, 119, 0.55), rgba(211, 95, 119, 0));
  filter: blur(14px);
  animation: portrait-glow 7s ease-in-out infinite alternate;
}

.portrait-card::before {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  pointer-events: none;
  z-index: 2;
}

.portrait-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(255, 255, 255, 0.2), transparent 36%);
  mix-blend-mode: screen;
  opacity: 0.5;
  pointer-events: none;
  z-index: 2;
}

.portrait-card:hover {
  --lift: -8px;
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  box-shadow: 0 34px 74px rgba(0, 0, 0, 0.36);
}

.portrait-card img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  border-radius: 50%;
  border: 4px solid color-mix(in srgb, var(--surface) 88%, var(--accent) 12%);
  box-shadow: inset 0 0 0 1px var(--line), 0 18px 36px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.portrait-card:hover img {
  transform: scale(1.03);
  filter: saturate(1.05) contrast(1.03);
}

.hero__meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.floating-note {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  max-width: none;
  width: 100%;
}

.floating-note strong {
  display: block;
  margin-top: 8px;
  font-size: 1rem;
  line-height: 1.45;
}

@keyframes portrait-glow {
  0% {
    opacity: 0.55;
    transform: scale(0.95) translate3d(-2%, 2%, 0);
  }

  100% {
    opacity: 0.9;
    transform: scale(1.08) translate3d(4%, -4%, 0);
  }
}

.section-heading {
  display: grid;
  gap: 8px;
  max-width: 800px;
  margin-bottom: 28px;
}

.section-heading h2 {
  font-size: clamp(2rem, 4.4vw, 3.9rem);
}

.section-heading p {
  margin: 0;
}

.section-heading--row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  max-width: none;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
}

.panel {
  padding: 24px;
}

.panel--lede p {
  margin: 0;
}

.panel--lede p + p {
  margin-top: 14px;
}

.panel h3 {
  margin-bottom: 14px;
  font-size: 1.7rem;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline div {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.timeline strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  line-height: 1.45;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.skill-card {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.skill-card h3 {
  font-size: 1.65rem;
}

.chip-list,
.tag-row,
.contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-list span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.88rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.filter-bar__button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
}

.filter-bar__button.is-active {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(155, 47, 68, 0.14);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  overflow: hidden;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.project-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(155, 47, 68, 0.16), transparent 50%), var(--surface-strong);
}

.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__badge {
  position: absolute;
  left: 16px;
  top: 16px;
  background: rgba(8, 7, 9, 0.82);
  color: #fff;
}

.project-card__body {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.project-card__body h3 {
  font-size: 1.8rem;
}

.project-card__summary,
.project-card__list {
  margin: 0;
}

.project-card__list {
  padding-left: 18px;
}

.project-card__list li + li {
  margin-top: 8px;
}

.project-card .button {
  justify-self: start;
}

.empty-state {
  margin: 0;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.cert-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  color: inherit;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.cert-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.cert-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.cert-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.cert-card__media object,
.cert-card__media iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--surface-strong);
}

.cert-card__document {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--accent-2);
  font-family: var(--display-font);
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: 0.08em;
}

.cert-card__body {
  display: grid;
  gap: 8px;
}

.cert-card__body h3 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 1.4rem;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.cert-card__body p {
  margin: 0;
}

.cert-card__link {
  justify-self: start;
}

.contact-panel {
  display: grid;
  gap: 28px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(155, 47, 68, 0.06), transparent 18%), var(--surface);
}

.contact-panel__copy h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.contact-panel__copy p {
  max-width: 70ch;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.contact-links a {
  display: grid;
  gap: 8px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.contact-links a:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: rgba(155, 47, 68, 0.14);
}

.contact-links span {
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.contact-links strong {
  font-size: 1rem;
  line-height: 1.4;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 28px 0 40px;
  color: var(--faint);
}

.site-footer p,
.site-footer a {
  margin: 0;
}

.media-modal {
  width: min(1120px, calc(100vw - 24px));
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
}

.media-modal::backdrop {
  background: rgba(7, 6, 8, 0.8);
  backdrop-filter: blur(10px);
}

.media-modal__shell {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.media-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.media-modal__header h3 {
  margin-top: 6px;
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.media-modal__meta {
  max-width: 62ch;
  margin: 10px 0 0;
}

.modal-close {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-soft);
}

.media-modal__body {
  margin-top: 20px;
}

.modal-project {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 20px;
}

.modal-project__viewer {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
}

.modal-project__viewer img {
  width: 100%;
  height: min(68vh, 720px);
  object-fit: contain;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #070608;
}

.modal-project__nav {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text);
  background: var(--surface-soft);
}

.modal-project__content {
  display: grid;
  gap: 14px;
  align-content: start;
}

.modal-project__content p {
  margin: 0;
}

.modal-project__counter {
  justify-self: start;
}

.modal-project__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-project__thumbs button {
  width: 68px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-soft);
  opacity: 0.72;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.modal-project__thumbs button:hover,
.modal-project__thumbs button.is-active {
  opacity: 1;
  transform: translateY(-1px);
  border-color: var(--accent);
}

.modal-project__thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 120;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 18px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1080px) {
  .hero,
  .about-grid,
  .skill-grid,
  .project-grid,
  .cert-grid,
  .contact-links,
  .modal-project {
    grid-template-columns: 1fr;
  }

  .section-heading--row {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-bar {
    justify-content: flex-start;
  }

  .modal-project__viewer {
    grid-template-columns: 1fr;
  }

  .modal-project__nav {
    display: none;
  }
}

@media (max-width: 920px) {
  .site-header__inner {
    flex-wrap: wrap;
    padding: 14px 0;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .theme-toggle {
    margin-left: 0;
  }

  .site-nav {
    display: none;
    width: 100%;
    margin-inline: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0 4px;
    border-top: 1px solid var(--line);
  }

  .site-nav[data-open='true'] {
    display: flex;
  }

  .hero {
    padding-top: 18px;
  }

  .hero__meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100vw - 20px, 1180px);
  }

  .section {
    padding-top: 70px;
  }

  .hero h1 {
    max-width: 11ch;
    font-size: clamp(2.8rem, 15vw, 4.6rem);
  }

  .hero__actions {
    flex-direction: column;
  }

  .portrait-card {
    width: min(100%, 340px);
  }

  .button,
  .hero__actions .button,
  .filter-bar__button {
    width: 100%;
  }

  .contact-strip {
    gap: 8px;
  }

  .portrait-card {
    width: min(100%, 340px);
  }

  .site-footer {
    flex-direction: column;
  }

  .filter-bar {
    overflow-x: auto;
    padding-bottom: 6px;
    width: 100%;
  }

  .filter-bar__button {
    width: auto;
    flex-shrink: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
