/* ==============================
   About Page – Retro RPG Quest Log Timeline
   ============================== */

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

body {
    font-family: 'Press Start 2P', monospace;
    background: #1a1a2e;
    color: #e0e0e0;
    min-height: 100vh;
    line-height: 1.8;
}

a { color: #7ec8e3; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Page wrapper ---------- */
.page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

/* ---------- Nav bar colors ---------- */
:root {
    --nav-bg: #16213e;
    --nav-border: #7ec8e3;
    --nav-link: #7ec8e3;
    --nav-link-hover: #fff;
    --nav-title: #e0e0e0;
}

/* ---------- Timeline container ---------- */
.timeline {
    position: relative;
    padding: 1rem 0;
}

/* Vertical connecting line */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    background: repeating-linear-gradient(
        to bottom,
        #7ec8e3 0px,
        #7ec8e3 8px,
        transparent 8px,
        transparent 16px
    );
}

/* Downward arrow at bottom of timeline */
.timeline::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 14px solid #7ec8e3;
}

/* ---------- Timeline entry ---------- */
.timeline-entry {
    position: relative;
    width: 50%;
    padding: 0 1.5rem;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeSlideIn 0.6s ease forwards;
}

/* Stagger fade-in */
.timeline-entry:nth-child(1) { animation-delay: 0.1s; }
.timeline-entry:nth-child(2) { animation-delay: 0.3s; }
.timeline-entry:nth-child(3) { animation-delay: 0.5s; }
.timeline-entry:nth-child(4) { animation-delay: 0.7s; }
.timeline-entry:nth-child(5) { animation-delay: 0.9s; }

/* Left-side entries (odd) */
.timeline-entry:nth-child(odd) {
    left: 0;
    text-align: right;
}

/* Right-side entries (even) */
.timeline-entry:nth-child(even) {
    left: 50%;
    text-align: left;
}

/* ---------- Node circle on the timeline line ---------- */
.timeline-entry::before {
    content: '';
    position: absolute;
    top: 1.2rem;
    width: 16px;
    height: 16px;
    background: #7ec8e3;
    border: 3px solid #1a1a2e;
    box-shadow: 0 0 0 3px #7ec8e3;
    z-index: 2;
}

.timeline-entry:nth-child(odd)::before {
    right: -8px;
}

.timeline-entry:nth-child(even)::before {
    left: -8px;
}

/* ---------- Dialog panel (card) ---------- */
.dialog-panel {
    background: #16213e;
    border: 3px solid #7ec8e3;
    box-shadow:
        6px 6px 0 #0f3460,
        inset 0 0 0 2px #0f3460;
    padding: 1.2rem 1.4rem;
    position: relative;
}

/* ---------- Entry heading (location) ---------- */
.entry-heading {
    font-size: var(--font-md);
    color: #e0e0e0;
    margin-bottom: 0.3rem;
}

.entry-year {
    color: #7ec8e3;
}

/* ---------- Entry description ---------- */
.entry-desc {
    font-size: var(--font-sm);
    color: #b0b0c0;
    line-height: 2;
}

/* ---------- Pixel art icons ---------- */
.pixel-icon {
    width: 4rem;
    height: 4rem;
    margin-bottom: 0.8rem;
    position: relative;
    image-rendering: pixelated;
}

/* Right-align icons for left-side entries */
.timeline-entry:nth-child(odd) .pixel-icon {
    margin-left: auto;
}

/* --- Ohio flag icon (swallowtail pennant) --- */
.icon-ohio {
    width: 5rem;
    height: 3.5rem;
    background: repeating-linear-gradient(
        to bottom,
        #cc0000 0%,
        #cc0000 20%,
        #ffffff 20%,
        #ffffff 40%,
        #cc0000 40%,
        #cc0000 60%,
        #ffffff 60%,
        #ffffff 80%,
        #cc0000 80%,
        #cc0000 100%
    );
    clip-path: polygon(
        0% 0%,
        82% 0%,
        60% 50%,
        82% 100%,
        0% 100%
    );
    position: relative;
}
/* Blue triangle */
.icon-ohio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 55%;
    height: 100%;
    background: #003366;
    clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
}
/* White "O" with red center */
.icon-ohio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 16%;
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%);
    background: #cc0000;
    border: 3px solid #ffffff;
    border-radius: 50%;
}

