:root {
    scroll-behavior: smooth;
    /* Primary Colors - Electric Cyber Palette */
    --primary: #7B61FF;
    /* Electric Purple */
    --primary-light: #9D8AFF;
    --secondary: #00F2FF;
    /* Cyber Cyan */
    --accent: #FF2D95;
    /* Neon Pink */
    --success: #00FF94;
    /* Matrix Green */

    /* Backgrounds */
    --bg-dark: #05070A;
    /* Deep Void */
    --bg-card: rgba(23, 26, 35, 0.4);
    --bg-glass: rgba(123, 97, 255, 0.03);

    /* Text Colors */
    --text-main: #FFFFFF;
    --text-muted: #A0AEC0;
    --text-dim: #64748B;

    /* Borders & Dividers */
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-primary: rgba(123, 97, 255, 0.3);
    --border-secondary: rgba(0, 242, 255, 0.3);
    --cyber-grid-color: rgba(255, 255, 255, 0.03);

    /* Effects */
    --glow-primary: 0 0 15px rgba(123, 97, 255, 0.4);
    --glow-secondary: 0 0 15px rgba(0, 242, 255, 0.4);
    --glass-blur: blur(12px);

    /* Fonts */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode Overrides */
body.light-mode {
    --bg-dark: #F5F7FA;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-glass: rgba(108, 99, 255, 0.05);

    --text-main: #1A202C;
    --text-muted: #4A5568;
    --text-dim: #718096;

    --border-glass: rgba(0, 0, 0, 0.06);
    --border-primary: rgba(108, 99, 255, 0.2);

    --cyber-grid-color: rgba(0, 0, 0, 0.03);

    --glow-primary: 0 0 15px rgba(108, 99, 255, 0.15);
    --glow-secondary: 0 0 15px rgba(0, 242, 255, 0.15);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
    background-clip: content-box;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

.cyber-grid {
    display: none;
}

body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 20% 30%, rgba(123, 97, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0, 242, 255, 0.05) 0%, transparent 40%);
    background-size: 100% 100%, 100% 100%;
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
    font-size: 16px;
    /* Mobile base */
}

@media screen and (min-width: 768px) {
    body {
        font-size: 18px;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
}

code,
pre {
    font-family: var(--font-mono);
}

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

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

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

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

/* Glassmorphism Classes */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition-smooth);
    position: relative;
}

.glass-card::before,
.glass-card::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1px solid transparent;
    opacity: 0;
    transition: var(--transition-smooth);
}

.glass-card::before {
    top: -1px;
    left: -1px;
    border-top-color: var(--secondary);
    border-left-color: var(--secondary);
}

.glass-card::after {
    bottom: -1px;
    right: -1px;
    border-bottom-color: var(--secondary);
    border-right-color: var(--secondary);
}

.glass-card:hover {
    border-color: var(--border-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), var(--glow-primary);
}

/* HUD Decorative Corners */
.hud-corner {
    position: absolute;
    width: 15px;
    height: 15px;
    border: 2px solid var(--secondary);
    opacity: 0.6;
}

