@import url('https://fonts.googleapis.com/css2?family=Catamaran:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* variables */
:root {
    --site-light: #fff;
    --site-dark: #222;
    --header-footer-color: #ddd;
    --menu-highlight-color: #777;
    --max-content-width: 900px;
    --content-padding-inline: 40px;
    --gradient-forward: linear-gradient(45deg, #d53369 0%, #daae51 100%);
    --gradient-reverse: linear-gradient(225deg, #d53369 0%, #daae51 100%);
}

/* base styles */
html {
    width: 100%;
    scroll-behavior: smooth;
    scroll-margin-top: 100px;
}

body {
    font-size: 1.25rem;
    font-family: 'Catamaran', sans-serif;
    line-height: 1.5;
    color: var(--site-dark);
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
}

h2 {
    font-size: 2.25rem;
}

h3 {
    line-height: 1.2;
}

.content-wrapper {
    max-width: var(--max-content-width);
    margin-inline: auto;
    padding-inline: var(--content-padding-inline);
    padding-block: 100px;
}

/* gradient background styles */
.about-me, .portfolio {
    position: relative;
    color: var(--site-light);
}

.about-me::after, .portfolio::after {
    position: absolute;
    inset: 0;
    content: "";
    z-index: -1;
}

.about-me::after {
    background: var(--gradient-forward);
    transform: skewY(3deg);
}

.portfolio::after {
    background: var(--gradient-reverse);
    transform: skewY(-3deg);
}

@media (prefers-color-scheme: dark) {
    body {
        color: var(--site-light);
        background: var(--site-dark);
    }

    li {
        color: var(--site-dark);
    }
}

/* header section styles */
nav {
    position: fixed;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    width: 100%;
    height: 55px;
    padding-inline: 30px;
    background-color: var(--header-footer-color);
}

.nav-menu {
    display: flex;
    justify-content: right;
    align-items: left;
    width: fit-content;
    gap: 30px;
    font-weight: 600;
}

.nav-link {
    transition: 100ms ease-out;
}

.nav-link:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
}

.menu-button {
    display: none;
    cursor: pointer;
}

.menu-line {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    border-radius: 5px;
    transition: all 300ms ease;
    background-color: var(--site-dark);
}

.click-outside-menu {
    position: fixed;
    top: 0;
    display: none;
    width: 100%;
    height: 100%;
    background: transparent;
    transition: all ease-out;
    z-index: 50;
}

@media (max-width: 700px) {
    .menu-button {
        display: block;
    }

    .menu-button.active .menu-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-button.active .menu-line:nth-child(2) {
        opacity: 0;
    }

    .menu-button.active .menu-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        flex-direction: column;
        top: 0px;
        left: -100%;
        width: 190px;
        padding: 55px 0 20px 50px;
        gap: 0;
        border-radius: 0 0 20px 0;
        transition: 500ms;
        background-color: var(--header-footer-color);
        box-shadow: 2px 2px 6px var(--menu-highlight-color);
    }
    
    .nav-menu li {
        margin: 16px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
}

.social-links {
    height: 55px;
    display: flex;
}

.social-links a {
    width: 43px;
    height: 43px;
    padding: 5px;
    margin: 6px 0 6px 6px;
}

.social-links a:hover {
    background: var(--site-dark);
}

.social-links svg {
    height: auto;
    fill: var(--site-dark);
}

.social-links a:hover > svg {
    cursor: pointer;
    fill: var(--header-footer-color);
}

#github {
    border-radius: 50%;
}

#linkedin {
    border-radius: 5px;
}

/* Hero section styles */
header {
    position: relative;
    max-width: var(--max-content-width);
    height: 750px;
    margin-inline: auto;
}

.header-image {
    position: absolute;
    top: 130px;
    right: var(--content-padding-inline);
    width: 790px;
    transform: rotate(12.5deg);
}

.headline-1 {
    position: absolute;
    top: 480px;
    left: var(--content-padding-inline);
}

.headline-2 {
    position: absolute;
    top: 535px;
    left: 147px;
}

.header-subhead {
    position: absolute;
    top: 625px;
    left: var(--content-padding-inline);
}

@media (max-width: 900px) {
    header {
        /* height: 695px; */
        height: 600px;
    }

    .header-image {
        position: unset;
        width: 700px;
        margin: 90px auto 0 auto;
        transform: none;
    }

    .headline-1 {
        position: unset;
        text-align: center;
    }

    .headline-2 {
        position: unset;
        text-align: center;
        line-height: 0.5;
    }

    .header-subhead {
        position: unset;
        text-align: center;
        margin-top: 35px;
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 3rem;
    }

    header {
        height: 500px;
    }
}

/* About Me section styles */
.about-me p {
    margin-bottom: 2rem;
}

.about-me-images {
    display: grid;
    max-width: 1000px;
    margin: 40PX auto;
    grid-template-columns: 15px 1fr 15px 1fr 15px 1fr 15px 1fr 15px;
    grid-template-rows: 15px 1fr 15px;
}

.about-me-images img:nth-child(1) {
    grid-area: 2 / 1 / span 2 / span 3;
    transform: rotate(-5deg);
    z-index: 1;
}

