/* ============================================
   PLANET EARTH - EDITORIAL NATURE STYLE
   Light bg, earthy tones, Sora + DM Sans
   ============================================ */

:root {
    /* Light, warm, natural palette */
    --bg-primary: #faf8f4;
    --bg-secondary: #f2efe8;
    --bg-card: #ffffff;
    --bg-card-hover: #f9f7f2;
    --surface: #edeade;

    --text-primary: #1a2332;
    --text-secondary: #3d4f63;
    --text-muted: #7b8a9e;

    --accent-emerald: #0d9868;
    --accent-ocean: #1b6ca8;
    --accent-terra: #c4652a;
    --accent-gold: #c8960c;
    --accent-sky: #2d9cdb;
    --accent-berry: #8b4c8c;
    --accent-rust: #b54830;

    --gradient-earth: linear-gradient(135deg, #0d9868, #1b6ca8);
    --gradient-warm: linear-gradient(135deg, #c4652a, #c8960c);
    --gradient-cool: linear-gradient(135deg, #1b6ca8, #2d9cdb);
    --gradient-nature: linear-gradient(135deg, #0d9868, #2d9cdb, #c8960c);

    --border-color: rgba(26, 35, 50, 0.08);
    --shadow-sm: 0 1px 3px rgba(26, 35, 50, 0.06);
    --shadow-md: 0 4px 20px rgba(26, 35, 50, 0.08);
    --shadow-lg: 0 12px 40px rgba(26, 35, 50, 0.1);
    --shadow-xl: 0 20px 60px rgba(26, 35, 50, 0.12);

    /* Fonts */
    --font-heading: 'Sora', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    /* Spacing */
    --section-padding: 7rem 0;
    --container-width: 1200px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    /* Transitions */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

::selection {
    background: rgba(13, 152, 104, 0.15);
    color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-emerald);
    border-radius: 4px;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(250, 248, 244, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.6rem 0;
    box-shadow: var(--shadow-sm);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #f0f2f5;
    transition: var(--transition);
}

.navbar.scrolled .nav-logo {
    color: var(--text-primary);
}

.nav-logo:hover {
    opacity: 0.7;
}

.logo-icon {
    font-size: 1.4rem;
}

.logo-icon-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.logo-text strong {
    background: linear-gradient(135deg, #6ee7b7, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar.scrolled .logo-text strong {
    background: var(--gradient-earth);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.nav-link {
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(240, 242, 245, 0.85);
    border-radius: 8px;
    transition: var(--transition);
    letter-spacing: -0.01em;
}

.nav-link:hover,
.nav-link.active {
    color: #6ee7b7;
    background: rgba(110, 231, 183, 0.12);
}

.navbar.scrolled .nav-link {
    color: var(--text-muted);
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
    color: var(--accent-emerald);
    background: rgba(13, 152, 104, 0.06);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: #f0f2f5;
    border-radius: 2px;
    transition: var(--transition);
}

.navbar.scrolled .nav-toggle span {
    background: var(--text-primary);
}

.nav-links.open~.nav-toggle span,
.navbar .nav-toggle[aria-expanded="true"] span {
    background: var(--text-primary);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #000000;
}

.hero-bg-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 60% at 65% 50%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
    display: flex;
    align-items: center;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.hero-text {
    padding-top: 4rem;
    max-width: 50%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1.1rem;
    background: rgba(13, 152, 104, 0.12);
    border: 1px solid rgba(13, 152, 104, 0.25);
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #6ee7b7;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s 0.2s forwards;
    letter-spacing: 0.02em;
}

.badge-dot {
    width: 7px;
    height: 7px;
    background: #6ee7b7;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    color: #f0f2f5;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s 0.4s forwards;
    letter-spacing: -0.03em;
}

.title-line {
    display: block;
}

.title-accent {
    background: linear-gradient(135deg, #6ee7b7, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: rgba(240, 242, 245, 0.65);
    line-height: 1.7;
    max-width: 480px;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s 0.6s forwards;
    font-weight: 400;
}

.hero-quick-stats {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s 0.8s forwards;
}

.quick-stat {
    display: flex;
    flex-direction: column;
}

.quick-stat-value {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 800;
    color: #f0f2f5;
    letter-spacing: -0.02em;
}

.quick-stat-label {
    font-size: 0.72rem;
    color: rgba(240, 242, 245, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.scroll-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #6ee7b7;
    font-weight: 600;
    font-size: 0.88rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s 1s forwards;
    transition: var(--transition);
    letter-spacing: 0.02em;
}

.scroll-cta:hover {
    gap: 1rem;
}

.scroll-arrow {
    animation: bounce 2s infinite;
}

/* Globe video wrapper — single element, starts in hero, animates to sidebar via GSAP */
.globe-wrapper {
    position: fixed;
    /* JS sets left/top/width/height via GSAP */
    z-index: 40;
    border-radius: 50%;
    overflow: hidden;
    pointer-events: none;
    will-change: left, top, width, height, opacity;
}

#earthVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Zoom in to crop out the space background around the planet */
    transform: scale(1.35);
}

/* When in sidebar mode, content is already pushed left — keep globe on top */
.globe-wrapper.is-sidebar {
    z-index: 40;
}

/* Reserve right-side space for the sidebar globe on desktop */
@media (min-width: 1025px) {
    body.globe-active .section {
        padding-right: 220px;
    }

    /* Titles stay full-width and centered */
    body.globe-active .section .section-header {
        padding-right: 0;
        margin-right: -220px;
    }
}

/* ============================================
   SECTIONS COMMON
   ============================================ */
.section {
    padding: var(--section-padding);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(13, 152, 104, 0.07);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-emerald);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.text-accent {
    background: var(--gradient-earth);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.02rem;
    color: var(--text-muted);
    max-width: 580px;
    margin: 0 auto;
    font-weight: 400;
}

/* ============================================
   OVERVIEW - STATS GRID
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-bottom: 4rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.8rem;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    box-shadow: var(--shadow-sm);
}

.stat-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
}

.stat-icon {
    font-size: 1.8rem;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 14px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 800;
    display: inline;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.stat-unit {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--accent-emerald);
    font-weight: 700;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    font-weight: 500;
}

/* Comparison Block */
.comparison-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    opacity: 0;
    transform: translateY(30px);
    box-shadow: var(--shadow-md);
}

.comparison-block.animated {
    opacity: 1;
    transform: translateY(0);
}

.comparison-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.comparison-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comparison-item {
    display: grid;
    grid-template-columns: 100px 1fr 180px;
    align-items: center;
    gap: 1rem;
}

.comparison-item.highlight {
    font-weight: 600;
}

.comparison-item.highlight .comp-label {
    color: var(--accent-emerald);
    font-weight: 700;
}

.comp-label {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.comp-bar-bg {
    height: 10px;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
}

.comp-bar {
    height: 100%;
    width: 0;
    background: var(--bar-color);
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.comparison-block.animated .comp-bar {
    width: calc(var(--bar-width, 0) * 1%);
}

.comp-value {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
    font-weight: 500;
}

/* ============================================
   STRUCTURE - LAYERS
   ============================================ */
.section-structure {
    background: var(--bg-secondary);
}

.layers-showcase {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.layer-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    align-items: center;
    transition: var(--transition);
    opacity: 0;
    transform: translateX(-30px);
    box-shadow: var(--shadow-sm);
}

.layer-card.animated {
    opacity: 1;
    transform: translateX(0);
}

.layer-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(4px);
}

.layer-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.layer-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, var(--layer-color), rgba(30, 30, 30, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: var(--transition-slow);
}

.layer-card:hover .layer-circle {
    transform: scale(1.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.layer-depth {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.layer-info h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    letter-spacing: -0.02em;
}

.layer-info p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 0.92rem;
}

.layer-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.layer-fact {
    padding: 0.3rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   CONTINENTS
   ============================================ */
.continents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.3rem;
}

.continent-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.continent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent);
    opacity: 0;
    transition: var(--transition);
}

.continent-card:hover::before {
    opacity: 1;
}

.continent-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.continent-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-6px);
}

.continent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.continent-header h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.continent-emoji {
    font-size: 1.8rem;
}

.continent-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.c-stat {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.c-stat-value {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.01em;
}

.c-stat-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

.continent-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 1.2rem;
}

.continent-bar {
    position: relative;
}

.continent-bar-fill {
    height: 4px;
    background: var(--bar-c);
    border-radius: 4px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.5rem;
}

.continent-card.animated .continent-bar-fill {
    width: calc(var(--bar-width, 0) * 1%);
}

.continent-bar span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   OCEANS
   ============================================ */
.section-oceans {
    background: var(--bg-secondary);
}

.oceans-showcase {
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
}

.ocean-card {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem 2.5rem;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    box-shadow: var(--shadow-sm);
}

.ocean-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.ocean-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.ocean-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--wave-color);
    opacity: 0.6;
    transition: var(--transition);
}

.ocean-card:hover .ocean-wave {
    height: 5px;
    opacity: 1;
}

.ocean-content h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    letter-spacing: -0.02em;
}

.ocean-data {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.ocean-stat {
    padding: 0.25rem 0.65rem;
    background: rgba(27, 108, 168, 0.07);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--accent-ocean);
    font-weight: 600;
}

.ocean-content p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.ocean-percentage {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ocean-percentage svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ocean-ring-bg {
    fill: none;
    stroke: var(--bg-secondary);
    stroke-width: 5;
}

.ocean-ring {
    fill: none;
    stroke: var(--accent-ocean);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 251.2;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ocean-card.animated .ocean-ring {
    stroke-dashoffset: calc(251.2 - (251.2 * var(--pct) / 100));
}

.ocean-percentage span {
    position: absolute;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--accent-ocean);
    letter-spacing: -0.02em;
}

/* ============================================
   COUNTRIES TABLE
   ============================================ */
.countries-table {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-md);
}

.country-row {
    display: grid;
    grid-template-columns: 50px 1fr 100px 100px 200px;
    align-items: center;
    padding: 1rem 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    opacity: 0;
    transform: translateX(-20px);
}

.country-row.animated {
    opacity: 1;
    transform: translateX(0);
}

.country-row:last-child {
    border-bottom: none;
}

.country-row:not(.country-header-row):hover {
    background: rgba(13, 152, 104, 0.03);
}

.country-header-row {
    background: var(--bg-secondary);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 600;
    opacity: 1;
    transform: none;
}

.country-rank {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--accent-emerald);
    font-size: 1.05rem;
}

.country-header-row .country-rank {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.country-name {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
    font-size: 0.92rem;
}

.country-flag {
    font-size: 1.3rem;
}

.country-pop {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.country-gdp {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.92rem;
}

.country-gdp-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
}

.gdp-bar-fill {
    height: 100%;
    width: 0;
    background: var(--gdp-c);
    border-radius: 8px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.country-row.animated .gdp-bar-fill {
    width: calc(var(--bar-width, 0) * 1%);
}

/* Population Grid */
.pop-section {
    opacity: 0;
    transform: translateY(30px);
}

.pop-section.animated {
    opacity: 1;
    transform: translateY(0);
}

.pop-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.pop-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.pop-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.pop-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.pop-flag {
    font-size: 2.2rem;
}

.pop-country {
    font-weight: 600;
    font-size: 0.88rem;
}

.pop-value {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--accent-emerald);
    letter-spacing: -0.01em;
}

/* ============================================
   ATMOSPHERE
   ============================================ */
.section-atmosphere {
    background: var(--bg-secondary);
}

.atm-composition {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(30px);
    box-shadow: var(--shadow-md);
}

.atm-composition.animated {
    opacity: 1;
    transform: translateY(0);
}

.atm-composition h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.atm-bar-container {
    display: flex;
    height: 44px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.atm-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--seg-c);
    width: 0;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.atm-composition.animated .atm-segment {
    width: calc(var(--seg-w) * 1%);
}

.atm-seg-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
}

.atm-seg-value {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.atm-details {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.atm-detail {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.86rem;
    color: var(--text-secondary);
}

.atm-detail-color {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    flex-shrink: 0;
}

.atm-layers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
}

.atm-layer-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.atm-layer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--atm-c);
    opacity: 0;
    transition: var(--transition);
}

