@layer properties {
    @property --bg-position {
        syntax: "<number>";
        inherits: true;
        initial-value: 100;
    }

    @property --after-blur {
        syntax: "<number>";
        inherits: true;
        initial-value: 0;
    }

    @property --after-opacity {
        syntax: "<number>";
        inherits: true;
        initial-value: 1;
    }

    @property --before-opacity {
        syntax: "<number>";
        inherits: true;
        initial-value: 0.3;
    }

    @property --btn-offset {
        syntax: "<number>";
        inherits: true;
        initial-value: 1;
    }

    @property --btn-scale {
        syntax: "<number>";
        inherits: true;
        initial-value: 1;
    }
}

:root {
    --primary: #eeeeee;
    --secondary: #6d41be;
    --tertiary: #92be41;

    --debug: 0;
    --body-bg: hsl(0, 0%, 6%);
    --btn-bg: hsl(0, 0%, 0%);
    --btn-border-width: 1.5;
    --btn-offset: 1;
    --btn-scale: 1;

    --after-bg: linear-gradient(to right,
            var(--color-white),
            var(--color-white),
            var(--color-cyan),
            var(--color-blue),
            var(--color-purple),
            var(--color-pink),
            var(--color-red),
            var(--color-yellow),
            var(--color-lime),
            var(--color-white),
            var(--color-white));
    --after-blur: 10;
    --after-opacity: 1;
    --after-pos-y: 10;

    --before-opacity: 0.3;

    /* positions */
    --bg-position: 100;
    --color-white: hsl(0, 0%, 100%);
    --color-cyan: hsl(180, 100%, 50%);
    --color-blue: hsl(240, 100%, 50%);
    --color-purple: hsl(270, 100%, 50%);
    --color-pink: hsl(330, 40%, 70%);
    --color-red: hsl(0, 100%, 50%);
    --color-yellow: hsl(60, 100%, 50%);
    --color-lime: hsl(90, 100%, 75%);
    --color-orange: oklch(69.1% 0.223 36.85);
    --color-dark-cyan: hsl(180, 100%, 20%);
    --color-dark-blue: hsl(240, 100%, 20%);
    --color-dark-purple: hsl(270, 100%, 20%);
    --color-dark-pink: hsl(330, 40%, 20%);
    --color-dark-red: hsl(0, 100%, 20%);
    --color-dark-yellow: hsl(60, 100%, 20%);
    --color-dark-lime: hsl(90, 100%, 20%);
}

@supports (color: color(display-p3 0 0 0)) {
    :root {
        --color-white: color(display-p3 1 1 1);
        --color-cyan: color(display-p3 0 1 1);
        --color-blue: color(display-p3 0 0 1);
        --color-purple: color(display-p3 0.5 0 1);
        --color-pink: color(display-p3 1 0.4 0.7);
        --color-red: color(display-p3 1 0 0);
        --color-yellow: color(display-p3 1 1 0);
        --color-lime: color(display-p3 0.75 1 0);
        --color-orange: color(display-p3 0.96 0.39 0.2);
    }
}

#cta {
    display: inline-block;
    text-decoration: none;
    background: transparent;
    border-width: 0;
    transform: scale(var(--btn-scale));
    transition: --bg-position 3s ease, --after-blur 0.3s ease,
        --before-opacity 0.3s ease, --btn-offset 0.3s ease,
        --btn-scale 0.2s cubic-bezier(0.76, -0.25, 0.51, 1.13);
    justify-self: center;
}

#cta>div {
    display: block;
    padding: 1.25rem 3rem;
    background: var(--btn-bg);
    color: hsl(0, 0%, 0%);
    font-weight: bold;
    border-radius: 8px;
    font-size: 1.5rem;
    position: relative;
    cursor: pointer;
    z-index: 0;
    text-align: center;
}

#cta>div:not(:hover) {
    transition: --after-blur 0.3s ease;
}

#cta>div>span {
    background: none;
    background-clip: unset;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    color: inherit;
    letter-spacing: 0.15ch;
    font-weight: 600;
}

#cta>div:after {
    display: block;
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    background: var(--after-bg) no-repeat calc(var(--bg-position) * 1%) 0% / 900%;
    transform: translateY(calc(var(--after-pos-y) * 1px));
    left: 0;
    top: 0;
    z-index: -2;
    filter: blur(calc(var(--after-blur) * 1px));
    opacity: var(--after-opacity);
}