.hud-corner.top-left {
    top: 10px;
    left: 10px;
    border-right: none;
    border-bottom: none;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid var(--border-glass);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.toggle-slider {
    background-color: var(--primary);
}

input:checked+.toggle-slider:before {
    transform: translateX(24px);
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 15, 25, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.75rem 0;
    /* Tighter on mobile */
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: -0.5px;
}

.logo-text .highlight {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-links a:hover {
    color: var(--text-main);
}

/* Buttons */
.btn {
    padding: 0.8rem 1.75rem;
    /* Larger tap target */
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
    font-family: var(--font-body);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    /* App-like touch target */
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #05070A;
    box-shadow: var(--glow-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(123, 97, 255, 0.6);
    filter: brightness(1.1);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(5px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--secondary);
    color: var(--secondary);
    box-shadow: var(--glow-secondary);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 12rem 0 8rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--primary);
    filter: blur(120px);
    opacity: 0.15;
    border-radius: 50%;
}

.blob-1 {
    top: -100px;
    right: -100px;
    background: var(--primary);
}

.blob-2 {
    bottom: -100px;
    left: -100px;
    background: var(--secondary);
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary-light);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(108, 99, 255, 0.2);
}

.hero-text h1 {
    font-size: 2.5rem;
    /* Mobile first */
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    font-weight: 800;
}

@media screen and (min-width: 768px) {
    .hero-text h1 {
        font-size: 3.5rem;
        font-weight: 800;
        letter-spacing: -1.5px;
    }
}

@media screen and (min-width: 1024px) {
    .hero-text h1 {
        font-size: 4.5rem;
        font-weight: 800;
        letter-spacing: -2px;
    }
}

.gradient-text {
    background: linear-gradient(135deg, #7B61FF, #00F2FF, #FF2D95);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
    margin-bottom: 4rem;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.trust-stats {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-val {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* Hero Visual */
.hero-image-container {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), var(--glow-primary);
    border: 1px solid var(--border-primary);
}

.hero-image {
    width: 100%;
    display: block;
    transition: var(--transition-smooth);
}

.glow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(108, 99, 255, 0.2), transparent);
    pointer-events: none;
}

/* Features Section */
.features {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    margin-bottom: 4rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.feature-item h3 {
    margin-bottom: 1rem;
}

.feature-item p {
    color: var(--text-muted);
}

/* Notes Explorer */
.notes-explorer {
    padding: 6rem 0;
}

.alternate-bg {
    background: rgba(255, 255, 255, 0.02);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
}

/* Notes Hub Styling */
.notes-hub-container {
    max-width: 1000px;
    margin: 0 auto 4rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.notes-search-wrapper {
    position: relative;
    width: 100%;
}

.notes-search-wrapper input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    padding: 1.25rem 1.5rem 1.25rem 3.5rem;
    border-radius: 16px;
    color: var(--text-main);
    font-size: 1.1rem;
    outline: none;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
}

.notes-search-wrapper input:focus {
    border-color: var(--primary);
    background: rgba(108, 99, 255, 0.05);
    box-shadow: 0 0 20px rgba(108, 99, 255, 0.2);
}

.search-btn-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.6;
}

.filter-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 1.5rem 2rem;
}

/* Notes Grid Enhancement */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.note-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.note-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    opacity: 0.5;
}

.note-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary-light);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.note-subject-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.dashboard-body {
    background: var(--bg-dark);
    height: 100vh;
    overflow: hidden;
    color: var(--text-main);
}

.note-card h3 {
    font-size: 1.4rem;
    line-height: 1.4;
    margin-bottom: 1.25rem;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: auto 0 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-glass);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.stat-icon-label {
    font-size: 1.1rem;
}

.stat-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.note-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

.note-actions {
    display: flex;
    gap: 1rem;
}

.note-actions .btn {
    flex: 1;
    font-size: 0.9rem;
    padding: 0.8rem 1rem;
}

/* Footer */
.footer {
    padding: 4rem 0 2rem;
    background: #05070a;
    border-top: 1px solid var(--border-glass);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: var(--text-dim);
    margin-top: 1rem;
    max-width: 300px;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .footer-links {
        gap: 2rem;
        flex-direction: column;
    }
}

.link-group h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.link-group a {
    display: block;
    color: var(--text-dim);
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: var(--transition-fast);
}

.link-group a:hover {
    color: var(--text-main);
}

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

.note-meta {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px dashed var(--border-glass);
}

/* Live Stats Section */
.live-stats {
    padding: 6rem 0;
}

.stats-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    text-align: center;
    padding: 4rem 2rem;
}

.stat-box h3 {
    font-size: 2.5rem;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
}

.stat-box p {
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .hero-text p {
        margin: 0 auto 2rem;
        font-size: 1.1rem;
    }

    .hero-cta {
        justify-content: center;
    }

    .trust-stats {
        justify-content: center;
    }

    .hero-visual {
        max-width: 600px;
        margin: 0 auto;
    }
}

/* Mobile Navigation Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
    padding: 8px;
    margin-right: -4px;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-main);
    transition: var(--transition-smooth);
    border-radius: 2px;
}

.mobile-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(5, 7, 10, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: var(--transition-smooth);
        z-index: 1000;
        border-left: 1px solid var(--border-glass);
    }

    .nav-links.active {
        right: 0;
    }

    .hero {
        padding: 6rem 0 3rem;
    }

    .features {
        padding: 4.5rem 0;
    }

    .hero-content {
        gap: 2rem;
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .trust-stats {
        gap: 2rem;
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 1.5rem;
    }

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

    .filter-bar {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .notes-hub-container {
        padding: 0 1rem;
    }

    .notes-search-wrapper input {
        padding: 1rem 1rem 1rem 3rem;
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2.5rem;
    }

    .features-grid,
    .pricing-grid {
        gap: 1.5rem;
    }

    .glass-card {
        padding: 1.25rem;
    }

    .stat-box h3 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2.2rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .nav-content {
        padding: 0 1rem;
    }

    .footer-content {
        padding: 0 1rem;
        gap: 2.5rem;
    }

    .pricing-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .price {
        font-size: 2rem !important;
    }
}


/* Grid Layouts */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media screen and (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }
}

