/* ============================================
   RAD-LAD Project Page — Brutalist Theme
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- Custom Properties ---------- */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --bg-card: #ffffff;
  --bg-hero: #000000;
  --border-subtle: #e0e0e0;
  --border-accent: #000000;

  --text-primary: #000000;
  --text-secondary: #333333;
  --text-muted: #777777;
  --text-hero: #ffffff;
  --text-hero-sub: #999999;

  --accent: #0047ff;
  --accent-hover: #0033cc;
  --accent-light: rgba(0, 71, 255, 0.05);
  --accent-tag: #0047ff;

  --accent-orange: #ff6600;
  --accent-orange-hover: #e55a00;
  --accent-green: #00bfa5;

  --content-width: min(90%, 1200px);
  --content-width-wide: min(94%, 1400px);
  --section-gap: 5rem;
  --radius: 0px;
  --radius-sm: 0px;
  --radius-lg: 0px;

  --font-heading: 'Space Grotesk', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

/* ---------- Container ---------- */
.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--wide {
  max-width: var(--content-width-wide);
}

/* ---------- Utility ---------- */
section {
  padding: var(--section-gap) 0;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--text-primary);
}

/* ---------- Links ---------- */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* ============================================
   HERO — black contrast block
   ============================================ */
.hero {
  padding: 5rem 0 3.5rem;
  text-align: center;
  background: var(--bg-hero);
  color: var(--text-hero);
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.hero__title span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.36em;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--text-hero-sub);
  margin-top: 1rem;
  line-height: 1.5;
  text-transform: none;
}

.hero__authors {
  margin: 1.8rem 0 0.4rem;
  font-size: 1.05rem;
  color: var(--text-hero-sub);
  font-weight: 400;
  line-height: 1.8;
}

.hero__authors a {
  color: var(--text-hero);
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.hero__authors a:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.hero__affiliations {
  font-size: 0.88rem;
  color: var(--text-hero-sub);
  margin-bottom: 2rem;
  font-style: normal;
  font-weight: 300;
}

.hero__affiliations sup {
  color: var(--accent-orange);
  font-style: normal;
  font-weight: 600;
}

/* Buttons */
.hero__buttons {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.8rem;
  border-radius: 0;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: var(--text-hero);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn:hover {
  background: #fff;
  border-color: #fff;
  color: #000;
}

.btn--primary {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  color: #fff;
}

.btn--primary:hover {
  background: #fff;
  border-color: #fff;
  color: var(--accent-orange);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ============================================
   VIDEO MOSAIC — full-bleed edge-to-edge
   ============================================ */
.video-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  line-height: 0;
}

.video-mosaic video {
  width: 100%;
  display: block;
  background: #000;
}

.video-mosaic__caption {
  text-align: center;
  color: var(--accent-orange);
  font-size: 0.88rem;
  padding: 1.2rem 1.5rem;
  line-height: 1.6;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.01em;
  background: #000;
  text-shadow: 0 0 8px rgba(255, 102, 0, 0.6), 0 0 20px rgba(255, 102, 0, 0.3);
}

/* ============================================
   OVERVIEW VIDEO
   ============================================ */
.overview-video {
  background: var(--bg-primary);
}

.overview-video__embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  /* 16:9 */
  height: 0;
  overflow: hidden;
  border: 2px solid var(--text-primary);
}

.overview-video__embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ============================================
   ABSTRACT
   ============================================ */
.abstract {
  background: var(--bg-primary);
}

.abstract__text {
  font-size: 1.04rem;
  line-height: 1.85;
  color: var(--text-secondary);
  text-align: justify;
}

/* ============================================
   OVERVIEW (Key Insight) — 2×2 Grid
   ============================================ */
.insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.insight-card {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  padding: 1.8rem;
  position: relative;
  transition: border-color 0.2s ease;
}

.insight-card:hover {
  border-color: var(--accent-green);
}

.insight-card__number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--border-subtle);
  line-height: 1;
  display: block;
  margin-bottom: 0.6rem;
  letter-spacing: -0.03em;
}

.insight-card:hover .insight-card__number {
  color: var(--accent-green);
  transition: color 0.2s ease;
}

.insight-card__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.insight-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.overview__points li {
  padding: 0.4rem 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.overview__points li strong {
  color: var(--text-primary);
}

/* ============================================
   METHOD — Two-Column Cards
   ============================================ */
.method__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.method__card {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: 0;
  padding: 2rem;
  transition: border-color 0.15s ease;
}

.method__card:hover {
  border-color: var(--accent);
  box-shadow: none;
}

.method__card h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.method__card .method__tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-tag);
  margin-bottom: 0.6rem;
  display: inline-block;
  border: 1.5px solid var(--accent);
  padding: 0.15rem 0.5rem;
}

