/* ========================================
   ICOIS CMS - Main Stylesheet v2.0
   Modern, Responsive, Dark Mode Support
   ======================================== */

/* CSS Variables - Light Theme (Default) */
:root {
    --primary: #3B82F6;
    --primary-dark: #2563EB;
    --primary-light: #60A5FA;
    --primary-rgb: 59, 130, 246;
    --secondary: #10B981;
    --accent: #8B5CF6;
    --accent-light: #A78BFA;
    --bg: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-tertiary: #F3F4F6;
    --bg-elevated: #FFFFFF;
    --text: #1F2937;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --text-inverse: #FFFFFF;
    --border: #E5E7EB;
    --border-dark: #D1D5DB;
    --success: #10B981;
    --success-bg: #ECFDF5;
    --warning: #F59E0B;
    --warning-bg: #FFFBEB;
    --error: #EF4444;
    --error-bg: #FEF2F2;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 500;
    --z-toast: 1000;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary: #60A5FA;
    --primary-dark: #3B82F6;
    --primary-light: #93C5FD;
    --bg: #111827;
    --bg-secondary: #1F2937;
    --bg-tertiary: #374151;
    --bg-elevated: #1F2937;
    --text: #F9FAFB;
    --text-secondary: #D1D5DB;
    --text-muted: #9CA3AF;
    --border: #374151;
    --border-dark: #4B5563;
    --success-bg: rgba(16,185,129,0.1);
    --warning-bg: rgba(245,158,11,0.1);
    --error-bg: rgba(239,68,68,0.1);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -1px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4), 0 4px 6px -2px rgba(0,0,0,0.3);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition), color var(--transition);
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }

/* Container */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 800px; }
.container-wide { max-width: 1400px; }

/* ========================================
   Header & Navigation
   ======================================== */
.header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: background-color var(--transition), border-color var(--transition);
}
[data-theme="dark"] .header { background: rgba(17,24,39,0.95); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 2rem; }
.nav-logo { display: flex; align-items: center; gap: 0.625rem; font-weight: 700; font-size: 1.375rem; color: var(--text); flex-shrink: 0; }
.nav-logo:hover { color: var(--text); }
.logo-image { width: 42px; height: 42px; object-fit: contain; border-radius: var(--radius-sm); }
.nav-menu { display: flex; list-style: none; gap: 0.25rem; flex: 1; justify-content: center; }
.nav-link { position: relative; padding: 0.5rem 1rem; color: var(--text-secondary); font-weight: 500; font-size: 0.9375rem; border-radius: var(--radius); transition: all var(--transition-fast); }
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 50%; width: 0; height: 2px; background: var(--primary); transform: translateX(-50%); transition: width var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--primary); background: rgba(var(--primary-rgb),0.08); }
.nav-link.active::after { width: calc(100% - 2rem); }
.nav-actions { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }

/* Theme Toggle */
.theme-toggle { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: transparent; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; color: var(--text-secondary); transition: all var(--transition-fast); }
.theme-toggle:hover { background: var(--bg-secondary); color: var(--text); border-color: var(--border-dark); }
.theme-toggle svg { width: 20px; height: 20px; }

/* Language Switcher */
.language-switcher { position: relative; }
.lang-btn { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.875rem; background: transparent; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); transition: all var(--transition-fast); }
.lang-btn:hover { background: var(--bg-secondary); border-color: var(--border-dark); }
.lang-btn svg { width: 16px; height: 16px; }
.lang-btn .chevron { transition: transform var(--transition-fast); }
.language-switcher:hover .chevron, .lang-dropdown.show + .lang-btn .chevron { transform: rotate(180deg); }
.lang-dropdown { position: absolute; top: calc(100% + 0.5rem); right: 0; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); list-style: none; min-width: 150px; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all var(--transition); overflow: hidden; }
.language-switcher:hover .lang-dropdown, .lang-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-option { display: block; padding: 0.625rem 1rem; color: var(--text-secondary); font-size: 0.875rem; transition: all var(--transition-fast); }
.lang-option:hover { background: var(--bg-secondary); color: var(--text); }
.lang-option.active { background: rgba(var(--primary-rgb),0.1); color: var(--primary); }

