:root {
    /* Palette */
   --black: #090F15;
   --navy: #1B2632;
   --blue: #0E4C92;
   --cyan: #0496C4;
   --white: #E2E2DE;
   --light-gray: #B3B7BA;
   --gray: #111A23;
   --brown: #A08A81;

   /* Semantics */
   --bg: var(--black);
   --surface: var(--navy);
   --text: var(--white);
   --text-muted: var(--light-gray);
   --accent: color-mix(
       in srgb,
       #5BC0EB 75%,
       transparent
   );

   /* fonts */
    --font-heading: "Space Grotesk", sans-serif;
    --font-body: "Inter", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: var(--font-body);
}

.navbar, h1, h2, h3 {
    font-family: var(--font-heading);
}

.navbar {
    color: var(--text);
    background-color: var(--surface);
    padding: 1.5rem 5rem;
    font-size: 1.1rem;
}

#nav-on-scroll {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    border-bottom: 1px solid color-mix(
                        in srgb, 
                        var(--blue) 40%, 
                        transparent
                    );
    transform: translateY(-120%);
    transition: transform 0.4s ease-out;
}

#nav-on-scroll.nav-visible {
    transform: translateY(0);
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.navbar ul > :first-child {
    font-size: 1.4rem;
    font-weight: 600;
    margin-right: auto;
}

.navbar a:not(.contact-btn) {
    text-decoration: none;
    position: relative;
    color: inherit;
    transition: color .2s ease;
}

.navbar a:not(.contact-btn):hover {
    color: var(--accent);
}

.navbar a:not(.contact-btn)::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.35rem;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform .25s ease;
}

.navbar a:not(.contact-btn):hover::after {
    transform: scaleX(1);
}

.contact-btn {
    border: 2px solid transparent;
    border-radius: 30px;
    padding: .5rem 1.3rem;
    background-color: color-mix(in srgb, var(--cyan) 80%, transparent);
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.2s ease;
}

.contact-btn:hover {
    border-color: var(--text);
}

#hero {
    position: relative;
    height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--surface);
    color: var(--text);
    padding-top: 12rem;
    pointer-events: none;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 2rem;
}

.hero p {
    text-align: center;
    line-height: 1.7;
    max-width: 600px;
    font-size: 1.2rem;
    margin-top: 3rem;
}

.stats {
    display: flex;
    justify-content: center;
    margin: 7rem;
    gap: 4rem;
    text-align: center;
}

.stat-card {
    color: var(--accent);
}

.stat-card h2 {
    font-size: 3.5rem;
    color: color-mix(in srgb, var(--accent) 85%, var(--white));
    line-height: 1;
}

.plus-sign {
    opacity: .8;
    font-size: .8em;
}

.stat-card p {
    margin-top: .7rem;
    font-size: 1.5rem;
    text-align: start;
    color: var(--text-muted);
}

.brace {
    color: var(--accent)
}

.hero-divider {
    width: 240px;
    height: 3px;
    background: var(--accent);
    margin: 1rem 0;
}

.gradient-box-left {
    position: absolute;
    top: -100px;
    left: -150px;
    width: 400px;
    height: 800px;
    border-radius: 50%;

    background: radial-gradient(circle at center,
                var(--blue),
                transparent 70%);
    filter: blur(90px);
    opacity: .7;
    pointer-events: none;
}

.gradient-box-right {
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    border-radius: 50%;

    background: radial-gradient(circle at center,
                var(--cyan),
                transparent 70%);
    filter: blur(90px);
    opacity: .7;
    pointer-events: none;
}

.socials a {
    font-size: 24px;
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.3s ease;
    pointer-events: auto;
}

.socials a:hover {
    color: var(--cyan);
}

.vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: absolute;
    left: 75px;
    bottom: 0;
}

.vertical::after {
    content: "";
    display: inline-block;
    background-color: var(--text-muted);
    width: 1px;
    height: 90px;
    margin: 10px auto 0;
}

#featured-work {
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 5rem 6rem;
    background-color: var(--gray);
    color: var(--white);
}

.featured-work-title {
    font-size: 4.5rem;
}

.projects-grid {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3rem;
}

.featured-project {
    position: relative;
    border: 1px solid color-mix(in srgb, var(--cyan) 35%, transparent);
    border-radius: 15px;
    height: 350px;
    overflow: hidden;
    background-color: var(--surface);
    color: var(--white);
    transition: transform 0.4s ease,
                border-color 0.4s ease,
                box-shadow 0.4s ease;
}

.featured-project:hover {
    transform:translateY(-6px);
    border-color: var(--cyan);
    box-shadow: 0 16px 35px var(--black);
}

.project-image-link {
    position: relative;
    display: block;
    height: 200px;
    overflow: hidden;
}

.project-image-link .project-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-image-link .arrow-icon {
    position: absolute;
    top: 12px;
    right: 15px;
    width: 25px;
    height: 25px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-image-link:hover .arrow-icon {
    opacity: 1;
}

.project-title {
    margin-top: 1rem;
    margin-bottom: .5rem;
    font-size: 1.5rem;
}

.project-description {
    font-size: 1.2rem;
}

.project-tech-stack {
    margin-top: .5rem;
}

.project-card-body .fa-github {
    position: absolute;
    bottom: 25px;
    right: 15px;
    transition: transform 0.2s ease;
}

.project-card-body .fa-github:hover {
    transform: translateY(-2px);
}

.tech-bubble {
    display: inline-block;
    border: 1px solid color-mix(in srgb, var(--cyan) 55%, transparent);
    border-radius: 30px;
    background-color: color-mix(in srgb, var(--cyan) 35%, transparent);
    padding: 0.5rem 1rem;
    margin: .5rem;
    color: var(--text);
}

#about {
    padding: 5rem 3rem;
    background-color: var(--surface);
    color: var(--white);
}

