/* Variable colors */
:root {
    --bg-black: #000;
    --bg-dark-red: #6e2108;
    --bg-gray: #333;
    --bg-light-gray: #636363;
    --bg-maroon: #9d3636;
    --bg-pale-gray: #d1d0d0;
    --bg-pale-pink: #f9cccc;
    --bg-pale-white: black;
    --bg-red: #bc3a0e;
    --bg-white: #fff;
    --hd-red: #ff4f15a3;
    --hd-mobile: #ff4f1572;
    --nav-bright-red: #eb4213;
    --nav-dark-red: #9b3636;
    --nav-light-gray: #636363;
    --nav-pale-gray: #9c9b9b;
    --nav-pink: #fea8a8;
    --nav-red: #bc3a0e;
    --nav-text-black: #000;
    --nav-text-white: #fff;
    --shadow-black: rgba(0, 0, 0, 0.35);
    --text-black: #000;
    --text-white: #fff;
    --transparent-pink: rgba(255, 158, 158, 0.579);
    --transparent-red: rgba(245, 68, 68, 0.77);
    --transparent: rgba(0, 0, 0, 0);
}
  
/* All */
* {
    box-sizing: border-box;
}

/* Main nav bar */
nav.desktop {
    min-width: 700px;
    background: var(--bg-white);
    position: fixed;
    width: 100%;
    text-align: center;
    left: 0;
    opacity: 1;
    padding: 0.3rem;
    z-index: 20;
    transition: opacity 0.8s ease-out;
    box-shadow: 4px 4px 20px -2px var(--shadow-black);
}

nav.desktop .active {
    background-color: var(--nav-light-gray);
    color: var(--nav-text-white);
    box-shadow: 4px 4px 0 0 var(--nav-pale-gray);
    z-index: 21;
}

nav.desktop .active:hover {
    background-color: var(--nav-pale-gray);
    color: var(--nav-text-black);
    box-shadow: -4px -4px 0 0 var(--nav-light-gray);
    z-index: 21;
}

nav.desktop .wip {
    text-decoration: line-through;
}

/* Main nav bar buttons */
.nav-link {
    background-color: var(--nav-red);
    color: var(--nav-text-white);
    display: inline-block;
    list-style: none;
    text-decoration: none;
    white-space: nowrwrap;
    box-shadow: 4px 4px 0 0 var(--nav-pink);
    font-size: 16px;
    font-weight: 400;
    margin: 2px;
    opacity: 100;
    padding: 10px;
    transition: background-color 0.8s ease-out, 
        box-shadow 0.5s ease-out, color 0.5s ease-out, opacity 1s ease-out;
}

/* Main nav bar buttons when mousing over */
.nav-link:hover {
    font-weight: 700;
    list-style: none;
    text-decoration: none;
    background-color: var(--nav-pink);
    color: var(--nav-text-black);
    box-shadow: -4px -4px 0 0 var(--nav-red);
    opacity: 100;
    transition: background-color 0.5s ease-out, 
        box-shadow 0.3s ease-out, color 0.3s ease-out, opacity 0.8s ease-out;
}

.nav-link::after {
    color: transparent;
    content: attr(title);
    display: block;
    font-weight: 700;
    height: 1px;
    overflow: hidden;
    visibility: hidden;
}

/* Mobile nav bar - hidden */
nav.mobile {
    height: 0;
    opacity: 0;
    transition: opacity 0.3s ease-out, visibility 2s;
    visibility: hidden;
}

/* Home Icon */
.bi-house-fill {
    position: relative;
    display: inline-block;
    margin-right: 10px;
}

nav.desktop .active:hover .home-icon .bi-house-fill {
    animation-name: move-home;
    animation-duration: 3s;
    animation-iteration-count: 1;
}

@keyframes move-home {
    0%   { transform: translateY(0); }
    10%  { transform: translateY(0); }
    30%  { transform: translateY(calc(-2px - 0.5vh)); }
    50%  { transform: translateY(0); }
    58%  { transform: translateY(-5px); }
    65%  { transform: translateY(0); }
    100% { transform: translateY(0); }
}

/* Dark mode toggles - hidden */
/* .toggle {
    height: 0;
    visibility: hidden;
}

.toggleDark {
    height: 0;
    visibility: hidden;
}

.toggleLight {
    height: 0;
    visibility: hidden;
} */

/* Background image */
header {
    position: relative;
    padding-top: calc(3em + 1.5vh);
    height: 30rem;
}

/* Header right alignment */
header ul {
    position: relative;
    text-align: right;
}

header::before {
    content: "";
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%; 
    height: calc(100% + 20vh);
    margin-bottom: 100px;
    background-image: url("../images/tree_tunnel.jpg");
    background-size: cover;
    background-repeat: repeat;
    background-attachment: fixed;
    background-position: center;
    filter: none;
    transition: filter 2s ease-out;
}

