/* open.algebras.ai — static stylesheet, no build step.
   Colors and type follow the Algebras AI design system; the page is white,
   with the coral accent used only for links, focus and small details.
   Headlines use Newsreader (serif), as the brief asks. */

@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-SemiBold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --white: #FFFFFF;
  --tint: #F7F6F3;
  --ink: #272121;
  --ink-soft: #3A3333;
  --ink-muted: #5E5757;
  --rule: #E7E4DF;
  --rule-strong: #272121;
  --accent: #FF5764;

  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;

  --wrap: 1180px;
  --gutter: 20px;
  --section-y: 80px;
}

@media (min-width: 720px) {
  :root { --gutter: 40px; --section-y: 128px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 4px; transition: text-decoration-thickness .15s; }
a:hover { text-decoration-thickness: 3px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { margin: 0; font-weight: 500; color: var(--ink); }
h1, h2 { font-family: var(--serif); letter-spacing: -0.02em; }
h1 { font-size: clamp(2.6rem, 6.2vw, 5.5rem); line-height: 1.02; }
.hero h1 { font-size: clamp(1.3rem, 3.1vw, 2.75rem); }
h2 { font-size: clamp(2.1rem, 3.8vw, 3.3rem); line-height: 1.08; }
h3 { font-family: var(--sans); font-weight: 600; font-size: 1.125rem; line-height: 1.35; letter-spacing: -0.01em; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0; padding: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.block { padding: var(--section-y) 0; border-top: 1px solid var(--rule); }

/* small label above a heading; no decorative bars */
.kicker {
  margin: 0 0 20px;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-muted);
}

.lead { font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.6; color: var(--ink-soft); max-width: 40rem; }
.prose p { max-width: 40rem; }
.prose h3 { margin-top: 2.2em; margin-bottom: 0.6em; }
.note { font-size: 0.92rem; color: var(--ink-muted); }
.source { margin-top: 2.5em; font-size: 0.9rem; color: var(--ink-muted); max-width: 44rem; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--ink); color: var(--white); padding: 10px 14px; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--rule); background: var(--white); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; min-height: 80px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 28px; height: 28px; }
.brand-word { font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; }
.brand-open {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--ink); border-radius: 999px; padding: 2px 9px 1px;
}
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 26px; }
.site-nav a { text-decoration: none; font-size: 0.95rem; padding: 6px 0; display: inline-block; color: var(--ink-soft); }
.site-nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.site-nav .ext { color: var(--ink-muted); }

/* ---------- home ---------- */
.hero { padding-top: 72px; padding-bottom: 88px; }
@media (min-width: 720px) { .hero { padding-top: 120px; padding-bottom: 112px; } }
.hero h1 { max-width: 15ch; margin-bottom: 32px; }
.hero .lead { margin-bottom: 72px; }

.rail { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; border-top: 1px solid var(--rule-strong); }
.rail > div { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.rail dt { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.rail dd { margin: 0; font-size: 1.05rem; color: var(--ink); }
@media (min-width: 720px) {
  .rail { grid-template-columns: repeat(3, 1fr); }
  .rail > div { padding: 24px 32px 24px 0; border-bottom: 0; }
  .rail > div + div { padding-left: 32px; border-left: 1px solid var(--rule); }
}

.ways { list-style: none; margin-top: 8px; }
.ways li { display: grid; grid-template-columns: 48px 1fr; gap: 8px 16px; padding: 32px 0; border-top: 1px solid var(--rule); }
.ways li:last-child { border-bottom: 1px solid var(--rule); }
.ways .num { font-family: var(--serif); font-size: 1.8rem; line-height: 1.1; color: var(--ink-muted); }
.ways h3 a { text-decoration: none; }
.ways h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; }
.ways p { margin: 0; color: var(--ink-soft); max-width: 36rem; }
@media (min-width: 720px) { .ways li { grid-template-columns: 72px 1fr; padding: 40px 0; } }

.h2-tight { margin-bottom: 8px; }
.split { display: grid; grid-template-columns: 1fr; gap: 28px 80px; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 7fr; } }
.split > .prose { min-width: 0; }

