/* xanadu.science - Neomorphic Science Instrument */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --bg-clay: #F0E0D0;
    --surface-raised: #E8D4C0;
    --surface-recessed: #D8C4B0;
    --terracotta: #C06830;
    --clay-dark: #3A2818;
    --warm-cream: #F8F0E8;
    --shadow-dark: #C0A888;
    --shadow-light: #F8EDE0;
    --text-body: #4A3828;
    --bubble-fill: rgba(192, 104, 48, 0.1);
    --bubble-border: rgba(192, 104, 48, 0.2);
}

body {
    background: var(--bg-clay);
    color: var(--clay-dark);
    font-family: 'Nunito Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.75;
    font-weight: 400;
    overflow: hidden;
    height: 100vh;
}

/* Split Screen */
.split-screen {
    display: flex;
    height: 100vh;
}
.panel-left {
    width: 45%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background: var(--bg-clay);
}
.panel-right {
    width: 55%;
    padding: 32px;
    overflow-y: auto;
    background: var(--bg-clay);
    border-left: 1px solid var(--surface-recessed);
}

/* Split divider animation */
.panel-right {
    animation: dividerReveal 0.4s ease forwards;
}
@keyframes dividerReveal {
    from { clip-path: inset(0 0 0 100%); }
    to { clip-path: inset(0 0 0 0); }
}

/* Title */
.site-title {
    font-family: 'Bungee Shade', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 400;
    color: var(--clay-dark);
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: scale(0.9);
    animation: titleScale 0.4s ease forwards 0.4s;
}
@keyframes titleScale {
    to { opacity: 1; transform: scale(1); }
}

/* VT323 Readout */
.readout {
    font-family: 'VT323', monospace;
    font-size: 1.1rem;
    color: var(--terracotta);
    letter-spacing: 0.06em;
    margin-bottom: 1.5rem;
    min-height: 1.5em;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 2rem;
}
.neo-btn {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--clay-dark);
    background: var(--bg-clay);
    border: none;
    border-radius: 8px;
    height: 48px;
    padding: 0 20px;
    text-align: left;
    cursor: pointer;
    box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    opacity: 0;
    animation: btnRise 0.3s ease forwards;
}
.neo-btn:nth-child(1) { animation-delay: 0.5s; }
.neo-btn:nth-child(2) { animation-delay: 0.6s; }
.neo-btn:nth-child(3) { animation-delay: 0.7s; }
.neo-btn:nth-child(4) { animation-delay: 0.8s; }
@keyframes btnRise {
    from { opacity: 0; box-shadow: 0 0 0 var(--shadow-dark), 0 0 0 var(--shadow-light); }
    to { opacity: 1; box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light); }
}
.neo-btn:active, .neo-btn.active {
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    transform: scale(0.98);
}

/* Bubbles Area */
.bubbles-area {
    flex: 1;
    position: relative;
    overflow: hidden;
}
.molecule-cluster {
    position: absolute;
    animation: bubbleDrift 12s ease-in-out infinite alternate;
}
.cluster-1 { top: 10%; left: 15%; animation-duration: 10s; }
.cluster-2 { top: 45%; left: 40%; animation-duration: 14s; }
.cluster-3 { bottom: 20%; left: 20%; animation-duration: 11s; }

@keyframes bubbleDrift {
    0% { transform: translate(0, 0); }
    33% { transform: translate(10px, -8px); }
    66% { transform: translate(-5px, 12px); }
    100% { transform: translate(8px, -4px); }
}
.bubble {
    position: absolute;
    border-radius: 50%;
    background: var(--bubble-fill);
    border: 1px solid var(--bubble-border);
}
.b1 { width: 40px; height: 40px; top: 0; left: 0; }
.b2 { width: 25px; height: 25px; top: 20px; left: 35px; }
.b3 { width: 30px; height: 30px; top: 0; left: 0; }
.b4 { width: 45px; height: 45px; top: 10px; left: 30px; }
.b5 { width: 20px; height: 20px; top: 40px; left: 20px; }
.b6 { width: 50px; height: 50px; top: 0; left: 0; }
.b7 { width: 30px; height: 30px; top: 30px; left: 25px; }
.bond {
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 70px;
    pointer-events: none;
}

/* Neomorphic Cards */
.neo-card {
    background: var(--warm-cream);
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
    overflow: hidden;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
    border-radius: 12px;
}
.card-header:hover {
    box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
}
.card-title {
    font-family: 'Bungee Shade', sans-serif;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 400;
    color: var(--clay-dark);
}
.card-readout {
    font-family: 'VT323', monospace;
    font-size: 1.1rem;
    color: var(--terracotta);
    letter-spacing: 0.06em;
    white-space: nowrap;
}
.card-body {
    padding: 0 20px 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}
.card-body.expanded {
    max-height: 400px;
    padding: 0 20px 20px;
}
.body-text {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 1rem;
    color: var(--text-body);
    line-height: 1.75;
}

/* Content Sections */
.content-section {
    animation: contentFade 0.3s ease;
}
@keyframes contentFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 768px) {
    .split-screen { flex-direction: column; }
    .panel-left { width: 100%; height: auto; min-height: auto; padding: 24px; }
    .panel-right { width: 100%; height: auto; border-left: none; border-top: 1px solid var(--surface-recessed); overflow-y: visible; }
    body { overflow: auto; height: auto; }
    .bubbles-area { height: 120px; }
    .nav-buttons { flex-direction: row; flex-wrap: wrap; }
    .neo-btn { flex: 1; min-width: 100px; text-align: center; }
}
