/* ============================================
   Reddit Comments Analysis - Project Showcase
   Modern Dark Theme with Reddit Orange Accents
   ============================================ */

/* CSS Variables */
:root {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a24;
    --bg-card: #15151f;
    --bg-card-hover: #1d1d2a;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6a6a7a;
    
    --accent-primary: #ff4500;
    --accent-secondary: #ff6b35;
    --accent-gradient: linear-gradient(135deg, #ff4500 0%, #ff6b35 100%);
    
    --success: #00d26a;
    --warning: #ffc107;
    --info: #00b4d8;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    
    /* Typography */
    --font-primary: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --section-padding: 120px 0;
    --container-width: 1200px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(255, 69, 0, 0.2);
}

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

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

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: var(--accent-primary);
    color: white;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.navbar.scrolled {
    padding: 12px 0;
    background: rgba(10, 10, 15, 0.95);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.nav-logo i {
    font-size: 1.5rem;
    color: var(--accent-primary);
}

.nav-logo:hover {
    color: var(--accent-primary);
}

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

.nav-link {
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-github {
    font-size: 1.2rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 100px 24px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(255, 69, 0, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
        var(--bg-primary);
}

.hero-particles {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 69, 0, 0.3) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(255, 107, 53, 0.2) 1px, transparent 1px);
    background-size: 100px 100px, 150px 150px;
    animation: particleFloat 20s linear infinite;
}

@keyframes particleFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100px); }
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 900px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.title-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.highlight {
    color: var(--accent-primary);
    font-weight: 600;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 48px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition-normal);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 60px rgba(255, 69, 0, 0.3);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

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

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: fadeInUp 0.6s ease 0.5s both;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--border-light);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 1.5s ease-in-out infinite;
}

@keyframes scrollWheel {
    0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.3; transform: translateX(-50%) translateY(10px); }
}

.scroll-indicator span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Team Section */
.team-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 69, 0, 0.1);
    border: 1px solid rgba(255, 69, 0, 0.2);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.team-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.team-card:hover {
    transform: translateY(-5px);
    border-color: #0077b5;
    box-shadow: 0 0 30px rgba(0, 119, 181, 0.3);
}

.team-card:hover .team-avatar {
    background: linear-gradient(135deg, #0077b5 0%, #00a0dc 100%);
}

.team-card:hover .linkedin-badge {
    opacity: 1;
    transform: translateY(0);
}

.linkedin-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #0077b5 0%, #00a0dc 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.7;
    transform: translateY(5px);
    transition: var(--transition-normal);
}

.linkedin-badge i {
    font-size: 1rem;
}

.team-avatar {
    width: 80px;
    height: 80px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.team-avatar i {
    font-size: 2rem;
    color: white;
}

.team-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.team-id {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

/* Dataset Section */
.dataset-section {
    padding: var(--section-padding);
}

.dataset-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.dataset-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: var(--transition-normal);
}

.info-card:hover {
    border-color: var(--border-light);
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon i {
    font-size: 1.25rem;
    color: var(--accent-primary);
}

.info-content h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.info-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.info-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 8px;
    transition: var(--transition-fast);
}

.info-link:hover {
    gap: 10px;
}

.dataset-fields {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
}

.dataset-fields h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.dataset-fields h3 i {
    color: var(--accent-primary);
}

.fields-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.field-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.field-name {
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.field-type {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: rgba(255, 69, 0, 0.1);
    color: var(--accent-primary);
    border-radius: 4px;
    font-weight: 600;
}

/* Phase Sections */
.phase-section {
    padding: var(--section-padding);
}

.phase-1 { background: var(--bg-secondary); }
.phase-2 { background: var(--bg-primary); }
.phase-3 { background: var(--bg-secondary); }

.phase-header {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 60px;
}

.phase-number {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
}

.phase-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.phase-title {
    font-size: 2rem;
    margin-bottom: 8px;
}

.phase-desc {
    color: var(--text-secondary);
}

.phase-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.phase-content.reverse {
    direction: rtl;
}

.phase-content.reverse > * {
    direction: ltr;
}

.phase-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.phase-details.full-width {
    grid-column: 1 / -1;
}

.detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
}

.detail-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.detail-card h3 i {
    color: var(--accent-primary);
}

.detail-card p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.highlight-card {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(255, 69, 0, 0.05) 0%, transparent 100%);
}

.feature-list {
    list-style: none;
}

.feature-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li::before {
    content: '→';
    color: var(--accent-primary);
}

