:root {
  color-scheme: light;
  --ink: #242420;
  --graphite: #67675f;
  --line: #cfcdc4;
  --paper: #f1efe7;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

a { color: inherit; }

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

.page-frame {
  max-width: 1680px;
  height: 100svh;
  margin: 0 auto;
  padding: 0 32px clamp(16px, 3svh, 32px);
  display: grid;
  grid-template-rows: clamp(56px, 10svh, 88px) minmax(0, 1fr);
}

.site-header { display: flex; align-items: center; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.08em;
}

.brand-mark { display: block; width: 28px; height: 28px; }

.bento {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-rows: minmax(0, 1fr) 46px;
  border: 1px solid var(--line);
}

.card { position: relative; min-width: 0; min-height: 0; }

.card-hero {
  display: flex;
  align-items: center;
  padding: clamp(16px, 4svh, 48px) clamp(20px, 2.5vw, 36px);
  border-right: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 24px;
  color: var(--graphite);
  font: 400 13px/1.5 var(--mono);
}

h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(36px, min(5.1vw, 10svh), 80px);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.card-model {
  display: flex;
  background:
    linear-gradient(rgba(36, 36, 32, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 36, 32, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
}

.motion-stage { position: relative; width: 100%; min-height: 0; overflow: hidden; }

#motion-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 300ms ease;
}

.motion-stage.is-rendering #motion-canvas { opacity: 1; }

.model-fallback {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(85%, 480px);
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
  transform: translate(-50%, -50%);
}

.model-fallback path { stroke-width: 2; }
.model-fallback .fallback-path { stroke: var(--graphite); stroke-dasharray: 3 4; }
.model-fallback .fallback-tip, .model-fallback .fallback-base { stroke-width: 1; }
.motion-stage.is-rendering .model-fallback { visibility: hidden; }

.team-frame { height: auto; min-height: 100svh; }
.team-page { padding: clamp(24px, 5vw, 64px); border: 1px solid var(--line); }
.team-page h1 { margin-bottom: clamp(32px, 5svh, 56px); }
.card-team {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  gap: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.team-person { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.team-photo { display: block; flex: 0 0 auto; object-fit: cover; filter: grayscale(1); }
.team-person h2 { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 400; }
.team-role { margin: 8px 0 0; color: var(--graphite); font: 400 12px/1.5 var(--mono); }
.team-bio { max-width: 55ch; margin: 0; font-size: 17px; line-height: 1.7; }
.team-bio a { text-decoration-color: var(--line); text-underline-offset: 3px; }
.team-bio a:hover { text-decoration-color: var(--ink); }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.site-footer {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  border-top: 1px solid var(--line);
}
.pi-strip {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  padding: 0 24px;
  color: #a3a198;
  font: 400 12px/1.5 var(--mono);
  letter-spacing: 0.12em;
}

.pi-digits { flex: 0 0 auto; min-width: 100%; white-space: pre; }
.pi-digits mark { color: var(--ink); background: transparent; }

@media (min-width: 901px) and (max-height: 650px) {
  .team-page { padding: 24px; }
  .team-page h1 { margin-bottom: 24px; font-size: 40px; }
  .card-team { padding-top: 24px; }
  .team-photo { width: 112px; height: 112px; }
  .team-person { gap: 16px; }
  .team-bio { font-size: 16px; }
}

@media (max-width: 900px) {
  .page-frame { height: auto; min-height: 100svh; padding: 0 24px 24px; grid-template-rows: 76px 1fr; }
  .bento { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(480px, 1fr) 46px; }
  .card-hero { padding: 40px 32px; border-right: 0; border-bottom: 1px solid var(--line); }
  h1 { max-width: 14ch; font-size: clamp(48px, 7.5vw, 68px); }
  .motion-stage { min-height: 0; }
  .card-team { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

@media (max-width: 480px) {
  .page-frame { padding: 0 16px 16px; grid-template-rows: 72px 1fr; }
  .bento { grid-template-rows: auto minmax(360px, 1fr) 46px; }
  .card-hero { padding: 36px 24px 40px; }
  .eyebrow { margin-bottom: 18px; }
  h1 { max-width: 10ch; font-size: clamp(42px, 11.8vw, 55px); }
  .team-person h2 { font-size: 22px; }
  .team-bio { font-size: 16px; }
  .pi-strip { padding: 0 12px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  #motion-canvas { transition: none; }
}
