@import url('https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400&display=swap');

html {
    scroll-behavior: smooth;
}

body {
    background-color: #111;
    color: #eee;
    margin: 0;
    font-family: "Barlow", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 16px;
    width: 100vw;
    overflow-x: hidden;
    overflow-y: scroll;
}

em {
    color: hsl(30, 100%, 65%);
    font-style: normal;
}

/* Header */

#top-shrtct {
    position: fixed;
    bottom: 30px;
    right: 30px;
    height: 3em;
    width: 3em;
    padding: 1.5em;
    background-color: #0004;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

#top-shrtct.visible {
    opacity: 1;
    cursor: pointer;
    backdrop-filter: blur(6px);
}

#nav-btn {
    display: none;
}

#navbar {
    background-color: #000c;
    backdrop-filter: blur(10px);
    margin: 0;
    overflow: hidden;
    padding-inline: 30px;
    font-size: 1.4em;
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 60px;
    position: sticky;
    top: 0;
    width: calc(100vw - 60px);
    z-index: 10;
}

#logo {
    font-family: "Fira Mono", monospace;
    font-weight: 500;
    cursor: pointer;
}

#navbar p {
    margin: 16px;
    margin-inline: 0;
}

#links, #nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: absolute;
}

#links {
    right: 20px;
}

#nav {
    left: 50%;
    transform: translateX(-50%);
}

#links a, #nav a {
    text-decoration: none;
    color: #eee;
    margin: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
}

#links a:after, #nav a:after {
    content: "";
    display: block;
    border-bottom: solid 3px #f05;
    position: absolute;
    width: 0;
    height: 36px;
    transition: width 0.3s ease;
}

#links a:after {
    right: 0;
}

#links a:hover:after, #nav a:hover:after {
    width: 100%;
}

#links a svg {
    fill: #eee;
    width: 1em;
    height: 1em;
    padding-right: 8px;
}

/* Body */

main {
    max-width: 1300px;
    margin: 0 auto;
    padding-inline: 30px;
    flex-direction: column;
}

/* Landing */

#homepage {
    width: 100%;
    height: calc(100vh - 60px);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 70px;
}

.card {
    border-radius: 64px;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    background-color: #111c;
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(
        135deg,
        hsl(263, 80%, 40%),
        hsl(341, 80%, 40%) 12%,
        hsl(30, 80%, 40%) 25%,
        #161616 35%,
        #161616 65%,
        #252525 100%
    );
    &::after {
        content: "";
        position: absolute;
        height: calc(100% - 8px);
        width: calc(100% - 8px);
        z-index: -2;
        border-radius: 60px;
        background-image: linear-gradient(
            135deg,
            hsl(263, 25%, 10%),
            hsl(341, 25%, 10%) 10%,
            hsl(30, 25%, 10%) 20%,
            #161616 32%
        );
    }
}

#homepage .card {
    font-family: "Fira Mono", monospace;
    flex-direction: row;
    padding-block: 80px;
    gap: 70px;
    width: fit-content;
    padding: 50px;
}

#homepage .card #homepage-text p {
    z-index: 3;
}

#homepage-text {
    width: auto;
    text-align: right;
}

#homepage-img {
    background-image: url("/assets/headshot.png");
    background-size: cover;
    background-position: center;
    width: 350px;
    height: 350px;
    aspect-ratio: 1/1;
    border-radius: 50%;
    position: relative;
}

#homepage-img::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    background-image: repeating-conic-gradient(
        #ff0050 0%,
        #ff8000 33.333%,
        #7520ff 66.666%,
        #ff0050 100%
    );
    border-radius: 50%;
    z-index: -1;
    filter: blur(14px);
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

#homepage p {
    margin: 0;
    max-width: 800px;
}

#hi {
    font-size: 1.5em;
    color: hsl(263, 50%, 65%);
}

#name {
    font-size: 5em;
    color: #f05;
    font-weight: 700;
}

/* About */

