:root {
    --accent: #3aa0ff;
    --accent-light: #7cc4ff;
    --accent-glow: rgba(58, 160, 255, 0.28);

    --bg: #0a0a0a;
    --bg-soft: #111114;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-hover: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.10);

    --text: #e9e9ec;
    --text-dim: #9a9aa2;
    --text-muted: #6a6a72;

    --success: #7be0a7;

    --rounded: 2px;
    --rounded-small: 2px;

    --container: 1180px;

    --shadow: none;

    --transition: 120ms linear;

    --mono:
        "JetBrains Mono",
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    background: var(--bg);
    color: var(--text);

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height: 1.55;

    -webkit-font-smoothing: antialiased;
}

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}


/* ============================================================
   LAYOUT
   ============================================================ */

.container {
    width: min(
        calc(100% - 40px),
        var(--container)
    );

    margin: 0 auto;

    padding:
        22px
        0
        80px;
}


/* ============================================================
   HEADER
   ============================================================ */

.site-header {
    position: sticky;
    top: 16px;
    z-index: 20;

    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 56px;

    margin-bottom: 42px;
    padding: 0 16px;

    background: var(--bg);

    border: 1px solid var(--glass-border);
    border-radius: 2px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;

    font-weight: 700;
    letter-spacing: -0.01em;

    transition: color var(--transition);
}

.site-brand:hover {
    color: var(--accent-light);
}

.brand-mark {
    display: grid;
    place-items: center;

    width: 30px;
    height: 30px;

    border-radius: 2px;

    color: var(--bg);

    background: var(--accent);

    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
}

.brand-name {
    font-size: 14px;

    font-family: var(--mono);
    letter-spacing: .02em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-link {
    padding: 8px 12px;

    color: var(--text-dim);

    border-radius: 2px;

    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .02em;

    transition:
        color var(--transition),
        background var(--transition);
}

.nav-link:hover {
    color: var(--text);
    background: var(--glass-hover);
}


/* ============================================================
   HERO
   ============================================================ */

.hero {
    position: relative;

    margin-bottom: 28px;
    padding: 48px 44px 44px;

    background: var(--bg-soft);

    border: 1px solid var(--glass-border);
    border-radius: 2px;
}

.hero::before,
.hero::after {
    content: "";

    position: absolute;

    width: 14px;
    height: 14px;

    border: 1px solid var(--accent);

    pointer-events: none;
}

.hero::before {
    top: -1px;
    left: -1px;

    border-right: 0;
    border-bottom: 0;
}

.hero::after {
    bottom: -1px;
    right: -1px;

    border-left: 0;
    border-top: 0;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    margin-bottom: 14px;

    color: var(--accent-light);

    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 12px;

    font-size: clamp(32px, 5vw, 52px);

    font-weight: 800;
    line-height: 1.05;

    letter-spacing: -.04em;
}

.hero p {
    max-width: 620px;

    margin: 0;

    color: var(--text-dim);

    font-size: 16px;
    line-height: 1.65;
}


/* ============================================================
   SEARCH
   ============================================================ */

.search-box {
    margin-bottom: 20px;
    padding: 16px;

    background: var(--bg-soft);

    border: 1px solid var(--glass-border);
    border-radius: 2px;
}

.search-label {
    display: block;

    margin: 0 0 10px;

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.search-row {
    display: flex;
    gap: 8px;
}

.search-row input {
    flex: 1;

    min-width: 0;

    height: 44px;

    padding: 0 14px;

    color: var(--text);

    background: var(--bg);

    border: 1px solid var(--glass-border);
    border-radius: 2px;

    outline: none;

    font-family: var(--mono);
    font-size: 13px;

    transition:
        border var(--transition),
        background var(--transition);
}

.search-row input::placeholder {
    color: var(--text-muted);
}

.search-row input:focus {
    border-color: var(--accent);
}


/* ============================================================
   BUTTONS
   ============================================================ */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 0 18px;

    color: var(--bg);

    background: var(--accent);

    border: 1px solid var(--accent);
    border-radius: 2px;

    font-family: var(--mono);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .02em;

    transition:
        background var(--transition),
        color var(--transition),
        border var(--transition);
}

.button:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
}

.button-secondary {
    color: var(--text);

    background: transparent;

    border-color: var(--glass-border);
}

.button-secondary:hover {
    color: var(--accent-light);
    background: transparent;
    border-color: var(--accent);
}


/* ============================================================
   QUICK ACTIONS
   ============================================================ */

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;

    margin-bottom: 42px;
}

.quick-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 8px 12px;

    color: var(--text-dim);

    background: transparent;

    border: 1px solid var(--glass-border);
    border-radius: 2px;

    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;

    transition:
        color var(--transition),
        background var(--transition),
        border var(--transition);
}

.quick-action:hover {
    color: var(--text);

    background: var(--glass-hover);
    border-color: var(--glass-border);
}

.quick-action.active {
    color: var(--accent-light);

    border-color: var(--accent);

    background: transparent;
}


/* ============================================================
   SECTION HEADINGS
   ============================================================ */

.catalog-heading,
.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 18px;

    padding-bottom: 14px;

    border-bottom: 1px solid var(--glass-border);
}

.catalog-heading h1,
.catalog-heading h2,
.section-heading h1,
.section-heading h2 {
    margin: 0;

    font-size: 22px;
    line-height: 1.2;

    font-weight: 700;
    letter-spacing: -.02em;
}

.catalog-count,
.section-heading p {
    margin: 4px 0 0;

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .02em;
}

