/* ============================================================
   FOUNDER.CSS — BAB Dynamics
   Page: founder.html
   Sections: Founder Hero · 3D Timeline · Biography
   Depends on: main.css (variables), nav.css
   ============================================================ */

/* ════════════════════════════════════════════════════════════
   1. FOUNDER HERO
   ════════════════════════════════════════════════════════════ */

.founder-hero-section {
    position: relative;
    z-index: var(--z-base);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 24px 100px;
}

.founder-hero-content {
    display: grid;
    grid-template-columns: minmax(280px, 420px) 1fr;
    gap: 72px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
    width: 100%;
}

/* ── PHOTO COLUMN ───────────────────────────────────────────── */

.founder-photo-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.photo-frame {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: var(--dark-2);
    border: 1px solid var(--border);
    box-shadow:
        0 0 60px rgba(0, 210, 255, 0.08),
        0 30px 60px rgba(0, 0, 0, 0.4);
}

.founder-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: contrast(1.02) saturate(1.05);
    transition: transform var(--transition-slow);
}

.photo-frame:hover .founder-photo {
    transform: scale(1.025);
}

/* Inner ambient glow on photo */
.photo-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 60%,
        rgba(0, 210, 255, 0.08) 100%
    );
    pointer-events: none;
}

/* Scan line sweep */
.photo-scan-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--primary) 35%,
        var(--primary) 65%,
        transparent
    );
    box-shadow: 0 0 16px var(--primary-glow);
    opacity: 0.55;
    animation: photoScan 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes photoScan {
    0%, 100% { top: 0%;   opacity: 0.55; }
    50%       { top: 100%; opacity: 0.15; }
}

/* Corner brackets */
.photo-corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: var(--primary);
    border-style: solid;
    border-width: 0;
    opacity: 0.9;
    pointer-events: none;
    transition: width var(--transition-base), height var(--transition-base);
}

.photo-frame:hover .photo-corner {
    width: 30px;
    height: 30px;
}

.photo-corner.tl { top: 10px;    left: 10px;   border-top-width: 2px;    border-left-width: 2px; }
.photo-corner.tr { top: 10px;    right: 10px;  border-top-width: 2px;    border-right-width: 2px; }
.photo-corner.bl { bottom: 10px; left: 10px;   border-bottom-width: 2px; border-left-width: 2px; }
.photo-corner.br { bottom: 10px; right: 10px;  border-bottom-width: 2px; border-right-width: 2px; }

/* Location strip under photo */
.founder-location {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--text-muted);
    text-transform: uppercase;
    text-align: center;
    padding: 10px 14px;
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-sm);
    background: var(--glass);
}

/* ── INFO COLUMN ────────────────────────────────────────────── */

.founder-info-col {
    display: flex;
    flex-direction: column;
}

.founder-designation {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 5px;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 18px;
    opacity: 0.85;
}

.founder-name {
    font-family: var(--font-display);
    font-size: clamp(44px, 7vw, 80px);
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: 2px;
    color: var(--text-primary);
    margin-bottom: 18px;
}

.founder-name span {
    background: linear-gradient(135deg, var(--primary) 30%, var(--gold) 110%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 28px rgba(0, 210, 255, 0.25));
}

.founder-tagline {
    font-family: var(--font-body);
    font-size: clamp(15px, 2vw, 19px);
    font-weight: 600;
    letter-spacing: 2.5px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 36px;
}

/* ── STATS ROW ──────────────────────────────────────────────── */

.founder-stats {
    display: flex;
    gap: 0;
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-sm);
    background: var(--glass);
    margin-bottom: 40px;
    overflow: hidden;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 22px 12px;
    position: relative;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: var(--border-dim);
}

.stat-val {
    font-family: var(--font-display);
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 900;
    color: var(--primary);
    text-shadow: 0 0 22px var(--primary-glow);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-lbl {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ── SOCIAL GRID ────────────────────────────────────────────── */

.founder-socials {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.socials-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 4px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.socials-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 18px;
    background: var(--glass);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition:
        border-color var(--transition-base),
        color var(--transition-base),
        background var(--transition-base),
        transform var(--transition-fast),
        box-shadow var(--transition-base);
}

.social-btn:hover,
.social-btn:focus-visible {
    border-color: var(--primary);
    color: var(--text-primary);
    background: var(--primary-dim);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 210, 255, 0.12);
}

.social-btn .social-icon { font-size: 15px; line-height: 1; }

.social-btn-youtube:hover,
.social-btn-youtube:focus-visible {
    border-color: #ff4444;
    background: rgba(255, 68, 68, 0.08);
    box-shadow: 0 8px 24px rgba(255, 68, 68, 0.12);
}

/* ════════════════════════════════════════════════════════════
   2. TIMELINE — THE JOURNEY
   Vertical line with alternating cards.
   .tl-node-visible added by IntersectionObserver (inline JS).
   Line fill height driven by scroll.
   ════════════════════════════════════════════════════════════ */

.timeline-section {
    position: relative;
    z-index: var(--z-base);
    padding: var(--space-xl) 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.timeline-track {
    position: relative;
    padding: 40px 0 20px;
}

/* The central spine */
.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
    background: var(--border-dim);
    overflow: hidden;
}

.timeline-line-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--primary), var(--gold));
    box-shadow: 0 0 12px var(--primary-glow);
    transition: height 0.15s linear;
}

/* ── NODE ───────────────────────────────────────────────────── */

.tl-node {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 90px;
}

