:root {
  --primary: #2c3e50;
  --secondary: #34495e;
  --accent: #27ae60;
  --accent-hover: #219150;
  --text: #333;
  --bg: #fff;
  --light-bg: #f8f9fa;
  --border: #ddd;
  --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

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

a:hover {
  text-decoration: underline;
}

header {
  background: var(--primary);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  width: 100%;
}

/* Subtle interactive canvas background */
#bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  opacity: 0.85;
  mix-blend-mode: screen;
  z-index: 1;
}

/* Generic sections (landing page) */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background:
    linear-gradient(180deg, rgba(248, 249, 250, 0.78) 0%, rgba(248, 249, 250, 0.78) 100%),
    url("imgs/bg_1_sm.jpg");
  background-size: cover;
  background-position: center;
}

/* Rotate subtle backgrounds for variety */
#evaluation.section-alt {
  background:
    linear-gradient(180deg, rgba(248, 249, 250, 0.78) 0%, rgba(248, 249, 250, 0.78) 100%),
    url("imgs/bg_2_sm.jpg");
  background-size: cover;
  background-position: center;
}

#baselines.section-alt {
  background:
    linear-gradient(180deg, rgba(248, 249, 250, 0.78) 0%, rgba(248, 249, 250, 0.78) 100%),
    url("imgs/bg_3_sm.jpg");
  background-size: cover;
  background-position: center;
}

/* Extra hook if you want to convert another section later */
#about.section-alt {
  background:
    linear-gradient(180deg, rgba(248, 249, 250, 0.78) 0%, rgba(248, 249, 250, 0.78) 100%),
    url("imgs/bg_4_sm.jpg");
  background-size: cover;
  background-position: center;
}

.small-muted {
  color: #6b7280;
  font-size: 0.95rem;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
}

nav .links a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  margin-left: 1.5rem;
  font-weight: 500;
  transition: color 0.2s;
}

nav .links a:hover {
  color: white;
  text-decoration: none;
}

/* Hero Section */
.hero {
    background:
      linear-gradient(135deg, rgba(44, 62, 80, 0.85) 0%, rgba(52, 73, 94, 0.88) 100%),
      url("imgs/hero_bg.jpg");
    background-size: cover;
    background-position: center;
    color: white;
    padding: 6rem 1rem 8rem; /* Extra padding bottom for overlap */
    text-align: center;
    margin-bottom: 0;
    clip-path: none;
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.22);
    color: rgba(255,255,255,0.92);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.2px;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(8px);
}

.hero-logo {
    max-width: 210px;
    height: auto;
    display: block;
    margin: 0 auto 1rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.hero h1 {
    font-size: 3.5rem;
    margin: 0 0 1rem;
    color: white;
    border: none;
    padding: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero .subtitle {
    font-size: 1.5rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    font-weight: 300;
}

.hero-description {
    max-width: 900px;
    margin: 0.5rem auto 2rem;
    font-size: 1.15rem;
    opacity: 0.92;
}

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

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 2.75rem auto 0;
}

.stat-item {
    padding: 1.1rem 1rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    text-align: center;
    backdrop-filter: blur(10px);
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.stat-label {
    font-size: 0.95rem;
    opacity: 0.9;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    gap: 0.55rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.95;
}

.btn-icon svg {
    display: block;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
}

.btn-secondary {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.4);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.25);
    text-decoration: none;
    color: white;
}

/* Secondary buttons on light backgrounds (e.g., CTA section) */
.cta .btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    border: 2px solid rgba(44, 62, 80, 0.18);
    backdrop-filter: none;
}

.cta .btn-secondary:hover {
    background: white;
    border-color: rgba(39, 174, 96, 0.55);
    color: var(--primary);
}

/* Landing page components */
.platform-boxes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin: 2rem 0 2.5rem;
}

.platform-box {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    padding: 1.5rem;
}

.platform-box h3 {
    margin-top: 0;
    color: var(--primary);
    border: none;
}

.platform-size {
    font-weight: 700;
    color: #111827;
    margin: 0.25rem 0 0.75rem;
}

.platform-list {
    margin: 0.75rem 0 1rem;
    padding-left: 1.2rem;
    color: #374151;
}

.platform-list li {
    margin: 0.4rem 0;
}

.callout {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    margin: 1rem 0;
}

.callout.subtle {
    border-left: 4px solid var(--accent);
}

.callout-title {
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.4rem;
}

.callout-note {
    color: #6b7280;
    font-size: 0.95rem;
    margin-top: 0.75rem;
}

.index-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 1.25rem;
}

