@import url("https://fonts.googleapis.com/css2?family=Science+Gothic:wght@300;400;500;600;700;800&display=swap");

/*
Header, sections, cards, and subpages for the portfolio runtime.
*/

:root {
  color-scheme: dark;
	--font-body: "Science Gothic", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --header-side-frame: 136px;
  --bg-scroll-progress: 0;
  --bg-convergence-y: 50%;
  --bg-layer-far-offset: 0px;
  --bg-layer-midfar-offset: 0px;
  --bg-layer-mid-offset: 0px;
  --bg-layer-near-offset: 0px;
  --accent-cold: rgb(110, 131, 153);
  --accent-ice: rgb(194, 202, 212);
	--site-bg: #05080c;
	--muted: #8f9aa6;
  --header-bg-rgb: 27 35 44;
  --header-bg: rgb(var(--header-bg-rgb));
  --header-surface: rgb(var(--header-bg-rgb) / 0.8);
  --section-title-bg: var(--header-bg);
  --header-control-inline: 44px;
  --header-control-height: 44px;
  --header-pill-radius: calc(var(--header-control-height) / 2);
  --lang-switcher-expanded-inline: calc(var(--header-control-inline) * 3);
  --lang-switcher-edge-gap: 10px;
  --surface-panel-soft: #0f1419;
  --surface-panel: #131920;
  --surface-panel-strong: #171f27;
  --surface-chip-bg: #1f2933;
  --surface-status-bg: #182028;
  --surface-border: #2f3c49;
  --surface-border-strong: #3d4d5b;
  --surface-overlay: color-mix(in srgb, var(--surface-panel-soft) 82%, transparent);
  --header-pill-border: var(--surface-border-strong);
  --back-to-top-inline: 60px;
  --surface-card-shell: var(--surface-panel);
  --surface-card-border: var(--surface-border);
}

body,
button,
input,
textarea,
select {
	font-family: var(--font-body);
}

html {
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  background-color: var(--site-bg);
  color: CanvasText;
  max-width: 1150px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

body > :not(.site-background):not(.back-to-top) {
  position: relative;
  z-index: 1;
}

.site-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--site-bg) 80%, var(--accent-cold) 20%) 0%, color-mix(in srgb, var(--site-bg) 90%, var(--accent-cold) 10%) 36%, var(--site-bg) 70%, color-mix(in srgb, var(--site-bg) 94%, black 6%) 100%);
}

.site-background::before,
.site-background::after {
  content: "";
  position: absolute;
  inset: 0;
}

.site-background::before {
  background:
    radial-gradient(ellipse 165% 72% at 50% var(--bg-convergence-y), rgb(110 120 132 / 0.032), rgb(86 95 104 / 0.018) 22%, rgb(54 61 68 / 0.008) 40%, transparent 72%),
    linear-gradient(to bottom, rgb(0 0 0 / 0.18), transparent 22%, transparent 78%, rgb(0 0 0 / 0.3) 100%);
}

.site-background::after {
  background:
    radial-gradient(circle at 50% 10%, rgb(255 255 255 / 0.015), transparent 30%),
    linear-gradient(to bottom, transparent 0%, transparent 62%, rgb(0 0 0 / 0.16) 84%, rgb(0 0 0 / 0.24) 100%);
}

.site-background__layer {
  position: absolute;
  inset: -18vh -12vw -16vh;
  will-change: transform;
}

.site-background__layer--far {
  transform: translate3d(0, var(--bg-layer-far-offset), 0);
}

.site-background__layer--midfar {
  transform: translate3d(0, var(--bg-layer-midfar-offset), 0);
}

.site-background__layer--mid {
  transform: translate3d(0, var(--bg-layer-mid-offset), 0);
}

.site-background__layer--near {
  transform: translate3d(0, var(--bg-layer-near-offset), 0);
}

.site-background__star {
  position: absolute;
  inline-size: var(--star-size, 2px);
  block-size: var(--star-size, 2px);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  opacity: var(--star-opacity, 1);
  will-change: transform;
}

.site-background__star--twinkle {
  animation: star-twinkle var(--star-twinkle-duration, 0.25s) linear infinite;
  animation-delay: var(--star-twinkle-delay, 0s);
}

@keyframes star-twinkle {
  0%,
  100% {
    opacity: var(--star-opacity-min, var(--star-opacity, 1));
  }

  50% {
    opacity: var(--star-opacity-max, var(--star-opacity, 1));
  }
}