.tl-node:last-child { margin-bottom: 0; }

/* Dot on the spine */
.tl-node-dot {
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translate(-50%, 0);
    width: 18px;
    height: 18px;
    z-index: 2;
}

.tl-dot-inner {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--dark-3);
    border: 1px solid var(--border);
    transition:
        background var(--transition-base),
        border-color var(--transition-base),
        box-shadow var(--transition-base);
}

.tl-dot-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid transparent;
    transition: border-color var(--transition-base);
}

/* Node activated */
.tl-node-visible .tl-dot-inner {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 18px var(--primary-glow);
}

.tl-node-visible .tl-dot-ring {
    border-color: rgba(0, 210, 255, 0.35);
    animation: dotRingPulse 2.4s ease-in-out infinite;
}

@keyframes dotRingPulse {
    0%, 100% { transform: scale(1);    opacity: 1; }
    50%       { transform: scale(1.45); opacity: 0.25; }
}

/* Final node — gold accent */
.tl-node:last-child.tl-node-visible .tl-dot-inner {
    background: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 0 18px rgba(245, 166, 35, 0.5);
}

/* ── NODE CARD ──────────────────────────────────────────────── */

.tl-node-card {
    width: calc(50% - 56px);
    background: var(--glass);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 30px 32px;
    opacity: 0;
    transition:
        opacity 0.7s ease,
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        border-color var(--transition-base);
}

/* Left / right alternation */
.tl-node-card.tl-left  { margin-right: auto; transform: translateX(-36px); }
.tl-node-card.tl-right { margin-left: auto;  transform: translateX(36px);  }

/* Activated state */
.tl-node-visible .tl-node-card {
    opacity: 1;
    transform: translateX(0);
    border-color: var(--border);
}

.tl-node-card:hover {
    border-color: var(--primary);
}

.tl-node-marker {
    font-size: 22px;
    margin-bottom: 12px;
    line-height: 1;
}

.tl-node-title {
    font-family: var(--font-display);
    font-size: clamp(17px, 2.4vw, 22px);
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.tl-node-subtitle {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2.5px;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 14px;
}

.tl-node-body {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-secondary);
    margin: 0;
}

/* ════════════════════════════════════════════════════════════
   3. BIOGRAPHY — THE STORY
   Long-form reading layout. Optimised line length (~68ch),
   generous leading. The founder's words carry this section;
   the styling stays quiet.
   ════════════════════════════════════════════════════════════ */

.biography-section {
    position: relative;
    z-index: var(--z-base);
    padding: var(--space-xl) 24px;
}

.biography-wrap {
    max-width: 760px;
    margin: 0 auto;
    background: rgba(8, 15, 30, 0.55);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-md);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: clamp(36px, 6vw, 72px);
    position: relative;
    overflow: hidden;
}

/* Top accent line */
.biography-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--gold), transparent);
}

.biography-text p {
    font-size: clamp(16px, 1.8vw, 18px);
    line-height: 1.95;
    color: var(--text-secondary);
    margin-bottom: 1.5em;
    max-width: 68ch;
}

.biography-text p:last-of-type { margin-bottom: 0; }

/* ── SIGNATURE BLOCK ────────────────────────────────────────── */

.biography-signature {
    margin-top: 56px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.sig-line {
    width: 90px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary));
    margin-bottom: 10px;
}

.sig-name {
    font-family: var(--font-display);
    font-size: clamp(16px, 2.4vw, 20px);
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-primary);
}

.sig-title {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2.5px;
    color: var(--primary);
    text-transform: uppercase;
}

/* ════════════════════════════════════════════════════════════
   4. RESPONSIVE
   ════════════════════════════════════════════════════════════ */

@media (max-width: 980px) {

    /* Hero stacks */
    .founder-hero-content {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .founder-photo-col {
        max-width: 360px;
        margin: 0 auto;
        width: 100%;
    }

    .founder-info-col { text-align: center; }
    .founder-socials  { align-items: center; }
    .socials-grid     { justify-content: center; }

}

@media (max-width: 768px) {

    .founder-hero-section { padding: 120px 20px 70px; }

    /* Timeline: spine moves to left edge, all cards right */
    .timeline-line {
        left: 9px;
        transform: none;
    }

    .tl-node {
        justify-content: flex-start;
        margin-bottom: 56px;
    }

    .tl-node-dot {
        left: 9px;
        transform: translate(-50%, 0);
    }

    .tl-node-card,
    .tl-node-card.tl-left,
    .tl-node-card.tl-right {
        width: calc(100% - 44px);
        margin-left: 44px;
        margin-right: 0;
        transform: translateX(24px);
    }

    .tl-node-visible .tl-node-card { transform: translateX(0); }

}

@media (max-width: 480px) {

    .founder-stats { flex-direction: column; }

    .stat-item:not(:last-child)::after {
        right: 20%;
        top: auto;
        bottom: 0;
        height: 1px;
        width: 60%;
    }

    .tl-node-card { padding: 22px 20px; }

    .biography-wrap { padding: 28px 22px; }

    .social-btn {
        flex: 1 1 calc(50% - 5px);
        justify-content: center;
    }

}

/* ════════════════════════════════════════════════════════════
   5. REDUCED MOTION — accessibility compliance
   ════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {

    .photo-scan-line,
    .tl-dot-ring { animation: none; }

    .tl-node-card,
    .tl-node-card.tl-left,
    .tl-node-card.tl-right {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .founder-photo { transition: none; }
    .timeline-line-fill { transition: none; }

}