.section-link {
    flex-shrink: 0;

    color: var(--accent-light);

    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;

    transition: color var(--transition);
}

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


/* ============================================================
   VIEW SWITCH
   ============================================================ */

.view-switch {
    display: flex;

    border: 1px solid var(--glass-border);
    border-radius: 2px;

    overflow: hidden;
}

.view-switch-link {
    padding: 7px 12px;

    color: var(--text-muted);

    background: transparent;

    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;

    transition:
        color var(--transition),
        background var(--transition);
}

.view-switch-link + .view-switch-link {
    border-left: 1px solid var(--glass-border);
}

.view-switch-link:hover {
    color: var(--text);
    background: var(--glass-hover);
}

.view-switch-link.active {
    color: var(--bg);
    background: var(--accent);
}


/* ============================================================
   CATALOG GRID
   ============================================================ */

.catalog-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(220px, 1fr)
        );

    gap: 12px;
}

.catalog-item {
    position: relative;

    min-width: 0;

    overflow: hidden;

    background: var(--bg-soft);

    border: 1px solid var(--glass-border);
    border-radius: 2px;

    transition:
        background var(--transition),
        border var(--transition);
}

.catalog-item:hover {
    background: var(--bg-soft);

    border-color: var(--accent);
}

/* blueprint-уголки */
.catalog-item::before,
.catalog-item::after {
    content: "";

    position: absolute;

    width: 10px;
    height: 10px;

    border: 1px solid var(--accent);

    opacity: 0;

    pointer-events: none;

    transition: opacity var(--transition);

    z-index: 2;
}

.catalog-item::before {
    top: -1px;
    left: -1px;

    border-right: 0;
    border-bottom: 0;
}

.catalog-item::after {
    bottom: -1px;
    right: -1px;

    border-left: 0;
    border-top: 0;
}

.catalog-item:hover::before,
.catalog-item:hover::after {
    opacity: 1;
}

.catalog-main-link {
    display: block;
}

.catalog-preview {
    position: relative;

    display: grid;
    place-items: center;

    aspect-ratio: 16 / 10;

    overflow: hidden;

    background: var(--bg);

    border-bottom: 1px solid var(--glass-border);
}

.catalog-preview img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    filter: grayscale(.15);

    transition: filter var(--transition);
}

.catalog-item:hover .catalog-preview img {
    filter: grayscale(0);
}

.catalog-preview.placeholder {
    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 28px;

    background: var(--bg);
}

.catalog-content {
    display: flex;
    flex-direction: column;
    gap: 6px;

    padding: 14px 14px 10px;
}

.item-title {
    display: block;

    overflow: hidden;

    color: var(--text);

    font-size: 14px;
    font-weight: 600;

    text-overflow: ellipsis;
    white-space: nowrap;

    transition: color var(--transition);
}

.catalog-item:hover .item-title {
    color: var(--accent-light);
}

.item-path {
    display: block;

    overflow: hidden;

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .02em;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;

    padding: 0 14px 14px;
}


/* ============================================================
   TAGS
   ============================================================ */

.tag {
    display: inline-flex;
    align-items: center;

    padding: 3px 7px;

    color: var(--text-dim);

    background: transparent;

    border: 1px solid var(--glass-border);
    border-radius: 2px;

    font-family: var(--mono);
    font-size: 10px;
    line-height: 1.4;
    letter-spacing: .02em;

    transition:
        color var(--transition),
        border var(--transition);
}

.tag:hover,
.tag.active {
    color: var(--accent-light);

    border-color: var(--accent);
}

.tag-large {
    padding: 7px 10px;

    font-size: 12px;
}

.tag-badge {
    margin-left: 5px;

    color: var(--text-muted);

    font-size: 10px;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}


/* ============================================================
   TAG SECTION
   ============================================================ */

.tag-section {
    margin-top: 58px;
    padding-top: 32px;

    border-top: 1px solid var(--glass-border);
}


/* ============================================================
   FOLDERS
   ============================================================ */

.folder-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(260px, 1fr)
        );

    gap: 8px;
}

.folder-card {
    position: relative;

    display: flex;
    align-items: center;

    gap: 13px;

    min-width: 0;

    padding: 14px;

    background: var(--bg-soft);

    border: 1px solid var(--glass-border);
    border-radius: 2px;

    transition:
        background var(--transition),
        border var(--transition);
}

.folder-card::before {
    content: "";

    position: absolute;

    top: -1px;
    left: -1px;

    width: 8px;
    height: 8px;

    border: 1px solid var(--accent);
    border-right: 0;
    border-bottom: 0;

    opacity: 0;

    pointer-events: none;

    transition: opacity var(--transition);
}

.folder-card:hover {
    background: var(--glass-hover);

    border-color: var(--accent);
}

.folder-card:hover::before {
    opacity: 1;
}

.folder-icon {
    display: grid;
    place-items: center;

    flex: 0 0 40px;

    width: 40px;
    height: 40px;

    overflow: hidden;

    color: var(--text-muted);

    background: var(--bg);

    border: 1px solid var(--glass-border);
    border-radius: 2px;

    font-family: var(--mono);
    font-size: 16px;

    transition: color var(--transition);
}

.folder-card:hover .folder-icon {
    color: var(--accent);
}

.folder-icon img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.folder-info {
    display: flex;
    flex-direction: column;

    min-width: 0;
}

