@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}
html body {
    background-size: cover;
    background-position: center;
}
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.navigation {
    margin-left: -300px;
}
.navigation a {
    font-size: 1.1em;
    color: #FBF5F5FF;
    text-decoration: none;
    margin-right: 40px;
    font-weight: 500;
    transition: .3s;
}
.navigation a:hover {
    color: #7d2ae8;
}

.home {
    position: relative;
    width: 100%;
    min-height: 94vh;
    display: grid;
    grid-template-columns: minmax(0, 750px) minmax(280px, 420px);
    justify-content: center;
    align-items: start;
    gap: 70px;
    padding: 140px 80px 80px;
}

footer {
    width: 100%;
}

footer p {
    color: #fff;
    text-align: center;
    padding: 10px 0;
}

@media (max-width: 900px) {
    header {
        padding: 20px 30px;
    }

    .navigation {
        display: none;
    }

    .home {
        padding: 110px 25px 50px;
    }

}
@media (max-width: 750px) {
    .home {
        grid-template-columns: minmax(0, 1fr);
        gap: 50px;
    }
}

:root {
    --page-gutter: clamp(1rem, 4vw, 5rem);
    --header-height: 86px;
    --content-width: 1350px;
}

html {
    min-width: 280px;
    overflow-x: hidden;
    scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 15% 15%, rgba(125, 42, 232, 0.2), transparent 32rem),
        radial-gradient(circle at 85% 80%, rgba(47, 168, 180, 0.11), transparent 28rem),
        #17151d;
}

main,
body > section {
    flex: 1 0 auto;
}

.navigation {
    min-width: 0;
    margin-left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(1rem, 2.6vw, 2.5rem);
}

.navigation a {
    margin-right: 0;
    padding: 0.55rem 0;
    font-size: clamp(0.9rem, 1.2vw, 1.05rem);
    white-space: nowrap;
}

.navigation a[aria-current="page"] {
    color: #a56aef;
    text-shadow: 0 0 18px rgba(165, 106, 239, 0.65);
}

.site-header {
    padding: 1rem var(--page-gutter);
    background: rgba(23, 21, 29, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
}

button:focus-visible,
a:focus-visible,
select:focus-visible {
    outline: 3px solid #caa6ff;
    outline-offset: 3px;
}

.menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    padding: 11px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    color: #fff;
    background: rgba(125, 42, 232, 0.14);
    border: 1px solid rgba(165, 106, 239, 0.45);
    border-radius: 10px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 5px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.site-header.menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-header.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
}

.site-header.menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

footer {
    flex: 0 0 auto;
}

footer p {
    padding: 0.9rem var(--page-gutter);
    color: #c8c8c8;
    font-size: clamp(0.72rem, 1.5vw, 0.9rem);
}

@media (max-width: 1180px) {
    :root {
        --page-gutter: clamp(1.5rem, 4vw, 3.5rem);
    }

    .projects-layout {
        grid-template-columns: 230px minmax(0, 1fr);
        gap: 1.5rem;
    }

    .projects-grid {
        gap: 1.2rem;
    }

    .project-card {
        padding: 1.4rem;
    }
}

