@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;700;800&family=Plus+Jakarta+Sans:wght@400;500;700&display=swap');

body.article-page * {
    box-sizing: border-box;
}

body.article-page {
    --article-bg: #060705;
    --article-card: rgba(255, 255, 255, 0.035);
    --article-card-strong: rgba(255, 255, 255, 0.045);
    --article-line: rgba(255, 255, 255, 0.08);
    --article-copy: #d7d3c7;
    --article-muted: #a9a392;
    --article-cream: #f8efd8;
    --article-glow: rgba(199, 154, 59, 0.15);
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --nav-height: 100px;
    background: #060705;
    font-family: var(--font-body);
    color: var(--article-copy);
    overflow-x: hidden;
    max-width: 100vw;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.theme-beginner {
    --primary: #e0b85b;
    --accent: #2f8b76;
    --article-bg: #050806;
}

body.theme-home {
    --primary: #e3a04d;
    --accent: #5bb5aa;
    --article-bg: #070705;
}

body.theme-split {
    --primary: #ee6b42;
    --accent: #82b7d8;
    --article-bg: #050608;
}

#gravity-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

body.article-page p,
body.article-page li {
    color: var(--article-copy);
}

body.article-page strong {
    color: var(--article-cream);
}

body.article-page h1,
body.article-page h2,
body.article-page h3,
body.article-page h4 {
    font-family: var(--font-heading);
    letter-spacing: -0.015em;
    color: var(--article-cream);
}

/* --- NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 1000;
    background: rgba(6, 7, 5, 0.75);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    height: 100%;
    cursor: pointer;
}

.logo img {
    height: 80px;
    width: auto;
    transition: transform 0.2s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

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

.nav-links a {
    margin-left: 40px;
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    display: inline-block;
}

.nav-links a:hover {
    color: var(--primary);
}

/* --- SCROLL PROGRESS BAR --- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 5px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    z-index: 9999;
    border-radius: 0 4px 4px 0;
    transition: width 0.1s ease-out;
}

/* --- ENTRANCE ANIMATIONS --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal-element {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Removed morphBlob keyframes */

.article-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(360px, 1.12fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
    width: min(1180px, 90vw);
    min-height: 680px;
    margin: 0 auto;
    padding: calc(var(--nav-height) + 58px) 0 58px;
    background: transparent;
}

.article-hero-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.article-hero h1 {
    max-width: 760px;
    margin-bottom: 22px;
    color: var(--article-cream);
    background: none;
    -webkit-text-fill-color: currentColor;
    text-wrap: balance;
}

.article-dek {
    max-width: 660px;
    color: var(--article-copy);
    font-size: clamp(1.1rem, 1.5vw, 1.35rem);
}

.article-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    margin-bottom: 18px;
}

.article-meta::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 18px var(--accent);
}

.hero-tags,
.quick-panel,
.movement-grid,
.split-picker {
    display: grid;
    gap: 14px;
}

.hero-tags {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 30px;
}

.hero-tags span,
.quick-stat,
.split-card {
    border: 1px solid var(--article-line);
    background: rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 18px 22px;
    color: var(--article-copy);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, background 0.3s ease;
}

.hero-tags span:hover,
.quick-stat:hover,
.split-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
}

.hero-tags b,
.quick-stat b,
.split-card b {
    display: block;
    color: var(--article-cream);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.article-hero-media,
.movement-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s ease, box-shadow 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.article-hero-media:hover,
.movement-card:hover {
    border-color: color-mix(in srgb, var(--primary) 40%, transparent);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 30px color-mix(in srgb, var(--primary) 12%, transparent);
}

.article-hero-media {
    aspect-ratio: 16 / 10;
    min-height: 430px;
}

.article-hero-media.hero-media-wide {
    grid-column: span 1;
}

.article-hero-media.hero-media-tall {
    aspect-ratio: 4 / 5;
    max-height: 640px;
    justify-self: end;
}

.article-hero-media img,
.movement-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-hero-media:hover img,
.movement-card:hover img {
    transform: scale(1.03);
}

.article-hero-media figcaption,
.movement-card figcaption {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    background: rgba(5, 7, 5, 0.82);
    color: var(--article-cream);
    font-size: 0.9rem;
    backdrop-filter: blur(14px);
    z-index: 2;
    overflow-wrap: anywhere;
}

.article-content {
    width: min(880px, 90vw);
    margin: 0 auto;
    max-width: none;
    padding: 0 0 100px;
    position: relative;
    z-index: 1;
}

.article-content > p:first-child {
    font-size: 1.28rem;
    color: var(--article-cream);
}

.quick-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 38px 0 48px;
}

.quick-stat {
    min-height: 112px;
}

