/* =========================================================================
   WRR Lab @ UF/IFAS - project landing page theme
   Mirrors the design tokens used by the GenAI human-evaluation app so the
   /sr, /rgb2thermal and /GenAI pages feel like one site.
   ========================================================================= */

:root {
  --accent-blue: #0021a5;   /* UF blue   */
  --accent-blue-2: #87a8ff; /* light blue */
  --accent-orange: #fa4616; /* UF orange */
  --bg-dark: #121212;
  --bg-panel: #1e1e1e;
  --bg-elev: #181818;
  --text-main: #f5f5f5;
  --text-muted: #c8c8c8;
  --border: #3a3a3a;
  --font-heading: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --focus-ring: 0 0 0 3px #ffd152;
  --maxw: 1080px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-blue-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .5em;
}

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- Top navigation bar ------------------------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18, 18, 18, .85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar .container {
  display: flex; align-items: center; gap: 16px;
  height: 60px;
}
.topbar .brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-heading); font-weight: 700; color: var(--text-main);
  letter-spacing: .3px;
}
.topbar .brand img { height: 26px; width: auto; display: block; }
.topbar nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.topbar nav a {
  color: var(--text-muted); padding: 6px 12px; border-radius: 999px;
  font-family: var(--font-heading); font-size: 14px; font-weight: 600;
}
.topbar nav a:hover { color: var(--text-main); background: var(--bg-panel); text-decoration: none; }
.topbar nav a.active { color: #fff; background: var(--accent-blue); }

/* ---- Hero -------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  padding: 84px 0 64px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(1200px 420px at 15% -10%, rgba(0, 33, 165, .55), transparent 60%),
    radial-gradient(900px 380px at 95% 0%, rgba(250, 70, 22, .22), transparent 55%),
    var(--bg-dark);
}
.eyebrow {
  display: inline-block;
  font-family: var(--font-heading); font-weight: 700; font-size: 13px;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent-orange); margin-bottom: 14px;
}
.hero h1 { font-size: clamp(32px, 5vw, 56px); max-width: 18ch; }
.hero .lede {
  font-size: clamp(18px, 2.2vw, 22px); color: var(--text-muted);
  max-width: 60ch; margin: 18px 0 0;
}

/* author + affiliation rows */
.authors { margin: 26px 0 6px; font-size: 18px; }
.authors .person { white-space: nowrap; }
.authors .person sup { color: var(--accent-blue-2); }
.affil { color: var(--text-muted); font-size: 15px; margin-top: 4px; }
.affil sup { color: var(--accent-blue-2); }

/* action buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-heading); font-weight: 600; font-size: 15px;
  padding: 11px 18px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-panel); color: var(--text-main);
  cursor: pointer; transition: transform .08s ease, border-color .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); border-color: var(--accent-blue-2); }
.btn .ico { font-size: 16px; line-height: 1; }
.btn.primary { background: var(--accent-blue); border-color: var(--accent-blue); color: #fff; }
.btn.primary:hover { background: #0a2fc0; }
.btn.disabled,
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn .soon { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--accent-orange); border: 1px solid var(--accent-orange); border-radius: 999px;
  padding: 1px 7px; }

/* ---- Sections ---------------------------------------------------------- */
section { padding: 60px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }
.section-title {
  font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 10px;
}
.section-title .num { color: var(--accent-orange); margin-right: 12px; font-variant-numeric: tabular-nums; }
.section-sub { color: var(--text-muted); margin: 0 0 28px; max-width: 70ch; }
.prose p { color: #e4e4e4; max-width: 72ch; }
.prose p + p { margin-top: 1em; }

/* edit/placeholder helpers - tasteful, public-safe */
.tbd {
  display: inline-block; font-family: var(--font-heading); font-weight: 700;
  font-size: 11px; letter-spacing: .5px; text-transform: uppercase;
  color: var(--accent-orange); border: 1px dashed var(--accent-orange);
  border-radius: 999px; padding: 2px 9px; vertical-align: middle;
}
.placeholder {
  color: var(--text-muted); font-style: italic;
}

/* figure placeholder cards */
.fig-grid { display: grid; gap: 18px; }
.fig-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.fig-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.figure {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden;
}
.figure .frame {
  aspect-ratio: 16 / 10; display: grid; place-items: center; text-align: center;
  color: var(--text-muted);
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.018) 0 12px, transparent 12px 24px),
    var(--bg-panel);
  padding: 20px;
}
.figure .frame .ph-ico { font-size: 30px; opacity: .7; margin-bottom: 8px; }
.figure figcaption { padding: 12px 16px; font-size: 14px; color: var(--text-muted); border-top: 1px solid var(--border); }
.figure img { display: block; width: 100%; height: auto; }

/* cards / pillars */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 22px;
}
.card h3 { font-size: 19px; display: flex; align-items: center; gap: 10px; }
.card .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-orange); flex: none; }
.card p { color: var(--text-muted); font-size: 16px; margin: 0; }

