/* ===========================================
   logical.day - Goblincore Alchemist Workshop
   =========================================== */

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    line-height: 1.75;
    color: #3A2A1A;
    background-color: #1A2A1A;
    overflow-x: hidden;
}

/* ---- Retro Mushroom/Beetle/Logic Background Pattern ---- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.05;
    background-image:
        /* Mushroom caps */
        radial-gradient(ellipse 8px 6px at 50px 50px, #C4A878 50%, transparent 50%),
        radial-gradient(ellipse 6px 5px at 150px 100px, #C4A878 50%, transparent 50%),
        radial-gradient(ellipse 10px 7px at 250px 70px, #C4A878 50%, transparent 50%),
        radial-gradient(ellipse 7px 5px at 350px 130px, #C4A878 50%, transparent 50%),
        /* Mushroom stems */
        radial-gradient(ellipse 3px 5px at 50px 57px, #8A7060 50%, transparent 50%),
        radial-gradient(ellipse 2px 4px at 150px 106px, #8A7060 50%, transparent 50%),
        radial-gradient(ellipse 3px 5px at 250px 78px, #8A7060 50%, transparent 50%),
        radial-gradient(ellipse 2px 4px at 350px 136px, #8A7060 50%, transparent 50%),
        /* Beetle shapes */
        radial-gradient(ellipse 5px 3px at 100px 200px, #3A2A1A 50%, transparent 50%),
        radial-gradient(ellipse 4px 3px at 300px 180px, #3A2A1A 50%, transparent 50%),
        /* Logic symbol dots (bioluminescent) */
        radial-gradient(circle 2px at 80px 80px, #7ACC6A 50%, transparent 50%),
        radial-gradient(circle 1.5px at 220px 150px, #7ACC6A 50%, transparent 50%),
        radial-gradient(circle 2px at 320px 50px, #7ACC6A 50%, transparent 50%),
        radial-gradient(circle 1px at 180px 230px, #7ACC6A 50%, transparent 50%);
    background-size: 400px 280px;
    background-repeat: repeat;
}

/* ---- Hero / Opening Sequence ---- */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1A2A1A;
    overflow: hidden;
    z-index: 1;
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    opacity: 0;
    animation: heroFadeIn 2s ease-out 0.5s forwards;
}

#hero-title {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(3rem, 8vw, 7rem);
    color: #C4A878;
    letter-spacing: 0.05em;
    text-shadow:
        0 0 40px rgba(122, 204, 106, 0.3),
        0 0 80px rgba(122, 204, 106, 0.1),
        2px 2px 0 #2A1A0A;
    transform: rotate(-2deg);
}

#hero-subtitle {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: #8A7060;
    margin-top: 0.5em;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

#hero-sigil {
    margin-top: 1.5em;
    opacity: 0;
    animation: sigilFadeIn 1.5s ease-out 2s forwards;
}

.sigil-svg {
    filter: drop-shadow(0 0 8px rgba(122, 204, 106, 0.3));
}

.sigil-dot {
    animation: sigilPulse 3s ease-in-out infinite;
}

@keyframes sigilPulse {
    0%, 100% { opacity: 0.2; r: 4; }
    50% { opacity: 0.6; r: 6; }
}

@keyframes sigilFadeIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 0.6; transform: translateY(0); }
}

@keyframes heroFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Mushroom Shelf Navigation ---- */
#mushroom-nav {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 8px;
    background: linear-gradient(180deg, #2A1A0A 0%, #3A2A1A 50%, #2A1A0A 100%);
    border-right: 2px solid #8A7060;
    border-radius: 0 8px 8px 0;
    opacity: 0;
    animation: navSlideIn 0.8s ease-out 2.5s forwards;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.4);
}

@keyframes navSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-50%) translateX(-100%);
    }
    100% {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.shelf-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 6px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.shelf-segment::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #8A7060, transparent);
}

.shelf-segment:first-child::before {
    display: none;
}

.shelf-segment:hover {
    background-color: rgba(122, 204, 106, 0.1);
}

.shelf-segment.active {
    background-color: rgba(122, 204, 106, 0.15);
    box-shadow: 0 0 20px rgba(122, 204, 106, 0.3);
}

.shelf-segment.active .mushroom-icon {
    filter: drop-shadow(0 0 6px rgba(122, 204, 106, 0.6));
}

.shelf-segment.active .spore {
    animation: sporePulse 2s ease-in-out infinite;
}

@keyframes sporePulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.9; }
}

.mushroom-icon {
    width: 32px;
    height: 32px;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.shelf-segment:hover .mushroom-icon {
    transform: scale(1.1);
}

.shelf-label {
    font-family: 'Nunito', sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    color: #C4A878;
    text-align: center;
    margin-top: 2px;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

/* ---- Cork Board Dashboard ---- */
#cork-board {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px 60px 100px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: auto;
    gap: 30px;
    background:
        linear-gradient(135deg, #C4A878 0%, #b89c6a 25%, #C4A878 50%, #b89c6a 75%, #C4A878 100%);
    background-size: 200px 200px;
    border: 4px solid #8A7060;
    border-radius: 8px;
    box-shadow:
        inset 0 0 60px rgba(42, 26, 10, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.5);
    min-height: 100vh;
    opacity: 0;
    transition: opacity 1.2s ease-out;
}

#cork-board.board-visible {
    opacity: 1;
}

/* Cork texture overlay */
#cork-board::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle 1px at 20% 30%, rgba(42, 26, 10, 0.2) 50%, transparent 50%),
        radial-gradient(circle 1.5px at 40% 60%, rgba(42, 26, 10, 0.15) 50%, transparent 50%),
        radial-gradient(circle 1px at 60% 20%, rgba(42, 26, 10, 0.2) 50%, transparent 50%),
        radial-gradient(circle 2px at 80% 70%, rgba(42, 26, 10, 0.1) 50%, transparent 50%),
        radial-gradient(circle 1px at 10% 80%, rgba(42, 26, 10, 0.15) 50%, transparent 50%),
        radial-gradient(circle 1.5px at 70% 40%, rgba(42, 26, 10, 0.2) 50%, transparent 50%),
        radial-gradient(circle 0.8px at 50% 90%, rgba(42, 26, 10, 0.12) 50%, transparent 50%),
        radial-gradient(circle 1.2px at 30% 50%, rgba(42, 26, 10, 0.18) 50%, transparent 50%);
    background-size: 60px 60px;
    pointer-events: none;
    border-radius: 4px;
    z-index: 0;
}

/* ---- Bark Texture Dividers ---- */
.bark-divider {
    grid-column: 1 / -1;
    height: 14px;
    background:
        linear-gradient(90deg,
            #2A1A0A 0%, #3A2A1A 8%, #8A7060 15%, #3A2A1A 22%,
            #2A1A0A 30%, #5a4a3a 38%, #8A7060 45%, #2A1A0A 52%,
            #3A2A1A 60%, #8A7060 68%, #2A1A0A 75%, #5a4a3a 82%,
            #8A7060 90%, #2A1A0A 95%, #3A2A1A 100%);
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(196, 168, 120, 0.2);
    position: relative;
    z-index: 1;
}

.bark-divider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5%;
    right: 5%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(196, 168, 120, 0.15) 20%, transparent 40%, rgba(196, 168, 120, 0.1) 60%, transparent 80%);
    border-radius: 1px;
}

/* ---- Specimen Widget ---- */
.specimen-widget {
    position: relative;
    z-index: 1;
    background:
        linear-gradient(145deg, rgba(255, 253, 240, 0.92) 0%, rgba(240, 230, 210, 0.95) 100%);
    border: 1px solid #8A7060;
    border-radius: 3px;
    padding: 30px 20px 20px;
    box-shadow:
        2px 3px 10px rgba(0, 0, 0, 0.25),
        inset 0 0 20px rgba(196, 168, 120, 0.2);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
    opacity: 0;
    transform: translateY(-60px) rotate(0deg);
}

/* Aged paper texture with ruled lines */
.specimen-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 28px,
            rgba(196, 168, 120, 0.08) 28px,
            rgba(196, 168, 120, 0.08) 29px
        );
    pointer-events: none;
    border-radius: 3px;
}