/* Utility Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* FAQ Section */
.faq-section {
    padding-bottom: 6rem;
}

.faq-container {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    /* Remove padding to let items touch edges or handle internal padding */
    border: 1px solid var(--border-glass);
}

.faq-item {
    border-bottom: 1px solid var(--border-glass);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
    transition: var(--transition-fast);
}

.faq-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.faq-header h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
    margin: 0;
}

.faq-toggle {
    font-size: 1.5rem;
    color: var(--primary);
    transition: var(--transition-smooth);
    line-height: 1;
}

.faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
    background: rgba(0, 0, 0, 0.1);
}

.faq-body p {
    padding: 1.5rem 2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
    color: var(--secondary);
}

.faq-item.active .faq-body {
    transition: max-height 0.3s cubic-bezier(1, 0, 1, 0);
}

/* Ensure scrollbar looks good inside the card */
.faq-container::-webkit-scrollbar {
    width: 6px;
}

.faq-container::-webkit-scrollbar-track {
    background: transparent;
    margin: 10px 0;
}

.faq-container::-webkit-scrollbar-thumb {
    background: var(--border-glass);
    border-radius: 3px;
}

.faq-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* --- Advanced Footer Styles --- */

.footer-intel-signal {
    font-size: 0.8rem;
    color: var(--secondary);
    margin-top: 0.5rem;
    font-weight: 500;
    font-family: var(--font-mono);
    opacity: 0.9;
}

.footer-dynamic-stats {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-legal-notice {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.7;
}

#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

@media (max-width: 768px) {
    #back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

#back-to-top:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

.link-group a {
    position: relative;
    display: table;
    /* Allows independent width */
}

.link-group a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--secondary);
    transition: width 0.3s ease;
}

.link-group a:hover::after {
    width: 100%;
}

.link-group a:hover {
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(108, 99, 255, 0.3);
}

/* Footer structure tweaks */
.footer-bottom .container {
    border-top: 1px solid var(--border-glass);
    padding-top: 1.5rem;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-links {
        gap: 2rem;
        flex-direction: column;
    }

    .footer-bottom .container {
        flex-direction: column;
        text-align: center;
        padding-bottom: 4rem;
    }
}

/* --- Founders Section --- */
#founders {
    position: relative;
    z-index: 10;
}

.founders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    perspective: 1000px;
}

/* Founder Card Container */
.founder-card {
    background: transparent;
    width: 100%;
    height: 400px;
    cursor: pointer;
    perspective: 1000px;
    position: relative;
    border-radius: 24px;
    transition: transform 0.3s ease;
}

/* Moving Border Glow for Card */
.founder-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 26px;
    padding: 2px;
    background: conic-gradient(from var(--angle, 0deg), transparent 70%, var(--primary, #00F2FF));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: rotate 4s linear infinite;
    pointer-events: none;
}

.founder-card:hover::before {
    opacity: 1;
}

@property --angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

@keyframes rotate {
    to {
        --angle: 360deg;
    }
}

/* Inner Card Styling */
.founder-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.founder-card:hover .founder-inner {
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 20px -5px var(--primary-glow, rgba(0, 242, 255, 0.5));
}

/* Founder Front - Centering */
.founder-front {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    z-index: 2;
}

/* 3D Photo Container */
.founder-img-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    margin-bottom: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    perspective: 800px;
    box-shadow: 0 0 50px -10px rgba(0, 0, 0, 0.5);
    animation: float-photo 6s ease-in-out infinite;
}

.founder-img-wrapper img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 15%;
    z-index: 5;
    position: relative;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5) inset;
    transform: translateZ(10px);
    filter: contrast(1.1) brightness(1.1) saturate(1.15);
    transition: all 0.3s ease;
}

.founder-card:hover .founder-img-wrapper img {
    filter: contrast(1.15) brightness(1.2) saturate(1.2);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.4) inset;
}