/* metrics table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
table.metrics { width: 100%; border-collapse: collapse; font-size: 16px; min-width: 520px; }
table.metrics th, table.metrics td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); }
table.metrics thead th {
  background: var(--bg-elev); font-family: var(--font-heading); font-size: 14px;
  letter-spacing: .3px; color: var(--text-muted); text-transform: uppercase;
}
table.metrics tbody tr:last-child td { border-bottom: none; }
table.metrics tbody tr.ours { background: rgba(0, 33, 165, .14); }
table.metrics tbody tr.ours td:first-child { font-weight: 700; }
table.metrics td.num { font-variant-numeric: tabular-nums; }

/* callout */
.callout {
  display: flex; gap: 18px; align-items: flex-start;
  background: linear-gradient(120deg, rgba(0,33,165,.18), rgba(250,70,22,.10));
  border: 1px solid var(--border); border-left: 4px solid var(--accent-blue);
  border-radius: 14px; padding: 22px 24px;
}
.callout .c-ico { font-size: 26px; line-height: 1; }
.callout h3 { margin: 0 0 6px; font-size: 20px; }
.callout p { margin: 0 0 14px; color: var(--text-muted); }

/* citation block */
.cite-wrap { position: relative; }
pre.bibtex {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px;
  padding: 22px; overflow-x: auto; font-family: source-code-pro, Menlo, Consolas, monospace;
  font-size: 14px; line-height: 1.6; color: #dfe6ff; margin: 0;
}
.copy-btn {
  position: absolute; top: 12px; right: 12px;
  font-family: var(--font-heading); font-weight: 600; font-size: 13px;
  background: var(--bg-panel); color: var(--text-main); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px; cursor: pointer;
}
.copy-btn:hover { border-color: var(--accent-blue-2); }

/* ---- Footer ------------------------------------------------------------ */
footer.site {
  background: var(--bg-elev); padding: 40px 0; border-top: 1px solid var(--border);
}
footer.site .container { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
footer.site img.logo { height: 46px; width: auto; background: #fff; padding: 8px 12px; border-radius: 8px; }
footer.site .foot-text { color: var(--text-muted); font-size: 14px; max-width: 56ch; }
footer.site a { color: var(--accent-blue-2); }

/* ---- Inline SVG icons -------------------------------------------------- */
.icon {
  width: 1.05em; height: 1.05em; display: inline-block; vertical-align: -0.18em;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; flex: none;
}
.btn .icon { width: 18px; height: 18px; }
.brand .icon { width: 22px; height: 22px; stroke: var(--accent-blue-2); }

/* ---- Interactive demo / model viewer ----------------------------------- */
.demo { background:
    radial-gradient(900px 360px at 80% -20%, rgba(0,33,165,.20), transparent 60%),
    var(--bg-dark); }
.demo .section-title { margin-bottom: 8px; }
.demo-toolbar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  margin: 18px 0 22px;
}
.model-chip {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 16px; font-size: 14px; color: var(--text-muted);
}
.model-chip b { color: var(--text-main); font-family: var(--font-heading); }
.model-chip .icon { color: var(--accent-orange); }
.demo-toolbar .spacer { margin-left: auto; }

.viewer-main { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.vpanel { margin: 0; }
.vframe {
  position: relative; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden;
  background: #0c0c0c; border: 1px solid var(--border);
  display: grid; place-items: center;
}
.vframe img { width: 100%; height: 100%; object-fit: contain; display: block; }
.vframe .pending {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  gap: 8px; color: var(--text-muted); padding: 24px;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.02) 0 12px, transparent 12px 24px),
    var(--bg-panel);
}
.vframe .pending .icon { width: 30px; height: 30px; opacity: .7; margin: 0 auto; color: var(--accent-blue-2); }
.vpanel figcaption {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  padding: 10px 4px 0; font-size: 14px; color: var(--text-muted);
}
.vpanel figcaption .tag {
  font-family: var(--font-heading); font-size: 11px; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase; color: var(--accent-blue-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px;
}
.viewer-meta {
  margin: 14px 0 22px; color: var(--text-muted); font-size: 15px;
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
}
.viewer-meta .name { color: var(--text-main); font-family: var(--font-heading); font-weight: 600; }

.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}
.thumb {
  position: relative; aspect-ratio: 16 / 11; border-radius: 9px; overflow: hidden;
  border: 2px solid var(--border); cursor: pointer; background: #0c0c0c; padding: 0;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { border-color: var(--accent-blue-2); }
.thumb.active { border-color: var(--accent-orange); box-shadow: 0 0 0 2px rgba(250,70,22,.35); }
.thumb .cap {
  position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.78)); padding: 10px 6px 4px;
  text-align: left; line-height: 1.25;
}
.demo-note { color: var(--text-muted); font-size: 14px; margin-top: 16px; }

/* access / availability section */
.access-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.access-row .btn[disabled],
.access-row .btn[aria-disabled="true"] { opacity: .6; cursor: default; }

/* ---- Responsive -------------------------------------------------------- */
@media (max-width: 820px) {
  body { font-size: 17px; }
  .fig-grid.cols-2, .fig-grid.cols-3, .cards { grid-template-columns: 1fr; }
  .viewer-main { grid-template-columns: 1fr; }
  .topbar .brand span.full { display: none; }
}
@media (max-width: 560px) {
  .hero { padding: 60px 0 48px; }
  section { padding: 46px 0; }
  .topbar nav { gap: 2px; }
  .topbar nav a { padding: 6px 9px; font-size: 13px; }
}