.content-band {
    width: min(1180px, 90vw);
    margin: 58px calc(50% - min(590px, 45vw));
    padding: clamp(30px, 5vw, 56px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(15px);
    border-radius: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.content-band h2 {
    margin-top: 0;
}

.movement-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: stretch;
    margin-top: 28px;
}

.movement-grid.three-up {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.movement-card {
    min-height: 340px;
}

.movement-card.is-tall {
    min-height: 520px;
}

.movement-card.is-square {
    aspect-ratio: 1;
    min-height: auto;
}

.workout-day {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 36px;
    padding: 34px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 34px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}

.workout-day:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.workout-day::before {
    content: "";
    position: absolute;
    top: 24px;
    left: 24px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 0 12px var(--primary);
}

.workout-day h4 {
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: var(--article-cream);
    font-size: 1.3rem;
    margin-bottom: 18px;
    padding-bottom: 12px;
    padding-left: 18px;
}

.exercise-row {
    counter-increment: exercise;
    gap: 18px;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
    padding: 14px 18px;
    margin: 0 -18px;
    border-radius: 18px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(255,255,255,0.06);
}

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

.exercise-row:hover {
    transform: translateX(8px);
    background-color: rgba(255, 255, 255, 0.04);
}

.exercise-row::before {
    content: counter(exercise, decimal-leading-zero);
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 800;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.exercise-row:hover::before {
    background: var(--primary);
    color: #000;
    transform: scale(1.15);
}

.workout-day {
    counter-reset: exercise;
}

.ex-name {
    flex: 1;
    color: var(--article-cream);
    font-weight: 600;
}

.ex-reps {
    color: var(--primary);
    text-align: right;
    font-weight: 700;
}

.split-picker {
    grid-template-columns: 1fr 1fr;
    margin: 28px 0 38px;
}

.split-card {
    padding: 24px;
}

.split-card p {
    margin-bottom: 0;
    font-size: 1rem;
}

.cta-box {
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(25px);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
    padding: 48px 36px;
    text-align: center;
    margin: 60px 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}

.cta-box:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 36px 90px rgba(0, 0, 0, 0.45);
}

.btn {
    display: inline-block;
    padding: 16px 36px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    cursor: pointer;
    margin-top: 20px;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 14px 28px color-mix(in srgb, var(--primary) 22%, transparent);
}

.btn-primary:hover {
    box-shadow: 0 18px 36px color-mix(in srgb, var(--primary) 35%, transparent);
}

/* --- FOOTER --- */
footer {
    padding: 80px 10%;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: transparent;
}
.footer-col h4 { color: white; margin-bottom: 20px; }
.footer-col a { display: block; margin-bottom: 10px; color: var(--text-muted); font-size: 0.9rem; }
.footer-logo img { height: 120px; opacity: 0.8; }

@media (max-width: 980px) {
    .article-hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: 170px;
    }

    .article-hero-media,
    .article-hero-media.hero-media-tall {
        width: 100%;
        max-height: none;
        justify-self: stretch;
    }

    .hero-tags,
    .quick-panel,
    .movement-grid,
    .movement-grid.three-up,
    .split-picker {
        grid-template-columns: 1fr;
    }

    .content-band {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    body.article-page {
        overflow-x: hidden;
    }

    nav {
        height: auto;
        flex-direction: column;
        padding: 12px 16px;
        background: rgba(6, 7, 5, 0.95);
    }
    .logo img { height: 100px; }
    .nav-links {
        display: flex;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 16px;
        margin-top: 10px;
    }
    .nav-links a { margin-left: 0; font-size: 0.95rem; }

    .article-hero {
        width: 100%;
        max-width: 370px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 14px;
        padding-right: 14px;
        padding-top: 190px;
        gap: 26px;
    }

    .article-hero h1 {
        max-width: 100%;
        font-size: 1.85rem;
        line-height: 1.12;
        overflow-wrap: anywhere;
        text-wrap: wrap;
    }

    .article-dek {
        max-width: 100%;
        font-size: 1.05rem;
        overflow-wrap: anywhere;
    }

    .article-hero-copy,
    .hero-tags,
    .quick-panel,
    .split-picker {
        max-width: 342px;
    }

    .hero-tags span,
    .quick-stat,
    .split-card {
        min-width: 0;
    }

    .article-content {
        width: 100%;
        max-width: 370px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 14px;
        padding-right: 14px;
    }

    .article-hero-media {
        min-height: 260px;
    }

    .article-hero-media figcaption,
    .movement-card figcaption {
        position: static;
        border: 0;
        border-top: 1px solid var(--article-line);
        border-radius: 0;
        background: rgba(8, 9, 7, 0.94);
    }

    .article-hero-media img {
        height: auto;
        aspect-ratio: 16 / 10;
    }

    .article-hero-media.hero-media-tall img {
        aspect-ratio: 4 / 5;
    }

    .movement-card {
        min-height: 280px;
    }

    .movement-card.is-tall {
        min-height: 380px;
    }

    .exercise-row {
        display: grid;
        grid-template-columns: auto 1fr;
    }

    .ex-reps {
        grid-column: 2;
        text-align: left;
    }
    
    footer {
        flex-direction: column;
        gap: 40px;
        padding: 40px 16px;
        text-align: center;
    }
    .footer-col { width: 100%; }
}
