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

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background:
        linear-gradient(
            145deg,
            #111827 0%,
            #1b263b 40%,
            #2c3e50 100%
        );
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: white;
}

.card {
    width: 100%;
    max-width: 520px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 28px;
    overflow: hidden;
    backdrop-filter: blur(18px);
    box-shadow:
        0 20px 60px rgba(0,0,0,0.45),
        0 0 40px rgba(255,255,255,0.03);
}

.hero-image {
    width: 100%;
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.content {
    padding: 2.5rem 2rem;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: 0;
    margin-bottom: 0.75rem;
}

.subtitle {
    color: rgba(255,255,255,0.72);
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.links {
    display: grid;
    grid-template-rows: repeat(4, 1fr);
    gap: 1rem;
    height: calc((3.25rem * 4) + (1rem * 3));
    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
}

.links.is-changing {
    opacity: 0;
    transform: translateY(6px);
}

.links a,
.links button {
    text-decoration: none;
    color: white;
    padding: 0.95rem;
    min-height: 3.25rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
}

.links a:hover,
.links button:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-2px);
}

.links .secondary-link {
    color: rgba(255,255,255,0.72);
    background: transparent;
}

.nav-spacer {
    min-height: 3.25rem;
}

.nav-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    min-height: 3.25rem;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(5, 10, 18, 0.72);
    backdrop-filter: blur(10px);
}

.modal.is-open {
    display: flex;
}

.modal-panel {
    width: min(760px, 100%);
    max-height: min(720px, calc(100vh - 4rem));
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(18, 27, 42, 0.96);
    box-shadow: 0 24px 80px rgba(0,0,0,0.55);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}

.modal-title {
    font-size: 1rem;
    font-weight: 600;
}

.modal-close {
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: white;
    font: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255,255,255,0.16);
}

.markdown-content {
    max-height: calc(min(720px, 100vh - 4rem) - 4.5rem);
    overflow-y: auto;
    padding: 1.5rem;
    color: rgba(255,255,255,0.84);
    line-height: 1.7;
}

.markdown-content > * + * {
    margin-top: 1rem;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
    color: white;
    line-height: 1.25;
}

.markdown-content h1 {
    font-size: 1.8rem;
}

.markdown-content h2 {
    font-size: 1.2rem;
    padding-top: 0.25rem;
}

.markdown-content a {
    color: #9bd5ff;
}

.markdown-content ul,
.markdown-content ol {
    padding-left: 1.25rem;
}

.markdown-content code {
    border-radius: 6px;
    padding: 0.15rem 0.35rem;
    background: rgba(255,255,255,0.10);
}

.markdown-content pre {
    overflow-x: auto;
    border-radius: 12px;
    padding: 1rem;
    background: rgba(0,0,0,0.28);
}

.markdown-content pre code {
    padding: 0;
    background: transparent;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.markdown-content th,
.markdown-content td {
    padding: 0.65rem 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    text-align: left;
    vertical-align: top;
}

.markdown-content th {
    color: white;
    font-weight: 600;
}

.markdown-content img {
    width: 100%;
    height: auto;
    max-height: 55vh;
    object-fit: contain;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.18);
}

@media (max-width: 600px) {
    body {
        padding: 1rem;
    }

    .content {
        padding: 2rem 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    .modal {
        padding: 1rem;
    }

    .modal-panel {
        max-height: calc(100vh - 2rem);
        border-radius: 20px;
    }

    .markdown-content {
        max-height: calc(100vh - 6.5rem);
        padding: 1.25rem;
    }

    .markdown-content table {
        display: block;
        overflow-x: auto;
    }
}
