/* ==================================
   CSS Variables & Theme
   ================================== */

:root {
    /* Colors - Light Theme - Blue/Teal/Cyan Scheme */
    --color-bg: #ffffff;
    --color-bg-secondary: #f0f9fb;
    --color-text: #1a1a1a;
    --color-text-secondary: #4a5568;
    --color-text-muted: #718096;
    --color-primary: hsl(176deg, 70%, 35%);
    --color-primary-hover: hsl(176deg, 70%, 28%);
    --color-border: #d1e9ed;
    --color-shadow: rgba(3, 101, 140, 0.1);
    --color-shadow-hover: rgba(3, 101, 140, 0.15);

    /* Typography - Reduced for Minimal Design */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-base: 15px;
    --font-size-sm: 0.8125rem;
    --font-size-lg: 1rem;
    --font-size-xl: 1.125rem;
    --font-size-2xl: 1.25rem;
    --font-size-3xl: 1.5rem;
    --font-size-4xl: 1.875rem;
    --line-height-tight: 1.15;
    --line-height-normal: 1.4;
    --line-height-relaxed: 1.6;

    /* Spacing - Reduced for Minimal Design */
    --space-xs: 0.25rem;
    --space-sm: 0.375rem;
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --space-3xl: 2.5rem;
    --space-4xl: 3.5rem;

    /* Layout - Reduced for Minimal Design */
    --container-max-width: 900px;
    --container-narrow: 800px;
    --border-radius: 8px;
    --border-radius-sm: 6px;
    --border-radius-lg: 10px;

    /* Transitions - Ultra Smooth */
    --transition-fast: 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-base: 700ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Dark Theme - Blue/Teal/Cyan Scheme */
[data-theme="dark"] {
    --color-bg: #0f172a;
    --color-bg-secondary: #1a2532;
    --color-text: #f1f5f9;
    --color-text-secondary: #cbd5e1;
    --color-text-muted: #94a3b8;
    --color-primary: hsl(176deg, 60%, 50%);
    --color-primary-hover: hsl(176deg, 60%, 60%);
    --color-border: #2a3f47;
    --color-shadow: rgba(0, 0, 0, 0.3);
    --color-shadow-hover: rgba(0, 0, 0, 0.4);
}

/* ==================================
   Reset & Base Styles
   ================================== */

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

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-base);
}

