:root {
    --bg-color: #000000;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-primary: #FF7043;
    /* Cosmic Orange */
    --accent-secondary: #FFAB91;
    /* Lighter Orange */
    --accent-glow: rgba(255, 87, 34, 0.4);
    --glass-bg: rgba(0, 0, 0, 0.3);
    /* Darker for ammoled contrast */
    --glass-border: rgba(255, 112, 67, 0.3);
    --font-main: 'Outfit', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* FORCE TOP ALIGNMENT (No space above) */
    align-items: center;
    padding-bottom: 0;
}

/* Background Video */
#bg-video {
    position: fixed;
    top: 50%;
    left: 50%;
    /* Slight zoom to prevent any black bars */
    width: 105vw;
    height: 105dvh;
    z-index: -2;
    object-fit: cover;
    /* EAT THE BARS */
    transform: translate(-50%, -50%);
    filter: sepia(100%) hue-rotate(-20deg) saturate(300%) contrast(1.2) brightness(0.8);
}

/* ... */

/* Liquid Glass Header */
.liquid-header {
    width: 100%;
    height: auto;
    /* Natural Height */
    padding: 3.5rem 1rem 4rem;
    /* Top padding for breathing room/status bar */

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.00) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    /* NEON WIREFRAME BORDER */
    border: 1px solid rgba(255, 112, 67, 0.6);
    border-top: none;
    border-bottom: 2px solid var(--accent-primary);
    border-left: 1px solid rgba(255, 112, 67, 0.3);
    border-right: 1px solid rgba(255, 112, 67, 0.3);

    border-radius: 0 0 50% 20%;
    margin-bottom: 0;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    /* Don't shrink */

    /* NEON GLOW */
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(255, 112, 67, 0.4),
        inset 0 0 20px rgba(255, 112, 67, 0.1);

    overflow: hidden;
    cursor: pointer;
    /* Whole header is interactive now */
}

/* ... */

.container {
    width: 100%;
    max-width: 480px;
    padding: 0 2rem;
    height: auto;
    flex-grow: 0;
    /* Layout naturally */

    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    overflow-y: auto;
    /* Safety scroll */
}

/* JWST Wireframe Container */
.illustration-container {
    width: 140px;
    /* Restored to Large */
    height: 140px;
    margin: 0 auto 0.5rem;
    /* Reduced bottom margin for tighter grouping */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    /* animation: float 6s ease-in-out infinite, pulse-glow 4s ease-in-out infinite; */
    /* Animation removed for stability */
    -webkit-tap-highlight-color: transparent;
}

/* Active Edge Lighting State for Liquid Header */
.liquid-header.glow-active {
    border-color: #FF7043;
    /* Solid Cosmic Orange Border */
    box-shadow:
        0 0 20px var(--accent-primary),
        /* Outer Edge Glow */
        inset 0 0 20px var(--accent-primary);
    /* Inner Edge Glow */
    transition: all 0.2s ease-out;
}

/* Profile Group (Name & Title Inner Container) */
.profile-group {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    padding: 0.5rem;
    gap: 0.2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-group:active {
    transform: scale(0.98);
}

.quote {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-style: italic;
    color: var(--text-primary);
    margin-top: 0.5rem;
    opacity: 0.9;
    text-shadow: 0 0 10px var(--accent-glow);
    letter-spacing: 0.5px;
}

/* Active Wireframe State - Applied to body */
body.wireframe-active .group-container {
    animation: wireframe-pulse 1.5s ease-in-out infinite alternate;
}

body.wireframe-active .corner-accents::before,
body.wireframe-active .corner-accents::after {
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

/* Physical Spine Connector (The "Wire" between Header and Content) */
.spine-connector {
    width: 2px;
    height: 4rem;
    /* Taller to bridge gap fully */
    background: var(--accent-primary);
    margin: -2.5rem auto -0.8rem;
    /* Pull UP into Header, Pull content UP */
    box-shadow:
        0 0 10px var(--accent-primary),
        0 0 20px var(--accent-primary);
    z-index: 0;
    flex-shrink: 0;
    opacity: 0.8;
    pointer-events: none;
    /* KEY FIX: Don't steal clicks */
}

.spine-connector-small {
    width: 2px;
    height: 1.5rem;
    /* Short link between boxes */
    background: var(--accent-primary);
    margin: -0.5rem auto -0.5rem;
    /* Overlap both slightly */
    box-shadow: 0 0 8px var(--accent-primary);
    z-index: 0;
    flex-shrink: 0;
    opacity: 0.6;
    pointer-events: none;
    /* KEY FIX: Don't steal clicks */
}

/* Active Glow States for Spines */
.spine-connector.glow-active,
.spine-connector-small.glow-active {
    background: #FF7043 !important;
    box-shadow:
        0 0 15px #FF7043,
        0 0 30px #FF7043 !important;
    opacity: 1 !important;
    transition: all 0.2s ease-out;
}

/* Active Glow States for Bottom Containers */
.group-container.glow-active {
    border-color: #FF7043 !important;
    /* Force Orange */
    box-shadow:
        0 0 20px rgba(255, 112, 67, 0.4),
        inset 0 0 20px rgba(255, 112, 67, 0.2) !important;
}

.group-container.glow-active .corner-accents::before,
.group-container.glow-active .corner-accents::after {
    border-color: #FF7043 !important;
    box-shadow: 0 0 10px #FF7043 !important;
}

.illustration-container svg {
    filter: drop-shadow(0 0 5px var(--accent-primary));
}

@keyframes float {

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

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

@keyframes pulse-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 5px var(--accent-primary));
    }

    50% {
        filter: drop-shadow(0 0 15px var(--accent-primary)) drop-shadow(0 0 30px var(--accent-glow));
    }
}