@media (max-width: 960px) {
    :root {
        --header-height: 74px;
    }

    .site-header {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 0.8rem;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .site-header .logo {
        grid-column: 1;
    }

    .site-header .btn-talk {
        grid-column: 2;
        justify-self: end;
    }

    .menu-toggle {
        grid-column: 3;
        display: flex;
    }

    .navigation {
        position: absolute;
        top: 100%;
        left: var(--page-gutter);
        right: var(--page-gutter);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: 0;
        padding: 0 0.75rem;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-0.5rem);
        background: rgba(35, 35, 35, 0.98);
        border: 1px solid rgba(165, 106, 239, 0.28);
        border-radius: 0 0 14px 14px;
        box-shadow: 0 18px 35px rgba(0, 0, 0, 0.38);
        transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.2s ease, transform 0.3s ease, visibility 0.3s;
    }

    .navigation a {
        width: 100%;
        padding: 0.85rem 0.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .navigation a:last-child {
        border-bottom: 0;
    }

    .site-header.menu-open .navigation {
        max-height: 420px;
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

}

@media (max-width: 720px) {
    :root {
        --page-gutter: clamp(1rem, 4.5vw, 1.5rem);
    }

}

@media (max-width: 520px) {
    :root {
        --header-height: 68px;
    }

    .site-header {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .site-header .btn-talk {
        display: none;
    }

    .menu-toggle {
        grid-column: 2;
        width: 44px;
        height: 44px;
    }

    .navigation {
        left: 0.75rem;
        right: 0.75rem;
    }

}

@media (max-width: 350px) {
    :root {
        --page-gutter: 0.75rem;
    }

}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.tones-page {
        width: min(100%, 760px);
        margin: 0 auto;
        padding: 130px var(--page-gutter) 55px;
    }

    .quiz-card {
        padding: clamp(1.5rem, 5vw, 3.5rem);
        color: #fff;
        text-align: center;
        background:
            linear-gradient(145deg, rgba(57, 37, 78, 0.96), rgba(30, 29, 38, 0.96)),
            radial-gradient(circle at top right, rgba(165, 106, 239, 0.3), transparent 18rem);
        border: 1px solid rgba(190, 145, 255, 0.38);
        border-radius: 24px;
        box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38), 0 0 60px rgba(125, 42, 232, 0.1);
    }

    .eyebrow {
        margin-bottom: 0.45rem;
        color: #b98cf1;
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.16em;
        text-transform: uppercase;
    }

    .quiz-card h1 {
        font-size: clamp(1.8rem, 5vw, 2.8rem);
    }

    .quiz-intro {
        margin: 0.7rem auto 1.8rem;
        color: #c8c3d0;
    }

    .difficulty-picker {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .range-picker {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.65rem;
        margin-bottom: 1.25rem;
    }

    .range-button {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
        padding: 0.8rem 0.5rem;
        color: #c8d5e5;
        background: rgba(9, 17, 31, 0.38);
        border: 1px solid var(--line);
        border-radius: 12px;
        font: inherit;
        cursor: pointer;
        transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    }

    .range-button span {
        color: var(--muted);
        font-size: 0.7rem;
    }

    .range-button:hover,
    .range-button.is-selected {
        color: #fff;
        background: rgba(45, 212, 191, 0.14);
        border-color: var(--cyan);
    }

    .range-button:hover {
        transform: translateY(-2px);
    }

    .difficulty-button,
    .answer-button,
    .next-button,
    .play-tone-button {
        font: inherit;
        cursor: pointer;
        transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    }

    .difficulty-button {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
        padding: 0.85rem;
        color: #d4cedd;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 12px;
    }

    .difficulty-button span {
        font-size: 0.75rem;
    }

    .difficulty-button.is-selected {
        color: #fff;
        background: rgba(125, 42, 232, 0.35);
        border-color: #c197ff;
        box-shadow: 0 0 0 3px rgba(161, 103, 239, 0.14);
    }

    .ramp-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.65rem;
        margin: 0 auto 1.3rem;
        color: #d4cedd;
        font-size: 0.85rem;
        cursor: pointer;
    }

    .ramp-toggle input {
        position: absolute;
        opacity: 0;
    }

    .toggle-track {
        position: relative;
        width: 2.5rem;
        height: 1.4rem;
        background: #57515f;
        border-radius: 999px;
        transition: background 0.2s ease;
    }

    .toggle-track::after {
        position: absolute;
        top: 0.2rem;
        left: 0.2rem;
        width: 1rem;
        height: 1rem;
        background: #fff;
        border-radius: 50%;
        content: "";
        transition: transform 0.2s ease;
    }

    .ramp-toggle input:checked + .toggle-track {
        background: #7d2ae8;
    }

    .ramp-toggle input:checked + .toggle-track::after {
        transform: translateX(1.1rem);
    }

    .ramp-toggle input:focus-visible + .toggle-track {
        outline: 2px solid #fff;
        outline-offset: 3px;
    }

    .difficulty-button:hover,
    .answer-button:hover,
    .next-button:hover {
        transform: translateY(-2px);
    }

    .quiz-status {
        display: flex;
        justify-content: space-between;
        margin: 1rem 0 1.4rem;
        color: #bdb6c8;
        font-size: 0.85rem;
    }

    .quiz-status strong {
        color: #fff;
    }

    .play-tone-button {
        padding: 0.9rem 1.7rem;
        color: #fff;
        background: linear-gradient(135deg, #9149f0, #6c21c9);
        border: 0;
        border-radius: 999px;
        font-weight: 600;
    }

    .play-tone-button:hover {
        background: linear-gradient(135deg, #a762ff, #7d2ae8);
        transform: translateY(-2px);
    }

    .play-tone-button span {
        margin-right: 0.35rem;
    }

    .tone-controls {
        display: flex;
        justify-content: center;
        gap: 0.7rem;
        flex-wrap: wrap;
    }

    .instrument-picker {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.7rem;
        margin: 0 auto 1.2rem;
        color: #d4cedd;
        font-size: 0.85rem;
    }

    .setup-instrument {
        margin-bottom: 1.4rem;
    }

    .setup-label {
        margin-bottom: 0.65rem;
        color: var(--muted);
        font-size: 0.82rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

    .instrument-picker select {
        padding: 0.45rem 0.7rem;
        color: #fff;
        background: #3d334c;
        border: 1px solid rgba(165, 106, 239, 0.55);
        border-radius: 8px;
        font: inherit;
    }

    .instrument-name {
        margin: 0 auto 1.2rem;
        color: #d4cedd;
        font-size: 0.85rem;
    }

    .stop-tone-button {
        padding: 0.9rem 1.7rem;
        color: #fff;
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.35);
        border-radius: 999px;
        font: inherit;
        cursor: pointer;
        transition: transform 0.2s ease, border-color 0.2s ease;
    }

    .stop-tone-button:hover:not(:disabled) {
        border-color: #ff8d98;
        transform: translateY(-2px);
    }

    .stop-tone-button:disabled {
        cursor: not-allowed;
        opacity: 0.45;
    }

    .stop-tone-button span {
        margin-right: 0.35rem;
    }

    .tone-help {
        margin: 0.7rem 0 2rem;
        color: #a9a2b3;
        font-size: 0.78rem;
    }

    .answer-label {
        margin-bottom: 0.8rem;
        font-weight: 600;
    }

    .answer-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .answer-button {
        padding: 1rem 0.75rem;
        color: #fff;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.17);
        border-radius: 12px;
    }

    .answer-button:hover {
        background: rgba(165, 106, 239, 0.18);
        border-color: rgba(190, 145, 255, 0.7);
    }

    .answer-button:disabled:not(.is-correct):not(.is-wrong) {
        opacity: 0.7;
    }

    .answer-button:disabled {
        cursor: default;
    }

    .answer-button.is-correct {
        background: rgba(38, 178, 108, 0.25);
        border-color: #45d18c;
    }

    .answer-button.is-wrong {
        background: rgba(220, 70, 87, 0.25);
        border-color: #f27682;
    }

    .feedback {
        min-height: 1.5rem;
        margin: 1.25rem 0 0.8rem;
        font-weight: 600;
    }

    .feedback.is-correct {
        color: #64e5a3;
    }

    .feedback.is-wrong {
        color: #ff8d98;
    }

    .next-button {
        padding: 0.7rem 1.2rem;
        color: #fff;
        background: transparent;
        border: 1px solid #a56aef;
        border-radius: 999px;
        font-weight: 600;
    }

    .next-button[hidden] {
        display: none;
    }

    .start-button {
        margin-top: 1.25rem;
    }

    .home {
        width: min(100%, var(--content-width));
        min-height: auto;
        margin: auto;
        padding: calc(var(--header-height) + 4rem) var(--page-gutter) 4rem;
        display: block;
    }

    .home-hero {
        max-width: 760px;
        margin: 0 auto;
        padding: clamp(2rem, 7vw, 5rem);
        color: #fff;
        text-align: center;
        background:
            linear-gradient(145deg, rgba(57, 37, 78, 0.96), rgba(30, 29, 38, 0.96)),
            radial-gradient(circle at top right, rgba(165, 106, 239, 0.3), transparent 18rem);
        border: 1px solid rgba(190, 145, 255, 0.38);
        border-radius: 24px;
        box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38), 0 0 60px rgba(125, 42, 232, 0.1);
    }

    .home-hero h1 {
        font-size: clamp(2.2rem, 7vw, 4.5rem);
        line-height: 1.1;
    }

    .home-hero > p:not(.eyebrow) {
        max-width: 540px;
        margin: 1rem auto 0;
        color: #c8c3d0;
    }

    .home-actions {
        display: flex;
        justify-content: center;
        gap: 0.75rem;
        flex-wrap: wrap;
        margin-top: 2rem;
    }

    .home-action {
        padding: 0.75rem 1rem;
        color: #fff;
        text-decoration: none;
        border: 1px solid rgba(165, 106, 239, 0.55);
        border-radius: 999px;
        font-size: 0.85rem;
        transition: transform 0.2s ease, background 0.2s ease;
    }

    .home-action:hover {
        background: rgba(125, 42, 232, 0.25);
        transform: translateY(-2px);
    }

    .home-action.primary-action {
        background: linear-gradient(135deg, #9149f0, #6c21c9);
        border-color: #9149f0;
    }

@media (max-width: 520px) {
        .home {
            padding-top: calc(var(--header-height) + 2rem);
        }

        .home-actions {
            flex-direction: column;
        }

        .home-action {
            display: block;
        }
    }

@media (max-width: 480px) {
        .tones-page {
            padding-top: 100px;
        }

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

        .range-picker {
            grid-template-columns: 1fr;
        }
}

/* Audio-inspired palette */
:root {
    --ink: #09111f;
    --surface: #111d2e;
    --surface-light: #1a2a40;
    --cyan: #2dd4bf;
    --cyan-bright: #67e8f9;
    --amber: #fbbf24;
    --muted: #9fb0c5;
    --line: rgba(148, 163, 184, 0.24);
}

body {
    color: #f1f5f9;
    background:
            radial-gradient(circle at 8% 12%, rgba(45, 212, 191, 0.16), transparent 30rem),
            radial-gradient(circle at 92% 78%, rgba(251, 191, 36, 0.1), transparent 28rem),
            var(--ink);
}

.site-header {
    background: rgba(9, 17, 31, 0.78);
    border-bottom-color: rgba(103, 232, 249, 0.14);
}

.navigation a {
    color: #dbeafe;
}

.navigation a:hover,
.navigation a[aria-current="page"] {
    color: var(--cyan-bright);
    text-shadow: 0 0 18px rgba(103, 232, 249, 0.55);
}

.menu-toggle {
    color: var(--cyan-bright);
    background: rgba(45, 212, 191, 0.1);
    border-color: rgba(103, 232, 249, 0.38);
}

button:focus-visible,
a:focus-visible,
select:focus-visible {
    outline-color: var(--amber);
}

.quiz-card,
.home-hero {
    background:
            linear-gradient(145deg, rgba(26, 42, 64, 0.97), rgba(15, 29, 47, 0.97)),
            radial-gradient(circle at top right, rgba(45, 212, 191, 0.2), transparent 20rem);
    border-color: rgba(103, 232, 249, 0.25);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42), 0 0 70px rgba(45, 212, 191, 0.08);
}

.eyebrow {
    color: var(--cyan-bright);
}

.quiz-intro,
.home-hero > p:not(.eyebrow) {
    color: #b8c7d9;
}

.difficulty-button {
    color: #c8d5e5;
    background: rgba(9, 17, 31, 0.38);
    border-color: var(--line);
}

.difficulty-button.is-selected {
    background: rgba(45, 212, 191, 0.14);
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.12);
}

.toggle-track {
    background: #52637a;
}

.ramp-toggle input:checked + .toggle-track {
    background: var(--cyan);
}

.play-tone-button,
.home-action.primary-action {
    color: #07131f;
    background: linear-gradient(135deg, var(--cyan-bright), var(--cyan));
    border-color: var(--cyan);
    box-shadow: 0 8px 22px rgba(45, 212, 191, 0.2);
}

.play-tone-button:hover,
.home-action.primary-action:hover {
    background: linear-gradient(135deg, #a5f3fc, var(--cyan-bright));
}

.stop-tone-button {
    border-color: rgba(248, 113, 113, 0.55);
}

.stop-tone-button:hover:not(:disabled) {
    border-color: #f87171;
}

.answer-button {
    background: rgba(9, 17, 31, 0.42);
    border-color: var(--line);
}

.answer-button:hover {
    background: rgba(45, 212, 191, 0.13);
    border-color: rgba(103, 232, 249, 0.72);
}

.answer-button.is-correct {
    background: rgba(52, 211, 153, 0.18);
    border-color: #34d399;
}

.answer-button.is-wrong {
    background: rgba(248, 113, 113, 0.16);
    border-color: #f87171;
}

.feedback.is-correct {
    color: #6ee7b7;
}

.feedback.is-wrong {
    color: #fca5a5;
}

.next-button,
.home-action {
    border-color: var(--cyan);
}

.next-button:hover,
.home-action:hover {
    background: rgba(45, 212, 191, 0.12);
}

.instrument-picker select {
    color: #e0f2fe;
    background: var(--surface);
    border-color: rgba(103, 232, 249, 0.45);
}

/* Calm, low-contrast finish */
:root {
    --ink: #171a20;
    --surface: #222832;
    --surface-light: #2b333e;
    --cyan: #8ea9bd;
    --cyan-bright: #b6c9d6;
    --amber: #d1b77a;
    --muted: #a5afbb;
    --line: rgba(185, 198, 211, 0.2);
}

body {
    background:
        radial-gradient(circle at 15% 10%, rgba(142, 169, 189, 0.07), transparent 28rem),
        var(--ink);
}

.site-header {
    background: rgba(23, 26, 32, 0.9);
    border-bottom-color: rgba(185, 198, 211, 0.12);
}

.navigation a,
.navigation a:hover,
.navigation a[aria-current="page"] {
    color: #d5dbe1;
    text-shadow: none;
}

.navigation a:hover,
.navigation a[aria-current="page"] {
    color: var(--cyan-bright);
}

.menu-toggle {
    color: var(--cyan-bright);
    background: rgba(142, 169, 189, 0.08);
    border-color: rgba(185, 198, 211, 0.25);
}

.quiz-card,
.home-hero {
    background: linear-gradient(145deg, #29313b, #20252d);
    border-color: rgba(185, 198, 211, 0.2);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
}

.eyebrow {
    color: var(--cyan-bright);
}

.difficulty-button.is-selected,
.range-button:hover,
.range-button.is-selected {
    color: #eef2f5;
    background: rgba(142, 169, 189, 0.16);
    border-color: var(--cyan);
    box-shadow: none;
}

.play-tone-button,
.home-action.primary-action {
    color: #1b222a;
    background: #a9bbc8;
    border-color: #a9bbc8;
    box-shadow: none;
}

.play-tone-button:hover,
.home-action.primary-action:hover {
    background: #c3d0d9;
}

.answer-button:hover {
    background: rgba(142, 169, 189, 0.12);
    border-color: rgba(185, 198, 211, 0.48);
}

.next-button:hover,
.home-action:hover {
    background: rgba(142, 169, 189, 0.1);
}

.feedback.is-correct {
    color: #9bc5aa;
}

.feedback.is-wrong {
    color: #d7a1a1;
}

.answer-button.is-correct {
    background: rgba(104, 153, 119, 0.18);
    border-color: #82b08d;
}

.answer-button.is-wrong {
    background: rgba(165, 103, 103, 0.16);
    border-color: #c58f8f;
}
