@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

/* Color Palette & Variables */
:root {
    --bg-base: #000000;
    --bg-panel: rgba(2, 2, 2, 0.45);
    --text-main: #d3d3d3;
    --text-muted: #777777;
    --accent-red: #ff3333;
    --accent-cyan: #00ffff;
    --accent-yellow: #ffff00;
    --font-main: 'VT323', monospace;
}

body {
    margin: 0;
    padding: 0;
    background-color: transparent;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* GLOBAL CUSTOM CURSOR */
    cursor: url('../images/cursor.png'), auto;
}

/* Enforce custom cursor on interactive elements */
a,
button,
input,
textarea,
.back-btn,
.album-box,
.gallery-item img,
#start-prompt,
.close-btn {
    cursor: url('../images/cursor.png'), pointer !important;
}

/* --- 90s BOOT SEQUENCE STYLES --- */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: black;
    color: #d3d3d3;
    font-family: var(--font-main);
    font-size: 22px;
    z-index: 10005;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
    text-transform: none;
    letter-spacing: normal;
}

.energy-star {
    position: absolute;
    top: 20px;
    right: 40px;
    visibility: hidden;
}

.energy-star img {
    width: 140px;
    image-rendering: pixelated;
}

.line {
    margin: 2px 0;
    min-height: 24px;
    white-space: pre;
}

#cursor,
.nav-cursor {
    display: inline-block;
    width: 12px;
    height: 20px;
    background-color: var(--text-main);
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.fade-out {
    animation: fadeOut 1s forwards;
    pointer-events: none !important;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

#start-prompt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: blink 1.5s step-end infinite;
    color: var(--accent-yellow);
}

#yt-player-container {
    position: absolute;
    top: -9999px;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

/* --- AR Face Tracking Background Styles --- */
#unicorn-bg {
    position: fixed;
    inset: 0;
    z-index: -3;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    filter: grayscale(100%) brightness(1.6) contrast(1.3);
}

#face-container {
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100vw;
    height: 100vh;
    isolation: isolate;
    mix-blend-mode: screen;
    pointer-events: none;
}

#canvas-container {
    position: absolute;
    inset: 0;
    width: 100vw;
    height: 100vh;
}

#mindar-container {
    position: fixed;
    top: -9999px;
    left: -9999px;
    width: 1px;
    height: 1px;
    z-index: -10;
    opacity: 0 !important;
    pointer-events: none;
    overflow: hidden;
}

#mindar-container video,
#mindar-container canvas {
    opacity: 0 !important;
}

#face-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    background: rgba(2, 2, 2, 0.45);
    border: 1px solid var(--text-muted);
    color: var(--text-main);
    padding: 10px 20px;
    font-family: var(--font-main);
    font-size: 18px;
    letter-spacing: 2px;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
    transition: all 0.2s step-end;
}

#face-btn:hover {
    background: var(--text-main);
    color: #000;
    border-color: var(--text-main);
}

#face-btn.active {
    color: var(--accent-yellow);
    border-color: var(--accent-yellow);
    background: rgba(20, 20, 0, 0.6);
}

/* Algorithmic Film Grain Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.06;
    background-image: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    background-repeat: repeat;
    background-size: 200px 200px;
}

/* CRT Scanlines */
#scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.15) 50%, rgba(0, 0, 0, 0.15));
    background-size: 100% 4px;
    z-index: 9997;
    pointer-events: none;
}

/* --- FOUND FOOTAGE LIGHTENED HALO --- */
#halo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9998;
    box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.05), inset 0 0 10px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    mix-blend-mode: screen;
}

.layout-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    background-color: var(--bg-panel);
    backdrop-filter: blur(6px);
    border-right: 1px solid #222;
}

/* Sidebar Navigation */
header {
    background-color: rgba(0, 0, 0, 0.35);
    border-right: 1px dotted #262626;
    padding: 50px 40px 100px 40px;
    /* Increased bottom padding to avoid music player overlap */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: sticky;
    top: 0;
    height: 100vh;
    box-sizing: border-box;
    z-index: 10;
}

h1 {
    font-family: var(--font-main);
    font-size: 2.8rem;
    font-weight: normal;
    margin: 0 0 5px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #b5b5b5;
}

