:root {
    --card-background: rgba(1, 1, 1, 0.5);
    --card-border: #fff;
    --card-hover-border: #cbd5e1;
    --text-color: white;
    --highlight-color: #cbd5e1;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
@font-face {
    font-family: 'Monolisa';
    src: url('../tff/monolisa.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* Use font-display: swap for better performance */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

@font-face {
    font-family: 'Protest Regular';
    src: url('../tff/protest_regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

@font-face {
    font-family: 'Protest Light';
    src: url('../tff/protest_light.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

/* Apply fonts to headings */
h1 {
    font-family: 'Protest Regular', sans-serif;
}

h2 {
    font-family: 'Protest Light', sans-serif;
}

.navbar {
    font-family: 'Monolisa', sans-serif;
    background-color: #222;
    overflow: hidden;
    width: 100%;
    height: 64px; /* Ensure consistent height across pages */
    position: sticky !important;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2vw 0 2vw;
    z-index: 1000;
    isolation: isolate;
}

.navbar-logo {
    display: flex;
    align-items: center;
    z-index: 10;
    /* Ensure logo stays above the dither effect */
}

.navbar-logo img {
    height: calc(1vw + 28px);
    /* Adjust this value based on your logo size */
    width: auto;
    margin-right: 1vw;
}

#navbar-effect {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    position: relative;
    z-index: 1001;
}

#navbar-effect ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
    z-index: 1002;
}

.nav-link {
    color: gray;
    text-decoration: none;
    padding: 15px 1.5vw;
    display: block;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease, transform 0.2s ease;
    font-size: calc(0.2vh + (0.25em + 0.6vw));
}

.nav-item:hover .nav-link {
    color: #ffffffab;
    transform: translateY(-2px);
}

/* Add styles for active nav item */
.nav-item.active .nav-link {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    font-weight: 500;
    background-color: rgba(50, 50, 50, 0.1);
    border-radius: 4px;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.3s ease, left 0.3s ease;
    pointer-events: none;
}

.nav-item:hover::after {
    width: 100%;
    left: 0;
}

.nav-item.active::after {
    width: 100%;
    left: 0;
    background: #fff;
    height: 2px;
}

.navbar::before,
footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(135deg,
            rgba(0, 0, 0, 0.1) 25%,
            transparent 25%,
            transparent 50%,
            rgba(0, 0, 0, 0.1) 50%,
            rgba(0, 0, 0, 0.1) 75%,
            transparent 75%,
            transparent 100%);
    background-size: 8px 8px;
    opacity: 0.6;
    animation: ditherMove 2s linear infinite;
    pointer-events: none;
}

.navbar::after,
footer::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(0, 0, 0, 0.2) 1px, transparent 1px);
    background-size: 4px 4px;
    opacity: 0.4;
    animation: ditherScatter 1.5s linear infinite reverse;
    pointer-events: none;
    z-index: 0;
}

footer {
    z-index: 1000;
    width: 100%;
    background-color: #222;
    overflow: hidden;
    position: relative !important;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.3vw 1vw 0.3vw 1vw;
    isolation: isolate;
}

footer p {
    color: white;
    text-decoration: none;
    font-size: calc(0.3em + 0.6vw);;
    padding: 10px 15px;
    position: relative;
    transition: color 0.3s ease;
}

footer p:hover {
    color: #ddd;
}

footer p:last-child {
    font-size: calc(0.18em + 0.35vw) !important;
    opacity: 0.7 !important;
}

@keyframes ditherMove {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 8px 8px;
    }
}

@keyframes ditherMove2 {
    0% {
        background-position: 0 0;
        filter: contrast(2);
    }

    75% {
        background-position: 4px 4px;
        filter: contrast(0.9);
    }

    100% {
        background-position: 0 0;
        filter: contrast(2);
    }
}

@keyframes ditherScatter {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 4px 4px;
    }
}

@keyframes moveUpDown {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
        filter: contrast(150%);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes backgroundImageAnimation {
    0% {
        background-position: 0 0;
        filter: contrast(1.2);
        filter: brightness(1.1);
        opacity: 0.9;
    }
    50% {
        background-position: 0 2vh;
        filter: brightness(1.25);
        opacity: 1;
    }
    100% {
        background-position: 0 0;
        opacity: 1;
        filter: contrast(1.2);
        filter: brightness(1.1);
        opacity: 0.9;
    }
}

/* Common Page Intro Section Styling */
.page-intro {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 2rem;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.section-title {
    padding-top: 2rem;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 0.5rem;
    font-weight: normal;
    color: white;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
}

.intro-text {
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.6;
    font-size: 1.1rem;
    color: #cbd5e1;
}

/* Common Navigation Buttons Styling */
.page-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem auto;
    max-width: 800px;
    padding: 1rem;
    background-color: rgba(10, 10, 10, 0.6);
    border-radius: 8px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
    position: relative;
}

.nav-btn {
    background-color: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: Monolisa, sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    min-width: 140px;
    justify-content: center;
}

.nav-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.nav-btn:hover, .nav-btn.active {
    background-color: white;
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.nav-btn:hover i, .nav-btn.active i {
    transform: scale(1.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
        padding-top: 1.5rem;
    }
    
    .page-nav {
        gap: 0.6rem;
        margin: 1.5rem auto;
        padding: 0.8rem;
    }
    
    .nav-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        min-width: 120px;
    }
    
    .nav-btn i {
        font-size: 1rem;
    }
    
    /* Footer responsive styles for tablets */
    footer {
        padding: 8px !important;
    }
    
    footer p {
        font-size: 0.85rem !important;
    }
    
    footer p:last-child {
        font-size: 0.5rem !important;
        opacity: 0.7 !important;
        right: 8px !important;
    }
}

@media (max-width: 500px) {
    .section-title {
        font-size: 1.8rem;
        padding-top: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .intro-text {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    /* Footer responsive styles */
    footer {
        padding: 5px !important;
    }
    
    footer p {
        font-size: 0.7rem !important;
    }
    
    footer p:last-child {
        font-size: 0.4rem !important;
        opacity: 0.7 !important;
        right: 5px !important;
    }
    
    .page-nav {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Section Separator */
.section-separator {
    width: 100%;
    height: 30px;
    position: relative;
    margin: 1.5rem 0;
    overflow: hidden;
}

.section-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(203, 213, 225, 0.3), transparent);
    border-radius: 50%;
    overflow: hidden;
}
