@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;300;400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #1e1e1e;
    background: #f5f5f5;
    width: 100%;
    overflow-x: hidden;
    position: relative;

    p {
        font-family: "Roboto", sans-serif;
    }

    h2 {
        text-align: center;
    }
}

/* Sections */
section {
    padding: 64px 32px;
    max-width: 900px;
    margin: 0 auto;
}

/* Header */
header {
    background: #f5f5f5;
    color: #1e1e1e;
    padding: 16px 32px;
}

header h1 {
    background: linear-gradient(135deg, rgba(255, 71, 71, 0.85), rgba(71, 194, 255, 0.85));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: #1e1e1e;
    text-decoration: none;
    font-weight: 600;

    &:hover {
        color: #ff8c42;
    }
}

.hamburger-menu {
    display: none;
    cursor: pointer;
    z-index: 100;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #1e1e1e;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Intro Section */
#intro {
    height: auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    text-align: center;
    background: #f5f5f5;
    color: #1e1e1e;

    .typing {
        font-family: "JetBrains Mono", monospace;
        font-weight: 700;
        color: #ff8c42;
        border-right: 2px solid #ff8c42;
        white-space: nowrap;
        overflow: hidden;
        display: inline-block;
        animation: typing 2s steps(30, end), blink 0.7s step-end infinite;
    }
}

.intro-name {
    display: flex;
    flex-direction: column;
}

.intro-name h2 img {
    width: 32px;
    height: auto;
    margin-left: 10px;
}

.intro-name .hire-me {
    display: inline-flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.intro-name .hire-me:hover {
    .upwork-logo {
        transform: rotate(-360deg);
    }

    .hire-text {
        opacity: 1;
        transform: translateX(0);
    }
}

.intro-name .upwork-logo {
    width: 100px;
    height: auto;
    border-radius: 50px;
    margin-top: 50px;
    display: inline-block;
    transition: transform 0.4s ease;
}

.intro-name .hire-text {
    margin-left: 0.5rem;
    font-size: 32px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}


@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 300px;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.profile-img {
    width: auto;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 24px;
    position: relative;
    border: 4px solid transparent;
    ;
    z-index: 2;
    animation: waveBorder 8s ease-in-out infinite;
}

.profile-img::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96e6a1);
    border-radius: inherit;
    z-index: -1;
    animation: jellyBorder 6s ease-in-out infinite;
}

@keyframes waveBorder {
    0% {
        border-radius: 50% 50% 50% 50%;
    }

    25% {
        border-radius: 60% 40% 55% 45%;
    }

    50% {
        border-radius: 45% 55% 60% 40%;
    }

    75% {
        border-radius: 55% 45% 40% 60%;
    }

    100% {
        border-radius: 50% 50% 50% 50%;
    }
}

@keyframes jellyBorder {
    0% {
        border-radius: 50%;
        transform: scale(1);
    }

    25% {
        border-radius: 56% 44% 70% 30% / 30% 54% 46% 70%;
        transform: scale(1.02);
    }

    50% {
        border-radius: 43% 57% 30% 70% / 50% 30% 70% 50%;
        transform: scale(1.04);
    }

    75% {
        border-radius: 40% 60% 54% 46% / 49% 60% 40% 51%;
        transform: scale(1.02);
    }

    100% {
        border-radius: 50%;
        transform: scale(1);
    }
}

.about-me-section {
    display: flex;
    margin-top: 20px;
}

.about-me-section img {
    width: 200px;
    margin-right: 50px;
}

#about h2 .bracket {
    font-family: 'Fira Code', monospace;
    font-weight: 700;
    color: #ff6f3c;
    transition: transform 0.3s ease, color 0.3s ease;
}

#about h2 .bracket:first-child {
    margin-right: 6px;
}

#about h2 .bracket:last-child {
    margin-left: 6px;
}

#services {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.services-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-top: 20px;
}

.service-card {
    flex: 1 1 300px;
    max-width: 350px;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.95),
            rgba(240, 255, 244, 0.9));
    ;
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.15);
    border: 1px solid rgba(72, 187, 120, 0.1);
}

.service-card:nth-child(1),
.service-card:nth-child(6) {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.95),
            rgba(230, 255, 238, 0.9));
}

.service-card:nth-child(2),
.service-card:nth-child(5) {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.95),
            rgba(230, 247, 255, 0.9));
}

.service-card:nth-child(3),
.service-card:nth-child(4) {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.95),
            rgba(255, 245, 230, 0.9));
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent,
            rgba(255, 255, 255, 0.05),
            transparent);
    transition: 0.5s;
}

