/* Import Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
}

/* Navigation Styles */
#desktop-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 80px;
    padding: 0 5rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

#mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 400;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #9fbe8f;
}

.nav-links a::before,
.nav-links a::after {
    content: '';
    position: absolute;
    height: 2px;
    background-color: #9fbe8f;
    transition: width 0.3s ease;
}

.nav-links a::before {
    bottom: -4px;
    left: 0;
    width: 0;
}

.nav-links a::after {
    bottom: -8px;
    right: 0;
    width: 0;
}

.nav-links a:hover::before,
.nav-links a:hover::after {
    width: 100%;
}

/* Mobile Navigation */
.hamburger-menu {
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 24px;
    height: 18px;
}

.hamburger-icon span {
    width: 100%;
    height: 2px;
    background-color: #333;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-icon.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-icon.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-icon.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu a {
    display: block;
    padding: 1rem;
    color: #333;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 400;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
}

.mobile-menu a:hover {
    background-color: #f8f8f8;
    color: #9fbe8f;
}

/* Main Content */
main {
    margin-top: 80px;
}

/* Profile Section */
.profile-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Desktop Layout */
.desktop-layout {
    display: flex;
    align-items: center;
    gap: 5rem;
    max-width: 1200px;
    width: 100%;
}

.profile-pic-container {
    flex-shrink: 0;
    transform: translateY(-40px);
}

.profile-text {
    flex: 1;
    max-width: 600px;
    text-align: center;
}

/* Mobile Layout */
.mobile-layout {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100vh;
}

.mobile-profile-pic {
    margin-bottom: 2rem;
}

.mobile-tagline {
    margin-top: 2rem;
    opacity: 0.7;
}

.mobile-tagline p {
    font-size: 1.2rem;
    color: #666;
    font-style: italic;
}

.scroll-indicator {
    margin-top: 2rem;
}

.arrow-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Profile Picture Styles */
.flip-card {
    width: 400px;
    height: 400px;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    border-radius: 50%;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%;
    overflow: hidden;
}

.flip-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flip-card-back {
    background-color: #9fbe8f;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotateY(180deg);
}

.flip-card:hover .flip-card-inner {
    border: 4px solid #9fbe8f;
    box-shadow:
        /* inner glow */
        0 0 15px 8px rgba(159, 190, 143, 0.6),
        /* mid glow */
        0 0 30px 16px rgba(159, 190, 143, 0.4),
        /* outer glow */
        0 0 60px 32px rgba(159, 190, 143, 0.2);
}

.flip-card-back p {
    font-size: 1.1rem;
    padding: 1rem;
    text-align: center;
}

/* Profile picture hover glow effect */
.flip-card-front img {
    transition: box-shadow 0.3s ease;
}

.flip-card:hover .flip-card-front img {
    box-shadow: 0 0 20px rgba(159, 190, 143, 0.6), 0 0 40px rgba(159, 190, 143, 0.4);
}

/* Text Styles */
.greeting {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 0.5rem;
    text-align: center;
}

.name {
    font-size: 3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-align: center;
}

.description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
    text-align: center;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Button Styles */
.btn-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 2rem;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #333;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 140px;
}

.btn-outline {
    background-color: transparent;
    color: #333;
}

.btn-outline:hover {
    background-color: #9fbe8f;
    border-color: #9fbe8f;
    color: white;
}

.btn-filled {
    background-color: #333;
    color: white;
}

.btn-filled:hover {
    background-color: #9fbe8f;
    border-color: #9fbe8f;
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-icons .fa {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #333;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icons .fa:hover {
    color: #9fbe8f;
    transform: scale(1.2);
}

/* Mobile Text Section */
.mobile-text-section {
    display: none;
    min-height: 100vh;
    padding: 2rem;
    background-color: #f8f8f8;
}

.mobile-text-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding-top: 2rem;
}

/* Projects Section */
.projects-section {
    padding: 1rem 1rem;
    background-color: transparent;
}

.projects-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 3rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 450px);
    justify-content: center;
    gap: 2rem;
    perspective: 1000px;
}

.project-card {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    z-index: 1;
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-height: 500px;
    /* Make cards taller */
}

.project-card:hover {
    z-index: 2;
    transform: translateY(-10px) rotateX(5deg) scale(1.03);
    transform-origin: center bottom;
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.1),
        0 0 10px 3px rgba(159, 190, 143, 0.6),
        0 0 20px 6px rgba(159, 190, 143, 0.4),
        0 0 40px 12px rgba(159, 190, 143, 0.2);
}


.project-item {
    width: 100%;
    height: 300px;
    /* Increased height for taller cards */
    overflow: hidden;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.project-image {
    width: 100%;
    height: 200px;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        min-height: 400px;
        /* Slightly shorter on mobile */
    }

    .project-item {
        height: 250px;
        /* Adjusted for mobile */
    }

    .project-card:hover {
        transform: translateY(-5px) scale(1.02);
        /* Reduced effect on mobile */
    }
}

.project-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.project-btn {
    width: 100%;
}

/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    background-color: white;
}

