/* ═══════════════════════════════════
   PersonalSite - Main Styles
   ═══════════════════════════════════ */

:root {
    --bg-primary: #0b0b11;
    --bg-secondary: #10101a;
    --bg-card: #16162a;
    --bg-card-hover: #1e1e3a;
    --accent: #00b4d8;
    --accent-purple: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #00b4d8, #7c3aed);
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.02);
    --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.3);
    --code-bg: #1a1a2e;
    --blockquote-bg: rgba(0, 180, 216, 0.05);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f8f9fc;
    --bg-secondary: #eef0f5;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f2f7;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8888a0;
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    --glass-bg: rgba(0, 0, 0, 0.02);
    --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.08);
    --code-bg: #f0f2f5;
    --blockquote-bg: rgba(0, 180, 216, 0.06);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scrollbar-width: thin;
    scrollbar-color: #2a2a4a #0b0b11;
}
[data-theme="light"] html, html[data-theme="light"] { scrollbar-color: #c0c0d0 #f8f9fc; }

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #33ccee; }

img { max-width: 100%; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.container-narrow { max-width: 800px; }

/* ═══ Buttons ═══ */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem; font-weight: 500;
    cursor: pointer; transition: all var(--transition);
    border: none; text-decoration: none;
}
.btn-primary { background: var(--accent-gradient); color: #fff; }
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 8px 30px rgba(0, 180, 216, 0.3); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border-hover); color: var(--text-primary); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-light { background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.btn-light:hover { background: rgba(255,255,255,0.25); color: #fff; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.82rem; }

/* ═══ Tags ═══ */
.tag {
    display: inline-block; padding: 0.2rem 0.65rem;
    background: rgba(0, 180, 216, 0.1);
    border: 1px solid rgba(0, 180, 216, 0.2);
    border-radius: 20px;
    font-size: 0.75rem; color: var(--accent);
}
.tag-sm { font-size: 0.7rem; padding: 0.15rem 0.5rem; }

.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }

/* ═══ Navbar ═══ */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 1rem 0;
    transition: all var(--transition);
    background: transparent;
}
.navbar.scrolled {
    background: rgba(11, 11, 17, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 0;
}
[data-theme="light"] .navbar.scrolled { background: rgba(248, 249, 252, 0.9); }
.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 0 2rem;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
    display: flex; align-items: center; gap: 0.5rem;
    font-weight: 600; font-size: 1.1rem; color: var(--text-primary);
}
.nav-logo:hover { color: var(--text-primary); }
.logo-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    background: var(--accent-gradient);
    border-radius: 8px;
    font-size: 0.8rem; color: #fff;
}
.nav-menu {
    display: flex; list-style: none; gap: 2.5rem;
}
.nav-menu a {
    color: var(--text-secondary); font-size: 0.9rem; font-weight: 400;
    position: relative;
}
.nav-menu a::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition);
}
.nav-menu a:hover { color: var(--text-primary); }
.nav-menu a:hover::after { width: 100%; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text-primary); margin: 5px 0; transition: all 0.3s; }

/* ═══ Hero ═══ */
.hero {
    position: relative; min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    background: linear-gradient(-45deg, #0b0b11, #0f1628, #0b1a2a, #0b0b11);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
}
[data-theme="light"] .hero {
    background: linear-gradient(-45deg, #e8ecf5, #dce3f0, #d0daf0, #e8ecf5);
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.hero-canvas {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; opacity: 0.6;
}
.hero-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, var(--bg-primary) 75%);
}
[data-theme="light"] .hero-overlay { background: radial-gradient(ellipse at center, transparent 0%, var(--bg-primary) 80%); }
.hero-content {
    position: relative; z-index: 2;
    text-align: center; max-width: 700px; padding: 0 2rem;
}
.hero-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: rgba(0, 180, 216, 0.08);
    border: 1px solid rgba(0, 180, 216, 0.2);
    border-radius: 20px;
    font-size: 0.82rem; color: var(--accent);
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700; line-height: 1.2;
    margin-bottom: 1.25rem;
}
.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 1.1rem; color: var(--text-secondary);
    margin-bottom: 2.5rem; line-height: 1.8;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero-scroll {
    position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
    z-index: 2; text-align: center;
    color: var(--text-muted); font-size: 0.75rem;
}
.scroll-indicator {
    width: 20px; height: 32px; border: 2px solid var(--text-muted);
    border-radius: 10px; margin: 0.5rem auto 0; position: relative;
}
.scroll-indicator::after {
    content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
    width: 3px; height: 8px; background: var(--accent);
    border-radius: 3px;
    animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
    0%, 100% { top: 6px; opacity: 1; }
    50% { top: 16px; opacity: 0.3; }
}