/* Aged stain effect */
.specimen-widget::after {
    content: '';
    position: absolute;
    top: 10%;
    right: 5%;
    width: 60%;
    height: 60%;
    background: radial-gradient(ellipse at center, rgba(196, 168, 120, 0.06) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 50%;
}

.specimen-widget:hover {
    box-shadow:
        2px 3px 10px rgba(0, 0, 0, 0.25),
        0 0 20px rgba(122, 204, 106, 0.3),
        inset 0 0 20px rgba(196, 168, 120, 0.2);
}

.specimen-widget.visible {
    opacity: 1;
    transform: translateY(0) rotate(var(--rotation, 0deg));
    transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.specimen-widget.visible:hover {
    transform: rotate(0deg) scale(1.02);
}

/* Widget sizes on the grid */
.widget-large {
    grid-column: span 2;
}

.widget-medium {
    grid-column: span 2;
}

.widget-small {
    grid-column: span 1;
}

/* Widget rotations for cork-board feel */
.specimen-widget:nth-child(odd) {
    --rotation: 1.2deg;
}

.specimen-widget:nth-child(even) {
    --rotation: -0.8deg;
}

.specimen-widget:nth-child(3n) {
    --rotation: 1.8deg;
}

.specimen-widget:nth-child(4n+1) {
    --rotation: -1.5deg;
}

.specimen-widget:nth-child(5n+2) {
    --rotation: 2.1deg;
}

.specimen-widget:nth-child(7n) {
    --rotation: -1.1deg;
}

/* ---- Specimen Pin ---- */
.specimen-pin {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #e8e0d0, #8A7060 40%, #5a4a3a 100%);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    z-index: 10;
}

.specimen-pin::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, #D4A830, #8A7060);
    box-shadow: 0 0 4px rgba(212, 168, 48, 0.4);
}

/* ---- Specimen Label ---- */
.specimen-label {
    position: absolute;
    top: 8px;
    right: 12px;
    z-index: 5;
}

.label-text {
    display: inline-block;
    font-family: 'Permanent Marker', cursive;
    font-size: 0.7rem;
    color: #2A1A0A;
    background: #e8dcc8;
    border: 1px solid #8A7060;
    padding: 2px 8px;
    border-radius: 2px;
    transform: rotate(3deg);
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease, color 0.3s ease;
}

.specimen-widget:hover .label-text {
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2), 0 0 8px rgba(122, 204, 106, 0.3);
    color: #1A2A1A;
}