a {
  color: var(--accent-ice);
}

/* Header - navigation */

.site-header {
  --header-scroll-progress: 0;
  padding: 10px 28px 12px;
  position: relative;
	z-index: 1000;
	background-color: var(--header-surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: calc(1 - (var(--header-scroll-progress) * 0.92));
  filter: blur(calc(var(--header-scroll-progress) * 10px));
  transform: translateY(calc(var(--header-scroll-progress) * -20px));
  transition: opacity 180ms linear, filter 180ms linear, transform 180ms linear;
  will-change: opacity, filter, transform;
}

.header-top {
  display: grid;
  grid-template-columns: var(--header-side-frame) minmax(0, 1fr) var(--header-side-frame);
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.header-side {
  display: flex;
  align-items: center;
  min-width: 0;
}

.header-side--start {
  justify-content: flex-start;
}

.header-side--end {
  justify-content: flex-end;
}

.header-side--end .sm {
  inline-size: 100%;
  justify-content: space-between;
  gap: 0;
}

.logo {
  justify-self: start;
}

.logo img {
	width: 120px;
	height: auto;
  display: block;
  margin: 15px 0 0;
  border-radius: 8px;
  box-shadow: none;
}

.site-brand {
  display: grid;
  place-items: center;
  inline-size: min(100%, 800px);
  min-width: 0;
  max-inline-size: 800px;
  justify-self: center;
  text-align: center;
  overflow: hidden;
}

.site-title-art {
  display: block;
  inline-size: 100%;
  max-inline-size: 100%;
  block-size: auto;
  background: transparent;
  pointer-events: none;
   margin-block: -30px -22px;
}

.site-title {
  margin: 0;
  color: CanvasText;
  font-size: clamp(26px, 4vw, 50px);
  line-height: 1.05;
  font-weight: 700;
  text-align: center;
}

.site-title--sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header-bottom {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: var(--header-control-height);
}

.site-nav {
  width: min(70%, 820px);
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

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

.site-nav ul {
  display: flex;
  list-style-type: none;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 0;
  flex-wrap: nowrap;
  min-width: 100%;
  width: max-content;
  gap: 36px;
}

.site-nav a:link,
.site-nav a:visited {
  color: var(--muted);
  font-weight: 700;
  font-size: 22px;
  text-decoration: none;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 28px;
  white-space: nowrap;
  transform: scale(1);
  transform-origin: center;
  transition: color 120ms ease, transform 120ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: CanvasText;
  transform: scale(1.1);
  outline: none;
}

.control-pill {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
}

.lang-switcher {
  width: var(--header-control-inline);
  min-width: var(--header-control-inline);
  padding: 0;
  padding-inline: 0;
  gap: 0;
  border-radius: var(--header-pill-radius);
  background: transparent;
  border: 0;
  box-sizing: border-box;
  flex-direction: row-reverse;
  align-items: stretch;
  overflow: hidden;
  height: var(--header-control-height);
  align-self: flex-end;
  position: absolute;
  right: 0;
  bottom: 0;
   transform: translateY(-10px);
  z-index: 2;
   transition: width 360ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease, background-color 280ms ease, transform 220ms ease;
}

.lang-switcher::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--surface-border);
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 260ms ease;
  z-index: 2;
}

.lang-switcher.is-expanded {
  background: var(--header-surface);
  width: calc(var(--lang-switcher-expanded-inline) + (var(--lang-switcher-edge-gap) * 2));
  min-width: calc(var(--lang-switcher-expanded-inline) + (var(--lang-switcher-edge-gap) * 2));
  padding-inline: var(--lang-switcher-edge-gap);
}

.lang-switcher.is-expanded::after {
  opacity: 1;
}

.control-pill__button {
  display: grid;
  place-items: center;
  inline-size: var(--header-control-inline);
  flex: 0 0 var(--header-control-inline);
  min-inline-size: var(--header-control-inline);
  min-block-size: var(--header-control-height);
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  line-height: 1;
  text-align: center;
  border-radius: var(--header-pill-radius);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: color 180ms ease, opacity 220ms ease, transform 360ms cubic-bezier(0.22, 1, 0.36, 1), border-color 220ms ease;
  position: relative;
  z-index: 1;
}

.control-pill__button:hover,
.control-pill__button:focus-visible {
  color: CanvasText;
  outline: none;
}

.lang-switcher.is-expanded .control-pill__button:hover,
.lang-switcher.is-expanded .control-pill__button:focus-visible {
  background: transparent;
  border-color: transparent;
}

.header-badge {
  border: 1px solid var(--header-pill-border);
  background: var(--header-surface);
  color: CanvasText;
}

.lang-switcher.is-expanded .header-badge {
  border-color: transparent;
  background: transparent;
}

.lang-switcher:not(.is-expanded) .lang-switcher__link:not(.is-active) {
  opacity: 0;
  pointer-events: none;
  inline-size: 0;
  min-inline-size: 0;
  flex-basis: 0;
  border-width: 0;
  transform: translateX(10px);
}

.lang-switcher.is-expanded .lang-switcher__link {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.sm {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: flex-end;
}

.sm-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  line-height: 1;
  user-select: none;
	opacity: 0.8;
	transition: transform 180ms ease, opacity 120ms ease, box-shadow 180ms ease;
	box-shadow: none;
}

.sm-link img {
  display: block;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.sm-link--github img {
  filter: invert(1);
}

.sm-link:hover,
.sm-link:focus-visible {
	opacity: 1;
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 8px 16px color-mix(in srgb, CanvasText 10%, transparent);
}

.sm-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.contact-band {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: nowrap;
}

.contact-lead {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
}

.contact-band .sm {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  margin-inline-start: auto;
}

main section {
	scroll-margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  --section-scroll-progress: 0;
  --section-scroll-direction: 0;
  opacity: 1;
  filter: blur(0px);
  transform: translateY(0px);
  transition: opacity 180ms linear, filter 180ms linear, transform 180ms linear;
  will-change: opacity, filter, transform;
}

main {
  display: flex;
  flex-direction: column;
  gap: 50px;
  font-size: 20px;
  line-height: 1.55;
}

main h2 {
  margin: 40px 0 14px;
  padding: 10px 14px;
  display: block;
  width: 100%;
  box-sizing: border-box;
  background-color: var(--header-surface);
  border: 0;
  border-radius: 0;
}

main p {
  margin: 0 2px 14px;
}

.about-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.section-lead {
  width: 100%;
  max-width: none;
}

.surface-card {
  border: 1px solid var(--surface-card-border);
  background-color: var(--surface-card-shell);
  box-shadow: none;
  transition: none;
}

.skills-grid,
.interests-grid,
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.projects-grid > :last-child:nth-child(odd),
.interests-grid > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.skill-card {
  padding: 20px 22px;
}

.skill-card h3 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.12;
}

.skill-card p {
  margin: 0;
}

.skill-group {
  margin-top: 16px;
}

.skill-group__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.skill-group__list {
  margin: 0;
  padding-left: 20px;
}

.skill-group__list li + li {
  margin-top: 6px;
}

.skill-group__link {
  font-weight: 700;
  text-decoration: none;
}

.skill-group__link:hover,
.skill-group__link:focus-visible {
  text-decoration: underline;
}

.about-text {
  flex: 1;
  min-width: 0;
}

.about figure {
  margin: 0;
}

.portrait {
  width: 180px;
  height: auto;
  display: block;
  margin: 6px;
  box-sizing: border-box;
  border-radius: 12px;
	box-shadow: 2px 2px 6px color-mix(in srgb, CanvasText 20%, transparent);
}

.project-card {
  display: flex;
  padding: 0;
  box-sizing: border-box;
  min-height: 100%;
  font-size: 18px;
}

.project-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px;
  color: inherit;
  text-decoration: none;
}