/* ═══ Sections ═══ */
.section { padding: 6rem 0; }
.section-alt { background: var(--bg-secondary); }

.section-header { text-align: center; margin-bottom: 4rem; }
.section-tag {
    display: inline-block;
    font-size: 0.72rem; font-weight: 600;
    letter-spacing: 3px; color: var(--accent);
    margin-bottom: 1rem;
}
.section-title {
    font-size: 2.2rem; font-weight: 700;
    margin-bottom: 1rem;
}
.section-desc { color: var(--text-secondary); font-size: 1rem; max-width: 500px; margin: 0 auto; }
.section-cta { text-align: center; margin-top: 3rem; }

/* ═══ Project Styles ═══ */
.projects-dynamic { display: flex; flex-direction: column; gap: 2rem; }

/* Card Style */
.project-card {
    display: grid; grid-template-columns: 1fr 1fr;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    transition: all var(--transition);
}
.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}
.project-card-image { overflow: hidden; aspect-ratio: 16/10; }
.project-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.project-card:hover .project-card-image img { transform: scale(1.05); }
.project-card-body { padding: 2rem; display: flex; flex-direction: column; justify-content: center; }
.project-card-body h3 { font-size: 1.4rem; margin-bottom: 0.75rem; }
.project-card-body p { color: var(--text-secondary); margin-bottom: 1.25rem; font-size: 0.95rem; }
.card-link {
    display: inline-flex; align-items: center; gap: 0.4rem;
    color: var(--accent); font-size: 0.9rem; font-weight: 500;
}
.card-link svg { transition: transform var(--transition); }
.card-link:hover svg { transform: translateX(4px); }

/* Hero Style */
.project-hero {
    position: relative; min-height: 400px;
    background-size: cover; background-position: center;
    border-radius: var(--radius-lg); overflow: hidden;
}
.project-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(11,11,17,0.9) 0%, rgba(11,11,17,0.4) 100%);
    display: flex; align-items: flex-end;
    padding: 3rem;
}
.project-hero-content { max-width: 600px; }
.project-hero-content h3 { font-size: 2rem; margin-bottom: 0.75rem; }
.project-hero-content p { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 1rem; }

/* Split Style */
.project-split {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
}
.project-split:nth-child(even) { direction: rtl; }
.project-split:nth-child(even) > * { direction: ltr; }
.project-split-image { border-radius: var(--radius); overflow: hidden; }
.project-split-image img { width: 100%; display: block; border-radius: var(--radius); }
.project-split-content h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.project-split-content p { color: var(--text-secondary); margin-bottom: 1.25rem; }
.project-gallery-mini { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.project-gallery-mini img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }

/* Minimal Style */
.project-minimal {
    display: flex; align-items: center; gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
    transition: all var(--transition);
}
.project-minimal:hover { padding-left: 1rem; }
.project-minimal-index {
    font-size: 1.5rem; font-weight: 700;
    color: var(--text-muted); min-width: 50px;
    font-variant-numeric: tabular-nums;
}
.project-minimal-content { flex: 1; }
.project-minimal-content h3 { font-size: 1.15rem; margin-bottom: 0.25rem; }
.project-minimal-content h3 a { color: var(--text-primary); }
.project-minimal-content h3 a:hover { color: var(--accent); }
.project-minimal-content p { color: var(--text-secondary); font-size: 0.9rem; }
.project-minimal-tags { display: flex; gap: 0.3rem; }
.project-minimal-arrow {
    font-size: 1.5rem; color: var(--text-muted);
    transition: all var(--transition);
}
.project-minimal:hover .project-minimal-arrow { color: var(--accent); transform: translateX(4px); }