#cta>div:before {
    content: "";
    display: block;
    position: absolute;
    width: calc(100% + calc(calc(var(--btn-border-width) * 2) * 1px));
    height: calc(100% + calc(calc(var(--btn-border-width) * 2) * 1px));
    background: linear-gradient(to right,
            var(--color-white),
            var(--color-white),
            var(--color-cyan),
            var(--color-blue),
            var(--color-purple),
            var(--color-pink),
            var(--color-red),
            var(--color-yellow),
            var(--color-lime),
            var(--color-white),
            var(--color-white)) no-repeat calc(var(--bg-position) * 1%) 0% / 900%;
    border-radius: 9px;
    z-index: -1;
    top: calc(var(--btn-border-width) * -1px);
    left: calc(var(--btn-border-width) * -1px);
    opacity: var(--before-opacity);
}

#cta:hover {
    --btn-scale: 1.05;
    --bg-position: 0;
    --after-bg: linear-gradient(to right,
            var(--color-white),
            var(--color-white),
            var(--color-cyan),
            var(--color-blue),
            var(--color-purple),
            var(--color-pink),
            var(--color-red),
            var(--color-yellow),
            var(--color-lime),
            var(--color-white),
            var(--color-white));
    --after-blur: 30;
    --after-opacity: 0.3;
    --after-pos-y: 0;
    --before-opacity: 1;
    --btn-offset: 5;
}

#cta:hover>div>span {
    background: linear-gradient(to right,
            var(--btn-bg),
            var(--btn-bg),
            var(--color-dark-cyan),
            var(--color-dark-blue),
            var(--color-dark-purple),
            var(--color-dark-pink),
            var(--color-dark-red),
            var(--color-dark-yellow),
            var(--color-dark-lime),
            var(--btn-bg),
            var(--btn-bg)) no-repeat calc(var(--bg-position) * 1%) 0% / 900%;

    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

#cta:hover:active {
    --btn-scale: 0.98;
    --after-blur: 15;
}

body {
    overflow-x: hidden;
    margin: 0;
    font-family: 'Oxanium', sans-serif;
    background-color: var(--primary);
}

#hero {
    background-image: url('../images/rockyMountains.webp');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    width: 100%;
    display: grid;
    place-content: center;
    font-size: 2.5rem;
    color: var(--primary);
    height: 96vh;
}

#desktopMenu ul {
    list-style-type: none;
    display: flex;
    padding: 0;
    margin: 0;
}

header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
    z-index: 1000;
}

nav a {
    text-decoration: none;
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

nav a:hover {
    background-color: var(--tertiary);
    transition: background-color 0.2s ease-in-out;
    color: #000;
}

#resume #downloadResume {
    display: block;
    margin: 20px auto !important;
    width: fit-content;
}

#downloadResume {
    color: #FFF;
    background-color: var(--secondary);
    cursor: pointer;
    border: none;
    border-radius: 5px;
    padding: 16px 24px;
}

#downloadResume:hover {
    animation: resumeAnimation 2s infinite alternate;
    animation: pulse 2s infinite alternate;
    background-color: var(--tertiary);
    color: #000;
}

#mobileMenu,
#hamburger {
    display: none;
}

img {
    max-width: 100%;
    max-height: auto;
}

.missionText {
    padding-left: 5%;
    padding-right: 5%;
    font-family: "Crimson Text", serif;
    font-style: italic;
    font-size: 1.8rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    color: #000;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
    border-left: 4px solid var(--secondary);
    padding-left: 20px;
}

html {
    scroll-padding-top: 2rem;
    scroll-behavior: smooth;
}

.mission-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    gap: 1rem;
    justify-content: center;
}

.mission-content img {
    max-width: 200px;
    height: auto;
}

fieldset {
    border: none;
    padding-left: 0;
}

form {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 500px;
    min-width: 300px;
    margin: 0 auto;
    padding: 1rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.25rem;
}

.radio-option label {
    display: inline;
    margin-bottom: 0;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    width: auto;
    margin: 0;
    cursor: pointer;
    transform: scale(1.2);
    accent-color: var(--secondary);
}

