@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Rajdhani:wght@300;400;600&display=swap');

:root {
    --accent: rgba(160, 210, 255, 0.9);
    --glow: rgba(120, 190, 255, 0.5);
    --text: #ffffff;
    --dim: rgba(255,255,255,0.45);
    --arrow-bg: rgba(255,255,255,0.08);
    --arrow-hover: rgba(255,255,255,0.18);
    --item-size: 110px;
    --label-font: 'Rajdhani', sans-serif;
    --title-font: 'Orbitron', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    background: #000;
    font-family: var(--label-font);
    color: var(--text);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* ── Background Video ── */
#bg-video {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0;
    transition: opacity 2s ease;
}
#bg-video.visible { opacity: 1; }

/* ── Scanlines ── */
#scanlines {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 3px,
        rgba(0,0,0,0.08) 3px,
        rgba(0,0,0,0.08) 4px
    );
}

/* ── Splash ── */
#splash {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}
#splash-text {
    font-family: var(--title-font);
    font-size: clamp(22px, 5vw, 60px);
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text);
    text-shadow: 0 0 20px rgba(255,255,255,0.8), 0 0 60px var(--glow);
    opacity: 0;
    transform: scale(0.88);
    transition: opacity 1.2s ease, transform 1.2s ease;
    text-align: center;
    padding: 0 20px;
}
#splash-text.visible  { opacity: 1; transform: scale(1); }
#splash-text.fade-out {
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* ── Main content ── */
#main-content {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}
#main-content.visible {
    opacity: 1;
    pointer-events: all;
}

/* ── Nav arrows ── */
.nav-arrow {
    flex-shrink: 0;
    align-self: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    background: var(--arrow-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
    z-index: 2;
    margin: 0 16px;
    touch-action: manipulation;
}
.nav-arrow svg { width: 20px; height: 20px; }
.nav-arrow:hover {
    background: var(--arrow-hover);
    color: #fff;
    border-color: rgba(255,255,255,0.5);
    transform: scale(1.1);
}
.nav-arrow:active { transform: scale(0.95); }

/* ── xmb-area ── */
#xmb-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── XMB Carousel ── */
#xmb-wrap {
    flex: 1;           /* fill space between the two arrows */
    min-width: 0;      /* flex shrink safety */
    overflow: hidden;
    position: relative;
    touch-action: pan-y;
}
#xmb-track {
    display: flex;
    align-items: center;
    transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
    padding: 20px 0 10px;
    gap: 60px;
}

/* ── Individual XMB Item ── */
.xmb-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease;
    opacity: 0.4;
    transform: scale(0.75);
    user-select: none;
    width: var(--item-size);
    touch-action: manipulation;
}
.xmb-item.active   { opacity: 1;    transform: scale(1.15); }
.xmb-item.adjacent { opacity: 0.65; transform: scale(0.88); }

.xmb-icon-wrap {
    width: var(--item-size);
    height: var(--item-size);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: box-shadow 0.4s ease, background 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
}
.xmb-item.active .xmb-icon-wrap {
    background: rgba(255,255,255,0.12);
    border-color: rgba(160, 210, 255, 0.5);
    box-shadow:
        0 0 20px var(--glow),
        0 0 60px rgba(120, 190, 255, 0.2),
        inset 0 0 20px rgba(255,255,255,0.05);
}
.xmb-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
    transition: filter 0.3s ease;
}
.xmb-item.active .xmb-icon {
    filter: drop-shadow(0 0 12px rgba(160,210,255,0.7)) drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}
.xmb-label {
    font-family: var(--label-font);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dim);
    transition: color 0.3s ease;
    white-space: nowrap;
}
.xmb-item.active .xmb-label {
    color: var(--accent);
    text-shadow: 0 0 10px var(--glow);
}

/* ════════════════════════════════════════════════════
   SUBMENU — drum scroll
════════════════════════════════════════════════════ */
.sub-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 340px;
    height: 294px; /* 3 × 98px rows */
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
    touch-action: pan-y;
}
.sub-menu.open {
    opacity: 1;
    pointer-events: all;
}
.sub-menu-track {
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}