.about-title {
    text-align: left;
    margin-bottom: 2rem;
    margin-left: 616px;
    font-size: 3.5rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.portrait {
    border: 2px solid var(--cyan);
    border-radius: 50%;
    width: 400px;
    height: 400px;
    margin-left: 5rem;
    overflow: hidden;
}

.portrait img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bio {
    padding: 1rem;
    line-height: 1.5;
}

.skills {
    padding: 1rem;
}

.skills-category {
    margin-top: 1rem;
}

.skills .category-title {
    margin-bottom: 1rem
}

.education {
    display: flex;
    flex-direction: column;
}

.education-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    padding: 1rem;
}

.education-meta {
    font-size: .75rem;
    color: color-mix(in srgb, var(--text-muted) 55%, transparent);
}

.item-source {
    margin-top: .2rem;
    font-size: .8rem;
    color: color-mix(in srgb, var(--text-muted) 55%, transparent);
}

.education-content .item-description {
    margin-top: .5rem;
    font-size: .9rem;
    color: var(--text-muted);
}

.education .resume-link {
    align-self: flex-end;
    display: inline-flex;
    gap: .4rem;
    margin: 2rem;
    transition: color 0.2s ease;
    color: var(--text);
}

.education .resume-link:hover {
    color: var(--cyan);
}

.education .resume-link svg {
    transition: transform 0.2s ease;
}

.education .resume-link:hover svg {
    transform: translate(2px, -2px);
}

#contact {
    background-color: var(--surface);
    color: var(--text);
    text-align: center;
    padding: 10rem;
}

.contact-title {
    font-size: 3.5rem;
}

.contact-text {
    max-width: 600px;
    font-size: 1.2rem;
    margin: 2rem auto 5rem;
}

.email-contact-btn {
    padding: 1.3rem 1.8rem;
    border-radius: 15px;
    border: 1px solid var(--cyan);
    background-color: var(--surface);
    color: var(--cyan);
    font-size: 1.3rem;
    transition: background-color 0.3s ease,
                color 0.3s ease,
                transform 0.3s ease;
}

.email-contact-btn:hover {
    background-color: var(--cyan);
    color: var(--surface);
    transform: translateY(-3px);
}

footer {
    padding: 3rem 0;
    text-align: center;
    background-color: var(--bg);
    color: var(--text);
}

footer .signiture {
    margin-top: 2rem;
}

footer .copyright {
    margin-top: .5rem;
    font-size: .8rem;
}

footer .socials a {
    font-size: 28px;
}

.link-reset {
    color: var(--white);
    text-decoration: none;
}

#nav-on-scroll a.active {
    color: var(--accent);
}

#nav-on-scroll a.contact-btn.active {
    border-color: var(--text);
    color: var(--text);
}

/* Mobile layout */
@media (max-width: 480px) {

    html {
        background: var(--surface);
        min-height: 100%;
    }

    section {
        scroll-margin-top: 3rem;
    }

    #hero {
        min-height: 100dvh;
        height: auto;
        padding: 7rem 1.5rem 3rem;
        align-items: flex-start;
        overflow: hidden;
    }

    .stats {
        margin: 5rem 0 0;
        align-self: center;
        flex-direction: column;
        gap: 3rem;
    }

    .stat-card h2 {
        font-size: 3rem;
    }

    .stat-card p {
        font-size: 1.3rem;
        text-align: center;
    }

    .vertical {
        position: static;
        flex-direction: row;
        align-self: center;
        margin-top: 5rem;
    }

    .vertical::after {
        display: none;
    }

    .hero-title {
        font-size: 3rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card-body .fa-github {
        display: none;
    }

    .featured-work-title {
        font-size: 2.5rem;
    }

    .navbar ul {
        gap: 1rem;
        justify-content: space-between;
        margin: .5rem 1rem;
    }

    .navbar {
        padding: 1rem;
    }

    .navbar ul > :first-child {
        display: none;
    }

    #nav-on-scroll {
        width: calc(100vw - 2rem);
        left: 1rem;
        top: .75rem;
        border-radius: 999px;
        border: 1px solid color-mix(
            in srgb,
            var(--cyan) 20%,
            transparent
    );
        padding: .75rem 1rem;
    }

    #nav-on-scroll ul {
        gap: 1rem;
        justify-content: space-between;
    }

    .contact-btn {
        padding: .4rem .8rem;
    }

    .portrait {
        width: 250px;
        height: 250px;
        margin: 0 auto;
    }

    .about-title {
        margin-left: 17px;
        text-align: left;
        font-size: 2.5rem;
    }

    .education-item {
        grid-template-columns: 1fr;
        gap: .5rem;
    }

    .education-meta {
        color: var(--text-muted);
        font-size: .85rem;
        margin-bottom: .5rem;
    }

    .item-description {
        font-size: .75rem;
    }

    .resume-link {
        font-weight: 600;
    }

    #featured-work,
    #about,
    #contact {
        padding: 3rem 1rem;
    }
}

@media (hover: none) {
    .navbar a:not(.contact-btn)::after {
        display: none;
    }

    .navbar a:not(.contact-btn)::active {
        color: var(--accent);
    }

    .contact-btn:active {
        border-color: var(--text);
    }
}