.label-string {
    position: absolute;
    top: -12px;
    right: 20px;
    width: 40px;
    height: 20px;
    opacity: 0.6;
}

/* ---- Widget Typography ---- */
.widget-title {
    font-family: 'Permanent Marker', cursive;
    font-weight: 400;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    color: #2A1A0A;
    margin-bottom: 12px;
    line-height: 1.2;
}

.widget-content p {
    color: #3A2A1A;
    margin-bottom: 12px;
}

.widget-content h3 {
    font-family: 'Permanent Marker', cursive;
    font-weight: 400;
    font-size: 1.2rem;
    color: #2A1A0A;
    margin-bottom: 6px;
}

.specimen-note {
    font-style: italic;
    font-weight: 300;
    color: #8A7060;
    font-size: 0.9em;
}

.specimen-note-code {
    color: #8A7060 !important;
    font-style: italic;
    text-shadow: none !important;
    font-size: 0.85em;
}

/* ---- Logic Code Blocks ---- */
.logic-code {
    background: #1A2A1A;
    border: 1px solid #8A7060;
    border-radius: 4px;
    padding: 14px 16px;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* Subtle scanline effect on code blocks */
.logic-code::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(122, 204, 106, 0.02) 2px,
        rgba(122, 204, 106, 0.02) 4px
    );
    pointer-events: none;
}

.logic-code code {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    color: #7ACC6A;
    font-size: 0.95em;
    line-height: 1.6;
    text-shadow: 0 0 8px rgba(122, 204, 106, 0.4);
    position: relative;
    z-index: 1;
}

.logic-code .premise {
    color: #C4A878;
    text-shadow: none;
}

