/* ---------- Base ---------- */
:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #666;
  --accent: #1f3a5f;
  --accent-hover: #2c4f7f;
  --border: #e5e5e5;
  --soft: #f7f7f8;
  --code-bg: #f4f4f6;
  --max: 1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "EB Garamond", "Georgia", "Times New Roman", serif;
  line-height: 1.65;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: "Inter", "Helvetica Neue", "Arial", sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
}

h1 { font-size: 2.4rem; margin: 0 0 0.6rem; }
h2 { font-size: 1.5rem; margin: 2.4rem 0 1rem; border-bottom: 1px solid var(--border); padding-bottom: 0.4rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.95);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.nav-container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: "Inter", "Helvetica Neue", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--fg);
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  gap: 1.8rem;
  font-family: "Inter", "Helvetica Neue", sans-serif;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--fg);
  position: relative;
  padding-bottom: 2px;
}
.site-nav a:hover { text-decoration: none; color: var(--accent); }
.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  width: 100%;
  height: 62vh;
  min-height: 380px;
  overflow: hidden;
  background: #111;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-split {
  display: flex;
}

.hero-cell {
  flex: 1 1 0;
  height: 100%;
  overflow: hidden;
  background: #e9eaec;
  position: relative;
}

.hero-cell .hero-image {
  transform: scale(1.65);
  transform-origin: 35% 60%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

.hero-text {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  color: #fff;
}

.hero-text .btn-hero { margin-top: 1.8rem; }

.hero-text h1 {
  font-family: "EB Garamond", "Georgia", serif;
  font-size: 5rem;
  line-height: 1.05;
  color: #fff;
  margin: 0 0 0.8rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.hero-text .subtitle {
  font-family: "EB Garamond", "Georgia", serif;
  font-size: 1.7rem;
  color: rgba(255,255,255,0.92);
  font-style: italic;
  font-weight: 400;
  margin: 0;
  letter-spacing: 0.005em;
}

.btn-hero {
  display: inline-block;
  font-family: "Inter", "Helvetica Neue", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.85rem 1.8rem;
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  transition: all 0.25s ease;
  white-space: nowrap;
}
.btn-hero:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}

/* ---------- Tasks (stacked) ---------- */
.tasks {
  max-width: var(--max);
  margin: 3.5rem auto 1rem;
  padding: 0 1.5rem;
}

.tasks-intro {
  margin-bottom: 3rem;
}

.tasks-intro h2 {
  margin: 0 0 0.8rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}

.tasks-intro p {
  color: #333;
  font-size: 1.08rem;
  margin: 0;
}

.task-block {
  margin-bottom: 3.5rem;
}

.task-intro {
  margin-bottom: 1.2rem;
}

.task-intro h2 {
  margin: 0 0 0.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}

.task-intro p {
  color: #333;
  margin: 0;
  font-size: 1.02rem;
}

.gif-grid {
  display: grid;
  gap: 1.2rem;
}

.gif-grid.grid-2x2 { grid-template-columns: repeat(2, 1fr); }
.gif-grid.grid-2   { grid-template-columns: repeat(2, 1fr); }
.gif-grid.grid-1   { grid-template-columns: 1fr; max-width: 720px; margin: 0 auto; }

.gif-grid figure {
  margin: 0;
  text-align: center;
}

.gif-grid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--soft);
  display: block;
}

.gif-grid figcaption {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: var(--muted);
  font-family: "Inter", "Helvetica Neue", sans-serif;
}

/* ---------- CTA ---------- */
.cta {
  text-align: center;
  margin: 2.5rem auto 3rem;
}

.btn-primary, .btn-secondary {
  display: inline-block;
  font-family: "Inter", "Helvetica Neue", sans-serif;
  font-size: 0.98rem;
  padding: 0.75rem 1.7rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--fg);
  background: #fff;
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ---------- Authors ---------- */
.authors {
  max-width: var(--max);
  margin: 3rem auto;
  padding: 0 1.5rem;
  text-align: center;
}

.author-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  font-size: 1.05rem;
}

.author-list sup { color: var(--muted); }

.author-line {
  margin: 1rem auto 0;
  max-width: 820px;
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--fg);
}
.author-line a { color: var(--accent); }
.author-line strong { color: var(--fg); font-weight: 600; }
.fake-link {
  color: var(--accent);
  cursor: default;
}

.affiliation {
  color: var(--muted);
  font-size: 0.95rem;
  font-style: italic;
}

/* ---------- Citation ---------- */
.citation {
  max-width: var(--max);
  margin: 3rem auto 4rem;
  padding: 0 1.5rem;
}

.bib-block {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.2rem 1.2rem 1.2rem;
  margin-top: 1rem;
}

.bib-block pre {
  margin: 0;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.88rem;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.copy-btn {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.3rem 0.7rem;
  font-family: "Inter", "Helvetica Neue", sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--fg);
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- About content ---------- */
.content {
  max-width: 1100px;
  margin: 3rem auto 4rem;
  padding: 0 1.5rem;
}

.content .lede {
  font-size: 1.12rem;
  color: #333;
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 1.5rem 0 2rem;
}

.content ul, .content ol { padding-left: 1.5rem; }
.content li { margin-bottom: 0.5rem; }

.table-wrap { overflow-x: auto; margin: 1.2rem 0; }

table.results {
  width: 100%;
  border-collapse: collapse;
  font-family: "Inter", "Helvetica Neue", sans-serif;
  font-size: 0.92rem;
}

table.results th, table.results td {
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

table.results thead th {
  border-bottom: 2px solid var(--fg);
  font-weight: 600;
}

table.results tr.highlight { background: var(--soft); }

.back-link { margin-top: 2.5rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  font-family: "Inter", "Helvetica Neue", sans-serif;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .hero { height: auto; min-height: 360px; padding: 3rem 0; }
  .hero-text {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.5rem;
    padding: 0 1.25rem;
  }
  .hero-text h1 { font-size: 2.8rem; }
  .hero-text .subtitle { font-size: 1.15rem; }
  .btn-hero { padding: 0.7rem 1.4rem; font-size: 0.85rem; }
  .gif-grid.grid-2x2,
  .gif-grid.grid-2 { grid-template-columns: 1fr; }
  .site-nav { gap: 1rem; font-size: 0.88rem; }
  .nav-container { padding: 0.8rem 1rem; }
  h1 { font-size: 1.8rem; }
}