.subtitle {
    font-family: var(--font-main);
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 60px;
    letter-spacing: 1px;
    opacity: 0.8;
}

nav a {
    display: block;
    color: #888888;
    text-decoration: none;
    margin-bottom: 22px;
    font-size: 1.6rem;
    font-family: var(--font-main);
    transition: color 0.1s step-end;
    position: relative;
}

nav a:hover,
nav a.active {
    color: var(--accent-yellow);
}

nav a::before {
    content: "> ";
    opacity: 0;
    color: var(--accent-red);
    transition: opacity 0.1s step-end;
}

nav a:hover::before,
nav a.active::before {
    opacity: 1;
    animation: blink 1s step-end infinite;
}

header footer {
    color: #555555;
    font-size: 0.9rem;
    line-height: 1.4;
    letter-spacing: 1px;
}

/* Main Content Area */
main {
    padding: 50px;
}

.section-title {
    font-family: var(--font-main);
    font-size: 1.8rem;
    color: var(--text-main);
    border-bottom: 1px dotted #333;
    padding-bottom: 15px;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.back-btn {
    float: right;
    color: var(--accent-yellow);
    font-size: 1.2rem;
    font-family: var(--font-main);
    transition: color 0.1s step-end;
}

.back-btn:hover {
    color: var(--accent-red);
}

/* Cinematic / Noir Gallery Grid */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.gallery-item {
    position: relative;
    background: var(--bg-base);
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border: 1px solid #222;
    filter: grayscale(85%) contrast(130%) brightness(0.9);
    transition: filter 0.2s step-end, border-color 0.2s step-end;
}

.gallery-item:hover {
    filter: grayscale(0%) contrast(110%) brightness(1);
    border-color: var(--accent-yellow);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    mix-blend-mode: luminosity;
    position: relative;
    z-index: 2;
}

.placeholder-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-main);
    font-size: 1.2rem;
    color: #555;
    text-align: center;
    text-transform: uppercase;
    z-index: 1;
}

/* --- SERIES ALBUM STYLES --- */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
}

.album-box {
    display: flex;
    flex-direction: column;
}

.album-box:hover .album-cover {
    filter: grayscale(0%) contrast(110%) brightness(1);
    border-color: var(--accent-yellow);
}

.album-box:hover .album-title {
    color: var(--accent-yellow);
}

.album-box:hover .album-title::before {
    content: "> ";
    color: var(--accent-red);
    animation: blink 1s step-end infinite;
}

.album-cover {
    position: relative;
    background: var(--bg-base);
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid #222;
    filter: grayscale(85%) contrast(130%) brightness(0.9);
    transition: filter 0.2s step-end, border-color 0.2s step-end;
    margin-bottom: 15px;
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    mix-blend-mode: luminosity;
}

.album-info .album-title {
    font-family: var(--font-main);
    font-size: 1.6rem;
    color: var(--text-main);
    margin-bottom: 5px;
    text-transform: uppercase;
}

/* Sharpened Chromatic Aberration for readability */
.glitch-accent {
    text-shadow: 1px 0px 0px rgba(255, 51, 51, 0.7), -1px 0px 0px rgba(0, 255, 255, 0.7);
}

footer {
    font-family: var(--font-main);
    font-size: 1.2rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* --- ARTWORK INFO VIEWER (Replaces Image Viewer) --- */
.piece-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.piece-viewer.active {
    display: flex;
}

.viewer-content-box {
    display: flex;
    flex-direction: row;
    width: 85vw;
    height: 80vh;
    background: var(--bg-base);
    border: 1px solid var(--accent-yellow);
    box-shadow: 0 0 30px rgba(0, 0, 0, 1);
    position: relative;
}

.viewer-image-container {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-right: 1px dotted #333;
    overflow: hidden;
    position: relative;
}

.viewer-image-container img {
    max-width: 95%;
    max-height: 95%;
    touch-action: none;
    filter: grayscale(0%) contrast(110%) brightness(1);
}

.viewer-details-container {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.viewer-details-container h2 {
    font-size: 2.2rem;
    color: #fff;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px dotted #333;
    padding-bottom: 10px;
}

.detail-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.detail-list li {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--accent-yellow);
}

.detail-list span {
    color: var(--text-main);
}

.detail-description {
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--text-main);
    text-transform: none;
}