.project-card-link:focus-visible {
  outline: 2px solid CanvasText;
  outline-offset: 4px;
}

.project-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--section-title-bg);
  border: 1px solid var(--surface-border-strong);
  box-sizing: border-box;
  margin: 0 0 12px;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-thumb--label {
  display: grid;
  place-items: center;
  padding: 16px;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent-cold) 24%, transparent), transparent 42%),
    var(--surface-panel);
}

.project-thumb--label span {
  font-size: clamp(22px, 4.8vw, 34px);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.04;
  text-align: center;
}

.project-card__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 2px 8px;
}

.project-card h3 {
  flex: 1 1 auto;
  margin: 0;
}

.project-status {
  flex: 0 0 auto;
  align-self: flex-start;
  margin: 0;
  padding: 4px 10px;
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  background: var(--surface-status-bg);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.project-meta {
  opacity: 0.85;
}

.interest-photo-card {
  min-height: auto;
}

.interest-photo-card__body {
  display: flex;
  flex: 1;
  padding: 16px;
}

.interest-thumb {
  margin: 0;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, var(--surface-panel-strong), color-mix(in srgb, var(--surface-panel-soft) 82%, var(--accent-cold) 18%)),
    var(--surface-card-shell);
}

.interest-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent-cold) 24%, transparent), transparent 38%),
    linear-gradient(135deg, transparent 0 44%, color-mix(in srgb, CanvasText 12%, transparent) 44% 46%, transparent 46% 100%),
    linear-gradient(45deg, transparent 0 56%, color-mix(in srgb, CanvasText 10%, transparent) 56% 58%, transparent 58% 100%);
  opacity: 0.95;
}

