/* ============================================================================
   URBEX BIO-LINK STYLESHEET
   Palette: Deep Black (#08080a), Dark Gray (#121216), Concrete (#a1a1aa)
   ============================================================================ */

:root {
    --bg-deep: #08080a;
    --bg-card: rgba(15, 15, 18, 0.65);
    --bg-link: rgba(255, 255, 255, 0.03);
    --bg-link-hover: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.22);
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent-cold: #e4e4e7;
    --accent-status: #34d399;
    --accent-rec: #ef4444;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-sans);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.mono {
    font-family: var(--font-mono);
}

/* Custom Cursor (Desktop only) */
@media (pointer: fine) {
    body {
        cursor: none;
    }
    a, button, input {
        cursor: none;
    }
}

.custom-cursor {
    display: none;
}

@media (pointer: fine) {
    .custom-cursor {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 14px;
        height: 14px;
        border: 1.5px solid rgba(255, 255, 255, 0.75);
        border-radius: 50%;
        pointer-events: none;
        transform: translate(-50%, -50%);
        transition: width 0.15s ease, height 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
        z-index: 9999;
        mix-blend-mode: difference;
    }

    .custom-cursor.hovering {
        width: 28px;
        height: 28px;
        background-color: rgba(255, 255, 255, 0.15);
        border-color: #ffffff;
    }
}

/* Fullscreen Background Video */
.bg-video {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100vw;
    min-height: 100vh;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
    filter: contrast(1.05) saturate(0.82) brightness(0.75);
}

/* Atmospheric Overlays */
.overlay-dark {
    position: fixed;
    inset: 0;
    background: rgba(8, 8, 10, 0.45);
    z-index: 1;
    pointer-events: none;
}

.overlay-vignette {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, transparent 35%, rgba(4, 4, 6, 0.88) 100%);
    z-index: 2;
    pointer-events: none;
}

.overlay-grain {
    position: fixed;
    inset: -50%;
    width: 200%;
    height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.06'/%3E%3C/svg%3E");
    animation: grainShift 0.4s steps(4) infinite;
    z-index: 3;
    pointer-events: none;
}

.overlay-scanlines {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.14) 3px,
        rgba(0, 0, 0, 0.14) 4px
    );
    z-index: 4;
    pointer-events: none;
}

@keyframes grainShift {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-2%, 2%); }
    50% { transform: translate(2%, -2%); }
    75% { transform: translate(-1%, -1%); }
    100% { transform: translate(1%, 2%); }
}

/* Camcorder HUD Corners */
.hud-top-left,
.hud-top-right {
    position: fixed;
    top: 20px;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.55);
    z-index: 10;
    pointer-events: none;
    user-select: none;
}

.hud-top-left {
    left: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hud-top-right {
    right: 24px;
}

.rec-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-rec);
    box-shadow: 0 0 8px var(--accent-rec);
    animation: recBlink 1.4s infinite ease-in-out;
}

@keyframes recBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

/* Click to Enter Screen */
.enter-screen {
    position: fixed;
    inset: 0;
    background: rgba(8, 8, 10, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.65s ease;
    user-select: none;
}

.enter-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.enter-content {
    font-size: 1rem;
    letter-spacing: 0.25em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: pulseText 2.2s infinite ease-in-out;
}

.enter-bracket {
    color: var(--text-muted);
}

@keyframes pulseText {
    0%, 100% { opacity: 0.65; transform: scale(0.99); }
    50% { opacity: 1; transform: scale(1.02); }
}

/* Audio Control */
.audio-control {
    position: fixed;
    bottom: 20px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 15, 18, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    padding: 8px 12px;
    border-radius: 999px;
    z-index: 20;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.audio-control:hover {
    border-color: var(--border-hover);
    background: rgba(18, 18, 22, 0.85);
}

.audio-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.audio-btn:hover {
    color: var(--text-primary);
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 68px;
    height: 3px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--text-primary);
    transition: transform 0.15s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Main Container & Profile Card */
.container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
}

.profile-card {
    width: 100%;
    max-width: 460px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    padding: 32px 28px 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

.profile-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Profile Header */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
}

.avatar-wrapper {
    position: relative;
    width: 92px;
    height: 92px;
    margin-bottom: 16px;
}

.avatar-crop {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.08);
    background-color: #121216;
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 35% 32%;
    transform: scale(1.65);
    transform-origin: 35% 32%;
    filter: brightness(0.78) contrast(1.08) saturate(0.88);
}

.status-indicator {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--accent-status);
    border: 2.5px solid #0f0f12;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.6);
}

.name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
}

.nickname {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.2);
}

.badges {
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.7rem;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.badge-item:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

.urbex-loc {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.bio {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-secondary);
    max-width: 360px;
}

/* Featured Links (Full-Width) */
.links-featured {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.link-featured {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    background: var(--bg-link);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.22s ease, background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.link-featured:hover {
    transform: translateY(-2px);
    background: var(--bg-link-hover);
    border-color: var(--border-hover);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 14px rgba(255, 255, 255, 0.04);
}

.link-featured-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.link-featured-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.link-featured-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.link-featured-title {
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.link-featured-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.link-arrow {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: transform 0.22s ease, color 0.22s ease;
}

.link-featured:hover .link-arrow {
    transform: translateX(3px);
    color: var(--text-primary);
}

/* Secondary Links (2-Column Grid) */
.links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 22px;
}

.link-grid-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: var(--bg-link);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.link-grid-item:hover {
    transform: translateY(-2px);
    background: var(--bg-link-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.link-grid-item i {
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
}

/* Card Footer */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.footer-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-sep {
    opacity: 0.4;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .profile-card {
        padding: 26px 18px 20px;
    }

    .hud-top-left {
        left: 16px;
        top: 14px;
    }

    .hud-top-right {
        right: 16px;
        top: 14px;
    }

    .audio-control {
        bottom: 14px;
        right: 16px;
    }

    .links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}
