:root {
    color-scheme: light;
    --page-bg: #eef8f3;
    --ink: #172026;
    --muted: #667179;
    --line: #d9e2e4;
    --panel: #ffffff;
    --soft: #f3faf6;
    --sky: #d8f0f7;
    --mint: #bfe9d6;
    --accent: #0b6f78;
    --accent-strong: #0a4f59;
    --button-2: #f4b942;
    --sun: var(--button-2);
    --shadow: 0 22px 60px rgba(23, 32, 38, .12);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--page-bg);
    background-color: var(--page-bg) !important;
    background-image: none !important;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    background: var(--page-bg);
    background-color: var(--page-bg) !important;
    background-image: none !important;
}

a {
    color: inherit;
}

button,
input,
textarea {
    font: inherit;
}

.site-header {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: 28px 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: var(--page-bg);
    background-image: none !important;
}

.brand img {
    width: min(210px, 58vw);
    height: auto;
    display: block;
}

.button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 8px;
    padding: 10px 16px;
    color: var(--button-text);
    background: var(--accent);
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.button:hover {
    background: var(--accent-strong);
    box-shadow: 0 12px 28px rgba(48, 51, 71, .14);
    transform: translateY(-1px);
}

main {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: 16px 0 72px;
    background: var(--page-bg);
    background-image: none !important;
}

.intro {
    min-height: 260px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
    gap: 32px;
    align-items: end;
    padding: 48px 0 42px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent-strong);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    max-width: 780px;
    margin: 0;
    color: var(--ink);
    font-size: clamp(2.5rem, 7vw, 5.8rem);
    line-height: .96;
    letter-spacing: 0;
}

.intro > p {
    max-width: 390px;
    margin: 0;
    color: var(--soft-ink, var(--muted));
    font-size: 1.08rem;
}

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

.project-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(23, 32, 38, .08);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 12px 32px rgba(23, 32, 38, .06);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.project-card:hover {
    border-color: var(--card-border, var(--line));
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.project-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--soft);
}

.project-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.project-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
}

.project-title {
    margin: 0;
    min-height: 36px;
    padding: 7px 16px;
    color: #fff;
    background: var(--soft-ink, var(--muted));
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: 0;
    display: flex;
    align-items: center;
}

.project-claim {
    margin: 0;
    color: var(--accent-strong);
    font-weight: 760;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-description {
    margin: 0;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.project-tag,
.project-status {
    width: fit-content;
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--ink);
    background: rgba(23, 32, 38, .06);
    font-size: .75rem;
    font-weight: 780;
    line-height: 1;
}

.project-status {
    color: var(--accent-strong);
    background: var(--soft);
}

.project-link {
    margin-top: auto;
    color: var(--accent-strong);
    font-weight: 820;
    text-decoration: none;
}

.slogan {
    margin: 0;
    color: var(--accent-strong);
    font-weight: 760;
}

.description {
    margin: 0;
    color: var(--muted);
}

.card-footer {
    display: none;
    margin-top: auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--accent-strong);
    font-weight: 760;
}

.arrow {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--sun);
    color: #1d2529;
}

@media (max-width: 1100px) {
    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    main {
        width: min(100% - 34px, 420px);
    }

    .intro {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 22px;
        align-items: start;
        padding: 32px 0 34px;
    }

    h1 {
        max-width: 100%;
        font-size: clamp(2.25rem, 12vw, 3.25rem);
        line-height: .98;
    }

    .intro > p {
        max-width: 100%;
        font-size: 1rem;
        line-height: 1.55;
    }

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

    .project-title {
        min-height: 34px;
        padding: 7px 14px;
        font-size: 1rem;
    }

    .project-card-content {
        padding: 20px;
    }

    .project-card:hover {
        transform: translateY(-2px);
    }
}

.loading,
.empty {
    grid-column: 1 / -1;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .76);
    color: var(--muted);
}

.project-dialog {
    width: min(1080px, calc(100% - 28px));
    max-height: min(920px, calc(100vh - 28px));
    border: 0;
    border-radius: 28px;
    padding: 0;
    background: var(--panel);
    color: var(--ink);
    box-shadow: var(--shadow);
    overflow: auto;
}

