@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital@0;1&family=Poppins:wght@300;400;500;600&display=swap');

/*
    // CSS Variables
*/
:root {
    /* Colors */
    --bg-color: #0B0E14;
    --text-color: #E2E8F0;
    --accent-color: #7C3AED;
    --secondary-color: #B2B2B2;
    --border-color: rgba(51, 65, 85, 0.5);
    --card-bg: rgba(24, 24, 27, .6);
    --card-bg-hover: rgba(24, 24, 27, .2);
    --shadow-color: rgba(124, 58, 237, 0.4);

    /* Typography */
    --body-font: "Open sans", sans-serif;
    --title-font: "Poppins", sans-serif;
    --weight-light: 300;
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;

    /* Font sizes for all screens */
    --fs-small: clamp(0.875rem, 0.8rem + 0.2vw, 1rem);
    --fs-body: clamp(1rem, 0.96rem + 0.19vw, 1.125rem);
    --fs-h4:   clamp(1.25rem, 1.15rem + 0.38vw, 1.5rem);
    --fs-h3:   clamp(1.5rem, 1.37rem + 0.56vw, 1.875rem);
    --fs-h2:   clamp(2rem, 1.77rem + 0.75vw, 2.5rem);
    --fs-h1:   clamp(2.5rem, 2.15rem + 1.5vw, 3.5rem);
    --fs-nav: clamp(1rem, 0.9rem + 0.27vw, 1.125rem);
    --fs-button: clamp(1rem, 0.95rem + 0.13vw, 1.0625rem);

    /* Layout */
    --z-fixed: 100;
    --z-card: 50;
    --header-height: 3.5rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
    overflow-x: hidden;
}

body {
    font: var(--fs-body) var(--body-font);
    background-color: var(--bg-color);
    color: var(--secondary-color);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/*
    // Layout
*/
#wrapper {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin-inline: auto;
}

.section-container {
    padding-top: 4vh;
    min-height: auto;
    margin: 0 5rem 3rem;
}

.section-title {
    position: relative;
    text-align: center;
    font: var(--weight-semibold) var(--fs-h2) var(--title-font);
    padding-top: 2rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    height: 3px;
    width: 50%;
    background-color: var(--accent-color);
    animation: spread 2s infinite;
}

/*
    // Scroll Animations
*/
.fade-in {
    opacity: 0;
}

.fade-in.animate {
    animation: fadeIn .8s ease-out forwards;
}

.slide-up {
    opacity: 0;
    transform: translateY(50px);
}

.slide-up.animate {
    animation: slideUp .8s ease-out forwards;
}

.slide-left {
    opacity: 0;
    transform: translateX(50px);
}

.slide-left.animate {
    animation: slideLeft .8s ease-out forwards;
}

.slide-right {
    opacity: 0;
    transform: translateX(-50px);
}

.slide-right.animate {
    animation: slideRight .8s ease-out forwards;
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
}

.scale-in.animate {
    animation: scaleIn .8s ease-out forwards;
}

.stagger {
    opacity: 0;
    transform: translateY(30px);
}

.stagger.animate:nth-child(1) { animation: slideUp .6s ease-out .1s forwards; }
.stagger.animate:nth-child(2) { animation: slideUp .6s ease-out .2s forwards; }
.stagger.animate:nth-child(3) { animation: slideUp .6s ease-out .3s forwards; }
.stagger.animate:nth-child(4) { animation: slideUp .6s ease-out .4s forwards; }
.stagger.animate:nth-child(5) { animation: slideUp .6s ease-out .5s forwards; }
.stagger.animate:nth-child(6) { animation: slideUp .6s ease-out .6s forwards; }
.stagger.animate:nth-child(7) { animation: slideUp .6s ease-out .7s forwards; }
.stagger.animate:nth-child(8) { animation: slideUp .6s ease-out .8s forwards; }

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spread {
    0%, 100% {
        width: 0;
    }
    50% {
        width: 90%;
    }
}

/*
    // Header & Navigation
*/
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-fixed);
    background-color: var(--bg-color);
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav {
    position: relative;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font: var(--weight-light) 1.75rem var(--title-font);
    color: var(--text-color);
    transition: color .4s;
}

.nav-logo span {
    color: var(--accent-color);
    font-size: 2rem;
}

.nav-logo:hover {
    cursor: pointer;
    color: var(--accent-color);
}

.nav-toggle,
.nav-close {
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
    display: flex;
    background: none;
    padding: 0;
}

#nav-close path,
#nav-toggle path {
    stroke: var(--text-color);
}