/* Slightly bigger sub-items on desktop, even bigger on mobile */
.sub-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 0 12px 18px;
    cursor: pointer;
    user-select: none;
    height: 98px;      /* ROW_H — must match JS */
    flex-shrink: 0;
    position: relative;
    transition: opacity 0.3s ease;
    touch-action: manipulation;
}
.sub-item[data-dist="0"] { opacity: 1; }
.sub-item[data-dist="1"] { opacity: 0.4; }
.sub-item[data-dist="2"] { opacity: 0.15; }
.sub-item[data-dist="3"],
.sub-item[data-dist="4"],
.sub-item[data-dist="5"] { opacity: 0.04; }

.sub-icon {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 12px;
    filter: brightness(0.85);
    transition: filter 0.25s ease;
}
.sub-item[data-dist="0"] .sub-icon {
    filter: brightness(1) drop-shadow(0 0 8px rgba(160,210,255,0.5));
}
.sub-label {
    font-family: var(--label-font);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: #fff;
    white-space: nowrap;
    transition: font-weight 0.2s ease;
}
.sub-item[data-dist="0"] .sub-label { font-weight: 700; }
.sub-item::before {
    content: '';
    position: absolute;
    left: 0;
    width: 2px;
    height: 0;
    background: var(--accent);
    box-shadow: 0 0 8px var(--glow);
    border-radius: 2px;
    transition: height 0.25s ease;
}
.sub-item[data-dist="0"]::before { height: 44px; }

/* ════════════════════════════════════════════════════
   SHARED POPUP BACKDROP
════════════════════════════════════════════════════ */
#project-popup,
#game-popup {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
#project-popup.visible,
#game-popup.visible { opacity: 1; pointer-events: all; }

/* ── Project popup ── */
#project-popup-inner {
    position: relative;
    width: min(92vw, 540px);
    background: rgba(8, 18, 32, 0.95);
    border: 1px solid rgba(160, 210, 255, 0.2);
    border-radius: 16px;
    padding: 44px 32px 36px;
    box-shadow: 0 0 40px rgba(120,190,255,0.1), 0 24px 60px rgba(0,0,0,0.7);
    transform: scale(0.94) translateY(10px);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: none;
}
#project-popup-inner::-webkit-scrollbar { display: none; }
#project-popup.visible #project-popup-inner { transform: scale(1) translateY(0); }
#project-popup-close {
    position: absolute; top: 14px; right: 16px;
    background: none; border: none; color: var(--dim);
    font-size: 20px; cursor: pointer; padding: 6px 10px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
    touch-action: manipulation;
}
#project-popup-close:hover { color: #fff; background: rgba(255,255,255,0.08); }
#popup-title {
    font-family: var(--title-font);
    font-size: clamp(18px, 4vw, 24px); font-weight: 700;
    letter-spacing: 0.08em; color: #fff; margin: 0 0 16px;
    text-shadow: 0 0 16px var(--glow);
}
#popup-desc { font-size: clamp(14px, 3vw, 16px); line-height: 1.65; color: rgba(255,255,255,0.72); margin: 0 0 20px; }
#popup-tech { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
#popup-link {
    display: inline-block; font-size: 14px; font-weight: 600;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--accent); text-decoration: none;
    border: 1px solid rgba(160,210,255,0.35); border-radius: 8px; padding: 10px 22px;
    transition: background 0.2s ease, border-color 0.2s ease;
    touch-action: manipulation;
}
#popup-link:hover { background: rgba(120,190,255,0.12); border-color: var(--accent); }
#popup-link.hidden { display: none; }

