/* ========================================
   Google Fonts Import
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Space+Mono:ital,wght@0,400;0,700;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ========================================
   CSS Variables & Theme System
   ======================================== */
:root {
    --bg-primary: #080c18;
    --bg-card: rgba(255, 255, 255, 0.06);
    --bg-card-alt: rgba(255, 255, 255, 0.08);
    --text-primary: #e8e8ed;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --accent: #f59e0b;
    --accent-glow: rgba(245, 158, 11, 0.15);
    --accent-hover: #fbbf24;
    --border: rgba(255, 255, 255, 0.15);
    --border-strong: rgba(255, 255, 255, 0.25);
    --tag-bg: rgba(20, 25, 45, 0.5);
    --tag-text: #f59e0b;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.4);
    --nav-bg: rgba(8, 12, 24, 0.88);
    --nav-text: #e8e8ed;
    --code-bg: rgba(16, 21, 40, 0.5);
    --hero-bg: transparent;
    --hero-text: #e8e8ed;
    --hero-muted: #6b7280;
    --hero-orbit: rgba(245, 158, 11, 0.12);
    --hero-orbit-lg: rgba(245, 158, 11, 0.06);
    --hero-btn-border: rgba(255, 255, 255, 0.2);
    --hero-pic-shadow: 0 0 30px rgba(245, 158, 11, 0.15), 0 20px 60px rgba(0, 0, 0, 0.5);
    --hero-pic-shadow-hover: 0 0 40px rgba(245, 158, 11, 0.25), 0 20px 60px rgba(0, 0, 0, 0.5);
    --timeline-line: rgba(255, 255, 255, 0.12);
    --grain-opacity: 0.02;
    --glass-blur: 4px;
    --card-radius: 20px;
}

[data-theme="light"] {
    --bg-primary: #b8c4d8;
    --bg-card: rgba(255, 255, 255, 0.4);
    --bg-card-alt: rgba(255, 255, 255, 0.35);
    --text-primary: #1a1a1f;
    --text-secondary: #4a4a55;
    --text-muted: #8a8a95;
    --accent: #d97706;
    --accent-glow: rgba(217, 119, 6, 0.1);
    --accent-hover: #f59e0b;
    --border: rgba(255, 255, 255, 0.6);
    --border-strong: rgba(255, 255, 255, 0.7);
    --tag-bg: rgba(255, 255, 255, 0.4);
    --tag-text: #92400e;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.1);
    --nav-bg: rgba(255, 255, 255, 0.4);
    --nav-text: #1a1a1f;
    --code-bg: rgba(255, 255, 255, 0.4);
    --hero-bg: transparent;
    --hero-text: #1a1a1f;
    --hero-muted: #6b7280;
    --hero-orbit: rgba(217, 119, 6, 0.10);
    --hero-orbit-lg: rgba(217, 119, 6, 0.05);
    --hero-btn-border: rgba(26, 26, 31, 0.18);
    --hero-pic-shadow: 0 0 30px rgba(217, 119, 6, 0.12), 0 12px 40px rgba(0, 0, 0, 0.1);
    --hero-pic-shadow-hover: 0 0 40px rgba(217, 119, 6, 0.2), 0 12px 40px rgba(0, 0, 0, 0.12);
    --timeline-line: rgba(0, 0, 0, 0.08);
    --grain-opacity: 0.02;
    --glass-blur: 10px;
    --card-radius: 20px;
}

/* Light mode glass overrides */
[data-theme="light"] section,
[data-theme="light"] .card,
[data-theme="light"] .featured-card {
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(255, 255, 255, 0.3),
        inset 0 0 6px 3px rgba(255, 255, 255, 0.4);
}

[data-theme="light"] section::before,
[data-theme="light"] .hero-glass::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 1), transparent);
}

[data-theme="light"] section::after,
[data-theme="light"] .hero-glass::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 1), transparent, rgba(255, 255, 255, 0.5));
}

[data-theme="light"] .jump-bar {
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(255, 255, 255, 0.3),
        inset 0 0 6px 3px rgba(255, 255, 255, 0.4);
}

/* Light mode glow orbs - strong colors so glass has content to blur */
[data-theme="light"] .bg-glow-orb--1 {
    background: radial-gradient(circle, rgba(217, 119, 6, 0.3) 0%, transparent 70%);
}

[data-theme="light"] .bg-glow-orb--2 {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
}

[data-theme="light"] .bg-glow-orb--3 {
    background: radial-gradient(circle, rgba(168, 85, 247, 0.2) 0%, transparent 70%);
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 18px;
}

