/* ============================================================
   BIOADAPTING — Shared Stylesheet
   Digital cathedral. Venice Biennale × A24 × MIT Media Lab
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:       #050507;
  --cobalt:   #2D5BFF;
  --lime:     #B8FF10;
  --red:      #FF2E3A;
  --text:     #E7E3DA;
  --muted:    rgba(231,227,218,0.55);
  --nav-h:    64px;
  /* Mouse reactive background */
  --mouse-x:  50%;
  --mouse-y:  50%;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.01em;
  min-height: 100vh;
  overflow-x: hidden;
  /* Grain texture via SVG filter */
  position: relative;
  /* Mouse reactive background - subtle radial gradient */
  background-image: radial-gradient(
    600px circle at var(--mouse-x) var(--mouse-y),
    rgba(255, 255, 255, 0.04),
    transparent 50%
  );
  transition: background-position 0.3s ease-out;
}

/* Grain + grid overlay via pseudo on body */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  /* Hairline grid at 2% opacity */
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(45,91,255,0.02) 0px,
      rgba(45,91,255,0.02) 1px,
      transparent 1px,
      transparent 80px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(45,91,255,0.02) 0px,
      rgba(45,91,255,0.02) 1px,
      transparent 1px,
      transparent 80px
    );
}

/* Noise grain overlay - subtle static at 2.5% */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ── Typography ── */
h1, h2, h3, .bebas {
  font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
}

.page-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3.5rem, 12vw, 11rem);
  color: var(--text);
  text-shadow: 0 0 40px rgba(45,91,255,0.3);
  line-height: 1;
  letter-spacing: 0.02em;
  /* Title glow animation */
  animation: titleGlow 5s ease-in-out infinite;
}

.section-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: var(--text);
  text-shadow: 0 0 40px rgba(45,91,255,0.25);
  margin-bottom: 2rem;
  line-height: 1;
}

p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.9;
}

p:last-child {
  margin-bottom: 0;
}

blockquote {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 1.35rem;
  color: var(--text);
  line-height: 1.7;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s, opacity 0.2s;
}

a:hover {
  color: var(--cobalt);
  opacity: 0.9;
}

/* ── Layout ── */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.container--narrow {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

section {
  padding: 6rem 0;
  position: relative;
  z-index: 1;
}

.section-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 0;
}

.section-divider--cobalt {
  border-top-color: rgba(45,91,255,0.2);
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  transition: background 0.3s;
  border-bottom: 1px solid rgba(45,91,255,0.25);
}

.nav.scrolled {
  background: rgba(5,5,7,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  color: var(--text);
  text-decoration: none;
}

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

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--cobalt);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--text);
  transition: background 0.2s;
}

.nav-hamburger:hover span {
  background: var(--cobalt);
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: rgba(5,5,7,0.97);
  border-bottom: 1px solid rgba(45,91,255,0.25);
  padding: 1.5rem 2rem;
  z-index: 999;
  backdrop-filter: blur(16px);
}

.nav-mobile.open {
  display: block;
}

.nav-mobile ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nav-mobile a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-mobile a:hover {
  color: var(--cobalt);
}

/* Page padding top to clear nav */
.page-wrap {
  padding-top: var(--nav-h);
}

/* ── Footer ── */
.footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.footer-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-decoration: none;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* ── Image Placeholders ── */
.img-placeholder {
  border: 1px solid rgba(45,91,255,0.3);
  background: rgba(45,91,255,0.05);
  border-radius: 6px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.15s, filter 0.15s;
  cursor: default;
  width: 100%;
}

.img-placeholder:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,0.5), 2px 0 0 rgba(45,91,255,0.5), -2px 0 0 rgba(255,46,58,0.3);
  filter: brightness(1.05);
}

.img-placeholder-label {
  font-size: 0.7rem;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.1em;
  color: var(--lime);
  text-align: center;
  padding: 1rem;
}

/* Aspect ratios */
.img-placeholder--16x9  { aspect-ratio: 16 / 9; }
.img-placeholder--21x9  { aspect-ratio: 21 / 9; }
.img-placeholder--1x1   { aspect-ratio: 1 / 1; }
.img-placeholder--hero  { position: absolute; inset: 0; border-radius: 0; }