.project-dialog::backdrop {
    background: rgba(23, 32, 38, .46);
    backdrop-filter: blur(5px);
}

.close-dialog {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 2;
}

.icon-button {
    width: 56px;
    height: 56px;
    border: 3px solid var(--accent-strong);
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    color: var(--accent-strong);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(23, 32, 38, .16);
}

.detail-shell {
    padding: 36px 36px 28px;
}

.detail-cover {
    overflow: hidden;
    border-radius: 10px;
    background: var(--soft);
    box-shadow: 0 18px 42px rgba(23, 32, 38, .13);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.detail-copy {
    padding: 28px 10px 0;
}

.detail-copy h2 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1;
    letter-spacing: 0;
}

.detail-copy .slogan {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: clamp(1.08rem, 1.8vw, 1.5rem);
    font-weight: 850;
}

.detail-intro-text {
    max-width: 780px;
    margin: 0;
    color: var(--soft-ink, var(--muted));
    font-size: 1rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.detail-links {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin: 28px 0;
}

.detail-button {
    min-width: 210px;
    justify-content: center;
}

.secondary-button {
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--ink);
}

.secondary-button:hover {
    color: #fff;
    background: var(--ink);
}

.detail-gallery-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    max-width: 680px;
    margin-top: 8px;
}

.detail-gallery-button {
    width: 100%;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
    cursor: zoom-in;
    overflow: hidden;
}

.detail-gallery-button img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.detail-sections {
    margin-top: 28px;
}

.detail-section {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 18px;
    padding: 22px 10px;
    border-top: 1px solid var(--line);
}

.detail-section-icon {
    color: var(--accent);
}

.detail-section-icon svg {
    width: 38px;
    height: 38px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.detail-section-body h3 {
    margin: 0 0 7px;
    color: var(--ink);
    font-size: 1.06rem;
    line-height: 1.2;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.detail-section-body p {
    max-width: 820px;
    margin: 0;
    color: var(--soft-ink, var(--muted));
    font-size: .96rem;
    line-height: 1.5;
}

.detail-pill-list,
.detail-video-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.detail-section-body > .detail-pill-list:first-child,
.detail-section-body > .detail-video-list:first-child {
    margin-top: 0;
}

.detail-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(23, 32, 38, .08);
    color: var(--ink);
    font-size: .76rem;
    font-weight: 780;
    line-height: 1;
}

.detail-video-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 7px 16px;
    border: 1px solid var(--ink);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 850;
}

.detail-video-link:hover {
    color: #fff;
    background: var(--ink);
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 26px;
    background: rgba(23, 32, 38, .82);
}

.image-lightbox img {
    max-width: min(100%, 1180px);
    max-height: 92vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .34);
}

.image-lightbox-close {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    color: var(--ink);
    background: #fff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 760px) {
    .intro {
        min-height: auto;
        padding-top: 28px;
    }

    .project-dialog {
        width: min(100% - 28px, 720px);
        border-radius: 18px;
    }

    .close-dialog {
        top: 12px;
        right: 12px;
    }

    .icon-button {
        width: 44px;
        height: 44px;
        border-width: 2px;
        font-size: 1.55rem;
    }

    .detail-shell {
        padding: 18px 16px 20px;
    }

    .detail-copy {
        padding: 22px 2px 0;
    }

    .detail-copy h2 {
        font-size: clamp(2rem, 10vw, 3.1rem);
    }

    .detail-copy .slogan {
        font-size: 1.08rem;
    }

    .detail-intro-text {
        font-size: .96rem;
        line-height: 1.48;
    }

    .detail-links {
        gap: 10px;
        margin: 22px 0;
    }

    .detail-button {
        width: 100%;
        min-width: 0;
    }

    .detail-gallery-strip {
        grid-template-columns: 1fr;
    }

    .detail-section {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 12px;
        padding: 18px 2px;
    }

    .detail-section-icon svg {
        width: 30px;
        height: 30px;
    }

    .detail-section-body h3 {
        font-size: 1rem;
    }

    .detail-section-body p {
        font-size: .94rem;
        line-height: 1.48;
    }
}
