/* ==========================================================================
   Alok Shrestha - Portfolio & Personal Website Design System
   Harmonized with License Print Check Civic Design System
   ========================================================================== */

:root {
    --bg-color: #f8fafc;
    --bg-surface: #ffffff;
    --bg-subtle: #f1f5f9;
    --text-color: #0f172a;
    --text-muted: #475569;
    --text-subtle: #64748b;
    
    --primary: #1e40af;
    --primary-hover: #1e3a8a;
    --secondary: #0284c7;
    --accent: #059669;
    
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --border-strong: #cbd5e1;
    --navbar-bg: rgba(255, 255, 255, 0.85);
    --navbar-scrolled-bg: rgba(255, 255, 255, 0.98);
    --nav-mobile-bg: rgba(255, 255, 255, 0.98);
    
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Outfit';
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Explicit Dark Theme Class Overrides */
body.dark-theme {
    --bg-color: #0f172a;
    --bg-surface: #1e293b;
    --bg-subtle: #334155;
    --text-color: #f8fafc;
    --text-muted: #cbd5e1;
    --text-subtle: #94a3b8;
    
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --secondary: #38bdf8;
    --accent: #34d399;
    
    --card-bg: #1e293b;
    --border-color: #334155;
    --border-strong: #475569;
    --navbar-bg: rgba(15, 23, 42, 0.85);
    --navbar-scrolled-bg: rgba(15, 23, 42, 0.98);
    --nav-mobile-bg: rgba(15, 23, 42, 0.98);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

/* Explicit Light Theme Class Overrides */
body.light-theme {
    --bg-color: #f8fafc;
    --bg-surface: #ffffff;
    --bg-subtle: #f1f5f9;
    --text-color: #0f172a;
    --text-muted: #475569;
    --text-subtle: #64748b;
    
    --primary: #1e40af;
    --primary-hover: #1e3a8a;
    --secondary: #0284c7;
    --accent: #059669;
    
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --border-strong: #cbd5e1;
    --navbar-bg: rgba(255, 255, 255, 0.85);
    --navbar-scrolled-bg: rgba(255, 255, 255, 0.98);
    --nav-mobile-bg: rgba(255, 255, 255, 0.98);
}

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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Background Blobs */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    z-index: -1;
    opacity: 0.45;
    animation: float 12s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(30,64,175,0.25) 0%, rgba(30,64,175,0) 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(2,132,199,0.25) 0%, rgba(2,132,199,0) 70%);
    animation-delay: -6s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.08); }
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--navbar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: var(--navbar-scrolled-bg);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-color);
    text-decoration: none;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    list-style: none;
    box-shadow: var(--shadow-md);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.55rem 1.1rem;
    font-size: 0.88rem;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background: var(--bg-subtle);
    color: var(--primary);
}

/* Theme Toggle Button */
.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--bg-surface);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background-color: var(--bg-subtle);
}

body.dark-theme .light-icon { display: block; }
body.dark-theme .dark-icon { display: none; }
body.light-theme .light-icon { display: none; }
body.light-theme .dark-icon { display: block; }

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger div {
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    margin: 5px;
    transition: var(--transition);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff !important;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--bg-surface);
    color: var(--text-color);
    border-color: var(--border-strong);
}

.btn-secondary:hover {
    background-color: var(--bg-subtle);
}

.btn-outline {
    border: 1px solid var(--primary);
    color: var(--primary) !important;
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--bg-subtle);
}

.btn-text {
    background: transparent;
    color: var(--text-muted);
    padding: 0.65rem 0;
}

.btn-text:hover {
    color: var(--primary);
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.83rem;
}

.btn-large {
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
}

/* Sections */
section {
    padding: 5.5rem 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    scroll-snap-align: start;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
    color: var(--text-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 48px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.text-center {
    text-align: center;
}
.text-center.section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.subtitle {
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.role {
    font-size: 1.8rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.description {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
    background: var(--bg-surface);
    transition: var(--transition);
}

.social-link:hover {
    color: var(--primary);
    border-color: var(--primary);
    background-color: var(--bg-subtle);
}

.hero-image-container {
    display: flex;
    justify-content: center;
}

.image-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    padding: 6px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: var(--shadow-md);
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background-color: var(--bg-surface);
}

/* Three.js Canvas */
#three-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.skill-category {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.skill-category:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.skill-category h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.skill-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
}

.skill-icon {
    width: 16px;
    height: 16px;
}

/* Timeline Components (Experience & Education) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 50px;
    margin-bottom: 2.5rem;
}

.timeline-dot {
    position: absolute;
    left: 13px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--bg-color);
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.timeline-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-color);
}

.timeline-content h4 {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.timeline-date {
    font-size: 0.82rem;
    color: var(--text-subtle);
    font-weight: 600;
}

/* Contact Section */
.contact-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3.5rem 2rem;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

.contact-card p {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-subtle);
    font-size: 0.85rem;
    background: var(--bg-surface);
}

/* Responsive Media Queries */
@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }
    
    .hero-content {
        order: 2;
    }
    
    .hero-image-container {
        order: 1;
    }
    
    .description {
        margin: 0 auto 2rem auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .title {
        font-size: 2.8rem;
    }
    
    .role {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 64px;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 64px);
        background: var(--nav-mobile-bg);
        border-left: 1px solid var(--border-color);
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        gap: 1.5rem;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding-left: 1rem;
        display: none;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .hamburger {
        display: block;
    }

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