@keyframes float-photo {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Runnable 'Snake' Light - Inner Ring */
.founder-border-glow {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0%, transparent 40%, var(--primary, #00F2FF) 50%, #fff 55%, transparent 60%);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 3px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 3px));
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
    animation: spin 3s linear infinite;
    z-index: 4;
}

/* 3D Satellite Orbit - Outer Ring geometry */
.founder-border-ring {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transform-style: preserve-3d;
    animation: orbit-spin 6s linear infinite;
    z-index: 3;
}

/* The Satellite/Planet orbiting */
.founder-border-ring::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -6px;
    width: 12px;
    height: 12px;
    background: var(--secondary, #7B61FF);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--secondary-glow, #7B61FF80), 0 0 20px var(--secondary, #7B61FF);
    transform: translateY(-50%);
}

/* Second Satellite on opposite side */
.founder-border-ring::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -6px;
    width: 8px;
    height: 8px;
    background: var(--primary, #00F2FF);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-glow, #00F2FF80);
    transform: translateY(-50%);
}

@keyframes orbit-spin {
    from {
        transform: rotateZ(0deg) rotateX(60deg);
    }

    to {
        transform: rotateZ(360deg) rotateX(60deg);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Typography */
.founder-front h3 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-main, #ffffff);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.5px;
}

.founder-front .role {
    font-size: 0.95rem;
    color: var(--primary, #00F2FF);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0;
}

.tap-hint {
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.7));
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.founder-card:hover .tap-hint {
    opacity: 1;
    color: white;
}

/* --- High-Tech Founder Modal --- */
.founder-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 7, 18, 0.9);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.founder-modal.active {
    opacity: 1;
    visibility: visible;
}

.founder-content {
    width: 95%;
    max-width: 520px;
    background: #0B0E14;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    overflow: hidden;
    transform: scale(0.9) translateY(30px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: none;
}

.founder-content::-webkit-scrollbar {
    display: none;
}

.founder-content.active {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    cursor: pointer;
    z-index: 100;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: rotate(90deg);
}

.modal-header-bg {
    height: 180px;
    background: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=1000&auto=format&fit=crop') center/cover no-repeat;
    position: relative;
}

.modal-header-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(11, 14, 20, 0) 40%, #0B0E14 100%);
}

.modal-body {
    padding: 0 2rem 2.5rem;
    margin-top: -65px;
    position: relative;
}

.modal-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}

.modal-profile-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: #1a1e26;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    perspective: 800px;
    z-index: 5;
}

.modal-profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5) inset;
    transform: translateZ(10px);
    z-index: 5;
    position: relative;
}

.modal-socials {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.social-btn {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #A0AEC0;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.social-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.modal-info {
    margin-bottom: 20px;
}

.modal-info h2 {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 5px;
    font-weight: 700;
}

.modal-info .role {
    font-size: 0.95rem;
    color: #00F2A6;
    font-weight: 500;
    margin-bottom: 25px;
    letter-spacing: 0;
    text-transform: none;
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 1.1rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.modal-section h4 i {
    font-size: 1.1rem;
}

.modal-section p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s;
}

.skill-tag:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

@media (max-width: 768px) {
    .founders-grid {
        gap: 2rem;
        grid-template-columns: 1fr;
    }

    .founder-card {
        padding: 0;
    }

    .founder-content {
        max-width: 100%;
        border-radius: 20px;
    }

    .modal-body {
        padding: 0 1.5rem 2rem;
    }

    .modal-profile-header {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        margin-top: -50px;
    }

    .modal-socials {
        margin-bottom: 0;
    }

    .modal-info {
        text-align: center;
    }

    .modal-info h2 {
        font-size: 1.8rem;
    }
}

/* Additive CSS for Mobile Close Buttons - Simple Cross */
.mobile-close-btn,
.sidebar-close-btn {
    display: none;
    position: absolute;
    top: 55px;
    /* Shifted lower to align right beside the NOTES text */
    right: 20px;
    left: auto;
    width: 36px;
    height: 36px;
    font-size: 2.5rem;
    color: var(--primary);
    text-shadow: 0 0 12px var(--primary), 0 0 24px var(--primary);
    /* Intense purple glow */
    background: transparent;
    border: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1050;
    line-height: 0;
    font-weight: 800;
    /* Bold effect */
    transition: var(--transition-fast);
}

@keyframes crossAppear {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-90deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.sidebar.active .sidebar-close-btn,
.nav-links.active .mobile-close-btn {
    animation: crossAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.mobile-close-btn:hover,
.sidebar-close-btn:hover {
    color: var(--primary-light);
    transform: scale(1.1);
}

@media (max-width: 768px) {

    .mobile-close-btn,
    .sidebar-close-btn {
        display: flex;
        /* Changed from block to flex for perfect centering */
    }
}