.interest-thumb--2::before {
  background:
    radial-gradient(circle at bottom right, color-mix(in srgb, rgb(255, 191, 124) 20%, transparent), transparent 34%),
    linear-gradient(120deg, transparent 0 42%, color-mix(in srgb, CanvasText 10%, transparent) 42% 44%, transparent 44% 100%),
    linear-gradient(35deg, transparent 0 58%, color-mix(in srgb, CanvasText 8%, transparent) 58% 60%, transparent 60% 100%);
}

.interest-thumb--3::before {
  background:
    radial-gradient(circle at center, color-mix(in srgb, rgb(139, 224, 178) 18%, transparent), transparent 30%),
    linear-gradient(160deg, transparent 0 40%, color-mix(in srgb, CanvasText 9%, transparent) 40% 42%, transparent 42% 100%),
    linear-gradient(20deg, transparent 0 54%, color-mix(in srgb, CanvasText 10%, transparent) 54% 56%, transparent 56% 100%);
}

.interest-thumb--4::before {
  background:
    radial-gradient(circle at top right, color-mix(in srgb, rgb(255, 124, 174) 18%, transparent), transparent 34%),
    linear-gradient(140deg, transparent 0 46%, color-mix(in srgb, CanvasText 11%, transparent) 46% 48%, transparent 48% 100%),
    linear-gradient(55deg, transparent 0 52%, color-mix(in srgb, CanvasText 9%, transparent) 52% 54%, transparent 54% 100%);
}

.interest-thumb--photo {
  background: var(--surface-panel-soft);
}

.interest-thumb.interest-thumb--photo::before {
  content: none;
}

.interest-thumb__slot {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--surface-border-strong);
  background: var(--surface-overlay);
  color: CanvasText;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  backdrop-filter: blur(10px);
}

.project-cta {
  margin-top: auto;
  font-size: 24px;
  font-weight: bold;
  color: var(--accent-ice);
}

.project-cta::before {
  content: "✨ ";
}

footer {
  text-align: center;
}

.footer-line {
  display: block;
}

.footer-line + .footer-line {
  margin-top: 6px;
}

hr {
  border-color: var(--surface-card-border);
}

/* Subpages - placeholder pages */

.page-shell {
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 40px 0 64px;
}

.page-card {
  width: min(100%, 720px);
  padding: 32px;
  border: 1px solid var(--surface-card-border);
  background-color: var(--surface-card-shell);
  box-shadow: none;
  text-align: center;
}

.page-card h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 7vw, 56px);
  line-height: 1.08;
}

.page-status {
  margin: 0;
  font-size: 22px;
  opacity: 0.85;
}

.page-back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: CanvasText;
  text-decoration: none;
  font-weight: 700;
  opacity: 0.82;
  transition: transform 180ms ease, opacity 120ms ease;
}

.page-back-link::before {
  content: "\2190";
  font-size: 1.2em;
  line-height: 1;
}

.page-back-link:hover,
.page-back-link:focus-visible {
  opacity: 1;
  transform: translateX(-3px);
  outline: none;
}

.back-to-top {
  position: fixed;
  right: max(32px, calc(((100vw - 1190px) / 2) - 150px));
  bottom: 32px;
  width: var(--back-to-top-inline);
  height: var(--back-to-top-inline);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: CanvasText;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 1200;
}

