@font-face {
    font-family: "Dancing Script";
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/DancingScript/DancingScript-Regular.woff2') format('woff2'), 
         url('../fonts/DancingScript/DancingScript-Regular.ttf') format('truetype');
}

:root {
    --background: #f0fff2;
    --primary: #326b31;
    --secondary: #04AA6D;
    --black: #000000;
    --white: #FFFFFF;
    --font-header: "Dancing Script", serif;
    --font-body: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --mobile-breakpoint: 720px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 4.5rem;
}

body {
    padding: 0;
    margin: 0;
    background-color: var(--background);
    font-family: var(--font-body);
}

/* GLOBAL ELEMENTS */

a {
    color: var(--primary);
}

a:hover, a:active {
    color: var(--secondary);
}

a:visited {
    color: var(--primary);
}

acronym {
    cursor: help;
}

/* .container img {
    display: block;
    max-width: 100%;
    height: auto;
} */

figcaption {
    font-style: italic;
    font-size: smaller;
}

h2 {
    color: var(--primary);
    font-family: var(--font-header);
    font-size: 2.5rem;
}

.text-center {
    text-align: center;
}

/* NAVIGATION */

#mobile-menu, #hamburger {
    display: none;
}

#desktop-menu {
    position: fixed;
    top: 0;
    width: 100%;
    height: 4.35rem;
    background-color: var(--background);
    overflow: hidden;
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
}

#desktop-menu li + li:before {
    /* Generates separator pipes between menu items */
    color: var(--primary);
    content: "|";
    padding-right: 1rem;
}

nav a {
    text-decoration: none;
}

nav a:hover {
    text-decoration: underline;
}

/* HERO SECTION */

#hero-wrapper {
    background-image: url('../images/FoggyForest-2054x1080.webp');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    padding-top: 4.35rem;
}

#hero {
    background-color: rgba(0, 20, 0, 0.4);
    align-content:center;
    text-align: center;
    padding: 2rem;
    min-height: 70vh;
}

#hero-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    gap:2rem;
}

#selfie-img {
    border-radius: 50%;
    box-shadow: 10px 10px 10px 0px rgba(0,0,0,0.5);
}

#hero-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    gap:2rem;
}

#selfie-img {
    border-radius: 50%;
    box-shadow: 10px 10px 10px 0px rgba(0,0,0,0.5);
}

#hero h1 {
    font-family: var(--font-header);
    font-size: 4rem;
    margin-top: 0;
    color: var(--white);
}

#hero h1 acronym {
    text-decoration: none;
    display: inline-block;
    border-bottom: 1px dashed;
}

#call-to-action {
    margin-top: 3rem;
}

#call-to-action .button {
    font-size: 1.2rem;
    margin: 0.5rem;
}

/* BUTTONS */

.button {
    border-color: var(--black);
    color: var(--black);
    background-color: var(--white);
    border-radius: 10px;
    padding: 0.5rem 1rem;
    border-width: 2px;
    border-style: solid;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    transition: 0.4s;
    cursor: pointer;
}

.button:hover {
    background-color: var(--secondary);
    border-color: var(--white);
    color: var(--white);
}

.button.primary {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: var(--white);
}

.button.primary:hover {
    background-color: var(--white);
    color: var(--primary);
    border-color: var(--secondary);
}

/* MAIN SECTIONS */

section h2 {
    text-align: center;
    margin-top: 0;
}

.container {
    padding: 1rem;
    margin: 0 auto;
    max-width: 75ch;
}

.separator {
    border: 0;
    border-top: 2px dotted var(--primary);
    max-width: 75ch;
    margin: 2rem auto;
}

/* SKILLS SECTION */

#skills .grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    grid-auto-rows: 10rem;
    gap: 10px;
}

#skills .item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: small;
}