#box-with-title {
    border-radius: 60px;
    padding-inline: 50px;
    padding-block: 30px;
    position: relative;
    max-width: 800px;
    margin: auto;
    overflow: hidden;
    &::after {
        content: "";
        position: absolute;
        top: 4px;
        left: 4px;
        height: calc(100% - 8px);
        width: calc(100% - 8px);
        z-index: 1;
        border-radius: 57px;
        background-color: #111;
    }
    &::before {
        content: "";
        position: absolute;
        top: calc(50% - 100vw);
        left: calc(50% - 100vw);
        height: 200vw;
        width: 200vw;
        z-index: 0;
        background-image: repeating-conic-gradient(
            #ff0050 0%,
            #ff8000 33.333%,
            #7520ff 66.666%,
            #ff0050 100%
        );
        animation: rotate 10s linear infinite;
    }
}

#aboutme {
    width: fit-content;
    height: fit-content;
    margin: auto;
    position: relative;
    font-family: "Barlow", sans-serif;
    padding-top: 100px !important; /* padding to make sure that the scroll anchor works properly with the navbar */
}

#aboutme h1 {
    background-color: #111;
    padding-inline: 15px;
    position: absolute;
    text-align: center;
    top: calc(-1.25em + 100px);
    left: 70px;
    z-index: 2;
}

#aboutme p {
    font-size: 1.1em;
}

#box-with-title p {
    position: relative;
    z-index: 2;
}

#age {
    font-family: "Fira Mono", monospace;
}

/* Projects */

#projects {
    margin: auto;
    width: fit-content;
    padding-top: 100px;
}

#projects h1 {
    padding-left: 75px;
}

.project {
    display: flex;
    flex-direction: row;
    padding: 2em;
    width: fit-content;
    margin: auto;
    gap: 20px;
    align-content: center;
    justify-content: center;
    margin-bottom: 35px;
}

.project:nth-child(odd) {
    flex-direction: row-reverse;
}

.project .text-content {
    display: flex;
    flex-direction: column;
    align-self: start;
}

.project h2 {
    margin-bottom: 0;
}

.project img {
    width: 400px;
    height: 280px;
    object-fit: cover;
    border-radius: 2em;
    border: 0.2em solid #222;
    cursor: pointer;
}

.project-tags {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin: 0;
    padding-block: 10px;
    font-family: "Fira Mono", monospace;
    font-weight: 500;
}

.HTML {
    background-color: #E34F26 !important;
}

.CSS {
    background-color: #1572B6 !important;
}

.JS {
    background-color: #F7DF1E !important;
    color: #000;
    text-shadow: #eee 0px 0px 2px !important;
}

.JAVA {
    background-color: #f89820 !important;
}

.NOSQL {
    background-color: #47A248 !important;
}

.date {
    margin-left: auto !important;
    color: #bbb !important;
    width: 6.5em !important;
}

.project-tags p {
    margin: 0;
    font-size: 0.8em;
    width: 3.5em;
    border-radius: 1em;
    background-color: #222;
    padding: 0.2em;
    text-align: center;
    text-shadow: #111 0px 0px 2px;
}

.project-description {
    max-width: 23em;
    font-size: 1.1em;
    margin: 0;
}

/* Contact */

#contact {
    margin: auto;
    width: fit-content;
    padding-top: 100px;
}

#contact h1 {
    padding-left: 75px;
}

#cv-button {
    position: relative;
    overflow: hidden;
    height: 2em;
    width: 2em;
    font-size: 5em;
    font-family: "Fira Mono", monospace;
    font-weight: 800;
    color: var(--accent);
    background: linear-gradient(120deg, #7520ff, #ff0050, #ff8000);
    border-radius: 12%;
    border: none;
    display: block;
    margin-block: 40px;
    cursor: pointer;
    padding: 0;
}

#cv-button-wrapper {
    color: var(--accent);
    display: block;
    text-decoration: none;
    width: fit-content;
    margin: auto;
}

#cv-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        0deg,
        transparent,
        rgba(255, 255, 255, 0.35),
        transparent
    );
    transform: rotate(45deg) translateY(-50%);
    transition: transform 0.5s ease;
}

#cv-button:hover::before {
    transform: rotate(45deg) translateY(50%);
}

#contact h2 {
    padding-left: 75px;
}

#contact-showcase {
    max-width: 800px;
    padding-inline: 50px;
    padding-block: 20px;
    gap: 30px;
}

.contact-area {
    width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: auto;
}

.contact-area svg {
    width: 8em;
    height: 8em;
}