body {
    font-family: 'Outfit', -apple-system, sans-serif;
    color: var(--text-primary);
    line-height: 1.65;
    background: var(--bg-primary);
    transition: background 0.4s ease, color 0.4s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* Decorative orbital background line */
body::before {
    content: '';
    position: fixed;
    top: -15%;
    right: -10%;
    width: 700px;
    height: 700px;
    border: 1px solid rgba(245, 158, 11, 0.07);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: orbit-slow 40s linear infinite;
}

[data-theme="light"] body::before {
    border-color: rgba(217, 119, 6, 0.07);
}

/* Ambient glow orbs for glass blur effect */
.bg-glow-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(80px);
}

.bg-glow-orb--1 {
    top: 10%;
    left: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
    animation: float-orb 20s ease-in-out infinite;
}

.bg-glow-orb--2 {
    top: 50%;
    right: -8%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(30, 120, 200, 0.12) 0%, transparent 70%);
    animation: float-orb 25s ease-in-out infinite reverse;
}

.bg-glow-orb--3 {
    bottom: 5%;
    left: 20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
    animation: float-orb 30s ease-in-out infinite;
}

[data-theme="light"] .bg-glow-orb--1 {
    background: radial-gradient(circle, rgba(217, 119, 6, 0.1) 0%, transparent 70%);
}

[data-theme="light"] .bg-glow-orb--2 {
    background: radial-gradient(circle, rgba(30, 100, 180, 0.08) 0%, transparent 70%);
}

[data-theme="light"] .bg-glow-orb--3 {
    background: radial-gradient(circle, rgba(217, 119, 6, 0.07) 0%, transparent 70%);
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* Subtle noise grain overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: var(--grain-opacity);
    background-image: radial-gradient(circle, var(--text-muted) 0.5px, transparent 0.5px);
    background-size: 24px 24px;
}

/* Second decorative orbital circle */
.bg-orb-2 {
    position: fixed;
    bottom: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    border: 1px solid rgba(245, 158, 11, 0.04);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: orbit-slow 55s linear infinite reverse;
}

[data-theme="light"] .bg-orb-2 {
    border-color: rgba(217, 119, 6, 0.04);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

::selection {
    background: var(--accent);
    color: #fff;
}

/* ========================================
   Sticky Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

.navbar.scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-brand {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
}

.nav-brand svg {
    color: var(--accent);
    flex-shrink: 0;
}

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

.nav-links a {
    color: var(--nav-text);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.55;
    transition: opacity 0.25s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
    color: var(--nav-text);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 1.5px;
    background: var(--accent);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--nav-text);
    transition: background 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
}

.nav-hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--nav-text);
    padding: 4px;
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
    }

    .nav-hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--nav-bg);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 24px 32px;
        gap: 20px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        display: flex;
    }
}

/* ========================================
   Hero / Header
   ======================================== */
header {
    background: var(--hero-bg);
    color: var(--hero-text);
    padding: 140px 32px 80px;
    position: relative;
    overflow: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}

/* Glass hero card wrapper */
.hero-glass {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    padding: 40px 48px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1),
        inset 0 0 6px 3px rgba(255, 255, 255, 0.3);
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    z-index: 2;
}

.hero-glass::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), transparent, rgba(255, 255, 255, 0.3));
    z-index: 2;
}

/* Animated geometric accents */
header::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 400px;
    height: 400px;
    border: 1px solid var(--hero-orbit);
    border-radius: 50%;
    pointer-events: none;
    animation: orbit-slow 25s linear infinite;
    transition: border-color 0.4s ease;
}

header::after {
    content: '';
    position: absolute;
    bottom: -200px;
    left: -100px;
    width: 500px;
    height: 500px;
    border: 1px solid var(--hero-orbit-lg);
    border-radius: 50%;
    pointer-events: none;
    animation: orbit-slow 35s linear infinite reverse;
    transition: border-color 0.4s ease;
}

.hero-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: center;
}

.hero-text {
    position: relative;
    z-index: 1;
}

.hero-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-label::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 1px;
    background: var(--accent);
}

header h1 {
    font-family: 'Space Mono', monospace;
    font-size: clamp(2.8rem, 6vw, 4.2rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 16px;
}

header h1 em {
    font-style: italic;
    color: var(--accent);
}

header p.headline {
    font-size: 1.1rem;
    color: var(--hero-muted);
    font-weight: 400;
    max-width: 440px;
    line-height: 1.6;
}

header p.location {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--hero-muted);
    margin-top: 8px;
    letter-spacing: 0.02em;
}

.hero-photo {
    position: relative;
    z-index: 1;
}

.profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(245, 158, 11, 0.4);
    box-shadow: var(--hero-pic-shadow);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.profile-pic:hover {
    transform: scale(1.02);
    box-shadow: var(--hero-pic-shadow-hover);
}

