:root {
    --accent-color: #00FF94;
    /* Default Cyber Green */
    --bg-color: #0a0a0a;
    --text-color: #ffffff;
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-ui: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-ui);
    overflow: hidden;
    /* Prevent scrolling */
    width: 100vw;
    height: 100vh;
}

/* Scanline Effect */
body::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

/* ── CRT Boot Overlay ── */
#crt-boot-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    pointer-events: all;
    overflow: hidden;
}

/* The bright phosphor beam that sweeps down */
.crt-scanline-beam {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-color);
    box-shadow:
        0 0 8px var(--accent-color),
        0 0 30px var(--accent-color),
        0 0 80px var(--accent-color),
        0 0 160px rgba(0, 255, 148, 0.3);
    opacity: 0;
    top: -3px;
}

/* Beam sweeps down */
.crt-scanline-beam.animate {
    animation: crtBeamSweep 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes crtBeamSweep {
    0% {
        top: -3px;
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0.6;
    }
}

/* After beam sweep, fade out the overlay */
#crt-boot-overlay.reveal {
    animation: crtReveal 0.5s ease-out forwards;
}

@keyframes crtReveal {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Remove overlay from DOM flow after animation */
#crt-boot-overlay.done {
    display: none;
}

#physics-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Physics Bodies - Common Styles */
.physics-body {
    position: absolute;
    top: 0;
    left: 0;
    will-change: transform;
    /* Important: Center origin for rotation */
    transform-origin: center center;
    user-select: none;
}

/* Dossier Card Styles */
#dossier-card {
    width: 350px;
    /* Initial width matching physics body */
    /* Height will be determined by content or fixed matching physics */
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5), 0 0 5px var(--accent-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 10;
    cursor: pointer;
    /* Clickable */
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

#dossier-card:hover {
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.6), 0 0 10px var(--accent-color);
    border-color: rgba(255, 255, 255, 0.8);
}

.dossier-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.logo {
    height: 40px;
    object-fit: contain;
}

.confidential-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 1px;
}

.dossier-body {
    margin-bottom: 2rem;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

.dossier-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s;
}

/* Pulse Animation for Footer */
.dossier-footer .ph-lock-key {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
        color: var(--accent-color);
    }

    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

/* Skill Chips Styles */
.skill-chip {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    white-space: nowrap;
    color: var(--text-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

/* Decrypted State (Hidden Content) */
#content-grid {
    position: relative;
    /* Anchor for absolute positioned elements inside (like hand) */
    display: none;
    /* Hidden by default */
    opacity: 0;
    width: 100%;
    height: 100%;
    flex-direction: column;
    padding: 1rem;
    overflow-y: auto;
    /* Allow scrolling if content is long in expanded view */
}

/* Revealed State Styles applied by JS via GSAP */
#dossier-card.decrypted {
    /* Styles handled by GSAP transform/inset */
    cursor: default;
    background: rgba(10, 10, 10, 0.95);
    /* Darker background for readability */
    border: 1px solid var(--accent-color);
}

#close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 20;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
    padding-bottom: 2rem;
    /* Spacing for scroll */
}

@media (min-width: 768px) {
    .grid-layout {
        grid-template-columns: 1fr 1fr;
    }
}

.hero-section h2 {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-section .pitch {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.team-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.profile-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

.profile-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
}

.profile-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.profile-info .role {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-color);
    margin-top: 0.25rem;
}

/* Profile Slide-in Panel */
#profile-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    border-left: 1px solid var(--accent-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    padding: 2rem;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
    overflow-y: auto;
}

#profile-panel.active {
    transform: translateX(0);
}

#profile-close {
    align-self: flex-end;
    margin-bottom: 2rem;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    padding: 0;
}

#profile-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

.profile-content {
    display: flex;
    flex-direction: column;
    /* Ensure content is scrollable if needed */
    padding-bottom: 3rem;
}

.profile-large-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#p-name {
    font-family: var(--font-ui);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

#p-role {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#p-bio {
    line-height: 1.8;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Bio Links — Animated */
#p-bio a.bio-link {
    color: var(--accent-color);
    text-decoration: none;
    position: relative;
    display: inline-block;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    opacity: 0;
    animation: bioLinkFadeIn 0.5s ease forwards;
    transition: color 0.3s ease, background 0.3s ease, text-shadow 0.3s ease;
}