.folder-title {
    overflow: hidden;

    color: var(--text);

    font-size: 14px;
    font-weight: 600;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-path {
    margin-top: 2px;

    overflow: hidden;

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 10px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-arrow {
    margin-left: auto;

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 13px;

    transition: color var(--transition), transform var(--transition);
}

.folder-card:hover .folder-arrow {
    color: var(--accent);
    transform: translateX(2px);
}


/* ============================================================
   BREADCRUMBS
   ============================================================ */

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 6px;

    margin-bottom: 26px;

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .02em;
}

.breadcrumb a {
    color: var(--text-dim);

    transition: color var(--transition);
}

.breadcrumb a:hover {
    color: var(--accent-light);
}

.breadcrumb .current {
    color: var(--text);
}

.separator {
    color: var(--text-muted);
    opacity: .5;
}


/* ============================================================
   SEARCH PAGE
   ============================================================ */

.search-page h1,
.tags-page h1,
.tag-page h1,
.catalog-page h1 {
    margin: 0;

    font-size:
        clamp(26px, 4vw, 36px);

    font-weight: 800;
    line-height: 1.1;

    letter-spacing: -.03em;
}

.search-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin: 25px 0 18px;

    color: var(--text-dim);

    font-family: var(--mono);
    font-size: 12px;
}

.search-summary span {
    color: var(--text-muted);
}

.search-summary strong {
    color: var(--text);
}


/* ============================================================
   TAG PAGE
   ============================================================ */

.tag-page-label {
    margin-bottom: 6px;

    color: var(--accent-light);

    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .18em;
}

.tags-page,
.tag-page,
.catalog-page {
    margin-bottom: 40px;
}


/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 230px;

    padding: 35px;

    color: var(--text-dim);
    text-align: center;

    background: var(--bg-soft);

    border: 1px dashed var(--glass-border);
    border-radius: 2px;
}

.empty-message h2 {
    margin: 7px 0 4px;

    color: var(--text);

    font-size: 18px;
    font-weight: 700;
}

.empty-message p {
    margin: 0 0 18px;

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 12px;
}

.empty-icon {
    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 28px;
}


/* ============================================================
   404
   ============================================================ */

.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: calc(100vh - 180px);

    padding: 40px;

    text-align: center;
}

.error-code {
    margin-bottom: 5px;

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: clamp(100px, 20vw, 190px);

    font-weight: 700;

    line-height: .85;

    letter-spacing: -.08em;
}

.error-page h1 {
    margin: 28px 0 8px;

    font-size: 24px;
    font-weight: 700;
}

.error-page p {
    max-width: 600px;

    margin: 0 0 25px;

    color: var(--text-dim);

    font-size: 14px;
}

.error-page code {
    padding: 3px 7px;

    color: var(--accent-light);

    background: var(--bg-soft);

    border: 1px solid var(--glass-border);
    border-radius: 2px;

    font-family: var(--mono);
    font-size: 12px;

    word-break: break-word;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 9px;
}


/* ============================================================
   SCROLLBAR
   ============================================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);

    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}


/* ============================================================
   SELECTION
   ============================================================ */

::selection {
    color: var(--bg);

    background: var(--accent);
}


/* ============================================================
   FOCUS
   ============================================================ */

:focus-visible {
    outline: 1px solid var(--accent);

    outline-offset: 2px;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 760px) {

    .container {
        width: min(
            calc(100% - 24px),
            var(--container)
        );

        padding-top: 12px;
    }

    .site-header {
        top: 8px;

        flex-direction: column;
        align-items: stretch;

        gap: 12px;

        margin-bottom: 25px;

        padding: 12px 14px;
    }

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

    .site-nav {
        justify-content: center;
        flex-wrap: wrap;

        gap: 2px;
    }

    .nav-link {
        padding: 7px 8px;

        font-size: 11px;
    }

    .hero {
        padding: 32px 22px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 14px;
    }

    .search-row {
        flex-direction: column;
    }

    .search-row input {
        width: 100%;
    }

    .search-row .button {
        width: 100%;
    }

    .catalog-heading,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

        gap: 8px;
    }

    .catalog-content {
        padding: 11px 11px 8px;
    }

    .item-tags {
        padding: 0 11px 11px;
    }

    .item-title {
        font-size: 12px;
    }

    .item-path {
        font-size: 9px;
    }

    .tag {
        font-size: 9px;
    }

    .folder-grid {
        grid-template-columns: 1fr;
    }

    .view-switch {
        width: 100%;
    }

    .view-switch-link {
        flex: 1;

        text-align: center;
    }

    .search-summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .error-page {
        min-height: calc(100vh - 130px);

        padding: 20px 5px;
    }

    .error-page h1 {
        font-size: 20px;
    }
}

@media (max-width: 430px) {

    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .catalog-preview {
        aspect-ratio: 16 / 9;
    }

    .quick-actions {
        margin-bottom: 32px;
    }

    .hero {
        margin-bottom: 15px;
    }
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* ============================================================
   ASSET PAGE
   ============================================================ */

.page-header {
    margin-bottom: 18px;

    padding-bottom: 18px;

    border-bottom: 1px solid var(--glass-border);
}

.page-header h1 {
    margin: 0 0 14px;

    font-size: clamp(30px, 4vw, 44px);

    font-weight: 800;
    line-height: 1.08;

    letter-spacing: -.035em;
}

.tags {
    display: flex;
    flex-wrap: wrap;

    gap: 6px;
}


/* ============================================================
   ASSET GALLERY & CAROUSEL
   ============================================================ */

.gallery {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(280px, 1fr)
        );

    gap: 10px;

    margin-top: 22px;
}

.gallery-item {
    position: relative;

    display: block;

    overflow: hidden;

    background: var(--bg-soft);

    border: 1px solid var(--glass-border);
    border-radius: 2px;

    transition:
        border var(--transition),
        background var(--transition);
}