/* ── Game popup ── */
#game-popup-inner {
    position: relative;
    width: min(92vw, 560px);
    background: rgba(6, 14, 26, 0.97);
    border: 1px solid rgba(160, 210, 255, 0.18);
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 0 40px rgba(120,190,255,0.08), 0 24px 60px rgba(0,0,0,0.8);
    transform: scale(0.94) translateY(10px);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    max-height: 90vh; overflow-y: auto; scrollbar-width: none;
}
#game-popup-inner::-webkit-scrollbar { display: none; }
#game-popup.visible #game-popup-inner { transform: scale(1) translateY(0); }
#game-popup-close {
    position: absolute; top: 14px; right: 16px;
    background: none; border: none; color: var(--dim);
    font-size: 20px; cursor: pointer; padding: 6px 10px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
    touch-action: manipulation;
}
#game-popup-close:hover { color: #fff; background: rgba(255,255,255,0.08); }
#game-popup-logo {
    display: block; max-width: 160px; max-height: 90px;
    object-fit: contain; margin: 0 auto;
    border-radius: 10px;
    filter: drop-shadow(0 0 16px rgba(120,190,255,0.3));
}
.popup-divider {
    width: 100%; height: 1px; margin: 16px 0;
    background: linear-gradient(
        to right, transparent,
        rgba(160, 210, 255, 0.35) 20%,
        rgba(160, 210, 255, 0.35) 80%,
        transparent
    );
}
#game-popup-title {
    font-family: var(--title-font);
    font-size: clamp(18px, 4vw, 26px); font-weight: 700;
    letter-spacing: 0.1em; color: #fff; margin: 0;
    text-align: center; text-shadow: 0 0 20px var(--glow);
}
#game-popup-desc { font-size: clamp(14px, 3vw, 15px); line-height: 1.7; color: rgba(255,255,255,0.7); margin: 0; }
.game-popup-row { display: flex; flex-direction: column; gap: 8px; }
.game-popup-field-label {
    font-family: var(--title-font); font-size: 11px; font-weight: 700;
    letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); opacity: 0.7;
}
#game-popup-engine { font-family: var(--label-font); font-size: 16px; font-weight: 600; color: #fff; letter-spacing: 0.04em; }
#game-popup-tech { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-tag {
    font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--accent); background: rgba(120,190,255,0.1);
    border: 1px solid rgba(160,210,255,0.25); border-radius: 6px; padding: 4px 10px;
}
#game-popup-link {
    display: inline-block; font-size: 14px; font-weight: 600;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--accent); text-decoration: none;
    border: 1px solid rgba(160,210,255,0.35); border-radius: 8px; padding: 10px 22px;
    transition: background 0.2s ease, border-color 0.2s ease;
    touch-action: manipulation;
}
#game-popup-link:hover { background: rgba(120,190,255,0.12); border-color: var(--accent); }
#game-popup-link.hidden { display: none; }

/* ── Resume Overlay ── */
#resume-overlay {
    position: fixed; inset: 0; z-index: 30;
    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
#resume-overlay.visible { opacity: 1; pointer-events: all; }
#resume-close {
    position: absolute; top: 20px; right: 20px;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2);
    color: #fff; font-family: var(--label-font); font-size: 14px; font-weight: 600;
    letter-spacing: 0.1em; padding: 8px 20px; border-radius: 6px;
    cursor: pointer; transition: background 0.2s ease;
    touch-action: manipulation;
}
#resume-close:hover { background: rgba(255,255,255,0.16); }
#resume-frame {
    width: min(96vw, 860px); height: 82vh;
    border: none; border-radius: 8px;
    box-shadow: 0 0 60px rgba(0,0,0,0.8);
}

/* ── Contact strip ── */
#contact-button {
    position: fixed; bottom: 24px; left: 50%;
    transform: translateX(-50%);
    display: flex; align-items: center; gap: 12px;
    z-index: 10; opacity: 0; transition: opacity 0.8s ease;
    white-space: nowrap;
}
#contact-button.visible { opacity: 1; }
.contact-icon { width: 32px; height: 32px; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5)); opacity: 0.8; }
#contact-link {
    font-family: var(--label-font); font-size: clamp(14px, 3.5vw, 18px); font-weight: 600;
    color: rgba(255,255,255,0.85); text-decoration: none; letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(255,255,255,0.3); padding-bottom: 2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}
#contact-link:hover { color: #fff; border-color: var(--accent); }

