/* memorial.wiki - CSS */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Literata", serif;
    background-color: #0E0A0F;
    color: #B8A498;
    line-height: 1.85;
    overflow-x: hidden;
}

/* Particles Container */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background-color: #C4A47A;
    will-change: transform, opacity;
}

@keyframes float {
    from {
        transform: translateY(0);
        opacity: var(--start-opacity);
    }
    to {
        transform: translateY(-110vh);
        opacity: 0;
    }
}

/* Main Content */
.memorial-main {
    position: relative;
    z-index: 1;
    max-width: 100vw;
    padding: 40px;
    margin: 0 auto;
}

/* Memorial Entry Articles */
.entry {
    position: relative;
    margin-bottom: 0;
    margin-left: var(--offset-x);
    width: var(--entry-width);
    opacity: 0;
    animation: fadeIn 1500ms ease-in-out forwards;
}

.entry:not(:first-child) {
    animation-delay: 800ms;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Radial Glow Behind Name */
.entry-glow {
    position: absolute;
    top: 0;
    left: -100px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle at 50% 50%, rgba(122, 46, 58, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

/* Entry Icon */
.entry-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.entry-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Entry Name */
.entry-name {
    font-family: "Literata", serif;
    font-size: clamp(1.5rem, 3vw, 3rem);
    font-weight: 600;
    color: #E8D4C4;
    line-height: 1.2;
    margin-bottom: 16px;
    margin-top: 0;
}

/* Entry Text */
.entry-text {
    font-family: "Literata", serif;
    font-size: 0.9rem;
    font-weight: 300;
    color: #B8A498;
    line-height: 1.85;
    max-width: 42ch;
    margin: 0 0 24px 0;
}

/* Entry Date */
.entry-date {
    font-family: "Inter", sans-serif;
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 0.06em;
    color: #7A6A5E;
    text-transform: none;
}

/* Entry SVG Line */
.entry-line {
    position: absolute;
    left: -20px;
    top: 0;
    z-index: -1;
}

.entry-line path {
    stroke-dasharray: var(--dash-array, 300);
    stroke-dashoffset: var(--dash-array, 300);
    animation: drawPath 2000ms ease-in-out forwards;
}

.entry.visible .entry-line path {
    animation: drawPath 2000ms ease-in-out forwards;
}

@keyframes drawPath {
    from {
        stroke-dashoffset: var(--dash-array, 300);
    }
    to {
        stroke-dashoffset: 0;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 1px;
    height: 60px;
    background-color: #7A2E3A;
    opacity: 0.2;
    z-index: 2;
}

.scroll-progress {
    position: absolute;
    top: 0;
    left: -1.5px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #7A2E3A;
    transition: transform 200ms ease-out;
}

/* Responsive Design - Tablet and Mobile */
@media (max-width: 768px) {
    .memorial-main {
        padding: 80px 20px;
    }

    .entry {
        margin-left: calc(50% - var(--entry-width) / 2) !important;
        width: calc(var(--entry-width) * 0.9);
    }

    .entry-name {
        font-size: clamp(1.3rem, 2.5vw, 2.2rem);
    }

    .entry-text {
        font-size: 0.85rem;
    }

    .entry-line {
        width: 80px;
        opacity: 0.3;
    }

    .scroll-indicator {
        display: none;
    }

    .particles {
        opacity: 0.7;
    }
}

@media (max-width: 480px) {
    .memorial-main {
        padding: 60px 16px;
    }

    .entry {
        margin-left: calc(50% - var(--entry-width) / 2) !important;
        width: calc(var(--entry-width) * 0.85);
    }

    .entry-name {
        font-size: clamp(1.2rem, 2vw, 1.8rem);
    }

    .entry-text {
        font-size: 0.8rem;
        max-width: 35ch;
    }

    .entry-date {
        font-size: 0.6rem;
    }

    .entry-icon {
        width: 20px;
        height: 20px;
    }

    .entry-line {
        width: 60px;
        opacity: 0.25;
    }
}
