:root {
  --color-bg: #050807;
  --color-bg-soft: #0a100f;
  --color-surface: #0d1412;
  --color-surface-elevated: #121b18;
  --color-text: #edf4ee;
  --color-muted: #96a39b;
  --color-border: rgba(185, 213, 195, 0.16);
  --color-accent: #9fd6bf;
  --color-accent-soft: rgba(159, 214, 191, 0.14);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 22px;
  --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.42);
  --container-width: 1180px;
}

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

* {
  margin: 0;
}

html {
  color-scheme: dark;
  background: var(--color-bg);
  overflow-x: hidden;
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

::selection {
  background: var(--color-accent);
  color: #07100d;
}

.container {
  width: min(calc(100% - 32px), var(--container-width));
  margin-inline: auto;
}

.page-shell {
  position: relative;
  min-height: 100vh;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  border-bottom: 1px solid rgba(185, 213, 195, 0.1);
  background: rgba(5, 8, 7, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.site-header__inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: flex-end;
  gap: 32px;
}

.site-nav {
  display: flex;
  align-self: stretch;
  align-items: center;
  gap: clamp(22px, 3vw, 36px);
}

.site-nav__link {
  position: relative;
  display: inline-flex;
  height: 100%;
  align-items: center;
  color: var(--color-muted);
  font-size: 0.9rem;
  font-weight: 650;
  transition: color 180ms ease;
}

.site-nav__link::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--color-accent);
  content: "";
  opacity: 0;
  transform: scaleX(0.4);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.site-nav__link:hover,
.site-nav__link.is-active {
  color: var(--color-text);
}

.site-nav__link.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

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

.section-ghost {
  pointer-events: none;
  object-fit: contain;
  opacity: var(--ghost-opacity, 0);
  filter:
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.75))
    drop-shadow(0 10px 14px rgba(0, 0, 0, 0.62))
    drop-shadow(0 22px 32px rgba(0, 0, 0, 0.5));
  will-change: opacity;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

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

.button--secondary {
  border-color: var(--color-border);
  background: rgba(255, 255, 255, 0.035);
  color: var(--color-text);
}

.button--secondary:hover {
  border-color: rgba(159, 214, 191, 0.42);
  background: rgba(159, 214, 191, 0.08);
}

.hero {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 48px 16px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(3.4rem, 10vw, 9rem);
  font-weight: 620;
  line-height: 0.9;
  letter-spacing: 0;
  text-wrap: balance;
  animation: fade-up 700ms ease both;
}

.hero__brand {
  --hero-ghost-slot-size: clamp(71px, 12vw, 136px);
  --hero-brand-gap: clamp(4px, 0.8vw, 10px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--hero-brand-gap);
  width: min(86vw, 900px);
  animation: fade-up 700ms ease both;
}

.hero__ghost {
  flex: 0 0 var(--hero-ghost-slot-size);
  width: var(--hero-ghost-slot-size);
  height: var(--hero-ghost-slot-size);
  opacity: var(--ghost-opacity, 1);
}

.hero__logo {
  width: min(68vw, 720px);
  height: auto;
}

.picture-section {
  height: 165vh;
  background: #020303;
}

