/* ==========================================================================
   Connected Weather — Direction A "Instrument"
   Bold, technical, data-forward. Mono numerics, station-list density.
   Tweakable via [data-theme] root attributes.
   ========================================================================== */

:root {
  /* Palette — instrument dark */
  --navy-950: #04101e;
  --navy-900: #08182b;
  --navy-800: #0f2540;
  --navy-700: #16345a;
  --blue-500: #378ADD;
  --blue-300: #85B7EB;
  --blue-100: #B5D4F4;
  --amber-500: #EF9F27;
  --amber-400: #f5b34d;
  --coral-500: #D85A30;

  --bg: var(--navy-950);
  --bg-elev: #0a1828;
  --bg-card: rgba(255, 255, 255, 0.025);
  --bg-card-hover: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --fg: #eef2f7;
  --fg-2: rgba(238, 242, 247, 0.7);
  --fg-3: rgba(238, 242, 247, 0.45);
  --fg-4: rgba(238, 242, 247, 0.28);
  --accent: var(--amber-500);
  --accent-2: var(--blue-500);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-display: "Inter", sans-serif;

  --max: 1280px;
  --gutter: 32px;
}

[data-theme="atmosphere"] {
  --bg: #06121f;
  --bg-elev: #0a1929;
  --fg: #f6f5ef;
  --fg-2: rgba(246, 245, 239, 0.72);
  --fg-3: rgba(246, 245, 239, 0.45);
  --accent: #f5b34d;
  --accent-2: #85B7EB;
  --font-display: "Source Serif 4", "Source Serif Pro", Georgia, serif;
}

[data-theme="signal"] {
  --bg: #f4f1ea;
  --bg-elev: #ffffff;
  --bg-card: rgba(0, 0, 0, 0.025);
  --bg-card-hover: rgba(0, 0, 0, 0.05);
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.2);
  --fg: #14161b;
  --fg-2: rgba(20, 22, 27, 0.72);
  --fg-3: rgba(20, 22, 27, 0.5);
  --fg-4: rgba(20, 22, 27, 0.32);
  --accent: #c64a1a;
  --accent-2: #0F4F8B;
  --font-display: "Source Serif 4", "Source Serif Pro", Georgia, serif;
}

/* ---------- Reset & base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  font-feature-settings: "ss01", "cv11";
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }

::selection { background: var(--accent); color: var(--bg); }

/* ---------- Grid frame (global lines) ---------- */
.gridframe {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.4;
  mask: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 80%);
}

/* ---------- Container ---------- */
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); position: relative; z-index: 2; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--gutter);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.topbar-left { display: flex; align-items: center; gap: 14px; color: var(--fg-3); }
.topbar-left .dot { width: 8px; height: 8px; border-radius: 50%; background: #16c47e; box-shadow: 0 0 12px #16c47e80; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.topbar-right { color: var(--fg-3); display: flex; gap: 22px; }
.topbar-right .live { color: var(--accent); }

@media (max-width: 768px) {
  .topbar-left .meta, .topbar-right .meta-extra { display: none; }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 36px;
  left: 0; right: 0;
  z-index: 40;
  padding: 22px var(--gutter);
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 18px; color: var(--fg); text-decoration: none; }
.nav-logo .nav-mark { height: 192px; width: auto; display: block; flex-shrink: 0; }
.nav-logo .nav-wordmark {
  display: flex; flex-direction: column; line-height: 0.9;
  font-family: var(--font-display);
  border-left: 1px solid color-mix(in oklab, var(--fg) 18%, transparent);
  padding-left: 18px;
}
.nav-logo .nav-wordmark .wm-row-1 { font-size: 80px; font-weight: 500; letter-spacing: -0.02em; color: var(--fg); }
.nav-logo .nav-wordmark .wm-row-2 { font-size: 80px; font-weight: 400; font-style: italic; letter-spacing: -0.01em; color: var(--fg); opacity: 0.85; margin-top: 6px; }

.footer-lockup { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.footer-mark { height: 72px; width: auto; display: block; }
.footer-wordmark {
  display: flex; flex-direction: column; line-height: 0.9;
  font-family: var(--font-display);
  border-left: 1px solid color-mix(in oklab, var(--fg) 18%, transparent);
  padding-left: 14px;
}
.footer-wordmark span:first-child { font-size: 30px; font-weight: 500; letter-spacing: -0.01em; color: var(--fg); }
.footer-wordmark span:last-child { font-size: 30px; font-weight: 400; font-style: italic; color: var(--fg); opacity: 0.85; margin-top: 3px; }

.nav-links { display: flex; gap: 4px; align-items: center; list-style: none; }
.nav-links a {
  display: block;
  padding: 8px 14px;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--fg-3);
  border-radius: 2px;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a.active {
  color: var(--accent);
  background: color-mix(in oklab, var(--accent) 8%, transparent);
}
.nav-cta {
  margin-left: 8px;
  padding: 9px 16px !important;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 11px !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
}
.nav-cta:hover { border-color: var(--accent); color: var(--accent) !important; background: transparent !important; }

.nav-toggle { display: none; }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; flex-direction: column; gap: 5px; padding: 8px; }
  .nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--fg); }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 92px; left: 0; right: 0;
    padding: 24px var(--gutter);
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    gap: 4px;
  }
  .nav-links.open a { padding: 14px 16px; font-size: 16px; }
}