.creative-toggle {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
    user-select: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #9fbe8f;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

/* Creative Canvas */
#creativeCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 50;
    display: none;
}

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

    /* Hide desktop nav, show mobile nav */
    #desktop-nav {
        display: none;
    }

    #mobile-nav {
        display: block;
    }

    main {
        margin-top: 0;
    }

    /* Hide desktop layout, show mobile layout */
    .desktop-layout {
        display: none;
    }

    .mobile-layout {
        display: flex;
    }

    .mobile-text-section {
        display: block;
    }

    /* Adjust profile pic size for mobile */
    .flip-card {
        width: 300px;
        height: 300px;
        box-shadow: 0 0 80px rgba(159, 190, 143, 0.6), 0 0 80px rgba(159, 190, 143, 0.4);
        border-radius: 100%;
    }

    /* Adjust text sizes for mobile */
    .name {
        font-size: 2.5rem;
    }

    .description {
        font-size: 1rem;
    }

    /* Stack buttons vertically on mobile */
    .btn-container {
        flex-direction: column;
        align-items: center;
    }

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

    /* Adjust projects grid for mobile */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .profile-section {
        padding: 1rem;
    }

    .mobile-text-section {
        padding: 1rem;
    }

    .projects-section {
        padding: 2rem 1rem;
    }

    .flip-card {
        width: 250px;
        height: 250px;
    }

    .flip-card {
        width: 250px;
        height: 250px;
        /* Add permanent circular glow for small mobile */
        box-shadow: 0 0 15px rgba(159, 190, 143, 0.6), 0 0 30px rgba(159, 190, 143, 0.4);
        border-radius: 50%;
    }

    .name {
        font-size: 2rem;
    }

    .social-icons .fa {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Projects Section with Leaves and 3D Effects */
#projects {
    position: relative;
    overflow: hidden;
    background-color: transparent;
}

#wind-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

#leaf-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Leaf Animation */
.leaf {
    position: absolute;
    left: -50px;
    top: var(--leaf-start-top);
    width: 40px;
    pointer-events: none;
    opacity: 0.9;
    transform: rotate(var(--leaf-rotate-start));
    animation: blow var(--leaf-duration) linear forwards;
}

@keyframes blow {
    to {
        left: calc(100% + 50px);
        transform: rotate(var(--leaf-rotate-end));
    }
}

/* Wind Gust Animation */
.wind-gust {
    position: absolute;
    top: var(--gust-start-top);
    left: -200px;
    width: 200px;
    height: 2px;
    background: rgba(108, 75, 31, 0.3);
    filter: blur(1px);
    animation: gust-move var(--gust-duration) ease-in-out forwards;
}

@keyframes gust-move {
    0% {
        left: -200px;
        opacity: 0;
    }

    10% {
        opacity: 0.5;
    }

    90% {
        opacity: 0.5;
    }

    100% {
        left: calc(100% + 200px);
        opacity: 0;
    }
}

.projects-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 3rem;
}

/* Grid layout - copied from original */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 450px);
    justify-content: center;
    gap: 2rem;
    perspective: 1000px;
}

/* Card container - copied from original */
.project-card {
    padding: 1.5rem;
    flex: 1;
    background: white;
    border-radius: 2rem;
    border: rgb(53, 53, 53) 0.1rem solid;
    border-color: rgb(163, 163, 163);
    text-align: center;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    z-index: 1;
}

/* Project item container - copied from original */
.project-item {
    width: 100%;
    height: 425px;
    overflow: hidden;
    border-radius: 2rem;
    margin-bottom: 1rem;
}

/* Project image - copied from original */
.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Project title - copied from original */
.project-title {
    margin: 1rem;
    color: black;
    font-size: 1.3rem;
    font-weight: 600;
}

/* Project button - copied from original */
.project-btn {
    z-index: 3;
    width: 70%;
    position: relative;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.8rem 2rem;
    border-radius: 2rem;
    border: rgb(53, 53, 53) 0.1rem solid;
    background: none;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.project-btn:hover {
    background: rgba(159, 190, 143, 0.8);
    color: white;
}

/* 3D hover effects - copied from original */
.project-card:hover {
    z-index: 2;
    transform: translateY(-10px) rotateX(5deg) scale(1.03);
    transform-origin: center bottom;
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.1),
        0 0 10px 3px rgba(159, 190, 143, 0.6),
        0 0 20px 6px rgba(159, 190, 143, 0.4),
        0 0 40px 12px rgba(159, 190, 143, 0.2);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        min-height: 350px;
        /* Reduced from 400px */
        padding: 1rem;
        /* Reduced from 1.5rem */
    }

    .project-item {
        height: 225px;
        /* Reduced from 250px */
    }

    .project-title {
        font-size: 1.1rem;
        /* Smaller title */
        margin: 0.5rem;
        /* Reduced margin */
    }

    .project-btn {
        padding: 0.6rem 1rem;
        /* Smaller button */
        font-size: 0.8rem;
        /* Smaller button text */
    }

    .project-card:hover {
        transform: translateY(-5px) scale(1.02);
    }
}

/* Desktop scroll arrow */
.desktop-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.desktop-scroll-indicator .arrow-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    animation: bounce 2s infinite;
    transition: transform 0.3s ease;
}

.desktop-scroll-indicator .arrow-icon:hover {
    transform: translateX(-50%) scale(1.2);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}