.atm-layer-card:hover::before {
    opacity: 1;
}

.atm-layer-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.atm-layer-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.atm-layer-header {
    margin-bottom: 1rem;
}

.atm-altitude {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--atm-c);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.atm-layer-header h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 0.3rem;
    letter-spacing: -0.02em;
}

.atm-layer-card p {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   LIFE ON EARTH
   ============================================ */
.life-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-bottom: 4rem;
}

.life-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    box-shadow: var(--shadow-sm);
}

.life-stat-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.life-stat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.life-stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-earth);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.2rem;
    letter-spacing: -0.03em;
}

.life-stat-text {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    letter-spacing: -0.01em;
}

.life-stat-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* Biomes */
.biomes-section {
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(30px);
}

.biomes-section.animated {
    opacity: 1;
    transform: translateY(0);
}

.biomes-title,
.timeline-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.biomes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

.biome-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.biome-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--biome-c);
    opacity: 0;
    transition: var(--transition);
}

.biome-card:hover::after {
    opacity: 1;
}

.biome-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.biome-icon {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
}

.biome-card h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.biome-card p {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* Timeline */
.timeline-section {
    opacity: 0;
    transform: translateY(30px);
}

.timeline-section.animated {
    opacity: 1;
    transform: translateY(0);
}

.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-emerald), var(--accent-ocean), var(--accent-terra));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -2.65rem;
    top: 0.3rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--dot-c);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 2px var(--dot-c);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.timeline-content:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.timeline-date {
    font-size: 0.72rem;
    color: var(--accent-emerald);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.timeline-content h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0.3rem 0 0.5rem;
    letter-spacing: -0.02em;
}

