:root {
    --bg: #0b1220;
    --card: rgba(20, 31, 50, 0.86);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --muted-soft: #94a3b8;
    --primary: #38bdf8;
    --primary-strong: #3b82f6;
    --border: rgba(148, 163, 184, 0.22);
    --max-width: 1180px;
}

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

body {
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 18% 16%, rgba(56, 189, 248, 0.18), transparent 28rem),
        radial-gradient(circle at 82% 20%, rgba(99, 102, 241, 0.16), transparent 32rem),
        radial-gradient(circle at 18% 88%, rgba(99, 102, 241, 0.16), transparent 30rem),
        var(--bg);
    color: var(--text);
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(circle at center, black, transparent 76%);
}

a {
    color: inherit;
    text-decoration: none;
}

.page {
    width: min(100% - 2rem, var(--max-width));
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.3rem;
    padding: 3rem 0;
}

.site-nav {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-end;
}

.nav-link,
.language-option {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.26);
    color: var(--muted);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-link[aria-current="page"],
.language-option:hover,
.language-option.is-active {
    background: rgba(255, 255, 255, 0.075);
    color: var(--text);
}

.language-switcher {
    display: inline-flex;
    gap: 0.3rem;
    align-items: center;
    padding: 0.22rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.22);
}

.language-option {
    min-height: 30px;
    padding: 0.25rem 0.52rem;
    border-color: transparent;
    background: transparent;
    font-size: 0.78rem;
    font-weight: 800;
}

.card {
    position: relative;
    overflow: hidden;
    padding: clamp(1.6rem, 5vw, 4rem);
    border-radius: 34px;
    background:
        radial-gradient(circle at 86% 20%, rgba(59, 130, 246, 0.22), transparent 28rem),
        radial-gradient(circle at 10% 94%, rgba(124, 58, 237, 0.20), transparent 24rem),
        linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.92)),
        var(--card);
    border: 1px solid var(--border);
    box-shadow:
        0 34px 95px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 36%),
        radial-gradient(circle at 92% 15%, rgba(255, 255, 255, 0.12), transparent 9rem);
    opacity: 0.75;
}
.content {
    position: relative;
    z-index: 1;
}

.hero-content {
    display: flex;
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: flex-start;
}

.hero-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.profile-photo-panel {
    flex: 0 0 auto;
    margin-top: 0.2rem;
    padding: 0.35rem;
    border: 1px solid rgba(226, 232, 240, 0.24);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.34);
    box-shadow:
        0 18px 42px rgba(2, 6, 23, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.profile-photo {
    display: block;
    width: clamp(6rem, 12vw, 8.5rem);
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
}

.profile-photo-panel[hidden] {
    display: none;
}

.label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 2rem;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.35);
    color: #dbeafe;
    font-size: 0.98rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.label::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--primary-strong);
    box-shadow: 0 0 18px rgba(59, 130, 246, 0.9);
}

h1 {
    max-width: 820px;
    font-size: clamp(3.2rem, 8vw, 6.6rem);
    line-height: 0.92;
    letter-spacing: -0.055em;
    margin-bottom: 1.65rem;
}

h2 {
    max-width: 760px;
    margin-bottom: 1rem;
    font-size: 3.2rem;
    line-height: 1;
    letter-spacing: 0;
}

h3 {
    margin-bottom: 0.45rem;
    font-size: 1.35rem;
    line-height: 1.2;
}

.error-card {
    text-align: center;
}

.error-content {
    display: grid;
    justify-items: center;
    padding-block: clamp(1rem, 4vw, 2.5rem);
}

.error-code {
    margin-bottom: 1rem;
    color: #dbeafe;
    font-size: clamp(5rem, 18vw, 11rem);
    font-weight: 800;
    line-height: 0.85;
    letter-spacing: 0;
    text-shadow: 0 20px 50px rgba(37, 99, 235, 0.3);
}

.error-heading {
    margin-bottom: 1rem;
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    letter-spacing: 0;
}

.error-message {
    margin-bottom: 2rem;
}

.intro {
    max-width: 780px;
    color: var(--muted);
    font-size: clamp(1.12rem, 2.15vw, 1.45rem);
    margin-bottom: 2.2rem;
}

.section-card {
    padding-block: 3rem;
}

.section-intro {
    max-width: 760px;
    margin-bottom: 1.7rem;
    color: var(--muted);
    font-size: 1.08rem;
}

.tutorial-card {
    padding-bottom: clamp(2rem, 5vw, 4.5rem);
}

.tutorial-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 3rem;
}

.tutorial-toc a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--muted);
    font-size: 0.9rem;
    transition: 0.2s ease;
}

