html {
  scroll-behavior: smooth;
}

:root {
  color-scheme: dark;
  font-family: 'Outfit', sans-serif;
  --bg: #3A2747;
  --surface: #851C4D;
  --text: #FDB3CC;
  --muted: #9DDDF1;
  --accent: #FE388F;
  --line: rgba(157, 221, 241, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  position: relative;
  isolation: isolate;
  background: var(--bg);
  color: var(--text);
  font-size: 18px;
  line-height: 1.5;
}

body::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 74px;
  left: 50%;
  width: 100%;
  height: 68vh;
  transform: translateX(-50%);
  border-radius: 0 0 44% 44%;
  background:
    radial-gradient(ellipse 56% 72% at 50% 0, rgba(254, 56, 143, 0.62) 0, rgba(254, 56, 143, 0.2) 34%, transparent 72%),
    radial-gradient(ellipse 110% 70% at 50% 0, rgba(157, 221, 241, 0.32) 0, transparent 68%);
  filter: blur(12px);
}

a {
  color: var(--accent);
  transition: color 180ms ease;
}

a:hover {
  color: var(--muted);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem clamp(2rem, 5vw, 5rem);
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(58, 39, 71, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.site-header nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-header nav a {
  text-decoration: none;
}

.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.5rem;
  margin: 1.5rem 1.5rem 0;
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

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

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

.page-enter-active,
.page-leave-active {
  transition: opacity 220ms ease, transform 320ms ease-out;
}

.page-enter-from,
.page-leave-to {
  opacity: 0;
  transform: translateY(0.75rem);
}

.language-switch {
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.language-switch:hover,
.language-switch:focus-visible {
  color: var(--accent);
}

.language-switch {
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: inherit;
  cursor: pointer;
}

.language-switch:hover,
.language-switch:focus-visible {
  color: var(--accent);
}

.back-to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2.5rem);
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 15;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0.8rem;
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: 0.8;
  animation: back-to-top-rise 320ms ease-out both;
  cursor: pointer;
  transition: opacity 180ms ease, background 180ms ease;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  opacity: 1;
  background: var(--muted);
}

.back-to-top img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes back-to-top-rise {
  from {
    transform: translateY(5rem);
  }

  to {
    transform: translateY(0);
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-family: 'Sirin Stencil', sans-serif;
  font-size: 1.2rem;
}

.brand img {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
}

.hero {
  position: relative;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  align-items: center;
  min-height: 70vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.shape-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.app-shell {
  position: relative;
  overflow: hidden;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
}

main {
  position: relative;
  z-index: 1;
}

.shape {
  position: absolute;
  display: block;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 0.2rem;
  opacity: 0.75;
  animation: drift 7s ease-in-out infinite;
}

.shape-one,
.shape-four,
.shape-eight {
  background: var(--surface);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.shape-two,
.shape-six,
.shape-ten {
  background: var(--muted);
  clip-path: polygon(18% 0, 100% 18%, 82% 100%, 0 82%);
}

.shape-three,
.shape-seven {
  background: var(--text);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.shape-five,
.shape-nine,
.shape-thirteen {
  background: var(--surface);
  border-radius: 50%;
}

.shape-one { left: 8%; top: 10%; width: 0.72rem; height: 0.72rem; animation-delay: -1s; }
.shape-two { left: 24%; top: 19%; width: 0.88rem; height: 0.88rem; animation-delay: -4s; }
.shape-three { left: 42%; top: 29%; width: 0.8rem; height: 0.8rem; animation-delay: -2s; }
.shape-four { right: 12%; top: 14%; width: 0.96rem; height: 0.96rem; animation-delay: -5s; }
.shape-five { right: 27%; top: 39%; width: 0.72rem; height: 0.72rem; animation-delay: -3s; }
.shape-six { left: 14%; top: 51%; width: 0.96rem; height: 0.96rem; animation-delay: -6s; }
.shape-seven { left: 34%; top: 64%; width: 0.8rem; height: 0.8rem; animation-delay: -1.5s; }
.shape-eight { right: 18%; top: 58%; width: 0.88rem; height: 0.88rem; animation-delay: -4.5s; }
.shape-nine { left: 55%; top: 80%; width: 0.72rem; height: 0.72rem; animation-delay: -2.5s; }
.shape-ten { right: 7%; top: 90%; width: 0.96rem; height: 0.96rem; animation-delay: -5.5s; }
.shape-eleven { left: 4%; top: 35%; width: 0.88rem; height: 0.88rem; background: var(--text); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); animation-delay: -3.5s; }
.shape-twelve { left: 72%; top: 23%; width: 0.72rem; height: 0.72rem; background: var(--accent); clip-path: polygon(18% 0, 100% 18%, 82% 100%, 0 82%); animation-delay: -6.5s; }
.shape-thirteen { left: 76%; top: 68%; width: 0.96rem; height: 0.96rem; animation-delay: -1.8s; }
.shape-fourteen { left: 20%; top: 84%; width: 0.8rem; height: 0.8rem; background: var(--muted); clip-path: polygon(50% 0, 100% 100%, 0 100%); animation-delay: -4.8s; }
.shape-fifteen { right: 38%; top: 93%; width: 0.88rem; height: 0.88rem; background: var(--accent); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); animation-delay: -2.8s; }

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  50% {
    transform: translate3d(0.35rem, -0.7rem, 0) rotate(10deg);
  }
}

.hero-content h1 {
  font-family: 'Sirin Stencil', sans-serif;
  font-size: calc(2rem + 1.2vw);
  font-weight: 400;
  line-height: 1.1;
  margin: 0.5rem 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

h2,
h3 {
  font-family: 'Sirin Stencil', sans-serif;
  font-weight: 400;
  line-height: 1.1;
}

h2 {
  font-size: calc(1.5rem + 0.6vw);
}

h3 {
  font-size: calc(1.2rem + 0.35vw);
}

.eyebrow {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

#about strong {
  color: var(--accent);
  font-weight: inherit;
}

.about-section {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.75fr);
  align-items: center;
  gap: clamp(2rem, 8vw, 7rem);
  max-width: 1200px;
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.about-copy {
  grid-column: 1;
  grid-row: 1;
  max-width: 660px;
}

.about-copy h2 {
  margin-top: 0.35rem;
}

.about-portrait {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  width: min(100%, 330px);
  aspect-ratio: 0.82;
  isolation: isolate;
}

.about-portrait::before {
  content: '';
  position: absolute;
  inset: 9% -7% 5% 9%;
  z-index: -1;
  border: 4px solid var(--muted);
  border-radius: 50%;
  transform: rotate(-16deg);
  opacity: 0.75;
}

.about-portrait::after {
  content: '';
  position: absolute;
  top: 1%;
  right: 3%;
  width: 1rem;
  height: 1rem;
  z-index: 2;
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.about-portrait-frame {
  position: absolute;
  inset: 7% 7% 9% 4%;
  overflow: hidden;
  border: 6px solid var(--surface);
  border-radius: 48% 48% 8px 48%;
  background: var(--surface);
  transform: rotate(5deg);
  box-shadow: 0.45rem 0.45rem 0 var(--surface);
}

.about-portrait-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, transparent 55%, rgba(254, 56, 143, 0.3));
  mix-blend-mode: screen;
}

.about-portrait-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.82) contrast(1.08);
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
}