.picture-section__frame {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.picture-section__media {
  display: block;
  width: 100%;
  height: 100%;
}

.picture-section__image {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: var(--picture-opacity, 1);
  transform: scale(var(--picture-scale, 1));
  transform-origin: center;
  filter: brightness(var(--picture-brightness, 1));
  will-change: opacity, transform, filter;
}

.picture-section.is-scroll-fade-ready .picture-section__image {
  opacity: var(--picture-opacity, 0);
  transform: scale(var(--picture-scale, 1.035));
  filter: brightness(var(--picture-brightness, 0.72));
}

.picture-section__statement {
  position: absolute;
  left: clamp(48px, 11vw, 180px);
  top: 47%;
  z-index: 2;
  width: min(560px, calc(100% - 96px));
  color: #f4f8f4;
  text-align: left;
  transform: translateY(-50%);
  text-shadow:
    0 2px 18px rgba(0, 0, 0, 0.78),
    0 18px 46px rgba(0, 0, 0, 0.55);
}

.picture-section__ghost {
  position: absolute;
  left: 74%;
  top: 50%;
  z-index: 2;
  width: var(--hero-ghost-slot-size, clamp(71px, 12vw, 136px));
  height: var(--hero-ghost-slot-size, clamp(71px, 12vw, 136px));
  transform: translate(-50%, -50%);
}

.picture-section__label {
  margin-bottom: clamp(18px, 2.2vh, 26px);
  color: rgba(244, 248, 244, 0.82);
  font-size: clamp(0.875rem, 1.05vw, 1rem);
  font-weight: 650;
  letter-spacing: 0.12em;
  line-height: 1.25;
  text-transform: uppercase;
}

.picture-section__headline {
  font-size: clamp(3.25rem, 3.7vw, 3.375rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.picture-section__headline span {
  display: block;
  white-space: nowrap;
}

.picture-section__frame::before,
.picture-section__frame::after {
  content: "";
  position: absolute;
  left: 0;
  z-index: 1;
  width: 100%;
  pointer-events: none;
}

.picture-section__frame::before {
  inset: 0;
  height: 100%;
  background:
    linear-gradient(180deg, rgba(2, 3, 3, 0.82) 0%, transparent 18%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.35) 35%, transparent 65%);
}

.picture-section__frame::after {
  bottom: 0;
  height: clamp(120px, 18vh, 220px);
  background: linear-gradient(0deg, #020303 0%, rgba(2, 3, 3, 0.82) 28%, rgba(2, 3, 3, 0) 100%);
}

.contact {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: clamp(64px, 10vw, 128px) 0;
  background: var(--color-bg);
}

.contact__ghost {
  position: absolute;
  left: 50%;
  bottom: clamp(72px, 9.5vh, 96px);
  width: clamp(78px, 13.125vw, 148px);
  height: clamp(78px, 13.125vw, 148px);
  transform: translateX(-50%);
}

.contact__inner {
  display: grid;
  grid-template-columns: 0.76fr 1fr;
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
}

.contact__kicker {
  margin-bottom: 18px;
  color: var(--color-accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.contact h2,
.not-found h1 {
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0;
}

.contact__copy {
  max-width: 560px;
  color: var(--color-muted);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
}

.contact__details {
  display: grid;
  gap: 16px;
}

.contact-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--color-border);
}

.contact-row:first-child {
  border-top: 1px solid var(--color-border);
}

.contact-row__label {
  color: var(--color-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.contact-row a {
  width: fit-content;
  color: var(--color-text);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: rgba(159, 214, 191, 0.38);
  text-underline-offset: 5px;
}

.contact-row a:hover {
  color: var(--color-accent);
}

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 26px 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

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

.team-page {
  min-height: calc(100vh - 77px);
  padding-top: 72px;
}

.team-hero {
  padding-top: clamp(82px, 11vw, 148px);
  padding-bottom: clamp(54px, 7vw, 84px);
}

.team-hero__kicker,
.team-card__role,
.member-dialog__role {
  color: var(--color-accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  line-height: 1.4;
  text-transform: uppercase;
}

.team-hero__kicker {
  margin-bottom: 20px;
}

.team-hero h1 {
  max-width: 900px;
  font-size: clamp(3.4rem, 8vw, 7.5rem);
  font-weight: 620;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.team-hero__intro {
  max-width: 610px;
  margin-top: clamp(28px, 4vw, 44px);
  color: var(--color-muted);
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.65;
}

.team-grid-section {
  padding-bottom: clamp(88px, 12vw, 152px);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 4vw, 56px);
}

.team-card {
  display: flex;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 200ms ease,
    background-color 200ms ease,
    transform 200ms ease,
    box-shadow 200ms ease;
}

.team-card:hover {
  border-color: rgba(159, 214, 191, 0.38);
  background: var(--color-surface-elevated);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.26);
  transform: translateY(-4px);
}

.team-card:focus-visible {
  outline-offset: 5px;
}

.team-card__portrait,
.member-dialog__portrait {
  position: relative;
  display: grid;
  overflow: hidden;
  place-items: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 46%),
    #555b58;
  color: rgba(237, 244, 238, 0.55);
  isolation: isolate;
}

.team-card__portrait,
.member-dialog__portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
}

.team-card__portrait img,
.member-dialog__portrait img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.team-card__portrait::after,
.member-dialog__portrait::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.team-card__portrait span,
.member-dialog__portrait span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.06em;
}

.team-card__content {
  display: flex;
  min-width: 0;
  min-height: 248px;
  padding: 22px 20px 20px;
  flex: 1;
  flex-direction: column;
}

.team-card__role {
  min-height: 3em;
}

.team-card__name {
  margin-top: 17px;
  font-size: clamp(1.25rem, 1.7vw, 1.55rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.team-card__summary {
  margin-top: 15px;
  color: var(--color-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.team-card__action {
  display: flex;
  margin-top: auto;
  padding-top: 24px;
  align-items: center;
  justify-content: space-between;
  color: var(--color-text);
  font-size: 0.82rem;
  font-weight: 650;
}

body.dialog-open {
  overflow: hidden;
}

.member-dialog {
  width: min(calc(100% - 32px), 800px);
  max-width: none;
  max-height: min(760px, calc(100% - 32px));
  padding: 0;
  margin: auto;
  overflow: auto;
  border: 1px solid rgba(185, 213, 195, 0.22);
  border-radius: var(--radius-xl);
  background: var(--color-surface-elevated);
  color: var(--color-text);
  box-shadow: var(--shadow-soft);
}

.member-dialog::backdrop {
  background: rgba(1, 3, 2, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.member-dialog[open] {
  animation: dialog-in 220ms ease both;
}

.member-dialog__surface {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.3fr);
  min-height: 500px;
}

.member-dialog__portrait {
  width: calc(100% - 40px);
  border-radius: var(--radius-lg);
  top: 10%;
  align-self: start;
  justify-self: center;
  transform: translateX(18px);
}

.member-dialog__close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: rgba(5, 8, 7, 0.8);
  color: var(--color-text);
  cursor: pointer;
  font-size: 1.65rem;
  font-weight: 300;
  line-height: 1;
  place-items: center;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.member-dialog__close:hover {
  border-color: rgba(159, 214, 191, 0.5);
  background: var(--color-bg);
  transform: rotate(4deg);
}

.member-dialog__content {
  display: flex;
  padding: clamp(64px, 8vw, 92px) clamp(30px, 5vw, 58px) 54px;
  flex-direction: column;
  justify-content: center;
}

.member-dialog__content h2 {
  margin-top: 18px;
  font-size: clamp(2.15rem, 4.8vw, 3.7rem);
  font-weight: 620;
  letter-spacing: -0.05em;
  line-height: 0.96;
}

.member-dialog__description {
  display: grid;
  margin-top: 32px;
  gap: 18px;
  color: var(--color-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.not-found {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 80px 0;
}

.not-found__content {
  width: min(100%, 680px);
}

.not-found p {
  max-width: 420px;
  margin-top: 20px;
  color: var(--color-muted);
  font-size: 1.08rem;
}

.not-found .button {
  margin-top: 30px;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1060px) {
  .team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .contact__inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-dialog__surface {
    grid-template-columns: 1fr;
  }

  .member-dialog__portrait {
    min-height: 220px;
    top: auto;
    transform: none;
  }

  .picture-section__image {
    object-position: 50% center;
  }

  .picture-section__frame::before {
    background:
      linear-gradient(180deg, rgba(2, 3, 3, 0.62) 0%, transparent 14%),
      linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.55) 32%, transparent 65%);
  }

  .picture-section__statement {
    inset: auto 24px calc(48px + env(safe-area-inset-bottom)) 24px;
    width: auto;
    transform: none;
  }

  .picture-section__ghost {
    left: 50%;
    top: 50%;
    width: clamp(53px, 15vw, 78px);
    height: clamp(53px, 15vw, 78px);
  }

  .contact__ghost {
    width: clamp(64px, 18vw, 84px);
    height: clamp(64px, 18vw, 84px);
  }

  .picture-section__label {
    max-width: 260px;
    margin-bottom: 16px;
    font-size: clamp(0.75rem, 3.5vw, 0.875rem);
    line-height: 1.35;
  }

  .picture-section__headline {
    max-width: 520px;
    font-size: clamp(2rem, 9.5vw, 2.375rem);
    line-height: 1.08;
  }

  .picture-section__headline span {
    display: inline;
    white-space: normal;
  }

  .picture-section__headline span + span::before {
    content: " ";
  }
}

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 24px), var(--container-width));
  }

  .site-header__inner {
    min-height: 64px;
  }

  .site-nav {
    gap: 18px;
  }

  .site-nav__link {
    font-size: 0.84rem;
  }

  .team-page {
    padding-top: 64px;
  }

  .hero {
    min-height: 100vh;
    min-height: 100svh;
    padding: 36px 12px;
  }

  .hero h1 {
    font-size: clamp(3.1rem, 18vw, 5.8rem);
  }

  .hero__brand {
    --hero-ghost-slot-size: clamp(53px, 15vw, 78px);
    --hero-brand-gap: 2px;
    width: min(92vw, 390px);
  }

  .hero__logo {
    width: min(58vw, 300px);
  }

  .contact-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 500px) {
  .team-hero h1 {
    font-size: clamp(3rem, 13vw, 3.35rem);
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .team-card__portrait,
  .member-dialog__portrait {
    aspect-ratio: 4 / 3;
  }

  .team-card__content {
    min-height: 238px;
  }

  .member-dialog {
    width: calc(100% - 20px);
    max-height: calc(100% - 20px);
  }

  .member-dialog__portrait {
    min-height: 180px;
  }

  .member-dialog__content {
    padding: 42px 24px 36px;
  }

  .member-dialog__close {
    top: 14px;
    right: 14px;
  }
}

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

  .picture-section {
    height: auto;
  }

  .picture-section__frame {
    position: relative;
  }

  .picture-section__image {
    opacity: 1;
    transform: none;
  }
}