/* Once faded in, apply breathing glow continuously */
#p-bio a.bio-link.is-visible {
    opacity: 1;
    animation: bioLinkBreathe 3s ease-in-out infinite;
}

/* Underline slide-in from left */
#p-bio a.bio-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent-color);
    box-shadow: 0 0 6px var(--accent-color);
    transition: width 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#p-bio a.bio-link:hover::after {
    width: 100%;
}

#p-bio a.bio-link:hover {
    color: #fff;
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.06);
    text-shadow: 0 0 10px var(--accent-color), 0 0 20px rgba(255, 255, 255, 0.12);
}

/* Breathing glow — only affects text-shadow, never opacity */
@keyframes bioLinkBreathe {

    0%,
    100% {
        text-shadow: 0 0 4px transparent;
    }

    50% {
        text-shadow: 0 0 8px var(--accent-color), 0 0 16px rgba(0, 255, 148, 0.15);
    }
}

/* Fade-in entrance */
@keyframes bioLinkFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utilities */
.hidden {
    display: none !important;
}

.icon-btn {
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
}

/* Tutorial Hand */
#tutorial-hand {
    position: absolute;
    font-size: 2.5rem;
    color: var(--accent-color);
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    filter: drop-shadow(0 0 5px var(--accent-color));
}

/* Terminal Overlay */
#terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1500;
    /* Above physics, below profile panel */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: var(--font-mono);
}

.terminal-content {
    width: 80%;
    max-width: 600px;
}

.terminal-line {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    opacity: 0;
    /* Hidden initially */
    text-shadow: 0 0 5px var(--accent-color);
}

.scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
    animation: scan 4s linear infinite;
    pointer-events: none;
}

@keyframes scan {
    0% {
        top: -100px;
    }

    100% {
        top: 100vh;
    }
}

/* Expanded Content Styles */
.highlight {
    color: var(--accent-color);
    font-weight: 600;
}

.expanded-content {
    margin-top: 2rem;
    font-family: var(--font-ui);
    color: rgba(255, 255, 255, 0.9);
}

.expanded-content h3 {
    font-family: var(--font-mono);
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.bullet-list {
    list-style-type: none;
    margin-bottom: 1.5rem;
}

.bullet-list li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.5;
}

.bullet-list li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-family: var(--font-mono);
}

.expanded-content .pitch {
    font-style: italic;
    border-left: 2px solid var(--accent-color);
    padding-left: 1rem;
    margin-top: 1.5rem;
}

/* ── Rich Profile Components ── */

/* Mission Statement */
.profile-mission {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.75rem;
    border-left: 3px solid var(--accent-color);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
    border-radius: 0 8px 8px 0;
    position: relative;
    overflow: hidden;
}

.profile-mission::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 255, 148, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.profile-mission i {
    font-size: 1.5rem;
    color: var(--accent-color);
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.7;
}

.profile-mission span {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.5px;
    line-height: 1.6;
}

/* Narrative Bio */
.profile-narrative {
    margin-bottom: 2rem;
}

.profile-narrative p {
    font-size: 1rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 0.85rem;
}

.profile-narrative p:last-child {
    margin-bottom: 0;
}

.profile-narrative .highlight {
    color: var(--accent-color);
    font-weight: 600;
}

/* Section Labels */
.profile-section-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.profile-section-label i {
    font-size: 1rem;
}

/* Experience Entries */
.profile-experience {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.exp-entry {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 1rem 1.15rem;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.exp-entry:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.exp-company {
    font-family: var(--font-ui);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-color);
}

.exp-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.exp-desc {
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
}

/* Approach Grid */
.profile-approach {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

@media (max-width: 449px) {
    .profile-approach {
        grid-template-columns: 1fr;
    }
}

.approach-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s ease, background 0.3s ease;
}

.approach-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

.approach-item>i {
    font-size: 1.2rem;
    color: var(--accent-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.approach-item>div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.approach-item strong {
    font-family: var(--font-ui);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-color);
}

.approach-item span {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
}

/* Contact Bar */
.profile-contact-bar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.contact-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.contact-chip i {
    font-size: 1rem;
    color: var(--accent-color);
    flex-shrink: 0;
}

.contact-chip:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
    box-shadow: 0 0 12px rgba(0, 255, 148, 0.1);
}