:root {
  --primary: #005696;
  --primary-dark: #003b68;
  --primary-light: #eef4f8;
  --accent: #e31837;
  --dark: #1e293b;
  --light: #f8fafc;
  --border: #e2e8f0;
  --text: #334155;
  --text-muted: #64748b;
  --radius: 10px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background-color: var(--light);
  line-height: 1.6;
}

/* Header & Hero */
header.hero {
  background: linear-gradient(135deg, #0b2545 0%, #134074 50%, #005696 100%);
  color: white;
  padding: 3.5rem 1.5rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header.hero::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at top right, rgba(227, 24, 55, 0.15), transparent 60%);
  pointer-events: none;
}

.hero-content {
  max-width: 1050px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.badge-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #e2e8f0;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1.2rem;
  color: #ffffff;
}

.hero .authors {
  font-size: 1.05rem;
  font-weight: 500;
  color: #cbd5e1;
  margin-bottom: 0.4rem;
}

.hero .affiliation {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-bottom: 1.8rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(227, 24, 55, 0.35);
}

.btn-primary:hover {
  background: #c5112d;
  transform: translateY(-2px);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Nav Tabs */
nav.nav-bar {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-container::-webkit-scrollbar {
  display: none;
}

.nav-link {
  padding: 1rem 1.3rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--primary-light);
}

/* Main Container */
main.container {
  max-width: 1200px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

section {
  margin-bottom: 3.5rem;
  scroll-margin-top: 5rem;
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

/* Cards & Grid */
.card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.8rem;
  margin-bottom: 1.8rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Abstract & Key Takeaways */
.abstract-box {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.5rem 1.8rem;
  margin-bottom: 2rem;
}

.abstract-box h3 {
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 0.6rem;
}

.abstract-box p {
  font-size: 0.95rem;
  line-height: 1.7;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.metric-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.metric-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
}

.metric-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.3rem;
}

/* 3D Embed Frame */
.explorer-frame-container {
  position: relative;
  width: 100%;
  height: 680px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  background: #0f172a;
}

.explorer-frame {
  width: 100%;
  height: 100%;
  border: none;
}

/* Media Cards */
.media-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.media-card img {
  width: 100%;
  height: auto;
  display: block;
  background: #f1f5f9;
}

.media-card-body {
  padding: 1.2rem;
  flex-grow: 1;
}

.media-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: #e2e8f0;
  color: #475569;
  margin-bottom: 0.5rem;
}

.media-badge.primary { background: #dbeafe; color: #1e40af; }
.media-badge.accent { background: #ffe4e6; color: #9f1239; }

.media-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.4rem;
}

.media-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: white;
  margin-bottom: 1.5rem;
}

table.scientific-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

table.scientific-table th {
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 0.85rem 1rem;
  font-weight: 700;
  border-bottom: 2px solid #cbd5e1;
  white-space: nowrap;
}

table.scientific-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

table.scientific-table tr:nth-child(even) td {
  background: #f8fafc;
}

table.scientific-table tr:hover td {
  background: #f1f5f9;
}

/* Code & Bibtex */
pre.code-block {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1.2rem;
  border-radius: var(--radius);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 0.85rem;
  overflow-x: auto;
  line-height: 1.5;
}

/* Footer */
footer.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 1.5rem 2rem;
  font-size: 0.88rem;
  text-align: center;
  border-top: 1px solid #334155;
}

footer.footer a {
  color: #38bdf8;
  text-decoration: none;
}

footer.footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.5rem; }
  .explorer-frame-container { height: 500px; }
  .nav-link { padding: 0.8rem 1rem; font-size: 0.85rem; }
}