/* ════════════════════════════════════════════════════
   ABOUT ME OVERLAY
════════════════════════════════════════════════════ */
#about-overlay {
    position: fixed; inset: 0; z-index: 50;
    background: linear-gradient(160deg, #1a1a1f 0%, #0d0d12 40%, #111318 100%);
    overflow: hidden;
    opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
#about-overlay.visible { opacity: 1; pointer-events: all; }
#about-flash {
    position: absolute; inset: 0; background: #fff; z-index: 2;
    opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
#about-overlay.flash #about-flash { opacity: 1; }
#about-hero {
    position: absolute; inset: 0; z-index: 3;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none; opacity: 0; transition: opacity 0.6s ease;
}
#about-overlay.show-hero #about-hero { opacity: 1; }
#about-overlay.hide-hero #about-hero { opacity: 0; }
#about-hero-text {
    font-family: var(--title-font);
    font-size: clamp(28px, 8vw, 90px);
    font-weight: 700; letter-spacing: 0.18em; color: #fff;
    text-shadow: 0 0 30px rgba(255,255,255,0.6), 0 0 80px rgba(200,230,255,0.3);
    text-align: center; padding: 0 20px;
}
#about-close {
    position: absolute; top: 20px; right: 20px; z-index: 10;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2);
    color: #fff; font-family: var(--label-font); font-size: 14px; font-weight: 600;
    letter-spacing: 0.1em; padding: 8px 20px; border-radius: 6px;
    cursor: pointer; opacity: 0;
    transition: opacity 0.4s ease, background 0.2s ease;
    touch-action: manipulation;
}
#about-overlay.show-content #about-close { opacity: 1; }
#about-close:hover { background: rgba(255,255,255,0.16); }
#about-content {
    position: absolute; inset: 0; z-index: 4;
    overflow-y: auto;
    padding: 72px clamp(20px, 8vw, 10vw) 80px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(160,210,255,0.3) transparent;
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}
#about-overlay.show-content #about-content { opacity: 1; transform: translateY(0); pointer-events: all; }
#about-content::-webkit-scrollbar { width: 4px; }
#about-content::-webkit-scrollbar-track { background: transparent; }
#about-content::-webkit-scrollbar-thumb { background: rgba(160,210,255,0.3); border-radius: 2px; }

.about-section-title {
    font-family: var(--title-font);
    font-size: clamp(20px, 5vw, 40px); font-weight: 700;
    letter-spacing: 0.12em; color: #fff; margin: 0 0 4px;
    text-shadow: 0 0 20px rgba(160,210,255,0.25);
}
.about-divider {
    width: 100%; height: 1px; margin: 20px 0;
    background: linear-gradient(
        to right, transparent,
        rgba(160, 210, 255, 0.3) 15%,
        rgba(160, 210, 255, 0.3) 85%,
        transparent
    );
}
.about-bio {
    font-family: var(--label-font);
    font-size: clamp(14px, 2.5vw, 18px); line-height: 1.8;
    color: rgba(255,255,255,0.78); margin: 0; max-width: 720px;
}
.about-section-subtitle {
    font-family: var(--title-font);
    font-size: clamp(11px, 2vw, 16px); font-weight: 700;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--accent); opacity: 0.8; margin: 0 0 16px;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tag {
    font-family: var(--label-font); font-size: clamp(13px, 2.5vw, 14px);
    font-weight: 600; letter-spacing: 0.08em; color: #fff;
    background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px; padding: 8px 16px;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.skill-tag:hover { background: rgba(160,210,255,0.1); border-color: rgba(160,210,255,0.35); }
.lang-grid { display: flex; flex-wrap: wrap; gap: clamp(14px, 3vw, 20px); }
.lang-item {
    display: flex; flex-direction: column; align-items: center;
    gap: 8px; width: clamp(56px, 10vw, 72px);
}
.lang-item img,
.lang-item i {
    width: clamp(36px, 7vw, 48px);
    height: clamp(36px, 7vw, 48px);
    font-size: clamp(36px, 7vw, 48px);
    object-fit: contain;
    filter: brightness(0.9);
    transition: filter 0.2s ease, transform 0.2s ease;
    line-height: 1;
}
.lang-item:hover img,
.lang-item:hover i {
    filter: brightness(1) drop-shadow(0 0 8px rgba(160,210,255,0.5));
    transform: scale(1.08);
}
.lang-item span {
    font-family: var(--label-font); font-size: clamp(10px, 2vw, 12px);
    font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
    color: rgba(255,255,255,0.65); text-align: center;
    transition: color 0.2s ease;
}
.lang-item:hover span { color: #fff; }
#about-open-to-work {
    display: flex; align-items: center; gap: 12px;
    font-family: var(--title-font); font-size: clamp(13px, 3vw, 20px);
    font-weight: 700; letter-spacing: 0.12em; color: #fff;
    text-shadow: 0 0 12px rgba(100,255,150,0.3);
}
#about-open-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: #4fffaa; box-shadow: 0 0 10px #4fffaa, 0 0 20px rgba(79,255,170,0.5);
    animation: pulse-dot 2s ease-in-out infinite; flex-shrink: 0;
}
@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.3); opacity: 0.7; }
}