.hero-visual img {
  display: block;
  width: min(100%, 560px);
  height: auto;
  filter: drop-shadow(0 1rem 2rem rgba(254, 56, 143, 0.18));
}

.section {
  padding: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
  scroll-margin-top: 6rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.card-image {
  display: block;
  width: 100%;
  aspect-ratio: 1.9 / 1;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.projects-page .card {
  display: flex;
  flex-direction: column;
}

.card h2,
.card h3,
.card p,
.card > a {
  margin-left: 1rem;
  margin-right: 1rem;
}

.card h2,
.card h3 {
  margin-top: 1rem;
}

.card > a {
  display: inline-block;
  margin-bottom: 1rem;
}

.projects-page .card > .button {
  margin-top: auto;
}

.section .projects-more {
  display: block;
  width: fit-content;
  margin: 3rem auto 0;
}

.card-tags-marquee {
  width: calc(100% - 2rem);
  margin: 0 1rem 1rem;
  overflow: hidden;
}

.card-tags-track {
  display: flex;
  width: max-content;
  animation: card-tags-scroll 24s linear infinite;
}

.card-tags {
  display: flex;
  flex-shrink: 0;
  gap: 0.4rem;
  min-width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  padding-right: 0.4rem;
}

.card-tags li {
  padding: 0.2rem 0.55rem;
  color: var(--muted);
  background: rgba(157, 221, 241, 0.12);
  border: 1px solid rgba(157, 221, 241, 0.28);
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
}

@keyframes card-tags-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-33.333%, 0, 0);
  }
}