.about-me-images img:nth-child(2) {
    grid-area: 1 / 3 / span 2 / span 3;
    transform: rotate(10deg);
    z-index: 3;
}

.about-me-images img:nth-child(3) {
    grid-area: 1 / 5 / span 2 / span 3;
    transform: rotate(-5deg);
    z-index: 2;
}

.about-me-images img:nth-child(4) {
    grid-area: 2 / 7 / span 2 / span 3;
    transform: rotate(10deg);
    z-index: 4;
}

@media screen and (max-width: 700px) {
    .about-me-images {
        margin-inline: 50px;
        grid-template-columns: 1fr 10px 1fr;
        grid-template-rows: 15px 1fr 15px 1fr 15px;
    }
    
    .about-me-images img:nth-child(1) {
        grid-area: 2 / 1 / span 2 / span 2;
        z-index: 2;
    }
    
    .about-me-images img:nth-child(2) {
        grid-area: 1 / 2 / span 2 / span 2;
        z-index: 3;
    }
    
    .about-me-images img:nth-child(3) {
        grid-area: 3 / 1 / span 2 / span 2;
        transform: rotate(10deg);
        z-index: 1;
    }
    
    .about-me-images img:nth-child(4) {
        grid-area: 3 / 2 / span 2 / span 2;
        transform: rotate(-5deg);
    }
}

/* Skills section styles */
.skills p {
    margin-bottom: 10px;
}

.skill-badges {
    display: flex;
    flex-wrap: wrap;
    margin-top: 7px;
    gap: 6px;
}

.skill-badges img {
    height: 30px;
}

/* Portfolio section styles */
.portfolio-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.portfolio-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    background: rgba(200, 200, 200, .3);
    border: 2px solid var(--site-light);
    border-radius: 15px;
    padding: 10px 20px;
}

.portfolio-item h3 {
    margin-top: 10px;
    text-align: center;
}

.portfolio-item p {
    font-size: 1rem;
    line-height: 1.2;
}

.portfolio-screenshot {
    min-width: 200px;
    max-width: 270px;
    height: auto;
    margin: 10px auto 0 auto;
    -webkit-mask-image: linear-gradient(to top, transparent 10%, black 70%);
    mask-image: linear-gradient(to top, transparent 10%, black 70%);
}

.portfolio-links {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin: 7px 0 5px 0;
}

.portfolio-links img {
    height: 23px;
}

/* Contact section styles */
.contact .content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: left;
}

.email-form {
    display: grid;
    align-self: center;
    grid-template-columns: auto 1fr auto 1fr;
    gap: 20px 10px;
    background: rgba(200, 200, 200, .3);
    width: 80%;
    margin-block: 32px;
    padding: 24px 32px;
    border: 2px solid var(--site-dark);
    border-radius: 15px;
}

.email-form label {
    text-align: start;
}

.first-name-input, .last-name-input, .email-input, .message-input {
    width: 100%;
    border: 1px solid var(--site-dark);
    border-radius: 10px;
    padding: 1px 7px;
    font-family: monospace;
    font-size: 0.9rem;
}

.email-input {
    grid-area: 2 / 2 / span 1 / span 3;
}

.message-label {
    grid-area: 3 / 1 / span 1 / span 1;
}

.message-input {
    grid-area: 3 / 2 / span 1 / span 3;
    min-height: 160px;
    resize: vertical;
}

.php-output {
    grid-area: 4 / 2 / span 1 / span 2;
    font-size: 1.2rem;
    font-weight: 700;
    color: #d53369;
    width: 100%;
    display: flex;
    justify-content: left;
    align-items: center;
}

.submit {
    grid-area: 4 / 4 / span 1 / span 1;
    width: 100px;
    justify-self: end;
    border: none;
    border-radius: 10px;
    color: var(--site-light);
    background: #d53369;
}

.submit:hover {
    background: #a8224f;
    cursor: pointer;
}

.submit:active {
    transform: translateY(2px);
}

@media (prefers-color-scheme: dark) {
    .php-output {
        color: #daae51;
    }
    .first-name-input, .last-name-input, .email-input, .message-input {
        border: none;
    }
}

@media screen and (max-width: 850px) {
    .email-form {
        grid-template-columns: auto 1fr 1fr;
        width: 90%;
    }

    .first-name-input {
        grid-area: 1 / 2 / span 1 / span 2;
    }

    .last-name-input {
        grid-area: 2 / 2 / span 1 / span 2;
    }
    
    .email-input {
        grid-area: 3 / 2 / span 1 / span 2;
    }
    
    .message-label {
        grid-area: 4 / 1 / span 1 / span 1;
    }
    
    .message-input {
        grid-area: 4 / 2 / span 1 / span 2;
        min-height: 224px;
        resize: vertical;
    }
    
    .submit {
        grid-area: 5 / 3 / span 1 / span 1;
    }

    .php-output {
        grid-area: 5 / 1 / span 1 / span 2;
    }
}

/* Footer section styles */
footer {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 30px;
    font-size: 1rem;
    color: var(--site-dark);
    background-color: var(--header-footer-color);
}