/* Logo Overlay */
.logo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #262626;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    opacity: 1;
    transition: opacity 1s ease-in-out;
}

.logo-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.logo-overlay img {
    max-width: 500px;
    width: 100%;
    transform: scale(1);
    transition: transform 1s ease-in-out;
}

.logo-overlay.hidden img {
    transform: scale(0);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Body Loading State */
body.loading {
    overflow: hidden;
}

body.loading .content,
body.loading .sidebar {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1a1a1a url('../images/Profile.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    filter: blur(1px);
    z-index: -1;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background: #2a2a2a;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1000;
}

.sidebar-header h2 {
    color: #00ffcc;
    font-size: 1.8rem;
    text-align: center;
}

.sidebar-header h {
    color: #00e1b4;
    font-size: 0.8rem;
    text-align: center;
}

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

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

.nav-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    transition: color 0.3s, background-color 0.3s;
}

.nav-links a i {
    margin-right: 1rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: #00ffcc;
    background-color: rgba(0, 255, 204, 0.1);
}

.social-links {
    text-align: center;
}

.social-links a {
    color: #ccc;
    font-size: 1.5rem;
    margin: 0 0.5rem;
    transition: color 0.3s, transform 0.3s;
}

.social-links a:hover {
    color: #00ffcc;
    transform: scale(1.2);
}

/* Main Content */
.content {
    margin-left: 250px;
    padding: 2rem;
}

.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 2rem;
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
}

#home {
    animation-delay: 0s;
}

#about {
    animation-delay: 0.5s;
}

#experience {
    animation-delay: 1s;
}

#projects {
    animation-delay: 1.5s;
}

#contact {
    animation-delay: 2s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 {
    font-size: 2.5rem;
    color: #00ffcc;
    margin-bottom: 2rem;
    background: rgba(55, 55, 55, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 15px;
}

/* Home Section */
.home-content h1 {
    color: #00ffcc;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: rgba(55, 55, 55, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 15px;
}

.home-content h1 span {
    color: #00ffcc;
}

.home-content p {
    font-size: 1.5rem;
    color: #2fceac;
    margin-bottom: 2rem;
    background: #2f2e2e;
    padding: 1.5rem;
    border-radius: 5px;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: #00ffcc;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn:hover {
    background: #fff;
}

/* About Section */
#about p {
    max-width: 600px;
    color: #00ffcc;
    background: #2a2a2a;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
}

/* Experience Section */
.timeline {
    max-width: 800px;
}

.timeline-item {
    background: #2a2a2a;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
}

.timeline-item h3 {
    color: #00ffcc;
    margin-bottom: 0.5rem;
}

.timeline-item p {
    color: #ccc;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
}

.project-card {
    background: #2a2a2a;
    padding: 1.5rem;
    border-radius: 5px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.project-card h3 {
    color: #00ffcc;
    margin-bottom: 1rem;
}

.project-card p {
    color: #ccc;
    margin-bottom: 1.5rem;
}

/* Contact Section */
#contact form {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#contact input,
#contact textarea {
    padding: 1rem;
    background: #2a2a2a;
    border: 1px solid #ccc;
    border-radius: 5px;
    color: #fff;
    font-size: 1rem;
}

#contact input:focus,
#contact textarea:focus {
    border-color: #00ffcc;
    outline: none;
    box-shadow: 0 0 5px #00ffcc;
}

#contact textarea {
    height: 150px;
    resize: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: 60px;
        /* Fixed height for top bar */
        position: fixed;
        /* Stick to top */
        top: 0;
        left: 0;
        padding: 0 1rem;
        /* Adjust padding */
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        background: #2a2a2a;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
        z-index: 1000;
        /* Ensure on top of everything */
    }

    .sidebar-header {
        text-align: left;
        flex: 1;
    }

    .sidebar-header h2 {
        font-size: 1.2rem;
        margin: 0;
        line-height: 60px;
        /* Vertically center text */
    }

    .sidebar-header h {
        display: none;
        /* Hide subtitle on mobile to save space */
    }

    .nav-links {
        display: none;
        /* Hidden by default on mobile, toggled via JS */
        position: fixed;
        /* Fixed relative to viewport */
        top: 60px;
        /* Start below the 60px navbar */
        left: 0;
        width: 100%;
        background: #2a2a2a;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

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

    .nav-links li {
        margin: 0.5rem 0;
        width: 100%;
        text-align: center;
    }

    .sidebar .social-links {
        display: flex;
        /* Show properly on mobile */
        margin-right: 1rem;
    }

    .sidebar .social-links a {
        font-size: 1.2rem;
        margin: 0 0.5rem;
    }

    #contact .social-links {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }

    #contact .social-links li {
        margin: 1rem;
        display: inline-block;
    }

    /* Hamburger Menu Icon */
    .menu-toggle {
        display: block;
        font-size: 1.5rem;
        color: #00ffcc;
        cursor: pointer;
    }

    .content {
        margin-left: 0;
        padding: 1rem;
        margin-top: 60px;
        /* Push content down below fixed nav */
    }

    .section {
        padding: 2rem 1rem;
        min-height: auto;
        /* Allow scrolling on mobile */
    }
}

/* Ensure menu toggle is hidden on desktop */
.menu-toggle {
    display: none;
}