:root {
    --bg-dark: #000000;
    --bg-pane: #050505;
    --bento-bg: rgba(255, 255, 255, 0.03);
    --bento-border: rgba(255, 255, 255, 0.08);
    --bento-hover: rgba(255, 255, 255, 0.05);

    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;

    --accent: #e2e8f0;
    --accent-orange: #ff6b00;
    --accent-glow: rgba(255, 107, 0, 0.15);

    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-dark);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background animated mesh */
.mesh-bg {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 40% 60%, rgba(255, 107, 0, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 70% 30%, rgba(255, 80, 0, 0.03) 0%, transparent 30%);
    z-index: -1;
    pointer-events: none;
    animation: slow-drift 25s linear infinite alternate;
}

@keyframes slow-drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-3%, 3%) scale(1.05);
    }
}

/* Base Layout Structure (Split Pane) */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* == LEFT PANE (Fixed Editorial) == */
.fixed-pane {
    width: 35%;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--bg-pane);
    z-index: 10;
}

.pane-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo-img {
    height: 32px;
    width: auto;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.brand:hover .logo-img {
    transform: rotate(180deg);
}

.badge {
    font-size: 0.7rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--bento-border);
    border-radius: 100px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--accent-orange);
}

.headline {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3vw, 3.2rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
    color: var(--text-main);
}

.headline span {
    color: var(--accent-orange);
}

.description {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 340px;
    margin-bottom: auto;
    line-height: 1.7;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    font-family: var(--font-heading);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    width: fit-content;
    padding: 8px 16px;
    margin-left: -16px;
    border-radius: 8px;
}

.nav-link i {
    width: 18px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--text-main);
    background: rgba(255, 107, 0, 0.05);
}

.nav-link:hover i {
    opacity: 1;
    transform: translateX(4px);
    color: var(--accent-orange);
}

.footer-note {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
}

/* == RIGHT PANE (Bento Grid Area) == */
.scroll-pane {
    width: 65%;
    padding: 60px 40px;
    background: var(--bg-dark);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(200px, auto);
    gap: 24px;
}

.bento-cell {
    background: var(--bento-bg);
    border: 1px solid var(--bento-border);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, border-color 0.3s ease, box-shadow 0.4s ease;
}

/* Interactive Hover States */
.bento-cell:hover {
    background: var(--bento-hover);
    transform: translateY(-4px);
    border-color: rgba(255, 107, 0, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-glow);
}

.cell-span-2 {
    grid-column: span 2 / span 2;
}

/* Introduction Cells (Titles) */
.intro-cell {
    grid-row: span 1;
    background: transparent !important;
    border: none;
    padding: 10px 0;
    justify-content: flex-end;
}

.intro-cell:hover {
    transform: none;
    box-shadow: none;
}

.cell-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.intro-cell p {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 500px;
    line-height: 1.6;
}

/* Default Bento Content Styling */
.cell-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 1px solid var(--bento-border);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cell-icon i {
    width: 20px;
    height: 20px;
    color: var(--text-main);
    transition: all 0.3s ease;
}

/* Icon Interactiveness */
.bento-cell:hover .cell-icon {
    background: var(--accent-orange);
    border-color: var(--accent-orange);
}

.bento-cell:hover .cell-icon i {
    color: #fff;
    transform: scale(1.1);
}

.bento-cell h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.bento-cell p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
    /* Pushes tags to bottom smoothly */
}

.tech-tags {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tags span {
    font-size: 0.7rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 100px;
    color: var(--text-muted);
    border: 1px solid var(--bento-border);
    transition: all 0.3s ease;
}

.bento-cell:hover .tech-tags span {
    color: var(--accent-orange);
    border-color: rgba(255, 107, 0, 0.2);
    background: rgba(255, 107, 0, 0.05);
}

/* Ambient Inner Glows for Cards */
.bento-cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 107, 0, 0.05) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.bento-cell:hover::before {
    opacity: 1;
}

/* === NEW BEGINNER CELL === */
.beginner-cell {
    flex-direction: row;
    align-items: center;
    gap: 24px;
    padding: 30px 40px;
    background: rgba(255, 107, 0, 0.05);
    border-color: rgba(255, 107, 0, 0.2);
}

.beginner-cell:hover {
    background: rgba(255, 107, 0, 0.08);
    transform: translateY(-2px);
}