/* ════════════════════════════════════════════════════
   MOBILE  (≤ 600px)
════════════════════════════════════════════════════ */
@media (max-width: 600px) {

    /* Bigger carousel icons on mobile */
    :root { --item-size: 130px; }

    /* Single icon visible: wrap width = just enough for one icon */
    #xmb-wrap {
        width: 160px; /* tight around a single icon */
        touch-action: none; /* JS handles swipe */
    }

    /* Tighten track gap so adjacent icons stay mostly off-screen */
    #xmb-track { gap: 32px; }

    .xmb-icon { width: 72px; height: 72px; }
    .xmb-label { font-size: 12px; }

    /* Arrows: slightly bigger tap targets */
    .nav-arrow { width: 52px; height: 52px; margin: 0 10px; }

    /* Submenu: full width, bigger rows */
    .sub-menu {
        top: calc(100% - 80px);
        width: 90vw;
        height: 300px; /* 3 × 100px */
        left: 50%;
        transform: translateX(-50%);
    }
    .sub-item { height: 100px; gap: 16px; padding: 10px 0 10px 14px; }
    .sub-icon { width: 64px; height: 64px; }
    .sub-label { font-size: 20px; }
    .sub-item[data-dist="0"]::before { height: 46px; }

    /* Popups: full-screen feel on mobile */
    #project-popup-inner,
    #game-popup-inner {
        width: 96vw;
        padding: 48px 20px 28px;
        border-radius: 12px;
        max-height: 88vh;
    }

    /* Resume iframe: full width */
    #resume-frame { width: 98vw; height: 78vh; }

    /* Contact: smaller text */
    #contact-link { font-size: 14px; }
    .contact-icon { width: 28px; height: 28px; }

    /* About content: tighter padding */
    #about-content { padding: 68px 18px 60px; }
}
/* ════════════════════════════════════════════════════
   ABOUT ME — TWO-TAB LAYOUT
════════════════════════════════════════════════════ */

/* Adjust about-content to leave room for tab bar */
#about-content {
    /* override the old rule — panels handle their own positioning */
    display: none !important;
}

#about-tabs {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 52px;
    display: flex;
    z-index: 5;
    border-bottom: 1px solid rgba(160,210,255,0.15);
    background: rgba(10,14,22,0.6);
    backdrop-filter: blur(8px);
}

.about-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--title-font);
    font-size: clamp(10px, 2.5vw, 13px);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    touch-action: manipulation;
}
.about-tab:hover { color: rgba(255,255,255,0.7); }
.about-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: rgba(160,210,255,0.05);
    text-shadow: 0 0 10px var(--glow);
}

.about-panel {
    position: absolute;
    top: 52px; left: 0; right: 0; bottom: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 32px clamp(16px, 6vw, 8vw) 80px;
    scrollbar-width: thin;
    scrollbar-color: rgba(160,210,255,0.3) transparent;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.about-panel::-webkit-scrollbar { width: 4px; }
.about-panel::-webkit-scrollbar-thumb { background: rgba(160,210,255,0.3); border-radius: 2px; }
.about-panel.active { opacity: 1; pointer-events: all; transform: translateY(0); }

/* ════════════════════════════════════════════════════
   VIDEO CAROUSEL  (centre item bigger + playing)
════════════════════════════════════════════════════ */
#video-carousel-section { margin-bottom: 40px; }

#video-carousel-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 24px 0 16px;
    /* enough height for the tallest (scaled-up) card */
    height: clamp(180px, 32vw, 320px);
}