.timeline-content p {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    position: relative;
}

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

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-text {
    font-size: 0.86rem;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.footer-divider {
    width: 50px;
    height: 3px;
    background: var(--gradient-earth);
    margin: 0 auto 1.5rem;
    border-radius: 3px;
}

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

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(8px);
    }

    60% {
        transform: translateY(4px);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .hero-content {
        text-align: center;
    }

    .hero-text {
        padding-top: 8rem;
        max-width: 100%;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-quick-stats {
        justify-content: center;
    }

    .scroll-cta {
        justify-content: center;
    }

    .globe-wrapper {
        position: absolute;
        top: 8vh;
        left: 50%;
        transform: translateX(-50%);
        width: min(85vw, 420px);
        height: min(85vw, 420px);
        opacity: 0.85;
        z-index: 1;
        pointer-events: none;
    }

    .hero-text {
        position: relative;
        z-index: 2;
    }

    .hero-title,
    .hero-subtitle,
    .hero-badge,
    .quick-stat-value,
    .quick-stat-label,
    .scroll-cta {
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85), 0 1px 3px rgba(0, 0, 0, 0.9);
    }

    .title-accent {
        text-shadow: none;
        filter:
            drop-shadow(0 0 1px rgba(0, 0, 0, 0.95)) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 2px rgba(0, 0, 0, 0.6));
    }

    .hero-subtitle {
        margin-top: min(70vw, 180px);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .life-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .layer-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .layer-visual {
        justify-content: center;
    }

    .layer-facts {
        justify-content: center;
    }

    .pop-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .biomes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .country-row {
        grid-template-columns: 40px 1fr 80px 80px;
    }

    .country-gdp-bar {
        display: none;
    }

    .country-header-row .country-gdp-bar {
        display: none;
    }

    .comparison-item {
        grid-template-columns: 80px 1fr 150px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 4rem 0;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: rgba(250, 248, 244, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 5rem 1.5rem 2rem;
        z-index: 999;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links .nav-link {
        font-size: 1.15rem;
        padding: 0.8rem 1.5rem;
        color: var(--text-primary);
    }

    .nav-toggle {
        display: flex;
        position: relative;
        z-index: 1001;
    }

    body.nav-open {
        overflow: hidden;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .stat-card {
        padding: 1.2rem;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .continents-grid {
        grid-template-columns: 1fr;
    }

    .ocean-card {
        grid-template-columns: 1fr;
    }

    .ocean-percentage {
        justify-self: center;
    }

    .country-row {
        grid-template-columns: 30px 1fr 70px;
    }

    .country-gdp {
        display: none;
    }

    .pop-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .biomes-grid {
        grid-template-columns: 1fr;
    }

    .life-stats-grid {
        grid-template-columns: 1fr;
    }

    .atm-layers-grid {
        grid-template-columns: 1fr;
    }

    .comparison-item {
        grid-template-columns: 60px 1fr;
    }

    .comp-value {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-quick-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .quick-stat {
        align-items: center;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}