.gallery-item::before {
    content: "";

    position: absolute;

    top: -1px;
    left: -1px;

    width: 10px;
    height: 10px;

    border: 1px solid var(--accent);
    border-right: 0;
    border-bottom: 0;

    opacity: 0;

    pointer-events: none;

    transition: opacity var(--transition);

    z-index: 2;
}

.gallery-item:hover {
    background: var(--bg-soft);

    border-color: var(--accent);
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item img {
    display: block;

    width: 100%;
    height: auto;

    max-width: 100%;

    object-fit: contain;

    filter: grayscale(.15);

    transition: filter var(--transition);
}

.gallery-item:hover img {
    filter: grayscale(0);
}


/* FULL-WIDTH ASSET CAROUSEL */

.gallery .asset-carousel {
    grid-column: 1 / -1;
    width: 100%;
}

.gallery .carousel-viewport {
    width: 100%;
}

.asset-carousel {
    margin-top: 22px;
}

.carousel-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;

    border-radius: 2px;
    background: var(--bg);
    border: 1px solid var(--glass-border);
}

.carousel-track {
    width: 100%;
    height: 100%;
    display: flex;

    transition: transform 0.3s ease;
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;
}

.carousel-slide img {
    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: center;

    display: block;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--glass-border);
    border-radius: 2px;

    background: var(--bg);
    color: var(--text);

    font-family: var(--mono);
    font-size: 22px;
    line-height: 1;

    cursor: pointer;

    transition: background var(--transition), color var(--transition), border var(--transition);
}

.carousel-button:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--bg);
}

.carousel-prev {
    left: 12px;
}

.carousel-next {
    right: 12px;
}

.carousel-dots {
    position: absolute;

    left: 50%;
    bottom: 12px;

    transform: translateX(-50%);

    display: flex;
    gap: 6px;

    padding: 6px 10px;

    border-radius: 2px;
    background: var(--bg);
    border: 1px solid var(--glass-border);
}

.carousel-dot {
    width: 8px;
    height: 8px;

    padding: 0;
    border: 0;
    border-radius: 0;

    background: var(--glass-border);

    cursor: pointer;

    transition: background var(--transition);
}

.carousel-dot.is-active {
    background: var(--accent);
}


/* LIGHTBOX */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, .94);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 200ms ease,
        visibility 200ms ease;
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lightbox-content {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;

    max-width: 90vw;
    max-height: 85vh;

    margin: 0;

    background: transparent;
}

.lightbox-image {
    display: block;

    width: auto;
    height: auto;

    max-width: min(90vw, 1400px);
    max-height: 88vh;

    object-fit: contain;

    border-radius: 2px;
}

.lightbox-content figcaption {
    margin-top: 14px;

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 12px;

    text-align: center;

    user-select: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;

    display: grid;
    place-items: center;

    width: 44px;
    height: 44px;

    color: var(--text-dim);

    background: var(--bg-soft);
    border: 1px solid var(--glass-border);
    border-radius: 2px;

    font-family: var(--mono);
    font-size: 22px;
    line-height: 1;

    transition: background var(--transition), color var(--transition), border var(--transition);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--accent);

    background: var(--bg-soft);

    border-color: var(--accent);
}

.lightbox-close {
    top: 20px;
    right: 20px;

    font-size: 24px;
}

.lightbox-prev {
    left: 20px;
    top: 50%;

    transform: translateY(-50%);

    font-size: 24px;
}

.lightbox-next {
    right: 20px;
    top: 50%;

    transform: translateY(-50%);

    font-size: 24px;
}

body.lightbox-open {
    overflow: hidden;
}

@media (max-width: 760px) {
    .lightbox {
        padding: 10px;
    }

    .lightbox-content {
        max-width: 100vw;
        max-height: 90vh;
    }

    .lightbox-image {
        max-height: 70vh;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;

        width: 38px;
        height: 38px;

        font-size: 20px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 38px;
        height: 38px;

        font-size: 20px;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }
}

@media (max-width: 430px) {
    .lightbox-image {
        max-height: 60vh;
    }

    .lightbox-close {
        top: 8px;
        right: 8px;

        width: 34px;
        height: 34px;

        font-size: 18px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 34px;
        height: 34px;

        font-size: 18px;
    }
}


/* ============================================================
   ASSET DESCRIPTION
   ============================================================ */

.description {
    margin-top: 30px;
    padding: 26px;

    background: var(--bg-soft);

    border: 1px solid var(--glass-border);

    border-radius: 2px;
}

.description > :first-child {
    margin-top: 0;
}

.description > :last-child {
    margin-bottom: 0;
}

.description h2 {
    margin: 26px 0 10px;

    font-size: 19px;

    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -.02em;
}

.description h3 {
    margin: 22px 0 8px;

    font-size: 16px;
    font-weight: 700;
}

.description p {
    margin: 0 0 14px;

    color: var(--text-dim);

    font-size: 14px;
    line-height: 1.7;
}

.description ul,
.description ol {
    margin: 10px 0 16px;

    padding-left: 22px;

    color: var(--text-dim);

    font-size: 14px;
}

.description li {
    margin-bottom: 5px;
}

.description a,
.news-content a {
    color: var(--accent-light);

    text-decoration: underline;
    text-decoration-color: rgba(124, 196, 255, .35);
    text-underline-offset: 3px;

    transition: text-decoration-color var(--transition);
}

.description a:hover,
.news-content a:hover {
    text-decoration-color: var(--accent-light);
}


/* ============================================================
   ASSET ACTION LINKS
   ============================================================ */