#video-carousel-track {
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
    /* no padding — centering handled by JS offset */
}

.vc-card {
    flex-shrink: 0;
    width: clamp(200px, 36vw, 380px);
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #000;
    border: 1px solid rgba(255,255,255,0.08);
    transition:
        transform  0.45s cubic-bezier(0.25, 0.8, 0.25, 1),
        box-shadow 0.45s ease,
        border-color 0.45s ease,
        opacity    0.45s ease;
    transform: scale(0.80);
    opacity: 0.55;
}

.vc-card.vc-active {
    transform: scale(1.18);
    opacity: 1;
    border-color: rgba(160,210,255,0.45);
    box-shadow:
        0 0 24px rgba(120,190,255,0.3),
        0 12px 40px rgba(0,0,0,0.6);
}

.vc-card.vc-adjacent {
    transform: scale(0.90);
    opacity: 0.72;
}

.vc-card video {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Nav row */
#vc-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.vc-arrow {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.7);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    touch-action: manipulation;
    flex-shrink: 0;
}
.vc-arrow svg { width: 15px; height: 15px; }
.vc-arrow:hover { background: rgba(255,255,255,0.14); color: #fff; transform: scale(1.1); }
.vc-arrow:active { transform: scale(0.93); }

#vc-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.vc-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255,255,255,0.22);
    transition: background 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    touch-action: manipulation;
}
.vc-dot.active { background: var(--accent); transform: scale(1.3); }

/* ── Video detail popup ── */
#video-popup {
    position: fixed; inset: 0; z-index: 60;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.82);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    opacity: 0; pointer-events: none; transition: opacity 0.35s ease;
}
#video-popup.visible { opacity: 1; pointer-events: all; }

#video-popup-inner {
    position: relative;
    width: min(94vw, 620px);
    background: rgba(6,14,26,0.97);
    border: 1px solid rgba(160,210,255,0.2);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(120,190,255,0.1), 0 24px 60px rgba(0,0,0,0.8);
    transform: scale(0.94) translateY(10px);
    transition: transform 0.35s cubic-bezier(0.25,0.8,0.25,1);
}
#video-popup.visible #video-popup-inner { transform: scale(1) translateY(0); }

#video-popup-player {
    width: 100%; aspect-ratio: 16/9;
    object-fit: cover; display: block; background: #000;
}
#video-popup-body { padding: 18px 22px 22px; }
#video-popup-close {
    position: absolute; top: 10px; right: 12px; z-index: 2;
    background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.2);
    color: #fff; font-size: 15px; cursor: pointer;
    padding: 4px 9px; border-radius: 6px;
    transition: background 0.2s ease; touch-action: manipulation;
}
#video-popup-close:hover { background: rgba(255,255,255,0.15); }
#video-popup-title {
    font-family: var(--title-font);
    font-size: clamp(14px, 3vw, 19px); font-weight: 700;
    letter-spacing: 0.08em; color: #fff; margin: 0 0 10px;
    text-shadow: 0 0 12px var(--glow);
}
#video-popup-desc {
    font-family: var(--label-font);
    font-size: clamp(13px, 2.5vw, 15px); line-height: 1.65;
    color: rgba(255,255,255,0.72); margin: 0;
}

@media (max-width: 600px) {
    .about-panel { padding: 20px 14px 60px; }
    .vc-card { width: 72vw; }
    #video-carousel-viewport { height: clamp(160px, 46vw, 260px); }
}

/* ════════════════════════════════
   PERSONAL PROJECTS
════════════════════════════════ */

#personal-projects-section {
    margin-top: 50px;
}

.personal-project-grid {
    justify-content: center;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.personal-project-card {
    width: min(420px, 100%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
}

.personal-project-card video {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;

    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.personal-project-card:hover video {
    transform: scale(1.02);
    border-color: rgba(160,210,255,0.4);

    box-shadow:
        0 0 20px rgba(120,190,255,0.25);
}

.personal-project-title {
    font-family: var(--title-font);
    font-size: 16px;
    letter-spacing: 0.08em;
    color: white;
    text-align: center;
}