:root {
    --bg-color: #232323;
    --text-color: #eaeaea;
    --accent-1: #c0d6df;
    --accent-2: #560c78;
    --accent-3: #b92826;
    --accent-4: #ec652b;
    --accent-5: #edac3c;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    font-family: "gimlet-text-narrow", serif;
    background-image: linear-gradient(to right, #1ab7f515 1px, transparent 1px), linear-gradient(to bottom, #1ab7f515 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Typography */
.h1 {
    font-family: "agency-fb", sans-serif;
    font-weight: 700;
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.h2 {
    font-family: "vinyl", sans-serif;
    color: var(--accent-1);
    font-weight: 400;
    font-size: 2rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.h2-margin-extra {
    margin-bottom: 1.5rem;
}

.h2-margin-small {
    margin-bottom: 0.25rem;
}

.h3 {
    font-family: "vinyl", sans-serif;
    font-weight: 400;
    font-size: 1.75rem;
    font-style: italic;
    margin-bottom: 1rem;
}

.p {
    font-family: "gimlet-text-narrow", serif;
    font-style: normal;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.blockquote {
    font-family: "vista-sans-narrow", sans-serif;
    font-weight: 200;
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
    border-left: 3px solid var(--accent-4);
    padding-left: 1rem;
    letter-spacing: 0.05rem;
}

.list-item {
    font-family: "vista-sans-narrow", sans-serif;
    font-weight: 200;
    font-style: normal;
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
    text-indent: 1rem;
    padding-left: 3rem;
    letter-spacing: 0.05rem;
}

.accent-1 {
    font-family: "sizmo-line", sans-serif;
    font-weight: 300;
    font-size: 2.5rem;
    color: var(--accent-4);
}

.invert-color {
    filter: invert(1);
}

/* Scrolling container */
.scrollable-container {
    display: flex;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    height: 100vh;
    width: 100vw;
    overscroll-behavior-x: contain;
    position: relative;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    scroll-behavior: smooth;
}

/* Properly handle snap scrolling - critical for MacOS-style swipe UX */
.scroll-snap-mode {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.scrollable-container::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

/* Logo art that stays fixed */
.brand-logo-sticky {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3rem 6rem 3rem 6rem;
    opacity: 0.5;
}

/* Slide styling */
.slide {
    flex: 0 0 100vw;
    height: 100vh;
    display: flex;
    scroll-snap-align: center;
    position: relative;
}

.slide-content {
    width: 100%;
    height: 100%;
    padding: 5rem;
    padding-left: 23%;
    padding-bottom: 20%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Navigation sidebar */
.nav-sidebar {
    position: fixed;
    width: 180px;
    height: fit-content;
    border-radius: 11px;
    filter: drop-shadow(0 0.25rem 0.75rem rgba(0, 0, 0, 0.426));
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    padding-top: 1.5rem;
    backdrop-filter: blur(8px);
    background: linear-gradient(20deg, #b2729f20, #bc82ab59);
    border-left: 1px solid #75565c3b;
    border-top: 1px solid #75565c3b;
    border-right: 1px solid #c67c8a44;
    border-bottom: 1px solid #c370813b;
    font-family: system-ui, sans-serif;
    font-size: 0.9rem;
    text-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.426);
    margin: 1rem;
    row-gap: 0.8rem;
    z-index: 10;
    text-align: center;
}

.nav-title {
    font-family: "system-ui", sans-serif;
    text-align: center;
    font-size: 1rem;
    font-style: normal;
    margin-bottom: 0.25rem;
    color: #eaeaea;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    font-family: system-ui, sans-serif;
    font-size: 0.7rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.nav-link {
    background: linear-gradient(100deg, #1698b5a3, #34a7c1b6);
    padding: 0.33rem;
    border-left: 1px solid #2d869ab6;
    border-top: 1px solid #2d869a8c;
    border-right: 1px solid #45b3ccc3;
    border-bottom: 1px solid #50b9d1cd;
    backdrop-filter: blur(5px);
    border-radius: 4px;
    text-decoration: none;
    filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, 0.518));
    color: #eaeaea;
    transition: all 0.2s ease;
    font-family: system-ui, sans-serif;
    display: block;
    cursor: pointer;
}

.nav-link:hover {
    background: linear-gradient(190deg, #b6cbd3, #4f6d78);
    border: 1px solid #5d7a86;
    color: #eaeaea;
    transform: translateY(-1px);
}

.nav-link:active {
    background: linear-gradient(190deg, #4f6d78, #6d8b96);
    border: 1px solid #5d7a86;
    color: #eaeaea;
    transform: translateY(-1px);
}

.nav-link.active {
    background: linear-gradient(190deg, #edac3c, #966a1f);
    border: 1px solid #e5ad4d52;
    color: #eaeaea;
    transform: translateY(-1px);
}

/* Navigation arrows */
.nav-arrows {
    position: fixed;
    bottom: 2rem;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 2rem;
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.5s ease;
}

.nav-arrows.hidden {
    opacity: 0.7;
}

.arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 253, 246, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.2s ease;
    border: none;
}

.arrow:hover {
    background-color: rgba(255, 253, 246, 0.8);
    transform: scale(1.1);
}

.arrow:active {
    transform: scale(0.95);
}

.keyboard-hint {
    position: fixed;
    bottom: 0.5rem;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.5;
    font-family: system-ui, sans-serif;
}

/* Footer */
.footer-copyright {
    position: fixed;
    bottom: 0.5rem;
    right: 0.5rem;
    width: 100%;
    text-align: right;
    font-size: 0.8rem;
    opacity: 0.5;
    font-family: system-ui, sans-serif;
    color: #eaeaea;
}

/* Mobile navigation */
.mobile-nav-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 20;
    width: 40px;
    height: 40px;
    filter: drop-shadow(2px 4px 3px #0000004d);
    background-color: #fffdf62b;
    backdrop-filter: blur(5px);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    overflow: hidden;
    border: 2px solid rgba(255, 253, 246, 0.3);
}

.mobile-nav-toggle::after {
    content: "☰";
    font-family: system-ui, sans-serif;
    font-size: 1.6rem;
    display: block;
    transition: transform 0.3s ease;
    color: #1698b5;
}

.mobile-nav-toggle.active::after {
    content: "×";
    font-size: 2rem;
}

.mobile-nav {
    display: none;
    position: fixed;
    flex-direction: column;
    gap: 1rem;
    border-radius: 11px;
    top: 0;
    right: 0;
    width: 280px;
    margin: 0.25rem;
    height: fit-content;
    filter: drop-shadow(2px 4px 6px black);
    background-color: rgba(50, 50, 50, 0.85);
    backdrop-filter: blur(10px);
    padding: 4rem 1.5rem 1.5rem 1.5rem;
    z-index: 15;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
    border-left: 1px solid rgba(255, 253, 246, 0.2);
    border-top: 1px solid rgba(255, 253, 246, 0.2);
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav-content {
    width: 100%;
}

.mobile-nav-title {
    font-family: system-ui, sans-serif;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 1rem;
    color: #eaeaea;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    font-family: system-ui, sans-serif;
    font-size: 0.7rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.mobile-nav .nav-link {
    background: linear-gradient(100deg, #1698b5a3, #34a7c1b6);
    padding: 0.33rem;
    border-radius: 4px;
    text-decoration: none;
    color: #eaeaea;
    transition: all 0.2s ease;
    font-family: system-ui, sans-serif;
    display: block;
    cursor: pointer;
    border-left: 1px solid #2d869ab6;
    border-top: 1px solid #2d869a8c;
    border-right: 1px solid #45b3ccc3;
    border-bottom: 1px solid #50b9d1cd;
    filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, 0.518));
}

.mobile-nav .nav-link:hover {
    background: linear-gradient(190deg, #b6cbd3, #4f6d78);
    border: 1px solid #5d7a86;
    transform: translateY(-1px);
}

.mobile-nav .nav-link:active {
    background: linear-gradient(190deg, #4f6d78, #6d8b96);
    border: 1px solid #5d7a86;
    transform: translateY(-1px);
}

.mobile-nav .nav-link.active {
    background: linear-gradient(190deg, #edac3c, #966a1f);
    border: 1px solid #e5ad4d52;
    transform: translateY(-1px);
}

/* Media queries */
@media (max-width: 768px) {
    .nav-sidebar {
        display: none;
    }

    .slide-content {
        width: 100%;
        padding: 1.5rem;
        padding-top: 2rem;
    }

    .brand-logo-sticky {
        width: 100%;
        padding: 0 1rem 5rem 1rem;
    }

    .mobile-nav-toggle,
    .mobile-nav {
        display: flex;
    }

    .mobile-nav.active {
        display: flex;
        transform: translateX(0);
    }

    /* Simplified approach to nullify the active styling on mobile */
    .mobile-nav .nav-link.active {
        background: linear-gradient(100deg, #1698b5a3, #34a7c1b6);
        border-left: 1px solid #2d869ab6;
        border-top: 1px solid #2d869a8c;
        border-right: 1px solid #45b3ccc3;
        border-bottom: 1px solid #50b9d1cd;
        transform: none;
    }

    .h1 {
        font-size: 2.2rem;
    }

    .h2 {
        font-size: 1.5rem;
    }

    .p {
        font-size: 0.9rem;
    }

    .list-item {
        font-size: 0.9rem;
        padding-left: 1.25rem;
        text-indent: 0.5rem;
        margin-top: 0rem;
        margin-bottom: 1rem;
    }

    .accent-1 {
        font-size: 1.8rem;
    }

    .blockquote {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .pixel-container {
        max-height: 4rem;
    }

    /* Make arrows more visible on mobile */
    .nav-arrows {
        opacity: 0.9;
        bottom: 3rem;
    }

    .keyboard-hint {
        margin-bottom: 1.2rem;
    }

    .footer-copyright {
        font-size: 0.7rem;
        opacity: 0.3;
    }
}

.audio-reaction {
    opacity: 0;
    transition: opacity 1s ease;
}

.audio-reaction.visible {
    opacity: 1;
}