.contact-intro {
  width: 100%;
  max-width: none;
  margin: 0 0 2.25rem;
  text-wrap: balance;
}

#contact {
  padding-top: 3.5rem;
  padding-bottom: 4.5rem;
}

.contact-intro strong {
  color: var(--accent);
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.contact-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  overflow: visible;
  padding: 1.5rem 1.5rem 1.75rem;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2rem 0.5rem 2rem 0.5rem;
  transition: transform 180ms ease, background 180ms ease;
}

.contact-card::before {
  content: '';
  position: absolute;
  inset: 0.45rem -0.55rem -0.45rem 0.55rem;
  z-index: -1;
  border: 4px solid var(--muted);
  border-radius: 0.5rem 2rem 0.5rem 2rem;
  transform: rotate(-2deg);
  opacity: 1;
  transition: transform 180ms ease;
}

.contact-card:hover,
.contact-card:focus-visible {
  color: var(--text);
  background: var(--surface);
  transform: translateY(-0.35rem) rotate(-1deg);
}

.contact-card:hover::before,
.contact-card:focus-visible::before {
  transform: translate(-0.35rem, 0.35rem) rotate(-5deg);
}

.contact-card:nth-child(2) {
  border-radius: 0.5rem 2rem 0.5rem 2rem;
}

.contact-card:nth-child(2)::before {
  border-radius: 2rem 0.5rem 2rem 0.5rem;
  transform: rotate(2deg);
}

.contact-card:nth-child(2):hover,
.contact-card:nth-child(2):focus-visible {
  transform: translateY(-0.35rem) rotate(1deg);
}

.contact-card:nth-child(2):hover::before,
.contact-card:nth-child(2):focus-visible::before {
  transform: translate(0.35rem, 0.35rem) rotate(5deg);
}

.contact-card-icon {
  position: absolute;
  top: -1.6rem;
  right: 1.25rem;
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  background: transparent;
  border: 3px solid var(--accent);
  border-radius: 50% 0.9rem 50% 0.9rem;
  transform: rotate(-2deg);
}

.contact-card-icon img {
  display: block;
  width: 2.6rem;
  height: 2.6rem;
  filter: brightness(0.88);
  transform: rotate(2deg);
}

.contact-card:hover .contact-card-icon,
.contact-card:focus-visible .contact-card-icon {
  transform: rotate(-5deg);
}

.contact-card:hover .contact-card-icon img,
.contact-card:focus-visible .contact-card-icon img {
  transform: rotate(5deg);
}

.contact-card:nth-child(2) .contact-card-icon {
  transform: rotate(2deg);
}

.contact-card:nth-child(2) .contact-card-icon img {
  transform: rotate(-2deg);
}

.contact-card:nth-child(2):hover .contact-card-icon,
.contact-card:nth-child(2):focus-visible .contact-card-icon {
  transform: rotate(5deg);
}

.contact-card:nth-child(2):hover .contact-card-icon img,
.contact-card:nth-child(2):focus-visible .contact-card-icon img {
  transform: rotate(-5deg);
}

.contact-card-label {
  color: var(--text);
  font-family: 'Sirin Stencil', sans-serif;
  font-size: 1.45rem;
}

.contact-card-value {
  margin-top: 0.55rem;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 1rem;
}

.contact-card-action {
  position: absolute;
  bottom: -1.15rem;
  left: 50%;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 0.45rem 0.7rem;
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--bg);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transform: translateX(-50%);
}