.profile-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Mono', monospace;
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--accent);
    background: linear-gradient(135deg, #141419, #1e1e28);
    letter-spacing: 0.04em;
}

.header-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--accent);
    color: #0a0a0f;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #0a0a0f;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--hero-text);
    border: 1px solid var(--hero-btn-border);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(245, 158, 11, 0.06);
}

.contact-bar {
    display: flex;
    gap: 24px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.contact-bar a {
    font-family: 'JetBrains Mono', monospace;
    color: var(--hero-muted);
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 0.01em;
    transition: color 0.2s;
}

.contact-bar a:hover {
    color: var(--accent);
}

@media (max-width: 768px) {
    header {
        padding: 110px 20px 60px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .hero-photo {
        order: -1;
    }

    .profile-pic {
        width: 120px;
        height: 120px;
    }
}

/* ========================================
   Main Content
   ======================================== */
main {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px;
    position: relative;
    z-index: 1;
}

main.wide {
    max-width: 1100px;
}

section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 36px 40px;
    margin-bottom: 20px;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1),
        inset 0 0 6px 3px rgba(255, 255, 255, 0.3);
}

/* Glass top-edge highlight */
section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    z-index: 1;
}

/* Glass left-edge highlight */
section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), transparent, rgba(255, 255, 255, 0.3));
    z-index: 1;
}

section h2 {
    font-family: 'Space Mono', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    margin-left: 0;
    margin-right: 0;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--border);
    letter-spacing: -0.02em;
}

section h2::before {
    content: '// ';
    color: var(--accent);
    font-weight: 400;
}

section h2::after {
    display: none;
}

/* ========================================
   Scroll Animations
   ======================================== */
.fade-in {
    opacity: 0.15;
    transform: translateY(12px);
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.fade-in:nth-child(2) { transition-delay: 0.06s; }
.fade-in:nth-child(3) { transition-delay: 0.12s; }
.fade-in:nth-child(4) { transition-delay: 0.18s; }
.fade-in:nth-child(5) { transition-delay: 0.24s; }

/* ========================================
   Experience Timeline
   ======================================== */
.experience-item,
.education-item {
    margin-bottom: 28px;
    padding-left: 24px;
    position: relative;
}

/* Timeline line */
.experience-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: -28px;
    width: 1px;
    background: var(--timeline-line);
}

.experience-item:last-child::before {
    bottom: 0;
}

/* Timeline dot */
.experience-item::after {
    content: '';
    position: absolute;
    left: -3px;
    top: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-card);
    box-shadow: 0 0 0 2px var(--accent);
}

.experience-item:last-child,
.education-item:last-child {
    margin-bottom: 0;
}

.experience-item h3,
.education-item h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.experience-item .meta,
.education-item .meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 2px;
    letter-spacing: 0.01em;
}

.experience-item ul {
    margin-top: 10px;
    padding-left: 16px;
    list-style: none;
}

.experience-item ul li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.55;
    position: relative;
    padding-left: 14px;
}

.experience-item ul li::before {
    content: '\2014';
    position: absolute;
    left: 0;
    color: var(--text-muted);
    font-size: 0.7rem;
}

/* ========================================
   Skills
   ======================================== */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skills-bar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 32px;
}

.skill-bar-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.skill-bar-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
}

.skill-bar-track {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 0;
    box-shadow: 0 0 8px var(--accent-glow);
}

.fade-in.visible .skill-bar-fill {
    /* width set inline */
}

@media (max-width: 600px) {
    .skills-bar-grid {
        grid-template-columns: 1fr;
    }
}

.skill-tag {
    font-family: 'JetBrains Mono', monospace;
    background: var(--tag-bg);
    color: var(--tag-text);
    padding: 6px 14px;
    border-radius: 2px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    box-shadow: 0 0 8px transparent;
}

.skill-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
    box-shadow: 0 0 12px var(--accent-glow);
}

.summary-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.subsection-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 20px;
    margin-bottom: 10px;
}

.subsection-title:first-of-type {
    margin-top: 0;
}

/* ========================================
   Lists (Certs, Awards, Languages)
   ======================================== */
.cert-list,
.award-list,
.lang-list {
    list-style: none;
    padding: 0;
}

.cert-list li,
.award-list li,
.lang-list li {
    font-size: 0.92rem;
    color: var(--text-secondary);
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.cert-list li:last-child,
.award-list li:last-child,
.lang-list li:last-child {
    border-bottom: none;
}

.cert-list li::before {
    content: '\2023';
    position: absolute;
    left: 2px;
    color: var(--accent);
    font-size: 1.2rem;
    line-height: 1;
    top: 8px;
}

.award-list li::before {
    content: '\2726';
    position: absolute;
    left: 2px;
    color: var(--accent);
    font-size: 0.8rem;
    top: 10px;
}

.lang-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}