.table-name {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 3px 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    color: var(--accent-secondary);
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.collection-item {
    display: flex;
    flex-direction: column;
    padding: 14px;
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.collection-name {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-primary);
    margin-bottom: 4px;
}

.collection-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.code-block {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.code-header {
    padding: 12px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.code-header i {
    margin-right: 8px;
    color: var(--accent-primary);
}

.code-block pre {
    padding: 20px;
    margin: 0;
    overflow-x: auto;
}

.code-block code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.8;
}

.phase-diagram {
    position: sticky;
    top: 120px;
}

.diagram-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: var(--transition-normal);
}

.diagram-container:hover {
    border-color: var(--accent-primary);
}

.diagram-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.diagram-caption {
    text-align: center;
    padding-top: 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.diagram-caption i {
    margin-right: 6px;
}

/* Mining Section */
.mining-overview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.mining-step {
    text-align: center;
    flex: 1;
    min-width: 150px;
}

.step-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.step-icon i {
    font-size: 1.5rem;
    color: white;
}

.mining-step h4 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.mining-step p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.step-arrow {
    color: var(--accent-primary);
    font-size: 1.5rem;
}

.params-section,
.transaction-section,
.cleaning-rules {
    margin-bottom: 40px;
}

.params-section h3,
.transaction-section h3,
.cleaning-rules h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    margin-bottom: 24px;
}

.params-section h3 i,
.transaction-section h3 i,
.cleaning-rules h3 i {
    color: var(--accent-primary);
}

.params-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.param-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.param-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.param-name {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent-primary);
}

.param-value {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 4px 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.param-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.transaction-example {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 16px;
}

.transaction-item {
    animation: fadeInUp 0.4s ease both;
}

.item-type {
    padding: 10px 18px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 500;
}

.item-type.subreddit {
    background: rgba(0, 180, 216, 0.15);
    color: var(--info);
    border: 1px solid rgba(0, 180, 216, 0.3);
}

.item-type.score {
    background: rgba(0, 210, 106, 0.15);
    color: var(--success);
    border: 1px solid rgba(0, 210, 106, 0.3);
}

.item-type.flag {
    background: rgba(255, 193, 7, 0.15);
    color: var(--warning);
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.transaction-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.rule-item i {
    color: var(--accent-primary);
    font-size: 1rem;
}

/* Results Section */
.results-section {
    padding: var(--section-padding);
    background: var(--bg-primary);
}

.benchmark-table {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 50px;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 20px 30px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.table-row:last-child {
    border-bottom: none;
}

.table-row:hover {
    background: var(--bg-tertiary);
}

.query-name {
    font-weight: 500;
}

.time-before {
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.time-after {
    color: var(--success);
    font-family: var(--font-mono);
}

.speedup-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(0, 210, 106, 0.15);
    color: var(--success);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9rem;
}

.speedup-badge.high {
    background: var(--accent-gradient);
    color: white;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition-normal);
}

.metric-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}

.metric-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.metric-icon i {
    font-size: 1.5rem;
    color: white;
}

.metric-value {
    font-size: 3rem;
    font-weight: 700;
    font-family: var(--font-mono);
    margin-bottom: 8px;
}

.metric-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.rule-examples h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    margin-bottom: 24px;
}

.rule-examples h3 i {
    color: var(--accent-primary);
}

.rules-showcase {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.rule-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
}

.rule-if,
.rule-then {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.rule-if {
    color: var(--text-secondary);
}

.rule-then {
    color: var(--text-primary);
}

.rule-item {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-family: var(--font-mono);
    color: var(--accent-primary);
}

.rule-metrics {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.rule-metrics .lift {
    color: var(--success);
    font-weight: 600;
}

/* Tech Section */
.tech-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.tech-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition-normal);
}

.tech-item:hover {
    border-color: var(--accent-primary);
    transform: translateY(-3px);
}

.tech-item i {
    font-size: 1.5rem;
    color: var(--accent-primary);
}

/* Footer */
.footer {
    padding: 60px 0 30px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    text-align: center;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-brand i {
    font-size: 2rem;
    color: var(--accent-primary);
}

.footer-text {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom i {
    color: var(--accent-primary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    padding: 40px;
    overflow: auto;
}

.modal.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--accent-primary);
}

.modal-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 12px;
}

.modal-caption {
    color: var(--text-secondary);
    margin-top: 20px;
    text-align: center;
}

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

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

/* Responsive */
@media (max-width: 1024px) {
    .phase-content {
        grid-template-columns: 1fr;
    }
    
    .phase-content.reverse {
        direction: ltr;
    }
    
    .phase-diagram {
        position: relative;
        top: 0;
    }
    
    .dataset-content {
        grid-template-columns: 1fr;
    }
    
    .rules-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 20px;
        gap: 10px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-normal);
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 30px;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .phase-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .phase-number {
        font-size: 3rem;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .table-header .table-col:not(:first-child) {
        display: none;
    }
    
    .table-row .table-col {
        display: flex;
        justify-content: space-between;
    }
    
    .table-row .table-col::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .rules-showcase {
        grid-template-columns: 1fr;
    }
    
    .rules-grid {
        grid-template-columns: 1fr;
    }
    
    .params-grid {
        grid-template-columns: 1fr;
    }
    
    .fields-grid {
        grid-template-columns: 1fr;
    }
    
    .collection-grid {
        grid-template-columns: 1fr;
    }
    
    .mining-overview {
        flex-direction: column;
    }
    
    .step-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 80px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

