/* ==========================================================================
   ABOUT MODULE (about.css)
   Scoped to .about-archive to stay modular alongside main stylesheet
   ========================================================================== */

.about-archive {
    --about-font: inherit;
    font-family: var(--about-font);
}

/* --- ASCII Dividers --- */
.about-archive .ascii-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.35rem 0 0.25rem;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: rgba(20, 200, 180, 0.85);
    text-shadow: 0 0 8px rgba(20, 200, 180, 0.35);
    user-select: none;
    overflow: hidden;
}

.about-archive .ascii-divider::after {
    content: attr(data-ascii);
    flex: 0 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.about-archive .ascii-divider--pink {
    color: rgba(255, 100, 200, 0.85);
    text-shadow: 0 0 8px rgba(255, 100, 200, 0.35);
}

/* --- Accordion Stack --- */
.about-archive .about-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

/* --- Individual Dropdown Drawer --- */
.about-archive .about-drawer {
    --accent-rgb: 20, 200, 180;
    --accent-hex: #50ff96;

    position: relative;
    border-radius: 4px;
    border: 1px solid rgba(var(--accent-rgb), 0.38);
    background: linear-gradient(
        180deg,
        rgba(var(--accent-rgb), 0.06) 0%,
        rgba(0, 0, 0, 0.42) 100%
    );
    box-shadow:
        0 0 12px rgba(var(--accent-rgb), 0.08),
        inset 0 0 10px rgba(var(--accent-rgb), 0.03);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

/* Corner brackets */
.about-archive .about-drawer::before,
.about-archive .about-drawer::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 7px;
    border-color: rgba(var(--accent-rgb), 0.8);
    border-style: solid;
    pointer-events: none;
}

.about-archive .about-drawer::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.about-archive .about-drawer::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

.about-archive .about-drawer[open] {
    border-color: rgba(var(--accent-rgb), 0.85);
    box-shadow:
        0 0 16px rgba(var(--accent-rgb), 0.18),
        inset 0 0 12px rgba(var(--accent-rgb), 0.06);
}

/* Color Themes Matching Site Palette */
.about-archive .about-drawer--gold {
    --accent-rgb: 255, 220, 50;
    --accent-hex: #ffdc32;
}

.about-archive .about-drawer--green {
    --accent-rgb: 80, 255, 150;
    --accent-hex: #50ff96;
}

.about-archive .about-drawer--pink {
    --accent-rgb: 255, 100, 200;
    --accent-hex: #ff64c8;
}

.about-archive .about-drawer--teal {
    --accent-rgb: 20, 200, 180;
    --accent-hex: #38f2dc;
}

.about-archive .about-drawer--purple {
    --accent-rgb: 213, 128, 255;
    --accent-hex: #d580ff;
}

/* --- Clickable Dropdown Button (<summary>) --- */
.about-archive .about-summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.72rem 0.9rem;
    cursor: pointer;
    user-select: none;
    color: rgba(235, 240, 245, 0.95);
    transition:
        color 0.18s ease,
        background-color 0.18s ease,
        text-shadow 0.18s ease;
}

/* Hide default browser disclosure triangle */
.about-archive .about-summary::-webkit-details-marker {
    display: none;
}

.about-archive .about-summary::marker {
    content: "";
}

.about-archive .about-chapter-num {
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--accent-hex);
    text-shadow: 0 0 8px rgba(var(--accent-rgb), 0.45);
}

.about-archive .about-chapter-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.96rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1.25;
}

.about-archive .about-chevron {
    flex-shrink: 0;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--accent-hex);
    opacity: 0.85;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Hover, Focus & Open States */
.about-archive .about-summary:hover,
.about-archive .about-summary:focus-visible {
    color: var(--accent-hex);
    background: rgba(var(--accent-rgb), 0.1);
    text-shadow: 0 0 8px rgba(var(--accent-rgb), 0.4);
    outline: none;
}

.about-archive .about-drawer[open] > .about-summary {
    color: var(--accent-hex);
    background: rgba(var(--accent-rgb), 0.12);
    border-bottom: 1px dashed rgba(var(--accent-rgb), 0.45);
    text-shadow: 0 0 8px rgba(var(--accent-rgb), 0.4);
}

.about-archive .about-drawer[open] > .about-summary .about-chevron {
    transform: rotate(45deg);
    opacity: 1;
}

/* Respect custom cursor rule on desktop */
@media (hover: hover) and (pointer: fine) {
    .about-archive .about-summary {
        cursor: none !important;
    }
}

/* --- Expanded Story Content --- */
.about-archive .about-content {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.9rem 1rem 1rem;
    font-size: 0.94rem;
    line-height: 1.68;
    color: rgba(235, 240, 245, 0.92);
    animation: aboutDrawerReveal 0.22s ease-out;
}

.about-archive .about-content p {
    margin: 0;
    max-width: 68ch;
}

@keyframes aboutDrawerReveal {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .about-archive .ascii-divider {
        font-size: 0.62rem;
        letter-spacing: 0.08em;
    }

    .about-archive .about-summary {
        padding: 0.65rem 0.75rem;
    }

    .about-archive .about-content {
        padding: 0.8rem 0.85rem 0.9rem;
        font-size: 0.9rem;
    }
}