:root {
  color-scheme: dark;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", roboto, helvetica, arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, sfmono-regular, menlo, monaco, consolas, "Liberation Mono", "Courier New",
    monospace;

  --bg: #0b1210;
  --bg-elevated: #111a17;
  --surface: #15211d;
  --border: #22332d;
  --text: #e8f1ec;
  --muted: #9fb3aa;
  --accent: #5eead4;
  --accent-dim: #2f9d86;
  --danger: #f87171;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --radius-sm: 10px;
  --max: 72rem;
  --step--1: clamp(0.92rem, 0.9rem + 0.1vw, 0.98rem);
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.08rem);
  --step-1: clamp(1.12rem, 1rem + 0.45vw, 1.28rem);
  --step-2: clamp(1.35rem, 1.1rem + 0.9vw, 1.75rem);
  --step-3: clamp(1.7rem, 1.2rem + 1.6vw, 2.35rem);
  --step-4: clamp(2.1rem, 1.25rem + 2.6vw, 3.1rem);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f6faf7;
  --bg-elevated: #ffffff;
  --surface: #eef5f1;
  --border: #d5e3db;
  --text: #0f1a15;
  --muted: #3f5349;
  --accent: #0f766e;
  --accent-dim: #115e59;
  --shadow: 0 16px 40px rgba(15, 26, 21, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

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

  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text);
  background: radial-gradient(1200px 700px at 20% -10%, rgba(94, 234, 212, 0.08), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(47, 157, 134, 0.12), transparent 50%), var(--bg);
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--accent), white 10%);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-elevated);
  color: var(--text);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  z-index: 50;
}

.skip-link:focus {
  left: 0.75rem;
}

.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main {
  flex: 1;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: color-mix(in oklab, var(--bg), transparent 18%);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  width: min(100% - 1.5rem, var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.brand:hover {
  color: var(--text);
}

.brand__logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.brand__text {
  font-size: var(--step-1);
}

.nav {
  margin-left: auto;
}

.nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  justify-content: flex-end;
}

.nav__link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 550;
  padding: 0.35rem 0.45rem;
  border-radius: 10px;
}

.nav__link:hover {
  color: var(--text);
  background: color-mix(in oklab, var(--surface), transparent 35%);
}

.nav__link--active {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  font: inherit;
}

.theme-toggle__label {
  font-size: 0.9rem;
  color: var(--muted);
}

.theme-toggle__icon {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  border: 2px solid color-mix(in oklab, var(--accent), transparent 35%);
  box-shadow: inset 0 0 0 2px var(--bg-elevated);
  background: radial-gradient(circle at 30% 30%, var(--accent), transparent 55%),
    conic-gradient(from 200deg, var(--accent-dim), var(--accent));
}

[data-theme="light"] .theme-toggle__icon {
  background: radial-gradient(circle at 35% 35%, #fff6d6, transparent 40%), #f59e0b;
  border-color: color-mix(in oklab, #f59e0b, transparent 40%);
}

.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
}

.hero__inner {
  max-width: 52rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero__title {
  margin: 0 0 0.75rem;
  font-size: var(--step-4);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero__lead {
  margin: 0 0 1rem;
  font-size: var(--step-2);
  color: color-mix(in oklab, var(--text), var(--muted) 22%);
  max-width: 46rem;
}

.hero__note {
  margin: 0 0 1.75rem;
  color: var(--muted);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.05rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.button--primary {
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent), black 8%), var(--accent-dim));
  color: #04110e;
  border-color: color-mix(in oklab, var(--accent), black 25%);
}

.button--primary:hover {
  color: #04110e;
  filter: brightness(1.05);
}

.button--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.button--ghost:hover {
  background: var(--surface);
}

.band {
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in oklab, var(--bg-elevated), transparent 35%), var(--bg));
}

.split {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 52rem) {
  .split {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: start;
  }
}

.h2 {
  margin: 0 0 0.75rem;
  font-size: var(--step-3);
  letter-spacing: -0.02em;
}

.lede {
  margin: 0;
  color: color-mix(in oklab, var(--text), var(--muted) 18%);
  font-size: var(--step-1);
}