.logic-code .divider-line {
    color: #8A7060;
    opacity: 0.6;
}

.logic-code .conclusion {
    color: #7ACC6A;
    font-weight: 400;
    text-shadow: 0 0 12px rgba(122, 204, 106, 0.5);
}

.logic-code .step .step-num {
    color: #D4A830;
    margin-right: 4px;
}

.logic-code .step.conclusion {
    color: #D4A830;
    text-shadow: 0 0 10px rgba(212, 168, 48, 0.4);
}

/* ---- Truth Table ---- */
.truth-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
    margin: 10px 0;
}

.truth-table thead {
    background: #1A2A1A;
}

.truth-table th {
    color: #C4A878;
    padding: 8px 10px;
    text-align: center;
    border-bottom: 2px solid #8A7060;
    font-weight: 400;
    letter-spacing: 0.05em;
}

.truth-table td {
    text-align: center;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(138, 112, 96, 0.3);
    transition: text-shadow 0.3s ease, transform 0.2s ease;
}

.truth-table tbody tr {
    transition: background-color 0.3s ease;
}

.truth-table tbody tr:hover {
    background-color: rgba(122, 204, 106, 0.08);
}

.val-true {
    color: #7ACC6A;
    text-shadow: 0 0 6px rgba(122, 204, 106, 0.3);
    font-weight: 600;
}

.val-false {
    color: #D4A830;
    font-weight: 400;
}

/* ---- Gate SVG Animations ---- */
.gate-animation {
    margin: 10px 0;
    display: flex;
    justify-content: center;
}

.gate-svg {
    width: 100%;
    max-width: 240px;
    height: auto;
}

.gate-svg .gate-body {
    transition: stroke 0.3s ease, filter 0.3s ease;
}

.specimen-widget:hover .gate-svg .gate-body {
    stroke: #D4A830;
    filter: drop-shadow(0 0 4px rgba(212, 168, 48, 0.3));
}

.specimen-widget:hover .gate-svg .output-dot {
    opacity: 1;
    animation: outputPulse 1.2s ease-in-out infinite;
}

.specimen-widget:hover .gate-svg .not-bubble {
    stroke: #D4A830;
    animation: bubblePulse 1s ease-in-out infinite;
}

@keyframes outputPulse {
    0%, 100% {
        r: 5;
        opacity: 0.6;
    }
    50% {
        r: 8;
        opacity: 1;
    }
}

@keyframes bubblePulse {
    0%, 100% {
        r: 7;
    }
    50% {
        r: 9;
    }
}

/* ---- De Morgan Visual ---- */
.demorgan-svg {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 10px auto;
    display: block;
}

/* ---- Glitch Art Symbols ---- */
.glitch-symbol {
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-family: 'Fira Code', monospace;
    font-size: 2.5rem;
    line-height: 1;
    pointer-events: none;
    opacity: 0.12;
    transition: opacity 0.3s ease;
}

.glitch-layer {
    position: absolute;
    top: 0;
    left: 0;
}

.glitch-r {
    color: #ff0000;
    opacity: 0.7;
}

.glitch-g {
    color: #00ff00;
    opacity: 0.7;
}

.glitch-b {
    color: #0000ff;
    opacity: 0.7;
}

.specimen-widget:hover .glitch-symbol {
    opacity: 0.4;
    animation: glitchShake 0.3s ease-in-out;
}

.specimen-widget:hover .glitch-r {
    animation: glitchR 0.2s ease-in-out infinite alternate;
}

.specimen-widget:hover .glitch-g {
    animation: glitchG 0.15s ease-in-out infinite alternate;
}

.specimen-widget:hover .glitch-b {
    animation: glitchB 0.25s ease-in-out infinite alternate;
}

@keyframes glitchShake {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-2px, 1px); }
    50% { transform: translate(2px, -1px); }
    75% { transform: translate(-1px, 2px); }
}

@keyframes glitchR {
    0% { transform: translate(-2px, -1px); }
    100% { transform: translate(2px, 1px); }
}

@keyframes glitchG {
    0% { transform: translate(1px, 2px); }
    100% { transform: translate(-1px, -2px); }
}