/* Mobile Menu */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; color: var(--text); }
.nav-toggle svg { width: 24px; height: 24px; }
.mobile-menu { display: none; background: var(--bg); border-top: 1px solid var(--border); padding: 1rem; animation: slideDown 0.3s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.mobile-menu.show { display: block; }
.mobile-nav { list-style: none; }
.mobile-nav a { display: block; padding: 0.875rem 0; color: var(--text); font-weight: 500; border-bottom: 1px solid var(--border); transition: color var(--transition-fast); }
.mobile-nav a:hover, .mobile-nav a.active { color: var(--primary); }
.mobile-lang { display: flex; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.mobile-lang a { padding: 0.5rem 1rem; background: var(--bg-secondary); border-radius: var(--radius); font-size: 0.875rem; color: var(--text-secondary); transition: all var(--transition-fast); }
.mobile-lang a:hover, .mobile-lang a.active { background: var(--primary); color: white; }
@media (max-width: 992px) { .nav-menu { display: none; } .nav-toggle { display: block; } }

/* ========================================
   Buttons
   ======================================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.625rem 1.25rem; font-family: inherit; font-size: 0.875rem; font-weight: 500; line-height: 1.5; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; transition: all var(--transition-fast); text-decoration: none; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: white; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(var(--primary-rgb),0.3); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background: var(--secondary); color: white; }
.btn-secondary:hover { background: #0EA472; color: white; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg-secondary); border-color: var(--border-dark); color: var(--text); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-secondary); color: var(--text); }
.btn-text { background: transparent; padding: 0; color: var(--primary); border: none; }
.btn-text:hover { color: var(--primary-dark); }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-block { width: 100%; }
.btn:disabled, .btn.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ========================================
   Hero Section
   ======================================== */
.hero { position: relative; padding: 5rem 0 6rem; background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg) 50%, rgba(var(--primary-rgb),0.05) 100%); overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; right: -20%; width: 80%; height: 200%; background: radial-gradient(circle, rgba(var(--primary-rgb),0.08) 0%, transparent 70%); pointer-events: none; }
.hero-content { position: relative; max-width: 720px; text-align: center; margin: 0 auto; z-index: 1; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; line-height: 1.2; margin-bottom: 1.5rem; color: var(--text); letter-spacing: -0.02em; }
.hero p { font-size: 1.125rem; color: var(--text-secondary); margin-bottom: 2rem; line-height: 1.7; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Page Hero */
.page-hero { padding: 4rem 0; background: var(--bg-secondary); text-align: center; border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; margin-bottom: 0.75rem; letter-spacing: -0.02em; }
.page-hero p { color: var(--text-secondary); font-size: 1.125rem; max-width: 600px; margin: 0 auto; }

/* ========================================
   Sections
   ======================================== */
.section { padding: 4rem 0; }
.section-alt { background: var(--bg-secondary); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin-bottom: 0.75rem; letter-spacing: -0.02em; }
.section-header p { color: var(--text-secondary); font-size: 1.0625rem; max-width: 600px; margin: 0 auto; }
.section-footer { text-align: center; margin-top: 3rem; }

/* Breadcrumb */
.breadcrumb { padding: 1rem 0; font-size: 0.875rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; }
.breadcrumb li { display: flex; align-items: center; color: var(--text-muted); }
.breadcrumb li:not(:last-child)::after { content: '/'; margin-left: 0.5rem; color: var(--text-muted); }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }

/* Cards */
.card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: all var(--transition); }
.card:hover { border-color: var(--border-dark); box-shadow: var(--shadow-lg); }
.card-body { padding: 1.5rem; }

/* ========================================
   Scholars Grid
   ======================================== */