.chip-list {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.chip-list li {
  background: rgba(157, 221, 241, 0.16);
  border: 1px solid rgba(157, 221, 241, 0.3);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
}

.skills-marquee {
  display: grid;
  gap: 1.25rem;
  width: 100vw;
  margin-left: calc((100% - 100vw) / 2);
  overflow: hidden;
}

.skill-row {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: skills-forward 90s linear infinite;
}

.skill-row-reverse {
  animation-name: skills-reverse;
}

.skill-row-mobile {
  display: none;
}

.skill-track {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0;
  min-width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-track li {
  display: flex;
  align-items: center;
  color: var(--text);
  font-family: 'Sirin Stencil', sans-serif;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  line-height: 1;
  white-space: nowrap;
}

.skill-track li::after {
  content: '';
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin: 0 1.5rem;
  background: var(--accent);
  transform: rotate(45deg);
}

.skill-track li:nth-child(even)::after {
  background: var(--muted);
}

@keyframes skills-forward {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes skills-reverse {
  from {
    transform: translate3d(-50%, 0, 0);
  }

  to {
    transform: translate3d(0, 0, 0);
  }
}

.button {
  display: inline-block;
  margin-top: 0.5rem;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
}

.button:hover {
  color: var(--bg);
  background: var(--muted);
}

.error-page {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  max-width: 1200px;
  min-height: calc(100vh - 92px);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.error-art {
  position: relative;
  aspect-ratio: 2172 / 1250;
  overflow: hidden;
}

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

.error-code {
  position: absolute;
  inset: 10% auto auto 50%;
  z-index: 1;
  color: var(--muted);
  font-family: 'Sirin Stencil', sans-serif;
  font-size: clamp(8rem, 21vw, 15rem);
  line-height: 0.8;
  letter-spacing: 0.02em;
  transform: translateX(-50%);
}

.error-content h1 {
  max-width: 12ch;
  margin: 0.5rem 0 1rem;
  font-family: 'Sirin Stencil', sans-serif;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 400;
  line-height: 1.05;
}

.error-content p:not(.eyebrow) {
  max-width: 34ch;
}

.case-study {
  max-width: 1100px;
  padding-top: 3rem;
  padding-bottom: 5rem;
}

.case-study-header {
  max-width: 820px;
  margin: 2.5rem auto 0;
}

.case-study-header h1 {
  margin: 0.5rem 0 1rem;
  font-family: 'Sirin Stencil', sans-serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1;
}

.case-study-lead {
  max-width: 700px;
  font-size: 1.2rem;
}

.case-study-banner {
  display: block;
  width: 100%;
  margin-top: 2rem;
  aspect-ratio: 1.9 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 2rem 0.5rem 2rem 0.5rem;
}

.case-study-copy {
  max-width: 760px;
  margin: 5rem auto 0;
}

.case-study-copy section + section {
  margin-top: 3.5rem;
}

.case-study-copy h2 {
  margin-bottom: 1rem;
}

.case-study-copy strong {
  color: var(--accent);
}

.case-study-list {
  padding-left: 1.25rem;
}

.case-study-list li + li {
  margin-top: 0.6rem;
}

.case-study-inline-image {
  display: block;
  width: 100%;
  margin: 2rem 0;
  border: 1px solid var(--line);
  border-radius: 0.5rem 2rem 0.5rem 2rem;
}

.bg3-gear-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.bg3-modio-link {
  display: inline-block;
  margin-top: 2rem;
}

.bg3-gear-grid figure {
  margin: 0;
}

.bg3-gear-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 0.5rem 2rem 0.5rem 2rem;
}

.bg3-gear-grid figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.case-study-step-image {
  display: block;
  width: 100%;
  margin-top: 2rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem 2rem 0.5rem 2rem;
}

.case-study-resources {
  max-width: 920px;
  margin: 7rem auto 0;
}

.case-study-resources > h2 {
  margin-top: 0.35rem;
}

.resource-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.75fr);
  align-items: start;
  gap: clamp(2rem, 6vw, 5rem);
  margin-top: 2.5rem;
}

.moodboard-feature {
  margin: 0;
}

.moodboard-feature img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.5rem 2rem 0.5rem 2rem;
  transform: rotate(-2deg);
}

