@font-face {
    font-family: "IBM Plex Sans";
    src: url("/assets/fonts/IBMPlexSans-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "IBM Plex Sans";
    src: url("/assets/fonts/IBMPlexSans-Bold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "JetBrains Mono";
    src: url("/assets/fonts/JetBrainsMono-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body.page-404 { overflow: hidden; }

body {
    background: #0d1116;
    color: #e6eaf2;
    font-family: "IBM Plex Sans", system-ui, sans-serif;
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

.content {
    max-width: 800px;
    padding: 2rem;
}

h1 {
    font-weight: 600;
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: 0.04em;
    margin-bottom: 1.2rem;
}

.subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: #b8c2d9;
    margin-bottom: 2rem;
}

.tagline {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.95rem;
    color: #8fa0c6;
    line-height: 1.8;
    letter-spacing: 0.03em;
}

.game-overview {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(143, 160, 198, 0.2);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.95rem;
    color: #b8c2d9;
    line-height: 1.7;
}

.game-overview p + p {
    margin-top: 1rem;
}

.overview-kicker {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.85rem;
    color: #8fa0c6;
    margin-top: 1.2rem;
    letter-spacing: 0.02em;
}

.author-credit {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(143, 160, 198, 0.2);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.95rem;
    color: #e6eaf2;
}

.author-credit a {
    color: #8fa0c6;
    text-decoration: none;
}

.author-credit a:hover {
    color: #e6eaf2;
}

.author-detail {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #b8c2d9;
    line-height: 1.6;
}

.error-code {
    font-family: "JetBrains Mono", monospace;
    font-weight: 600;
    font-size: clamp(6rem, 15vw, 12rem);
    letter-spacing: 0.08em;
    color: #e6eaf2;
    line-height: 1;
    margin-bottom: 1rem;
}

.home-link {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.7rem 2rem;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9rem;
    color: #e6eaf2;
    border: 1px solid #8fa0c6;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: background 0.2s, border-color 0.2s;
    pointer-events: auto;
}

.home-link:hover {
    background: rgba(143, 160, 198, 0.15);
    border-color: #e6eaf2;
}

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
}

.nav-logo {
    font-family: "JetBrains Mono", monospace;
    font-size: 1.1rem;
    color: #8fa0c6;
    text-decoration: none;
    letter-spacing: 0.06em;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: #b8c2d9;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #e6eaf2;
}

.nav-links a[aria-current="page"] {
    color: #8fa0c6;
}

.page {
    position: relative;
    z-index: 1;
    padding-top: 3.5rem;
    overflow-y: auto;
}

.route-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
    position: relative;
}

.route-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.route-updated {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.8rem;
    color: #b8c2d9;
    letter-spacing: 0.03em;
    margin-bottom: 2.5rem;
}

.route-footer {
    font-size: 0.9rem;
    color: #b8c2d9;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(143, 160, 198, 0.2);
}

.dev-plan {
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 2rem;
}

.plan-header {
    font-size: 1rem;
    font-weight: 600;
    color: #8fa0c6;
    letter-spacing: 0.04em;
    margin-bottom: 1.2rem;
    padding-left: 0;
    position: relative;
    left: -2.5rem;
}

.plan-subtitle {
    font-weight: 400;
    color: #b8c2d9;
    font-size: 0.9rem;
}

.plan-dates {
    display: block;
    font-family: "JetBrains Mono", monospace;
    font-weight: 400;
    font-size: 0.75rem;
    color: #b8c2d9;
    opacity: 0.7;
    letter-spacing: 0.03em;
    margin-top: 0.2rem;
}

.route-milestone {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 0;
    margin: 0.5rem 0;
}

.milestone-marker {
    color: #8fa0c6;
    font-size: 1.2rem;
}

.milestone-label {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.8rem;
    color: #8fa0c6;
    letter-spacing: 0.03em;
}

.star-system {
    position: relative;
    padding: 0.5rem 0;
}

.star-system::before {
    content: "";
    position: absolute;
    left: calc(-2.5rem + 8px);
    top: calc(0.85rem + 16px);
    bottom: calc(-0.5rem - 5px);
    width: 2px;
    transform: translateX(-50%);
    background: rgba(184, 194, 217, 0.2);
}

.star-system:last-child::before {
    display: none;
}

.star-system::after {
    content: "";
    position: absolute;
    left: calc(-2.5rem + 8px);
    top: 0.85rem;
    width: 16px;
    height: 16px;
    transform: translateX(-50%);
    border-radius: 50%;
    border: 2px solid #8fa0c6;
    background: #0d1116;
}

.star-system[data-status="completed"]::after {
    background: #8fa0c6;
}

.star-system[data-status="current"]::after {
    background: #8fa0c6;
    box-shadow: 0 0 8px rgba(143, 160, 198, 0.6), 0 0 20px rgba(143, 160, 198, 0.3);
    animation: ship-pulse 2s ease-in-out infinite;
}

.star-system[data-status="upcoming"]::after {
    border-color: #b8c2d9;
    opacity: 0.5;
}

@keyframes ship-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(143, 160, 198, 0.6), 0 0 20px rgba(143, 160, 198, 0.3); }
    50% { box-shadow: 0 0 12px rgba(143, 160, 198, 0.9), 0 0 30px rgba(143, 160, 198, 0.5); }
}