.scholars-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; }
.scholars-grid-lg { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.scholar-card { display: block; padding: 1.5rem; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: center; transition: all var(--transition); color: var(--text); }
.scholar-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-4px); color: var(--text); }
.scholar-avatar { width: 100px; height: 100px; border-radius: 50%; overflow: hidden; margin: 0 auto 1rem; background: var(--bg-tertiary); border: 3px solid var(--border); transition: border-color var(--transition); }
.scholar-card:hover .scholar-avatar { border-color: var(--primary); }
.scholar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.scholar-card h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
.scholar-title { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.4; }
.scholar-card-detailed { display: flex; align-items: center; gap: 1.5rem; text-align: left; padding: 1.25rem; }
.scholar-card-detailed .scholar-avatar { margin: 0; flex-shrink: 0; width: 80px; height: 80px; }
.scholar-info { flex: 1; min-width: 0; }
.scholar-areas { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.tag { display: inline-block; padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 500; border-radius: var(--radius-full); background: color-mix(in srgb, var(--tag-color, var(--primary)) 12%, transparent); color: var(--tag-color, var(--primary)); transition: all var(--transition-fast); }
.tag:hover { background: color-mix(in srgb, var(--tag-color, var(--primary)) 20%, transparent); }
.tag-more { background: var(--bg-tertiary); color: var(--text-muted); }
.scholar-arrow { color: var(--text-muted); transition: transform var(--transition-fast); }
.scholar-card:hover .scholar-arrow { transform: translateX(4px); color: var(--primary); }

/* ========================================
   Research Areas
   ======================================== */
.areas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.area-card { padding: 2rem; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: all var(--transition); }
.area-card:hover { border-color: var(--accent-color); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.area-icon { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent-color) 12%, transparent); color: var(--accent-color); border-radius: var(--radius); margin-bottom: 1rem; transition: all var(--transition); }
.area-card:hover .area-icon { transform: scale(1.1); }
.area-icon svg { width: 26px; height: 26px; }
.area-card h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
.area-card p { font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.6; }

/* Insights Grid */
.insights-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.insight-card { padding: 2.5rem; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: center; transition: all var(--transition); }
.insight-card:hover { border-color: var(--accent-color); box-shadow: var(--shadow-lg); }
.insight-icon { width: 68px; height: 68px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent-color) 12%, transparent); color: var(--accent-color); border-radius: var(--radius-lg); margin: 0 auto 1.5rem; transition: all var(--transition); }
.insight-card:hover .insight-icon { transform: scale(1.1) rotate(3deg); }
.insight-icon svg { width: 32px; height: 32px; }
.insight-card h2 { font-size: 1.375rem; font-weight: 600; margin-bottom: 1rem; }
.insight-desc { color: var(--text-secondary); margin-bottom: 1.5rem; line-height: 1.6; }
.insight-stats { margin-bottom: 1.5rem; color: var(--text-muted); font-size: 0.875rem; }
.insight-stats svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 0.25rem; }

/* ========================================
   Articles Grid
   ======================================== */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.article-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: all var(--transition); }
.article-card:hover { border-color: var(--border-dark); box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.article-image { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-tertiary); }
.article-image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.article-card:hover .article-image img { transform: scale(1.08); }
.article-content { padding: 1.5rem; }
.article-type { display: inline-block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--primary); margin-bottom: 0.5rem; }
.article-content h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.75rem; line-height: 1.4; }
.article-content p { font-size: 0.9375rem; color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.6; }
.article-meta { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 1rem; }

/* ========================================
   Scholar Detail
   ======================================== */