.service-card:hover {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 1),
            rgba(240, 255, 244, 0.95));
    transform: translateY(-10px) rotate(1deg);
    box-shadow: 0 15px 30px #1e1e1e;
}

.service-card:hover::before {
    left: 100%;
}

.service-card h3 {
    color: #1e1e1e;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.service-card:hover h3 {
    color: #1e1e1e;
}

.service-card p {
    color: #444444;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.service-icon img {
    width: 75px;
    height: auto;
}

.service-card:hover .service-icon {
    transform: scale(1.2) rotate(-5deg);
}

.service-card:hover h3 {
    transform: translateX(5px);
}

@keyframes float {
    0% {
        transform: translateY(-10px) rotate(1deg);
    }

    50% {
        transform: translateY(-12px) rotate(-1deg);
    }

    100% {
        transform: translateY(-10px) rotate(1deg);
    }
}

.service-card:hover {
    animation: float 3s ease-in-out infinite;
}

/* Projects */
#portfolio {
    width: 100%;
    overflow-x: hidden;
}

.restaurant-project {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.web-mockup-wrapper,
.mobile-mockup-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.web-mockup-wrapper {
    max-width: 840px;
    align-self: flex-start;
}

.mobile-mockup-wrapper {
    max-width: 480px;
    align-self: flex-end;
}

.web-mockup {
    height: 500px;
    overflow: scroll;
    scrollbar-width: none;
    background: #111;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    max-width: 800px;
    margin: 20px auto;
    transform: translateY(40px);
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;

    .browser-bar {
        display: flex;
        gap: 6px;
        padding: 8px 12px;
        background: #333;

        span {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            display: inline-block;

            &:nth-child(1) {
                background: #ff5f56;
            }

            &:nth-child(2) {
                background: #ffbd2e;
            }

            &:nth-child(3) {
                background: #27c93f;
            }
        }
    }

    img {
        width: 100%;
        display: block;
    }
}

.mobile-mockup {
    width: 400px;
    height: 500px;
    overflow: scroll;
    scrollbar-width: none;
    border: 10px solid #333;
    border-radius: 36px;
    background: #111;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    margin: 20px auto;
    position: relative;
    transform: translateY(40px);
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;

    img {
        width: 100%;
        display: block;
        border-radius: 24px;
    }
}

.mockup-caption {
    font-size: 32px;
    font-weight: 500;
    background: linear-gradient(120deg, #b0b0b0, #e0e0e0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.web-mockup-wrapper .mockup-caption {
    transform: translateX(40px);
}

.mobile-mockup-wrapper .mockup-caption {
    transform: translateX(-40px);
}

.mockup-caption.visible,
.web-mockup.visible,
.mobile-mockup.visible {
    opacity: 1;
    transform: translate(0, 0);
}

footer {
    text-align: center;
    background: #f5f5f5;
    color: #1e1e1e;
}

.contact {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 16px;
}

.contact img {
    cursor: pointer;
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease;
}

.contact a {
    display: inline-block;
    transition: transform 0.3s ease;
}

.contact a:hover img {
    transform: translateY(-2px);
}

@media (max-width: 768px) {

    section {
        padding: 24px;
    }

    header {
        padding: 16px 24px 24px;
    }

    .service-card {
        flex: 1 1 100%;
    }

    nav {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .hamburger-menu {
        display: block;
        position: relative;
        z-index: 101;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -250px;
        width: 200px;
        height: auto;
        background: rgba(245, 245, 245, 0.98);
        padding: 80px 20px 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        transition: right 0.3s ease;
        z-index: 100;
        border-radius: 8px 0 0 8px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        right: -32px;
    }

    .nav-links li {
        margin: 0.8rem 0;
        opacity: 0;
        transform: translateX(20px);
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
        transition: all 0.3s ease;
    }

    /* Delay each nav item */
    .nav-links li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-links li:nth-child(2) {
        transition-delay: 0.2s;
    }

    .nav-links li:nth-child(3) {
        transition-delay: 0.3s;
    }

    /* Hamburger Animation */
    .hamburger-menu.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    #intro {
        flex-direction: column;
    }

    #intro .profile-img {
        height: 250px;
    }

    .hire-me {
        justify-content: center;
    }

    .hire-text {
        display: none;
    }

    .about-me-section {
        flex-direction: column;
    }

    .about-me-section img {
        width: auto;
        margin: 0 0 20px 0;
    }

    .web-mockup-wrapper,
    .mobile-mockup-wrapper {
        flex-direction: column;
    }

    .mobile-mockup {
        width: auto;
        height: 700px;
    }
}