.beginner-icon {
    width: 64px;
    height: 64px;
    background: var(--accent-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.beginner-icon i {
    color: #000;
    width: 32px;
    height: 32px;
}

.beginner-text h3 {
    margin-bottom: 8px;
    color: var(--accent-orange);
    font-size: 1.4rem;
}

.beginner-text p {
    margin-bottom: 0;
    color: var(--text-main);
    font-size: 1rem;
}

/* === NEW UNIFIED TEAM CELL === */
.unified-team-cell {
    padding: 40px;
    gap: 40px;
}

.team-tier {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tier-label {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--bento-border);
    padding-bottom: 12px;
    margin-bottom: 0;
}

.tier-members {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.team-member {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--bento-border);
    padding: 16px 20px;
    border-radius: 16px;
    flex: 1 1 200px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.team-member:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 107, 0, 0.3);
    transform: translateY(-2px);
}

.team-member img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.team-member:hover img {
    transform: scale(1.05);
}

.member-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.member-info h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 2px;
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-member:hover h4 {
    color: var(--accent-orange);
}

.member-info .role {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-email {
    font-size: 0.8rem;
    color: var(--text-main);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    opacity: 0.7;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-email:hover {
    opacity: 1;
    color: var(--accent-orange);
}

.member-email i {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Join Impact Cell */
.join-cell {
    background: rgba(255, 107, 0, 0.1);
    border: 1px solid rgba(255, 107, 0, 0.2);
    color: #fff;
    align-items: center;
    text-align: center;
    justify-content: center;
    padding: 60px 40px;
}

.join-cell:hover {
    background: rgba(255, 107, 0, 0.15);
    border-color: rgba(255, 107, 0, 0.4);
    transform: scale(1.01) translateY(-2px);
}

.join-cell h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.join-cell p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    max-width: 460px;
    margin: 0 auto 28px;
    line-height: 1.6;
}

.primary-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent-orange);
    color: #000;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.primary-action-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 24px rgba(255, 107, 0, 0.3);
    background: #ff8533;
}

.primary-action-btn i {
    width: 16px;
    transition: transform 0.3s ease;
}

.primary-action-btn:hover i {
    transform: translateX(4px);
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .fixed-pane {
        width: 40%;
        padding: 40px 30px;
    }

    .scroll-pane {
        width: 60%;
        padding: 40px 30px;
    }
}

@media (max-width: 992px) {
    .layout-wrapper {
        flex-direction: column;
    }

    .fixed-pane {
        width: 100%;
        height: auto;
        position: relative;
        padding: 40px 5%;
        border-right: none;
        border-bottom: 1px solid var(--bento-border);
    }

    .scroll-pane {
        width: 100%;
        padding: 40px 5%;
    }

    /* Modal System */
    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(3, 3, 3, 0.9);
        backdrop-filter: blur(10px);
        z-index: 10000;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        opacity: 0;
        visibility: hidden;
    }

    .modal-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .modal-content {
        background: #09090b;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 24px;
        padding: 40px;
        text-align: center;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
        max-width: 400px;
        width: 90%;
        transform: scale(0.95);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .modal-overlay.active .modal-content {
        transform: scale(1);
    }

    .modal-close {
        position: absolute;
        top: 16px;
        right: 16px;
        background: none;
        border: none;
        color: #a1a1aa;
        cursor: pointer;
        padding: 8px;
        transition: color 0.2s;
    }

    .modal-close:hover {
        color: #fff;
    }

    .code-box {
        background: rgba(255, 255, 255, 0.03);
        border: 1px dashed rgba(255, 255, 255, 0.2);
        border-radius: 12px;
        padding: 24px;
        margin: 24px 0;
        cursor: pointer;
        transition: background 0.2s;
    }

    .description {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .cell-span-2 {
        grid-column: span 1;
    }

    .beginner-cell {
        flex-direction: column;
        text-align: center;
    }

    .headline {
        font-size: 2.2rem;
    }

    .join-cell {
        padding: 40px 20px;
    }
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 3, 3, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #09090b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 90%;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #a1a1aa;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #fff;
}

.code-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    cursor: pointer;
    transition: background 0.2s;
}

.code-box:hover {
    background: rgba(255, 255, 255, 0.06);
}

.code-text {
    font-family: monospace;
    font-size: 2.2rem;
    letter-spacing: 0.15em;
    color: #fff;
    font-weight: 600;

    .description {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .cell-span-2 {
        grid-column: span 1;
    }

    .beginner-cell {
        flex-direction: column;
        text-align: center;
    }

    .headline {
        font-size: 2.2rem;
    }

    .join-cell {
        padding: 40px 20px;
    }
}