/* --- Danish flag icon (Dannebrog) --- */
.icon-denmark {
    width: 5rem;
    height: 3.5rem;
    background:
        linear-gradient(to right, #fff 0, #fff 100%) no-repeat 28% 0 / 10% 100%,
        linear-gradient(to bottom, #fff 0, #fff 100%) no-repeat 0 42% / 100% 16%;
    background-color: #c8102e;
}

/* --- BYU Y logo icon --- */
.icon-byu {
    background: #002e5d;
    border: 3px solid #ffffff;
}
/* White serif Y shape */
.icon-byu::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #ffffff;
    clip-path: polygon(
        /* Left arm serif */
        14% 8%,
        42% 8%,
        42% 23%,
        36% 23%,
        /* Inner left arm to crotch */
        50% 42%,
        /* Inner right arm from crotch */
        64% 23%,
        58% 23%,
        58% 8%,
        /* Right arm serif */
        86% 8%,
        86% 23%,
        78% 23%,
        /* Outer right arm to stem */
        60% 52%,
        /* Stem right edge */
        60% 78%,
        /* Stem bottom serif */
        70% 78%,
        70% 93%,
        30% 93%,
        30% 78%,
        /* Stem left edge */
        40% 78%,
        40% 52%,
        /* Outer left arm */
        22% 23%,
        14% 23%
    );
}

/* --- 1970s retro computer icon --- */
.icon-terminal {
    width: 5rem;
    height: 4.5rem;
    background: #c8b88a;
    border: 3px solid #a89868;
    border-radius: 4px 4px 0 0;
    position: relative;
}
/* Green phosphor screen inset */
.icon-terminal::before {
    content: '>BYU';
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    height: 55%;
    background: #0a2a0a;
    border: 2px solid #888;
    border-radius: 2px;
    font-size: var(--font-2xs);
    color: #33ff33;
    font-family: 'Press Start 2P', monospace;
    padding: 5px 4px;
    line-height: 1;
}
/* Keyboard base */
.icon-terminal::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: -3px;
    right: -3px;
    height: 10px;
    background: linear-gradient(to bottom, #b0a078, #a09068);
    border: 2px solid #908060;
    border-radius: 0 0 3px 3px;
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.15);
}

/* --- Lucid Software logo icon (isometric L) --- */
.icon-lucid {
    width: 4rem;
    height: 4rem;
    background: transparent;
}
/* Parallelogram - full-height left stem */
.icon-lucid::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #ffffff;
    clip-path: polygon(
        5% 22%,
        42% 2%,
        42% 76%,
        5% 96%
    );
}
/* Trapezoid - right base foot */
.icon-lucid::after {
    content: '';
    position: absolute;
    inset: 0;
    background: #ffffff;
    clip-path: polygon(
        44% 76%,
        81% 56%,
        81% 96%,
        44% 96%
    );
}

/* ---------- Current position indicator ---------- */
.current-indicator {
    display: inline-block;
    font-size: var(--font-xs);
    color: #7ec8e3;
    margin-top: 0.5rem;
}

.current-indicator::after {
    content: '█';
    animation: blink 1s step-end infinite;
    margin-left: 2px;
    vertical-align: 2px;
}

/* ---------- Connect link ---------- */
.connect-link {
    text-align: center;
    margin-top: 2rem;
    font-size: var(--font-md);
}
.connect-link a {
    color: #ffffff;
}

/* ---------- Animations ---------- */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ==============================
   Responsive: Mobile (≤ 640px)
   ============================== */
@media (max-width: 640px) {
    .page {
        padding: 1.5rem 1rem 3rem;
    }

    /* Move timeline line to the left */
    .timeline::before {
        left: 12px;
        transform: none;
    }

    .timeline::after {
        left: 12px;
        transform: translateX(-50%);
    }

    /* All entries full-width, left-aligned */
    .timeline-entry,
    .timeline-entry:nth-child(odd),
    .timeline-entry:nth-child(even) {
        width: 100%;
        left: 0;
        text-align: left;
        padding: 0 0 0 2.5rem;
    }

    /* Node circles on the left */
    .timeline-entry::before,
    .timeline-entry:nth-child(odd)::before,
    .timeline-entry:nth-child(even)::before {
        left: 4px;
        right: auto;
    }

    /* Icons always left-aligned */
    .timeline-entry:nth-child(odd) .pixel-icon {
        margin-left: 0;
    }

    .dialog-panel {
        padding: 1rem;
    }
}