/* ── CTAs / Buttons ── */
.cta {
  display: inline-block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  color: var(--lime);
  text-decoration: none;
  transition: text-shadow 0.3s, opacity 0.2s;
  cursor: pointer;
}

.cta:hover {
  text-shadow: 0 0 20px rgba(184,255,16,0.6), 0 0 40px rgba(184,255,16,0.3);
  color: var(--lime);
  opacity: 1;
}

.cta-lg {
  font-size: 1.75rem;
}

.cta-xl {
  font-size: 1.8rem;
}

/* ── Label chip ── */
.label-chip {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 1.25rem;
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-placeholder {
  position: absolute;
  inset: 0;
  border-radius: 0;
  border: none;
  background: rgba(45,91,255,0.03);
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5,5,7,0.5) 0%, rgba(5,5,7,0.85) 100%);
  z-index: 1;
}

.hero-bg-label {
  position: absolute;
  bottom: 1.5rem;
  left: 2rem;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--lime);
  z-index: 2;
  font-family: 'Inter', sans-serif;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
  max-width: 100%;
}

.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4rem, 15vw, 18rem);
  color: var(--text);
  letter-spacing: 0.15em;
  text-shadow: 0 0 60px rgba(45,91,255,0.4);
  line-height: 0.9;
  display: block;
  white-space: nowrap;
  width: 100%;
  /* Title glow animation */
  animation: titleGlow 5s ease-in-out infinite;
}

/* Title glow keyframes - subtle electric blue pulse */
@keyframes titleGlow {
  0%, 100% {
    text-shadow: 0 0 60px rgba(45,91,255,0.15);
  }
  50% {
    text-shadow: 0 0 60px rgba(45,91,255,0.4), 0 0 30px rgba(45,91,255,0.3);
  }
}

.hero-sub {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text);
  margin-top: 1.5rem;
  max-width: 640px;
  line-height: 1.5;
}

.hero-desc {
  font-size: 1rem;
  color: var(--muted);
  margin-top: 1rem;
  max-width: 560px;
  line-height: 1.8;
}

.hero-cta {
  margin-top: 2.5rem;
}

/* ── Supporting / Press ── */
.press-section {
  padding: 5rem 0;
}

.nytimes-placeholder {
  max-height: 36px;
  width: auto;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  box-shadow: none;
  border-radius: 0;
  margin-bottom: 1.5rem;
}

.nytimes-placeholder .img-placeholder-label {
  font-size: 0.6rem;
}

/* ── In-page subnav ── */
.subnav {
  font-size: 0.78rem;
  font-family: 'Inter', sans-serif;
  color: var(--muted);
  letter-spacing: 0.05em;
  padding: 1.5rem 0 3rem;
  border-bottom: 1px solid rgba(45,91,255,0.15);
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

.subnav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.subnav a:hover {
  color: var(--cobalt);
}

.subnav-sep {
  margin: 0 0.5rem;
  opacity: 0.4;
}

/* ── Timeline ── */
.timeline {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem 2rem;
  position: relative;
  z-index: 1;
}

.timeline-year {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  color: var(--cobalt);
  line-height: 1;
  padding-top: 0.1rem;
  text-shadow: 0 0 20px rgba(45,91,255,0.3);
}

.timeline-desc {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.85;
  padding-top: 0.3rem;
  border-top: 1px solid rgba(45,91,255,0.2);
}

/* ── Team Grid ── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem 2.5rem;
  position: relative;
  z-index: 1;
}

.team-profile {}

.team-headshot {
  margin-bottom: 1.25rem;
}

.team-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
  transition: color 0.2s;
}

.team-profile:hover .team-name {
  color: var(--cobalt);
}

.team-role {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.team-bio {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0;
}

/* ── Credits Grid ── */
.credits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  position: relative;
  z-index: 1;
}

.credit-item {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  border-right: 1px solid rgba(255,255,255,0.06);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: color 0.2s;
}

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

