/* ===== Custom Properties ===== */
:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f8f8fa;
  --color-text: #1a1a2e;
  --color-text-secondary: #4a4a64;
  --color-accent: #2ac5a0;
  --color-accent-light: #eefbf7;
  --color-accent-hover: #22a888;
  --color-border: #e2e2e8;
  --color-code-bg: #1b1b2f;
  --color-code-text: #d4d4d4;
  --font-sans: "Noto Sans", system-ui, -apple-system, sans-serif;
  --font-serif: "Noto Serif", Georgia, serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --container: min(1080px, 90vw);
  --section-pad: clamp(3rem, 6vw, 5rem);
  --radius: 10px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Top Accent Bar ===== */
body::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), #1a9e8a, var(--color-accent));
}

/* ===== Layout ===== */
.container { width: var(--container); margin: 0 auto; }
section { padding: var(--section-pad) 0; }
section:nth-child(even) { background: var(--color-bg-alt); }

/* ===== Hero ===== */
.hero {
  padding: clamp(3.5rem, 8vw, 6rem) 0 var(--section-pad);
  text-align: center;
  background: linear-gradient(180deg, #eefbf7 0%, var(--color-bg) 100%);
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3.8vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 820px;
  margin: 0 auto 1.4rem;
}
.authors {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.4rem;
  line-height: 1.9;
}
.institutions {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
}
.institutions sup { margin-right: 0.15em; }
.hero-buttons { display: flex; gap: 0.65rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  border: 1.5px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn:hover { border-color: var(--color-accent); background: var(--color-accent-light); text-decoration: none; }
.btn svg, .btn i { width: 1.1em; height: 1.1em; flex-shrink: 0; }
.btn--primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn--primary:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); }

/* ===== Section Headings ===== */
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  margin-bottom: 1.2rem;
  padding-left: 0.85rem;
  border-left: 3px solid var(--color-accent);
}

/* ===== Abstract ===== */
.abstract-text {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--color-text-secondary);
}

/* ===== Key Findings ===== */
.findings-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}
.finding {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.3rem;
}
.finding-icon {
  flex-shrink: 0;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}
.finding-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  line-height: 1.35;
}
.finding-content p {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* ===== Method ===== */
.method-figure {
  margin: 1.8rem 0;
  text-align: center;
}
.method-figure img { margin: 0 auto; border-radius: var(--radius); }
.method-figure--portrait img { max-width: 540px; }
.method-figure--dark img { border-radius: var(--radius); box-shadow: 0 4px 24px rgba(0,0,0,0.15); }
.method-figure figcaption {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-top: 0.75rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}
.method-points {
  list-style: none;
  margin-top: 1.2rem;
  display: grid;
  gap: 0.75rem;
}
.method-points li {
  padding-left: 1.4rem;
  position: relative;
  line-height: 1.65;
}
.method-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* ===== Results ===== */
.results-intro {
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* Results Table */
.table-wrap {
  overflow-x: auto;
  margin: 1.2rem 0;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 520px;
}
.results-table th,
.results-table td {
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.results-table thead th {
  font-weight: 600;
  background: var(--color-bg-alt);
  border-bottom: 2px solid var(--color-border);
}
.results-table tbody tr:last-child td { border-bottom: none; }
.results-table tbody tr:hover { background: var(--color-accent-light); }

/* Design Choice Study table */
.design-table { min-width: 700px; font-size: 0.88rem; }
.design-table th { text-align: center; font-size: 0.8rem; line-height: 1.3; padding: 0.6rem 0.55rem; }
.design-table td { text-align: center; padding: 0.6rem 0.55rem; font-variant-numeric: tabular-nums; }
.design-table td:first-child { text-align: left; white-space: nowrap; }
.table-metric { font-size: 0.72rem; color: var(--color-text-secondary); font-weight: 400; }
.cell-good { background: #e0f7f1; }
.cell-bad { background: #fef3e2; }

/* ===== Task Showcase ===== */
.task-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
@media (max-width: 800px) {
  .task-grid { grid-template-columns: 1fr; max-width: 480px; margin-left: auto; margin-right: auto; }
}
.task-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.task-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}
.task-card img { width: 100%; }
.task-card-body { padding: 1.1rem 1.3rem 1.3rem; }
.task-card-body h3 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}
.task-card-body .scale-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  margin-bottom: 0.15rem;
}
.task-card-body .tool-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}
.task-card-body .metric {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.45rem;
}
.task-card-body p {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ===== Code / BibTeX Blocks ===== */
.code-block {
  background: var(--color-code-bg);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  overflow-x: auto;
  position: relative;
  margin-top: 1rem;
}
.code-block pre {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--color-code-text);
  white-space: pre;
  margin: 0;
}
.code-block .comment { color: #5dba9e; }
.code-block .cmd { color: #dcdcaa; }
.code-label {
  position: absolute;
  top: 0;
  left: 1rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  background: var(--color-code-bg);
  padding: 0.15rem 0.5rem;
  border-radius: 0 0 4px 4px;
}
.copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: #999;
  padding: 0.3rem 0.7rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.76rem;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
}
.copy-btn:hover { background: rgba(255,255,255,0.15); color: #fff; border-color: rgba(255,255,255,0.2); }

/* ===== Getting Started ===== */
.getting-started .code-block { margin-top: 1.2rem; }

/* ===== Citation ===== */
.citation .code-block { margin-top: 1rem; }

/* ===== Footer ===== */
footer {
  padding: 2.5rem 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}
footer a { color: var(--color-text-secondary); }
footer a:hover { color: var(--color-accent); }

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .hero-buttons { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 240px; justify-content: center; }
  .finding { flex-direction: column; gap: 0.5rem; }
}