.scholar-detail { padding-top: 2rem; }
.back-link { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-secondary); margin-bottom: 2rem; font-weight: 500; transition: all var(--transition-fast); }
.back-link:hover { color: var(--primary); transform: translateX(-4px); }
.back-link svg { width: 18px; height: 18px; }
.scholar-profile { background: var(--bg-elevated); }
.scholar-profile-header { display: flex; gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1px solid var(--border); margin-bottom: 3rem; }
.scholar-avatar-lg { width: 200px; height: 200px; border-radius: var(--radius-lg); overflow: hidden; flex-shrink: 0; border: 4px solid var(--border); }
.scholar-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.scholar-profile-info h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.scholar-title-lg { font-size: 1.125rem; color: var(--text-secondary); margin-bottom: 1rem; }
.scholar-links { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.link-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius); background: var(--bg-secondary); color: var(--text-secondary); transition: all var(--transition); }
.link-btn:hover { background: var(--primary); color: white; transform: translateY(-2px); }
.link-btn svg { width: 20px; height: 20px; }
.profile-section { margin-bottom: 2.5rem; }
.profile-section h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 3px solid var(--primary); display: inline-block; }
.affiliations-list { list-style: none; }
.affiliations-list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 0; border-bottom: 1px solid var(--border); }
.affiliations-list svg { width: 18px; height: 18px; color: var(--text-muted); }
.publications-list { list-style: none; }
.publications-list a { display: flex; justify-content: space-between; align-items: center; padding: 0.875rem 0; border-bottom: 1px solid var(--border); color: var(--text); transition: all var(--transition-fast); }
.publications-list a:hover { color: var(--primary); padding-left: 0.5rem; }
.pub-date { color: var(--text-muted); font-size: 0.875rem; flex-shrink: 0; margin-left: 1rem; }
@media (max-width: 768px) { .scholar-profile-header { flex-direction: column; align-items: center; text-align: center; } .scholar-avatar-lg { width: 160px; height: 160px; } .scholar-links { justify-content: center; } }

/* ========================================
   Gallery
   ======================================== */
.gallery-masonry { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.gallery-item { position: relative; border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; aspect-ratio: 4/3; background: var(--bg-tertiary); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.25rem; background: linear-gradient(transparent, rgba(0,0,0,0.8)); color: white; font-size: 0.9375rem; opacity: 0; transform: translateY(10px); transition: all var(--transition); }
.gallery-item:hover .gallery-caption { opacity: 1; transform: translateY(0); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.95); display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 2rem; z-index: var(--z-modal); opacity: 0; visibility: hidden; transition: all var(--transition); }
.lightbox.show { opacity: 1; visibility: visible; }
.lightbox-close { position: absolute; top: 1.5rem; right: 1.5rem; background: rgba(255,255,255,0.1); border: none; color: white; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--transition-fast); }
.lightbox-close:hover { background: rgba(255,255,255,0.2); }
.lightbox-close svg { width: 24px; height: 24px; }
.lightbox img { max-width: 90%; max-height: 80vh; object-fit: contain; border-radius: var(--radius); }
.lightbox p { color: white; margin-top: 1rem; text-align: center; }

/* ========================================
   Stats Section
   ======================================== */
.section-stats { background: var(--bg-secondary); }
.stats-row { display: flex; justify-content: center; gap: 4rem; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-value { display: block; font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 700; color: var(--primary); line-height: 1.2; }
.stat-label { color: var(--text-secondary); font-size: 0.9375rem; }

/* About Stats */
.about-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-top: 4rem; padding-top: 4rem; border-top: 1px solid var(--border); }
.about-stat { text-align: center; }
.about-stat svg { width: 32px; height: 32px; color: var(--primary); margin-bottom: 0.75rem; }
.about-stat-value { display: block; font-size: 2.25rem; font-weight: 700; }
.about-stat-label { color: var(--text-secondary); font-size: 0.875rem; }
@media (max-width: 768px) { .about-stats { grid-template-columns: repeat(2, 1fr); } }

/* ========================================
   Type Tabs / Filters
   ======================================== */
