/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #fafafa;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Greeting pill */
.greeting-pill {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: linear-gradient(135deg, rgba(0,122,204,0.1), rgba(0,122,204,0.2));
    border-radius: 50px;
    font-size: 1rem;
    color: #007acc;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

/* Hero section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 0% 0%, rgba(0,122,204,0.03) 0%, transparent 50%),
                radial-gradient(circle at 100% 100%, rgba(0,122,204,0.03) 0%, transparent 50%);
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
    flex: 0 1 50%;
}

/* Projects Stack */
.projects-stack {
    flex: 0 1 45%;
    position: relative;
    height: 400px;
    perspective: 1000px;
    pointer-events: auto;
    z-index: 2;
    margin-top: 2rem;
    padding: 3rem;
    transform-style: preserve-3d;
    min-height: 400px;
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-card {
    position: absolute;
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid #eaeaea;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.5s ease-out,
                box-shadow 0.3s ease;
    cursor: default; /* Remove pointer cursor */
    transform-origin: center center;
    will-change: transform, opacity, z-index;
    backface-visibility: hidden; /* Helps with animation smoothness */
    -webkit-backface-visibility: hidden;
}

/* Remove hover styles completely */
.project-card:not(.active):hover {
    transform: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Disable hover effect when a card is active */
.project-card.active:hover {
    transform: none;
}

/* Update hover styles to not interfere with the spread effect */
.projects-stack:not(.is-spread):not(.has-active-card) .project-card:hover {
    transform: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Disable hover effects when spread */
.projects-stack.is-spread .project-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Ensure active card stays in position */
.projects-stack.has-active-card .project-card {
    pointer-events: none;
}

.projects-stack.has-active-card .project-card.active {
    pointer-events: all;
}

.project-card .project-tech {
    transition: opacity 0.3s ease;
}

.project-card:not(.active) .project-tech {
    opacity: 0.7;
}

.project-type {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(0,122,204,0.1);
    color: #007acc;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.project-card h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.project-card p {
    color: #546e7a;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tech-tag {
    padding: 0.3rem 0.8rem;
    background: rgba(0,122,204,0.08);
    color: #007acc;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-link {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,122,204,0.08);
    color: #007acc;
    border-radius: 50%;
    transform: scale(0.9);
    opacity: 0.8;
    transition: all 0.3s ease;
    pointer-events: all !important;
    cursor: pointer;
}

.project-link:hover {
    background: #007acc;
    color: #ffffff;
}

/* Typography */
.name {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #007acc 0%, #0056b3 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title {
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    display: inline-block;
    position: relative;
}

.description {
    font-size: 1.3rem;
    color: #546e7a;
    margin-bottom: 2rem;
    max-width: 600px;
    display: block;
    line-height: 1.6;
    position: relative;
}

.additional-info {
    font-size: 1.1rem;
    color: #78909c;
    margin-bottom: 2.5rem;
}

/* Status indicator styles */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50px;
    font-size: 0.9rem;
    color: #6366f1;
    font-weight: 500;
    transition: background-color 0.2s ease;
    margin-bottom: 1.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #6366f1;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

.topics {
    color: #818cf8;
    font-weight: 400;
    font-size: 0.85em;
    opacity: 0.9;
}

/* Tech stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tech-item {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #007acc;
    background: rgba(0,122,204,0.08);
    transition: all 0.2s ease;
    cursor: pointer;
}

.tech-item:hover {
    background: rgba(0,122,204,0.12);
    transform: translateY(-1px);
}

/* Add icons for music and football */
.tech-item i {
    margin-right: 0.5rem;
}

.tech-item.music {
    color: #e91e63;
    background: rgba(233, 30, 99, 0.08);
}

.tech-item.music:hover {
    background: rgba(233, 30, 99, 0.12);
}

.tech-item.football {
    color: #4caf50;
    background: rgba(76, 175, 80, 0.08);
}

.tech-item.football:hover {
    background: rgba(76, 175, 80, 0.12);
}

/* Keep only the pulse animation for the status dot */
@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
    }
    
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }
    
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

/* Buttons */
.cta-buttons {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.btn.primary {
    background: #007acc;
    color: #ffffff;
}

.btn.secondary {
    background: transparent;
    border: 2px solid #007acc;
    color: #007acc;
}

.btn:hover {
    opacity: 0.9;
}

/* Project navigation buttons */
.projects-nav {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 10;
}

.project-nav {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #007acc;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 122, 204, 0.2);
}

.project-nav:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.project-nav:active {
    transform: translateY(0);
}

/* Socials Section */
.socials {
    padding: 4rem 0;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(0,122,204,0.08);
    color: #007acc;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.social-link:hover {
    background: rgba(0,122,204,0.12);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 204, 0.15);
}

.social-link i {
    font-size: 1.2rem;
}

/* Section title styles */
.socials .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    text-align: left;
}

/* Socials container specific styles */
.socials .container {
    justify-content: center;
    gap: 2rem;
}

/* Responsive design */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem 20px;
    }
    
    .hero-content {
        flex: none;
        width: 100%;
        text-align: center;
        padding: 2rem 0;
    }
    
    .projects-stack {
        flex: none;
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        padding: 2rem;
        min-height: 400px;
    }

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

    .tech-stack {
        justify-content: center;
    }

    .cta-buttons {
        justify-content: center;
    }

    .section-title {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: 4rem 0;
    }

    .container {
        width: 95%;
        padding: 1rem 10px;
    }

    .name {
        font-size: 3rem;
    }
    
    .title {
        font-size: 1.75rem;
    }
    
    .description {
        font-size: 1.1rem;
        margin: 0 auto 1.5rem;
    }

    .additional-info {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .tech-stack {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .tech-item {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.9rem 1.8rem;
        font-size: 1rem;
    }
    
    .project-card {
        padding: 1.5rem;
        position: absolute;
        width: 100%;
        max-width: none;
        margin: 0;
        transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                    opacity 0.4s ease-out,
                    box-shadow 0.3s ease;
        will-change: transform;
        backface-visibility: hidden; /* Improve performance */
        -webkit-backface-visibility: hidden;
        touch-action: manipulation; /* Improve touch interaction */
    }

    .project-card h3 {
        font-size: 1.5rem;
    }

    .project-card.active {
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    }

    .projects-stack {
        height: auto;
        min-height: 420px;
        perspective: 1000px; /* Add some perspective on mobile */
        padding: 1rem 0.5rem;
        margin: 1rem auto;
        overflow: visible; /* Make sure visual cues aren't cut off */
    }

    /* Make the card stack more visible on mobile with more pronounced spacing */
    .projects-stack:not(.is-spread):not(.has-active-card) .project-card:not(:first-child) {
        margin-top: -5px !important; /* Ensure a peeking effect */
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08); /* Lighter shadow for non-active cards */
    }

    /* Enhanced active card styling for better prominence */
    .projects-stack.has-active-card .project-card.active {
        transform: translate(0%, 0%) scale(1.05) !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
        z-index: 100;
    }
    
    .project-tech {
        gap: 0.6rem;
        margin: 1rem 0;
    }

    .tech-tag {
        padding: 0.4rem 0.8rem; /* Slightly smaller padding for better fit */
        font-size: 0.9rem;
    }

    .project-link {
        width: 44px; /* Larger touch target */
        height: 44px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }

    .container {
        width: 100%;
        padding: 1rem 15px;
    }

    .name {
        font-size: 2.5rem;
    }
    
    .title {
        font-size: 1.4rem;
    }
    
    .description {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .greeting-pill {
        font-size: 0.9rem;
        padding: 0.4rem 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.8rem;
    }
    
    .btn {
        text-align: center;
        width: 100%;
        padding: 0.8rem 1.5rem;
    }
    
    .status-indicator {
        font-size: 0.85rem;
        padding: 0.4rem 0.9rem;
        margin-bottom: 1.2rem;
    }
    
    .tech-stack {
        gap: 0.4rem;
    }

    .tech-item {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .projects-stack {
        padding: 0.5rem 0.5rem 1rem 0.5rem;
        min-height: 400px;
    }

    /* Adjust card spacing for smaller screens */
    .projects-stack:not(.is-spread):not(.has-active-card) .project-card {
        transform: translateY(0) scale(1) !important; /* Override desktop transforms */
    }
    
    .projects-stack:not(.is-spread):not(.has-active-card) .project-card:nth-child(2) {
        transform: translateY(15px) scale(0.98) !important;
    }
    
    .projects-stack:not(.is-spread):not(.has-active-card) .project-card:nth-child(3) {
        transform: translateY(30px) scale(0.96) !important;
    }

    .project-card {
        padding: 1.25rem;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }
    
    /* Improve tap feedback */
    .project-card:active {
        transform: scale(0.98) !important;
        transition: transform 0.2s ease;
    }
    
    .project-card h3 {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }

    .project-card p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .project-tech {
        gap: 0.5rem;
    }

    .tech-tag {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }

    .project-type {
        font-size: 0.8rem;
        padding: 0.3rem 0.8rem;
    }
    
    /* Ensure links are easier to tap */
    .project-link {
        width: 48px;
        height: 48px;
        top: 1rem;
        right: 1rem;
    }
}