/* ===========================================
   ULTIMATE LEGAL RESEARCH PLATFORM STYLES
   =========================================== */

/* CSS Variables - Theme System */
[data-theme="dark"] {
    --bg-primary: #0a0a0f;
    --bg-secondary: #131318;
    --bg-tertiary: #1a1a22;
    --bg-elevated: #21212b;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0b2;
    --text-tertiary: #6b6b7f;
    
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-light: rgba(99, 102, 241, 0.1);
    
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.1);
    --error: #ef4444;
    
    --border: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
    
    --glow: 0 0 20px rgba(99, 102, 241, 0.3);
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    --bg-elevated: #ffffff;
    
    --text-primary: #18181b;
    --text-secondary: #52525b;
    --text-tertiary: #a1a1aa;
    
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-light: rgba(99, 102, 241, 0.08);
    
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.08);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.08);
    --error: #ef4444;
    
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.12);
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.12);
    
    --glow: 0 0 20px rgba(99, 102, 241, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* ===========================================
   NAVIGATION
   =========================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.8);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-logo {
    color: var(--accent);
}

.brand-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 44px;
    padding: 0 80px 0 48px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.search-shortcut {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.icon-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.icon-btn:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.moon-icon {
    display: none;
}

[data-theme="light"] .sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: block;
}

.mobile-menu-toggle {
    display: none;
}

/* ===========================================
   HERO SECTION
   =========================================== */
.hero {
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 48px;
    line-height: 1.6;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 64px;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

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

/* ===========================================
   MAIN NAVIGATION CARDS
   =========================================== */
.main-nav-section {
    padding: 80px 0;
}

.nav-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.nav-card {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #a855f7);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-hover);
}

.nav-card:hover::before {
    transform: scaleX(1);
}

.nav-card-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border-radius: 12px;
    margin-bottom: 20px;
    color: var(--accent);
    transition: all 0.3s;
}

.nav-card:hover .nav-card-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: var(--glow);
}

.nav-card-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.nav-card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.nav-card-arrow {
    font-size: 24px;
    color: var(--accent);
    transition: transform 0.3s;
}

.nav-card:hover .nav-card-arrow {
    transform: translateX(8px);
}

/* ===========================================
   RESOURCE PANEL (SIDE PANEL)
   =========================================== */
.resource-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    pointer-events: none;
}

.resource-panel.active {
    pointer-events: auto;
}

.panel-overlay {
    position: absolute;
    top: 0;
    left: -100vw;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s;
}

.resource-panel.active .panel-overlay {
    opacity: 1;
}

.panel-content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 600px;
    background: var(--bg-elevated);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.resource-panel.active .panel-content {
    transform: translateX(0);
}

.panel-header {
    position: sticky;
    top: 0;
    padding: 24px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(20px);
}

.panel-title {
    font-size: 24px;
    font-weight: 700;
}

.panel-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.panel-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.panel-search {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

.panel-search-input {
    width: 100%;
    height: 40px;
    padding: 0 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
}

.panel-search-input:focus {
    outline: none;
    border-color: var(--accent);
}

.panel-body {
    padding: 24px;
}

.resource-section {
    margin-bottom: 32px;
}

.resource-section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.resource-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
}

.resource-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent);
    transform: translateX(4px);
}

.resource-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.resource-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.resource-name {
    font-size: 14px;
    font-weight: 500;
}

.resource-seat {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 400;
}

.resource-external {
    color: var(--text-tertiary);
    font-size: 12px;
}

/* ===========================================
   WORK SECTION (PORTFOLIO)
   =========================================== */
.work-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.section-header-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 48px;
}

.section-label {
    display: inline-block;
    padding: 6px 12px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.section-title-main {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 12px;
}

.section-description {
    font-size: 18px;
    color: var(--text-secondary);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

.filter-pills {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.pill {
    padding: 10px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

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

.pill.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
}

.work-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

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

.work-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.work-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.work-badge.constitutional {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.work-badge.criminal {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.work-badge.civil {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.work-badge.corporate {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.work-badge.tax {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

.work-date {
    font-size: 13px;
    color: var(--text-tertiary);
}

.work-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.work-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.work-court {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.work-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.work-status.ongoing {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.work-status.completed {
    background: var(--success-light);
    color: var(--success);
}

.work-status.pending {
    background: var(--warning-light);
    color: var(--warning);
}

.work-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    padding: 4px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.work-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--accent-light);
    color: var(--accent);
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.work-link:hover {
    background: var(--accent);
    color: white;
}

.empty-state {
    text-align: center;
    padding: 80px 24px;
}

.empty-state svg {
    color: var(--text-tertiary);
    margin-bottom: 24px;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ===========================================
   QUICK TOOLS
   =========================================== */
.quick-tools {
    padding: 80px 0;
}

.tools-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}

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

.tool-card {
    padding: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.tool-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.tool-name {
    font-size: 14px;
    font-weight: 600;
}

/* ===========================================
   FOOTER
   =========================================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.footer-brand {
    display: flex;
    gap: 16px;
    align-items: center;
}

.footer-brand-name {
    font-size: 18px;
    font-weight: 700;
}

.footer-brand-tagline {
    font-size: 13px;
    color: var(--text-tertiary);
}

.footer-note {
    max-width: 400px;
    font-size: 13px;
    color: var(--text-secondary);
}

.footer-note p {
    margin-bottom: 8px;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-tertiary);
}

.footer-links {
    display: flex;
    gap: 12px;
}

.footer-links a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* ===========================================
   MODAL
   =========================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s;
}

.modal-dialog {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

.modal-header h3 {
    font-size: 24px;
    font-weight: 700;
}

.modal-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
    max-height: calc(90vh - 160px);
    overflow-y: auto;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

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

.modal-footer {
    padding: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-secondary {
    padding: 12px 24px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 1024px) {
    .nav-search {
        max-width: 320px;
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .nav-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-search {
        display: none;
    }
    
    .hero {
        padding: 80px 0 60px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-stats {
        gap: 32px;
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .section-header-main {
        flex-direction: column;
        gap: 24px;
    }
    
    .nav-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .cases-grid {
        grid-template-columns: 1fr;
    }
    
    .panel-content {
        max-width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        flex-direction: column;
        gap: 24px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }
    
    .filter-pills {
        justify-content: center;
    }
}

/* ===========================================
   ANIMATIONS & UTILITIES
   =========================================== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Smooth transitions for theme toggle */
* {
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