.contact-area a {
    color: var(--accent);
    text-decoration: underline;
    font-size: 1.4em;
    margin: 0;
    font-family: "Fira Mono", monospace;
    margin-top: 0.3em;
}

.contact-area p {
    font-size: 1.1em;
    text-align: center;
}

#email-link:hover {
    color: #7520ff
}

#phone-link:hover {
    color: #ff0050
}

#linkedin-link:hover {
    color: #ff8000
}

@media screen and (max-width: 1100px) {

    body {
        font-size: 20px;
        padding-top: 0em;
    }

    #logo {
        display: none;
    }

    #nav-btn {
        content: "";
        display: block;
        position: fixed;
        top: 25px;
        right: 50px;
        z-index: 11;
        margin: 0;
        background-image: url("/assets/plus.svg");
        background-size: contain;
        height: 3em;
        width: 3em;
        padding: 0px;
        transition: transform 0.5s ease;
        cursor: pointer;
    }

    body::after {
        content: "[N]";
        display: flex;
        position: fixed;
        top: 20px;
        left: 50px;
        font-size: 3em;
        font-weight: 700;
        z-index: 11;
        margin: 0;
        padding: 0px;
        font-family: "Fira Mono", monospace;
    }

    body::before {
        content: "";
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background-image: linear-gradient(180deg, #000, #0000);
        height: 8em;
        z-index: 10;
    }

    #nav-btn.expanded {
        transform: rotate(225deg);
    }

    #navbar {
        flex-direction: column;
        height: 100vh;
        width: 100vw;
        justify-content: space-between;
        position: fixed;
        right: -100vw;
        font-size: 3em;
        margin: 0;
        border: 0;
        padding-inline: 0;
        transition: transform 0.5s ease;
    }

    #navbar.expanded {
        transform: translateX(-100vw);
    }

    #links, #nav {
        position: static;
        display: flex;
        flex-direction: column;
        transform: none;
    }

    #links a, #nav a {
        justify-content: center;
        text-align: right;
    }

    #links a:after, #nav a:after {
        right: auto;
        height: 1.2em;
    }

    #nav {
        transform: translatey(2em);
    }

    #links a svg {
        padding-right: 30px;
    }

    #homepage {
        margin-bottom: 100px;
    }

    #homepage .card {
        flex-direction: column-reverse;
        gap: 70px;
        padding: 80px;
        margin-top: 0;
        max-width: 65%;;
    }

    .card::after {
        height: calc(100% - 10px);
        width: calc(100% - 10px);
    }

    #homepage-text {
        text-align: center;
        max-width: 20em;
    }

    #homepage-img {
        width: 14em;
        height: 14em;
    }

    #hi {
        font-size: 1.2em;
    }

    #name {
        font-size: 3em;
    }

    .project {
        flex-direction: column;
    }

    .project img {
        width: 25em;
        height: 17.5em;
    }

    .project:nth-child(odd) {
        flex-direction: column;
    }

    .project-description {
        max-width: 100%;
    }

    .project img {
        width: calc(100vw - 192px);
        height: auto;
    }

    #navbar #links {
        padding-bottom: 1em;
    }

    #aboutme {
        padding-top: 70px;
    }

    #aboutme h1 {
        transform: translateY(170px);
        top: -3em;
    }

    #contact {
        width: 100%;
    }

    #contact h1 {
        padding: 0;
        width: 100%;
        text-align: center;
        margin-inline: auto;
    }

    #contact-showcase {
        flex-direction: column;
    }

    .contact-area {
        display: grid;
        max-width: calc(100vw - 192px);
        width: fit-content;
    }

    .contact-area svg {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    .contact-area a {
        grid-column: 2;
        grid-row: 1;
        display: block;
        margin-top: auto;
        width: 100%;
    }

    .contact-area p {
        grid-column: 2;
        grid-row: 2;
        width: auto;
        text-align: left;
        margin-bottom: auto;
    }
}

@media screen and (max-width: 650px) {

    body {
        font-size: 15px;
    }

    #aboutme h1 {
        transform: translateY(170px);
        top: -3.5em;
    }

    #contact-showcase {
        padding-inline: 20px;
    }

    .contact-area {
        max-width: calc(100vw - 48px);
    }
}