/* ═══ Open Source Grid ═══ */
.os-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.5rem; }
.os-grid-full { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.os-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    transition: all var(--transition);
}
.os-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}
.os-card-image { aspect-ratio: 16/9; overflow: hidden; }
.os-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.os-card:hover .os-card-image img { transform: scale(1.05); }
.os-card-body { padding: 1.5rem; }
.os-card-body h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.os-card-body p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1rem; line-height: 1.6; }
.os-card-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 1rem; }
.os-card-links { display: flex; gap: 1rem; }
.os-link {
    display: inline-flex; align-items: center; gap: 0.3rem;
    font-size: 0.85rem; color: var(--text-secondary);
}
.os-link:hover { color: var(--accent); }

/* ═══ Blog Grid & List ═══ */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.5rem; }

.blog-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    transition: all var(--transition);
}
.blog-card:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.blog-card-image { aspect-ratio: 16/9; overflow: hidden; }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 1.25rem; }
.blog-card-meta { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.blog-card-meta time { font-size: 0.8rem; color: var(--text-muted); }
.blog-card-body h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.blog-card-body h3 a { color: var(--text-primary); }
.blog-card-body h3 a:hover { color: var(--accent); }
.blog-card-body p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; }

.blog-list { display: flex; flex-direction: column; gap: 2rem; }
.blog-list-item {
    display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}
.blog-list-item:hover { border-color: var(--border-hover); }
.blog-list-image { border-radius: 8px; overflow: hidden; aspect-ratio: 16/10; }
.blog-list-image img { width: 100%; height: 100%; object-fit: cover; }
.blog-list-body h2 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.blog-list-body h2 a { color: var(--text-primary); }
.blog-list-body h2 a:hover { color: var(--accent); }
.blog-list-body p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 0.75rem; }
.blog-card-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }

.tag-clear { color: var(--accent); font-size: 0.85rem; }

.pagination {
    display: flex; align-items: center; justify-content: center; gap: 1.5rem;
    margin-top: 3rem;
}
.page-link {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem; color: var(--text-secondary);
}
.page-link:hover { border-color: var(--accent); color: var(--accent); }
.page-info { color: var(--text-muted); font-size: 0.85rem; }

/* ═══ Contact ═══ */
.contact-cards {
    display: flex; justify-content: center; gap: 2rem;
    flex-wrap: wrap;
}
.contact-card {
    display: flex; flex-direction: column; align-items: center; gap: 1rem;
    padding: 2.5rem 3rem;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    cursor: pointer; text-decoration: none;
}
.contact-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}
.contact-icon {
    width: 64px; height: 64px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 180, 216, 0.08);
    border-radius: 16px;
    color: var(--accent);
}
.contact-label { font-weight: 500; color: var(--text-primary); }
.contact-hint { font-size: 0.8rem; color: var(--text-muted); }

/* ═══ Page Headers ═══ */
.page-header {
    padding: 8rem 0 3rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}