.checks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.checks li {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.prose {
  padding: clamp(2rem, 5vw, 3.25rem) 0 clamp(3rem, 8vw, 5rem);
}

.prose h1 {
  margin: 0 0 1rem;
  font-size: var(--step-4);
  letter-spacing: -0.03em;
}

.prose h2 {
  margin: 2rem 0 0.75rem;
  font-size: var(--step-2);
  letter-spacing: -0.02em;
}

.prose p,
.prose li {
  color: color-mix(in oklab, var(--text), var(--muted) 16%);
  max-width: 65ch;
}

.prose ul {
  padding-left: 1.2rem;
}

.team-page__head {
  padding: clamp(2rem, 5vw, 3rem) 0 1rem;
}

.team-page__head h1 {
  margin: 0 0 0.75rem;
  font-size: var(--step-4);
  letter-spacing: -0.03em;
}

/* ── orbit chart (crew centre, skills on ring) ── */
.orbit {
  --ring: min(44vw, 17.5rem);
  position: relative;
  width: calc(var(--ring) * 2 + 8rem);
  height: calc(var(--ring) * 2 + 8rem);
  max-width: 100%;
  margin: 2rem auto 3rem;
  aspect-ratio: 1;
}

/* centre: overlapping crew “cell” */
.orbit__core {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  z-index: 2;
  width: min(20rem, 78%);
  padding: 1.35rem 1.1rem 1.15rem;
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid color-mix(in oklab, var(--accent), var(--border) 55%);
  background:
    radial-gradient(ellipse 85% 70% at 50% 0%, color-mix(in oklab, var(--accent), transparent 82%), transparent 55%),
    radial-gradient(circle at 50% 120%, color-mix(in oklab, var(--accent-dim), transparent 88%), transparent 45%),
    var(--bg-elevated);
  box-shadow: var(--shadow), 0 0 0 1px color-mix(in oklab, white, transparent 96%) inset;
  text-align: center;
}

.orbit__crew {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 0.15rem 0.35rem;
  max-width: 17rem;
  margin-inline: auto;
}

.orbit__member {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin: 0 -0.2rem;
  transition: transform 0.2s ease, z-index 0s;
  position: relative;
}

.orbit__member:hover,
.orbit__member:focus-within {
  transform: translateY(-3px) scale(1.04);
  z-index: 3;
}

.orbit__member .avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
}

.orbit__member .avatar__initials {
  font-size: 1.05rem;
}

.orbit__member-name {
  font-weight: 650;
  font-size: var(--step--1);
  line-height: 1.1;
  color: color-mix(in oklab, var(--text), var(--muted) 12%);
  max-width: 5.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.orbit__skill-tag {
  display: inline-block;
  padding: 0.38rem 0.8rem;
  font-size: var(--step--1);
  font-weight: 650;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--accent), var(--border) 70%);
  background: color-mix(in oklab, var(--surface), var(--accent) 6%);
  color: var(--text);
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  cursor: default;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.orbit__node--skill:hover .orbit__skill-tag {
  border-color: color-mix(in oklab, var(--accent), var(--border) 35%);
  background: color-mix(in oklab, var(--surface), var(--accent) 14%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}

/* ring connector (decorative) */
.orbit::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: calc(var(--ring) * 2);
  height: calc(var(--ring) * 2);
  border-radius: 50%;
  border: 1px dashed var(--border);
  pointer-events: none;
}

/* member nodes placed on the ring via --i / --total */
.orbit__node {
  --angle: calc(360deg / var(--total) * var(--i) - 90deg);
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  transform:
    rotate(var(--angle))
    translateX(var(--ring))
    rotate(calc(-1 * var(--angle)));
}

.orbit__node .avatar {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 0.9rem;
  flex: none;
}

.orbit__node .avatar__initials {
  font-size: 1.1rem;
}

/* small screens: shrink the ring */
@media (max-width: 30rem) {
  .orbit {
    --ring: 8rem;
  }
  .orbit__core {
    width: min(92%, 15rem);
    padding: 1rem 0.65rem 0.85rem;
  }
  .orbit__crew {
    max-width: 13rem;
    gap: 0.05rem 0.15rem;
  }
  .orbit__member {
    margin: 0 -0.35rem;
  }
  .orbit__member .avatar {
    width: 2.45rem;
    height: 2.45rem;
  }
  .orbit__member .avatar__initials {
    font-size: 0.88rem;
  }
  .orbit__member-name {
    font-size: 0.72rem;
    max-width: 4.2rem;
  }
  .orbit__skill-tag {
    font-size: 0.72rem;
    padding: 0.28rem 0.55rem;
  }
}

.avatar {
  --hue: 154;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in oklab, hsl(var(--hue) 42% 42%), var(--border) 55%);
  background: radial-gradient(circle at 30% 25%, hsl(var(--hue) 55% 62%), transparent 55%),
    radial-gradient(circle at 80% 10%, hsl(calc(var(--hue) + 40) 60% 55%), transparent 45%),
    linear-gradient(145deg, hsl(var(--hue) 38% 22%), hsl(calc(var(--hue) + 18) 35% 14%));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, white, transparent 92%);
}

.avatar__initials {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f4fffb;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  font-size: 1.25rem;
}

[data-theme="light"] .avatar__initials {
  color: #0b1210;
  text-shadow: none;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
  color: var(--muted);
}

.site-footer__line {
  margin: 0;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.95rem;
}

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

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

.site-footer__sep {
  opacity: 0.55;
}