.lang-item:last-child {
    border-bottom: none;
}

.lang-name {
    color: var(--text-primary);
    font-weight: 600;
}

.lang-level {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

/* ========================================
   Card Grid (Projects, Blog, Tools)
   ======================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 28px 24px;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1),
        inset 0 0 6px 3px rgba(255, 255, 255, 0.3);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 0;
    background: var(--accent);
    transition: height 0.35s ease;
}

.card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow), var(--shadow-hover);
    transform: translateY(-4px);
    color: inherit;
}

.card:hover::before {
    height: 100%;
}

.card-icon {
    font-size: 1.6rem;
    margin-bottom: 14px;
    display: inline-block;
}

.card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.card-tag {
    font-family: 'JetBrains Mono', monospace;
    background: var(--tag-bg);
    color: var(--tag-text);
    padding: 3px 10px;
    border-radius: 2px;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.card-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 14px;
    letter-spacing: 0.02em;
}

/* ========================================
   Contact Form
   ======================================== */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 2px;
    font-size: 0.9rem;
    font-family: 'Outfit', sans-serif;
    background: var(--bg-card-alt);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
    resize: vertical;
    min-height: 130px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.btn-submit {
    align-self: flex-start;
    font-family: 'Outfit', sans-serif;
    background: var(--accent);
    color: #0a0a0f;
    padding: 12px 32px;
    border: none;
    border-radius: 2px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: all 0.25s ease;
}

.btn-submit:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.25);
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Page Header (for sub-pages)
   ======================================== */
.page-header {
    background: var(--hero-bg);
    color: var(--hero-text);
    padding: 120px 32px 56px;
    position: relative;
    transition: background 0.4s ease, color 0.4s ease;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -60px;
    width: 300px;
    height: 300px;
    border: 1px solid var(--hero-orbit);
    border-radius: 50%;
    pointer-events: none;
    transition: border-color 0.4s ease;
}

.page-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-family: 'Space Mono', monospace;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--hero-muted);
    font-size: 0.95rem;
}

/* ========================================
   Project Detail Page
   ======================================== */
.project-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.project-detail-header h2 {
    border: none;
    padding: 0;
    margin: 0;
}

.project-detail-header h2::after {
    display: none;
}

.demo-container {
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 16px;
}

.demo-container iframe {
    width: 100%;
    height: 560px;
    border: none;
}

/* ========================================
   Blog post styles
   ======================================== */
.blog-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ========================================
   Footer
   ======================================== */
footer {
    text-align: center;
    padding: 48px 24px 32px;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
    margin-top: 0;
    position: relative;
    z-index: 1;
}

.footer-logo {
    margin-bottom: 8px;
}

.footer-logo svg {
    color: var(--accent);
    opacity: 0.6;
}

.footer-tagline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    margin-bottom: 16px;
    opacity: 0.6;
}

footer a {
    color: var(--text-muted);
    transition: color 0.2s;
}

footer a:hover {
    color: var(--accent);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-bottom: 10px;
}

.footer-links a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ========================================
   Back to Top Button
   ======================================== */
