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

body {
    font-family: 'Preahvihear', sans-serif !important;
    background-color: #11071F !important;
}

nav {
    background-color: #1e0b37;
    color: white;
    padding: 0.7rem 2rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: rgb(191, 72, 147) 0px 2px 16px -10px;
}

/* Logo */
.logo {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Menu items */
ul {
    list-style: none;
    display: flex;
    gap: 4.5rem;
}

ul li a {
    color: white;
    text-decoration: none;
    font-weight: 300;
    transition: color 0.3s ease;
    font-size: 12px;
}

ul li a:hover {
    color: #d1c4e9;
}

#i-am {
    font-size: 37px;
}

/* Toggle button hidden on desktop */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* Mobile view */
@media (max-width: 768px) {
    ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: -10px;
        background-color: #1e0b37;
        padding: 1rem;
        border-radius: 5px;
        box-shadow: rgb(191, 72, 147) 0px 2px 16px -10px;
    }

    ul.show {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    #i-am {
        font-size: 19px;
    }

    #banner-component {
        margin-top: -70px;
    }
}

#avatar {
    width: 140px !important;
}

/* Responsive for small screens */
@media (max-width: 600px) {
    ul {
        gap: 1rem;
    }

    .logo {
        font-size: 1rem;
    }
}

#name-headline {
    margin-left: -13%;
}

#desc-headline {
    text-align: left;
    margin-top: -50px;
}


/* Container */
.experience-card {
    width: 100%;
    max-width: 670px;
    height: 260px;
    background: linear-gradient(90deg,
                #190634 100%,
                #261045 85%,
                #38126D 57%,
                #251043 34%,
                #130428 7%);
    border-radius: 15px;
    box-shadow: 4px 7px 26px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
}

/* Top accent bar */
.card-top-bar {
    height: 8px;
    background: #4F228D;
}

/* Main content */
.card-content {
    display: flex;
    padding: 1rem;
    gap: 1rem;
}

/* Logo */
.company-logo {
    width: 75px;
    height: 75px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Text area */
.card-text {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Company name */
.company-name {
    font-weight: 600;
    font-size: 22px;
    color: white;
    margin: 0;
}

/* Role */
.role {
    font-family: 'Preahvihear', sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 22px;
    letter-spacing: 0.02em;
    color: white;
    margin: 0.2rem 0 0.6rem;
}

/* Description */
.description {
    font-family: 'Preahvihear', sans-serif;
    font-weight: 400;
    font-size: 13.5px;
    /* line-height: 1px; */
    color: white;
    margin: 0 0 0.8rem;
    max-width: 90%;
}

/* Learn more button */
.learn-more {
    background: #2C1250;
    border: 1px solid #693B93;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    font-size: 10px;
    line-height: 15px;
    padding: 0.4rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.learn-more:hover {
    background: #693B93;
}

/* Responsive */
@media (max-width: 600px) {
    .card-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

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

.featured-projects {
    padding: 4rem 2rem;
    color: white;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    font-family: 'Preahvihear', sans-serif;
}

.project-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.project-card.reverse {
    flex-direction: row-reverse;
}

.project-image img {
    width: 100%;
    max-width: 500px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s ease;
}

.project-image img:hover {
    transform: scale(1.05);
}

.project-content {
    max-width: 500px;
}

.project-content h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.project-content .role {
    font-size: 1rem;
    color: #b8a6ff;
    margin-bottom: 1rem;
}

.project-content .description {
    margin-bottom: 1rem;
    line-height: 1.5;
}

.tech-stack span {
    display: inline-block;
    background: #4F228D;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    margin-right: 0.4rem;
    font-size: 0.85rem;
}

.buttons {
    margin-top: 1rem;
}

.btn {
    display: inline-block;
    background: #763CAC;
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #9b59ff;
}

.btn.secondary {
    background: transparent;
    border: 1px solid #763CAC;
}

.btn.secondary:hover {
    background: #763CAC;
}

/* Animations */
.fade-in-left {
    animation: fadeInLeft 1s ease forwards;
    opacity: 0;
}

.fade-in-right {
    animation: fadeInRight 1s ease forwards;
    opacity: 0;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

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

/* Responsive */
@media (max-width: 768px) {

    .project-card,
    .project-card.reverse {
        flex-direction: column;
    }
}


/* ======== EXTRA RESPONSIVE FIXES ======== */

/* Navbar mobile stacking */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul {
        flex-direction: column !important;
        gap: 0.5rem !important;
        width: 100%;
        padding-left: 0;
        margin-top: 0.5rem;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: 0.5rem 0;
        font-size: 14px;
    }
}

/* Banner section: stack avatar + intro text */
@media (max-width: 768px) {
    #avatar-blob {
        margin-bottom: 1rem;
    }

    #avatar, #avatar-blob {
        margin-left: -8%;
    }

    #name-headline {
        margin-left: 0;
        text-align: center;
    }

    #desc-headline {
        margin-top: 0;
        text-align: center;
    }

    .experience-card {
        height: 400px;
    }
}

/* Introduction text scaling */
@media (max-width: 768px) {
    #profile-description {
        font-size: 15.5px !important;
    }

    #avatar {
        width: 100px !important;
    }
}

/* Work Experience cards: single column */
@media (max-width: 768px) {
    .experience-card {
        max-width: 100%;
    }

    .card-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .company-logo {
        margin-bottom: 0.7rem;
    }
}

/* Featured projects: stack image above text */
@media (max-width: 768px) {
    .project-card {
        flex-direction: row !important;
        text-align: center;
    }

    .project-image img {
        max-width: 100%;
    }

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

    #profile-description {
        font-size: 3px;
    }
}

/* Footer responsiveness */
@media (max-width: 600px) {
    .footer {
        text-align: center;
    }

    .footer-socials {
        display: flex;
        justify-content: center;
        gap: 1rem;
        margin-top: 1rem;
    }

    #profile-description {
        font-size: 12px;
    }

    #name-headline svg,
    .text-center svg {
        width: 100%;
        height: auto;
        max-width: 100%;
    }

    #desc-headline svg {
        width: 130%;
        height: auto;
        max-width: 130%;
        margin-left: -17%;
        margin-top: -35px;
    }

    #name-headline {
        margin-left: -57%;
    }

    #name-headline {
        overflow-x: hidden;
        /* prevents horizontal scroll */
    }
}