.close-btn {
    position: absolute;
    top: -40px;
    right: 0px;
    font-family: var(--font-main);
    font-size: 2rem;
    color: var(--text-muted);
    transition: color 0.1s step-end;
    z-index: 10002;
}

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

/* Magnifier Square Tool */
#magnifier {
    position: fixed;
    width: 180px;
    height: 180px;
    border: 1px solid var(--accent-yellow);
    pointer-events: none;
    display: none;
    z-index: 10001;
    background-color: var(--bg-base);
    background-repeat: no-repeat;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.9);
}

/* --- INFO PAGE STYLES --- */
.info-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 50px;
    align-items: start;
}

.portrait-wrapper {
    position: relative;
    background: var(--bg-base);
    aspect-ratio: 3 / 4;
    border: 1px solid #333;
    filter: grayscale(85%) contrast(130%) brightness(0.9);
    overflow: hidden;
}

.portrait-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    mix-blend-mode: luminosity;
}

.bio-content h2 {
    font-family: var(--font-main);
    font-size: 2.5rem;
    color: #fff;
    margin-top: 0;
    margin-bottom: 5px;
}

.bio-content .role {
    font-family: var(--font-main);
    font-size: 1.2rem;
    color: var(--accent-yellow);
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.bio-content p {
    font-family: var(--font-main);
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 20px;
    text-transform: none;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
    border-top: 1px dotted #333;
    padding-top: 20px;
}

.contact-list li {
    margin-bottom: 12px;
    font-size: 1.4rem;
    font-family: var(--font-main);
}

.contact-list a {
    color: var(--text-muted);
    text-decoration: none;
}

.contact-list a:hover {
    color: var(--accent-yellow);
}

/* --- FORM STYLES --- */
.retro-form {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-top: 1px dotted #333;
    padding-top: 30px;
    max-width: 500px;
}

.retro-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.retro-form label {
    font-family: var(--font-main);
    font-size: 1.3rem;
    color: var(--accent-yellow);
}

.retro-form input,
.retro-form textarea {
    background: transparent;
    border: 1px solid #333;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1.3rem;
    padding: 10px;
    outline: none;
    transition: border-color 0.1s step-end;
    border-radius: 0;
}

.retro-form textarea {
    resize: vertical;
    min-height: 100px;
}

.retro-form input:focus,
.retro-form textarea:focus {
    border-color: var(--accent-cyan);
    box-shadow: 2px 0px 0px rgba(0, 255, 255, 0.4);
}

.retro-form input::placeholder,
.retro-form textarea::placeholder {
    color: #444;
    text-transform: uppercase;
}

.retro-form button {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1.4rem;
    padding: 10px 20px;
    text-transform: uppercase;
    transition: all 0.1s step-end;
    align-self: flex-start;
}

.retro-form button:hover {
    color: var(--accent-red);
    border-color: var(--accent-red);
}

.retro-form button:active {
    color: var(--accent-yellow);
    border-color: var(--accent-yellow);
}

@media (max-width: 900px) {
    body {
        font-size: 18px;
    }

    .layout-grid {
        grid-template-columns: 1fr;
    }

    header {
        height: auto;
        position: relative;
        padding: 22px 18px 26px 18px;
        border-right: none;
        border-bottom: 1px dotted #333;
    }

    h1 {
        font-size: 2.1rem;
    }

    .subtitle {
        font-size: 1rem;
        margin-bottom: 28px;
    }

    nav a {
        font-size: 1.25rem;
        margin-bottom: 16px;
    }

    main {
        padding: 22px 16px 28px 16px;
    }

    .section-title {
        font-size: 1.35rem;
        margin-bottom: 24px;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 18px;
    }

    .album-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 22px;
    }

    .film-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 20px;
    }

    .info-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .portrait-wrapper {
        max-width: 320px;
    }

    .bio-content h2 {
        font-size: 1.9rem;
    }

    .bio-content .role,
    .bio-content p,
    .contact-list li,
    .retro-form label,
    .retro-form input,
    .retro-form textarea,
    .retro-form button,
    .detail-list li,
    .detail-description {
        font-size: 1.05rem;
    }

    .viewer-content-box {
        width: 94vw;
        height: 88vh;
        flex-direction: column;
        overflow-y: auto;
    }

    .viewer-image-container {
        flex: none;
        height: 50vh;
        border-right: none;
        border-bottom: 1px dotted #333;
    }

    .close-btn {
        top: 10px;
        right: 20px;
    }

    .floating-window {
        width: calc(100vw - 12px);
        max-width: 420px;
        height: calc(100vh - 18px);
        max-height: 640px;
    }

    .floating-window-content {
        margin: 3px;
    }

    #magnifier {
        display: none !important;
    }
}

