:root {
    --font-base: 16px;
}

[data-fontsize="small"] {
    --font-base: 14px;
}

[data-fontsize="medium"] {
    --font-base: 16px;
}

[data-fontsize="large"] {
    --font-base: 19px;
}

[data-fontsize="xl"] {
    --font-base: 22px;
}

:root,
[data-theme="light"] {
    --bg-page: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.85);
    --bg-panel: #ffffff;
    --bg-button: #000;
    --bg-stats: #000;

    --bg-secundair: #FAFAFA;

    --text-primary: #0a0a0a;
    --text-muted: #0a0a0a8c;
    --text-ghost: rgba(10, 10, 10, 0.35);
    --text-secundair: #fff;

    --border-nav: rgba(229, 229, 229, 0.6);
    --border-subtle: #e5e5e5;
    --shadow-panel: 0 8px 32px rgba(0, 0, 0, 0.12);

}


[data-theme="dark"] {
    --bg-page: #171717;
    --bg-nav: rgba(23, 23, 23, 0.9);
    --bg-panel: #262626;
    --bg-button: #fff;
    --bg-stats: #262626;

    --bg-secundair: #000000;

    --text-primary: #f0f0f0;
    --text-muted: rgba(240, 240, 240, 0.55);
    --text-ghost: rgba(240, 240, 240, 0.3);

    --border-nav: rgba(255, 255, 255, 0.08);
    --border-subtle: #333333;
    --shadow-panel: 0 8px 32px rgba(0, 0, 0, 0.5);

}


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


body {
    font-family: Inter, sans-serif;
    font-size: var(--font-base);
    background: var(--bg-page);
    color: var(--text-primary);
    transition: background 0.25s, color 0.25s;
}


nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border-nav);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

.nav-logo {
    font-size: calc(var(--font-base) * 1.1);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    min-width: 120px;
    user-select: none;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-links {
    display: flex;
    gap: 2px;
}

.nav-links a {
    text-decoration: none;
    font-size: calc(var(--font-base) * 0.875);
    font-weight: 300;
    color: var(--text-muted);
    padding: 7px 14px;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}

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

.nav-links a.current {
    color: var(--text-primary);
    font-weight: 500;
}


.modes {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: flex-end;
    position: relative;
}

.icon-btn {
    background: none;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}

.icon-btn:hover {
    background: var(--border-nav);
}

.icon-btn img {
    width: 18px;
    height: 18px;
    display: block;
}


[data-theme="light"] #themeImg {
    content: url('../img/moon.svg');
}

[data-theme="dark"] #themeImg {
    content: url('../img/sun.svg');
}


[data-theme="dark"] #fontBtn img {
    filter: invert(1);
}


.font-panel-wrapper {
    position: relative;
}

.font-panel {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: var(--shadow-panel);
    padding: 14px;
    min-width: 170px;
    z-index: 200;
}

.font-panel.open {
    display: block;
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.font-panel-title {
    font-size: calc(var(--font-base) * 0.7);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-ghost);
    margin-bottom: 8px;
    padding: 0 4px;
}

.font-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.font-options button {
    background: none;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    text-align: left;
    cursor: pointer;
    color: var(--text-primary);
    font-family: inherit;
    font-size: calc(var(--font-base) * 0.875);
    font-weight: 400;
    transition: background 0.12s;
    width: 100%;
}

