:root {
    --clr-primary: #B5CCDF;
    --clr-secondary: #E2E0D7;
    --clr-accent: #f7ff00;
    --clr-background: #031520;
    --clr-card: #062538;
    --clr-nav-bar: #071a2b;

    --rgb-accent: 204, 160, 15;
    --rgb-primary: 181, 204, 223;
    --rgb-card: 6, 37, 56;

    --font-primary: 'Inter';
    --font-secondary: 'Anonymous Pro';
}

/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
    box-sizing: border-box;
}
/* 2. Remove default margin */
*:not(dialog) {
    margin: 0;
}
/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
    html {
        interpolate-size: allow-keywords;
    }
}
body {
    /* 4. Add accessible line-height */
    line-height: 1.5;
    /* 5. Improve text rendering */
    -webkit-font-smoothing: antialiased;
}
/* 6. Improve media defaults */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}
/* 7. Inherit fonts for form controls */
input, button, textarea, select {
    font: inherit;
}
/* 8. Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}
/* 9. Improve line wrapping */
p {
    text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
}
/*
  10. Create a root stacking context
*/
#root, #__next {
    isolation: isolate;
}

body {
    color: var(--clr-primary);
    font-family: var(--font-primary), monospace;
    background: var(--clr-background);
}

a {
    text-decoration: none;
    color: var(--clr-accent);
}

ul {
    list-style: none;
    padding: 0;
}

form {
    display: grid;
    gap: 1rem;

    width: min(500px, 100%);
}

input, textarea {
    padding: 0.5rem;
    border-radius: 0.5rem;
    color: var(--clr-primary);
    background-color: rgb(var(--rgb-primary), 0.1);
    border: 1px solid var(--clr-background);
    max-width: 500px;
}

button {
    text-decoration: none;
    appearance: none;
    color: var(--clr-primary);
    background-color: var(--clr-background);
}

section {
    padding-bottom: 10rem;
}

@media screen and (max-width: 600px) {
    section {padding-bottom: 4rem;}
}

section h2 {
    padding-bottom: 1.5rem;
    color: var(--clr-accent);
}


#about, #projects, #education {
    scroll-margin-top: 250px;
}

/* Navigation*/

nav {
    position: sticky;
    z-index: 1000;
    top: 0;
    padding-top: 20px;
    padding-inline: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;

    background-color: var(--clr-background);

    box-shadow: 0 0 20px var(--clr-background);
}

.nav-wrapper {
    display: flex;
    gap: 3em;
    justify-content: center;

    width: 100%;
    padding: 0.7rem 4rem;
    background-color: var(--clr-nav-bar);
    border-radius: 25px;
}

@media screen and (max-width: 870px) {
    .nav-wrapper {
        padding: .7rem .5rem;
    }
}

@media screen and (max-width: 420px) {
    .nav-wrapper {
        padding-right: 1rem;
        justify-content: flex-end;
    }
}

.nav-links {
    position: absolute;
    display: flex;
    gap: 10rem;
}

@media screen and (max-width: 870px) {
    .nav-links {
        gap: 1rem;
    }
}

.nav-link {
    color: var(--clr-primary);
}

.nav-link:hover {
    color: var(--clr-accent);
}

.social-links {
    margin-right: auto;
    display: flex;
    gap: 0.5rem;

    color: var(--clr-accent);
}

.social-link:hover {
    color: var(--clr-primary);
}

/* Header*/