#contact-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

#contact-image,
#contact-form {
    flex: 1;
    min-width: 300px;
}

.parent {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 4px;
    padding: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.child {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    min-height: 150px;
}

.child p {
    text-align: center;
}

.child img {
    height: 100px;
    width: auto;
}

.sectionHeaders {
    text-align: center;
    margin: 0;
    color: #000;
    font-size: 2rem;
}

.certificateHeader {
    text-align: center;
    font-weight: 400;
}

#resume,
#about-me {
    background-color: #fff;
}

.contentSection {
    padding: 2rem;
}

#mission,
#skills,
#contact {
    background: linear-gradient(to bottom,
            #fff 0%,
            #eee 10%,
            #eee 90%,
            #fff 100%);
}

.contactText {
    text-align: center;
    font-weight: 400;
    font-size: 1.25rem;
}

/* Certificate Carousel */
.container * {
    box-sizing: border-box;
}

.container {
    position: relative;
    max-width: 790px;
    margin: auto;
}

.mySlides {
    display: none;
}

.cursor {
    cursor: pointer;
}

/* Next & previous buttons */
.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 40%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: #bbb;
    font-weight: bold;
    font-size: 20px;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover,
.next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.numbertext {
    color: #f2f2f2;
    font-size: 12px;
    padding: 8px 12px;
    position: absolute;
    top: 0;
}

.caption-container {
    text-align: center;
    background-color: #222;
    padding: 2px 16px;
    color: white;
}

.row:after {
    content: "";
    display: table;
    clear: both;
}

/* Six columns side by side */
.column {
    float: left;
    width: 16.66%;
}

.demo {
    opacity: 0.6;
}

.active,
.demo:hover {
    opacity: 1;
}


/* Styles for Skills Easter Egg Game  */

.parent .child {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.parent .child:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.parent .child:active {
    transform: translateY(-2px);
}

.xp-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--secondary);
    white-space: nowrap;

    text-shadow:
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff,
        2px 2px 2px rgba(0, 0, 0, 0.5);
    opacity: 1;
    animation: xp-fade-up 2.4s ease-out forwards;
    pointer-events: none;
    z-index: 100;
}

@keyframes xp-fade-up {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -150%) scale(1.3);
    }
}

