/* ==========================================================================
   Sprite — team portfolio
   Single stylesheet shared by the home page and every member page.
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------ */

:root {
  --accent: #34d399;
  --accent-soft: rgba(52, 211, 153, 0.14);
  --accent-line: rgba(52, 211, 153, 0.35);

  --bg: #080b10;
  --bg-raised: #0e131b;
  --bg-card: #111823;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #eef2f7;
  --text-muted: #97a3b4;
  --text-dim: #6b7788;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.8);

  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", var(--font-body);

  --max: 1140px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

/* Per-member accents. Set with <body data-accent="..."> */
body[data-accent="emerald"] { --accent: #34d399; --accent-soft: rgba(52,211,153,.14);  --accent-line: rgba(52,211,153,.35); }
body[data-accent="sky"]     { --accent: #38bdf8; --accent-soft: rgba(56,189,248,.14);  --accent-line: rgba(56,189,248,.35); }
body[data-accent="violet"]  { --accent: #a78bfa; --accent-soft: rgba(167,139,250,.16); --accent-line: rgba(167,139,250,.38); }
body[data-accent="amber"]   { --accent: #fbbf24; --accent-soft: rgba(251,191,36,.14);  --accent-line: rgba(251,191,36,.35); }
body[data-accent="rose"]    { --accent: #fb7185; --accent-soft: rgba(251,113,133,.14); --accent-line: rgba(251,113,133,.35); }

:root[data-theme="light"] {
  --bg: #f6f8fb;
  --bg-raised: #ffffff;
  --bg-card: #ffffff;
  --border: rgba(12, 20, 33, 0.1);
  --border-strong: rgba(12, 20, 33, 0.18);

  --text: #0d1520;
  --text-muted: #55637a;
  --text-dim: #7b899e;

  --shadow: 0 18px 40px -28px rgba(13, 21, 32, 0.35);
}

/* --- Base --------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  font-weight: 600;
}

p { margin: 0 0 1em; }

ul { margin: 0 0 1em; padding-left: 1.15rem; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #04140d;
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}

.skip-link:focus { left: 0; }

/* --- Layout helpers ----------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(3.5rem, 9vw, 6.5rem); }

.section--raised {
  background: var(--bg-raised);
  border-block: 1px solid var(--border);
}

.section-head { max-width: 62ch; margin-bottom: 2.75rem; }

.section-head p { color: var(--text-muted); margin-bottom: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--accent-line);
}

h1 { font-size: clamp(2.25rem, 6vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.35rem); }

.lead {
  font-size: clamp(1.02rem, 1.7vw, 1.18rem);
  color: var(--text-muted);
  max-width: 60ch;
}

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn--primary {
  background: var(--accent);
  color: #04140d;
}

:root[data-theme="light"] .btn--primary { color: #06251a; }

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

.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* --- Site header -------------------------------------------------------- */

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

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
}

.brand:hover { text-decoration: none; }

.brand__logo {
  display: block;
  width: 120px;
  height: 36px;
  border-radius: 3px;
  object-fit: cover;
  object-position: center;
  flex: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.93rem;
  font-weight: 500;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}

.icon-btn {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.icon-btn:hover { color: var(--accent); border-color: var(--accent-line); }

.icon-btn svg { width: 18px; height: 18px; }

.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav-toggle { display: none; }

.nav-toggle__icon {
  display: grid;
  gap: 4px;
  width: 18px;
}

.nav-toggle__line {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:first-child {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:last-child {
  transform: translateY(-6px) rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle__line { transition: none; }
}

@media (max-width: 800px) {
  .nav-toggle { display: grid; }

  .nav {
    position: absolute;
    inset: 68px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }

  .nav.is-open { display: flex; }

  .nav a {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
  }

  .nav a:last-child { border-bottom: 0; }
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(3.5rem, 11vw, 7.5rem);
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.hero::before {
  width: 420px; height: 420px;
  top: -160px; right: -80px;
  background: var(--accent);
}

.hero::after {
  width: 340px; height: 340px;
  bottom: -180px; left: -120px;
  background: #38bdf8;
  opacity: 0.28;
}

:root[data-theme="light"] .hero::before { opacity: 0.22; }
:root[data-theme="light"] .hero::after { opacity: 0.16; }

.hero .wrap { position: relative; z-index: 1; }

.hero h1 { margin-bottom: 1.1rem; }

.hero h1 .accent { color: var(--accent); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.9rem 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* --- Stats -------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  margin-top: clamp(3rem, 7vw, 4.5rem);
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat {
  background: var(--bg-raised);
  padding: 1.4rem 1.5rem;
}

.stat__value {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.stat__label {
  font-size: 0.82rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

/* --- Feature grid ------------------------------------------------------- */

.grid {
  display: grid;
  gap: 1.25rem;
}

.grid--3 { grid-template-columns: repeat(auto-fit, minmax(275px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.card h3 { margin-bottom: 0.5rem; }

.card p { color: var(--text-muted); margin-bottom: 0; font-size: 0.95rem; }

.card__icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.card__icon svg { width: 20px; height: 20px; }

/* --- Team grid ---------------------------------------------------------- */

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

/* All five members on one row once there is room for it. Below this the
   auto-fit track above takes over and steps down to 4 / 3 / 2 / 1. */
@media (min-width: 1080px) {
  .team-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
  }

  .team-grid .member-card__body { padding: 1rem 1.05rem 1.25rem; }
  .team-grid .member-card__name { font-size: 1rem; }
  .team-grid .member-card__role { font-size: 0.82rem; }
  .team-grid .member-card__more { margin-top: 0.75rem; font-size: 0.8rem; }
  .team-grid .member-card__social { padding-top: 0.8rem; gap: 0.4rem; }
  .team-grid .member-card__social a { width: 30px; height: 30px; }
}

.member-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: inherit;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.member-card:hover,
.member-card:focus-within {
  text-decoration: none;
  transform: translateY(-5px);
  border-color: var(--accent-line);
  box-shadow: var(--shadow);
}

.member-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(150deg, var(--accent-soft), var(--bg-raised));
  overflow: hidden;
}

.member-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s ease;
}

.member-card:hover .member-card__media img { transform: scale(1.05); }

/* Initials placeholder shown until a real photo is dropped in. */
.member-card__media::after,
.avatar::after {
  content: attr(data-initials);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: linear-gradient(150deg, var(--accent-soft), transparent);
}

.member-card__media::after { font-size: 2.6rem; z-index: 0; }

.member-card__media img { position: relative; z-index: 1; }

.member-card__body {
  padding: 1.15rem 1.3rem 1.45rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.member-card__name {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.member-card__role {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.member-card__more {
  margin-top: 0.9rem;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.35rem;
}

.member-card__more:hover { text-decoration: none; }

/* Stretched link: the whole card opens the profile, while the social icons
   below sit on a higher layer and keep their own targets. */
.member-card__more::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.member-card__social {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 0.95rem;
}

.member-card__social a {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.member-card__social a:hover {
  text-decoration: none;
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.member-card__social svg { width: 15px; height: 15px; }

/* --- Member profile page ------------------------------------------------ */

.profile {
  position: relative;
  padding-block: clamp(2.75rem, 7vw, 4.5rem) clamp(2rem, 5vw, 3rem);
  overflow: hidden;
}

.profile::before {
  content: "";
  position: absolute;
  width: 460px; height: 460px;
  top: -220px; right: -120px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  background: var(--accent);
  pointer-events: none;
}

:root[data-theme="light"] .profile::before { opacity: 0.18; }

.profile .wrap { position: relative; z-index: 1; }

.profile__grid {
  display: grid;
  gap: clamp(1.75rem, 5vw, 3.25rem);
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  align-items: start;
}

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

.avatar {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  max-width: 280px;
}

.avatar::after { font-size: 3.4rem; z-index: 0; }

.avatar img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.profile__role {
  font-family: var(--font-display);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.profile__name { margin-bottom: 0.75rem; font-size: clamp(2rem, 5vw, 3rem); }

.meta-list {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: grid;
  gap: 0.7rem;
  font-size: 0.92rem;
}

.meta-list li {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  color: var(--text-muted);
}

.meta-list strong {
  color: var(--text-dim);
  font-weight: 500;
  min-width: 5.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.chip {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.social-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.social-row a {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.social-row a:hover {
  text-decoration: none;
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.social-row svg { width: 17px; height: 17px; }

/* Same buttons again in the contact block at the foot of a profile. */
.cta .social-row {
  justify-content: center;
  margin-top: 1.75rem;
}

.cta .social-row a {
  width: 44px;
  height: 44px;
  border-color: var(--border-strong);
  background: var(--bg-card);
}

.cta .social-row a:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.cta .social-row svg { width: 19px; height: 19px; }

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

.timeline li {
  position: relative;
  padding-left: 1.9rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline li::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 1.5rem;
  bottom: -1.6rem;
  width: 1px;
  background: var(--border-strong);
}

.timeline li:last-child::after { display: none; }

.timeline h3 { margin-bottom: 0.3rem; font-size: 1.05rem; }

.timeline p { color: var(--text-muted); margin-bottom: 0; font-size: 0.95rem; }

.quote {
  margin: 0;
  padding: 1.5rem 1.75rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-card);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.05rem;
  color: var(--text);
}

.quote p { margin-bottom: 0; font-style: italic; }

/* Prev / next teammate */
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  margin-top: 1rem;
}

.pager a {
  display: grid;
  gap: 0.15rem;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
}

.pager a:hover { text-decoration: none; color: var(--accent); }

.pager span {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-family: var(--font-body);
}

.pager .pager__next { text-align: right; margin-left: auto; }

/* --- CTA band ----------------------------------------------------------- */

.cta {
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  background: linear-gradient(140deg, var(--accent-soft), transparent 70%);
  padding: clamp(2rem, 5vw, 3.25rem);
  text-align: center;
}

.cta h2 { margin-bottom: 0.6rem; }

.cta p { color: var(--text-muted); max-width: 52ch; margin-inline: auto; }

.cta .btn-row { justify-content: center; }

/* --- Footer ------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
  padding-block: 2.5rem;
  margin-top: 0;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

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

/* --- Reveal on scroll --------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