/* --- FILM PAGE STYLES --- */
.film-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 40px;
}

.film-box {
    display: flex;
    flex-direction: column;
}

.film-box:hover .film-poster {
    filter: grayscale(0%) contrast(110%) brightness(1);
    border-color: var(--accent-yellow);
}

.film-box:hover .film-title {
    color: var(--accent-yellow);
}

.film-box:hover .film-title::before {
    content: "> ";
    color: var(--accent-red);
    animation: blink 1s step-end infinite;
}

.film-poster {
    position: relative;
    background: var(--bg-base);
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid #222;
    filter: grayscale(85%) contrast(130%) brightness(0.9);
    transition: filter 0.2s step-end, border-color 0.2s step-end;
    margin-bottom: 15px;
}

.film-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    mix-blend-mode: luminosity;
}

.film-info .film-title {
    font-family: var(--font-main);
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.error-msg {
    color: var(--accent-red);
    font-family: var(--font-main);
    font-size: 1.4rem;
    padding: 20px;
    border: 1px solid var(--accent-red);
    background: rgba(255, 0, 0, 0.1);
    text-align: center;
}

/* --- FLOATING MUSIC PLAYER --- */
#music-player-display {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(2, 2, 2, 0.45);
    border: 1px dotted #333;
    padding: 8px 12px;
    z-index: 9996;
    display: flex;
    flex-direction: row;
    align-items: center;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 1s step-end, max-width 0.3s ease, padding 0.3s ease;
    pointer-events: none;
    max-width: 600px;
    overflow: hidden;
    white-space: nowrap;
}

#music-player-display.visible {
    opacity: 1;
    pointer-events: auto;
}

#music-toggle-btn {
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: url('../images/cursor.png'), pointer !important;
    white-space: nowrap;
    margin-right: 12px;
    transition: margin 0.3s ease;
}

#music-toggle-btn:hover {
    color: var(--accent-red);
}

#music-content-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.3s ease, opacity 0.3s ease;
    max-width: 550px;
    opacity: 1;
}

#music-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.music-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1.2rem;
    padding: 0 4px;
    cursor: url('../images/cursor.png'), pointer !important;
    transition: color 0.1s step-end;
    outline: none;
}

.music-btn:hover {
    color: var(--accent-yellow);
}

#music-info-container {
    display: flex;
    align-items: baseline;
    gap: 12px;
    overflow: hidden;
    white-space: nowrap;
}

#music-player-display.collapsed {
    padding-right: 12px;
}

#music-player-display.collapsed #music-toggle-btn {
    margin-right: 0;
}

#music-player-display.collapsed #music-content-wrapper {
    max-width: 0;
    opacity: 0;
    pointer-events: none;
}

.music-icon {
    color: var(--accent-cyan);
    animation: blink 1s step-end infinite;
}

#music-title {
    font-size: 1.4rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#music-artist {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}/* 90s Floating Window */
.floating-window {
    position: fixed;
    width: 400px;
    height: 500px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    color: #000;
    font-family: 'Courier New', Courier, monospace;
}

.floating-window.minimized {
    height: 30px !important;
    overflow: hidden;
}

.floating-window-header {
    background: #000080;
    color: #fff;
    padding: 2px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    font-weight: bold;
    font-size: 14px;
}

.floating-window-header:active {
    cursor: grabbing;
}

.floating-window-title {
    pointer-events: none;
}

.floating-window-controls {
    display: flex;
    gap: 4px;
}

.floating-btn {
    background: #c0c0c0;
    border: 1px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #000;
    cursor: pointer;
    font-family: monospace;
    padding: 0;
}

.floating-btn:active {
    border-color: #808080 #ffffff #ffffff #808080;
}

.floating-window-content {
    flex: 1;
    background: #fff;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    margin: 4px;
}

.floating-window-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}
