/* ===== Variables - Blue Daytime Theme ===== */
:root {
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #3b82f6;
  --blue-glow: rgba(37, 99, 235, 0.15);
  --sky: #0ea5e9;
  --sky-dark: #0284c7;
  --sky-glow: rgba(14, 165, 233, 0.12);
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(37, 99, 235, 0.12);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Noto Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gray-50);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 3px; }
::selection { background: var(--blue); color: #fff; }

/* ===== Navigation ===== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(37, 99, 235, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 56px;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
}

.nav-brand span {
  background: linear-gradient(135deg, var(--blue), var(--sky));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 0.2rem;
  list-style: none;
}

.nav-links a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(37, 99, 235, 0.08);
}

.nav-links a.active {
  color: var(--blue);
  background: rgba(37, 99, 235, 0.12);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.dropdown-trigger i {
  font-size: 0.7rem;
  transition: transform 0.2s;
}

.nav-dropdown.open .dropdown-trigger i {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 280px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 8px;
  padding: 0.4rem 0;
  margin-top: 0.35rem;
  list-style: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 100;
}

.nav-dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-menu li a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-radius: 0;
  transition: color 0.15s, background 0.15s;
}

.dropdown-menu li a:hover {
  color: var(--blue);
  background: rgba(37, 99, 235, 0.06);
}

@media (max-width: 768px) {
  .dropdown-menu {
    position: static;
    background: rgba(248, 250, 252, 0.9);
    border: none;
    box-shadow: none;
    margin-top: 0;
    padding-left: 0.75rem;
    border-left: 2px solid rgba(37, 99, 235, 0.2);
    border-radius: 0;
  }
  .nav-dropdown:hover .dropdown-menu,
  .dropdown-menu { display: none; }
  .nav-dropdown.open .dropdown-menu { display: block; }
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.3rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(37, 99, 235, 0.08);
  }
  .nav-links.open { display: flex; }
}

/* ===== Tab Panels ===== */
.tab-panel {
  display: none;
  padding-top: 56px;
  min-height: calc(100vh - 80px);
  animation: fadeIn 0.35s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Sections ===== */
.hero-section {
  padding: 80px 1.5rem 40px;
  background: linear-gradient(160deg, #ffffff 0%, #f0f9ff 40%, #e0f2fe 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -180px;
  right: -180px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--blue-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -120px;
  left: -120px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--sky-glow) 0%, transparent 70%);
  pointer-events: none;
}

.content-section {
  padding: 60px 1.5rem;
  background: var(--white);
}

.content-section:nth-child(even) {
  background: linear-gradient(160deg, var(--white) 0%, var(--gray-50) 100%);
}

.content-section.first-section {
  padding-top: 80px;
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 50%, #f0f9ff 100%);
  position: relative;
  overflow: hidden;
}

.content-section.first-section::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -150px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--blue-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.5;
}

.section-inner {
  max-width: 880px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ===== Section Divider ===== */
.section-divider {
  height: 1px;
  max-width: 880px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--blue), var(--sky), transparent);
  opacity: 0.25;
}

/* ===== Hero Title ===== */
.hero-title {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-title h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #1e293b 0%, #2563eb 50%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Authors ===== */
.authors {
  text-align: center;
  margin-bottom: 0.4rem;
  line-height: 1.8;
}

.author-block {
  display: inline-block;
  font-size: 1rem;
}

.authors a {
  color: var(--blue);
  transition: color 0.2s;
}

.authors a:hover {
  color: var(--blue-dark);
  text-decoration: underline;
}

.affiliation {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

/* ===== Link Buttons ===== */
.link-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.link-buttons a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: var(--text-primary);
  background: rgba(37, 99, 235, 0.06);
  transition: all 0.2s;
}

.link-buttons a:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: var(--blue);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.link-buttons a.btn-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.link-buttons .icon {
  font-size: 1.05rem;
  display: inline-flex;
}

/* ===== Teaser ===== */
.teaser-block {
  text-align: center;
}

.teaser-block img,
.teaser-block video {
  width: 100%;
  max-width: 720px;
  border-radius: 10px;
  border: 1px solid rgba(37, 99, 235, 0.1);
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.08), 0 0 50px rgba(37, 99, 235, 0.06);
  margin: 0 auto;
  background: white;
}

