:root {
    --bg-color: #f4f1ea;
    --surface-color: rgba(255, 253, 248, 0.5);
    --surface-strong: rgba(255, 253, 248, 0.7);
    --text-main: #181614;
    --text-muted: #6d665e;
    --border-color: rgba(24, 22, 20, 0.12);
    --accent-color: #a85c3b;
    --shadow-soft: 0 10px 30px rgba(24, 22, 20, 0.04);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Source Serif 4', serif;
    --header-height: 76px;
    --layout-width: 1180px;
    --transition-smooth: 220ms ease;
}

[data-theme="dark"] {
    --bg-color: #151515;
    --surface-color: rgba(29, 29, 29, 0.55);
    --surface-strong: rgba(29, 29, 29, 0.82);
    --text-main: #f2efe8;
    --text-muted: #afa79d;
    --border-color: rgba(242, 239, 232, 0.1);
    --accent-color: #f2d2b7;
    --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.28);
}

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

html {
    font-size: 17px;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    background: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.35s ease, color 0.35s ease;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    backdrop-filter: blur(10px);
    background: color-mix(in srgb, var(--bg-color) 86%, transparent);
    border-bottom: 1px solid var(--border-color);
}

.header-inner,
.project-shell {
    width: min(calc(100% - 2rem), var(--layout-width));
    margin: 0 auto;
}

.header-inner {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--font-heading);
    font-size: 1.32rem;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    box-shadow: 0 6px 18px rgba(24, 22, 20, 0.08);
    flex: 0 0 auto;
}

.header-link {
    color: var(--text-muted);
    font-size: 0.92rem;
    transition: color var(--transition-smooth);
}

.header-link:hover,
.header-link:focus-visible {
    color: var(--text-main);
}

.theme-switch {
    display: inline-block;
    position: relative;
    width: 42px;
    height: 24px;
}

.theme-switch input {
    display: none;
}

.slider {
    position: absolute;
    inset: 0;
    background: var(--text-main);
    border-radius: 999px;
    cursor: pointer;
}

.slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: var(--bg-color);
    transition: transform 0.35s ease, background-color 0.35s ease;
}

[data-theme="dark"] .slider {
    background: #f2efe8;
}

[data-theme="dark"] .slider::before {
    background: #151515;
    transform: translateX(18px);
}

.project-shell {
    padding: 2.2rem 0 4rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 1.2rem;
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--border-color);
}

.project-hero {
    margin-bottom: 2.5rem;
    width: min(100%, 760px);
    margin-inline: auto;
}

.project-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.05em;
    max-width: 10ch;
}

.project-subtitle {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 56ch;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.4rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-kicker::before {
    content: "";
    width: 22px;
    height: 1px;
    background: var(--border-color);
}

.project-snapshot {
    margin-bottom: 2.5rem;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 22px;
    background: color-mix(in srgb, var(--surface-color) 88%, transparent);
    box-shadow: var(--shadow-soft);
    width: min(100%, 760px);
    margin-inline: auto;
}

.project-snapshot-head {
    display: grid;
    grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: end;
    margin-bottom: 1rem;
}

.project-snapshot-head h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.55rem, 2.8vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-top: 0.35rem;
}

.project-snapshot-head p {
    color: var(--text-muted);
    max-width: 58ch;
    justify-self: end;
    text-wrap: pretty;
}

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

.fact-card {
    display: grid;
    gap: 0.45rem;
    padding: 1rem 1.05rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--surface-strong);
}

.fact-card span {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fact-card strong {
    color: var(--text-main);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.55;
    text-wrap: balance;
}

.project-main {
    min-width: 0;
    display: grid;
    gap: 1.5rem;
}

.project-content {
    display: grid;
    gap: 1rem;
    width: min(100%, 760px);
    margin-inline: auto;
}

.project-section {
    padding-top: 1.35rem;
    border-top: 1px solid var(--border-color);
}

.project-section h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.7rem, 3vw, 2.1rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 0.8rem;
}

.project-section p {
    color: var(--text-main);
    max-width: 68ch;
    text-wrap: pretty;
}

@media (max-width: 980px) {
    .project-snapshot-head {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .project-snapshot-head p {
        justify-self: start;
    }

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

@media (max-width: 720px) {
    .header-inner {
        min-height: auto;
        padding: 0.85rem 0;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        row-gap: 0.75rem;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.6rem 0.9rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border-color);
    }

    .brand {
        font-size: 1.12rem;
        font-weight: 500;
        letter-spacing: -0.02em;
    }

    .header-link {
        font-size: 0.88rem;
        line-height: 1.2;
    }

    .project-shell {
        padding: 1.8rem 0 3rem;
    }

    .project-title {
        font-size: clamp(2.8rem, 14vw, 4rem);
    }

    .project-snapshot {
        padding: 1rem;
        margin-bottom: 2rem;
    }

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

}
