/* Sitewide Variables */

:root {
    --primary_text_color: white;
    --primary_background_color: #161616;
    --secondary_background_color: #080808;
    /* background-color: #0A090C */
    /* background-color: #1C2121; */
    
    --navbar_height: 4.5rem;
    #navbar.thin { --navbar_height: 2.5rem; }
}

@media (max-width: 1600px) and (min-width: 720px) {
    html { font-size: 0.85rem; }
}


/* Fonts */

@font-face {
    font-family: "Antonio";
    src: url("../fonts/Antonio-VariableFont_wght.ttf");
}

@font-face {
    font-family: "ClashDisplay";
    src: url("../fonts/ClashDisplay-Variable.ttf");
}

@font-face {
    font-family: "Lexend";
    src: url("../fonts/Lexend-VariableFont_wght.ttf");
}

@font-face {
    font-family: "BodoniModa";
    src: url("../fonts/BodoniModa-VariableFont_opsz\,wght.ttf");
}

@font-face {
    font-family: "PlayfairDisplay";
    src: url("../fonts/PlayfairDisplay-VariableFont_wght.ttf");
}

@font-face {
    font-family: "Doto";
    src: url("../fonts/Doto-VariableFont_wght.ttf");
}


/* Reusable Components */

.header {
    margin: 0;
    
    text-align: center;
    
    font-family: Lexend, sans-serif;
    font-size: var(--font_size, 8.5rem);
    font-weight: 700;
    
    line-height: calc(var(--font_size, 8.5rem) + 0.5rem);
    
    text-shadow: 2px 2px 4px #111;
}

@media (max-width: 600px) {
    .header {
        font-size: var(--font_size_sm, 4.5rem);
        line-height: calc(var(--font_size_sm, 5rem) + 0.5rem);
    }
}

.shadowed_text {
    mask: linear-gradient(to var(--shadow_direction, bottom), black, black 50%, transparent);
}

.box {
    background-color: var(--secondary_background_color);
    border: 1px solid #ccc;
    box-shadow: 8px 8px 12px rgba(0,0,0,0.8);
}


/* Default and Page-Independent Styles */

@layer main {
    html, body {
        height: 100%;
        width: 100%;
    }
    
    body {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        
        min-height: 100vh;
        
        margin: 0;
        
        color: var(--primary_text_color);
        background-color: var(--primary_background_color);
        
        --bg_line_color: rgba(170, 170, 170, 0.02);
        
        background-image: repeating-linear-gradient(to top left, var(--bg_line_color), transparent 100px, transparent 120px), linear-gradient(to top right in oklch, #060606 50%, #242424, #606064);
        background-attachment: fixed;
        
        font-family: serif;
    }
    
    main {
        margin-top: 6rem;
    }
    
    #navbar {
        position: fixed;
        top: 0;
        left: 0;
        
        display: flex;
        justify-content: space-between;
        align-items: center;
        
        width: 100vw;
        height: fit-content;
        box-sizing: border-box;
        padding: 1em;
        padding-bottom: 5em; /* extra space below to extend background gradient */
        
        z-index: 100;
        pointer-events: none;
        
        #key_logo {
            pointer-events: all;
            height: var(--navbar_height);
            
            transition: padding-bottom 0.5s ease-in-out, height 0.5s ease-in-out;
            
            img {
                filter: drop-shadow(3px 5px 5px rgba(0,0,0,0.8));
                height: 100%;
            }
        }
        
        #mobile_hamburger_button {
            pointer-events: all;
            height: 3em;
            
            background: none;
            border: none;
            
            img {
                height: 100%;
                aspect-ratio: 1/1;
            }
        }
        
        #nav_options {
            display: flex;
            justify-content: center;
            align-items: center;
            pointer-events: all;
            
            gap: 2em;
            padding-right: 1em;
            
            a {
                display: inline-block;
                
                color: white;
                text-decoration: none;
                font-family: Lexend;
                text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
                
                transition: transform 0.2s ease-in-out;
            }
            a.active {
                text-decoration: underline;
            }
            a:visited {
                color: white;
            }
            a:hover {
                transform: translate(0, -0.1em);
            }
        }
    }
    
    #navbar.thin {
        padding-bottom: 2em;
    }
    
    #navbar::before { /* navbar background effects */
        content: "";
        position: absolute;
        inset: 0;
        z-index: -100;
        
        background-color: rgba(0,0,0,0.6);
        backdrop-filter: blur(8px);
        mask-image: linear-gradient(to bottom, black, transparent);
    }
    
    #mobile_hamburger_button {
        display: none;
    }
    
    @media (max-aspect-ratio: 1/1), (max-width: 720px) {
        #nav_options {
            position: absolute;
            top: 0;
            left: 0;
            
            flex-direction: column;
            
            z-index: -100;
            
            width: 100%;
            
            padding-top: calc(var(--navbar_height) + 2rem);
            padding-bottom: 2rem;
            
            pointer-events: none;
            
            transform: scaleY(0%);
            transform-origin: top;
            transition: transform 0.3s ease-in-out, padding 0.3s ease-in-out;
            
            background-color: rgba(0,0,0,0.95);
            /* background-image: linear-gradient(to bottom, rgba(0,0,0,0.8), rgba(0,0,0,0.8) 90%, transparent); */
        }
        
        #mobile_hamburger_button {
            display: inline;
        }
        
        #nav_options.mobile_menu_open {
            pointer-events: all;
            
            transform: scaleY(100%);
        }
    }
    
    
    /* footer */
    
    #footer {
        color: #ddd;
        background-image: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
        
        #copyright {            
            p {
                width: 100%;
                margin: 0;
                
                padding-top: 1em;
                padding-bottom: 1em;
                
                text-align: center;
                font-family: Lexend, sans-serif;
                font-weight: 300;
            }
        }
    }
}