/* ========== Outfit Font ========== */
@font-face {
    font-family: 'Outfit';
    src: url('../Outfit/Outfit-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-display: swap;
}

/* ========== Edge Vignette ========== */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 40;
    background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.45) 100%);
}
@media (max-width: 767px) {
    body::before {
        background: radial-gradient(ellipse at center, transparent 65%, rgba(0,0,0,0.3) 100%);
    }
}

/* ========== Base & Animations ========== */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ========== Gradients & Text Effects ========== */
.stat-number { background: linear-gradient(135deg, #60a5fa, #3b82f6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.gradient-text { background: linear-gradient(135deg, #93c5fd 0%, #3b82f6 50%, #60a5fa 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ========== Cards ========== */
.project-card { transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.project-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15); border-color: #3b82f6; }
.tool-card { transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer; }
.tool-card:hover { transform: translateY(-6px); box-shadow: 0 25px 50px rgba(59, 130, 246, 0.2); }

/* ========== Tags ========== */
.tag { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.2); color: #93c5fd; padding: 2px 10px; border-radius: 9999px; font-size: 0.75rem; font-weight: 500; display: inline-block; }
.tag-solana { background: rgba(153, 69, 255, 0.1); border-color: rgba(153, 69, 255, 0.3); color: #c084fc; }
.tag-evm { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.3); color: #93c5fd; }
.tag-tooling { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.3); color: #6ee7b7; }
.tag-near { background: rgba(0, 200, 150, 0.1); border-color: rgba(0, 200, 150, 0.3); color: #5eead4; }

/* Category color accents for project cards */
.project-card[data-category="solana"] { border-left: 3px solid rgba(153, 69, 255, 0.5); }
.project-card[data-category="evm"] { border-left: 3px solid rgba(59, 130, 246, 0.5); }
.project-card[data-category="tooling"] { border-left: 3px solid rgba(16, 185, 129, 0.5); }
.project-card[data-category="solana-tooling"] { border-left: none; position: relative; }
.project-card[data-category="solana-tooling"]::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(to bottom, #9945FF, #10b981); z-index: 1; }
.project-card[data-category="evm-tooling"] { border-left: none; position: relative; }
.project-card[data-category="evm-tooling"]::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(to bottom, #3b82f6, #10b981); z-index: 1; }

/* ========== Timeline ========== */
.timeline-dot { width: 12px; height: 12px; background: #3b82f6; border-radius: 50%; box-shadow: 0 0 20px rgba(59, 130, 246, 0.5); }

/* ========== Navigation ========== */
.nav-link { position: relative; }
.nav-link::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: #3b82f6; transition: width 0.3s ease; }
.nav-link:hover::after { width: 100%; }
#scroll-progress { position: fixed; top: 0; left: 0; height: 3px; background: linear-gradient(90deg, #3b82f6, #60a5fa); z-index: 9999; transition: width 0.1s linear; }

/* ========== Filters ========== */
.filter-btn.active { background: #3b82f6; color: white; }

/* ========== Mobile Menu ========== */
.mobile-menu { transform: translateX(100%); transition: transform 0.3s ease; }
.mobile-menu.open { transform: translateX(0); }

/* ========== Dividers ========== */
.section-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent); }

/* ========== Tooling Icons ========== */
.tooling-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.2); }

/* ========== Audit Tables ========== */
.audit-table { width: 100%; border-collapse: collapse; }
.audit-table th { text-align: left; padding: 12px 16px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; border-bottom: 1px solid rgba(59, 130, 246, 0.15); }
.audit-table td { padding: 12px 16px; font-size: 0.875rem; border-bottom: 1px solid rgba(30, 41, 59, 0.5); }
.audit-table tr:hover { background: rgba(59, 130, 246, 0.05); }
.audit-table a { color: #60a5fa; text-decoration: none; transition: color 0.2s; }
.audit-table a:hover { color: #93c5fd; text-decoration: underline; }

/* ========== Sub-tabs for Audits ========== */
.sub-tab { cursor: pointer; padding: 8px 20px; border-radius: 9999px; font-size: 0.875rem; font-weight: 500; transition: all 0.3s ease; border: 1px solid rgba(255,255,255,0.15); color: #94a3b8; background: transparent; }
.sub-tab:hover { background: rgba(59, 130, 246, 0.1); border-color: rgba(59,130,246,0.4); }
.sub-tab.active { background: #3b82f6; color: white; border-color: #3b82f6; }
.audit-panel { display: none; }
.audit-panel.active { display: block; }

/* ========== Research Tabs ========== */
.research-tab { cursor: pointer; padding: 8px 20px; border-radius: 9999px; font-size: 0.875rem; font-weight: 500; transition: all 0.3s ease; border: 1px solid rgba(255,255,255,0.15); color: #94a3b8; background: transparent; }
.research-tab:hover { background: rgba(59, 130, 246, 0.1); border-color: rgba(59,130,246,0.4); }
.research-tab.active { background: #3b82f6; color: white; border-color: #3b82f6; }
.research-panel { display: none; }
.research-panel.active { display: block; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ========== Tool Page Styles ========== */
.tool-page-hero { min-height: 40vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.tool-page-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.08) 0%, transparent 70%); }

.step-card { background: rgba(30, 41, 59, 0.6); border: 1px solid rgba(59, 130, 246, 0.1); border-radius: 12px; padding: 24px; transition: all 0.3s ease; }
.step-card:hover { border-color: rgba(59, 130, 246, 0.3); transform: translateY(-2px); }
.step-number { font-family: 'JetBrains Mono', monospace; font-size: 2rem; font-weight: 700; color: rgba(59, 130, 246, 0.3); margin-bottom: 8px; }

.feature-card { background: rgba(30, 41, 59, 0.5); border: 1px solid rgba(59, 130, 246, 0.1); border-radius: 12px; padding: 28px; transition: all 0.3s ease; }
.feature-card:hover { border-color: rgba(59, 130, 246, 0.3); transform: translateY(-3px); }
.feature-icon { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.2); color: #60a5fa; margin-bottom: 16px; }

.use-case-card { background: rgba(30, 41, 59, 0.5); border: 1px solid rgba(59, 130, 246, 0.1); border-radius: 12px; padding: 24px; }
.use-case-card h4 { color: white; font-size: 1.1rem; font-weight: 600; margin-bottom: 12px; }

/* ========== Back Link ========== */
.back-link { display: inline-flex; align-items: center; gap: 8px; color: #60a5fa; font-size: 0.875rem; transition: color 0.2s; }
.back-link:hover { color: #93c5fd; }

/* ========== Image Modal ========== */
.image-modal { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(8px); z-index: 100; align-items: center; justify-content: center; cursor: pointer; }
.image-modal.active { display: flex; }
.image-modal img { max-width: 90vw; max-height: 90vh; border-radius: 12px; box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5); }
.image-modal .close-btn { position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: white; font-size: 1.25rem; cursor: pointer; transition: background 0.2s; border: none; }
.image-modal .close-btn:hover { background: rgba(255, 255, 255, 0.2); }
.zoomable { cursor: pointer; transition: transform 0.3s ease; }
.zoomable:hover { transform: scale(1.02); }

/* ========== Tooling Card Variants ========== */
.tooling-solana { background: linear-gradient(135deg, rgba(120, 60, 200, 0.08) 0%, #141c2b 60%) !important; border-left: 2px solid rgba(168, 85, 247, 0.35) !important; box-shadow: inset 3px 0 12px -4px rgba(168, 85, 247, 0.15); }
.tooling-evm { background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, #141c2b 60%) !important; border-left: 2px solid rgba(59, 130, 246, 0.35) !important; box-shadow: inset 3px 0 12px -4px rgba(59, 130, 246, 0.15); }

/* ========== Nav Dropdown (Security) ========== */
.nav-dropdown-menu { opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease; pointer-events: none; }
.nav-dropdown:hover .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.nav-dropdown:hover .nav-dropdown-arrow { transform: rotate(180deg); }
.nav-dropdown:hover > a { color: white; }

/* ========== Scroll to Top ========== */
.scroll-top { position: fixed; bottom: 2rem; right: 2rem; width: 44px; height: 44px; background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.3); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #60a5fa; cursor: pointer; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease, background 0.2s ease, transform 0.2s ease; z-index: 90; backdrop-filter: blur(8px); }
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { background: rgba(59, 130, 246, 0.25); transform: translateY(-2px); }

/* ========== CTA Section ========== */
.cta-section { background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.02) 100%); border: 1px solid rgba(59, 130, 246, 0.15); border-radius: 16px; }

/* ========== Mobile View More (Projects) ========== */
.view-more-btn { display: none; }

@media (max-width: 767px) {
    /* Project cards: show only first 3 on mobile */
    .project-grid .project-card:nth-child(n+4) { display: none; }
    .project-grid.expanded .project-card:nth-child(n+4) { display: block; }
    .view-more-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px; margin-top: 16px; background: rgba(59, 130, 246, 0.08); border: 1px solid rgba(59, 130, 246, 0.2); border-radius: 12px; color: #60a5fa; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.3s ease; }
    .view-more-btn:hover { background: rgba(59, 130, 246, 0.15); border-color: rgba(59, 130, 246, 0.4); }
    .view-more-btn svg { transition: transform 0.3s ease; }
    .view-more-btn.expanded svg { transform: rotate(180deg); }

    /* Reduce section padding on mobile */
    .py-24 { padding-top: 4rem; padding-bottom: 4rem; }

    /* Audit tables: smaller text & padding */
    .audit-table th { padding: 8px 10px; font-size: 0.65rem; }
    .audit-table td { padding: 8px 10px; font-size: 0.8rem; }

    /* Sub-tabs: scrollable horizontally */
    .sub-tabs-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; flex-wrap: nowrap !important; }
    .sub-tabs-wrap::-webkit-scrollbar { display: none; }
    .sub-tab { white-space: nowrap; padding: 8px 14px; font-size: 0.8rem; flex-shrink: 0; }

    /* Filter buttons: scrollable */
    .filter-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; flex-wrap: nowrap !important; }
    .filter-wrap::-webkit-scrollbar { display: none; }
    .filter-btn { flex-shrink: 0; }

    /* Tool cards: stack to single column */
    .tool-grid-3 { grid-template-columns: 1fr !important; }

    /* Research tabs: scrollable */
    .research-tabs-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; flex-wrap: nowrap !important; }
    .research-tabs-wrap::-webkit-scrollbar { display: none; }
    .research-tab { white-space: nowrap; padding: 8px 14px; font-size: 0.8rem; flex-shrink: 0; }

    /* Paper preview: shorter on mobile */
    .paper-preview { height: 250px !important; }

    /* Contact cards: smaller */
    .contact-links { gap: 12px !important; }
    .contact-links a { padding: 12px 16px !important; }

    /* Scroll to top: smaller on mobile */
    .scroll-top { width: 40px; height: 40px; bottom: 1.25rem; right: 1.25rem; }
}