.tutorial-toc a:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.tutorial-section {
    padding-top: 2.5rem;
    margin-top: 2.5rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.22);
}

.tutorial-section:first-of-type {
    padding-top: 0;
    margin-top: 0;
    border-top: 0;
}

.notice-box + .tutorial-section:first-of-type {
    margin-top: 2.5rem;
}

.demo-section:first-of-type {
    padding-top: 3rem;
    margin-top: 2.4rem;
}

.tutorial-section p {
    max-width: 860px;
    margin-bottom: 1rem;
    color: var(--muted);
}

.text-link {
    color: #bae6fd;
    border-bottom: 1px solid rgba(186, 230, 253, 0.38);
}

.text-link:hover {
    color: var(--text);
    border-bottom-color: rgba(248, 250, 252, 0.7);
}

.inline-code {
    padding: 0.15rem 0.38rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.52);
    color: #dbeafe;
    font-size: 0.92em;
}

.check-list {
    display: grid;
    gap: 0.72rem;
    max-width: 860px;
    margin: 1.2rem 0 1.4rem;
    padding-left: 1.2rem;
    color: var(--muted);
}

.code-panel {
    overflow: hidden;
    margin: 1.4rem 0 0;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.code-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.85rem 0.7rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    color: var(--muted-soft);
    font-size: 0.88rem;
}

.copy-button {
    min-height: 32px;
    padding: 0.35rem 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    transition: 0.2s ease;
}

.copy-button:hover,
.copy-button.is-copied {
    background: rgba(56, 189, 248, 0.16);
    color: var(--text);
}

.code-panel pre {
    overflow-x: auto;
    max-width: 100%;
    padding: 1.15rem;
}

.code-panel code {
    display: block;
    min-width: min-content;
    color: #dbeafe;
    font-family: "Cascadia Code", "Fira Code", Consolas, Monaco, monospace;
    font-size: 0.9rem;
    line-height: 1.65;
    tab-size: 2;
    white-space: pre;
}

.token-key {
    color: #7dd3fc;
}

.token-string {
    color: #bbf7d0;
}

.token-comment {
    color: #94a3b8;
}

.token-number {
    color: #fef08a;
}

.model-grid,
.variable-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.3rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.3rem;
}

.info-card,
.gallery-card,
.notice-box {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
}

.info-card {
    padding: 1.2rem;
}

.model-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
}

.model-card h3 {
    overflow-wrap: anywhere;
}

.info-card p {
    margin-bottom: 0;
}

.variable-list {
    display: grid;
    gap: 0.45rem;
    margin: 0.8rem 0 1rem;
}

.variable-list dt {
    color: #dbeafe;
    font-weight: 800;
}

.variable-list dd {
    margin-bottom: 0.55rem;
    color: var(--muted);
}

.notice-box {
    margin-top: 1.3rem;
    padding: 1.1rem 1.2rem;
    border-color: rgba(56, 189, 248, 0.24);
}

.neutral-note {
    margin-top: 1.3rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--muted-soft);
    font-size: 0.95rem;
}

.notice-box strong {
    display: block;
    margin-bottom: 0.35rem;
}

.notice-box p {
    margin-bottom: 0;
}

.gallery-card {
    position: relative;
    display: grid;
    gap: 0.75rem;
    overflow: hidden;
    padding: 0.75rem;
    color: var(--muted);
    transition: 0.2s ease;
}

.gallery-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
}

.gallery-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.72)),
        repeating-linear-gradient(45deg, rgba(148, 163, 184, 0.08) 0 10px, transparent 10px 20px);
    object-fit: cover;
}

.gallery-card.is-missing::before {
    content: "";
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.72)),
        repeating-linear-gradient(45deg, rgba(148, 163, 184, 0.08) 0 10px, transparent 10px 20px);
}

.gallery-card span {
    font-weight: 700;
}

.lightbox {
    position: fixed;
    z-index: 20;
    inset: 0;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 4vw, 3rem);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(12px);
}

.lightbox[hidden] {
    display: none;
}

.lightbox-content {
    width: min(100%, 1080px);
    margin: 0;
}

.lightbox-content img {
    display: block;
    width: 100%;
    max-height: 78vh;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.8);
    object-fit: contain;
    box-shadow: 0 34px 95px rgba(0, 0, 0, 0.42);
}

.lightbox-content figcaption {
    margin-top: 0.9rem;
    color: var(--muted);
    font-weight: 700;
    text-align: center;
}

.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 1.6rem;
    line-height: 1;
    transition: 0.2s ease;
}

.lightbox-close:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.10);
}