.nav-close {
    position: absolute;
    top: 2rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.nav-link {
    position: relative;
    font: var(--weight-regular) var(--fs-nav) var(--title-font);
    color: var(--text-color);
    transition: opacity .4s, color .4s;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width .4s;
}

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

.nav-link:hover::after {
    width: 100%;
}

.nav-list:has(.nav-link:hover) .nav-link:not(:hover) {
    opacity: .4;
}

.nav-socials {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.nav-socials a {
    transition: transform .2s;
}

.nav-socials a svg {
    width: 2rem;
    height: 2rem;
}

.nav-socials a:hover {
    transform: translateY(-8px);
}

.nav-socials a:hover svg {
    fill: var(--accent-color);
}

#nav-mail:hover svg {
    fill: none;
    stroke: var(--accent-color);
}

/*
    // Buttons
*/
.btn {
    font: var(--weight-medium) var(--fs-button) var(--title-font);
    min-width: 9rem;
    padding: 1rem;
    border-radius: 1rem;
    transition: background-color 300ms ease, color 300ms ease, transform 150ms ease;
    cursor: pointer;
}

.btn:active {
    transform: scale(0.98);
}

/*
    // Hero Section
*/
.main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin-top: 5.5rem;
}

.hero {
    display: flex;
    justify-content: center;
    gap: 5rem;
    min-height: 80vh;
}

.image-container {
    width: min(400px, 90vw);
    height: min(400px, 90vw);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto 0;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 20px var(--shadow-color);
    flex-shrink: 0;
}

.image-container img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.hero-text-section {
    align-self: center;
}

/*.hero-text,*/
/*.hero-sub,*/
.hero-title,
.hero-text-section p {
    text-align: center;
}

.hero-text-section p {
    font-weight: var(--weight-medium);
}

.hero-text {
    font-size: var(--fs-h4);
    margin-bottom: .5rem;
    color: var(--secondary-color);
}

.hero-sub {
    font-size: var(--fs-h3);
    margin-bottom: 1.25rem;
    color: var(--text-color);
}

.hero-title {
    font: var(--weight-semibold) var(--fs-h1) var(--title-font);
    color: var(--accent-color);
    margin-bottom: .5rem;
}

