/* Variables */
:root {
    --accent-blue: #a2d2ff;
    --accent-lilac: #bdb2ff;
    --accent-mint: #b5ead7;
    --accent-rose: #ffd6e0;
    --light-gray: #f7f7fa;
    --dark: #06111a;
    --ease: cubic-bezier(0.2, 0.8, 0.3, 1);
}

/* Base Styles */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background: var(--dark);
    color: var(--light-gray);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar Placeholder */
.navbar-placeholder {
    height: 60px; /* Matches the navbar height, adjust if navbar height changes */
    width: 100%;
}

/* Background Waves */
.bg-waves {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-waves span {
    position: absolute;
    height: 100%;
    width: 100%;
    background: linear-gradient(45deg, transparent, rgba(162, 210, 255, 0.1), rgba(189, 178, 255, 0.1));
    opacity: 0.5;
    animation: wave 15s linear infinite;
    transform: rotate(45deg);
}

.bg-waves span:nth-child(1) { top: -50%; left: -50%; animation-delay: 0s; }
.bg-waves span:nth-child(2) { top: -30%; left: -30%; animation-delay: 2s; }
.bg-waves span:nth-child(3) { top: -10%; left: -10%; animation-delay: 4s; }
.bg-waves span:nth-child(4) { top: 10%; left: 10%; animation-delay: 6s; }
.bg-waves span:nth-child(5) { top: 30%; left: 30%; animation-delay: 8s; }

@keyframes wave {
    0% { transform: rotate(45deg) translate(0, 0); }
    50% { transform: rotate(45deg) translate(50px, 50px); }
    100% { transform: rotate(45deg) translate(0, 0); }
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.6);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
    height: 60px; /* Explicit height to match placeholder */
}

.logo {
    font-weight: 600;
    font-size: 1.2rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
}

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

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

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--accent-blue);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background: var(--accent-mint);
}

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

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
    background: var(--accent-mint);
}

/* Hero Section */
.hero {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 2rem 2rem; /* Increased top padding to avoid overlap, adjust if needed */
    min-height: 100vh;
}

.hero-content {
    max-width: 700px;
    width: 100%;
}

.profile-pic {
    width: 140px;
    border-radius: 50%;
    margin-bottom: 1rem;
    margin-top: -2rem; /* Slight adjustment to align better */
}

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

.highlight {
    color: var(--accent-mint);
}

.hero h2 {
    font-size: 1.2rem;
    height: 30px;
}

.hero-buttons {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-weight: 500;
    background: var(--accent-blue);
    border: none;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    text-decoration: none;
    color: var(--dark);
    display: inline-block;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn.secondary {
    background: #bdb2ff; /* Lilac */
    color: #2b2b2b;
}

.social-icons {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.social-icons a {
    font-size: 1.3rem;
    color: var(--light-gray);
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--accent-lilac);
}

/* Sections */
.section {
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--accent-blue);
}

/* Skills */
.skills-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap; /* Allows wrapping on smaller screens for responsiveness */
    justify-content: center;
    gap: 1rem;
    padding: 0 1rem;
}

.skill {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    white-space: nowrap; /* Prevents text wrapping within skill items */
}

.skill:hover {
    transform: scale(1.1);
    background: var(--accent-mint);
    color: var(--dark);
}

/* Timeline */
.timeline {
    border-left: 2px solid var(--accent-lilac);
    padding-left: 1rem;
}

.timeline-item {
    margin-bottom: 2rem;
}

.timeline-item h3 {
    margin: 0;
    color: var(--accent-mint);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.2rem;
}

.project-card {
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s var(--ease);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Education */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
}

.edu-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s var(--ease);
}

.edu-item:hover {
    transform: translateY(-5px);
    background: rgba(181, 234, 215, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Scroll Button */
#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 0.6rem;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: var(--accent-blue);
    color: var(--dark);
    font-size: 1.2rem;
    transition: all 0.3s var(--ease);
    z-index: 1000;
}

#scrollTopBtn:hover {
    background: var(--accent-mint);
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.8s var(--ease);
}

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

/* Certifications */
.cert-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    justify-content: center;
}

.cert-list li {
    margin: 0.5rem 0;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s var(--ease);
    text-align: center;
}

.cert-list li:hover {
    transform: translateY(-5px);
    background: rgba(181, 234, 215, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Hire Me Icons */
.contact-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.icon-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-lilac));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: rgb(3, 8, 80);
    text-decoration: none;
    transition: all 0.4s var(--ease);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.icon-btn:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
    background: linear-gradient(135deg, var(--accent-mint), var(--accent-rose));
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0); }
}

.icon-btn {
    animation: float 4s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .navbar-placeholder {
        height: 50px; /* Adjusted for mobile navbar height */
    }

    .navbar {
        height: 50px; /* Adjusted for mobile navbar height */
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 50px; /* Adjusted to match mobile navbar height */
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        padding: 1rem;
        text-align: center;
        margin: 0;
        z-index: 1000;
        height: auto;
        max-height: calc(100vh - 50px);
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0.5rem 0;
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 0.5rem;
    }

    .hero {
        padding: 5rem 1rem 1rem; /* Adjusted for mobile */
        min-height: 80vh;
    }

    .hero-content {
        max-width: 90%;
    }

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

    .hero h2 {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .btn {
        width: 80%;
        max-width: 200px;
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .section {
        padding: 1.5rem 1rem;
    }

    .skills-grid {
        flex-wrap: wrap; /* Ensures wrapping on mobile */
        justify-content: flex-start;
        padding: 0;
    }

    .skill {
        padding: 0.3rem 0.8rem;
        font-size: 0.9rem;
        flex: 0 0 auto; /* Prevents stretching */
    }

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

    .edu-item {
        padding: 0.8rem;
    }

    .timeline {
        padding-left: 0.5rem;
    }

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

    .project-card {
        padding: 0.8rem;
    }

    .contact-icons {
        gap: 1rem;
    }

    .icon-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .cert-list {
        grid-template-columns: 1fr;
    }

    .cert-list li {
        margin: 0.3rem 0;
        padding: 0.6rem 1rem;
    }
}

@media (max-width: 480px) {
    .navbar-placeholder {
        height: 50px; /* Adjusted for smaller screens */
    }

    .navbar {
        height: 50px; /* Adjusted for smaller screens */
    }

    .hero .profile-pic {
        width: 120px;
    }

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

    .hero h2 {
        font-size: 0.9rem;
    }

    .btn {
        width: 90%;
        max-width: 180px;
        padding: 0.4rem;
        font-size: 0.85rem;
    }

    .section h2 {
        font-size: 1.5rem;
    }

    .icon-btn {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
}