body {
    font-family: var(--font-family);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background: linear-gradient(135deg, #ffffff 0%, #f0f9fb 50%, #ffffff 100%);
    transition: background-color var(--transition-base), color var(--transition-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #0f172a 0%, #1a2532 50%, #0f172a 100%);
}

/* ==================================
   Typography
   ================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: var(--line-height-tight);
    color: var(--color-text);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }

p {
    margin-bottom: var(--space-md);
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* ==================================
   Layout
   ================================== */

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-narrow {
    max-width: var(--container-narrow);
}

/* ==================================
   Theme Toggle - Hanging Lamp
   ================================== */

.theme-toggle {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: 1000;
    width: 60px;
    height: 80px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.theme-toggle:focus {
    outline: none;
}

.theme-toggle:active {
    outline: none;
}

.lamp {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Light Bulb */
.lamp-bulb {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    transition: all 700ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Light mode - Bulb is ON with glow */
[data-theme="light"] .lamp-bulb {
    background: linear-gradient(135deg, #fff9e6 0%, #ffeb99 100%);
    border-color: #ffd966;
    box-shadow:
        0 0 10px rgba(255, 217, 102, 0.4),
        0 0 20px rgba(255, 217, 102, 0.3),
        0 0 30px rgba(255, 217, 102, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Dark mode - Bulb is OFF/dim */
[data-theme="dark"] .lamp-bulb {
    background: linear-gradient(135deg, #2a3f47 0%, #1a2532 100%);
    border-color: #334455;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Filament inside bulb (visible in light mode) */
.lamp-bulb::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 12px;
    border: 1px solid rgba(255, 165, 0, 0.5);
    border-radius: 50%;
    opacity: 0;
    transition: opacity var(--transition-base);
}

[data-theme="light"] .lamp-bulb::before {
    opacity: 1;
    border-color: rgba(255, 165, 0, 0.8);
    animation: filamentGlow 2s ease-in-out infinite;
}

/* Lamp Icons - Sun and Moon */
.lamp-icon {
    position: absolute;
    font-size: 14px;
    transition: all 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

/* Sun Icon - Visible in Light Mode */
.sun-icon {
    color: #ff8c00;
    opacity: 0;
    transform: scale(0.5) rotate(-45deg);
}

[data-theme="light"] .sun-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Moon Icon - Visible in Dark Mode */
.moon-icon {
    color: #94a3b8;
    opacity: 0;
    transform: scale(0.5) rotate(45deg);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Hide filament when icons are visible */
[data-theme="light"] .lamp-bulb::before,
[data-theme="dark"] .lamp-bulb::before {
    opacity: 0;
}

/* String */
.lamp-string {
    width: 2px;
    height: 32px;
    background: var(--color-text-muted);
    margin-top: -1px;
    transform-origin: top;
    transition: all 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Pull Tab */
.lamp-pull-tab {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-text-muted);
    border: 2px solid var(--color-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Hover state - Ultra Smooth */
.theme-toggle:hover .lamp-bulb {
    transform: scale(1.05);
    transition: all 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-theme="light"] .theme-toggle:hover .lamp-bulb {
    box-shadow:
        0 0 15px rgba(255, 217, 102, 0.5),
        0 0 25px rgba(255, 217, 102, 0.4),
        0 0 35px rgba(255, 217, 102, 0.3),
        0 6px 12px rgba(0, 0, 0, 0.15);
    transition: all 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.theme-toggle:hover .lamp-string {
    transform: scaleY(1.05);
    transition: all 700ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.theme-toggle:hover .lamp-pull-tab {
    transform: translateY(2px);
    transition: all 700ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Animation when pulling - Ultra Smooth */
.theme-toggle.pulling .lamp-string {
    transform: scaleY(1.3);
    transition: all 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle.pulling .lamp-pull-tab {
    transform: translateY(10px);
    transition: all 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle.pulling .lamp-bulb {
    animation: lampFlicker 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.theme-toggle.pulling .lamp-icon {
    animation: iconFlicker 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Filament glow animation */
@keyframes filamentGlow {
    0%, 100% {
        opacity: 1;
        filter: brightness(1);
    }
    50% {
        opacity: 0.8;
        filter: brightness(1.2);
    }
}

/* Lamp flicker animation during theme change */
@keyframes lampFlicker {
    0% {
        opacity: 1;
    }
    25% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    75% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* Icon flicker animation during theme change */
@keyframes iconFlicker {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    25% {
        opacity: 0.3;
        transform: scale(0.9) rotate(-10deg);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1) rotate(10deg);
    }
    75% {
        opacity: 0.4;
        transform: scale(0.95) rotate(-5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* ==================================
   Navigation
   ================================== */

.navbar {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 900;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.8);
    transition: all var(--transition-base);
}

[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.8);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
}

.logo {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-text);
    transition: all var(--transition-fast);
}

.logo:hover {
    color: var(--color-primary);
    transform: translateY(-2px);
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.nav-link {
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: var(--font-size-sm);
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-base);
}

.nav-link:hover::after {
    width: 100%;
}

.btn-primary {
    background: var(--color-primary);
    color: white !important;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
    transition: all var(--transition-base);
}

.btn-primary::after {
    display: none;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==================================
   Burger Menu (Mobile Only)
   ================================== */

.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.burger-menu:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
}

.burger-line {
    width: 100%;
    height: 3px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Burger menu active state (X icon) */
.burger-menu.active .burger-line:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* ==================================
   Mobile Navigation
   ================================== */

.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 85%;
    height: 100vh;
    background: var(--color-bg);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0);
    overflow-y: auto;
    display: none;
}

.mobile-nav.active {
    transform: translateX(0);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .mobile-nav.active {
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.4);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.mobile-nav-logo {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-primary);
}

.mobile-nav-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    font-size: 32px;
    line-height: 1;
    transition: all var(--transition-fast);
    border-radius: 50%;
}

.mobile-nav-close:hover {
    background: var(--color-bg-secondary);
    color: var(--color-primary);
}

.mobile-nav-close:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.mobile-nav-links {
    list-style: none;
    padding: var(--space-lg) 0;
    margin: 0;
}

.mobile-nav-links li {
    margin: 0;
}

.mobile-nav-link {
    display: block;
    padding: var(--space-md) var(--space-lg);
    color: var(--color-text);
    font-size: var(--font-size-lg);
    font-weight: 500;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.mobile-nav-link:hover {
    background: var(--color-bg-secondary);
    border-left-color: var(--color-primary);
    color: var(--color-primary);
    padding-left: calc(var(--space-lg) + 4px);
}

.mobile-nav-link:active {
    background: var(--color-border);
}

.btn-mobile-primary {
    margin: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-primary);
    color: white !important;
    border-radius: var(--border-radius-sm);
    text-align: center;
    font-weight: 600;
    border-left: none !important;
}

.btn-mobile-primary:hover {
    background: var(--color-primary-hover);
    padding-left: var(--space-lg) !important;
}

/* ==================================
   Mobile Navigation Backdrop
   ================================== */

.mobile-nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 350ms cubic-bezier(0.4, 0, 0.2, 1), visibility 350ms cubic-bezier(0.4, 0, 0.2, 1);
    display: none;
}

.mobile-nav-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* ==================================
   Hero Section
   ================================== */

.hero-section {
    padding: var(--space-3xl) 0;
    opacity: 0;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

@media (min-width: 768px) {
    .hero-content {
        grid-template-columns: 200px 1fr;
    }
}

.hero-image {
    display: flex;
    justify-content: center;
    opacity: 0;
    animation: fadeInScale 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.hero-image img {
    width: 200px;
    height: 200px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.hero-image img:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 20px 40px -12px var(--color-shadow-hover);
}

.hero-text {
    opacity: 0;
    animation: fadeInRight 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.hero-title {
    margin-bottom: var(--space-sm);
    background: linear-gradient(135deg, var(--color-text), var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
    font-weight: 500;
}

.hero-description {
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
}

.social-links {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-bg-secondary);
    color: var(--color-text);
    transition: all var(--transition-base);
}

.social-link:hover {
    transform: translateY(-4px);
    background: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

/* ==================================
   Tech Stack Section
   ================================== */

.tech-stack-section {
    padding: var(--space-xl) 0;
    background: var(--color-bg-secondary);
    opacity: 0;
    animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
}

.tech-badge {
    padding: var(--space-xs) var(--space-md);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: all var(--transition-base);
    opacity: 0;
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tech-badge:nth-child(1) { animation-delay: 0.1s; }
.tech-badge:nth-child(2) { animation-delay: 0.15s; }
.tech-badge:nth-child(3) { animation-delay: 0.2s; }
.tech-badge:nth-child(4) { animation-delay: 0.25s; }
.tech-badge:nth-child(5) { animation-delay: 0.3s; }
.tech-badge:nth-child(6) { animation-delay: 0.35s; }
.tech-badge:nth-child(7) { animation-delay: 0.4s; }
.tech-badge:nth-child(8) { animation-delay: 0.45s; }
.tech-badge:nth-child(9) { animation-delay: 0.5s; }
.tech-badge:nth-child(10) { animation-delay: 0.55s; }
.tech-badge:nth-child(11) { animation-delay: 0.6s; }

.tech-badge:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Tech Badge Colors - Brand Colors */
.tech-badge[data-tech="typescript"] {
    background: #3178C6;
    color: white;
    border-color: #3178C6;
}

.tech-badge[data-tech="javascript"] {
    background: #F7DF1E;
    color: #000000;
    border-color: #F7DF1E;
}

.tech-badge[data-tech="python"] {
    background: #3776AB;
    color: white;
    border-color: #3776AB;
}

.tech-badge[data-tech="vue"] {
    background: #42B883;
    color: white;
    border-color: #42B883;
}

.tech-badge[data-tech="node"] {
    background: #339933;
    color: white;
    border-color: #339933;
}

.tech-badge[data-tech="mongodb"] {
    background: #47A248;
    color: white;
    border-color: #47A248;
}

.tech-badge[data-tech="postgresql"] {
    background: #4169E1;
    color: white;
    border-color: #4169E1;
}

.tech-badge[data-tech="gcp"] {
    background: #4285F4;
    color: white;
    border-color: #4285F4;
}

.tech-badge[data-tech="linux"] {
    background: #FCC624;
    color: #000000;
    border-color: #FCC624;
}

.tech-badge[data-tech="docker"] {
    background: #2496ED;
    color: white;
    border-color: #2496ED;
}

.tech-badge[data-tech="netlify"] {
    background: #00C7B7;
    color: white;
    border-color: #00C7B7;
}

/* ==================================
   Section Styles
   ================================== */

.projects-section,
.experience-section,
.blog-section {
    padding: var(--space-3xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-2xl);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--color-primary);
    margin: var(--space-md) auto 0;
    border-radius: 2px;
}

.subsection-title {
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-lg);
    color: var(--color-text-secondary);
}

/* ==================================
   Projects Grid
   ================================== */

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.project-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--space-lg);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary);
}

.project-content {
    margin-bottom: var(--space-md);
}

.project-title {
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.project-description {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.project-link {
    color: var(--color-primary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    transition: all var(--transition-fast);
}

.project-link:hover {
    gap: var(--space-md);
}

/* ==================================
   Timeline (Experience)
   ================================== */

.timeline {
    position: relative;
    padding-left: var(--space-2xl);
}

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

.timeline-item {
    position: relative;
    margin-bottom: var(--space-2xl);
}

.timeline-marker {
    position: absolute;
    left: calc(-1 * var(--space-2xl) - 5px);
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 2px solid var(--color-bg);
    box-shadow: 0 0 0 2px var(--color-border);
    transition: all var(--transition-base);
}

.timeline-item:hover .timeline-marker {
    transform: scale(1.3);
    box-shadow: 0 0 0 6px var(--color-border);
}

.timeline-content {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.timeline-item:hover .timeline-content {
    transform: translateX(6px);
    box-shadow: var(--shadow-lg);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-xs);
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.timeline-title {
    color: var(--color-text);
    margin: 0;
}

.timeline-date {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.timeline-role {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-sm);
}

.timeline-link {
    font-size: var(--font-size-sm);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

/* ==================================
   Blog Section
   ================================== */

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.blog-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--space-lg);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary);
}

.blog-meta {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.blog-title {
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.blog-excerpt {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
    font-size: var(--font-size-sm);
    flex-grow: 1;
}

.blog-link {
    color: var(--color-primary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    transition: all var(--transition-fast);
}

.blog-link:hover {
    gap: var(--space-md);
}

/* ==================================
   Newsletter Section
   ================================== */

.newsletter-section {
    padding: var(--space-3xl) 0;
    background: var(--color-bg-secondary);
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-title {
    margin-bottom: var(--space-sm);
}

.newsletter-description {
    margin-bottom: var(--space-lg);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.newsletter-form {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

@media (max-width: 640px) {
    .newsletter-form {
        flex-direction: column;
    }
}

.newsletter-input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    background: var(--color-bg);
    color: var(--color-text);
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(3, 101, 140, 0.15);
}

.newsletter-button {
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.newsletter-button:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.newsletter-button:active {
    transform: translateY(0);
}

.newsletter-message {
    font-size: var(--font-size-sm);
    min-height: 24px;
}

.newsletter-message.success {
    color: #10b981;
}

.newsletter-message.error {
    color: #ef4444;
}

/* ==================================
   Footer
   ================================== */

.footer {
    padding: var(--space-xl) 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

/* ==================================
   Blog Post Page
   ================================== */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--color-primary);
    width: 0%;
    z-index: 1001;
    transition: width 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-post {
    padding: var(--space-2xl) 0;
}

.blog-post-header {
    margin-bottom: var(--space-2xl);
    text-align: center;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
}

.back-link:hover {
    color: var(--color-primary);
    gap: var(--space-md);
}

.blog-post-title {
    margin-bottom: var(--space-md);
    line-height: var(--line-height-tight);
}

.blog-post-meta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.blog-post-content {
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
}

.blog-post-content h2 {
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
}

.blog-post-content h3 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}

.blog-post-content h4 {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
}

.blog-post-content p {
    margin-bottom: var(--space-md);
}

.blog-post-content ul,
.blog-post-content ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
}

.blog-post-content li {
    margin-bottom: var(--space-xs);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.blog-post-content a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.blog-post-content code {
    background: var(--color-bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--color-primary);
}

.blog-post-content pre {
    background: var(--color-bg-secondary);
    padding: var(--space-md);
    border-radius: var(--border-radius-sm);
    overflow-x: auto;
    margin-bottom: var(--space-md);
    border: 1px solid var(--color-border);
    font-size: var(--font-size-sm);
}

.blog-post-content pre code {
    background: none;
    padding: 0;
    color: var(--color-text);
}

.blog-image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: var(--space-lg) 0;
    box-shadow: var(--shadow-lg);
}

.blog-post-content hr {
    border: none;
    height: 1px;
    background: var(--color-border);
    margin: var(--space-2xl) 0;
}

.blog-post-footer {
    margin-top: var(--space-3xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
    text-align: center;
}

/* ==================================
   Animations
   ================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Scroll-triggered animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ==================================
   Responsive Design
   ================================== */

/* Desktop: Explicitly hide burger menu and show desktop nav */
@media (min-width: 769px) {
    .burger-menu {
        display: none !important;
    }

    .desktop-nav {
        display: flex !important;
    }

    .mobile-nav,
    .mobile-nav-backdrop {
        display: none !important;
    }
}

/* Mobile: Show burger menu and hide desktop nav */
@media (max-width: 768px) {
    :root {
        --font-size-4xl: 1.625rem;
        --font-size-3xl: 1.375rem;
        --font-size-2xl: 1.125rem;
    }

    /* Hide desktop navigation, show burger menu */
    .desktop-nav {
        display: none !important;
    }

    .burger-menu {
        display: flex;
    }

    .mobile-nav,
    .mobile-nav-backdrop {
        display: block;
    }

    /* Adjust logo position for centered look with burger on left */
    .nav-content {
        justify-content: center;
        position: relative;
    }

    .burger-menu {
        position: absolute;
        left: 0;
    }

    .logo {
        margin: 0;
    }

    .hero-section {
        padding: var(--space-2xl) 0;
    }

    .projects-section,
    .experience-section,
    .blog-section {
        padding: var(--space-2xl) 0;
    }

    .timeline {
        padding-left: var(--space-lg);
    }

    .timeline-marker {
        left: calc(-1 * var(--space-lg) - 5px);
    }

    .blog-post-content {
        font-size: var(--font-size-sm);
    }
}

@media (max-width: 640px) {
    .theme-toggle {
        top: var(--space-sm);
        right: var(--space-sm);
        width: 50px;
        height: 70px;
    }

    .lamp-bulb {
        width: 28px;
        height: 28px;
    }

    .lamp-icon {
        font-size: 12px;
    }

    .lamp-string {
        height: 28px;
    }

    .lamp-pull-tab {
        width: 10px;
        height: 10px;
    }

    .social-links {
        justify-content: center;
    }

    .mobile-nav {
        width: 90%;
        max-width: none;
    }
}

/* ==================================
   Utility Classes
   ================================== */

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

