/* Modern CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables */
:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --text-color: #333;
    --light-bg: #f5f6fa;
    --white: #ffffff;
    --gradient-1: #00c6ff;
    --gradient-2: #0072ff;
}

html, body {
    min-height: 100vh;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
    padding-top: 60px; /* Space for fixed nav */
    min-height: calc(100vh - 60px); /* Account for footer height */
}

/* Navigation */
nav {
    position: fixed;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

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

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

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

.nav-links li a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: var(--accent-color);
}

.highlight {
    color: var(--gradient-1);
    font-weight: 700;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: url('data:image/svg+xml,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><path fill="rgba(255, 255, 255, 0.05)" d="M45.3,-51.5C58.9,-37.3,70.3,-21.3,72.7,-3.5C75.1,14.4,68.5,34.1,54.9,45.6C41.3,57.1,20.6,60.4,1.5,58.7C-17.7,57,-35.4,50.2,-48.9,37.8C-62.4,25.4,-71.7,7.3,-70.1,-9.8C-68.5,-27,-56.1,-43.2,-41,-54.1C-25.8,-65,-12.9,-70.6,1.7,-72.6C16.3,-74.6,31.7,-65.8,45.3,-51.5Z" transform="translate(100 100)" /></svg>') center/cover;
    animation: rotate 20s linear infinite;
    opacity: 0.1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-content {
    padding: 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease;
}

.typewriter {
    animation: fadeInUp 1s ease 0.5s both;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--white);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    margin-top: 2rem;
    transition: transform 0.3s ease;
    animation: fadeInUp 1s ease 1s both;
}

.cta-button:hover {
    transform: translateY(-3px);
}

/* Section Containers */
.hero,
.about,
.projects,
.contact {
    padding: 5rem 2rem;
}

.about-content,
.project-grid {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Container and Section Layouts */
.projects {
    padding: 5rem 2rem;
    background-color: var(--light-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.project-grid {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

main {
    flex: 1;
    padding-top: 60px; /* Space for fixed nav */
}

/* Sections */
section {
    padding: 5rem 2rem;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--primary-color);
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    border-radius: 2px;
}

/* About Section */
.about {
    background-color: var(--light-bg);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

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

.skill-tags span {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Projects Section */
.project-card {
    position: relative;
    background: var(--white);
    transition: all 0.3s ease;
}

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

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

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

.project-links {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    justify-content: center;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    color: var(--white);
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.project-link.github {
    background: var(--primary-color);
}

.project-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.project-card h3 {
    font-size: 1.5rem;
    margin: 1rem;
    color: var(--primary-color);
}

.project-card p {
    padding: 0 1rem;
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-card.featured {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    gap: 2rem;
    padding: 2rem;
    position: relative;
    overflow: visible;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 2rem auto;
    max-width: 1100px;
}

.project-card.featured .project-image {
    flex: 1;
    min-width: 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 10px;
}

.project-card.featured .project-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
}

.project-card.featured img {
    height: 100%;
    border-radius: 10px;
    max-width: 100%;
    max-height: 300px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.project-badge {
    position: absolute;
    top: -12px;
    left: 2rem;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

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

.tech-stack span {
    background: var(--light-bg);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.tech-stack span:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Contact Section Styles */
.contact {
    padding: 5rem 2rem;
    background-color: var(--light-bg);
}

.contact-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    opacity: 1;
    transform: none;
}

/* Remove previous animation styles for social links */
.contact.reveal .social-links a,
.contact.reveal .social-links,
.contact.reveal .contact-text {
    opacity: 1;
    transform: none;
    transition: none;
}

/* Contact Section and Social Links */
.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3.5rem;
    margin-top: 3rem;
}

.social-links a {
    color: var(--gradient-1);
    font-size: 3rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.social-links a i {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.social-links a:hover::before {
    opacity: 1;
}

.social-links a:hover i {
    color: var(--white);
}

/* Specific colors for each social link */
.social-links a.github {
    color: #333;
}

.social-links a.linkedin {
    color: #0077b5;
}

.social-links a.email {
    color: #ea4335;
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    color: var(--white);
    text-align: center;
    padding: 1.5rem;
    position: relative;
    width: 100%;
    margin-top: auto;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

/* Media Queries */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        text-align: center;
    }

    .nav-links {
        margin-top: 1rem;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        padding: 20px;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        transform: translateY(-150%);
        transition: transform 0.3s ease;
    }

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

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:first-child {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:last-child {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .hero h1 {
        font-size: 2rem;
    }

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

    .project-card.featured {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .project-card.featured .project-image {
        min-width: 100%;
    }

    .project-card.featured img {
        width: 100%;
        height: 250px;
        object-fit: contain;
    }

    .project-card.featured .project-content {
        padding: 1rem;
    }

    .project-card.featured {
        margin: 1rem;
        flex-direction: column;
    }

    .project-card.featured .project-image {
        padding: 1rem;
    }

    .project-card.featured img {
        max-height: 200px;
    }
}

/* Enhanced Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    animation: fadeInDown 1s ease;
}

.typewriter {
    animation: fadeInUp 1s ease 0.5s both;
}

.cta-button {
    animation: fadeInUp 1s ease 1s both;
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
}

/* Project Card Animation Delay */
.project-card:nth-child(1) {
    transition-delay: 0.1s;
}

.project-card:nth-child(2) {
    transition-delay: 0.2s;
}

.project-card:nth-child(3) {
    transition-delay: 0.3s;
}

/* Skill Tags Animation Delay */
.skill-tags span {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-tags span:nth-child(1) { transition-delay: 0.1s; }
.skill-tags span:nth-child(2) { transition-delay: 0.2s; }
.skill-tags span:nth-child(3) { transition-delay: 0.3s; }
.skill-tags span:nth-child(4) { transition-delay: 0.4s; }
.skill-tags span:nth-child(5) { transition-delay: 0.5s; }

.skill-tags.show span {
    opacity: 1;
    transform: translateY(0);
}

/* Contact Section Animation */
.contact.reveal .social-links a {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact.reveal.show .social-links a {
    opacity: 1;
    transform: translateY(0);
}

.contact.reveal .social-links a:nth-child(1) { transition-delay: 0.1s; }
.contact.reveal .social-links a:nth-child(2) { transition-delay: 0.2s; }
.contact.reveal .social-links a:nth-child(3) { transition-delay: 0.3s; }

.contact.reveal .contact-text {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact.reveal.show .contact-text {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}