.index-category {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.index-category h4 {
    margin-top: 0;
    color: var(--primary);
}

.index-list {
    margin: 0.75rem 0 0;
    padding-left: 1.1rem;
    color: #374151;
}

.index-list li {
    margin-bottom: 0.5rem;
}

.rules-list {
    margin: 0.25rem 0 0;
    padding-left: 1.2rem;
    color: #374151;
}

.rules-list li {
    margin: 0.55rem 0;
}

.timeline {
    max-width: 820px;
    margin: 0 auto;
    display: grid;
    gap: 0.75rem;
}

.timeline-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.cta {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.cta-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.cta-step {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.step-number {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(39, 174, 96, 0.14);
    color: var(--accent-hover);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    margin-bottom: 0.75rem;
}

.organizers {
    margin-top: 2.25rem;
    text-align: center;
    color: #6b7280;
}

.cta-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    text-align: center;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: -5rem auto 3rem; /* Negative margin for overlap */
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid var(--accent);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.card h3 {
    margin-top: 0;
    color: var(--primary);
    font-size: 1.2rem;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.card .icon {
    font-size: 1.5rem;
}

.card p {
    margin: 0.5rem 0;
}

/* Content Sections */
.content-section {
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 1.5rem;
}

.content-section.bg-light {
    background: #f8f9fa;
    width: 100%;
    max-width: none;
    padding: 4rem 0;
}

.content-section.bg-light > * {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
    border: none;
    position: relative;
    padding-bottom: 1rem;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.lead {
    font-size: 1.25rem;
    text-align: center;
    color: #555;
    margin-bottom: 2rem;
    font-weight: 300;
}

.two-col-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin: 2rem 0;
    align-items: start;
}

/* Visuals */
.visuals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

figure {
    margin: 0;
    text-align: center;
    transition: transform 0.2s;
}

figure:hover {
    transform: scale(1.02);
}

figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background: white;
    cursor: zoom-in;
}

figcaption {
    margin-top: 0.8rem;
    color: #666;
    font-size: 0.95rem;
    font-style: italic;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    background: #f1f3f5;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

tr:last-child td {
    border-bottom: none;
}

/* Baselines List */
.fancy-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.baseline-link {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.baseline-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-color: var(--accent);
    text-decoration: none;
    color: var(--accent);
}

.baseline-link .icon {
    font-size: 0.85rem;
    margin-right: 1rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: #f1f3f5;
    border: 1px solid #e5e7eb;
    color: var(--primary);
}

/* Prose wrapper (autogenerated markdown pages) */
.prose {
    max-width: 900px;
    margin: 2.5rem auto 4rem;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
    text-align: left;
}

.prose h2::after {
    margin-left: 0;
    margin-right: auto;
}

/* References */
.references ul {
    color: #666;
    font-size: 0.9rem;
}

.references li {
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: #ecf0f1;
    margin-top: 0;
    padding: 4rem 0;
    text-align: center;
}

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

.text-center { text-align: center; }

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
    margin-left: 1.5rem;
}

.dropbtn {
    background-color: transparent;
    color: rgba(255,255,255,0.9);
    padding: 0;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.dropdown:hover .dropbtn {
    color: white;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 4px;
    right: 0;
}

.dropdown-content a {
    color: var(--primary) !important;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    margin: 0 !important;
    transition: background-color 0.2s;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
    color: var(--accent) !important;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Mobile Menu */
.mobile-menu-icon {
    display: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-links {
    flex-direction: column;
    width: 100%;
    padding-top: 1rem;
}

.mobile-links a {
    display: block;
    padding: 0.5rem 0;
    color: white;
    margin: 0;
}

.mobile-divider {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .hero { clip-path: none; padding-bottom: 4rem; }
    .hero h1 { font-size: 2.2rem; }
    .info-cards { margin-top: 2rem; }
    .two-col-grid { grid-template-columns: 1fr; gap: 2rem; }
    .platform-boxes { grid-template-columns: 1fr; }
    .index-grid { grid-template-columns: 1fr; }
    .cta-steps { grid-template-columns: 1fr; }
    .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    
    nav .desktop-links { display: none !important; }
    .mobile-menu-icon { display: block; }
}

/* Ranking Table Styling */
.ranking-table {
    width: 100%;
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.ranking-table th {
    background: var(--primary);
    color: white;
}

.ranking-table tr:nth-child(even) {
    background: #f8f9fa;
}

.ranking-table td:first-child {
    font-weight: 600;
}

/* Code Link in Baselines */
.baseline-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.baseline-link {
    justify-content: center;
    text-align: center;
    flex-grow: 1;
}

.code-link {
    font-size: 0.85rem;
    text-align: center;
    color: #666;
    text-decoration: none;
    padding: 0.3rem;
    background: #f1f3f5;
    border-radius: 4px;
    transition: all 0.2s;
}

.code-link:hover {
    background: #e9ecef;
    color: var(--primary);
}