.teaser-caption {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
  margin-top: 1.25rem;
  font-style: italic;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Section Headers ===== */
.section-header {
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-primary);
  display: inline-block;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  margin-top: 0.4rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--sky));
}

.section-header.centered { text-align: center; }
.section-header.centered h2::after {
  margin-left: auto;
  margin-right: auto;
}

/* ===== Content Card ===== */
.content-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.content-card p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.content-card p:last-child { margin-bottom: 0; }
.content-card strong { color: var(--text-primary); }

.content-card code {
  background: rgba(37, 99, 235, 0.08);
  color: var(--blue);
  padding: 0.12em 0.35em;
  border-radius: 4px;
  font-size: 0.88em;
}

/* ===== Finding Components ===== */
.finding-components {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.finding-item {
  background: rgba(14, 165, 233, 0.04);
  border: 1px solid rgba(14, 165, 233, 0.12);
  border-left: 3px solid var(--sky);
  border-radius: 8px;
  padding: 1.15rem 1.35rem;
}

.finding-item h4 {
  color: var(--sky-dark);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.finding-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ===== Figure ===== */
.figure-block {
  margin: 2rem 0;
  text-align: center;
}

.figure-block img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(37, 99, 235, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  margin: 0 auto;
  background: white;
}

.figure-block figcaption {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 0.65rem;
  font-style: italic;
}

/* ===== Grid Label ===== */
.grid-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
}

.grid-label:first-of-type {
  margin-top: 0;
}

/* ===== Results Grid ===== */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.results-grid.three-col {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
  .results-grid.three-col { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .results-grid { grid-template-columns: 1fr; }
  .results-grid.three-col { grid-template-columns: 1fr; }
}

.result-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.25rem;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.result-item:hover {
  transform: translateY(-2px);
}

.result-item h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.result-item p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.7;
}

/* Blue variant (default/evaluation settings) */
.result-item.blue {
  border-color: rgba(37, 99, 235, 0.15);
  background: rgba(37, 99, 235, 0.03);
}

.result-item.blue:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
}

.result-item.blue h4 {
  color: var(--blue);
}

/* Purple variant (task types) */
.result-item.purple {
  border-color: rgba(124, 58, 237, 0.15);
  background: rgba(124, 58, 237, 0.03);
}

.result-item.purple:hover {
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.1);
}

.result-item.purple h4 {
  color: #7c3aed;
}

/* ===== BibTeX ===== */
.bibtex-block {
  background: var(--gray-100);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1.5rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.bibtex-block code {
  background: none;
  color: inherit;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* ===== Footer ===== */
.site-footer {
  padding: 1.5rem;
  background: var(--white);
  border-top: 1px solid rgba(37, 99, 235, 0.06);
  text-align: center;
}

.footer-icons {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.footer-icons a {
  color: var(--text-muted);
  margin: 0 0.4rem;
  transition: color 0.2s;
}

.footer-icons a:hover { color: var(--blue); }

.site-footer p {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.site-footer p a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer p a:hover { color: var(--text-secondary); }

/* ===== News List ===== */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(37, 99, 235, 0.04);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-left: 3px solid var(--sky);
  border-radius: 10px;
  padding: 0.75rem 1.5rem;
  margin-bottom: 1.5rem;
}

.news-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(37, 99, 235, 0.07);
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  color: var(--sky-dark);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  min-width: 100px;
}

.news-text {
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.6;
}

.news-text a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.news-text a:hover {
  color: var(--blue-dark);
}

/* ===== Table Media (for result tables) ===== */
.table-media {
  width: 100%;
  margin: 1.5rem auto;
}

.table-media img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(37, 99, 235, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  background: white;
}