.header {
    display: flex;
    gap: 2rem;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.cta {
    margin-left: auto;
}


.logo {
    text-align: right;
    line-height: 1.2;
}

.name {
    font-size: 2.5rem;
    font-weight: 500;
    letter-spacing: .1rem;
    color: var(--clr-secondary);
}

@media screen and (max-width: 400px) {
    .name {
        font-size: 2rem;
    }
}

.tagline {
    font-weight: 400;
    color: var(--clr-accent);
}

/* About */

.headshot {
    max-height: 90%;
    aspect-ratio: 1/1;

    background-color: rgb(var(--rgb-accent), 0.5);
    background-image: url("../assets/images/headshot.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: color-burn;
}

.headshot-offset {
    height: 100%;
    max-width: inherit;
    margin: auto;
    border: 2px solid var(--clr-accent);
    transform: translate(3%, -3%);

}


@media screen and (max-width: 600px) {
    .headshot {
        display: none;
    }
}

/* Projects */

.project-card {
    position: relative;

    display: flex;
    flex-direction: column;
}

@media screen and (max-width: 600px) {
    .project-card {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

.project-img {
    max-width: 50%;
    padding: .5rem;
    background-color: rgb(var(--rgb-accent), 0.5);
}

.offset-border {
    border-top: 1px solid var(--clr-accent);
    border-bottom: 1px solid var(--clr-accent);
    border-left: 1px solid var(--clr-accent);
    padding: 2rem;
}

@media screen and (max-width: 600px) {
    .offset-border {
        border-bottom: 0;
        border-right: 1px solid var(--clr-accent);
    }
}

.project-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;

    max-width: 60vw;
}

@media screen and (min-width: 600px) {
    .project-text {
        top: 45%;
        right: 0;
        transform: translate(0, -50%);
    }
}

@media screen and (max-width: 600px) {
    .project-text {
        position: static;
        max-width: 60ch;
    }
}

.project-heading {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

@media screen and (max-width: 600px) {
    .project-heading {
        width: 100%;
        padding: 0.5rem 1rem;
        border-radius: .2rem;
        background-color: rgb(var(--rgb-card));

        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    }
}

.project-title {
    padding: 0;
    color: var(--clr-secondary);

    font-weight: 400;
}

.project-description {
    max-width: 75ch;
    padding: 1rem;
    border-radius: .5rem;

    font-weight: 300;
    font-size: .9em;

    background-color: var(--clr-card);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

@media screen and (max-width: 600px) {
    .project-description {
        border-radius: .2rem;
    }
}

/* Badges */

.project-badges {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;

    min-width: 400px
}

@media screen and (max-width: 600px) {
    .project-badges {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.5rem;

        min-width: 200px;

        padding:0 0.2rem;
    }
}

.project-badges li {
    color: var(--clr-accent);
    font-family: var(--font-secondary), monospace;
    white-space: nowrap;
}

.icon-badge {
    display: flex;
    align-items: anchor-center;
    gap: .5rem;

    border-radius: .5rem;
    padding: .2rem 1rem;

    background-color: rgb(var(--rgb-primary), 0.1);
}

.icon-badge img {
    height: 20px;
    width: 20px;
}

.dev-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;

    font-family: var(--font-secondary), monospace;
}

/* Button */

.btn {
    padding: 0.5rem 1.7rem;
    border-radius: .5rem;
    border: 1px solid var(--clr-accent);

    color: var(--clr-primary);
    font-family: var(--font-secondary), monospace;

    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    background-color: var(--clr-accent);
    color: var(--clr-background);
}

/* Contact */

.contact {
    display: grid;
    gap: 1rem;
    justify-items: center;
}

/* Footer */

footer {
    display: flex;
    justify-content: center;
    align-items: flex-end;

    padding-top: 2rem;
    padding-bottom: 0.2rem;
    border-top: 1px solid var(--clr-accent);

    text-align: center;

    font-size: 0.7rem;
}

/* Modal */

.overlay-backdrop[hidden] {
    display: none;
}
.overlay-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
}

.overlay-modal {
    width: min(520px, 100%);
    background: var(--clr-background);
    border: 1px solid var(--clr-primary);
    border-radius: 12px;
    padding: 18px 18px 14px;
}

.overlay-modal h3 {
    color: var(--clr-accent);
    margin: 0 0 8px;
}

.overlay-modal p {
    margin: 0 0 14px;
    line-height: 1.4;
}

.overlay-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Utility Classes*/

.page-container{
    display: flex;
    flex-direction: column;
    align-items: center;

    max-width: 1000px;
    padding-inline: 3rem;
    margin-left: auto;
    margin-right: auto;
}

.grid-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    align-items: center;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media screen and (max-width: 850px) {
    .grid-wrapper.break-850 {
    grid-template-columns: none;
    display: flex;
    flex-direction: column;
    }
}

.flex-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.wrapper-half-width {
    max-width: 60ch;
}

.full-width {
    width: 100%;
}

.full-page {
    min-height: 100vh;
}

.fade-section {
    opacity: 0;
    transform: translateY(100px);
    transition: opacity 0.6s, transform 0.6s;
}

.fade-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