.btn-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-color-1 {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

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

.btn-color-2 {
    background-color: rgba(124, 58, 237, .5);
    color: var(--text-color);
    border: 2px solid transparent;
}

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

/*
    // Social Links
*/
.social-links {
    display: flex;
    justify-content: center;
    margin-top: 1.25rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-links a svg {
    width: 2rem;
    height: 2rem;
}

.social-links a svg path {
    fill: var(--secondary-color);
    transition: fill .3s;
}

.social-links a:hover svg path {
    fill: var(--accent-color);
}

/*
    // About Section
*/
.about-me {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-container {
    display: flex;
    flex-direction: column;
}

.about-me-content p {
    color: var(--secondary-color);
    font-weight: var(--weight-regular);
    line-height: 1.75rem;
    text-align: justify;
    margin: 1rem 0 3rem;
}

.about-me-qualifications {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.education-container {
    width: 100%;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    background-color: var(--card-bg);
    box-shadow: 0 0 8px var(--shadow-color);
}

.about-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.about-title h2 {
    font: var(--weight-semibold) var(--fs-h4) var(--title-font);
    color: var(--text-color);
    letter-spacing: .1rem;
}

.about-title p {
    color: var(--accent-color);
    font-weight: var(--weight-medium);
    letter-spacing: .05rem;
}

/*
    // Skills Section
*/
.skills {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skills h1 {
    letter-spacing: .1rem;
}

.skills-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.skills-item-container {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.skills-item-container h1 {
    font: var(--weight-medium) var(--fs-h3) var(--title-font);
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.skills-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
    justify-items: center;
    gap: 2rem;
}

.card-container {
    width: 100%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .8rem;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: 0 0 5px var(--shadow-color);
    background-color: var(--card-bg);
    transition: background-color .3s, transform .3s;
}

.card-container svg {
    width: 4rem;
    height: 4rem;
}

.card-container p {
    font-weight: var(--weight-medium);
    color: var(--secondary-color);
    transition: color .3s;
}

.card-container:hover {
    background-color: var(--card-bg-hover);
    /*transform: translateY(-6px);*/
}

.card-container:hover p {
    color: var(--accent-color);
}

/*
    // Project Section
*/
.project {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.project-cards-container {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
    justify-items: center;
    align-items: start;
    gap: 3.5rem 2rem;
    margin-top: 3rem;
}

.project-card {
    position: relative;
    width: 100%;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: .8rem;
    box-shadow: 0 0 5px var(--shadow-color);
    transition: box-shadow .4s ease, transform .4s ease;
}

.project-card:hover {
    box-shadow: 0 0 15px var(--shadow-color);
}

.project-card-image {
    width: 100%;
    z-index: var(--z-card);
    transition: transform .4s ease;
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: .5rem;
    border: 1px solid var(--shadow-color);
}

.project-card-title {
    font: var(--weight-semibold) var(--fs-h4) var(--title-font);
    letter-spacing: .1rem;
    color: var(--text-color);
    text-align: center;
    margin-top: .5rem;
}

.project-card-content-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    width: 100%;
    opacity: 0;
    transition: grid-template-rows .4s ease, opacity .4s ease;
}

.project-card-content-inner {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.project-card-text {
    color: var(--secondary-color);
    font-weight: var(--weight-light);
    line-height: 1.5rem;
    text-align: center;
}

.project-card-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    flex-wrap: wrap;
}

.project-btn {
    flex: 1;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    background-color: transparent;
}

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

/*
    // Contact Section
*/
.contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 2rem;
}

.contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(60%, 100%);
    margin-top: 1rem;
}

.contact-text {
    font-weight: var(--weight-medium) 1rem var(--title-font);
    text-align: center;
    margin-bottom: 2rem;
}

.contact-details-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 500px;
    min-width: min(300px, 100%);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 5px var(--shadow-color);
    border-radius: .8rem;
}

.contact-link {
    display: flex;
    align-items: center;
}

.contact-link svg {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.contact-details {
    margin-left: 1rem;
}

.contact-details p {
    font: var(--weight-medium) var(--fs-nav) var(--title-font);
    color: var(--secondary-color);
    word-break: break-word;
}

.contact-details a {
    transition: color .3s;
}

.contact-details a:hover {
    color: var(--text-color);
}

/*
    // Footer
*/
footer {
    width: 100%;
    border-top: 2px solid var(--border-color);
    margin-top: auto;
}

.footer {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
}

.footer a {
    font: var(--weight-semibold) var(--fs-h2) var(--title-font);
    color: var(--text-color);
    transition: color .2s;
    cursor: pointer;
}

.footer a:hover {
    color: var(--accent-color);
}

.footer p {
    width: min(50%, 100%);
    font-weight: var(--weight-regular);
    text-align: center;
}

.footer-social-links {
    width: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.footer-social-links a svg {
    width: 2rem;
    height: 2rem;
    transition: fill .3s, stroke .3s;
}

.footer-social-links a:hover svg {
    fill: var(--accent-color);
}

#mail:hover svg {
    fill: none;
    stroke: var(--accent-color);
}

.footer-bottom {
    font-size: var(--fs-small);
}

.up-arrow {
    position: absolute;
    bottom: 0;
    right: 0;
}

.up-arrow svg {
    transition: stroke .3s;
}

.up-arrow:hover svg {
    stroke: var(--accent-color);
}

/*
    // Media Queries
*/

/* Mobile */
@media (max-width: 1150px) {
    .container {
        margin-inline: 2rem;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background-color: var(--bg-color);
        padding: 6rem 3.5rem 4.5rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        transition: left .4s ease-in;
    }

    .show-menu {
        left: 0;
    }

    .main {
        margin-top: 4rem;
    }

    .section-container {
        margin: 0 0 2rem;
    }

    .hero {
        flex-direction: column;
        gap: 3rem;
    }

    .image-container {
        width: min(300px, 80vw);
        height: min(300px, 80vw);
        margin: 0;
        align-self: center;
    }

    .about-title {
        flex-direction: column;
        align-items: flex-start;
    }

    .about-title h2 {
        margin-bottom: 1rem;
    }

    .project-cards-container {
        margin-top: 1.5rem;
    }

    .project-card-content-wrapper {
        grid-template-rows: 1fr;
        opacity: 1;
    }

    .project-card-title {
        margin-bottom: 1rem;
    }

    .contact-content,
    .contact-details-container,
    .footer p {
        width: 100%;
    }

    .up-arrow {
        display: none;
    }
}

/* Desktop */
@media (min-width: 1150px) {
    .nav-close,
    .nav-toggle,
    .nav-socials {
        display: none;
    }

    .nav {
        height: calc(var(--header-height) + 2rem);
    }

    .nav-list {
        flex-direction: row;
        gap: 3.5rem;
    }

    .project-card:hover .project-card-image {
        transform: translateY(-60px);
    }

    .project-card:hover .project-card-content-wrapper {
        grid-template-rows: 1fr;
        opacity: 1;
        margin-top: -40px;
    }

    /* Tablet */
    @media (max-width: 768px) {
        .section-container {
            margin: 0 1rem 2rem;
        }

        .hero-sub {
            margin-bottom: 2rem;
        }

        .btn {
            width: 100%;
            max-width: 250px;
        }
    }

    /* Small Mobile */
    @media (max-width: 500px) {
        .skills-items {
            grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr));
        }

        .project-cards-container {
            grid-template-columns: 1fr;
        }
    }

    /* Smallest Mobile */
    @media (max-width: 400px) {
        .btn-container {
            flex-direction: column;
            align-items: center;
        }
    }
}