/* ---------- Hero (Direction A — Instrument) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 320px var(--gutter) 80px;
  overflow: hidden;
}

.hero-radar {
  position: absolute;
  right: -10%;
  top: 50%;
  transform: translateY(-50%);
  width: 720px;
  height: 720px;
  pointer-events: none;
  opacity: 0.85;
}
@media (max-width: 1100px) { .hero-radar { right: -30%; opacity: 0.4; } }
@media (max-width: 700px) { .hero-radar { right: -60%; width: 560px; height: 560px; opacity: 0.3; } }

.hero-meta {
  display: flex;
  gap: 48px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.hero-meta div span { color: var(--fg); display: block; margin-top: 4px; font-size: 13px; letter-spacing: 0.02em; text-transform: none; }
.hero-meta div span.accent { color: var(--accent); }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 7.5vw, 112px);
  line-height: 0.94;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--fg);
  max-width: 14ch;
  text-wrap: balance;
}
.hero h1 .em {
  color: var(--accent);
  font-style: italic;
  font-weight: 400;
}
[data-theme="atmosphere"] .hero h1 { font-weight: 400; }
[data-theme="atmosphere"] .hero h1 .em { font-style: italic; }
[data-theme="signal"] .hero h1 { font-weight: 400; }

.hero p.lede {
  margin-top: 32px;
  max-width: 56ch;
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-2);
}
.hero-cta-row {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  transition: all .2s;
  cursor: pointer;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: transparent;
  color: var(--accent);
}
.btn .arrow { font-size: 14px; line-height: 0; transform: translateY(-1px); }

/* ---------- Live readout strip ---------- */
.readout {
  margin-top: 80px;
  border: 1px solid var(--line);
  border-radius: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-elev);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.readout > div {
  padding: 18px 22px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.readout > div:last-child { border-right: none; }
.readout .label { color: var(--fg-3); text-transform: uppercase; font-size: 10px; letter-spacing: 0.1em; }
.readout .value {
  color: var(--fg);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-family: var(--font-mono);
}
.readout .value.accent { color: var(--accent); }
.readout .unit { color: var(--fg-3); font-size: 11px; }
@media (max-width: 880px) { .readout { grid-template-columns: repeat(2, 1fr); }
  .readout > div:nth-child(2) { border-right: none; }
  .readout > div:nth-child(1), .readout > div:nth-child(2) { border-bottom: 1px solid var(--line); }
}

/* ---------- Section ---------- */
.section { padding: 120px 0; position: relative; }
.section-head { display: grid; grid-template-columns: 1fr 2fr; gap: 60px; margin-bottom: 64px; align-items: end; }
@media (max-width: 880px) { .section-head { grid-template-columns: 1fr; gap: 24px; } }

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before { content: ""; width: 24px; height: 1px; background: var(--accent); }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 500;
  text-wrap: balance;
}
[data-theme="atmosphere"] .section-title, [data-theme="signal"] .section-title { font-weight: 400; }
.section-desc { color: var(--fg-2); max-width: 56ch; font-size: 16px; line-height: 1.6; margin-top: 20px; }

