:root {
    /* Color Palette - Slate & Gold Theme */
    --bg-color: #0f172a;
    /* Deep Slate */
    --surface-color: #1e293b;
    /* Lighter Slate */
    --text-primary: #f8fafc;
    /* Silver/White */
    --text-secondary: #94a3b8;
    /* Muted Blue-Grey */
    --accent-primary: #fbbf24;
    /* Metallic Gold */
    --accent-secondary: #f59e0b;
    /* Darker Gold/Amber */
    --border-color: rgba(148, 163, 184, 0.2);

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

    /* Animation */
    --transition-speed: 0.4s;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    /* No scrolling */
    position: relative;
}

/* Background Canvas */
#lattice-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Main Container */
.app-container {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Center Profile */
.center-profile {
    text-align: center;
    z-index: 10;
    pointer-events: none;
    /* Allow clicks to pass through to bubbles behind if any */
    position: relative;
    padding: 2rem;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0) 70%);
}

.profile-name {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.profile-title {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--accent-primary);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.profile-bio {
    margin-top: 1rem;
    color: var(--text-secondary);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Floating Bubbles */
.bubble-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Container doesn't block */
}

.bubble {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.7);
    /* Semi-transparent slate */
    border: 1px solid var(--accent-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem;
    cursor: grab;
    pointer-events: auto;
    /* Bubbles are clickable */
    transition: transform 0s, background 0.3s ease, box-shadow 0.3s ease;
    /* Remove transform transition for physics */
    backdrop-filter: blur(5px);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.1);
    user-select: none;
}

.bubble:active {
    cursor: grabbing;
}

.bubble-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 0.5rem;
    object-fit: contain;
    /* Removed background and padding for cleaner look */
    /* filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.2)); */
}

.bubble:hover {
    transform: scale(1.1);
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.3);
    z-index: 20;
}

.bubble-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.bubble-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Modal / Expanded View */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed) ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--surface-color);
    border: 1px solid var(--accent-primary);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    transform: scale(0.9);
    transition: transform var(--transition-speed) cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: var(--accent-primary);
}

.modal-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.modal-title {
    font-size: 1.8rem;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.modal-body {
    margin-bottom: 2rem;
    line-height: 1.6;
    color: var(--text-secondary);
    /* Column Layout */
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    text-align: left;
}

.modal-body p {
    flex: 1;
    margin: 0;
    padding-right: 1.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-body p:last-child {
    border-right: none;
    padding-right: 0;
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
        gap: 1rem;
    }

    .modal-body p {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-right: 0;
        padding-bottom: 1rem;
    }

    .modal-body p:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
}

.tech-stack {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: rgba(251, 191, 36, 0.1);
    color: var(--accent-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

/* Contact Links (Bottom) */
.contact-bar {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2rem;
    z-index: 10;
}

.contact-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.contact-link:hover {
    color: var(--accent-primary);
}

/* HUD Elements */
.hud-container {
    position: absolute;
    bottom: 2rem;
    width: 100%;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    /* Let clicks pass through container */
    z-index: 20;
}

.hud-block {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    min-width: 180px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.hud-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: var(--accent-primary);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.hud-block:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.15);
}

.hud-block:hover::before {
    opacity: 1;
    box-shadow: 0 0 10px var(--accent-primary);
}

.hud-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--accent-primary);
    letter-spacing: 0.1em;
    margin-bottom: 0.3rem;
    opacity: 0.8;
}

.hud-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.05em;
}

.hud-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .bubble {
        width: 100px;
        height: 100px;
        font-size: 0.8rem;
    }

    .profile-name {
        font-size: 2.5rem;
    }

    .hud-container {
        padding: 0 1rem;
        bottom: 5rem;
        /* Move up to avoid contact bar if needed, or adjust layout */
    }

    .hud-block {
        min-width: 140px;
        padding: 0.8rem;
    }

    .contact-bar {
        bottom: 1.5rem;
        width: 100%;
        justify-content: center;
    }
}