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

:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --dark-bg: #1a1a2e;
    --darker-bg: #16213e;
    --light-text: #ffffff;
    --gray-text: #b8b8b8;
    --card-bg: #0f1624;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: rgba(26, 26, 46, 0.95);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

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

.nav-menu a {
    color: var(--light-text);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 40px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.15) 0%, transparent 70%);
    top: -250px;
    right: -250px;
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(78, 205, 196, 0.1) 0%, transparent 70%);
    bottom: -200px;
    left: -200px;
    border-radius: 50%;
}

.hero-content {
    text-align: center;
    z-index: 1;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--gray-text);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.highlight {
    color: var(--primary-color);
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
}

/* About Section */
.about {
    padding: 100px 20px;
    background: var(--darker-bg);
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--gray-text);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
    margin-top: 3rem;
}

.about-image {
    display: flex;
    justify-content: center;
}

.profile-pic {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    box-shadow: 0 10px 40px rgba(255, 107, 107, 0.3);
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--gray-text);
    font-size: 1.1rem;
    line-height: 1.8;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.tag {
    padding: 0.5rem 1.2rem;
    background: var(--card-bg);
    border: 1px solid var(--primary-color);
    border-radius: 25px;
    font-size: 0.9rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Projects Section */
.projects {
    padding: 100px 20px;
    background: var(--dark-bg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(78, 205, 196, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.project-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-icon {
    color: white;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    transition: transform 0.4s ease;
}

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

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: white;
}

.project-brief {
    color: var(--gray-text);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.project-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    opacity: 0;
}

.project-card:hover .project-details {
    max-height: 500px;
    opacity: 1;
}

/* Active state for click/tap interactions */
.project-card.active .project-details {
    max-height: 500px;
    opacity: 1;
}

.project-card.active::before {
    opacity: 1;
}

.project-card.active .project-icon {
    transform: scale(1.1) rotate(5deg);
}

.project-details p {
    color: var(--gray-text);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.project-tech span {
    padding: 0.3rem 0.8rem;
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid var(--primary-color);
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--primary-color);
}

/* View Write Up Button */
.writeup-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff8787 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.writeup-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
    background: linear-gradient(135deg, #ff8787 0%, var(--primary-color) 100%);
}

.writeup-button svg {
    width: 16px;
    height: 16px;
}

/* Contact Section */
.contact {
    padding: 100px 20px;
    background: var(--darker-bg);
}

.contact-content {
    margin-top: 4rem;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-item {
    background: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.contact-item:hover::before {
    transform: scaleX(1);
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 107, 107, 0.2);
}

.contact-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15) 0%, rgba(78, 205, 196, 0.15) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.contact-item:hover .contact-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.25) 0%, rgba(78, 205, 196, 0.25) 100%);
}

.contact-item h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    color: white;
}

.contact-item p {
    color: var(--gray-text);
    font-size: 1.05rem;
    word-break: break-word;
}

/* Footer */
.footer {
    background: var(--card-bg);
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-content p {
    color: var(--gray-text);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--gray-text);
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktop: Ensure hover effects work properly */
@media (min-width: 769px) {
    .project-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }
    
    .project-card:hover .project-details {
        max-height: 500px;
        opacity: 1;
    }
    
    .project-card:hover::before {
        opacity: 1;
    }
    
    .project-card:hover .project-icon {
        transform: scale(1.1) rotate(5deg);
    }
    
    /* Active state on desktop (for click interactions) */
    .project-card.active {
        transform: translateY(-10px);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero-title {
        font-size: 3rem;
    }

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

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .nav-menu {
        gap: 1rem;
    }

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

    .contact-info {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* Mobile-specific project card styles */
    .project-card {
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Active state for mobile tap */
    .project-card.active {
        transform: scale(1.02);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }
    
    /* Add tap indicator */
    .project-card::after {
        content: 'Tap to expand';
        position: absolute;
        bottom: 20px;
        right: 20px;
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.5);
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    
    .project-card.active::after {
        content: 'Tap to close';
    }
    
    /* Ensure hover effects don't apply on mobile */
    .project-card:hover {
        transform: none;
    }
    
    .project-card.active:hover {
        transform: scale(1.02);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .cta-button {
        padding: 0.8rem 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}
