/* Project page layout for FuriosaAI AI Research (AIR).
   Brand tokens and fonts come from colors_and_type.css. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #FFFFFF; color: #444444; font-family: var(--font-sans); }
a { color: #151515; }
a:hover { color: #B01500; }
img { max-width: 100%; }

.container { max-width: 1040px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.container--narrow { max-width: 800px; }

/* ---------- Header ---------- */
.topbar { background: #FFFFFF; border-bottom: 1px solid #D4D4D4; }
.topbar__inner { padding-top: 16px; padding-bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { height: 18px; width: auto; }
.brand span { font-size: 13px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: #444444; border-left: 1px solid #D4D4D4; padding-left: 14px; }
.topnav { display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 14px; font-weight: 500; }
.topnav a { text-decoration: none; color: #444444; padding: 10px 0; }
.topnav a:hover { color: #E21500; }

/* ---------- Buttons ---------- */
.btn { font-family: var(--font-sans); font-size: 14px; font-weight: 700; letter-spacing: 0.01em; padding: 12px 24px; border: 1.5px solid transparent; border-radius: 9999px; display: inline-flex; align-items: center; gap: 8px; line-height: 1; text-decoration: none; transition: background .16s, color .16s, border-color .16s; }
.btn svg { width: 16px; height: 16px; }
.btn--primary { background: #E21500; border-color: #E21500; color: #FFFFFF; }
.btn--primary:hover { background: #B01500; border-color: #B01500; color: #FFFFFF; }
.btn--secondary { background: #000000; border-color: #000000; color: #FFFFFF; }
.btn--secondary:hover { background: #1B0333; border-color: #1B0333; color: #FFFFFF; }
.btn--ghost { background: transparent; border-color: #444444; color: #444444; }
.btn--ghost:hover { border-color: #E21500; color: #E21500; }

/* ---------- Hero ---------- */
.hero { padding-top: 88px; padding-bottom: 48px; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: #444444; }
.hero h1 { margin: 0; overflow-wrap: anywhere; max-width: 20ch; font-size: clamp(36px, 5vw, 60px); font-weight: 700; line-height: 1.05; letter-spacing: -0.025em; color: #151515; }
.hero__people { display: flex; flex-direction: column; gap: 8px; max-width: 820px; }
.hero__authors { margin: 0; font-size: 18px; line-height: 1.6; color: #151515; }
.hero__affiliations { margin: 0; font-size: 15px; line-height: 1.5; color: #444444; }
.hero__affiliations span + span { margin-left: 1em; }
.hero__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }

/* ---------- Teaser ---------- */
.teaser { padding-bottom: 64px; display: flex; flex-direction: column; gap: 16px; }
.teaser img { display: block; width: 100%; height: auto; border: 1px solid #D4D4D4; }
.teaser__caption { margin: 0; font-size: 15px; line-height: 1.55; color: #444444; text-align: center; }
.teaser__caption strong { color: #151515; }
.placeholder { aspect-ratio: 16 / 7; width: 100%; background: #F4F4F4; border: 1px dashed #7F7F7F; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; }
.placeholder strong { font-size: 15px; color: #151515; }
.placeholder p { margin: 0; max-width: 52ch; font-size: 14px; line-height: 1.5; }

/* ---------- Key numbers ---------- */
.stats-wrap { padding-bottom: 80px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border-top: 1px solid #D4D4D4; border-bottom: 1px solid #D4D4D4; }
.stat { padding: 28px 20px; display: flex; flex-direction: column; gap: 8px; text-align: center; }
.stat__value { font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; color: #151515; }
.stat__label { margin: 0; font-size: 14px; line-height: 1.45; }

/* ---------- Sections ---------- */
.section { background: #FFFFFF; }
.section--ruled { border-top: 1px solid #D4D4D4; }
.section--muted { background: #F4F4F4; border-top: 1px solid #D4D4D4; border-bottom: 1px solid #D4D4D4; }
.section__inner { padding-top: 88px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 32px; }
.section__inner--top-flush { padding-top: 0; }
.section__head { display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.section h2 { margin: 0; overflow-wrap: anywhere; font-size: 32px; font-weight: 700; line-height: 1.15; color: #151515; }
.section__lede { margin: 0; max-width: 64ch; font-size: 17px; line-height: 1.6; }
.prose { display: flex; flex-direction: column; gap: 16px; font-size: 17px; line-height: 1.65; }
.prose p { margin: 0; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 16px; }
.grid--steps { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.grid--cards { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--code { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: #FFFFFF; border: 1px solid #D4D4D4; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.card h3 { margin: 0; font-size: 18px; font-weight: 700; color: #151515; }
.card p { margin: 0; font-size: 15px; line-height: 1.55; }
.card__step { font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: #E21500; }
.grid--steps .card { padding: 24px 22px; }
.grid--steps .card h3 { font-size: 19px; }

.callout { background: #FFFFFF; border: 1px solid #D4D4D4; padding: 28px; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.callout__label { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.callout__equation { margin: 0; font-size: 26px; line-height: 1.3; color: #151515; font-family: "Times New Roman", serif; }
.callout p:last-child { margin: 0; max-width: 64ch; font-size: 15px; line-height: 1.55; }

/* ---------- Code excerpts ---------- */
.code-card { border: 1px solid #D4D4D4; display: flex; flex-direction: column; min-width: 0; }
.code-card__head { padding: 14px 18px; border-bottom: 1px solid #D4D4D4; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.code-card__name { font-family: var(--font-mono); font-size: 14px; font-weight: 500; color: #151515; }
.code-card__meta { font-size: 12px; }
.code-card__body { overflow-x: auto; background: #F4F4F4; }
.code-card__body pre { margin: 0; padding: 18px; background: #F4F4F4; border: 0; border-radius: 0; font-family: var(--font-mono); font-size: 13px; line-height: 1.65; color: #444444; white-space: pre; }
.code-card__note { margin: 0; padding: 14px 18px; font-size: 14px; line-height: 1.5; }

/* ---------- Results table ---------- */
.table-wrap { overflow-x: auto; border-top: 2px solid #151515; border-bottom: 2px solid #151515; }
.table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; padding: 14px 16px; font-size: 13px; font-weight: 700; color: #151515; border-bottom: 1px solid #D4D4D4; }
.table td { padding: 12px 16px; border-bottom: 1px solid #D4D4D4; }
.table td:first-child { color: #151515; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: 0; }
.table tr.is-ours { background: #F4F4F4; }
.table tr.is-ours td { padding-top: 14px; padding-bottom: 14px; color: #151515; }
.table tr.is-ours td:first-child, .table tr.is-ours .num { font-weight: 700; }
.table tr.is-ours .num { color: #B01500; }
.table-note { margin: 0; font-size: 14px; line-height: 1.5; text-align: center; }

/* ---------- Dataset / resource card ---------- */
.resource { background: #FFFFFF; border: 1px solid #D4D4D4; display: flex; flex-wrap: wrap; }
.resource__summary { flex: 1 1 300px; min-width: 0; padding: 28px; border-right: 1px solid #D4D4D4; display: flex; flex-direction: column; gap: 16px; }
.resource__summary h3 { margin: 0; font-family: var(--font-mono); font-size: 18px; font-weight: 500; color: #151515; overflow-wrap: anywhere; }
.resource__summary p { margin: 0; font-size: 15px; line-height: 1.55; }
.resource__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.resource__facts { flex: 2 1 420px; min-width: 0; }
.resource__facts dl { margin: 0; display: grid; grid-template-columns: minmax(120px, 0.6fr) minmax(0, 1.4fr); }
.resource__facts dt, .resource__facts dd { margin: 0; padding: 14px 20px; border-bottom: 1px solid #D4D4D4; font-size: 14px; }
.resource__facts dt { font-weight: 700; color: #151515; }
.resource__facts dt:nth-last-of-type(1), .resource__facts dd:last-of-type { border-bottom: 0; }
.resource__facts .mono { font-family: var(--font-mono); font-size: 13px; }

/* ---------- BibTeX ---------- */
.bibtex { position: relative; overflow-x: auto; background: #F4F4F4; border: 1px solid #D4D4D4; }
.bibtex pre { margin: 0; padding: 24px 28px; background: #F4F4F4; border: 0; border-radius: 0; color: #151515; font-family: var(--font-mono); font-size: 14px; line-height: 1.7; white-space: pre; }
.bibtex__copy { position: absolute; top: 12px; right: 12px; font-family: var(--font-sans); font-size: 12px; font-weight: 700; padding: 7px 12px; border: 1px solid #D4D4D4; border-radius: 9999px; background: #FFFFFF; color: #444444; cursor: pointer; }
.bibtex__copy:hover { border-color: #E21500; color: #E21500; }

/* ---------- Footer ---------- */
.footer { background: #FFFFFF; border-top: 1px solid #D4D4D4; }
.footer__inner { padding-top: 32px; padding-bottom: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; font-size: 14px; }
.footer__brand { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.footer__brand img { height: 16px; width: auto; }

@media (max-width: 720px) {
  .resource__summary { border-right: 0; border-bottom: 1px solid #D4D4D4; }
}