.page-header-detail {
    padding: 10rem 0 4rem;
    background-size: cover; background-position: center;
    position: relative;
}
.page-header-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(11,11,17,0.7), var(--bg-primary));
    display: flex; align-items: flex-end; padding-bottom: 3rem;
}
[data-theme="light"] .page-header-overlay { background: linear-gradient(to bottom, rgba(0,0,0,0.3), var(--bg-primary)); }
.page-header-overlay .container { position: relative; z-index: 1; }
.page-header-blog { padding: 8rem 0 2rem; }
.page-title { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.page-desc { color: var(--text-secondary); font-size: 1rem; }
.back-link { display: inline-block; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1.5rem; }
.back-link:hover { color: var(--accent); }

.blog-detail-title { font-size: 2rem; line-height: 1.3; }
.blog-detail-summary { color: var(--text-secondary); margin-top: 1rem; font-size: 1.05rem; }
.os-detail-links { display: flex; gap: 0.75rem; margin-top: 1.5rem; }

.detail-cover { margin-bottom: 2rem; border-radius: var(--radius); overflow: hidden; }
.detail-cover img { width: 100%; display: block; }

/* ═══ Article Content ═══ */
.article-content { font-size: 1.05rem; line-height: 1.9; color: var(--text-secondary); }
.article-content h1, .article-content h2, .article-content h3, .article-content h4 { color: var(--text-primary); margin: 2rem 0 1rem; line-height: 1.4; }
.article-content h2 { font-size: 1.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.article-content h3 { font-size: 1.25rem; }
.article-content p { margin-bottom: 1.25rem; }
.article-content ul, .article-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.article-content li { margin-bottom: 0.5rem; }
.article-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.article-content a { color: var(--accent); border-bottom: 1px solid transparent; }
.article-content a:hover { border-bottom-color: var(--accent); }

/* ═══ Project Gallery ═══ */
.project-gallery { margin-top: 3rem; }
.project-gallery h3 { font-size: 1.3rem; margin-bottom: 1.5rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.gallery-item {
    aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden;
    cursor: pointer; transition: transform var(--transition);
}
.gallery-item:hover { transform: scale(1.03); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

.lightbox {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.9); align-items: center; justify-content: center;
    cursor: pointer;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90%; max-height: 90vh; border-radius: var(--radius); }

/* ═══ Empty State ═══ */
.empty-state {
    text-align: center; padding: 4rem 2rem;
    color: var(--text-muted); font-size: 1rem;
    background: var(--glass-bg); border: 1px dashed var(--border);
    border-radius: var(--radius);
}

/* ═══ Footer ═══ */
.site-footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    background: var(--bg-primary);
}
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.footer-content {
    display: flex; flex-direction: column; align-items: center;
    text-align: center; gap: 0.8rem;
}
.footer-content p { color: var(--text-muted); font-size: 0.85rem; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.footer-links a {
    display: inline-flex; align-items: center; gap: 0.4rem;
    color: var(--text-muted); font-size: 0.8rem;
}
.footer-links a:hover { color: var(--text-secondary); }
.beian-icon { width: 16px; height: 16px; vertical-align: middle; }

/* ═══ Theme Toggle ═══ */
.theme-toggle {
    background: none; border: 1px solid var(--border);
    border-radius: 8px; padding: 0.4rem;
    cursor: pointer; color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    transition: all var(--transition);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ═══ Blog TOC ═══ */
.blog-detail-layout {
    display: grid; grid-template-columns: 1fr 240px; gap: 3rem;
    align-items: start;
}
.blog-detail-main { min-width: 0; }
.blog-toc {
    position: sticky; top: 5rem;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.25rem;
    max-height: calc(100vh - 6rem); overflow-y: auto;
}
.blog-toc-title {
    font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 1.5px;
    margin-bottom: 0.75rem; padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.blog-toc ul { list-style: none; padding: 0; margin: 0; }
.blog-toc li { margin-bottom: 0.3rem; }
.blog-toc a {
    display: block; font-size: 0.82rem; color: var(--text-secondary);
    padding: 0.2rem 0; padding-left: 0;
    border-left: 2px solid transparent;
    transition: all var(--transition);
    line-height: 1.4;
}
.blog-toc a:hover { color: var(--accent); }
.blog-toc a.active { color: var(--accent); border-left-color: var(--accent); padding-left: 0.6rem; }
.blog-toc .toc-h3 { padding-left: 0.8rem; font-size: 0.78rem; }
.blog-toc .toc-h4 { padding-left: 1.6rem; font-size: 0.75rem; }

@media (max-width: 960px) {
    .blog-detail-layout { grid-template-columns: 1fr; }
    .blog-toc { display: none; }
}

/* ═══ Scroll Reveal ═══ */
.reveal {
    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);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══ Responsive ═══ */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
        background: rgba(11, 11, 17, 0.98); backdrop-filter: blur(20px);
        flex-direction: column; padding: 5rem 2rem 2rem; gap: 1.5rem;
        transition: right 0.4s;
    }
    [data-theme="light"] .nav-menu { background: rgba(248, 249, 252, 0.98); }
    .nav-menu.active { right: 0; }
    .nav-toggle { display: block; z-index: 1001; }

    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 0.95rem; }

    .project-card { grid-template-columns: 1fr; }
    .project-split { grid-template-columns: 1fr; gap: 1.5rem; }
    .project-split:nth-child(even) { direction: ltr; }
    .project-hero { min-height: 300px; }
    .project-hero-overlay { padding: 2rem; }
    .project-hero-content h3 { font-size: 1.4rem; }

    .os-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
    .blog-list-item { grid-template-columns: 1fr; }

    .section { padding: 4rem 0; }
    .section-title { font-size: 1.6rem; }
    .section-header { margin-bottom: 2.5rem; }

    .footer-content { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }
}