.back-to-top.is-visible {
  opacity: 0.2;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  opacity: 0.42;
  outline: none;
}

.back-to-top__arrow {
  display: block;
  inline-size: min(80px, 100%);
  max-inline-size: 80px;
  block-size: auto;
  border-radius: 999px;
  pointer-events: none;
  user-select: none;
}

@media (max-width: 980px) {
  .site-header {
    padding: 10px 20px 12px;
  }

  .header-top {
    grid-template-columns: var(--header-side-frame) minmax(0, 1fr) var(--header-side-frame);
    justify-content: stretch;
    gap: 18px 20px;
  }

  .site-title {
    white-space: normal;
  }

  .site-nav {
    width: min(76%, 760px);
  }

  .site-nav ul {
    gap: 18px;
  }

  .back-to-top {
    right: 24px;
    bottom: 24px;
  }
}

@media (max-width: 850px) {
  .about-content {
    flex-direction: column;
  }

  .about .portrait {
    width: min(350px, 100%);
    margin: 10px auto 0;
  }
}

@media (max-width: 640px) {
  body {
    padding: 12px;
  }

  .site-header {
    padding: 10px 12px 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "title title"
      "logo logo"
      "lang social"
      "nav nav";
    gap: 14px 16px;
  }

  .header-top,
  .header-bottom {
    display: contents;
  }

  .site-brand {
    grid-area: title;
    inline-size: 100%;
    max-inline-size: none;
  }

  .site-title-art {
    inline-size: min(100%, 480px);
    margin-block: -14px -10px;
  }

  .header-side--start {
    grid-area: logo;
    justify-content: center;
  }

  .header-side--end {
    grid-area: social;
    justify-content: flex-end;
    min-width: 0;
  }

  .logo img {
    width: 96px;
    margin: 0;
  }

  .header-side--end .sm {
    inline-size: auto;
    justify-content: flex-end;
    gap: 16px;
  }

  .site-nav {
    grid-area: nav;
    width: 100%;
    overflow: visible;
  }

  .site-nav ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
    min-width: 0;
    width: 100%;
    justify-items: center;
    align-items: center;
  }

  .site-nav li {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .lang-switcher {
    grid-area: lang;
    position: static;
    justify-self: start;
    align-self: center;
    transform: none;
  }

  .site-nav a:link,
  .site-nav a:visited {
    min-height: 44px;
    justify-content: center;
    padding: 8px 10px;
    font-size: 16px;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }

  main {
    gap: 40px;
    font-size: 16px;
    line-height: 1.5;
  }

  main section {
    gap: 12px;
  }

  main h2 {
    margin: 28px 0 12px;
    padding: 8px 12px;
    font-size: 21px;
  }

  .contact-band {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
  }

  .contact-band .sm {
    justify-content: flex-end;
    gap: 9px;
  }

  .page-card {
    padding: 24px;
  }

  .skills-grid,
  .interests-grid,
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .projects-grid > :last-child:nth-child(odd),
  .interests-grid > :last-child:nth-child(odd) {
    grid-column: auto;
  }

  .skill-card {
    padding: 16px 18px;
  }

  .skill-card h3,
  .project-card h3 {
    font-size: 20px;
  }

  .project-card {
    font-size: 14px;
  }

  .project-status {
    font-size: 13px;
  }

  .project-cta {
    font-size: 19px;
  }

  footer {
    font-size: 13px;
  }

  .footer-line + .footer-line {
    margin-top: 3px;
  }

  .back-to-top {
    width: min(64px, var(--back-to-top-inline));
    height: min(64px, var(--back-to-top-inline));
    right: 18px;
    bottom: 18px;
  }
}

@media (hover: none), (pointer: coarse) {
  .site-nav a:hover,
  .sm-link:hover,
  .page-back-link:hover,
  .back-to-top:hover {
    transform: none;
    box-shadow: none;
  }

  .site-nav a:active,
  .sm-link:active,
  .control-pill__button:active,
  .back-to-top:active {
    transform: scale(0.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
  }

  .site-background__layer {
    transform: none;
  }

  .site-background__star--twinkle {
    animation: none;
    opacity: var(--star-opacity, 1);
  }

  .site-header,
  main section {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }

  .site-header {
    transition: none;
    opacity: 1;
    filter: none;
    transform: none;
  }

  .back-to-top {
    transition: none;
  }
}
