/* ========================================================
   CSS VARIABLES & DESIGN SYSTEM
======================================================== */
:root {
    /* Color Palette - Premium Light UI */
    --bg-base: #f8fafc;
    --bg-glass: rgba(255, 255, 255, 0.65);
    --bg-glass-hover: rgba(255, 255, 255, 0.85);
    --text-main: #0f172a;
    --text-muted: #475569;
    --primary: #2563eb;
    --primary-light: #60a5fa;
    --accent: #8b5cf6;
    
    /* Layout */
    --container-width: 1200px;
    --section-spacing: 120px;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    
    /* Glassmorphism Metrics */
    --glass-border: 1px solid rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px rgba(15, 23, 42, 0.04);
    --glass-shadow-hover: 0 12px 48px rgba(37, 99, 235, 0.12);
    --glass-blur: blur(16px);
    
    /* Typography */
    --font-sans: 'Inter', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================================
   RESET & BASE
======================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-base);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: var(--section-spacing) 0;
}

/* ========================================================
   TYPOGRAPHY
======================================================== */
h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    color: var(--text-main);
    line-height: 1.2;
}

h1 { font-size: clamp(3rem, 5vw, 4.5rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 3vw, 2.5rem); font-weight: 600; }
h3 { font-size: clamp(1.75rem, 2.5vw, 2rem); font-weight: 600; }

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* ========================================================
   UTILITIES & COMPONENTS
======================================================== */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--border-radius-md);
    padding: 32px;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glass-shadow-hover);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-primary-sm {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: #fff;
    padding: 16px 32px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-main);
    padding: 16px 32px;
    border: var(--glass-border);
    backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
    background: #fff;
    transform: translateY(-2px);
}

.btn-primary-sm {
    background: var(--text-main);
    color: #fff;
    padding: 10px 24px;
    font-size: 0.95rem;
}

.w-100 { width: 100%; justify-content: center; }

/* ========================================================
   BACKGROUND ANIMATIONS
======================================================== */
.ambient-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    overflow: hidden;
    background-color: var(--bg-base);
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: floatOrb 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 600px; height: 600px;
    background: var(--primary-light);
    top: -100px; right: -100px;
}

.orb-2 {
    width: 500px; height: 500px;
    background: #c4b5fd;
    bottom: -100px; left: -100px;
    animation-delay: -5s;
}

.noise-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-100px, 50px) scale(1.1); }
}

/* ========================================================
   NAVIGATION
======================================================== */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 20px 0;
    z-index: 100;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 15px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
}
.logo span { color: var(--primary); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a:not(.btn-primary-sm) {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

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

.mobile-toggle { display: none; }

/* ========================================================
   SECTIONS
======================================================== */
.section-header {
    margin-bottom: 64px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

/* --- HERO --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin: 20px 0;
    min-height: 36px;
}

.hero-desc {
    max-width: 90%;
    margin-bottom: 40px;
}

.hero-cta { display: flex; gap: 16px; }

/* Code Window UI */
.glass-panel {
    background: rgba(15, 23, 42, 0.85); /* Dark contrast element */
    backdrop-filter: blur(12px);
    border-radius: var(--border-radius-md);
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e2e8f0;
}
.panel-header { display: flex; gap: 8px; margin-bottom: 20px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }
.glass-panel pre { font-family: var(--font-mono); font-size: 0.9rem; overflow-x: auto; }
.glass-panel .keyword { color: #ff7b72; }
.glass-panel .class { color: #79c0ff; }
.glass-panel .method { color: #d2a8ff; }
.glass-panel .string { color: #a5d6ff; }

/* Floating Animation */
.floating-element {
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* --- ABOUT --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.about-text p { margin-bottom: 24px; }

.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.metric-card {
    text-align: center;
    padding: 32px 20px;
}

.metric-card h4 {
    display: inline-block;
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 8px;
}
.metric-card span { font-size: 2rem; color: var(--primary); font-weight: 700;}

/* --- SKILLS --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.category-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.skill-category h4 { margin-bottom: 16px; font-size: 1.25rem; }

.skill-list { list-style: none; }
.skill-list li {
    padding: 8px 0;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.skill-list li:last-child { border-bottom: none; }

/* --- EXPERIENCE --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), transparent);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    left: 14px; top: 32px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.timeline-date {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.timeline-content h4 { font-size: 1.25rem; margin-bottom: 4px; }
.timeline-content h5 { font-size: 1rem; color: var(--text-muted); font-weight: 400; margin-bottom: 16px; }

.impact-list { padding-left: 20px; color: var(--text-muted); }
.impact-list li { margin-bottom: 8px; }

/* --- PROJECTS --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.project-card { position: relative; overflow: hidden; }

.project-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.project-icon { font-size: 2.5rem; color: var(--accent); }

.project-info p { margin-bottom: 24px; }

.tech-stack-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-stack-pills span {
    background: rgba(15, 23, 42, 0.05);
    color: var(--text-main);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* --- CONTACT --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contact-info h2 { margin-bottom: 20px; }
.contact-info p { margin-bottom: 40px; }

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: var(--transition-smooth);
}
.contact-item:hover { color: var(--primary); }

.icon-circle {
    width: 48px; height: 48px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    color: var(--primary);
    font-size: 1.25rem;
}

.glass-form {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
}

.form-group { margin-bottom: 24px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 16px;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.5);
    font-family: var(--font-sans);
    transition: var(--transition-smooth);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* --- FOOTER --- */
footer {
    padding: 40px 0;
    border-top: 1px solid rgba(0,0,0,0.05);
    text-align: center;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
footer p { font-size: 0.9rem; margin: 0; }

/* ========================================================
   RESPONSIVE
======================================================== */
@media (max-width: 992px) {
    .hero-split, .about-grid, .contact-container {
        grid-template-columns: 1fr;
    }
    
    .hero-visual { display: none; } /* Focus on copy on mobile */
    .section-spacing { padding: 80px 0; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
    }
    .metrics-grid { grid-template-columns: 1fr; }
    .project-grid { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; gap: 20px; }
    h1 { font-size: 2.5rem; }
}
