/* =========================================================
   KarenFerrero.com — landing page ("model card") styles
   ---------------------------------------------------------
   The landing page reads like an AI model card: a clean
   documentation page with one highlighter-yellow accent.
   Colors and fonts live in :root below; change them once here.
   (The hidden inner pages use styles.css, not this file.)
   ========================================================= */

:root {
  /* Colors */
  --paper: #ffffff;        /* page */
  --ink: #111114;          /* headings, values, primary text */
  --ink-2: #3f3f46;        /* body text */
  --ink-3: #5b5b66;        /* labels, metadata (6.6:1 on white) */
  --rule: #e4e4e7;         /* hairline dividers and outlines */
  --chip: #f4f4f5;         /* tag and control fills */
  --well: #f7f7f8;         /* code blocks, output wells */
  --hi: #ffd21e;           /* highlighter yellow: the one accent */
  --hi-edge: #e3b500;      /* yellow outline */
  --hi-soft: #fff6cc;      /* row highlight */
  --code-key: #6d28d9;     /* code keywords (6.4:1 on --well) */
  --code-str: #8a4500;     /* code strings (6.7:1 on --well) */

  /* Type */
  --sans: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* Layout */
  --shell: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --side: 360px;
  --radius: 14px;
  --radius-sm: 10px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: #d4d4d8 transparent; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--hi); color: var(--ink); }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 1em; }
h1, h2, h3 { color: var(--ink); margin: 0; text-wrap: balance; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 6px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--hi); color: var(--ink); font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; }

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 var(--gutter); }