.links {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;

    margin-top: 22px;
}

.links .button {
    min-height: 44px;
}


/* ============================================================
   ASSET PAGE MOBILE
   ============================================================ */

@media (max-width: 760px) {

    .page-header h1 {
        font-size: 28px;
    }

    .gallery {
        grid-template-columns: 1fr;

        gap: 8px;

        margin-top: 18px;
    }

    .description {
        margin-top: 18px;
        padding: 18px;
    }

    .links {
        flex-direction: column;
    }

    .links .button {
        width: 100%;
    }
}


/* ============================================================
   UX/UI EXTENSIONS
   ============================================================ */

.search-box {
    margin: 28px 0 34px;
    padding: 18px;

    border: 1px solid var(--glass-border);
    border-radius: 2px;

    background: var(--bg-soft);
}

.search-label {
    display: block;
    margin-bottom: 10px;

    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;

    color: var(--text-muted);
}

.search-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.search-row input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 14px;

    border: 1px solid var(--glass-border);
    border-radius: 2px;

    outline: none;

    background: var(--bg);
    color: var(--text);

    font-family: var(--mono);
    font-size: 13px;

    transition: border-color var(--transition);
}

.search-row input::placeholder {
    color: var(--text-muted);
}

.search-row input:focus {
    border-color: var(--accent);
}

.search-row .button {
    flex: 0 0 auto;
    min-width: 92px;
}


/* Search results information */

.search-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin: 22px 0;

    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-dim);
}

.search-summary strong {
    color: var(--text);
    font-weight: 600;
}

.search-summary > span {
    flex: 0 0 auto;

    padding: 4px 9px;

    border: 1px solid var(--glass-border);
    border-radius: 2px;

    background: transparent;

    font-size: 11px;
    white-space: nowrap;
}


/* Quick actions */

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 34px;
}

.quick-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    min-height: 36px;
    padding: 0 12px;

    border: 1px solid var(--glass-border);
    border-radius: 2px;

    background: transparent;
    color: var(--text-dim);

    text-decoration: none;

    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;

    transition:
        border-color var(--transition),
        color var(--transition),
        background var(--transition);
}

.quick-action:hover {
    color: var(--text);
    border-color: var(--accent);
    background: transparent;
}

.quick-action.active {
    color: var(--accent-light);
    border-color: var(--accent);
    background: transparent;
}


/* Catalog heading */

.catalog-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;

    margin: 0 0 18px;

    padding-bottom: 14px;

    border-bottom: 1px solid var(--glass-border);
}

.catalog-heading h2 {
    margin: 0;
}

.catalog-count {
    margin: 5px 0 0;

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 11px;
}


/* View switch */

.view-switch {
    display: inline-flex;
    align-items: center;

    border: 1px solid var(--glass-border);
    border-radius: 2px;

    background: transparent;

    overflow: hidden;

    flex: 0 0 auto;
}

.view-switch-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 32px;
    padding: 0 12px;

    color: var(--text-muted);
    text-decoration: none;

    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;

    transition:
        background var(--transition),
        color var(--transition);
}

.view-switch-link + .view-switch-link {
    border-left: 1px solid var(--glass-border);
}

.view-switch-link:hover {
    color: var(--text);
    background: var(--glass-hover);
}

.view-switch-link.active {
    color: var(--bg);
    background: var(--accent);
}


/* Folder grid */

.folder-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(260px, 1fr)
        );

    gap: 8px;

    margin-top: 4px;
}

.folder-card {
    position: relative;

    display: flex;
    align-items: center;
    gap: 14px;

    min-height: 68px;
    padding: 14px 16px;

    overflow: hidden;

    border: 1px solid var(--glass-border);
    border-radius: 2px;

    background: var(--bg-soft);

    color: var(--text);
    text-decoration: none;

    transition:
        border-color var(--transition),
        background var(--transition);
}

.folder-card:hover {
    border-color: var(--accent);
    background: var(--glass-hover);
}

.folder-icon {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    flex: 0 0 40px;

    border-radius: 2px;

    border: 1px solid var(--glass-border);

    background: var(--bg);

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 16px;

    overflow: hidden;

    transition: color var(--transition), border-color var(--transition);
}

.folder-card:hover .folder-icon {
    color: var(--accent);
    border-color: var(--accent);
}

.folder-icon img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.folder-info {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;

    min-width: 0;
    flex: 1;
}

