/* ================================================================
   main.css — Francisco Portfolio
   ================================================================ */

/* --- 0. Custom Cursor --- */
*, *::before, *::after {
    cursor: url('../media/cursor/cursor.webp') 0 0, auto !important;
    box-sizing: border-box;
}

/* --- 1. Global Setup --- */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
    font-family: 'Inter', sans-serif;
    color: white;
}

/* --- 2. Entry Overlay --- */
#overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease;
}

.overlay-blur {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
}

.enter-button {
    position: relative;
    z-index: 10;
    font-size: 1.1rem;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.55);
    animation: pulse 2s infinite ease-in-out;
}

/* --- 3. Dual background videos --- */
#bg-wrap {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: #000;
}

#bg-wrap video {
    position: absolute;
    width: 100vw; height: 56.25vw;
    min-height: 100vh; min-width: 177.78vh;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

#yt-dark  { opacity: 1; z-index: 1; }
#yt-light { opacity: 0; z-index: 2; }

#bg-vignette {
    position: fixed;
    inset: 0;
    z-index: 3;
    background: radial-gradient(ellipse at center,
        transparent 25%,
        rgba(0,0,0,0.22) 100%);
    pointer-events: none;
}

/* --- 4. Top-left controls --- */
.top-left-wrapper {
    position: fixed;
    top: max(18px, env(safe-area-inset-top, 18px));
    left: max(18px, env(safe-area-inset-left, 18px));
    z-index: 10;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-slider {
    height: 4px;
    transition: width 0.3s ease, opacity 0.3s ease;
    accent-color: #fff;
    cursor: pointer;
}

/* Desktop with real hover: hide until hovered */
@media (hover: hover) and (pointer: fine) {
    .volume-slider { width: 0; opacity: 0; }
    .volume-container:hover .volume-slider { width: 80px; opacity: 1; }
}

/* Touch / mobile: always visible */
@media (hover: none), (pointer: coarse) {
    .volume-slider { width: 72px; opacity: 0.80; }
}

/* --- 5. Main Card Layout --- */
.card-container {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 24px 0 32px;
    box-sizing: border-box;
    gap: 14px;
    overflow-y: auto;
    max-height: 100vh;
    scrollbar-width: none;
    -ms-overflow-style: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.5s cubic-bezier(0.19, 1, 0.22, 1),
                visibility 1.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.card-container.visible {
    opacity: 1;
    visibility: visible;
}

.card-container::-webkit-scrollbar { display: none; }

/* --- 6. Glass Card --- */
.glass-card {
    width: 450px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 22px;
    box-sizing: border-box;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.03),
        0 0 24px rgba(255,255,255,0.03),
        inset 0 1px 0 rgba(255,255,255,0.07);
    transition: box-shadow 0.3s, border-color 0.3s, background 0.4s;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.05),
        0 0 32px rgba(255,255,255,0.07),
        inset 0 1px 0 rgba(255,255,255,0.10);
}

/* --- 7. Social Links --- */
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    text-decoration: none;
    transition: 0.3s;
}

.social-links svg, .social-links i {
    width: 100%;
    height: 100%;
    object-fit: contain;
    fill: white;
    color: white;
    font-size: 20px;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.8));
}

.social-links a:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 12px #fff);
}

/* --- 8. Music Player --- */
.music-player-card img {
    width: 42px;
    height: 42px;
    border-radius: 7px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 14px rgba(255,255,255,0.07);
}

.song-title {
    font-size: clamp(0.72rem, 2vw, 0.78rem);
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(255,255,255,0.60);
}

#music-time {
    font-size: clamp(0.58rem, 1.6vw, 0.65rem);
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
    min-width: 30px;
    text-align: right;
}

#progress-container {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.10);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
}

#music-progress {
    height: 100%;
    width: 0%;
    border-radius: 10px;
    background: rgba(255,255,255,0.55);
    box-shadow: 0 0 7px rgba(255,255,255,0.18);
    pointer-events: none;
    transition: width 0.1s linear;
}

.control-icon {
    opacity: 0.7;
    transition: 0.2s;
}

.control-icon:hover {
    opacity: 1;
    filter: drop-shadow(0 0 5px white);
}

/* --- 9. Animations --- */
@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50%       { opacity: 0.8; }
}

/* --- 10. Nav tabs (index.html uses .nav-tab, about/contact use .nav-tabs span) --- */
.nav-tab,
.nav-tabs span {
    font-size: clamp(0.6rem, 2vw, 0.7rem);
    letter-spacing: 2px;
    font-weight: bold;
    opacity: 0.40;
    transition: opacity 0.2s, text-shadow 0.2s;
    color: var(--text, white);
    cursor: pointer;
    padding: 4px 8px;
    white-space: nowrap;
}

.nav-tab.active,
.nav-tabs span.active {
    opacity: 1;
    text-shadow: 0 0 14px rgba(255,255,255,0.55), 0 0 32px rgba(255,255,255,0.18);
}

.nav-tab:hover,
.nav-tabs span:hover { opacity: 0.72; }