/* Line icons (one stroke system everywhere) */
.btn svg, .panel__title svg, .contact-icon__circle svg, .icon-btn svg, .copy-btn svg {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.contact-icon__circle svg.fill { fill: currentColor; stroke: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 18px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font: 700 16px/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn--primary { background: var(--hi); border-color: var(--hi-edge); color: var(--ink); box-shadow: 0 1px 2px rgba(17,17,20,.08); }
.btn--primary:hover { background: #ffdc4f; box-shadow: 0 6px 16px -8px rgba(17,17,20,.35); }
.btn--ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #2a2a31; }
.btn--ghost { background: transparent; border-color: var(--rule); color: var(--ink); }
.btn--ghost:hover { background: var(--chip); }
.btn--small { min-height: 40px; padding: 8px 14px; font-size: 15px; }
.btn--block { width: 100%; }

/* ---------- Top bar (repository path) ---------- */
.repo-bar { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--rule); backdrop-filter: saturate(160%) blur(8px); -webkit-backdrop-filter: saturate(160%) blur(8px); }
.repo-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.repo-path { display: flex; align-items: center; gap: 8px; margin: 0; min-width: 0; font: 500 15px/1.2 var(--mono); color: var(--ink-3); }
.kf-mark { width: 28px; height: 28px; flex: none; margin-right: 4px; }
.repo-path__slash { color: #a1a1aa; }
.repo-path__name { color: var(--ink); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Page grid ---------- */
.card-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--side);
  grid-template-areas: "intro side" "body side";
  column-gap: clamp(32px, 5vw, 72px);
  padding-top: clamp(40px, 6vw, 72px);
}
.intro { grid-area: intro; }
.side { grid-area: side; align-self: start; display: grid; gap: 16px; }
.body { grid-area: body; }
@media (min-width: 961px) and (min-height: 860px) { .side { position: sticky; top: 88px; } }
@media (max-width: 960px) {
  .card-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "side" "body"; }
  .side { margin-top: 32px; }
}

/* ---------- Model name + tags ---------- */
.intro h1 {
  font: 700 clamp(2.25rem, 1.8rem + 2vw, 3.5rem)/1.05 var(--sans);
  letter-spacing: -0.025em;
}
.intro__tagline { margin: 18px 0 0; max-width: 40ch; font: 500 clamp(1.3rem, 1.1rem + .7vw, 1.7rem)/1.3 var(--sans); letter-spacing: -0.01em; color: var(--ink); }
.tags { margin: 28px 0 0; display: grid; gap: 10px; }
.tags__row { display: grid; grid-template-columns: 84px 1fr; align-items: start; gap: 12px; }
.tags dt { padding-top: 6px; font: 600 14px/1.3 var(--sans); color: var(--ink-3); }
.tags dd { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; padding: 5px 11px; border: 1px solid var(--rule); border-radius: 8px; background: var(--chip); font: 500 14.5px/1.35 var(--sans); color: var(--ink); }
.tag--hi { background: var(--hi); border-color: var(--hi-edge); font-weight: 700; }
@media (max-width: 480px) {
  .tags { gap: 8px; margin-top: 22px; }
  .tags__row { grid-template-columns: 64px 1fr; gap: 8px; }
  .tags dt { padding-top: 3px; font-size: 13px; }
  .tags dd { gap: 6px; }
  .tag { padding: 3px 8px; font-size: 13.5px; }
}

/* ---------- Sidebar panels ---------- */
.panel { padding: 20px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
.panel--profile { display: grid; grid-template-columns: 104px 1fr; gap: 16px; align-items: center; }
.profile-photo { width: 104px; aspect-ratio: 104 / 126; object-fit: cover; border-radius: var(--radius-sm); background: var(--chip); }
.profile-links { display: flex; justify-content: center; gap: 22px; margin-top: 10px; }
.profile-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px;
  font: 500 14.5px/1.2 var(--sans); color: var(--ink-2); text-decoration: none;
  text-underline-offset: 3px; transition: color .15s ease;
}
.profile-link:hover { color: var(--ink); text-decoration: underline; }
.profile-link svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.profile-link svg.fill { fill: currentColor; stroke: none; }
.panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel__title { display: flex; align-items: center; gap: 8px; font: 700 16px/1.2 var(--sans); }
.panel__title svg { width: 18px; height: 18px; }
.panel__meta { font: 500 12px/1.2 var(--mono); color: var(--ink-3); text-align: right; }
section.panel > .panel__title { margin-bottom: 8px; }

/* Inference widget */
.inference__label { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.inference__prompts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.prompt {
  min-height: 36px; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 8px;
  background: var(--paper); font: 500 14px/1.3 var(--sans); color: var(--ink); cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.prompt:hover { background: var(--chip); }
.prompt[aria-pressed="true"] { background: var(--hi); border-color: var(--hi-edge); color: var(--ink); font-weight: 700; }
.inference__query { margin: 0 0 8px; font: 500 13.5px/1.4 var(--mono); color: var(--ink); }
.inference__caret { color: var(--ink-3); }
.inference__meta { margin: 8px 0 0; font: 500 12px/1.3 var(--mono); color: var(--ink-3); }
.inference__output {
  display: block; min-height: 9.5em; padding: 14px 16px;
  border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--well);
  font: 400 15.5px/1.55 var(--sans); color: var(--ink);
}
.inference__output.is-streaming::after {
  content: ""; display: inline-block; width: .55em; height: 1.05em; margin-left: 2px; vertical-align: -0.15em;
  background: var(--hi); border-radius: 2px; animation: caret 0.9s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* Key/value metadata */
.meta { margin: 0; display: grid; }
.meta > div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); }
.meta > div:first-child { border-top: 0; padding-top: 4px; }
.meta dt { font-size: 14px; line-height: 1.45; color: var(--ink-3); }
.meta dd { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink); }
.meta--wide > div { grid-template-columns: 200px 1fr; padding: 14px 0; }
.meta--wide > div:first-child { padding-top: 14px; border-top: 1px solid var(--rule); }
.meta--wide dt { font-size: 15px; font-weight: 600; color: var(--ink); }
.meta--wide dd { font-size: 16px; color: var(--ink-2); }
@media (max-width: 640px) { .meta--wide > div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Document sections ---------- */
.body { padding-top: clamp(40px, 5vw, 64px); }
.doc { padding-top: 28px; border-top: 1px solid var(--rule); }
.doc + .doc { margin-top: clamp(48px, 5vw, 64px); }
.doc h2 { margin-bottom: 14px; font: 800 clamp(1.5rem, 1.3rem + .6vw, 1.85rem)/1.15 var(--sans); letter-spacing: -0.02em; }
.doc p { max-width: 68ch; }
.doc__lead { font-size: clamp(1.15rem, 1.05rem + .35vw, 1.35rem); line-height: 1.45; font-weight: 600; color: var(--ink); }

/* Evaluation results table */
.table-scroll { overflow-x: auto; }
.eval { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.eval th, .eval td { padding: 14px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: baseline; }
.eval thead th { padding-top: 6px; font: 600 13.5px/1.3 var(--sans); color: var(--ink-3); border-bottom-color: var(--ink); }
.eval tbody th { font: 600 16.5px/1.35 var(--sans); color: var(--ink); }
.eval tbody td { font-size: 15.5px; color: var(--ink-2); }
.eval .num { text-align: right; white-space: nowrap; }
.eval tbody .num { font: 700 clamp(1.25rem, 1.1rem + .5vw, 1.5rem)/1 var(--mono); color: var(--ink); letter-spacing: -0.02em; }
.eval tbody tr { transition: background-color .15s ease; }
.eval tbody tr:hover { background: var(--hi-soft); }
.eval th:first-child, .eval td:first-child { padding-left: 4px; }
.eval .num:last-child { padding-right: 4px; }
@media (max-width: 560px) {
  .eval thead { display: none; }
  .eval tr { display: grid; grid-template-columns: 1fr auto; column-gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--rule); }
  .eval th, .eval td, .eval th:first-child, .eval td:first-child, .eval .num:last-child { padding: 0; border: 0; }
  .eval tbody th { grid-column: 1; }
  .eval tbody td:not(.num) { grid-column: 1; font-size: 14.5px; color: var(--ink-3); }
  .eval tbody td.num { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}

/* Intended use (roles) */
.uses { margin: 8px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.uses > div { padding: 16px 0; border-top: 1px solid var(--rule); }
.uses dt { font: 700 17px/1.3 var(--sans); color: var(--ink); }
.uses dd { margin: 6px 0 0; font-size: 15.5px; line-height: 1.55; }
@media (max-width: 720px) { .uses { grid-template-columns: 1fr; } }

/* Human evaluations (testimonial carousel) */
.carousel { margin-top: 20px; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--rule); border-radius: var(--radius); }
.carousel__viewport { display: block; }
.quote { margin: 0; display: none; }
.quote.is-active { display: block; animation: quote-in .45s cubic-bezier(.16,1,.3,1); }
@keyframes quote-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.quote blockquote { margin: 0 0 18px; font: 500 clamp(1.2rem, 1.05rem + .6vw, 1.5rem)/1.45 var(--sans); letter-spacing: -0.01em; color: var(--ink); }
.quote blockquote p { margin: 0; max-width: 60ch; }
.quote figcaption { font-size: 15px; color: var(--ink-3); }
.quote figcaption strong { color: var(--ink); font-weight: 700; margin-right: 6px; }
.carousel__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--rule); }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink); cursor: pointer; transition: background-color .15s ease; }
.icon-btn:hover { background: var(--chip); }
.icon-btn svg { width: 18px; height: 18px; }
.carousel__dots { display: flex; gap: 2px; }
.carousel__dots button { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.carousel__dots button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); transition: background-color .2s, transform .2s, box-shadow .2s; }
.carousel__dots button[aria-current="true"]::before { background: var(--hi); box-shadow: 0 0 0 2px var(--ink); transform: scale(1.3); }
.carousel__status { margin-left: auto; font: 500 13px/1 var(--mono); color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .quote.is-active { animation: none; } }
.no-js .carousel__viewport { display: block; }
.no-js .quote { display: block; margin-bottom: 28px; }
.no-js .carousel__controls { display: none; }