.folder-title {
    overflow: hidden;

    color: var(--text);

    font-size: 13px;
    font-weight: 600;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-path {
    margin-top: 2px;

    overflow: hidden;

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 10px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-arrow {
    position: relative;
    z-index: 1;

    flex: 0 0 auto;

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 13px;

    transition: color var(--transition), transform var(--transition);
}

.folder-card:hover .folder-arrow {
    color: var(--accent);
    transform: translateX(2px);
}


/* Tag section */

.tag-section {
    margin-top: 52px;
    padding-top: 30px;

    border-top: 1px solid var(--glass-border);
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 18px;

    padding-bottom: 14px;

    border-bottom: 1px solid var(--glass-border);
}

.section-heading h1,
.section-heading h2 {
    margin: 0;
}

.section-heading p {
    margin: 5px 0 0;

    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 11px;
}

.section-link {
    color: var(--text-dim);
    text-decoration: none;

    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;

    transition: color var(--transition);
}

.section-link:hover {
    color: var(--accent);
}


/* Tag cloud */

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.tag-large {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    min-height: 32px;
    padding: 0 10px;

    border-radius: 2px;

    transition:
        border-color var(--transition),
        color var(--transition);
}

.tag-large:hover {
    border-color: var(--accent);
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 18px;
    height: 18px;

    padding: 0 5px;

    border-radius: 2px;

    background: transparent;
    border: 1px solid var(--glass-border);

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
}


/* Tag page */

.tag-page-label {
    margin-bottom: 5px;

    color: var(--accent);

    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .18em;
}

.tag-page h1 {
    margin-bottom: 4px;
}

.tag-page .section-heading p {
    color: var(--text-dim);
}


/* Tag filter / add buttons */

.tag-filter {
    display: inline-flex;
    align-items: center;

    min-height: 28px;

    border: 1px solid var(--glass-border);
    border-radius: 2px;

    background: transparent;

    overflow: hidden;

    transition:
        border-color var(--transition),
        background var(--transition);
}

.tag-filter:hover {
    border-color: var(--accent);
}

.tag-add,
.tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 18px;
    height: 18px;

    padding: 0;

    border: 0;
    border-radius: 0;

    background: transparent;

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 13px;
    line-height: 1;

    cursor: pointer;

    transition:
        background var(--transition),
        color var(--transition);
}

.tag-filter .tag {
    display: inline-flex;
    align-items: center;

    min-height: 26px;
    padding: 0 8px;

    border: 0;
    border-radius: 0;

    background: transparent;

    color: var(--text-dim);

    text-decoration: none;

    font-family: var(--mono);
    font-size: 10px;
    line-height: 1;

    transition:
        color var(--transition),
        background var(--transition);
}

.tag-filter .tag:hover {
    color: var(--text);

    background: var(--glass-hover);
}

.tag-add:hover {
    color: var(--bg);
    background: var(--accent);
}

.tag-remove {
    color: var(--accent);
}

.tag-remove:hover {
    color: var(--bg);
    background: var(--accent);
}

.tag-filter .tag-add {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 26px;
    height: 26px;

    padding: 0;

    border: 0;
    border-left: 1px solid var(--glass-border);
    border-radius: 0;

    background: transparent;

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;

    cursor: pointer;

    transition:
        color var(--transition),
        background var(--transition);
}

.tag-filter .tag-add:hover {
    color: var(--bg);

    background: var(--accent);
}

.tag-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 20px;
    height: 18px;

    margin-left: 5px;
    padding: 0 6px;

    border: 1px solid var(--glass-border);
    border-radius: 2px;

    background: transparent;

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}

.tag.active {
    color: var(--accent-light);

    border-color: var(--accent);

    background: transparent;
}

.tag-filter.active {
    border-color: var(--accent);

    background: transparent;
}

.tag-filter.active .tag {
    color: var(--accent-light);
}

.tag-filter.active .tag-add {
    color: var(--accent);

    border-left-color: var(--accent);
}

.tag-filter.active .tag-add:hover {
    color: var(--bg);

    background: var(--accent);
}

.tag-filter.active .tag-count {
    border-color: var(--accent);

    background: transparent;

    color: var(--accent-light);
}


/* Multi-tag search */

.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;

    margin-top: 12px;
}

.search-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    min-height: 28px;
    padding: 0 9px;

    border: 1px solid var(--accent);
    border-radius: 2px;

    background: transparent;

    color: var(--text);

    font-family: var(--mono);
    font-size: 11px;
}

.search-tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 16px;
    height: 16px;

    padding: 0;

    border: 0;
    border-radius: 0;

    background: transparent;

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 12px;
    line-height: 1;

    cursor: pointer;

    transition:
        background var(--transition),
        color var(--transition);
}

.search-tag-remove:hover {
    color: var(--bg);
    background: var(--accent);
}


/* Pagination */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination .page-link,
.pagination .page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 12px;

    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;

    color: var(--text);
    background-color: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 2px;

    text-decoration: none;
    user-select: none;
    cursor: pointer;

    transition:
        background-color var(--transition),
        border-color var(--transition),
        color var(--transition);
}

.page-number {
    min-width: 36px;
    padding: 0 8px;
}

.pagination .page-link:hover:not(.disabled),
.pagination .page-number:hover:not(.active) {
    border-color: var(--accent);
    color: var(--accent-light);
}

.page-number.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
    font-weight: 700;
    cursor: default;
}

.pagination .page-link.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background-color: transparent;
    border-color: var(--glass-border);
    pointer-events: none;
}

.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 36px;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 12px;
    user-select: none;
}


/* News & homepage news */

.news-page {
    max-width: 900px;
    margin: 0 auto 50px;
}

.news-header {
    position: relative;

    padding: 36px 38px 32px;

    background: var(--bg-soft);

    border: 1px solid var(--glass-border);
    border-radius: 2px;
}

.news-header::before,
.news-header::after {
    content: "";

    position: absolute;

    width: 14px;
    height: 14px;

    border: 1px solid var(--accent);

    pointer-events: none;
}

.news-header::before {
    top: -1px;
    left: -1px;

    border-right: 0;
    border-bottom: 0;
}

.news-header::after {
    bottom: -1px;
    right: -1px;

    border-left: 0;
    border-top: 0;
}

.news-label {
    margin-bottom: 12px;

    color: var(--accent-light);

    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .18em;
}