.back-to-top {
    position: fixed !important;
    bottom: 32px !important;
    right: 32px !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    color: var(--accent);
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s, border-color 0.2s;
    z-index: 999;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

/* ========================================
   Scroll Progress Bar
   ======================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1001;
    pointer-events: none;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    transform-origin: left;
    transform: scaleX(0);
    will-change: transform;
    box-shadow: 0 0 8px var(--accent-glow);
}

/* ========================================
   Code Blocks & Syntax Highlighting
   ======================================== */
pre {
    position: relative;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    background: var(--code-bg);
    padding: 20px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', Consolas, monospace;
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.7;
    border: 1px solid var(--border);
}

pre code {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* --- Dark theme (default) syntax colors --- */
pre code.hljs {
    background: var(--code-bg);
    color: var(--text-primary);
}

pre code .hljs-keyword,
pre code .hljs-built_in,
pre code .hljs-type {
    color: #c586c0;
}

pre code .hljs-title,
pre code .hljs-function .hljs-title {
    color: #dcdcaa;
}

pre code .hljs-string,
pre code .hljs-literal {
    color: #ce9178;
}

pre code .hljs-number {
    color: #b5cea8;
}

pre code .hljs-comment {
    color: #6a9955;
    font-style: italic;
}

pre code .hljs-variable,
pre code .hljs-params {
    color: #9cdcfe;
}

pre code .hljs-symbol {
    color: #4ec9b0;
}

pre code .hljs-operator,
pre code .hljs-punctuation {
    color: #d4d4d4;
}

/* --- Light theme syntax colors --- */
[data-theme="light"] pre code.hljs {
    background: var(--code-bg);
    color: var(--text-primary);
}

[data-theme="light"] pre code .hljs-keyword,
[data-theme="light"] pre code .hljs-built_in,
[data-theme="light"] pre code .hljs-type {
    color: #af00db;
}

[data-theme="light"] pre code .hljs-title,
[data-theme="light"] pre code .hljs-function .hljs-title {
    color: #795e26;
}

[data-theme="light"] pre code .hljs-string,
[data-theme="light"] pre code .hljs-literal {
    color: #a31515;
}

[data-theme="light"] pre code .hljs-number {
    color: #098658;
}

[data-theme="light"] pre code .hljs-comment {
    color: #008000;
    font-style: italic;
}

[data-theme="light"] pre code .hljs-variable,
[data-theme="light"] pre code .hljs-params {
    color: #001080;
}

[data-theme="light"] pre code .hljs-symbol {
    color: #267f99;
}

[data-theme="light"] pre code .hljs-operator,
[data-theme="light"] pre code .hljs-punctuation {
    color: #1a1a1f;
}

/* ========================================
   Code Copy Button
   ======================================== */

.code-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--bg-card-alt);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    padding: 4px 10px;
    border-radius: 3px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
    z-index: 2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

pre:hover .code-copy-btn {
    opacity: 1;
}

.code-copy-btn:hover {
    background: var(--accent);
    color: #0a0a0f;
    border-color: var(--accent);
}

.code-copy-btn.copied {
    background: var(--accent);
    color: #0a0a0f;
    border-color: var(--accent);
    opacity: 1;
}

/* ========================================
   Reading Time Badge
   ======================================== */
.reading-time {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--tag-text);
    background: var(--tag-bg);
    border: 1px solid var(--border);
    padding: 3px 10px;
    border-radius: 2px;
    margin-top: 12px;
    letter-spacing: 0.04em;
}

/* ========================================
   Related Posts
   ======================================== */
.related-posts {
    margin-top: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

/* ========================================
   Table of Contents Sidebar
   ======================================== */
.toc-sidebar {
    position: fixed;
    top: 80px;
    left: max(16px, calc((100vw - 1000px) / 2 - 200px));
    width: 170px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    z-index: 100;
    padding: 12px 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.toc-sidebar.visible {
    opacity: 1;
    pointer-events: auto;
}

.toc-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 10px;
    padding-left: 12px;
}

.toc-link {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 5px 12px;
    border-left: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    line-height: 1.4;
}

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

.toc-link.active {
    color: var(--accent);
    border-left-color: var(--accent);
}

/* Hide TOC on smaller screens where sidebar won't fit */
@media (max-width: 1300px) {
    .toc-sidebar {
        display: none;
    }
}

/* ========================================
   Blog Search & Tag Filter
   ======================================== */
.blog-controls {
    margin-bottom: 24px;
}

.blog-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 2px;
    font-size: 0.9rem;
    font-family: 'Outfit', sans-serif;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 14px;
}

.blog-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.blog-search-input::placeholder {
    color: var(--text-muted);
}

.tag-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 5px 14px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tag-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.tag-pill.active {
    background: var(--accent);
    color: #0a0a0f;
    border-color: var(--accent);
}

.blog-no-results {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: none;
}

.blog-item-hidden {
    display: none !important;
}

/* ========================================
   Orbit animation (used by header pseudo-elements)
   ======================================== */
@keyframes orbit-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   Card Thumbnails (SVG-based decorative headers)
   ======================================== */
.card-thumbnail {
    height: 72px;
    margin: -28px -24px 18px -24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.card-thumbnail svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ========================================
   Featured Work Section (homepage)
   ======================================== */
.featured-work-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.featured-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    display: grid;
    grid-template-columns: 140px 1fr;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1),
        inset 0 0 6px 3px rgba(255, 255, 255, 0.3);
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--accent);
    transition: height 0.35s ease;
    z-index: 1;
}

.featured-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow), var(--shadow-hover);
    transform: translateY(-4px);
    color: inherit;
}

.featured-card:hover::before {
    height: 100%;
}

.featured-card-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-right: 1px solid var(--border);
    min-height: 140px;
}

.featured-card-thumb svg {
    width: 100%;
    height: 100%;
    display: block;
}