.type-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.type-tab { padding: 0.5rem 1.25rem; border-radius: var(--radius-full); color: var(--text-secondary); font-weight: 500; font-size: 0.9375rem; transition: all var(--transition-fast); }
.type-tab:hover { background: var(--bg-secondary); color: var(--text); }
.type-tab.active { background: var(--primary); color: white; }
.filters-bar { margin-bottom: 2rem; }
.filters-form { display: flex; gap: 1rem; flex-wrap: wrap; }
.search-input-wrapper { position: relative; flex: 1; min-width: 240px; }
.search-input-wrapper svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; }
.search-input-wrapper input { width: 100%; padding: 0.75rem 1rem 0.75rem 2.75rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.9375rem; background: var(--bg); color: var(--text); transition: all var(--transition-fast); }
.search-input-wrapper input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb),0.1); }
.form-select { padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.9375rem; background: var(--bg); color: var(--text); cursor: pointer; min-width: 160px; transition: all var(--transition-fast); }
.form-select:focus { outline: none; border-color: var(--primary); }
.results-count { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1.5rem; }

/* ========================================
   Article Page
   ======================================== */
.article-header { padding: 3rem 0 2rem; background: var(--bg-secondary); }
.article-type-badge { display: inline-block; padding: 0.375rem 0.875rem; background: var(--primary); color: white; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; border-radius: var(--radius-full); margin-bottom: 1rem; }
.article-header h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; margin-bottom: 1.5rem; line-height: 1.3; }
.article-meta-full { display: flex; gap: 1.5rem; flex-wrap: wrap; color: var(--text-secondary); font-size: 0.9375rem; }
.article-meta-full svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 0.25rem; }
.article-featured-image { margin: 2rem 0; }
.article-featured-image img { width: 100%; max-height: 500px; object-fit: cover; border-radius: var(--radius-lg); }
.article-body { padding: 3rem 0; }
.article-share { display: flex; align-items: center; gap: 0.75rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.article-share span { color: var(--text-secondary); font-weight: 500; }
.share-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--bg-secondary); color: var(--text-secondary); transition: all var(--transition); }
.share-btn:hover { background: var(--primary); color: white; transform: translateY(-2px); }
.share-btn svg { width: 20px; height: 20px; }
.section-related { background: var(--bg-secondary); padding: 4rem 0; }
.section-related h2 { margin-bottom: 2rem; }

/* ========================================
   Prose
   ======================================== */
.prose { line-height: 1.8; color: var(--text); }
.prose h2 { font-size: 1.5rem; font-weight: 600; margin-top: 2.5rem; margin-bottom: 1rem; }
.prose h3 { font-size: 1.25rem; font-weight: 600; margin-top: 2rem; margin-bottom: 0.75rem; }
.prose p { margin-bottom: 1.25rem; }
.prose ul, .prose ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.prose li { margin-bottom: 0.5rem; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--primary-dark); }
.prose blockquote { margin: 1.5rem 0; padding: 1rem 1.5rem; border-left: 4px solid var(--primary); background: var(--bg-secondary); border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; }
.prose code { background: var(--bg-tertiary); padding: 0.25rem 0.5rem; border-radius: var(--radius-sm); font-size: 0.875em; }
.prose pre { background: var(--bg-tertiary); padding: 1rem; border-radius: var(--radius); overflow-x: auto; margin: 1.5rem 0; }
.prose pre code { background: none; padding: 0; }
.prose-lg { font-size: 1.125rem; }

/* ========================================
   Pagination
   ======================================== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 3rem; }
.pagination-info { color: var(--text-muted); font-size: 0.9375rem; }

/* ========================================
   Flash Messages
   ======================================== */
