/* =========================================
   ENHANCED HEADER
   ========================================= */
header { 
    /* Glassmorphism effect */
    background-color: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    
    /* Make it sticky */
    position: sticky;
    top: 0;
    z-index: 1000;
    
    padding: 1.2rem 0; 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); 
    margin-bottom: 3rem; 
    border-bottom: 1px solid var(--border);
}

.logo { 
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.6rem; 
    font-weight: 800; 
    color: var(--primary); 
    text-decoration: none; 
    letter-spacing: -0.5px;
}

nav { display: flex; gap: 2rem; align-items: center; }

/* Navigation Underline Animation */
nav a { 
    color: var(--text-muted); 
    text-decoration: none; 
    font-weight: 600; 
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

nav a:hover, nav a.active { color: var(--text-main); }
nav a:hover::after, nav a.active::after { width: 100%; }

@media (prefers-color-scheme: dark) {
    header { background-color: rgba(26, 32, 44, 0.85); }
    nav a { color: #a0aec0; }
    nav a:hover, nav a.active { color: #fff; }
}

/* =========================================
   ENHANCED FOOTER
   ========================================= */
footer { 
    /* Dark grounding gradient */
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: #e2e8f0;
    padding: 3rem 0; 
    margin-top: 4rem; 
    border-top: none;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.footer-info {
    text-align: center;
}

@media (min-width: 768px) {
    .footer-info { text-align: left; }
}

.footer-text { 
    color: #a0aec0; 
    font-size: 0.95rem; 
    margin-bottom: 0.5rem;
}

.footer-text a { 
    color: var(--primary); 
    text-decoration: none;
    font-weight: 600;
}

.footer-text a:hover { text-decoration: underline; }

.footer-links { 
    display: flex; 
    align-items: center;
    gap: 1.5rem; 
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a { 
    color: #e2e8f0; 
    text-decoration: none; 
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--primary); }

/* Pill-shaped Back to Top button */
.back-to-top {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease !important;
}

.back-to-top:hover {
    background-color: var(--primary);
    color: #fff !important;
    transform: translateY(-2px);
}