.link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.1rem;
}

.project-list,
.feature-block {
    padding-top: 1.5rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.22);
}

.app-hero {
    display: flex;
    gap: clamp(1.4rem, 4vw, 2.4rem);
    align-items: center;
    margin-bottom: 2.2rem;
}

.app-icon {
    flex: 0 0 auto;
    width: clamp(5.5rem, 12vw, 8rem);
    aspect-ratio: 1;
    border-radius: 26%;
    box-shadow: 0 24px 54px rgba(2, 6, 23, 0.34);
}

.app-hero-copy {
    min-width: 0;
}

.app-hero-copy h1 {
    margin-bottom: 1rem;
}

.meta-grid,
.app-link-grid,
.release-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.3rem;
}

.meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.app-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metadata-label,
.release-meta {
    color: var(--muted-soft);
    font-size: 0.88rem;
    font-weight: 700;
}

.metadata-value {
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 800;
}

.app-link-card {
    display: block;
    transition: 0.2s ease;
}

.app-link-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.07);
}

.app-link-card p,
.release-card p {
    color: var(--muted);
}

.release-card h3 {
    margin-bottom: 0.25rem;
}

.project-list {
    display: grid;
    gap: 1.5rem;
}

.project-list .project-item + .project-item {
    padding-top: 1.5rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.16);
}

.project-item {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
}

.project-item p,
.feature-list {
    max-width: 720px;
    color: var(--muted);
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    align-items: center;
    justify-content: flex-end;
}

.support-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.8rem;
    padding-top: 1.5rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.22);
    color: var(--muted-soft);
}

.tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    margin-bottom: 2.4rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.68rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--muted);
    font-size: 0.98rem;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: 0.2s ease;
}

.tag:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.09);
    color: var(--text);
}

.tag-icon {
    color: var(--primary-strong);
    font-weight: 800;
}

.note {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    max-width: 800px;
    color: var(--muted-soft);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.note::before {
    content: "✦";
    color: #818cf8;
    font-size: 1.35rem;
    line-height: 1;
}

.contact {
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem;
    align-items: center;
    padding-top: 1.9rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.22);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 54px;
    padding: 0.85rem 1.35rem;
    border-radius: 999px;
    font-weight: 800;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    color: white;
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.30);
    transition: 0.2s ease;
}

.button-small {
    min-height: 46px;
    padding: 0.72rem 1.1rem;
    font-size: 0.95rem;
}

.support-button {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(37, 99, 235, 0.42);
}

.support-button:hover {
    box-shadow: none;
}

.small-link {
    color: var(--muted);
}

.small-link:hover {
    color: var(--text);
}

.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 1.6rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.36);
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
    transition: 0.2s ease;
}

.back-link:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

.separator {
    color: rgba(148, 163, 184, 0.45);
}

.feature-block {
    margin-bottom: 2rem;
}

.feature-list {
    display: grid;
    gap: 0.8rem;
    padding-left: 1.2rem;
}

footer {
    margin-top: 1.3rem;
    color: var(--muted-soft);
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 1000px) {
    .tags {
        flex-wrap: wrap;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .project-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 620px) {
    .page {
        width: min(100% - 1rem, var(--max-width));
    }

    .hero-content {
        align-items: center;
        flex-direction: column-reverse;
        gap: 1.4rem;
    }

    .hero-copy {
        width: 100%;
    }

    .profile-photo-panel {
        margin-top: 0;
    }

    .profile-photo {
        width: 6.5rem;
    }

    .site-nav {
        justify-content: center;
    }

    .tutorial-toc,
    .link-row,
    .app-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .app-hero {
        align-items: flex-start;
    }

    .tutorial-toc a,
    .link-row .button {
        width: 100%;
        justify-content: center;
    }

    .model-grid,
    .variable-grid,
    .gallery-grid,
    .meta-grid,
    .app-link-grid {
        grid-template-columns: 1fr;
    }

    .model-card {
        flex-direction: column;
    }

    .model-card .button {
        width: 100%;
        justify-content: center;
    }

    .code-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .copy-button {
        width: 100%;
    }

    h2 {
        font-size: 2.2rem;
    }

    .section-card {
        padding-block: 1.5rem;
    }

    .card,
    .corner-panel {
        border-radius: 24px;
    }

    .corner-button,
    .corner-button::before,
    .corner-button::after {
        width: 82px;
        height: 82px;
        border-top-right-radius: 24px;
    }

    .contact,
    .button {
        width: 100%;
    }

    .small-link,
    .separator {
        width: 100%;
        text-align: center;
    }

    .separator {
        display: none;
    }
}
