:root {
    --color-bg: #0B0F1A;
    --color-text-primary: #FFFFFF;
    --color-text-secondary: #94A3B8;
    --color-cyan: #22D3EE;
    --glass-bg: rgba(20, 25, 40, 0.85);
    /* Slightly darker for legibility */
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --easing-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #050505;
    /* Darker background for desktop outer area */
    color: var(--color-text-primary);
    font-family: var(--font-main);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Hero Section --- */
.hero-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    /* Constrain width for mobile feel on desktop */
    height: 100%;
    max-height: 100vh;
    /* Ensure it fits */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 40px;
    background: var(--color-bg);
    /* Ensure background is set */
    overflow: hidden;
    /* Clip content within this container */
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    /* Shadow for desktop */
}

.background-portrait {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Changed from -1 to 0 to sit above container background */
}

.background-portrait img {
    width: 100%;
    height: 100%;
    object-position: top center;
    /* Focus on face */
    object-fit: cover;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(11, 15, 26, 0.0) 0%,
            rgba(11, 15, 26, 0.0) 40%,
            /* More visible image */
            rgba(11, 15, 26, 0.6) 70%,
            rgba(11, 15, 26, 0.95) 100%);
    pointer-events: none;
}

/* --- Top Navigation --- */
.top-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    /* Align logo to right */
    padding: 40px 24px 20px;
    z-index: 10;
}

.logo-container {
    height: 24px;
    /* Reduced by 25% from 32px */
    display: flex;
    align-items: center;
    /* Invert black logo to white */
    filter: invert(1) brightness(2);
    opacity: 0.9;
    text-decoration: none;
    cursor: pointer;
}

.nav-logo {
    height: 100%;
    width: auto;
    object-fit: contain;
}

/* --- Social Sidebar --- */
.social-sidebar {
    position: absolute;
    right: 24px;
    top: 40%;
    /* Moved slightly lower */
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* Increased gap */
    z-index: 10;
}

.social-btn {
    width: 38px;
    /* Smaller buttons */
    height: 38px;
    background: rgba(255, 255, 255, 0.02);
    /* Less opacity */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Softer border */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: none;
    /* Removed glow/shadow */
}

.social-btn:active {
    transform: scale(0.9);
    background: rgba(34, 211, 238, 0.1);
    border-color: rgba(34, 211, 238, 0.3);
}

.social-btn svg {
    opacity: 0.8;
}

/* --- Profile Content --- */
.profile-content {
    padding: 0 24px;
    margin-bottom: 20px;
    /* Sits lower */
    z-index: 5;
    text-align: left;
}

.name {
    font-size: 32px;
    /* Reduced by ~10% from 36px */
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
    color: white;
    line-height: 1.1;
}

.title {
    font-size: 16px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
}

.bio {
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
    max-width: 90%;
    margin-bottom: 24px;
    font-weight: 300;
}

/* --- Bottom Action Area --- */
.bottom-action-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Button Left, Arrow Right */
    width: 100%;
    margin-top: 24px;
}

.cta-primary {
    padding: 16px 32px;
    /* Slightly larger */
    background: var(--color-cyan);
    color: #0B0F1A;
    border: none;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.small-cta {
    padding: 14px 28px;
    width: auto;
}

.cta-primary:active {
    transform: scale(0.98);
}

/* --- Bottom Trigger --- */
.bottom-trigger-inline {
    width: 56px;
    /* Larger */
    height: 56px;
    /* Larger */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    /* Significantly less fill */
    /* Brighter glass */
    backdrop-filter: blur(16px);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    /* Thinner and softer border */
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    /* Reduced shadow intensity */
    transition: all 0.3s ease;
}

.bottom-trigger-inline:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.2);
}

.arrow-icon {
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* --- Glass Popup (State 2) --- */
.glass-popup {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 85vh;
    /* 85% of screen */
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 32px 32px 0 0;
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    z-index: 20;
    padding: 24px;
    transform: translateY(100vh);
    /* Start hidden */
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
}

.glass-popup.active {
    transform: translateY(0);
}

.popup-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 0 auto 32px;
}

/* --- Action Row --- */
.action-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 12px;
}

.action-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.action-btn:active {
    background: rgba(255, 255, 255, 0.08);
}

.icon-box {
    color: var(--color-cyan);
}

.label {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-primary);
}

/* --- Contact List --- */
.contact-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 20px;
}

/* Hide scrollbar */
.contact-list::-webkit-scrollbar {
    display: none;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid transparent;
    transition: border-color 0.2s, background-color 0.2s;
    text-decoration: none;
    /* For anchor tags */
    color: inherit;
    cursor: pointer;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.contact-item:active {
    border-color: rgba(34, 211, 238, 0.3);
    background: rgba(255, 255, 255, 0.08);
    /* Slightly lighter on click */
}

.item-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(34, 211, 238, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-cyan);
    margin-right: 16px;
    flex-shrink: 0;
}

.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.item-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    letter-spacing: 0.05em;
}

.item-value {
    font-size: 14px;
    color: white;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-arrow {
    color: rgba(255, 255, 255, 0.2);
    margin-left: 12px;
}

.tab-content {
    flex: 1;
    overflow: hidden;
    /* Let children handle scroll */
    display: none;
    /* Hidden by default */
    flex-direction: column;
}

.tab-content.active {
    display: flex;
}

/* --- Bottom Tabs --- */
.bottom-tabs {
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 12px;
    display: flex;
    margin-top: auto;
    /* Sit at bottom of popup if space allows */
    flex-shrink: 0;
    /* Don't shrink */
}

.tab-btn {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-cyan);
}