header:hover::before {
    filter: blur(1px) grayscale(100%);
    transition: filter 4s ease-out;
}

/* Header Name */
p.name {
    position: relative;
    background-color: var(--hd-red);
    color: var(--text-white);
    display: inline-block;
    list-style-type: none;
    text-align: right;
    font-size: 5rem;
    font-weight: 800;
    margin: 0px;
    padding: 5px;
    right: 0;
    width: 100%;
    transition: font-size 0.3s ease-out;
}

/* Header Name when mousing over */
p.name:hover {
    font-size: 6rem;
    transition: font-size 0.3s ease-out;
}

/* Titles below Header name */
.title {
    background-color: var(--hd-red);
    color: var(--text-white);
    display: inline-block;
    list-style-type: none;
    font-size: calc(1.15rem + 1vh);
    margin-bottom: 4px;
    margin: 2px;
    padding: 0.25em 5px;
    transition: font-size 0.3s ease-out;
}

/* Titles when mousing over */
.title:hover {
    font-size: calc(1.15rem + 1.5vh);
    transition: font-size 0.3s ease-out;
}

/* Main */
main {
    display: block;
    text-align: center;
    min-height: calc(100vh - 40vh);
}

/* Body */
body {
    margin: 0;
    background-color: var(--bg-white);
}

/* Body intro */
.intro h2 {
    border-radius: 100px;
    display: inline-block;
    color: var(--text-white);
    margin-bottom: 0;
    margin-top: 22vh;
    min-width: 175px;
    width: auto;
    padding: 5px;
    font-size: calc(1.5rem + 1vw);
    text-align: center;
    position: relative;
    -moz-transform: rotateZ(5deg);
    -ms-transform: rotateZ(5deg);
    -o-transform: rotateZ(5deg);
    -webkit-transform: rotateZ(5deg);
    transform: rotateZ(5deg);
    background-color: var(--transparent-pink);
    transition: transform 0.3s ease-out, -moz-transform 0.3s ease-out, 
        -ms-transform 0.3s ease-out, -o-transform 0.3s ease-out, -webkit-transform 0.3s ease-out;
}

.intro h2:hover {
    transform: rotateZ(-5deg);
    transition: transform 0.8s ease-out, -moz-transform 0.8s ease-out, 
        -ms-transform 0.8s ease-out, -o-transform 0.8s ease-out, -webkit-transform 0.8s ease-out;
}

.intro-hd {
    animation-name: bounce;
    animation-duration: 3s;
    animation-iteration-count: infinite;
    text-align: center;
}

/* Animation for .intro-hd */ 
@keyframes bounce {
    0%   { transform: scale(1, 1) translateY(0); }
    10%  { transform: scale(1.4, 0.8) translateY(0); }
    30%  { transform: scale(0.8, 1.1)   translateY(calc(-2px - 0.3vh)); }
    50%  { transform: scale(1.15, 0.8) translateY(0); }
    58%  { transform: scale(1, 1) translateY(-5px); }
    65%  { transform: scale(1, 1) translateY(0); }
    100% { transform: scale(1, 1) translateY(0); }
}

.intro p {
    display: inline-block;
    text-align: center;
    font-size: 18px;
    max-width: 600px;
    min-width: 15vw;
}

.display {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
    text-align: center;
    justify-content: center;
}

.display a {
    display: flex;
    text-decoration: none;
}

.display a:visited .contents {
    text-decoration: none;
    background: linear-gradient(var(--bg-pale-gray), 
        var(--bg-light-gray), var(--bg-gray)) !important;
}

.display .contents {
    padding: 2px 10px;
    background: var(--bg-pale-gray);
    box-shadow: inset 8px 8px 0 0 var(--nav-pink), 
        inset 20px 20px 20px -2px var(--shadow-black) !important;
}

.display h2 {
    font-size: 24px;
    color: var(--text-black);
}

.display .description {
    font-size: 18px;
    color: var(--text-black);
}

.card {
    display: flex;
    justify-content: center;
    margin: 10px;
    min-width: 350px;
    max-width: 320px;
    padding: 15px;
    box-shadow: 8px 8px 0 0 var(--nav-pink), 
        20px 20px 20px -2px var(--shadow-black);
    background: linear-gradient(var(--bg-red), 
        var(--bg-maroon), var(--bg-dark-red));
    transition: transform 1s ease-out, box-shadow 1s ease-out;
}

.card:hover {
    z-index: 10;
    transform: scale(1.1);
    box-shadow: 8px 8px 0 0 var(--nav-pink), 
        20px 20px 20px 0 var(--shadow-black), 
        -20px -20px 20px 0 var(--shadow-black);
    transition: transform 0.5s ease-out, box-shadow 0.5s ease-out;
}

