@charset "UTF-8";

:root {
    --ink: #101828;
    --ink-soft: #475467;
    --muted: #667085;
    --line: #e4e7ec;
    --page: #f4f6f8;
    --card: #ffffff;
    --media: #eef2f7;
    --accent: #2d72cd;
    --accent-deep: #074cbb;
    --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--page);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

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

.wrap {
    width: min(1200px, calc(100% - 64px));
    margin: 0 auto;
}

/* Header */
.page-head {
    padding: 76px 0 40px;
}

.eyebrow {
    margin: 0 0 14px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent-deep);
}

.page-head h1 {
    margin: 0;
    font-family: var(--font-heading, "Instrument Serif", Georgia, "Times New Roman", serif);
    font-weight: 400;
    font-size: clamp(2.8rem, 6vw, 4.6rem);
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.page-head h1 em {
    font-style: italic;
}

.lede {
    max-width: 560px;
    margin: 18px 0 0;
    font-size: 14px;
    line-height: 1.75;
    color: var(--muted);
}

.count {
    margin: 24px 0 0;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.count span {
    margin: 0 6px;
    color: #b6bfcc;
}

/* Gallery */
.gallery-wrap {
    padding: 32px 0 76px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px 22px;
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    border-radius: 12px;
    outline: none;
}

a.project-card {
    cursor: pointer;
}

.project-media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--media);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.project-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.45s cubic-bezier(0.2, 0.6, 0.2, 1);
}

a.project-card:hover .project-media {
    transform: translateY(-2px);
    border-color: #cfd8e3;
    box-shadow: 0 16px 32px -20px rgba(16, 24, 40, 0.4);
}

a.project-card:hover .project-media img {
    transform: scale(1.025);
}

a.project-card:focus-visible .project-media {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(45, 114, 205, 0.18);
}

.project-hint {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(16, 24, 40, 0.62);
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.05em;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.project-hint span {
    font-size: 11px;
    line-height: 1;
}

a.project-card:hover .project-hint,
a.project-card:focus-visible .project-hint {
    opacity: 1;
    transform: none;
}

.project-body {
    display: block;
    min-width: 0;
}

.project-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.project-index {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-deep);
    font-variant-numeric: tabular-nums;
}

.project-flag {
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: #98a2b3;
    transition: color 0.18s ease;
}

a.project-card:hover .project-flag {
    color: var(--accent-deep);
}

.project-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: -0.005em;
    color: var(--ink);
}

.project-sub {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 2px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 11px;
    line-height: 1.55;
    color: var(--muted);
}

.projects-empty {
    margin: 40px 0;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .project-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .wrap {
        width: calc(100% - 40px);
    }

    .page-head {
        padding: 48px 0 28px;
    }

    .lede {
        font-size: 13.5px;
    }

    .gallery-wrap {
        padding: 24px 0 56px;
    }

    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 14px;
    }

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

    .project-sub {
        font-size: 10.5px;
    }
}

@media (max-width: 400px) {
    .wrap {
        width: calc(100% - 28px);
    }

    .project-grid {
        gap: 20px 10px;
    }

    .project-index {
        letter-spacing: 0.1em;
    }

    .project-title {
        font-size: 11.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