/* ---------- Research grid (Direction A — index card style) ---------- */
.idx-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.idx-card {
  grid-column: span 4;
  background: var(--bg);
  padding: 32px 28px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: background .2s;
}
.idx-card:hover { background: var(--bg-elev); }
.idx-card .idx { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--fg-3); }
.idx-card .title { font-family: var(--font-display); font-size: 24px; line-height: 1.15; letter-spacing: -0.01em; font-weight: 500; }
.idx-card .body { color: var(--fg-2); font-size: 14.5px; line-height: 1.6; }
.idx-card .tags { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; padding-top: 12px; }
.idx-card .tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--line);
  color: var(--fg-3);
}
@media (max-width: 1000px) { .idx-card { grid-column: span 6; } }
@media (max-width: 700px) { .idx-card { grid-column: span 12; } }

/* Span layouts for variety */
.idx-card.span-6 { grid-column: span 6; }
.idx-card.span-8 { grid-column: span 8; }
.idx-card.feature {
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 16%, var(--bg)), var(--bg) 70%);
  min-height: 280px;
}
.idx-card.feature .title { font-size: 36px; }
.idx-card.feature .body { font-size: 16px; }

@media (max-width: 1000px) { .idx-card.span-6, .idx-card.span-8 { grid-column: span 12; } }

/* ---------- Stat row ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat-cell {
  padding: 40px 32px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-cell:last-child { border-right: none; }
.stat-cell .num {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--fg);
}
.stat-cell .num .unit-sm { font-size: 0.45em; color: var(--fg-3); margin-left: 6px; font-weight: 400; }
.stat-cell .label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }
@media (max-width: 880px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat-cell:nth-child(2) { border-right: none; }
  .stat-cell:nth-child(1), .stat-cell:nth-child(2) { border-bottom: 1px solid var(--line); }
}

/* ---------- Team grid ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.team-card {
  background: var(--bg);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background .2s;
}
.team-card:hover { background: var(--bg-elev); }
.team-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent-2) 25%, var(--bg)), var(--bg));
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 500;
  color: var(--fg-2);
  letter-spacing: 0.04em;
  position: relative;
  overflow: hidden;
}
.team-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(45deg, transparent 0 6px, rgba(255,255,255,.025) 6px 7px);
  pointer-events: none;
}
.team-name { font-family: var(--font-display); font-size: 17px; font-weight: 500; }
.team-role { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--fg-3); text-transform: uppercase; }

@media (max-width: 1000px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Facility / instrument card ---------- */
.fac-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.fac-row {
  display: grid;
  grid-template-columns: 200px 1fr 220px;
  gap: 32px;
  background: var(--bg);
  padding: 32px 28px;
  align-items: start;
  transition: background .2s;
}
.fac-row:hover { background: var(--bg-elev); }
.fac-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.fac-name .id { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 6px; }
.fac-body { color: var(--fg-2); font-size: 14.5px; line-height: 1.65; }
.fac-specs { font-family: var(--font-mono); font-size: 11px; line-height: 1.9; color: var(--fg-3); }
.fac-specs div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding: 4px 0; }
.fac-specs span:last-child { color: var(--fg); }

@media (max-width: 1000px) {
  .fac-row { grid-template-columns: 1fr; gap: 16px; }
}