/* CONTACT SECTION */
#socials {
    text-align: left;
    background-color: var(--white);
    padding: 1.5rem 2.5rem;
    margin: 0 auto;
    min-width: max-content;
    width: 60%;
    border-radius: 2rem;
    font-size: larger;
    align-content: center;
}
#socials ul {
    padding: 0;
    margin: 0;
    list-style: none;
}
#socials li {
    display: flex;
    padding: 0.5rem 0;
}
#socials li strong {
    display: inline-block;
    width: 100px;
}

/* PGP Key Dialog */
#pgp:open {
    opacity: 1;
}
#pgp{
  opacity: 0;
  transition: all 0.5s allow-discrete;
}
@starting-style {
  #pgp:open {
    opacity: 0;
  }
}
#pgp::backdrop {
  background-color: transparent;
  transition: all 0.5s allow-discrete;
}
#pgp:open::backdrop {
  background-color: rgb(0 0 0 / 25%);
}
@starting-style {
  #pgp:open::backdrop {
    background-color: transparent;
  }
}
#pgp > div {
    display: flex;
    justify-content: space-between;
}
#pgp button {
    height: fit-content;
    padding: .4rem;
}

#pgp-copy {
    float: right;
    position: relative;
    width: 140px;
    height: 40px !important;
    border-width: 1px;
    border-radius: 100px;
    background: #fff;
    border: 5px solid #6fb07f;
    overflow: hidden;
}
#pgp-copy img {
    position: absolute;
    right: 0;
    left: 0;
    margin: auto;
    filter: alpha(opacity=0);
    opacity: 0
}
#pgp-copy:focus {
    animation: extend 1s ease-in-out;
    animation-fill-mode: forwards
}

#pgp-copy:focus > span {
    animation: disappear 1s ease-in-out;
    animation-fill-mode: forwards
}

#pgp-copy:focus > img {
    animation: appear 1s ease-in-out;
    animation-fill-mode: forwards
}

@keyframes extend {
    0% {
        width: 140px;
        height: 40px;
        border-radius: 100px;
        } 
    10% {
        width: 150px;
        height: 40px;
        background: #fff;
        /* margin-left: - 5px;
        margin-top: - 5px; */
        }
    20% {
        width: 140px;
        height: 40px;
        background: #6fb07f;
        /* margin-left: 0px;
        margin-top: 0px; */
        }
    100% {
        width: 40px;
        height: 40px;
        border-radius: 100px;
        background: #6fb07f;
        }
    }
@keyframes disappear {
    0% {
        opacity: 1;
        }
    70% {
        opacity: 0;
        color: #fff;
        }
    100% {
        opacity: 0;
        }
    }
@keyframes appear {
    0% {
        opacity: 0;
        }
    70% {
        opacity: 0;
        }
    100% {
        opacity: 1;
        }
    }


/* FOOTER SECTION */

footer {
    padding: 2rem 1rem;
    background-color: var(--primary);
    color: var(--white);
    text-align: center;
    margin-top: 3rem;
}

/* MOBILE DEVICES */

@media(max-width:599px){
    html{
        scroll-padding-top: 10px;
    }

    /* NAVIGATION */

    #desktop-menu {
        display: none;
    }

    #hamburger {
        border: 1px solid var(--primary);
        height: 3rem;
        width: 3rem;
        margin: 1rem auto;
        padding: 0;
        cursor: pointer;
        display: block;
    }

    .hamline {
        width: 80%;
        height: 2px;
        margin-top: 10px;
        border-style: solid;
    }
    
    #mobile-menu {
        width: 100%;
        background-color: var(--background);
        position:absolute;
        z-index: 10;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: all .200s ease-in-out;
        display: block;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    #mobile-menu li {
        font-size: 2rem;
        display: block;    
        width: fit-content;
        margin: 10% auto;
    }

    #mobile-menu li:last-child {
        margin-bottom: 2rem;
    }

    /* HERO SECTION */

    #hero-wrapper {
        padding-top: 0;
    }
    #hero-flex {
        flex-direction: column;
    }
}