/* Code blocks */
.code {
  margin: 18px 0 0; padding: 18px 20px; overflow-x: auto;
  border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--well);
  font: 400 14.5px/1.7 var(--mono); color: var(--ink); tab-size: 4;
}
.code code { font: inherit; }
.tok-k { color: var(--code-key); font-weight: 700; }
.tok-s { color: var(--code-str); }
.tok-c { color: var(--ink-3); font-style: italic; }

/* Contact icons */
.contact-icons { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 24px 32px; }
.contact-icon { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 112px; text-align: center; text-decoration: none; color: var(--ink); }
.contact-icon__circle { display: grid; place-items: center; width: 60px; height: 60px; border: 1px solid var(--rule); border-radius: 50%; background: var(--paper); transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease; }
.contact-icon__circle svg { width: 24px; height: 24px; }
.contact-icon--primary .contact-icon__circle { background: var(--hi); border-color: var(--hi-edge); }
.contact-icon__label { font-size: 14px; line-height: 1.35; color: var(--ink-3); }
a.contact-icon:hover .contact-icon__circle { background: var(--ink); border-color: var(--ink); color: var(--paper); transform: translateY(-2px); }
a.contact-icon:hover .contact-icon__label { color: var(--ink); }
a.contact-icon:focus-visible { outline-offset: 6px; border-radius: 12px; }
@media (prefers-reduced-motion: reduce) { .contact-icon__circle { transition: none; } a.contact-icon:hover .contact-icon__circle { transform: none; } }

/* Citation + copy button */
.cite { position: relative; }
.cite .code { padding-right: 112px; }
.copy-btn {
  position: absolute; top: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--paper);
  font: 600 14px/1 var(--sans); color: var(--ink); cursor: pointer;
}
.copy-btn:hover { background: var(--chip); }
.copy-btn svg { width: 16px; height: 16px; }
.copy-btn.is-done { background: var(--hi); border-color: var(--hi-edge); }

/* ---------- Footer ---------- */
.foot { margin-top: clamp(72px, 9vw, 120px); border-top: 1px solid var(--rule); }
.foot__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 24px; padding-bottom: 28px; font-size: 14px; color: var(--ink-3); }
.foot p { margin: 0; }
.foot__legal { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot__legal a{ color: var(--ink-3); font-size: 14px; }
.foot__legal a:hover { color: var(--ink); }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .repo-path__owner, .repo-path__slash { display: none; }
  .repo-path { font-size: 13px; gap: 6px; }
  .kf-mark { width: 24px; height: 24px; margin-right: 2px; }
  .repo-bar .btn--small { white-space: nowrap; padding: 8px 12px; font-size: 14px; }
  .panel__head { flex-wrap: wrap; }
  .panel__meta { text-align: left; }
  .panel--profile { grid-template-columns: 88px 1fr; }
  .profile-photo { width: 88px; }
  .cite .code { padding-right: 16px; padding-top: 58px; }
  .code { padding: 16px; font-size: 13px; }
}

@media print {
  .repo-bar, .carousel__controls, .copy-btn { display: none !important; }
}