.people { list-style: none; display: grid; grid-template-columns: 1fr; gap: 56px 40px; margin: 0; }
@media (min-width: 760px) { .people { grid-template-columns: repeat(3, 1fr); } }
.people figure { margin: 0; }
.portrait { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--tint); }
.people figcaption { margin-top: 22px; }
.people .name { font-family: var(--serif); font-size: 1.65rem; line-height: 1.15; display: block; letter-spacing: -0.01em; }
.people .role { display: block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin: 8px 0 14px; }
.people p { color: var(--ink-soft); margin: 0; }

/* ---------- inner pages ---------- */
.page-head { padding-top: 72px; padding-bottom: 72px; }
@media (min-width: 720px) { .page-head { padding-top: 112px; padding-bottom: 96px; } }
.page-head h1 { max-width: 16ch; margin-bottom: 32px; }

.ol-clean { list-style: none; counter-reset: item; }
.ol-clean > li { position: relative; padding: 22px 0 22px 48px; border-top: 1px solid var(--rule); max-width: 44rem; }
.ol-clean > li:last-child { border-bottom: 1px solid var(--rule); }
.ol-clean > li::before { counter-increment: item; content: counter(item, decimal-leading-zero); position: absolute; left: 0; top: 24px; font-family: var(--serif); font-size: 1.1rem; color: var(--ink-muted); }

.bullets { list-style: none; max-width: 44rem; }
.bullets > li { position: relative; padding: 12px 0 12px 22px; border-top: 1px solid var(--rule); color: var(--ink-soft); }
.bullets > li:last-child { border-bottom: 1px solid var(--rule); }
.bullets > li::before { content: ""; position: absolute; left: 0; top: 1.25em; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }

.two-col { display: grid; grid-template-columns: 1fr; gap: 48px 72px; }
@media (min-width: 800px) { .two-col { grid-template-columns: 1fr 1fr; } }
.two-col h3 { margin-bottom: 14px; }
.two-col .usual .bullets > li::before { background: var(--ink-muted); }

.timeline { margin: 0; max-width: 52rem; }
.timeline > div { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 24px 0; border-top: 1px solid var(--rule); }
.timeline > div:last-child { border-bottom: 1px solid var(--rule); }
.timeline dt { font-family: var(--serif); font-size: 1.4rem; color: var(--ink); }
.timeline dd { margin: 0; color: var(--ink-soft); }
@media (min-width: 720px) { .timeline > div { grid-template-columns: 200px 1fr; gap: 28px; } }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin: 0; border-top: 1px solid var(--rule-strong); }
.stats > div { padding: 26px 16px 26px 0; border-bottom: 1px solid var(--rule); }
.stats dt { font-family: var(--serif); font-size: clamp(2.3rem, 5vw, 3.5rem); line-height: 1; font-weight: 500; letter-spacing: -0.02em; }
.stats dd { margin: 12px 0 0; font-size: 0.95rem; color: var(--ink-soft); }
@media (min-width: 800px) { .stats { grid-template-columns: repeat(4, 1fr); } .stats > div + div { padding-left: 28px; border-left: 1px solid var(--rule); } }

.paper-cite { margin: 0 0 28px; padding: 4px 0 4px 24px; border-left: 2px solid var(--accent); max-width: 44rem; color: var(--ink-soft); font-size: 0.97rem; }
.paper-cite cite { font-style: normal; font-weight: 600; color: var(--ink); }

.link-row { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 26px 0 0; padding: 0; list-style: none; font-size: 0.95rem; }

.cta { font-weight: 600; }

/* people page */
.person { display: grid; grid-template-columns: 1fr; gap: 36px 64px; padding: var(--section-y) 0; border-top: 1px solid var(--rule); }
.person:first-of-type { border-top: 0; }
@media (min-width: 900px) { .person { grid-template-columns: 4fr 7fr; } }
.person .portrait { max-width: 420px; }
.person h2 { font-size: clamp(2.3rem, 4.2vw, 3.5rem); margin-bottom: 8px; }
.person .role { display: block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 24px; }
.person .bio { font-size: 1.12rem; line-height: 1.65; max-width: 40rem; color: var(--ink-soft); }
.person h3 { margin: 32px 0 10px; }
.person .bullets { margin-bottom: 4px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 36px 0 56px; font-size: 0.93rem; color: var(--ink-muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--ink); }
