/* ==========================================================================
   Layout Components
   ========================================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    padding: 2rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.profile-info {
    text-align: center;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 20px var(--shadow-light);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.nav-menu {
    list-style: none;
    padding: 1rem 0;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    margin: 0 0.75rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.nav-link:hover::before,
.nav-link.active::before {
    opacity: 1;
}

.nav-link:hover {
    color: white;
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.nav-link.active {
    color: white;
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.7);
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.time-display {
    color: var(--text-secondary);
    text-align: start;
    font-variant-numeric: tabular-nums;
    padding: 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

.content-section {
    display: none;
    padding: 2rem;
    animation: fadeIn 0.5s ease-in-out;
}

.content-section.active {
    display: block;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
    text-align: center;
}

/* Content Cards */
.content-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px var(--shadow-color);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem;
    color: var(--text-color);
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(4px);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .overlay.active {
        display: block;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 100%;
    }

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

    .content-section {
        padding: 1rem;
    }

    .content-card {
        padding: 1.5rem;
    }

    .projects-grid {
        max-width: 100%;
        padding: 0 1rem;
        gap: 1rem;
    }

    .project-card {
        height: 200px;
    }

    .contact-buttons {
        grid-template-columns: 1fr;
    }

    .tech-items {
        grid-template-columns: 1fr;
    }
}

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

    .content-card {
        padding: 1rem;
    }

    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media print {

    .sidebar,
    .mobile-menu-toggle,
    .overlay {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .content-section {
        display: block;
        break-inside: avoid;
    }
}