.featured-card-body {
    padding: 28px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-card-body h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.featured-card-body p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.featured-card-body .card-tags {
    margin-top: 14px;
}

@media (max-width: 600px) {
    .featured-card {
        grid-template-columns: 1fr;
    }
    .featured-card-thumb {
        border-right: none;
        border-bottom: 1px solid var(--border);
        height: 80px;
        min-height: auto;
    }
    .featured-card-body {
        padding: 20px;
    }
}

/* ========================================
   Blog Featured Layout
   ======================================== */
.blog-featured {
    margin-bottom: 24px;
}

.blog-hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 2px;
    display: grid;
    grid-template-columns: 280px 1fr;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    margin-bottom: 16px;
}

.blog-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--accent);
    transition: height 0.35s ease;
    z-index: 1;
}

.blog-hero-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow), var(--shadow-hover);
    transform: translateY(-4px);
    color: inherit;
}

.blog-hero-card:hover::before {
    height: 100%;
}

.blog-hero-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-right: 1px solid var(--border);
    min-height: 180px;
}

.blog-hero-thumb svg {
    width: 100%;
    height: 100%;
    display: block;
}

.blog-hero-body {
    padding: 32px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-hero-body h3 {
    font-family: 'Space Mono', monospace;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.blog-hero-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.blog-hero-body .card-tags {
    margin-top: 16px;
}

.blog-hero-body .blog-date {
    margin-bottom: 8px;
}

.blog-sub-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 0;
}

.blog-sub-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.blog-sub-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 0;
    background: var(--accent);
    transition: height 0.35s ease;
    z-index: 1;
}

.blog-sub-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow), var(--shadow-hover);
    transform: translateY(-4px);
    color: inherit;
}

.blog-sub-card:hover::before {
    height: 100%;
}

.blog-sub-thumb {
    height: 72px;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.blog-sub-thumb svg {
    width: 100%;
    height: 100%;
    display: block;
}

.blog-sub-body {
    padding: 22px 22px;
}

.blog-sub-body h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
    line-height: 1.35;
}

.blog-sub-body p {
    font-size: 0.83rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.blog-sub-body .card-tags {
    margin-top: 12px;
}

.blog-sub-body .blog-date {
    margin-bottom: 6px;
}

/* Divider between featured and rest */
.blog-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 32px 0 24px 0;
}

.blog-divider::before,
.blog-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.blog-divider span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .blog-hero-card {
        grid-template-columns: 1fr;
    }
    .blog-hero-thumb {
        border-right: none;
        border-bottom: 1px solid var(--border);
        height: 90px;
        min-height: auto;
    }
    .blog-hero-body {
        padding: 22px 22px;
    }
    .blog-hero-body h3 {
        font-size: 1.15rem;
    }
    .blog-sub-row {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Visual Section Breaks
   ======================================== */
/* Alternating section backgrounds */
section.section-alt {
    background: var(--bg-card-alt);
}

/* Decorative accent divider between sections */
.section-accent-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
    height: 20px;
}

.section-accent-divider::before {
    content: '';
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 1px;
}

/* Overview section prominence on project detail pages */
section.overview-prominent {
    padding: 42px 44px;
    border-left: 3px solid var(--accent);
}

section.overview-prominent .project-detail-header h2 {
    font-size: 1.55rem;
}

/* ========================================
   Empty State Placeholder Visuals
   ======================================== */
.project-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    margin-top: 16px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--card-radius);
    background: var(--bg-card-alt);
    overflow: hidden;
}

.project-placeholder svg {
    width: 100%;
    max-width: 400px;
    height: 160px;
}

/* Demo container loading skeleton */
.demo-container {
    position: relative;
}

.demo-container iframe {
    background:
        linear-gradient(90deg, var(--bg-card-alt) 25%, var(--bg-card) 50%, var(--bg-card-alt) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
}

.demo-container iframe.loaded {
    animation: none;
    background: var(--bg-card);
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 600px) {
    header {
        padding-top: 80px;
        padding-left: 12px;
        padding-right: 12px;
        padding-bottom: 24px;
    }

    .page-header {
        padding-top: 100px;
        padding-left: 20px;
        padding-right: 20px;
    }

    section {
        padding: 24px 20px;
        border-radius: 10px;
    }

    section.overview-prominent {
        padding: 24px 20px;
        border-left-width: 3px;
    }

    section h2 {
        margin-left: 0;
        margin-right: 0;
        padding: 0 0 12px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    main {
        padding: 32px 16px;
    }

    .card-thumbnail {
        height: 56px;
        margin: -24px -20px 14px -20px;
        border-radius: 10px 10px 0 0;
    }
}

/* ========================================
   Screenshot Gallery & Lightbox
   ======================================== */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.gallery-item {
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gallery-item:hover {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.gallery-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 4px;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 2001;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 16px;
    z-index: 2001;
}

.lightbox-nav:hover {
    opacity: 1;
}

.lightbox-prev {
    left: 16px;
}

.lightbox-next {
    right: 16px;
}

/* ========================================
   Print Styles (CV / Homepage)
   ======================================== */
/* ========================================
   Metrics Banner
   ======================================== */
.metrics-banner {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 48px 32px;
    text-align: center;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.metric-number {
    font-family: 'Space Mono', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}

.metric-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.66rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 6px;
}

@media (max-width: 768px) {
    .metrics-banner {
        flex-wrap: wrap;
        gap: 20px;
    }
    .metric-item {
        width: 40%;
    }
}

@media (max-width: 480px) {
    .metrics-banner {
        flex-direction: column;
        gap: 16px;
    }
    .metric-item {
        width: 100%;
    }
}

/* ========================================
   Section Jump Bar (Home Page)
   ======================================== */
.jump-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    position: sticky;
    top: 56px;
    z-index: 999;
    overflow: hidden;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1),
        inset 0 0 6px 3px rgba(255, 255, 255, 0.3);
}

.jump-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 2px;
    transition: color 0.2s, border-color 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.jump-pill:hover,
.jump-pill.active {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-glow);
}