.modal-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #fff;
    color: #333;
    padding: 1rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.modal-content h2 {
    color: var(--secondary, #6d41be);
    margin-top: 0;
}

.modal-content p {
    font-size: 1.2rem;
    font-family: "Crimson Text", serif;
}

.modal-content>.modal-close-button {
    top: 10px;
    right: 15px;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    padding: 0;
}

.modal-content button.modal-close-button {
    font-family: "Oxanium", sans-serif;
    font-size: 1.1rem;
    font-weight: bold;
    background-color: var(--secondary, #6d41be);
    color: var(--primary, #eeeeee);
    border: none;
    border-radius: 5px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 1rem;
}

.modal-content button.modal-close-button:hover {
    background-color: var(--tertiary, #92be41);
    color: #333;
}

@keyframes xp-fade-up {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -150%) scale(1.3);
    }
}

.parent .child:not(.skill-clicked):hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.parent .child.skill-clicked img,
.parent .child.skill-clicked p {
    opacity: 0.6;
    filter: grayscale(80%);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.parent .child.skill-clicked {
    cursor: not-allowed;
    transform: translateY(0);
    box-shadow: none;
}

.parent .child:active {
    transform: translateY(-2px);
}

/* Level 2! */

.modal-button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

#bored-resume-button {
    font-family: "Oxanium", sans-serif;
    font-size: 1.1rem;
    font-weight: bold;
    background-color: var(--secondary, #6d41be);
    color: var(--primary, #eeeeee);
    border: none;
    border-radius: 5px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin: 0.5rem;
}

#bored-resume-button:hover {
    background-color: var(--tertiary, #92be41);
    color: #333;
}

#bored-refresh-button {
    font-family: "Oxanium", sans-serif;
    font-size: 1.1rem;
    font-weight: bold;
    background-color: #ccc;
    color: #555;
    border: none;
    border-radius: 5px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin: 0.5rem;
}

#bored-refresh-button:hover {
    background-color: #bbb;
}

.butWait {
    text-align: center;
    font-weight: 700;
}


/* ABOUT ME SECTION */

#about-me {
    width: 100%;
}

.journeyImages {
    max-width: 1200px;
    margin: auto;
    padding-top: 2rem;
}

div.gallery {
    border: 1px solid #ccc;
}

div.gallery:hover {
    border: 1px solid #777;
}

div.gallery img {
    width: 100%;
    height: auto;
}

div.desc {
    padding: 15px;
    text-align: center;
}

* {
    box-sizing: border-box;
}

.responsive {
    padding: 0 6px;
    float: left;
    width: 24.99999%;
}

.clearfix:after {
    content: "";
    display: table;
    clear: both;
}

div.gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.storyText {
    padding-left: 10%;
    padding-right: 10%;
    font-weight: 300;
    font-size: 1.5rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* FOOTER SECTION */

.site-footer {
    background-color: var(--secondary);
    color: var(--primary);
    width: 100%;
    padding: 20px 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Styling the Text Block */
.footer-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
}

.copyright {
    margin: 0;
    font-size: 0.9rem;
    color: var(--primary);
}

.license {
    margin: 0;
    font-size: 0.75rem;
    color: var(--primary);
}

.linkedin-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
    border: 1px solid var(--primary);
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.linkedin-link:hover {
    background-color: var(--tertiary);
    color: #000000;
}

.contact-submit {
    background-color: var(--secondary);
    color: var(--primary);
    border-radius: 5px;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    margin-top: 10px;
    cursor: pointer;
}

.contact-submit:hover {
    background-color: var(--tertiary);
    color: #000;
}

/* Improved contact field styling */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Oxanium', sans-serif;
    font-size: 1rem;
    background-color: #f9f9f9;
    margin-bottom: 15px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(109, 65, 190, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
    color: #333;
}

legend {
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
    color: #333;
    font-size: 1.1rem;
}

/* Tablet */
@media (min-width: 600px) and (max-width: 1024px) {

    .responsive {
        width: 49.9%;
        margin-bottom: 20px;
    }

    .mission-content {
        gap: 1rem;
        padding: 0 2rem;
    }

    .missionText {
        font-size: 1.25rem;
    }

    nav a {
        padding: 0.5rem 0.5rem;
        font-size: 0.9rem;
    }
}

/* Mobile */
@media(max-width:599px) {
    #desktopMenu {
        display: none;
    }

    #hamburger {
        border: 1px solid var(--primary);
        height: 3rem;
        width: 3rem;
        padding: 0;
        cursor: pointer;
        margin: auto;
        display: block;
        background-color: #CCCCCC;
    }

    #mobileMenu {
        display: block;
        position: absolute;
        color: #000000;
        background-color: var(--secondary);
        top: 5rem;
        left: 0;
        width: 100%;
        overflow: hidden;
        transition: all .200s ease-in-out;
        max-height: 0;
    }

    #mobileMenu ul {
        display: flex;
        flex-direction: column;
        text-align: center;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .menuItem {
        margin: 0;
        padding: 0.5rem;
        font-size: 2rem;
        display: block;
    }

    .hamline {
        width: 80%;
        height: 4px;
        background-color: #000000;
    }

    .responsive {
        width: 99.9%;
    }

    header {
        background-color: #000000;
        height: 5rem;
        padding: 1rem 0;
    }

    body {
        padding: 0;
        margin: 0;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        margin: 0;
    }

    main,
    section.contentSection {
        flex: 1;
    }

    li {
        list-style: none;
        display: block;
        text-align: center;
        width: 100%;
        align-items: center;
    }

    html {
        scroll-padding-top: 3.75rem;
    }

    #hero h1 {
        text-align: center;
    }

    #contact-container {
        flex-direction: column;
    }

    #contact-form {
        order: 1;
        width: 100%;
    }

    #contact-image {
        order: 2;
        width: 100%;
        margin-top: 20px;
    }

    #contact-image img {
        width: 100%;
        height: auto;
    }

    .mission-content {
        flex-direction: column;
        text-align: center;
    }

    .mission-content img {
        padding-top: 2rem;
        margin-bottom: 1rem;
    }

    #hero {
        height: 94vh;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-text {
        align-items: center;
    }

}