/* ---------- Page header ---------- */
.page-hero {
  padding: 320px var(--gutter) 100px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.page-hero-eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 24px; }
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  font-weight: 500;
  text-wrap: balance;
  max-width: 16ch;
}
.page-hero p {
  margin-top: 28px;
  max-width: 60ch;
  color: var(--fg-2);
  font-size: 18px;
  line-height: 1.55;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 80px var(--gutter) 32px;
  margin-top: 120px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 18px; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer a { color: var(--fg-2); font-size: 14px; }
.footer a:hover { color: var(--accent); }
.footer-brand { display: flex; flex-direction: column; gap: 16px; }
.footer-brand .wm { font-family: var(--font-display); font-size: 22px; line-height: 1.1; letter-spacing: -0.01em; max-width: 18ch; }
.footer-brand .desc { color: var(--fg-3); font-size: 13px; line-height: 1.6; max-width: 36ch; }
.footer-bottom {
  max-width: var(--max);
  margin: 64px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-3);
  flex-wrap: wrap;
  gap: 16px;
}
@media (max-width: 880px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: span 2; } }
@media (max-width: 540px) { .footer-inner { grid-template-columns: 1fr; } .footer-brand { grid-column: span 1; } }

/* ---------- Quote ---------- */
.quote-section { padding: 120px var(--gutter); text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.quote-section blockquote {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.25;
  font-weight: 400;
  font-style: italic;
  max-width: 22ch;
  margin: 0 auto 18px;
  color: var(--fg-2);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.quote-section cite { font-family: var(--font-mono); font-style: normal; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); }

/* ---------- Affiliations strip ---------- */
.affil {
  padding: 60px var(--gutter);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.affil-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
}
.affil-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); }
.affil-list { display: flex; gap: 40px; flex-wrap: wrap; align-items: center; }
.affil-item {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--fg-2);
  letter-spacing: -0.005em;
}

/* ---------- Pub list ---------- */
.pub-list { list-style: none; }
.pub-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 60px 1fr 120px;
  gap: 24px;
  align-items: start;
}
.pub-item:hover { color: var(--accent); }
.pub-num { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); padding-top: 4px; letter-spacing: 0.06em; }
.pub-title { font-family: var(--font-display); font-size: 18px; line-height: 1.35; font-weight: 500; }
.pub-meta { color: var(--fg-3); font-size: 13px; margin-top: 6px; line-height: 1.55; }
.pub-meta em { font-style: italic; color: var(--fg-2); }
.pub-year { font-family: var(--font-mono); font-size: 13px; color: var(--fg-3); text-align: right; }

@media (max-width: 700px) {
  .pub-item { grid-template-columns: 1fr; }
  .pub-year { text-align: left; }
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.contact-info h3 { font-family: var(--font-display); font-size: 28px; font-weight: 500; margin-bottom: 14px; letter-spacing: -0.01em; }
.contact-info p { color: var(--fg-2); margin-bottom: 32px; max-width: 44ch; }
.contact-detail { display: grid; grid-template-columns: 130px 1fr; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); }
.contact-detail .lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); padding-top: 3px; }
.contact-detail .val { font-size: 15px; color: var(--fg); line-height: 1.55; }
.contact-detail .val a { color: var(--accent); }
.contact-detail .val a:hover { text-decoration: underline; }

.form { display: flex; flex-direction: column; gap: 18px; }
.form label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }
.form input, .form textarea {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 12px 14px;
  width: 100%;
  outline: none;
  transition: border-color .2s;
}
.form input:focus, .form textarea:focus { border-color: var(--accent); }
.form textarea { min-height: 140px; resize: vertical; }
.form button {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 22px;
  align-self: flex-start;
  transition: all .2s;
  cursor: pointer;
}
.form button:hover { background: transparent; color: var(--accent); }

@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; gap: 48px; } }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s, transform .7s; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 80ms; }
.reveal-d2 { transition-delay: 160ms; }
.reveal-d3 { transition-delay: 240ms; }
.reveal-d4 { transition-delay: 320ms; }