.font-options button:hover,
.font-options button.active {
    background: var(--border-nav);
    font-weight: 500;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 22px;
    padding: 0;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* end of header ^ */

@media (max-width: 1024px) {
    nav {
        padding: 0 30px;
    }

    .regel222 {
        padding: 80px 30px 80px 30px;
    }

    .algmtips {
        margin: 80px auto 0 auto;
        padding: 0 30px 0 30px;
    }

    .oefeningen {
        padding: 80px 30px 80px 30px;
    }

    .hydrate {
        margin: 80px 30px 60px 30px;
    }

    .footer {
        padding: 50px 30px 50px 30px;
    }

    .title222 {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .rowtips1 {
        margin-left: 0;
    }

    .rowtips2 {
        flex-wrap: wrap;
        justify-content: center;
    }

    .tipunit :nth-child(3) {
        width: min(100%, 515px);
    }

    .oefnrow {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hydrate :nth-child(3) {
        width: min(100%, 670px);
    }

    .ftrow {
        max-width: 1140px;
        margin: 0 auto;
        width: 100%;
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 12px 14px;
        flex-wrap: wrap;
        gap: 10px;
        height: auto;
        align-items: center;
        justify-content: space-between;
    }

    .nav-left {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: flex-start;
    }

    .hamburger {
        display: flex;
        position: static;
        transform: none;
        margin-left: 0;
    }

    .nav-links {
        order: 2;
        width: 100%;
        display: none;
        flex-direction: column;
        gap: 8px;
        background: var(--bg-panel);
        border: 1px solid var(--border-subtle);
        border-radius: 10px;
        padding: 10px;
        margin-top: 8px;
    }

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

    .nav-links a {
        padding: 8px 10px;
        font-size: calc(var(--font-base) * 0.9);
    }

    .modes {
        order: 1;
        flex: 0 1 auto;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 45px 16px;
    }

    .nav-links a {
        font-size: calc(var(--font-base) * 0.75);
        padding: 7px 8px;
    }
}

.hero {
    min-height: 45vh;
    background: var(--bg-page);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    max-width: 700px;
    padding: 80px 24px 60px;
}

.hero h1 {
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.hero p {
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    color: var(--text-muted);
    line-height: 1.6;
}

.regel222 {
    background-color: var(--bg-stats);
    width: 100%;
    max-width: 1140px;
    margin: 0 auto 200px;
    padding: 112px 40px;
    box-sizing: border-box;
    min-height: 529px;
}

.regel222 p {
    color: var(--text-secundair);
}

.title222 {
    display: flex;
    width: 100%;
    align-items: center;
    margin-bottom: 48px;
}

.rowtips1 {
    margin-left: 15px;
}

.rowtips1 :nth-child(1) {
    font-weight: 600;
    font-size: calc(var(--font-base) * 2.5);
}

.rowtips1 :nth-child(2) {
    font-size: calc(var(--font-base) * 0.9375);
    color: #fff;
    opacity: 60%;
}

.content222 {
    display: flex;
    justify-content: space-between;
    max-width: 1140px;
    margin: 0 auto;
    gap: 24px;
}

.unit222 :nth-child(1) {
    font-weight: 600;
    font-size: calc(var(--font-base) * 4.5);
    color: var(--text-secundair);
    margin-bottom: 11px;
}

.unit222 :nth-child(2) {
    font-size: calc(var(--font-base) * 1.0625);
    font-weight: 500;
    color: var(--text-secundair);
    margin-bottom: 8px;
}

.unit222 :nth-child(3) {
    font-weight: 300;
    font-size: calc(var(--font-base) * 0.875);
    color: #FFF;
    opacity: 60%;
}

.algmtips {
    display: flex;
    flex-direction: column;
    width: min(100%, 1140px);
    max-width: 1140px;
    height: auto;
    margin: 112px auto 0 auto;
    padding: 0 40px;
    margin-bottom: 112px;
}

.algmtipstitle {
    font-weight: 600;
    font-size: calc(var(--font-base) * 3);
    margin-bottom: 67px;
}

.algmtipscontent {
    display: flex;
    flex-direction: column;
    gap: 64px;
}

.rowtips2 {
    display: flex;
    gap: 64px;
}

.tipunit :nth-child(3) {
    width: 515px;
    color: var(--text-muted);
    font-size: calc(var(--font-base) * 0.9375);
    font-weight: 300;
}

.tipunit :nth-child(2) {
    font-size: calc(var(--font-base) * 1.3125);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.oefeningen {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 109px 20px 112px 20px;
    align-items: center;
    padding-bottom: 112px;
    background-color: var(--bg-secundair);
    box-sizing: border-box;
}

.oefntitle {
    display: flex;
    flex-direction: column;
}

.oefntitle :nth-child(1) {
    font-weight: 600;
    font-size: calc(var(--font-base) * 3);
    color: var(--text-primary);
    margin-bottom: 22px;
}

.oefntitle :nth-child(2) {
    font-weight: 300;
    font-size: calc(var(--font-base) * 1.0625);
    color: var(--text-muted);
    width: 660px;
}

.oefncontent {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.oefnrow {
    display: flex;
    gap: 24px;
}

.oefnunit {
    width: 350px;
    height: 128px;
    border: 1px solid;
    border-color: var(--border-subtle);
    display: flex;
    flex-direction: column;
    padding: 25px;
}

.oefnrow2 {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.oefnrow2 p:first-child {
    font-size: calc(var(--font-base) * 1.0625);
    font-weight: 600;
    color: var(--text-primary);
}

.oefnrow2 p:last-child {
    font-size: calc(var(--font-base) * 0.75);
    font-weight: 500;
    color: var(--text-ghost);
    margin: 0;
}

.oefnunit p:nth-child(2) {
    color: var(--text-ghost);
    font-size: calc(var(--font-base) * 0.875);
    font-weight: 300
}


.hydrate {
    margin-top: 108px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 85px;
}

.hydrate :nth-child(1) {
    font-size: calc(var(--font-base) * 3.5);
}

.hydrate :nth-child(2) {
    color: var(--text-primary);
    font-weight: 600;
    font-size: calc(var(--font-base) * 2);
    margin: 15px 0 15px 0;
}

.hydrate :nth-child(3) {
    color: var(--text-muted);
    font-weight: 300;
    font-size: calc(var(--font-base) * 1.0625);
    width: 670px;
    text-align: center;
}

.footer {
    background-color: var(--bg-secundair);
    width: 100%;
    height: 335px;
    padding: 64px 0 64px 0;
}


.ftrow {
    display: flex;
    justify-content: space-around;
    margin-top: 23px;
}

.ftline {
    background-color: var(--border-subtle);
    height: 1px;
    width: 90%;
    margin: 0 auto;
    margin-top: 84px;
    margin-bottom: 23px;
}

.ftclosure {
    font-size: calc(var(--font-base) * 0.6875);
    color: var(--text-ghost);
    text-align: center;
}


.ftergo :nth-child(1) {
    font-weight: 500;
    font-size: calc(var(--font-base) * 1);
    color: var(--text-primary);
}

.ftergo :nth-child(2) {
    font-size: calc(var(--font-base) * 0.8125);
    color: var(--text-muted);
    width: 360px;
}

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

.ftnav {
    display: flex;
    flex-direction: column;
}

.ftnav p {
    font-size: calc(var(--font-base) * 0.8125);
    color: var(--text-primary);
}

.ftnav a {
    color: var(--text-muted);
    font-size: calc(var(--font-base) * 0.8125);
}

.ftinfo :nth-child(1) {
    font-weight: 500;
    font-size: calc(var(--font-base) * 0.8125);
    color: var(--text-primary);
}

.ftinfo :nth-child(2) {
    font-size: calc(var(--font-base) * 0.8125);
    color: var(--text-muted);
    width: 200px;
}

/* Responsive Styles */

@media (max-width: 1024px) {
    .regel222 {
        padding: 80px 30px 80px 30px;
    }

    .algmtips {
        margin: 80px auto 0 auto;
        padding: 0 30px 0 30px;
    }

    .oefeningen {
        padding: 80px 30px 80px 30px;
    }

    .hydrate {
        margin: 80px 30px 60px 30px;
    }

    .footer {
        padding: 50px 30px 50px 30px;
    }

    .title222 {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .rowtips1 {
        margin-left: 0;
    }

    .rowtips2 {
        flex-wrap: wrap;
        justify-content: center;
    }

    .tipunit :nth-child(3) {
        width: min(100%, 515px);
    }

    .oefnrow {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hydrate :nth-child(3) {
        width: min(100%, 670px);
    }

    .ftrow {
        max-width: 1140px;
        margin: 0 auto;
        width: 100%;
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .hero-content {
        padding: 60px 20px 40px;
    }

    .regel222 {
        padding: 40px 20px 40px 20px;
        height: auto;
        margin-bottom: 100px;
    }

    .title222 {
        margin-bottom: 24px;
    }

    .content222 {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .unit222 {
        text-align: center;
    }

    .algmtips {
        margin: 40px 20px 0 20px;
        padding: 0 20px 0 20px;
        height: auto;
        margin-bottom: 56px;
    }

    .algmtipstitle {
        margin-bottom: 33px;
    }

    .algmtipscontent {
        gap: 32px;
    }

    .rowtips2 {
        flex-direction: column;
        gap: 32px;
    }

    .tipunit :nth-child(3) {
        width: auto;
    }

    .oefeningen {
        padding: 56px 20px 56px 20px;
        padding-bottom: 56px;
    }

    .oefntitle :nth-child(1) {
        font-size: calc(var(--font-base) * 2);
        margin-bottom: 11px;
    }

    .oefntitle :nth-child(2) {
        width: auto;
    }

    .oefncontent {
        gap: 15px;
    }

    .oefnrow {
        flex-direction: column;
        gap: 15px;
    }

    .oefnunit {
        width: auto;
        height: auto;
        padding: 20px;
    }

    .hydrate {
        margin: 54px 20px 42px 20px;
        margin-bottom: 42px;
    }

    .hydrate :nth-child(1) {
        font-size: calc(var(--font-base) * 2.5);
    }

    .hydrate :nth-child(2) {
        font-size: calc(var(--font-base) * 1.5);
        margin: 10px 0 10px 0;
    }

    .hydrate :nth-child(3) {
        width: auto;
        text-align: center;
    }

    .footer {
        padding: 32px 20px 32px 20px;
        height: auto;
    }

    .ftrow {
        flex-direction: column;
        gap: 20px;
        margin-top: 0;
    }

    .ftergo :nth-child(2) {
        width: auto;
    }

    .ftinfo :nth-child(2) {
        width: auto;
    }
}