/* npc.quest - Neubrutalism / Timeline-Vertical / Dreamy-Ethereal */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #FAFAFA;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: #333333;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Header */
#site-header {
    text-align: center;
    padding: 80px 20px 60px;
}

.site-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 56px;
    color: #000000;
    letter-spacing: -0.01em;
    line-height: 1.1;
    margin-bottom: 8px;
}

.site-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-style: italic;
    font-size: 16px;
    color: #666666;
}

/* Timeline Container */
#timeline-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

/* Timeline Line */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 0;
    background: #000000;
    transform: translateX(-50%);
    transition: height 800ms ease;
}

.timeline-line.drawn {
    height: 100%;
}

/* Timeline Entry */
.timeline-entry {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(40px);
}

.timeline-entry.visible {
    opacity: 1;
    transform: translateY(0);
    animation: springIn 600ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes springIn {
    0% { opacity: 0; transform: translateY(40px); }
    70% { opacity: 1; transform: translateY(-4px); }
    100% { opacity: 1; transform: translateY(0); }
}

.timeline-entry.left {
    flex-direction: row-reverse;
    padding-right: calc(50% + 60px);
    padding-left: 20px;
}

.timeline-entry.right {
    padding-left: calc(50% + 60px);
    padding-right: 20px;
}

/* Timeline Node */
.timeline-node {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.node-circle {
    width: 12px;
    height: 12px;
    background: #000000;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-entry.visible .node-circle,
.timeline-specimen.visible .node-circle {
    transform: scale(1);
}

/* Node Leaves */
.node-leaf {
    position: absolute;
    top: -4px;
    width: 20px;
    height: 28px;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 500ms ease 200ms;
}

.timeline-entry.visible .node-leaf {
    stroke-dashoffset: 0;
}

.leaf-left {
    right: 16px;
    transform: rotate(-40deg);
}

.leaf-right {
    left: 16px;
    transform: rotate(40deg);
}

/* Timeline Branch */
.timeline-branch {
    position: absolute;
    top: 5px;
    width: 40px;
    height: 2px;
    background: #000000;
}

.timeline-entry.left .timeline-branch {
    left: calc(50% + 6px);
}

.timeline-entry.right .timeline-branch {
    right: calc(50% + 6px);
}

/* Timeline Card */
.timeline-card {
    background: #FFFFFF;
    border: 3px solid #000000;
    padding: 24px;
    position: relative;
    transform: rotate(var(--rotation, 0deg));
    transition: box-shadow 200ms cubic-bezier(0.34, 1.56, 0.64, 1), transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 0 #000000;
    width: 100%;
}

.timeline-card:hover {
    box-shadow: 0 8px 0 #000000;
    transform: rotate(calc(var(--rotation, 0deg) * 2)) translateY(-4px);
}

.card-date {
    font-family: 'Inconsolata', monospace;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: #666666;
    display: block;
    margin-bottom: 8px;
}

.card-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: #000000;
    margin-bottom: 12px;
    line-height: 1.2;
}

.card-body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: #333333;
}

.card-illustration {
    margin-top: 16px;
    text-align: center;
}

.card-illustration svg {
    width: 80px;
    height: auto;
}

/* Timeline Specimen */
.timeline-specimen {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(40px);
}

.timeline-specimen.visible {
    opacity: 1;
    transform: translateY(0);
    animation: springIn 600ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.specimen-art {
    width: 60px;
    height: 80px;
    margin-left: 40px;
}

/* Disabled state utility */
.disabled-element {
    color: #999999;
    border-color: #C0C0C0;
}

/* Hover highlight alternate */
.timeline-card:hover .card-date {
    background: #E0E0E0;
    display: inline-block;
    padding: 0 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .site-title {
        font-size: 30px;
    }

    .timeline-line {
        left: 24px;
    }

    .timeline-node {
        left: 24px;
    }

    .timeline-entry.left,
    .timeline-entry.right {
        padding-left: 80px;
        padding-right: 20px;
        flex-direction: row;
    }

    .timeline-entry.left .timeline-branch,
    .timeline-entry.right .timeline-branch {
        left: 30px;
        right: auto;
        width: 16px;
    }

    .timeline-card {
        --rotation: 0deg !important;
    }

    .timeline-card:hover {
        transform: translateY(-4px);
    }

    .card-title {
        font-size: 20px;
    }

    .leaf-left {
        right: auto;
        left: 16px;
        transform: rotate(40deg);
    }
}

@media (max-width: 480px) {
    #site-header {
        padding: 40px 16px 30px;
    }

    .site-title {
        font-size: 28px;
    }

    .timeline-entry.left,
    .timeline-entry.right {
        padding-left: 60px;
        padding-right: 12px;
    }
}