/* ---------- Members (group page) ---------- */
.members-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.member-card { background: var(--bg); padding: 28px; display: flex; flex-direction: column; gap: 14px; transition: background .2s; }
.member-card:hover { background: var(--bg-elev); }
.member-card .photo { width: 100%; aspect-ratio: 1; background: linear-gradient(135deg, color-mix(in oklab, var(--accent-2) 30%, var(--bg)), var(--bg)); border: 1px solid var(--line); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 36px; color: var(--fg-2); }
.member-card .photo::after { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(45deg, transparent 0 6px, rgba(255,255,255,.03) 6px 7px); }
.member-card h3 { font-family: var(--font-display); font-size: 19px; font-weight: 500; }
.member-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.member-email { font-family: var(--font-mono); font-size: 12px; color: var(--fg-3); }
.member-email a:hover { color: var(--accent); }
.member-bio { font-size: 13.5px; color: var(--fg-2); line-height: 1.6; }

@media (max-width: 1000px) { .members-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .members-grid { grid-template-columns: 1fr; } }

/* PI section */
.pi { display: grid; grid-template-columns: 320px 1fr; gap: 48px; padding: 32px 0; align-items: start; }
.pi-photo { aspect-ratio: 4/5; background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 25%, var(--bg)), var(--bg)); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 56px; color: var(--fg-2); position: relative; overflow: hidden; }
.pi-photo::after { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(45deg, transparent 0 8px, rgba(255,255,255,.025) 8px 9px); }
.pi h2 { font-family: var(--font-display); font-size: clamp(36px, 4vw, 56px); font-weight: 500; line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 12px; }
.pi-title { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.pi-bio p { color: var(--fg-2); margin-bottom: 16px; max-width: 64ch; line-height: 1.65; }
.pi-bio p:last-child { margin-bottom: 0; }

@media (max-width: 880px) { .pi { grid-template-columns: 1fr; } .pi-photo { max-width: 280px; } }

/* ---------- Direction-specific overrides ---------- */
[data-theme="atmosphere"] body { background: linear-gradient(180deg, #06121f 0%, #0a1929 30%, #061523 100%); }
[data-theme="atmosphere"] .hero {
  background:
    radial-gradient(ellipse 1200px 800px at 50% -20%, color-mix(in oklab, #f5b34d 25%, transparent), transparent 60%),
    radial-gradient(ellipse 800px 600px at 90% 100%, color-mix(in oklab, #378ADD 20%, transparent), transparent 60%);
}
[data-theme="atmosphere"] .hero h1 { font-size: clamp(56px, 9vw, 140px); font-weight: 400; max-width: 12ch; }
[data-theme="atmosphere"] .gridframe { display: none; }

[data-theme="signal"] body { background: var(--bg); }
[data-theme="signal"] .topbar { background: color-mix(in oklab, var(--bg) 90%, transparent); }
[data-theme="signal"] .nav { background: color-mix(in oklab, var(--bg) 92%, transparent); }
[data-theme="signal"] .gridframe { opacity: 0.3; }
[data-theme="signal"] .hero { padding-top: 320px; }
[data-theme="signal"] .hero h1 { color: var(--fg); }
[data-theme="signal"] .hero h1 .em { color: var(--accent); }
[data-theme="signal"] .btn-primary { color: #fff; }
[data-theme="signal"] .form input, [data-theme="signal"] .form textarea { background: #fff; }
[data-theme="signal"] .form button { color: #fff; }
[data-theme="signal"] .form button:hover { color: var(--accent); }
[data-theme="signal"] .stat-cell .num { font-family: var(--font-display); }
[data-theme="signal"] .team-photo, [data-theme="signal"] .pi-photo, [data-theme="signal"] .member-card .photo { background: linear-gradient(135deg, #e8e2d4, #efeae0); color: rgba(0,0,0,0.3); }

/* hide scrollbars on canvas embed (artboard contents) */
.embed-mode .topbar, .embed-mode .nav { position: absolute; }
.embed-mode .gridframe { position: absolute; }