/* ── Development storylist ── */
.story-list {
  list-style: none;
  padding: 0;
}

.story-list li {
  padding: 0.75rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 1.05rem;
  line-height: 1.8;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text);
}

.story-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--cobalt);
  font-size: 1.2rem;
  line-height: 1.5;
}

/* ── Residency List ── */
.residency-list {
  list-style: none;
  padding: 0;
}

.residency-list li {
  font-size: 1.05rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: var(--text);
  letter-spacing: 0.02em;
}

/* ── Why Now Questions ── */
.questions {
  margin-top: 1.5rem;
}

.question-line {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--text);
  text-shadow: 0 0 30px rgba(45,91,255,0.2);
  line-height: 1.4;
  display: block;
  letter-spacing: 0.03em;
}

/* ── Contact ── */
.contact-wrap {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  position: relative;
  z-index: 1;
}

.contact-body {
  max-width: 540px;
  text-align: center;
  margin-top: 3rem;
}

.contact-body p {
  font-size: 1.1rem;
  line-height: 2;
}

.contact-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: 0.1em;
  color: var(--text);
  text-shadow: 0 0 40px rgba(45,91,255,0.3);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.contact-link {
  color: var(--cobalt);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.contact-link:hover {
  color: var(--red);
}

.contact-tagline {
  margin-top: 2rem;
  font-style: italic;
  font-family: Georgia, serif;
  color: var(--muted);
  font-size: 1rem;
}

/* ── Iridescent / oilslick ── */
.iridescent {
  background: linear-gradient(
    135deg,
    rgba(45,91,255,0.08) 0%,
    rgba(184,255,16,0.04) 25%,
    rgba(255,46,58,0.04) 50%,
    rgba(45,91,255,0.08) 75%,
    rgba(184,255,16,0.03) 100%
  );
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

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

  .credits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline {
    grid-template-columns: 90px 1fr;
    gap: 0.75rem 1.5rem;
  }

  .hero-title {
    font-size: clamp(3rem, 18vw, 10rem);
    letter-spacing: 0.02em;
    white-space: normal;
  }

  section {
    padding: 4rem 0;
  }

  .page-title {
    font-size: clamp(3.5rem, 18vw, 10rem);
    letter-spacing: 0.01em;
  }
}

/* Timeline (Development Journey) */
.tl-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tl-row {
  display: flex;
  align-items: stretch;
  min-height: 100px;
}

.tl-year {
  flex: 0 0 120px;
  font-size: 28px;
  font-weight: 500;
  color: var(--text);
  padding-top: 0.15em;
  white-space: nowrap;
}

.tl-marker {
  flex: 0 0 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c9943a;
  flex-shrink: 0;
  margin-top: 0.5em;
}

.tl-dot--active {
  width: 12px;
  height: 12px;
  box-shadow: 0 0 0 4px rgba(201,148,58,0.2);
}

.tl-line {
  flex: 1;
  width: 1px;
  background: rgba(201,148,58,0.25);
  margin-top: 8px;
}

.tl-content {
  flex: 1;
  padding: 0 0 2.5rem 1rem;
}

.tl-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #c9943a;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.tl-desc {
  font-size: 14px;
  color: rgba(231,227,218,0.75);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 600px) {
  .tl-row {
    flex-wrap: wrap;
  }
  .tl-year {
    flex: 0 0 auto;
    font-size: 22px;
    padding-bottom: 0.25rem;
  }
  .tl-marker {
    flex: 0 0 30px;
    order: -1;
  }
  .tl-content {
    flex: 1 1 100%;
    padding: 0 0 2rem 30px;
  }
}

/* Press quotes (About page) */
.press-quote {
  margin-bottom: 2rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--accent1);
}

.press-attr {
  font-style: normal;
  font-size: 0.95rem;
  color: var(--accent2);
  display: inline-block;
  margin-top: 0.5rem;
}

/* Subsection headings (Development Path phases) */
.subsection-heading {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent1);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

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

  .container, .container--narrow {
    padding: 0 1.25rem;
  }

  .footer {
    padding: 1.5rem 1.25rem;
  }
}