@keyframes glitchB {
    0% { transform: translate(2px, -2px); }
    100% { transform: translate(-2px, 2px); }
}

/* ---- Glow Indicators ---- */
.glow-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 8px;
}

.glow-true {
    background: #7ACC6A;
    box-shadow: 0 0 10px rgba(122, 204, 106, 0.5), 0 0 20px rgba(122, 204, 106, 0.2);
    animation: glowPulseTrue 2s ease-in-out infinite;
}

.glow-false {
    background: #D4A830;
    box-shadow: 0 0 10px rgba(212, 168, 48, 0.4), 0 0 20px rgba(212, 168, 48, 0.15);
    animation: glowPulseFalse 2s ease-in-out infinite;
}

@keyframes glowPulseTrue {
    0%, 100% { box-shadow: 0 0 10px rgba(122, 204, 106, 0.5), 0 0 20px rgba(122, 204, 106, 0.2); }
    50% { box-shadow: 0 0 15px rgba(122, 204, 106, 0.7), 0 0 30px rgba(122, 204, 106, 0.3); }
}

@keyframes glowPulseFalse {
    0%, 100% { box-shadow: 0 0 10px rgba(212, 168, 48, 0.4), 0 0 20px rgba(212, 168, 48, 0.15); }
    50% { box-shadow: 0 0 15px rgba(212, 168, 48, 0.6), 0 0 30px rgba(212, 168, 48, 0.25); }
}

/* ---- Dual Specimen Layout ---- */
.dual-specimen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.specimen-half {
    padding: 10px;
    border: 1px dashed rgba(138, 112, 96, 0.4);
    border-radius: 4px;
    position: relative;
}

.tautology-half {
    border-color: rgba(122, 204, 106, 0.2);
}

.contradiction-half {
    border-color: rgba(212, 168, 48, 0.2);
}

/* ---- Footer ---- */
#workshop-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 50px 20px 40px;
    background: #1A2A1A;
    border-top: 3px solid #8A7060;
}

.footer-fungi {
    margin-bottom: 20px;
    opacity: 0.5;
}

.fungi-cluster {
    width: 200px;
    height: 50px;
}

.footer-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    color: #8A7060;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}

.footer-glow {
    font-family: 'Fira Code', monospace;
    color: #7ACC6A;
    font-size: 0.85rem;
    margin-top: 8px;
    text-shadow: 0 0 10px rgba(122, 204, 106, 0.4);
    opacity: 0.7;
}

.footer-beetles {
    margin-top: 16px;
    opacity: 0.3;
}

.beetle-row {
    width: 160px;
    height: 20px;
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
    #cork-board {
        grid-template-columns: repeat(2, 1fr);
        padding: 40px 30px 40px 80px;
    }

    .widget-large,
    .widget-medium {
        grid-column: span 2;
    }

    .widget-small {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    #mushroom-nav {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        flex-direction: row;
        justify-content: space-around;
        border-right: none;
        border-top: 2px solid #8A7060;
        border-radius: 8px 8px 0 0;
        padding: 6px 10px;
        animation-name: navSlideUp;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
    }

    @keyframes navSlideUp {
        0% {
            opacity: 0;
            transform: translateY(100%);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .shelf-segment::before {
        display: none;
    }

    .shelf-label {
        font-size: 0.5rem;
    }

    .mushroom-icon {
        width: 24px;
        height: 24px;
    }

    #cork-board {
        grid-template-columns: 1fr;
        padding: 30px 16px 80px;
    }

    .widget-large,
    .widget-medium,
    .widget-small {
        grid-column: span 1;
    }

    .dual-specimen {
        grid-template-columns: 1fr;
    }

    .widget-title {
        font-size: clamp(1.4rem, 3vw, 2rem);
    }
}

@media (max-width: 480px) {
    #hero-title {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }

    .truth-table {
        font-size: 0.75em;
    }

    .truth-table th,
    .truth-table td {
        padding: 4px 6px;
    }

    .logic-code {
        padding: 10px 12px;
    }

    .logic-code code {
        font-size: 0.85em;
    }

    .glitch-symbol {
        font-size: 1.8rem;
    }
}