.method__card p,
.method__card ul {
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.7;
}

.method__card ul {
  padding-left: 1.2rem;
  margin-top: 0.5rem;
}

.method__card ul li {
  margin-bottom: 0.3rem;
}

.method__card ul li strong {
  color: var(--text-primary);
}

.method__card img,
.method__figure {
  max-width: 100%;
  border-radius: 0;
  margin-top: 1rem;
  border: 2px solid var(--border-subtle);
}

.method__figure-caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.4rem;
  line-height: 1.4;
}

/* Hybrid card spans full width */
.method__hybrid {
  grid-column: 1 / -1;
}

/* ============================================
   RESULTS — Tables
   ============================================ */
.results__table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 0;
  border: 2px solid var(--border-subtle);
  background: var(--bg-card);
}

.results__table-wrapper+.results__table-wrapper {
  margin-top: 2rem;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  white-space: nowrap;
}

.results-table caption {
  text-align: left;
  padding: 1rem 1.2rem 0.8rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--text-primary);
  caption-side: top;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.results-table thead th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 700;
  padding: 0.65rem 1rem;
  text-align: center;
  border-bottom: 2px solid var(--text-primary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.results-table thead th:first-child,
.results-table thead th:nth-child(2) {
  text-align: left;
}

.results-table tbody td {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
  color: var(--text-secondary);
}

.results-table tbody td:first-child,
.results-table tbody td:nth-child(2) {
  text-align: left;
}

.results-table tbody tr:hover {
  background: var(--accent-light);
}

.results-table .row-ours td {
  color: var(--text-primary);
  font-weight: 600;
  background: var(--accent-light);
}

.results-table .row-expert td {
  color: var(--text-muted);
  font-style: italic;
}

.results-table .row-separator td {
  border-bottom: 2px solid var(--text-primary);
}

.best-value {
  font-weight: 700;
  color: var(--accent) !important;
}

/* ---------- Collapsible Detail Tables ---------- */
.results__detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.results__detail-grid--main {
  grid-template-columns: 1fr;
}

.results__collapsible {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: 0;
  overflow: hidden;
}

.results__collapsible summary {
  padding: 1.2rem 1.5rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: background 0.15s ease;
}

.results__collapsible summary::-webkit-details-marker {
  display: none;
}

.results__collapsible summary::after {
  content: '→ EXPAND';
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-top: 0.5rem;
}

.results__collapsible[open] summary::after {
  content: '← COLLAPSE';
}

.results__collapsible summary:hover {
  background: var(--bg-secondary);
}

.results__collapsible-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.results__collapsible-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.results__collapsible .results__table-wrapper {
  margin: 0;
  border: none;
  border-top: 2px solid var(--text-primary);
  border-radius: 0;
}

/* ============================================
   BIBTEX
   ============================================ */
.bibtex {
  background: var(--bg-secondary);
  border-top: 3px solid var(--text-primary);
  border-bottom: 3px solid var(--text-primary);
}

.bibtex__block {
  background: var(--bg-card);
  border: 2px solid var(--text-primary);
  border-radius: 0;
  padding: 1.5rem;
  position: relative;
  overflow-x: auto;
}

.bibtex__block pre {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre;
}

.bibtex__copy-btn {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: var(--text-primary);
  border: 2px solid var(--text-primary);
  color: #fff;
  padding: 0.35rem 0.85rem;
  border-radius: 0;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bibtex__copy-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 2.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.83rem;
  line-height: 1.8;
  border-top: 3px solid var(--text-primary);
}

.footer a {
  color: var(--accent);
}

/* ============================================
   SCROLL REVEAL ANIMATION
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   COMING SOON TOAST
   ============================================ */
.btn--coming-soon {
  border-style: dashed;
  font-family: var(--font-body);
}

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--text-primary);
  color: #fff;
  padding: 0.75rem 1.6rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 9999;
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.35s ease;
  pointer-events: none;
  border: 2px solid var(--accent-orange);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.toast.toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast svg {
  stroke: var(--accent-orange);
  flex-shrink: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .hero {
    padding: 3.5rem 0 2rem;
  }

  .method__grid {
    grid-template-columns: 1fr;
  }

  .insight-grid {
    grid-template-columns: 1fr;
  }

  .results__detail-grid {
    grid-template-columns: 1fr;
  }

  .hero__buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .overview__callout {
    padding: 1.3rem;
  }

  section {
    padding: 2.5rem 0;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 1.8rem;
  }

  .results-table {
    font-size: 0.78rem;
  }
}