.jump-pill-icon {
    font-size: 0.72rem;
    line-height: 1;
}

@media (max-width: 768px) {
    .jump-bar {
        padding: 10px 14px;
        gap: 4px;
        margin-left: 16px;
        margin-right: 16px;
    }
    .jump-pill {
        font-size: 0.58rem;
        padding: 4px 8px;
    }
    .jump-pill-icon {
        display: none;
    }
}

/* ========================================
   Blog Next/Previous Navigation
   ======================================== */
.blog-nav {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 16px;
    padding: 32px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border);
}

.blog-nav-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    color: var(--text-primary);
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 2px;
    max-width: 45%;
    transition: border-color 0.2s;
}

.blog-nav-link:hover {
    border-color: var(--accent);
}

.blog-nav-link.next {
    margin-left: auto;
    text-align: right;
}

.blog-nav-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-nav-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    color: var(--accent);
}

@media (max-width: 600px) {
    .blog-nav {
        flex-direction: column;
    }
    .blog-nav-link {
        max-width: 100%;
    }
    .blog-nav-link.next {
        text-align: left;
    }
}

/* ========================================
   Breadcrumbs
   ======================================== */
.breadcrumb {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--text-muted);
    padding: 10px 32px;
    max-width: 900px;
    margin: 0 auto;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb-separator {
    margin: 0 8px;
    color: var(--border-strong);
}

.breadcrumb-current {
    color: var(--text-secondary);
}

/* ========================================
   Two-Column Experience Layout
   ======================================== */
.experience-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 40px;
}

.experience-col .experience-item:first-child {
    margin-top: 0;
}

@media (max-width: 768px) {
    .experience-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Two-Column Education Layout
   ======================================== */
.education-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 40px;
}

@media (max-width: 768px) {
    .education-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Bottom Grid (Skills | Certs+Languages | Awards)
   ======================================== */
.bottom-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr;
    gap: 20px;
}

.bottom-grid section {
    margin-bottom: 0;
}

.bottom-grid .bottom-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bottom-grid .bottom-stack section {
    flex: 1;
}