.news-header h1 {
    margin: 0;
    color: var(--text);

    font-size: clamp(28px, 5vw, 44px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.035em;
}

.news-header .tags {
    margin-top: 18px;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 18px;

    padding-top: 16px;

    border-top: 1px solid var(--glass-border);
}

.news-date {
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 11px;
}

.news-date-updated {
    color: var(--text-dim);
}

.news-lead {
    margin: 28px 0 0;
    padding: 0 8px;
    color: var(--text-dim);
    font-size: 16px;
    line-height: 1.7;
}

.news-content {
    margin-top: 28px;
    padding: 30px 34px;

    background: var(--bg-soft);

    border: 1px solid var(--glass-border);
    border-radius: 2px;
}

.news-content h2 {
    margin: 30px 0 12px;
    color: var(--text);
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -.02em;
}

.news-content h2:first-child {
    margin-top: 0;
}

.news-content h3 {
    margin: 26px 0 10px;
    color: var(--text);
    font-size: 17px;
    font-weight: 700;
}

.news-content p {
    margin: 0 0 16px;
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.75;
}

.news-content ul,
.news-content ol {
    margin: 12px 0 18px;
    padding-left: 24px;
    color: var(--text-dim);
    font-size: 14px;
}

.news-content li {
    margin-bottom: 7px;
}

.news-content li::marker {
    color: var(--accent);
}

.news-content strong {
    color: var(--text);
}

.news-content code {
    padding: 2px 6px;
    background: var(--bg);
    border: 1px solid var(--glass-border);
    border-radius: 2px;
    color: var(--accent-light);
    font-family: var(--mono);
    font-size: .88em;
}

.news-content pre {
    overflow-x: auto;
    margin: 20px 0;
    padding: 18px;
    background: var(--bg);
    border: 1px solid var(--glass-border);
    border-radius: 2px;
}

.news-content pre code {
    padding: 0;
    background: none;
    border: 0;
    color: var(--text-dim);
}

.news-content blockquote {
    margin: 20px 0;
    padding: 14px 20px;
    color: var(--text-dim);
    background: var(--bg);
    border-left: 2px solid var(--accent);
    border-radius: 0 2px 2px 0;
}

.news-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 22px auto;
    border-radius: 2px;
    border: 1px solid var(--glass-border);
}

.news-footer {
    display: flex;
    margin-top: 24px;
}

.news-footer .button {
    min-height: 44px;
}

.news-section {
    position: relative;
    margin-top: 46px;
    margin-bottom: 52px;
    padding: 24px;

    background: var(--bg-soft);

    border: 1px solid var(--glass-border);
    border-radius: 2px;
}

.news-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    padding-bottom: 14px;

    border-bottom: 1px solid var(--glass-border);
}

.news-section-heading {
    min-width: 0;
}

.news-section-label {
    display: block;
    margin-bottom: 6px;

    color: var(--accent-light);

    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .18em;
}

.news-section-heading h2 {
    margin: 0;
    color: var(--text);
    font-size: 21px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -.02em;
}

.news-section-heading p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 11px;
}

.news-section-link {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 7px;

    color: var(--accent-light);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;

    transition: color var(--transition);
}

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

.news-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.news-card {
    margin: 0;
}

.news-card-link {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 70px;
    padding: 14px 16px;

    color: inherit;
    text-decoration: none;

    background: transparent;

    border: 1px solid var(--glass-border);
    border-radius: 2px;

    transition: background var(--transition), border-color var(--transition);
}

.news-card-link:hover {
    background: var(--glass-hover);
    border-color: var(--accent);
}

.news-card-date-column {
    min-width: 0;
}

.news-card-date {
    display: block;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 10px;
    white-space: nowrap;
}

.news-card-body {
    min-width: 0;
}

.news-card-title {
    overflow: hidden;
    margin: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;

    transition: color var(--transition);
}

.news-card-link:hover .news-card-title {
    color: var(--accent-light);
}

.news-card-description {
    overflow: hidden;
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-card-arrow {
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 14px;

    transition: color var(--transition), transform var(--transition);
}

.news-card-link:hover .news-card-arrow {
    color: var(--accent);
    transform: translateX(2px);
}

.catalog-section {
    margin-top: 0;
    margin-bottom: 52px;
}

.catalog-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding-bottom: 14px;

    border-bottom: 1px solid var(--glass-border);
}

.catalog-section-label {
    margin-bottom: 5px;

    color: var(--accent);

    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .18em;
}

.catalog-section-header h2 {
    margin: 0;
    color: var(--text);
    font-size: 21px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -.02em;
}

.catalog-section-header .catalog-count {
    margin-top: 5px;
}

.asset-card {
    position: relative;
}

.asset-card .catalog-content {
    min-width: 0;
}

.asset-card .item-path {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    color: var(--text-dim);
    font-family: var(--mono);
    font-size: 10px;
    opacity: .7;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-card .item-tags {
    position: relative;
    z-index: 2;
}

@media (max-width: 700px) {
    .news-section {
        margin-top: 36px;
        margin-bottom: 42px;
        padding: 16px;
    }

    .news-section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .news-section-link {
        align-self: flex-start;
    }

    .news-card-link {
        grid-template-columns: 1fr auto;
        gap: 5px 12px;
        padding: 13px 14px;
    }

    .news-card-date-column {
        grid-column: 1 / -1;
    }

    .news-card-date {
        font-size: 9px;
    }

    .news-card-title {
        font-size: 12px;
    }

    .news-card-description {
        font-size: 11px;
    }

    .news-card-arrow {
        grid-column: 2;
        grid-row: 2;
    }

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


/* ============================================================
   NEWS INDEX PAGE (/news/)
   ============================================================ */

.news-index {
    margin-bottom: 60px;
}

.news-index-header {
    position: relative;
    overflow: hidden;

    margin-bottom: 32px;
    padding: 44px 46px 40px;

    background: var(--bg-soft);

    border: 1px solid var(--glass-border);
    border-radius: 2px;
}

.news-index-header::before,
.news-index-header::after {
    content: "";

    position: absolute;

    width: 14px;
    height: 14px;

    border: 1px solid var(--accent);

    pointer-events: none;
}

.news-index-header::before {
    top: -1px;
    left: -1px;

    border-right: 0;
    border-bottom: 0;
}

.news-index-header::after {
    bottom: -1px;
    right: -1px;

    border-left: 0;
    border-top: 0;
}

.news-index-label {
    position: relative;
    z-index: 1;

    margin-bottom: 14px;

    color: var(--accent-light);

    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .18em;
}

.news-index-header h1 {
    position: relative;
    z-index: 1;

    margin: 0 0 10px;

    font-size: clamp(30px, 5vw, 46px);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -.04em;
}

.news-index-header p {
    position: relative;
    z-index: 1;

    max-width: 620px;

    margin: 0;

    color: var(--text-dim);

    font-size: 15px;
    line-height: 1.65;
}

.news-index-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(320px, 1fr)
        );

    gap: 12px;
}

