/* ---------------------------------------------------------------
   Project Fermat
   Static site: no build step, no framework, no dependencies.
   Set entirely in Fraunces, weight 400, centred on a single measure.
   --------------------------------------------------------------- */

:root {
  --bg:      #0a0a0f;
  --ink:     #f4f1ea;
  --muted:   #8a8778;
  --accent:  #e8c547;
  --line:    rgba(244, 241, 234, 0.12);
  --rule:    rgba(244, 241, 234, 0.25);

  --measure: 40rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { min-height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Fraunces', Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 20px;
  -webkit-font-smoothing: antialiased;
}

/* --- brand mark -------------------------------------------------- */

.brand {
  display: block;
  line-height: 0;
  padding-top: 30px;
}
.brand img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: block;
  transition: transform 0.2s ease;
}
.brand:hover img { transform: translateY(-1px); }

/* --- navigation -------------------------------------------------- */

.nav {
  width: 100%;
  max-width: var(--measure);
  padding: 34px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 26px;
}
.nav a {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 4px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* with a brand mark above it, the nav sits closer beneath */
.brand + .nav { padding-top: 16px; }

/* --- page body --------------------------------------------------- */

main {
  width: 100%;
  max-width: var(--measure);
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 72px 0 64px;
}

.badge {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}

/* the 'fermat' wordmark, sitting above the title on the home hero */
.wordmark {
  display: block;
  width: clamp(200px, 42vw, 320px);
  height: auto;
  margin: 2px auto -2px;
}

h1 {
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 3.5rem);
  letter-spacing: -0.01em;
  line-height: 1.12;
}

.about {
  color: var(--muted);
  font-size: clamp(0.95rem, 2.4vw, 1.1rem);
  line-height: 1.65;
}
.about + .about { margin-top: -4px; }

/* A rule-separated block, the same device the first page used. */
.block {
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.block-title { font-size: clamp(1.05rem, 3vw, 1.35rem); }
.note {
  color: var(--muted);
  font-size: clamp(0.85rem, 2.2vw, 0.98rem);
  line-height: 1.6;
}

/* --- links ------------------------------------------------------- */

a { color: var(--ink); text-decoration: none; }
main a:not(.plain) {
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.2s ease;
}
main a:not(.plain):hover { border-color: var(--accent); }

.emails {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  font-size: clamp(0.85rem, 2.2vw, 0.98rem);
  color: var(--muted);
}

/* --- a short list, no boxes -------------------------------------- */

.items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 4px;
}
.items h3 { font-weight: 400; font-size: clamp(0.98rem, 2.4vw, 1.08rem); }
.items p {
  color: var(--muted);
  font-size: clamp(0.85rem, 2.2vw, 0.95rem);
  line-height: 1.6;
  margin-top: 3px;
}

/* --- founders ---------------------------------------------------- */

/* The founders page needs more room than the single measure allows. */
main.wide { max-width: 54rem; }

/* Two portraits side by side, backgrounds removed, sharing a baseline.
   Ishaan on the left, Akshat on the right — kept as two separate images. */
.portraits {
  width: 100%;
  /* slightly inset on larger screens so the pair reads a touch smaller;
     on mobile (below) this cap is lifted so the portraits fill the row. */
  max-width: 660px;
  margin: 12px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: clamp(12px, 4vw, 48px);
}
.portrait { position: relative; margin: 0; text-align: center; }
.portrait img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: contain;
  object-position: bottom center;
  /* a soft floor-shadow so the cut-outs sit on the page rather than float */
  filter: drop-shadow(0 24px 28px rgba(0, 0, 0, 0.55));
}
.portrait figcaption {
  margin-top: 14px;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 720px) {
  /* mobile: let the portraits fill the row at their current (liked) size,
     but keep Ishaan on the left and Akshat on the right. */
  .portraits { max-width: none; }
  .portrait img { max-height: 320px; }
  .portrait figcaption { letter-spacing: 0.16em; }

  /* on mobile the bios stack; show Akshat's details above Ishaan's. */
  .people .person:nth-child(2) { order: -1; }
}

.people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 56px);
  width: 100%;
  margin-top: 8px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
@media (max-width: 720px) {
  .people { grid-template-columns: 1fr; gap: 40px; }
}

.person { text-align: left; }

/* Portrait beside the name, as on the reference. */
.person-head { display: flex; align-items: center; gap: 16px; }
.avatar {
  width: 84px;
  height: 84px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  background: rgba(244, 241, 234, 0.06);
}
.person h2 {
  font-weight: 400;
  font-size: clamp(1.2rem, 2.6vw, 1.5rem);
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.person .role {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 6px;
}
.person .fields { font-size: 0.82rem; color: var(--muted); opacity: 0.8; margin-top: 14px; }
.person .note { margin-top: 10px; }
.person .link { display: inline-block; margin-top: 12px; font-size: 0.88rem; }

/* --- legal documents --------------------------------------------- */

.doc { text-align: left; width: 100%; }
.doc h2 {
  font-weight: 400;
  font-size: clamp(1.02rem, 2.6vw, 1.15rem);
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.doc p {
  color: var(--muted);
  font-size: clamp(0.88rem, 2.2vw, 0.98rem);
  line-height: 1.7;
  margin-top: 12px;
}
.doc .updated { margin-top: 0; }
.doc ul { list-style: disc; padding-left: 1.15em; margin-top: 12px; }
.doc li {
  color: var(--muted);
  font-size: clamp(0.88rem, 2.2vw, 0.98rem);
  line-height: 1.7;
  margin-top: 6px;
}
.doc a { border-bottom: 1px solid var(--rule); transition: border-color 0.2s ease; }
.doc a:hover { border-color: var(--accent); }

/* --- footer ------------------------------------------------------ */

footer {
  width: 100%;
  max-width: var(--measure);
  padding: 0 0 44px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.initiative {
  color: var(--muted);
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  line-height: 1.6;
}
.initiative a { border-bottom: 1px solid var(--rule); transition: border-color 0.2s ease; }
.initiative a:hover { border-color: var(--accent); }
.legal { font-size: clamp(0.72rem, 1.8vw, 0.8rem); letter-spacing: 0.03em; }
.legal a { color: var(--muted); transition: color 0.2s ease; }
.legal a:hover { color: var(--accent); }
.legal .sep { color: var(--muted); opacity: 0.5; margin: 0 8px; }

:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