.phase-title {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9rem;
    font-weight: 400;
    color: #e6eaf2;
    letter-spacing: 0.03em;
}

.star-system[data-status="upcoming"] .phase-title {
    color: #b8c2d9;
    opacity: 0.7;
}

.phase-summary {
    font-size: 0.85rem;
    color: #b8c2d9;
    margin-top: 0.15rem;
}

.phase-details {
    margin-top: 0.4rem;
}

.phase-details summary {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    color: #8fa0c6;
    cursor: pointer;
    letter-spacing: 0.03em;
    list-style: none;
}

.phase-details summary::-webkit-details-marker {
    display: none;
}

.phase-details summary::before {
    content: "+ ";
}

.phase-details[open] summary::before {
    content: "- ";
}

.phase-details-body {
    margin-top: 0.4rem;
    font-size: 0.82rem;
    color: #b8c2d9;
    line-height: 1.6;
}

.phase-details-body p + p {
    margin-top: 0.5rem;
}

.star-system[data-status="upcoming"] .phase-summary {
    opacity: 0.5;
}

.reading-column {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
}

.reading-column h1 {
    margin-bottom: 1.5rem;
}

.philosophy-intro {
    color: #b8c2d9;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(143, 160, 198, 0.2);
}

.philosophy-section {
    margin-bottom: 2rem;
}

.philosophy-section h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #8fa0c6;
    letter-spacing: 0.03em;
    margin-bottom: 0.6rem;
}

.philosophy-section p {
    color: #e6eaf2;
    line-height: 1.7;
    font-size: 0.95rem;
}

.philosophy-section p + p {
    margin-top: 0.8rem;
}

.blog-post {
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(143, 160, 198, 0.2);
}

.blog-post:last-child {
    border-bottom: none;
}

.post-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #e6eaf2;
    margin-bottom: 0.3rem;
}

.post-date {
    display: block;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.8rem;
    color: #8fa0c6;
    letter-spacing: 0.03em;
    margin-bottom: 1rem;
}

.post-body {
    color: #e6eaf2;
    line-height: 1.7;
    font-size: 0.95rem;
}

.post-body p + p {
    margin-top: 0.8rem;
}

.site-footer {
    position: relative;
    z-index: 1;
    padding: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: #b8c2d9;
}

.site-footer a {
    color: #8fa0c6;
    text-decoration: none;
}

.site-footer a:hover {
    color: #e6eaf2;
}

@media (max-width: 599px) {
    .site-nav {
        gap: 1rem;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .nav-links {
        gap: 0.8rem;
    }

    .route-container {
        padding: 1.5rem 1rem 3rem;
    }

    .dev-plan {
        padding-left: 2rem;
    }

    .star-system::after {
        left: calc(-2rem + 6px);
        width: 12px;
        height: 12px;
    }

    .star-system::before {
        left: calc(-2rem + 6px);
        top: calc(0.85rem + 12px);
    }

    .plan-header {
        left: -2rem;
        font-size: 0.9rem;
    }

    .reading-column {
        padding: 1.5rem 1rem 3rem;
    }
}
