:root {
    --bg-dark: #0a0a0b;
    --bg-gray: #151518;
    --neon-cyan: #00f3ff;
    --neon-magenta: #ff00ff;
    --neon-green: #39ff14;
    --neon-yellow: #fefe33;
    --glass-bg: rgba(20, 20, 25, 0.7);
    --glass-border: rgba(0, 243, 255, 0.2);
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-code: 'JetBrains Mono', 'Courier New', monospace;
}

/* Logo Overlay / Intro */
.logo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-overlay::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 243, 255, 0.05) 0%, transparent 70%);
}

.logo-overlay img {
    max-width: 300px;
    width: 80%;
    filter: drop-shadow(0 0 20px var(--neon-cyan));
    animation: logoPop 2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes logoPop {
    0% {
        transform: scale(0) rotate(-10deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.1) rotate(5deg);
        opacity: 1;
    }

    70% {
        transform: scale(0.95) rotate(-2deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

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

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-dark);
}

body {
    color: #e0e0e0;
    font-family: var(--font-main);
    line-height: 1.6;
    background: var(--bg-dark);
    overflow-x: hidden;
    /* User Background Integration */
    background-image:
        linear-gradient(rgba(10, 10, 11, 0.85), rgba(10, 10, 11, 0.85)),
        url('../images/Webwall.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

body.no-scroll {
    overflow: hidden;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)"/></svg>');
    opacity: 0.08;
    z-index: -1;
    pointer-events: none;
}

/* Profile Image Styling */
.profile-container {
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--neon-cyan);
    box-shadow: 0 0 25px var(--neon-cyan);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-img:hover {
    transform: scale(1.05) rotate(3deg);
    border-color: var(--neon-magenta);
    box-shadow: 0 0 30px var(--neon-magenta);
}

/* Sidebar Navigation - Glassmorphism */
.sidebar {
    position: fixed;
    top: 20px;
    left: 20px;
    bottom: 20px;
    width: 280px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed {
    width: 80px;
    padding: 2rem 1rem;
}

.sidebar.collapsed .sidebar-header h2,
.sidebar.collapsed .sidebar-header h,
.sidebar.collapsed .nav-links span {
    display: none;
}

.sidebar.collapsed .nav-links a {
    justify-content: center;
    padding: 1rem 0;
}

.sidebar.collapsed .social-links {
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-header h2 {
    color: #fff;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--neon-cyan);
    padding-bottom: 0.5rem;
    display: table;
    /* To allow absolute positioning relative to container border better */
}

.sidebar-header .name-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: all 0.3s;
}

.sidebar-header .name-link:hover h2 {
    color: var(--neon-cyan);
    text-shadow: 0 0 15px var(--neon-cyan);
}

.sidebar-header h {
    color: #888;
    font-size: 0.85rem;
    display: block;
    line-height: 1.4;
    margin-top: 1rem;
}

/* Menu Toggle Styling (Desktop) */
.menu-toggle {
    position: absolute;
    top: 2rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--neon-cyan);
    border-radius: 10px;
    color: var(--neon-cyan);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
    z-index: 10;
}

.sidebar.collapsed .menu-toggle {
    position: relative;
    top: 0;
    right: 0;
    margin: 0 auto 2.5rem auto;
}

.menu-toggle:hover {
    background: rgba(0, 243, 255, 0.15);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.nav-links {
    list-style: none;
    margin: 2rem 0;
}

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

.nav-links a {
    color: #aaa;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-links a i {
    width: 30px;
    font-size: 1.1rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--neon-cyan);
    background: rgba(0, 243, 255, 0.05);
    transform: translateX(5px);
}

.nav-links a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
}

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

.social-links a {
    color: #888;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.social-links a:hover {
    color: var(--neon-magenta);
    transform: translateY(-3px) scale(1.1);
}

/* Main Content Area */
.content {
    margin-left: 320px;
    padding: 40px;
    transition: margin-left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.content.expanded {
    margin-left: 120px;
}

.section {
    min-height: 100vh;
    padding: 80px 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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

h2 {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--neon-magenta);
    box-shadow: 0 0 15px var(--neon-magenta);
}

/* Home Section */
#home {
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 80% 20%, rgba(255, 0, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(0, 243, 255, 0.05) 0%, transparent 50%);
}

.home-content h1 {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.home-content h1 span {
    color: var(--neon-cyan);
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
}

.home-content p {
    font-size: 1.2rem;
    color: #888;
    margin-bottom: 2.5rem;
    max-width: 600px;
    font-family: var(--font-code);
}

.home-content img {
    margin-top: 2rem;
    border: 1px solid var(--glass-border);
    padding: 5px;
    border-radius: 5px;
    background: var(--glass-bg);
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 5px;
    transition: all 0.3s;
    box-shadow: inset 0 0 0 0 var(--neon-cyan);
}

.btn:hover {
    background: var(--neon-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 25px var(--neon-cyan);
}

/* About Section */
#about p {
    font-size: 1.25rem;
    color: #ccc;
    max-width: 800px;
    margin-bottom: 2rem;
}

/* Experience Timeline */
.timeline {
    position: relative;
    max-width: 900px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: linear-gradient(to bottom, var(--neon-cyan), var(--neon-magenta));
}

.timeline-item {
    margin-left: 30px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    position: relative;
    transition: transform 0.3s;
}

.timeline-item:hover {
    transform: translateX(10px);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -41px;
    top: 2rem;
    width: 20px;
    height: 2px;
    background: var(--neon-cyan);
}

.timeline-item h3 {
    color: var(--neon-cyan);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.timeline-item p:first-of-type {
    color: var(--neon-magenta);
    font-family: var(--font-code);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

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

.project-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(0, 243, 255, 0.05), transparent);
    transform: translateX(-100%);
    transition: transform 1.2s;
}

.project-card:hover::before {
    transform: translateX(100%);
}

.project-card:hover {
    transform: translateY(-15px);
    border-color: var(--neon-magenta);
    box-shadow: 0 15px 40px rgba(255, 0, 255, 0.1);
}

.project-card h3 {
    color: #fff;
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.project-card p {
    color: #888;
    margin-bottom: 2rem;
    font-family: var(--font-code);
}

/* Contact Section */
#contact .social-links {
    justify-content: flex-start;
    margin-top: 3rem;
}

.contact-emails {
    display: flex;
    gap: 10rem;
    /* Increased gap for PC */
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 4rem;
}

.contact-email-item {
    text-align: center;
}

.contact-email-item img {
    width: 288px;
    /* Reduced by 10% from 320px */
    max-width: 90vw;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(0, 243, 255, 0.4));
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.contact-email-item:hover img {
    transform: scale(1.15) translateY(-5px);
    filter: drop-shadow(0 0 25px var(--neon-cyan));
}

.contact-email-item span {
    display: block;
    margin-top: 1rem;
    color: var(--neon-cyan);
    font-family: var(--font-code);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 1.5rem 0.5rem;
    }

    .sidebar-header h2 {
        display: none;
    }

    .sidebar-header h {
        display: none;
    }

    .nav-links a span {
        display: none;
    }

    .content {
        margin-left: 120px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: 70px;
        top: 0;
        left: 0;
        bottom: auto;
        border-radius: 0;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 1.5rem;
        border-bottom: 1px solid var(--glass-border);
    }

    .sidebar-header h2 {
        display: block;
        font-size: 1.4rem;
        border: none;
        margin: 0;
        padding: 0;
        text-shadow: 0 0 10px var(--neon-cyan);
    }

    .sidebar-header h {
        display: none;
    }

    .menu-toggle {
        position: static;
        /* Reset absolute positioning from desktop */
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        margin: 0;
        background: rgba(0, 243, 255, 0.15);
        border: 2px solid var(--neon-cyan);
        border-radius: 10px;
        color: var(--neon-cyan);
        font-size: 1.5rem;
        cursor: pointer;
        transition: all 0.3s;
        box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
    }

    .menu-toggle:hover {
        background: var(--neon-cyan);
        color: var(--bg-dark);
        box-shadow: 0 0 15px var(--neon-cyan);
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        border-bottom: 1px solid var(--glass-border);
        flex-direction: column;
        padding: 1rem;
    }

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

    .content {
        margin-left: 0;
        margin-top: 70px;
        padding: 2rem;
    }

    .home-content h1 {
        font-size: 3rem;
    }
}

/* Animations Trigger */
[data-animate] {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}