h1 {
    font-size: 2.5rem;
    /* Larger */
    font-weight: 800;
    /* Extra Bold */
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 15px var(--accent-glow);
}

.tagline {
    font-family: var(--font-mono);
    color: var(--accent-secondary);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* Group Containers (The differentiators) */
.group-container {
    position: relative;
    border-radius: 4px;
    /* Sharper corners for sci-fi look */
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease;
    border: 1px solid transparent;
    /* Placeholder for specific group borders */
}

/* Sci-Fi Corner Accents */
.corner-accents {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

.corner-accents::before,
.corner-accents::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid;
    transition: all 0.3s ease;
}

.corner-accents::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.corner-accents::after {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

.group-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    opacity: 0.8;
    z-index: 1;
}

/* Professional Group - Clean / Neutral / White-ish Wireframe */
.professional-group {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.professional-group .corner-accents::before,
.professional-group .corner-accents::after {
    border-color: rgba(255, 255, 255, 0.5);
}

.professional-group:hover .corner-accents::before,
.professional-group:hover .corner-accents::after {
    width: 30px;
    height: 30px;
    border-color: #fff;
    filter: drop-shadow(0 0 5px white);
}

.professional-group .group-label {
    color: var(--text-primary);
}

.professional-group .link-card,
.professional-group .action-btn {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
}

.professional-group .link-card:hover,
.professional-group .action-btn:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Company Group - Cosmic Orange Wireframe */
.company-group {
    background: linear-gradient(135deg, rgba(255, 112, 67, 0.05) 0%, transparent 100%);
    border: 1px solid rgba(255, 112, 67, 0.2);
}

.company-group .corner-accents::before,
.company-group .corner-accents::after {
    border-color: var(--accent-primary);
}

.company-group:hover .corner-accents::before,
.company-group:hover .corner-accents::after {
    width: 30px;
    height: 30px;
    border-color: var(--accent-primary);
    filter: drop-shadow(0 0 5px var(--accent-primary));
}

.company-group .group-label {
    color: var(--accent-primary);
}

/* Globals for links inside groups */
.link-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 2;
    /* Clickable over accents */
}

/* Actions Row */
.actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.social-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.social-pill {
    justify-content: center;
    padding: 0.8rem;
    height: 50px;
}

.icon-svg {
    stroke: currentColor;
    width: 24px;
    height: 24px;
    margin: 0;
    transition: all 0.3s ease;
}

.link-card:hover .icon-svg {
    stroke: var(--bg-color);
}

.action-btn {
    padding: 1rem;
    border-radius: 50px;
    border: 1px solid var(--accent-primary);
    background: transparent;
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    /* Slightly smaller for 2-column fit */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px var(--accent-glow);
}

.action-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--accent-glow);
}

@media (max-width: 480px) {
    .liquid-header {
        height: 42vh;
        /* Fixed proportion: Top 42% */
        padding: 0;
        /* Let flex center content */
        border-radius: 0 0 40px 40px;
        flex-shrink: 0;
    }

    .container {
        height: 58vh;
        /* Fixed proportion: Bottom 58% */
        padding: 0 1.5rem 1rem;
        gap: 0.5rem;
        justify-content: flex-start;
        /* Stack from top (Spine -> Pro -> Org) */
        align-items: stretch;
        /* Ensure full width alignment */
        overflow-y: hidden;
    }

    .profile-header {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    /* ... */

    h1 {
        font-size: 1.9rem;
        /* Slightly larger presence */
        white-space: nowrap;
        margin-bottom: 0.2rem;
    }

    .tagline {
        font-size: 0.7rem;
        margin-bottom: 0.5rem;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
        line-height: 1.4;
    }

    .quote {
        font-size: 0.6rem;
        margin-top: 0.3rem;
        max-width: 80%;
        margin-left: auto;
        margin-right: auto;
    }

    .group-container {
        padding: 1rem;
        gap: 0.6rem;
    }

    .link-card {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .action-btn {
        padding: 0.6rem;
        font-size: 0.75rem;
    }

    .social-pill {
        height: 40px;
        padding: 0.5rem;
    }

    .icon-svg {
        width: 20px;
        height: 20px;
    }

    .group-label {
        font-size: 0.6rem;
        margin-bottom: 0.3rem;
        text-align: center;
        /* ALIGNMENT FIX: Center the labels */
        width: 100%;
        letter-spacing: 1px;
    }

    .group-container {
        padding: 1rem;
        gap: 0.6rem;
        text-align: center;
        /* Ensure content centers */
    }
}