.display .contents h2 {
    margin-left: 5px;
    margin-right: 5px;
    background-color: var(--bg-pale-pink);
    width: 100%;
    text-align: center;
}

.display:visited .contents h2 {
    background-color: var(--bg-pale-gray);
}

.card .image {
    padding: 20px;
}

/* Entire page */
.container {
    padding-top: 1rem;
    z-index: 0;
}

/* Footer */
footer {
    text-align: center;
    padding-top: 25px;
    background: var(--bg-dark-red);
    color: var(--text-white);
    height: 200px;
}

footer h2 {
    font-size: 30px;
}

footer .contact {
    font-size: 14px;
}

footer .contact a {
    font-weight: 700;
    color: var(--text-white);
    justify-content: center;
}

footer .contact a .email {
    transition: transform 1s ease-out;
    display: inline-block;
}

footer .contact a .email:hover {
    transform: scale(1.2);
    transition: transform 0.5s ease-out;
}

/* For screens with less than 700px */
@media only screen and (max-width: 700px) {

    /* Hides the default nav bar */
    nav.desktop {
        height: 0;
        opacity: 0;
        transition: opacity 0.8s ease-out;
        visibility: hidden;
    }

    /* Hides the default nav bar buttons */
    .nav-link {
        height: 0;
        opacity: 0;
        transition: opacity 0.8s ease-out;
        visibility: hidden;
    }

    /* Mobile nav bar */
    nav.mobile {
        width: 95%;
        height: inherit;
        margin: auto;
        margin-top: 20px;
        position: relative;
        opacity: 1;
        transition: opacity 2s ease-out, visibility 2s;
        visibility: visible;
        z-index: 30;
    }

    nav.mobile .wip {
        text-decoration: line-through;
    }

    /* Mobile nav bar - unhide */
    .nav-dropdown {
        opacity: 1;
        transition: opacity 2s ease-out, visibility 2s;
        z-index: 20;
    }

    .nav-dropdown:hover .home.icon .bi-house-fill {
        animation-name: move-home;
        animation-duration: 3s;
        animation-iteration-count: 1;
    }

    /* Mobile nav bar - formatting */
    nav.mobile h2 {
        padding-left: 15px;
        font-size: 1.5rem;
        border-radius: 2px;
        position: relative;
        background: var(--nav-red);
        height: fit-content;
        text-transform: uppercase;
        margin-bottom: 0;
        color: var(--nav-text-white);
        font-weight: 300;
        display: flex;
        flex: 1;
        justify-content: center;
        align-items: center;
        box-shadow: 4px 4px 0 0 var(--nav-pink), 
            4px 4px 20px -2px var(--shadow-black);
        transition: all 0.4s;
    }

    /* Mobile nav bar - hover animation */
    nav.mobile:hover h2 {
        font-weight: 400;
        background: var(--nav-dark-red);
        box-shadow: -4px -4px 0 0 var(--nav-pink), 
            2px 2px 5px -1px var(--shadow-black);
        transition: background-color 0.5s ease-out, 
            box-shadow 0.2s ease-out, color 0.3s ease-out, opacity 0.8s ease-out;
    }

    /* Mobile nab bar - hide checkbox */
    #nav-toggle {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        z-index: 1;
        opacity: 0;
        cursor: pointer;
        height: 40px;
    }

    /* Mobile nav bar - triangle */
    nav.mobile h2::after {
        content: "";
        position: relative;
        height: 40px;
        background: currentColor;
        display: flex;
        align-items: center;
        aspect-ratio: 1;
        right: 0;
        top: 0;
        padding-top: 0;
        padding-right: 1rem;
        margin-left: 0rem;
        clip-path: polygon(50% 25%, 20% 80%, 80% 80%);
        transform: rotate(180deg) scale(0.75);
        transition: background-color 0.5s ease-out, transform 0.2s ease-out,
            box-shadow 0.2s ease-out, color 0.3s ease-out;
    }

    /* Mobile nav bar - flip arrow on click */
    #nav-toggle:not(:checked) ~ h2::after {
        transform: rotate(0deg) scale(0.5);
        transition: transform 0.2s ease-out;
    }

    /* Mobile nav bar - color change */
    #nav-toggle:not(:checked) ~ h2 {
        font-weight: 600;
        color: var(--nav-text-black);
        background: var(--nav-pink);
        box-shadow: -4px -4px 0 0 var(--nav-red);
        transition: background-color 0.5s ease-out, transform 0.2s ease-out,
            box-shadow 0.2s ease-out, color 0.3s ease-out;
    }

    /* Mobile nav bar - hides dropdown menu */
    #nav-toggle:checked ~ ul, .nav-dropdown > summary::before {
        visibility: hidden;
        opacity: 0;
        z-index: -20;
        transform: translateY(-70px);
        transition: opacity 0.3s ease-in-out,
            transform 0.3s ease-in-out, visibility 0.3s;
    }

    /* Mobile nav bar - unhides dropdown menu w/ animation */
    #nav-toggle:not(:checked) ~ ul {
        opacity: 1;
        z-index: -20;
        transform: translateY(0px);
        transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    }
    
    /* Mobile nav bar - dropdown menu background formatting */
    nav.mobile ul {
        font-size: 20px;
        padding-left: 0;
        padding-top: 0.5rem;
        margin-top: 0;
        border-radius: 6px;
        background: var(--bg-pale-gray);
        list-style: none;
        overflow: hidden;
        text-align: right;
        text-align: center;
        opacity: 0.5;
        width: 100%;
        position: absolute;
    }

    /* Mobile nav bar - dropdown menu foreground formatting */
    nav.mobile ul li {
        color: var(--nav-text-white);
        border-radius: 2px;
        position: relative;
        display: inline-block;
        line-height: 2;
        width: 100%;
        margin: 0 0 0.25rem 0;
        background-color: var(--nav-bright-red);
        transition: background-color 3s, color 3s ease-out;
        box-shadow: 2px 2px 10px -2px var(--shadow-black);
    }

    /* Mobile nav bar - dropdown menu hover formatting */
    nav.mobile ul li:hover {
        color: var(--nav-text-white);
        background-color: var(--nav-pink);
        transition: background-color 0.45s, color 0.45s ease-out;
    }

    /* Mobile nav bar - dropdown menu foreground formatting */
    nav.mobile ul li.active {
        background-color: var(--nav-pale-gray);
        transition: background-color 3s ease-out;
    }

    /* Mobile nav bar - dropdown menu foreground formatting */
    nav.mobile ul li.active:hover {
        background-color: var(--bg-light-gray);
        transition: background-color 0.45s ease-out;
    }

    /* Mobile nav bar - dropdown menu link formatting */
    nav.mobile ul a {
        display: block;
        color: inherit;
        font-weight: 300;
        text-decoration: none;
    }

    /* Mobile nav bar - hover dropdown menu link formatting */
    nav.mobile ul a:hover {
        display: block;
        color: inherit;
        font-weight: 600;
        text-decoration: none;
    }

    header::before {
        top: 0; 
        left: 0;
        width: 100%; 
        height: calc(100%);
        margin-bottom: 50px;
    }
    
    /* Header name with more transparency */
    p.name {
        background-color: var(--hd-mobile);
        font-size: 2.8rem;
        font-weight: 700;
        transition: font-size 0.5s ease-out, background-color 0.8s ease-out;
    }

    /* Header name when mousing over */
    p.name:hover {
        background-color: var(--hd-red);
        font-size: 4rem;
        transition: font-size 0.5s ease-out, background-color 0.8s ease-out;
    }

    /* Titles below Header name with more transparency */
    .title {
        background-color: var(--hd-mobile);
        font-size: calc(0.5rem + 2vh);
        transition: font-size 0.3s ease-out, background-color 0.8s ease-out;
    }

    /* Titles when mousing over */
    .title:hover {
        background-color: var(--hd-red);
        font-size: calc(1.15rem + 1.5vh);
        transition: font-size 0.3s ease-out, background-color 0.8s ease-out;
    }

    /* Body intro */
    .intro h2 {
        margin-bottom: 0;
        margin-top: 2vh;
    }

    /* Intro paragraph */
    .intro p {
        display: inline-block;
        text-align: center;
        font-size: 18px;
        padding-left: 20px;
        padding-right: 20px;
        max-width: 600px;
        margin-bottom: 2px;
        min-width: 15vw;
    }
    
    .card {
        min-width: 150px;
        max-width: 320px;
    }

    .card .image {
        min-width: 150px;
        padding: 5px;
    }

    .a .image {
        padding-top: 0;
    }

    .d .image {
        padding-bottom: 5px;
        padding-top: 0px;
    }
    
    .e .image {
        padding-bottom: 5px;
        padding-top: 0px;
    } 

    /* Footer */
    footer {
        text-align: center;
        padding-top: 5px;
        background: var(--bg-dark-red);
        color: var(--text-white);
        height: 150px;
    }
    
    footer h2 {
        font-size: 24px;
    }
    
    footer .contact {
        font-size: calc(8px + 1.5vw);
    }
    
    footer .contact a {
        font-weight: 700;
        color: var(--text-white);
        display: flex;
        justify-content: center;
    }
    
    footer .contact a .email {
        padding: 5px;
        background-color: var(--bg-dark-red);
        transition: transform 1s ease-out;
    }
    
    footer .contact a .email:hover {
        transform: scale(1.15);
        transition: transform 0.5s ease-out;
    }
}