/* --- CORE SYSTEM RESET --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Jura', sans-serif;
    background-color: #0c0c0c;
    color: #e0e0e0;
    height: 100vh; 
    height: 100dvh; 
    display: flex; 
    flex-direction: column;
    overflow: hidden; 
}

img {
    border-radius: 8px;
}

/* --- HARDWARE CUSTOM SCROLLBARS --- */
main::-webkit-scrollbar { width: 8px; }
main::-webkit-scrollbar-track { background: #0c0c0c; }
main::-webkit-scrollbar-thumb { background: #222; border: 1px solid #333; border-radius: 4px; }
main::-webkit-scrollbar-thumb:hover { background: #00ffcc; }

/* --- FRAME 1: TOP NAV BAR --- */
header {
    background-color: #000000;
    border-bottom: 2px solid #161616;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px; z-index: 10; width: 100%;
    flex-shrink: 0; 
    height: 60px; 
}

header .logo { 
    font-weight: 700; 
    font-size: 1.2rem; 
    color: #00ffcc; 
    letter-spacing: 2px; 
    text-decoration: none; 
}

nav {
    text-align: right; 
}

nav button {
    background: none; border: none; font-family: inherit; color: #888;
    margin-left: 25px; font-size: 1rem; text-transform: uppercase;
    font-weight: 500; letter-spacing: 1.5px; cursor: pointer; transition: color 0.2s; padding: 5px 0;
}
nav button:hover, nav button.active { color: #00ffcc; border-bottom: 2px solid #00ffcc; }

/* --- FRAME 2: SCROLLING CENTER ENGINE --- */
main {
    flex-grow: 1; 
    flex-shrink: 1; 
    min-height: 0; 
    overflow-y: auto; padding-bottom: 0px; width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 950px) minmax(0, 1fr);
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}
main.fade-out {
    opacity: 0;
}

/* --- FULL BLEED BANNERS --- */
.full-banner { 
    grid-column: 1 / -1; 
    width: 100%; 
    position: relative; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden; 
    background-color: #111; 
}
.banner-70 { 
    height: calc(100vh - 160px);
    height: calc(100dvh - 160px);
    max-height: 100%; 
    border-bottom: 1px solid #222; 
}
.banner-60 { height: 60vh; border-top: 1px solid #222; border-bottom: 1px solid #222; margin-top: 0; } 

.banner-img { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    object-fit: cover; filter: grayscale(40%) contrast(110%) brightness(75%); z-index: 1; 
}

.banner-heading { 
    position: relative; z-index: 2; color: #fff; text-align: center; 
    text-shadow: 0 4px 12px rgba(0,0,0,0.9); padding: 0 20px; 
}
.banner-heading h1 { font-size: clamp(2rem, 1rem + 2vw, 3.2rem); letter-spacing: 5px; font-weight: 700; }
.banner-heading h2 { font-size: clamp(1.8rem, 0.8rem + 2vw, 3rem); letter-spacing: 4px; font-weight: 700; }

/* --- 950px NARROW TEXT BLOCKS BELOW BANNERS (UPGRADED FOR HTML) --- */
.narrow-text-block { 
    grid-column: 2; 
    padding: 60px 20px; 
    text-align: center; 
    color: #ccc; 
    line-height: 1.7; 
    font-size: 1rem; 
    letter-spacing: 0.5px;
}
.narrow-text-block h2 { font-size: 2.6rem; color: #fff; margin-top: 10px; margin-bottom: 15px; letter-spacing: 2px; text-transform: uppercase; }
.narrow-text-block h3 { font-size: 1.6rem; color: #00ffcc; margin-top: 0px; margin-bottom: 12px; letter-spacing: 1px; text-transform: uppercase; }
.narrow-text-block h4 { font-size: 1.6rem; color: #fff; margin-top: 0px; margin-bottom: 12px; letter-spacing: 1px; text-transform: uppercase; }
.narrow-text-block p { margin-bottom: 15px; }
.narrow-text-block p:last-child { margin-bottom: 0; }
.narrow-text-block img { max-width: 100%; height: auto; border-radius: 4px; border: 1px solid #222; margin: 20px auto; display: block; }
.narrow-text-block a { color: #00ffcc; text-decoration: none; border-bottom: 1px solid rgba(0,255,204,0.3); transition: all 0.2s; }
.narrow-text-block a:hover { border-bottom-color: #00ffcc; }

/* --- EXPANDABLE TEXT LOGS (TERMINAL ANIMATION) --- */
details {
    margin-top: 10px;
}
summary {
    color: #00ffcc;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    list-style: none;
    display: inline-block;
    border-bottom: 1px solid rgba(0,255,204,0.3);
    transition: all 0.2s;
}
summary::-webkit-details-marker {
    display: none; 
}
summary:hover {
    border-bottom-color: #00ffcc;
    text-shadow: 0 0 8px rgba(0,255,204,0.4);
}
details[open] summary {
    margin-bottom: 8px;
    border-bottom-color: transparent;
    color: #888;
}

/* --- THE TEXT BOX CONTAINER --- */
.details-content {
    background-color: #111;
    color: #aaa;
    font-size: 0.85rem;
    margin-top: 8px;
    line-height: 1.4;
    text-align: left;
    padding: 10px 20px;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
}

/* --- RESTORE BULLET INDENTATION --- */
.details-content ul {
    padding-left: 24px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.details-content li {
    margin-bottom: 6px;
}

/* --- UNIVERSAL INLINE TEXT LINKS (CYAN STYLE) --- */
.narrow-text-block a,
.card-desc-block a, 
.details-content a,
.card-footer-text a {
    font-size: 1em;
    color: #00ffcc;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 255, 204, 0.3);
    transition: all 0.2s ease-in-out;
}
.card-footer-text a {
    color: #cccccc;
    border-bottom: 1px solid rgba(204, 204, 204, 0.3);
}

.narrow-text-block a:hover,
.card-desc-block a:hover, 
.details-content a:hover {
    border-bottom-color: #00ffcc;
    text-shadow: 0 0 8px rgba(0, 255, 204, 0.4);
}
.card-footer-text a:hover {
    border-bottom-color: #cccccc;
    text-shadow: 0 0 8px rgba(204, 204, 204, 0.4);
}

/* --- AUTO-INJECT EXTERNAL LINK ARROW --- */
.narrow-text-block a[target="_blank"]::after,
.card-desc-block a[target="_blank"]::after, 
.details-content a[target="_blank"]::after,
.card-footer-text a[target="_blank"]::after {
    content: " ↗";
    font-size: 0.85em;
    padding-left: 2px;
}

/* THE ANIMATION TRIGGER */
details[open] .details-content {
    animation: terminalReveal 0.3s ease-out forwards;
}

@keyframes terminalReveal {
    0% { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* --- VISUAL-ONLY PLAYER OVERLAYS (GLASS PANE) --- */
.visual-player-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
    margin: 20px 0;
    border-radius: 4px;
    overflow: hidden;
    background: #111;
    border: 1px solid #222;
}

.visual-player-wrapper iframe {
    width: 100%;
    height: 100%;
    pointer-events: none; /* Kills all interaction inside the player */
    border: none;
}

.visual-player-wrapper .glass-pane {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    cursor: pointer;
    background: rgba(0,0,0,0);
    transition: background 0.2s;
}

.visual-player-wrapper .glass-pane:hover {
    background: rgba(0, 255, 204, 0.05); 
}

/* --- LANDING PAGE SOCIAL & MEDIA MATRIX --- */
.social-matrix-wrapper {
    grid-column: 2;
    padding: 50px 20px 0px 20px; /* 50px Top, 0px Bottom */
}

.social-matrix {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; 
    gap: 15px;
}

.social-icon {
    width: 45px; height: 45px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid #222; border-radius: 4px;
    background: #121212; color: #888;
    transition: all 0.3s ease; text-decoration: none;
}

.social-icon svg { width: 20px; height: 20px; fill: currentColor; }

.social-icon:hover { 
    background: #00ffcc; 
    color: #121212; 
    border-color: #00ffcc; 
    box-shadow: 0 0 15px rgba(0,255,204,0.3); 
}

/* --- 950px COLLECTION LIST WRAPPER --- */
.collection-grid { 
    grid-column: 2; 
    padding: 0 20px 80px 20px; 
    display: flex;
    flex-direction: column;
    gap: 40px; 
}

/* --- HORIZONTAL ROW CARDS WITH SQUARE IMAGES --- */
.project-layout-card { 
    background-color: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 8px; 
    overflow: hidden; display: flex; flex-direction: row; width: 100%;
}

.card-thumbnail { 
    width: 300px; 
    height: 300px; 
    object-fit: cover; 
    border-right: 1px solid #222; 
    flex-shrink: 0; 
}

.card-details { padding: 22px; display: flex; flex-direction: column; flex-grow: 1; }
.card-details h3 { color: #fff; font-size: 1.3rem; margin-bottom: 8px; font-weight: 700; letter-spacing: 1px; }
.details-content p { font-size: 0.95rem; color: #00ffcc; line-height: 1.6; margin-bottom: 15px; }
.card-desc-block { margin-bottom: 16px; color: #ccc; }
.log-list strong { color: #ccc; }

.meta-tag { font-size: 0.8rem; color: #00ffcc; background: #1a2925; padding: 3px 10px; align-self: flex-start; margin-bottom: 12px; border-radius: 3px; font-weight: 500; letter-spacing: 0.5px; }
.card-footer-text { font-size: 0.8rem; color: #777; margin-top: 10px; font-style: italic; font-weight: 400; }

/* --- ACTION ROUTING BUTTONS --- */
.route-link {
    align-self: flex-start; background: #1a1a1a; color: #00ffcc; 
    border: 1px solid #00ffcc; padding: 7px 16px; font-size: 0.8rem; 
    font-family: inherit; font-weight: 700; cursor: pointer; border-radius: 3px; 
    transition: all 0.2s; margin-top: auto; letter-spacing: 1.5px; text-transform: uppercase;
}
.route-link:hover { background: #00ffcc; color: #121212; box-shadow: 0 0 10px rgba(0,255,204,0.3); }

/* --- NEXT PAGE ROUTING BUTTON --- */
.next-page-wrapper {
    grid-column: 2;
    display: flex;
    justify-content: flex-end;
    padding: 20px 20px 0 20px; 
    border-top: 1px solid #222;
}

.next-page-btn {
    background: #111;
    color: #00ffcc;
    border: 1px solid #00ffcc;
    padding: 12px 24px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.next-page-btn:hover {
    background: #00ffcc;
    color: #121212;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.4);
}

/* --- COPYRIGHT TEXT --- */
.copyright-text {
    grid-column: 1 / -1; 
    text-align: center;
    color: #444; 
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 40px 20px 20px 20px;
}

/* --- FRAME 3: FOOTER RUNTIME MEDIA DECK --- */
footer { 
    background-color: #000000; 
    border-top: 2px solid #161616;
    z-index: 10; display: flex; flex-direction: column; align-items: center; position: relative; width: 100%; flex-shrink: 0; 
}
.toggle-btn-container { width: 100%; display: flex; justify-content: center; margin-top: -14px; z-index: 20; transition: opacity 0.4s ease; }
.toggle-btn-container.hidden { opacity: 0; pointer-events: none; }

.toggle-btn { background-color: #121212; color: #00ffcc; border: 2px solid #222; border-radius: 20px; padding: 4px 18px; font-family: inherit; font-size: 0.75rem; font-weight: 700; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.6); letter-spacing: 1px; }
.toggle-btn:hover { background-color: #00ffcc; color: #121212; border-color: #00ffcc; }

/* --- DYNAMIC PLAYER HEIGHT ENGINE --- */
.player-wrapper { 
    position: relative; 
    width: 100%; 
    max-width: 700px; 
    overflow: hidden; 
    transition: height 0.3s ease-in-out, padding 0.3s ease-in-out; 
    padding: 0 0 10px;
    height: 100px; 
}
iframe#master-deck-frame { position: relative; z-index: 1; width: 100%; height: 100%; border: 0; background: #000; border-radius: 4px; }

/* --- STATUS SCREENS (IDLE & LOADING) --- */
.status-overlay {
    position: absolute;
    top: -10px; left: -5px; right: -5px; bottom: 5px;
    background-color: #000;
    color: #00ffcc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    z-index: 5;
    transition: opacity 0.4s ease;
    border-radius: 4px;
}
.status-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(0, 255, 204, 0.3);
    border-top-color: #00ffcc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 12px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

.idle-indicator {
    width: 12px; height: 12px;
    background-color: #00ffcc;
    margin-right: 12px;
    border-radius: 2px;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* --- UPDATED BANDCAMP SIZING --- */
.player-wrapper[data-platform="bandcamp"] { height: 130px; }
.player-wrapper[data-platform="bandcamp"].expanded { height: 40vh; max-height: 440px; }

/* --- UPDATED YOUTUBE SIZING (16:9 Focus) --- */
.player-wrapper[data-platform="youtube"] { height: 160px; }
.player-wrapper[data-platform="youtube"].expanded { height: 40vh; max-height: 440px; }

/* --- UPDATED MIXCLOUD SIZING --- */
.player-wrapper[data-platform="mixcloud"] { height: 100px; padding-top: 14px; }
.player-wrapper[data-platform="mixcloud"].expanded { height: 130px; padding-top: 0; } 

/* --- NEW HEARTHIS.AT SIZING --- */
.player-wrapper[data-platform="hearthis"] { height: 150px; }
.player-wrapper[data-platform="hearthis"].expanded { height: 40vh; max-height: 440px; }

/* --- RESPONSIVE MOBILE WIREFRAME OVERRIDES --- */
@media (max-width: 768px) {
    
    header { 
        flex-direction: column; 
        padding: 15px 0 0 0; 
        align-items: center; 
        height: auto; 
    }
    header .logo { 
        margin-bottom: 5px; 
    }
    nav { 
        display: flex; 
        width: 100%; 
        justify-content: space-between; 
    }
    nav button { 
        margin: 0; 
        flex: 1; 
        padding: 12px 0; 
        font-size: 0.75rem; 
        letter-spacing: 1px; 
        text-align: center;
        border-bottom: 2px solid transparent; 
    }

    .banner-70 { 
        height: calc(100vh - 190px);
        height: calc(100dvh - 190px);
        max-height: 100%; 
    }
    .banner-60 { height: 60vh; } 
    .banner-heading h1 { font-size: 2.2rem; }
    .banner-heading h2 { font-size: 2rem; }
    .narrow-text-block h3 { font-size: 1.2rem; }
    .narrow-text-block h4 { font-size: 1.2rem; }
    .narrow-text-block { padding: 50px 15px; }
    
    .project-layout-card { flex-direction: column; }
    .card-thumbnail { 
        width: 100%; 
        height: auto; 
        aspect-ratio: 1 / 1; 
        border-right: none; 
        border-bottom: 1px solid #222; 
    }
    .collection-grid { padding: 0 15px 40px 15px; }
    .route-link { width: 100%; text-align: center; }
    .next-page-wrapper { justify-content: center; } 
    
    .player-wrapper { max-width: 730px; padding-left: 15px; padding-right: 15px; }
    
    .player-wrapper[data-platform="bandcamp"].expanded { height: 40vh; max-height: 440px; }
    .player-wrapper[data-platform="youtube"].expanded { height: 56vw; }
    .player-wrapper[data-platform="mixcloud"].expanded { height: 130px; }
    .player-wrapper[data-platform="hearthis"].expanded { height: 40vh; max-height: 440px; }
}