.news-index-card {
    min-width: 0;
}

.news-index-card-link {
    position: relative;

    display: flex;
    flex-direction: column;

    height: 100%;

    gap: 12px;

    padding: 22px 22px 20px;

    overflow: hidden;

    color: inherit;
    text-decoration: none;

    background: var(--bg-soft);

    border: 1px solid var(--glass-border);
    border-radius: 2px;

    transition:
        border-color var(--transition),
        background var(--transition);
}

.news-index-card-link::before {
    content: "";

    position: absolute;

    top: -1px;
    left: -1px;

    width: 10px;
    height: 10px;

    border: 1px solid var(--accent);
    border-right: 0;
    border-bottom: 0;

    opacity: 0;

    pointer-events: none;

    transition: opacity var(--transition);

    z-index: 2;
}

.news-index-card-link:hover {
    border-color: var(--accent);
    background: var(--glass-hover);
}

.news-index-card-link:hover::before {
    opacity: 1;
}

.news-index-card-top {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    gap: 10px;

    min-height: 22px;
}

.news-index-card-date {
    display: inline-flex;
    align-items: center;

    padding: 3px 9px;

    color: var(--accent-light);

    background: transparent;
    border: 1px solid var(--accent);
    border-radius: 2px;

    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .02em;
    white-space: nowrap;
}

.news-index-card-title {
    position: relative;
    z-index: 1;

    margin: 0;

    color: var(--text);

    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;

    letter-spacing: -.015em;

    transition: color var(--transition);
}

.news-index-card-link:hover .news-index-card-title {
    color: var(--accent-light);
}

.news-index-card-description {
    position: relative;
    z-index: 1;

    margin: 0;

    color: var(--text-dim);

    font-size: 13px;
    line-height: 1.55;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;

    overflow: hidden;
}

.news-index-card-tags {
    position: relative;
    z-index: 1;

    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.news-index-card-more {
    position: relative;
    z-index: 1;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-top: auto;
    padding-top: 8px;

    color: var(--accent-light);

    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .04em;
}

.news-index-card-more > span {
    transition: transform var(--transition);
}

.news-index-card-link:hover .news-index-card-more {
    color: var(--accent);
}

.news-index-card-link:hover .news-index-card-more > span {
    transform: translateX(4px);
}

@media (max-width: 760px) {
    .news-index-header {
        margin-bottom: 24px;
        padding: 28px 22px 24px;
    }

    .news-index-header h1 {
        font-size: 28px;
    }

    .news-index-header p {
        font-size: 14px;
    }

    .news-index-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .news-index-card-link {
        padding: 18px 18px 16px;
    }

    .news-index-card-title {
        font-size: 16px;
    }
}


/* ============================================================
   INDIVIDUAL NEWS PAGE — refinement
   ============================================================ */

.news-page {
    max-width: 880px;

    margin: 0 auto 60px;
}

.news-header {
    position: relative;

    overflow: hidden;

    padding: 42px 46px 36px;

    background: var(--bg-soft);

    border: 1px solid var(--glass-border);
    border-radius: 2px;
}

.news-header > * {
    position: relative;
    z-index: 1;
}

.news-label {
    display: inline-block;

    margin-bottom: 14px;
    padding: 3px 10px;

    color: var(--accent-light);

    background: transparent;
    border: 1px solid var(--accent);
    border-radius: 2px;

    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .18em;
}

.news-header h1 {
    margin: 0;

    font-size: clamp(28px, 5vw, 44px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.035em;
}

.news-header .tags {
    margin-top: 18px;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;

    gap: 8px 20px;

    margin-top: 22px;
    padding-top: 18px;

    border-top: 1px solid var(--glass-border);
}

.news-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    color: var(--text-muted);

    font-family: var(--mono);
    font-size: 11px;
}

.news-lead {
    margin: 28px 0 0;
    padding: 0 6px;

    color: var(--text-dim);

    font-size: 16px;
    line-height: 1.7;
}

.news-content {
    margin-top: 28px;
    padding: 32px 36px;

    background: var(--bg-soft);

    border: 1px solid var(--glass-border);
    border-radius: 2px;
}

.news-footer {
    display: flex;
    margin-top: 26px;
}

@media (max-width: 760px) {
    .news-header {
        padding: 28px 22px 24px;
    }

    .news-header h1 {
        font-size: 26px;
    }

    .news-content {
        margin-top: 20px;
        padding: 22px 20px;
    }

    .news-lead {
        font-size: 15px;
        padding: 0;
    }
}