.moodboard-feature figcaption {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.resource-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.resource-actions .button {
  margin-top: 0;
}

.wim-screenshots {
  display: grid;
  gap: 1rem;
}

.wim-screenshots img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.5rem 2rem 0.5rem 2rem;
}

.zuiderbad-resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.zuiderbad-resource-grid figure {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  margin: 0;
}

.zuiderbad-resource-grid img {
  display: block;
  width: 100%;
  height: 7rem;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

.zuiderbad-resource-grid .zuiderbad-logo {
  padding: 1rem;
  object-fit: contain;
  background: var(--surface);
}

.zuiderbad-resource-grid figcaption {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.zuiderbad-live-link {
  display: block;
  width: fit-content;
  margin: 2rem auto 0;
}

.team-section {
  max-width: 920px;
  margin: 7rem auto 0;
}

.team-section > h2 {
  margin-top: 0.35rem;
}

.team-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem 2rem;
  margin-top: 3rem;
}

.team-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--text);
  text-decoration: none;
}

.team-member:hover,
.team-member:focus-visible {
  color: var(--text);
}

.team-member-reverse {
  grid-template-columns: minmax(0, 1.3fr) minmax(180px, 0.7fr);
}

.team-member-reverse .team-portrait {
  grid-column: 2;
  grid-row: 1;
}

.team-member-reverse .team-member-copy {
  grid-column: 1;
  grid-row: 1;
}

.team-portrait {
  position: relative;
  width: min(100%, 260px);
  aspect-ratio: 0.82;
  justify-self: center;
  isolation: isolate;
}

.team-portrait::before {
  content: '';
  position: absolute;
  inset: 9% -7% 5% 9%;
  z-index: -1;
  border: 4px solid var(--muted);
  border-radius: 50%;
  transform: rotate(-16deg);
}

.team-portrait::after {
  content: '';
  position: absolute;
  top: 1%;
  right: 3%;
  width: 1rem;
  height: 1rem;
  z-index: 2;
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.team-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 6px solid var(--surface);
  border-radius: 48% 48% 8px 48%;
  transform: rotate(5deg);
  box-shadow: 0.45rem 0.45rem 0 var(--surface);
}

.team-member-copy h3 {
  margin-top: 0;
  text-align: center;
}

.case-study img {
  cursor: zoom-in;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 3rem;
  background: rgba(58, 39, 71, 0.88);
  cursor: zoom-out;
}

.image-lightbox img {
  display: block;
  max-width: min(92vw, 1400px);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: default;
}

.image-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: var(--bg);
  background: var(--accent);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.image-lightbox-close img {
  display: block;
  width: 1.25rem;
  height: auto;
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  cursor: pointer;
}

.image-lightbox-close:hover {
  color: var(--bg);
  background: var(--muted);
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header nav {
    gap: 0.75rem;
  }

  .hero {
    min-height: auto;
    padding-top: 2rem;
  }

  .hero-visual {
    order: -1;
    min-height: 180px;
  }

  .about-section {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .about-portrait {
    grid-column: 1;
    grid-row: auto;
    width: min(76vw, 300px);
    margin-bottom: 1rem;
  }

  .about-copy {
    grid-column: 1;
    grid-row: auto;
  }

  .skills-marquee > .skill-row:not(.skill-row-mobile) {
    display: none;
  }

  .skills-marquee > .skill-row-mobile {
    display: flex;
  }

  .skill-row {
    animation-duration: 45s;
  }

  .error-page {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-top: 2rem;
  }

  .error-art {
    min-height: 240px;
  }

  .case-study {
    padding-top: 2rem;
  }

  .case-study-copy {
    margin-top: 3rem;
  }

  .case-study-resources {
    margin-top: 5rem;
  }

  .resource-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .resource-actions {
    align-items: flex-start;
  }

  .zuiderbad-resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bg3-gear-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-section {
    margin-top: 5rem;
  }

  .team-member,
  .team-member-reverse {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }

  .team-member-reverse .team-portrait,
  .team-member-reverse .team-member-copy {
    order: initial;
  }

  .team-portrait {
    width: min(76vw, 260px);
    align-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shape,
  .skill-row,
  .page-enter-active,
  .page-leave-active {
    animation: none;
    transition: none;
  }
}
