@font-face {
    font-family: LatoLight;
    src: url(../fonts/Lato-Light.eot);
    src: url(../fonts/Lato-Light.eot?#iefix) format('embedded-opentype'),
         url(../fonts/Lato-Light.woff2) format('woff2'),
         url(../fonts/Lato-Light.woff) format('woff'),
         url(../fonts/Lato-Light.ttf) format('truetype');
    font-style: normal;
    text-rendering: optimizeLegibility;
}

:root {
    --bg-top: #f7f8fb;
    --bg-bottom: #eceff4;
    --surface: #ffffff;
    --line: #dce2ea;
    --text: #17202a;
    --muted: #5f6d7c;
    --brand: #0b57d0;
    --brand-soft: #eef4ff;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    color: var(--text);
    font-family: LatoLight, "Segoe UI", "Helvetica Neue", sans-serif;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

a {
    font-weight: 600;
}

.site-navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(3px);
    border-bottom: 1px solid var(--line);
}

.site-nav-shell {
    max-width: 1120px;
}

.site-navbar-brand {
    font-weight: 700;
    color: var(--text) !important;
}

.site-nav-links .nav-link {
    color: var(--muted);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 8px 12px !important;
    margin-left: 6px;
}

.site-nav-links .nav-link.active {
    color: var(--text);
    background: var(--brand-soft);
    border-color: var(--line);
}

.site-page {
    max-width: 1040px;
    margin: 0 auto;
    padding: 18px;
}

.hero-card,
.section-card,
.clean-card,
.archive-release-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.hero-card {
    padding: 24px;
}

.home-hero-layout {
    display: block;
}

.home-hero-layout::after {
    content: "";
    display: block;
    clear: both;
}

.home-hero-media {
    float: left;
    width: 170px;
    margin: 0 16px 8px 0;
    text-align: left;
}

.home-hero-image {
    width: 100%;
    max-width: 165px;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #0b0f16;
}

.hero-title {
    margin: 0 0 10px;
    font-size: 1.85rem;
    font-weight: 700;
}

.hero-text,
.section-text,
.clean-card p,
.archive-intro {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.hero-text + .hero-text {
    margin-top: 10px;
}

.project-detail-copy {
    max-width: 72ch;
}

.project-gallery-section .hero-actions {
    margin-top: 10px;
}

.hero-actions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

body.page-project-detail .hero-actions {
    justify-content: center;
}

#projectDetailModalBody .hero-actions {
    justify-content: center;
}

.project-primary-action {
    padding-left: calc(0.5rem + 15px);
    padding-right: calc(0.5rem + 15px);
}

.section-card {
    margin-top: 14px;
    padding: 16px;
}

.section-title {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 700;
}

.clean-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.clean-card {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.clean-card h2,
.clean-card h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.clean-meta {
    font-size: 0.86rem;
    color: #2f4155;
}

.platform-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.platform-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #2f4155;
    background: #f8fbff;
    font-size: 0.82rem;
    line-height: 1;
}

.svg-icon {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    color: currentColor;
    fill: currentColor;
}

.btn-icon {
    width: 0.95rem;
    height: 0.95rem;
    margin-right: 0.35rem;
}

.platform-chip-icon {
    width: 0.95rem;
    height: 0.95rem;
}

.clean-actions {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.clean-actions .btn {
    font-size: 0.86rem;
}

.card-strip-15 {
    height: 15px;
}

.card-strip-8 {
    height: 8px;
}

.archive-intro {
    margin: 16px auto;
    max-width: 980px;
    padding: 0 8px;
}

.archive-filter-card {
    padding-top: 12px;
    padding-bottom: 12px;
}

.archive-year-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.archive-version-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.archive-version-card h3 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
}

.archive-version-meta {
    color: var(--muted);
    font-size: 0.88rem;
}

.archive-version-actions {
    margin-top: 6px;
}

.archive-empty {
    margin: 10px 0 0;
    color: var(--muted);
}

#projectDetailModalBody .hero-card,
#projectDetailModalBody .section-card {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

#projectDetailModalBody .project-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

#projectDetailModalBody .project-shot {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
}

#projectDetailModalBody .project-shot-media {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
}

#projectDetailModalBody .project-shot-media img {
    width: 100%;
    max-height: 240px;
    object-fit: contain;
}

@media (max-width: 768px) {
    #projectDetailModalBody .project-gallery {
        grid-template-columns: 1fr;
    }
}

.archive-release-deck {
    padding-top: 18px;
}

.archive-release-card {
    width: min(100%, 920px);
}

.archive-actions {
    text-align: right;
}

.release-line-release {
    font-size: 18px;
    font-weight: 700;
    text-decoration: underline;
    margin-top: 26px;
    display: inline-block;
    color: #c52020;
}

.release-line-section {
    font-size: 16px;
    font-weight: 700;
}

.release-line-item {
    display: list-item;
    margin-left: 2em;
}

.release-version {
    font-size: 0.82em;
}

.download-btn-fixed {
    width: 104px;
}

body.page-project-detail .project-card {
    width: min(100%, 760px);
    margin: 0 auto;
}

body.page-project-detail .project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

body.page-project-detail h1 {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 18px;
}

body.page-project-thumbnail .project-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 24px 0;
}

body.page-project-thumbnail .project-shot {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
}

body.page-project-thumbnail .project-shot-media {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
}

body.page-project-thumbnail .project-shot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

body.page-project-thumbnail .project-shot-caption {
    font-size: 14px;
    margin-top: 8px;
    text-align: center;
}

body.page-archive-detail .card {
    display: inline-block;
}

@media (min-width: 750px) {
    body.page-archive-detail .modal-dialog {
        max-width: 700px;
        margin-right: auto;
        margin-left: auto;
    }
}

@media (max-width: 991.98px) {
    .site-nav-links .nav-link {
        margin-left: 0;
        margin-bottom: 6px;
    }

    .navbar .navbar-collapse {
        margin-top: 10px;
    }
}

@media (max-width: 576px) {
    .site-page {
        padding: 12px;
    }

    .home-hero-media {
        width: 110px;
        margin-right: 12px;
        margin-bottom: 6px;
    }

    .hero-title {
        font-size: 1.55rem;
    }

    body.page-project-thumbnail .project-gallery {
        grid-template-columns: 1fr;
    }
}