/* Skills pill grid for bottom section */
.skills-pill-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.skill-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card-alt);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.skill-pill:hover {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.skill-pill-icon {
    font-size: 1rem;
    line-height: 1;
}

@media (max-width: 768px) {
    .bottom-grid {
        grid-template-columns: 1fr;
    }
    .skills-pill-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .skills-pill-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Responsive - Glass section adjustments
   ======================================== */
@media (max-width: 600px) {
    section h2 {
        margin-left: 0;
        margin-right: 0;
        padding: 0 0 12px;
    }

    .hero-glass {
        padding: 24px 20px;
        margin: 0 16px;
    }

    .featured-work-grid {
        grid-template-columns: 1fr;
    }

    .featured-card {
        grid-template-columns: 1fr;
    }
}

@media print {
    /* Force all CSS variables to print-friendly values */
    :root,
    [data-theme="light"] {
        --bg-primary: #fff;
        --bg-card: #fff;
        --bg-card-alt: #fff;
        --text-primary: #000;
        --text-secondary: #333;
        --text-muted: #555;
        --accent: #b45309;
        --accent-glow: transparent;
        --accent-hover: #b45309;
        --border: #ccc;
        --border-strong: #999;
        --tag-bg: #f5f5f5;
        --tag-text: #333;
        --shadow: none;
        --shadow-hover: none;
        --nav-bg: #fff;
        --nav-text: #000;
        --code-bg: #f5f5f5;
        --hero-bg: #fff;
        --hero-text: #000;
        --hero-muted: #555;
        --hero-orbit: transparent;
        --hero-orbit-lg: transparent;
        --hero-btn-border: #ccc;
        --hero-pic-shadow: none;
        --hero-pic-shadow-hover: none;
        --timeline-line: #ccc;
        --grain-opacity: 0;
    }

    /* Hide non-essential elements */
    .navbar,
    .hero-canvas,
    .back-to-top,
    .theme-toggle,
    .nav-hamburger,
    .scroll-progress,
    .toc-sidebar,
    .print-cv-btn,
    .footer-links,
    .footer-logo,
    .footer-tagline,
    body::before,
    body::after,
    .bg-orb-2,
    .bg-glow-orb,
    header::before,
    header::after,
    .section-accent-divider,
    .featured-work-grid,
    .section-alt .featured-card,
    .card-thumbnail {
        display: none !important;
    }

    /* Hide Featured Work section entirely */
    section.section-alt {
        display: none !important;
    }

    /* Ensure fade-in elements are fully visible when printing */
    .fade-in {
        opacity: 1 !important;
        transform: none !important;
    }

    /* Reset backgrounds and colors for printing */
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 11pt;
        line-height: 1.5;
    }

    header {
        background: #fff !important;
        color: #000 !important;
        padding: 20px 0 10px !important;
        position: static !important;
    }

    header h1 {
        font-size: 2rem !important;
        color: #000 !important;
    }

    header h1 em {
        color: #333 !important;
    }

    header p.headline,
    header p.location {
        color: #444 !important;
    }

    .hero-glass {
        background: #fff !important;
        border: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    .hero-inner {
        display: block !important;
    }

    .hero-photo {
        display: none !important;
    }

    .header-actions {
        display: none !important;
    }

    .contact-bar a {
        color: #000 !important;
    }

    main {
        padding: 0 !important;
        max-width: none !important;
    }

    .bottom-grid {
        display: block !important;
    }

    .experience-grid,
    .education-grid {
        display: block !important;
    }

    section {
        background: #fff !important;
        border: none !important;
        border-bottom: 1px solid #ddd !important;
        border-radius: 0 !important;
        padding: 16px 0 !important;
        margin-bottom: 8px !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: none !important;
    }

    /* Experience section starts on page 2 */
    #experience {
        break-before: page;
        page-break-before: always;
    }

    /* Avoid breaking individual items across pages */
    .experience-item,
    .education-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    section h2 {
        color: #000 !important;
        font-size: 1.1rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 0 6px !important;
        border-bottom: 1px solid #999 !important;
    }

    section h2::before {
        display: none !important;
    }

    .summary-text,
    .experience-item ul li,
    .cert-list li,
    .award-list li {
        color: #222 !important;
        font-size: 0.9rem !important;
    }

    .experience-item h3,
    .education-item h3 {
        color: #000 !important;
    }

    .experience-item .meta,
    .education-item .meta {
        color: #555 !important;
    }

    .skill-tag {
        background: #f5f5f5 !important;
        color: #333 !important;
        border: 1px solid #ccc !important;
    }

    .skill-bar-track {
        background: #eee !important;
    }

    .skill-bar-fill {
        background: #666 !important;
        box-shadow: none !important;
    }

    footer {
        border-top: 1px solid #ccc !important;
        color: #666 !important;
        padding: 12px 0 !important;
        font-size: 0.8rem !important;
    }

    /* Show link URLs */
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.75rem;
        color: #666;
    }

    .contact-bar a[href^="mailto"]::after {
        display: none;
    }

    /* Featured Work section background fallback */
    .section-alt {
        background: #fff !important;
    }

    /* Page header */
    .page-header {
        background: #fff !important;
        color: #000 !important;
        padding: 20px 0 10px !important;
    }

    .page-header::before {
        display: none !important;
    }

    .page-header h1 {
        color: #000 !important;
    }

    .page-header p {
        color: #444 !important;
    }

    /* Cards */
    .card {
        background: #fff !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        color: #000 !important;
    }

    .card::before {
        display: none !important;
    }

    .card h3 {
        color: #000 !important;
    }

    .card p {
        color: #333 !important;
    }

    .card-tag {
        background: #f5f5f5 !important;
        color: #333 !important;
        border-color: #ccc !important;
    }

    /* Code blocks */
    pre {
        background: #f5f5f5 !important;
        color: #000 !important;
        border: 1px solid #ccc !important;
    }

    pre code,
    pre code.hljs {
        background: #f5f5f5 !important;
        color: #000 !important;
    }

    .code-copy-btn {
        display: none !important;
    }
}