.flash-message { padding: 1rem 0; animation: slideInDown 0.3s ease; }
@keyframes slideInDown { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: translateY(0); } }
.flash-success { background: var(--success-bg); color: #065F46; }
[data-theme="dark"] .flash-success { color: var(--success); }
.flash-error { background: var(--error-bg); color: #991B1B; }
[data-theme="dark"] .flash-error { color: var(--error); }
.flash-warning { background: var(--warning-bg); color: #92400E; }
[data-theme="dark"] .flash-warning { color: var(--warning); }
.flash-message .container { display: flex; justify-content: space-between; align-items: center; }
.flash-close { background: none; border: none; cursor: pointer; padding: 0.25rem; opacity: 0.7; transition: opacity var(--transition-fast); }
.flash-close:hover { opacity: 1; }
.flash-close svg { width: 20px; height: 20px; }

/* ========================================
   Footer
   ======================================== */
.footer { background: #111827; color: #E5E7EB; padding: 4rem 0 2rem; margin-top: auto; }
[data-theme="dark"] .footer { background: #0F172A; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 3rem; }
.footer-logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.25rem; color: white; margin-bottom: 1rem; }
.footer-logo img { width: 40px; height: 40px; }
.footer-about { color: #9CA3AF; font-size: 0.9375rem; line-height: 1.7; }
.footer-section h4 { color: white; margin-bottom: 1.25rem; font-size: 1rem; font-weight: 600; }
.footer-links { list-style: none; }
.footer-links a { display: block; padding: 0.4rem 0; color: #9CA3AF; font-size: 0.9375rem; transition: all var(--transition-fast); }
.footer-links a:hover { color: white; padding-left: 0.25rem; }
.social-links { display: flex; gap: 0.75rem; }
.social-links a { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; background: #1F2937; border-radius: var(--radius); color: #9CA3AF; transition: all var(--transition); }
.social-links a:hover { background: var(--primary); color: white; transform: translateY(-2px); }
.social-links svg { width: 20px; height: 20px; }
.footer-contact { display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem; color: #9CA3AF; font-size: 0.9375rem; }
.footer-contact svg { width: 18px; height: 18px; }
.footer-contact a { color: #9CA3AF; }
.footer-contact a:hover { color: white; }
.footer-bottom { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid #374151; text-align: center; color: #6B7280; font-size: 0.875rem; }
@media (max-width: 992px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .footer-grid { grid-template-columns: 1fr; } }

/* ========================================
   Loading States & Utilities
   ======================================== */
.skeleton { background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.loading-spinner { display: inline-block; width: 24px; height: 24px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.empty-state svg { width: 64px; height: 64px; margin-bottom: 1.5rem; opacity: 0.5; }
.empty-state p { margin-bottom: 1.5rem; font-size: 1.0625rem; }

/* Back to Top Button */
.back-to-top { position: fixed; bottom: 2rem; right: 2rem; width: 48px; height: 48px; background: var(--primary); color: white; border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all var(--transition); z-index: var(--z-dropdown); box-shadow: var(--shadow-lg); }
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-4px); }
.back-to-top svg { width: 24px; height: 24px; }

/* Social Share Buttons */
.share-buttons { display: flex; align-items: center; gap: 0.75rem; padding: 1.5rem 0; border-top: 1px solid var(--border); margin-top: 2rem; flex-wrap: wrap; }
.share-label { font-weight: 500; color: var(--text-secondary); font-size: 0.9375rem; margin-right: 0.5rem; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--bg-secondary); color: var(--text-secondary); transition: all var(--transition); border: 1px solid var(--border); }
.share-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.share-btn svg { width: 18px; height: 18px; }
.share-twitter:hover { background: #1DA1F2; color: white; border-color: #1DA1F2; }
.share-linkedin:hover { background: #0A66C2; color: white; border-color: #0A66C2; }
.share-facebook:hover { background: #1877F2; color: white; border-color: #1877F2; }
.share-weibo:hover { background: #E6162D; color: white; border-color: #E6162D; }
.share-email:hover { background: var(--primary); color: white; border-color: var(--primary); }
.share-copy:hover { background: var(--secondary); color: white; border-color: var(--secondary); }

/* Article Share (Legacy support) */
.article-share { display: flex; align-items: center; gap: 0.75rem; padding: 1.5rem 0; border-top: 1px solid var(--border); margin-top: 2rem; }
.article-share span { color: var(--text-secondary); font-weight: 500; }
.article-share .share-btn { width: 36px; height: 36px; }

/* Print Styles */
@media print { .header, .footer, .nav-toggle, .back-to-top, .flash-message, .btn, .share-buttons, .article-share { display: none !important; } body { background: white; color: black; } .container { max-width: none; padding: 0; } a { color: black; text-decoration: underline; } }
