/**
 * Layout Styles
 * Page structure and positioning
 */

/* Sidebar */
.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: var(--text-on-dark);
    z-index: var(--z-fixed);
    overflow-y: auto;
    transition: transform var(--transition-slow);
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: var(--space-xl);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3xl);
}

.sidebar-logo {
    font-size: var(--font-size-2xl);
    color: var(--text-on-dark);
    font-family: var(--font-family-mono);
    margin: 0;
    letter-spacing: 0.05em;
}

.sidebar-nav {
    flex: 1;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin: 0;
}

.nav-link {
    display: block;
    padding: var(--space-md);
    color: var(--text-on-dark);
    text-decoration: none;
    font-family: var(--font-family-mono);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    letter-spacing: 0.05em;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.25);
    color: var(--text-on-dark);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* Mobile Header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--mobile-header-height);
    background: var(--bg-sidebar);
    z-index: var(--z-fixed);
    padding: 0 var(--space-lg);
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
}

.mobile-title {
    color: var(--text-on-dark);
    font-family: var(--font-family-mono);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-on-dark);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

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

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

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

/* Main Content */
.main-content {
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    padding-top: 0;
}

/* Hero Section */
.hero-section {
    min-height: 20vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl) var(--space-xl) var(--space-xl);
    position: relative;
}

.hero-content {
    text-align: center;
    max-width: 900px;
}

.hero-title {
    font-size: var(--font-size-5xl);
    margin-bottom: var(--space-md);
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInDown 0.8s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--text-secondary);
    font-family: var(--font-family-mono);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.typing-text {
    display: inline-block;
    position: relative;
    letter-spacing: 0.15em;
}

.typing-text::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    height: 3px;
    width: 0;
    background: var(--gradient-main);
    animation: underline 2s ease forwards 0.5s;
}

@keyframes underline {
    to {
        width: 100%;
    }
}

/* Sections */
.section {
    padding: var(--space-4xl) var(--space-xl);
    position: relative;
}

.section-alt {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--space-2xl);
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.section-title {
    font-size: var(--font-size-4xl);
    text-align: center;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    font-family: var(--font-family-mono);
}

.section-intro {
    text-align: center;
    color: var(--text-secondary);
    max-width: var(--content-max-width);
    margin: 0 auto var(--space-xl);
    line-height: var(--line-height-relaxed);
}

/* About Section */
.about-content p {
    text-align: justify;
    hyphens: auto;
}

/* Footer */
.footer {
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.footer .container {
    box-shadow: none;
    background: transparent;
}

.footer p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .mobile-header {
        display: flex;
    }
    
    .main-content {
        margin-right: 0;
        padding-top: var(--mobile-header-height);
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
        padding: var(--space-3xl) var(--space-md);
    }
    
    .section {
        padding: var(--space-3xl) var(--space-md);
    }
    
    .container {
        padding: var(--space-lg);
    }
    
    .section-title {
        font-size: var(--font-size-3xl);
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 40vh;
        padding: var(--space-2xl) var(--space-md);
    }
    
    .hero-title {
        font-size: var(--font-size-4xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-lg);
    }
    
    .section {
        padding: var(--space-2xl) var(--space-md);
    }
    
    .container {
        padding: var(--space-md);
        border-radius: var(--radius-lg);
    }
    
    .section-title {
        font-size: var(--font-size-2xl);
    }
    
    .sidebar-content {
        padding: var(--space-lg);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .hero-title,
    .hero-subtitle,
    .timeline-item {
        animation: none !important;
    }
}

/* Print styles */
@media print {
    .sidebar,
    .mobile-header,
    .hero-section {
        display: none;
    }
    
    .main-content {
        margin-right: 0;
        padding-top: 0;
    }
    
    .section {
        page-break-inside: avoid;
    }
}

