:root {
    --bg: #F0C8A0;
    --bg-alt: #E8B88E;
    --light: #F7DEC6;
    --text: #1A1A1A;
    --muted: rgba(26, 26, 26, 0.72);
    --max: 1100px;
    --display: 'Syne', 'Space Grotesk', sans-serif;
    --body: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

html {
    background: var(--bg);
    color: var(--text);
    font-family: var(--body);
    line-height: 1.7;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 88% 12%, rgba(26, 26, 26, 0.07) 0 120px, transparent 121px),
        radial-gradient(circle at 8% 88%, rgba(26, 26, 26, 0.05) 0 180px, transparent 181px),
        var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--text); }

.shell {
    width: min(var(--max), calc(100% - 4rem));
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 2rem 0 1rem;
}

.brand {
    color: var(--text);
    font-family: var(--display);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-decoration: none;
    text-transform: uppercase;
}

.nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.nav a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.nav a:hover {
    border-bottom-color: var(--text);
}

.detail-hero {
    padding: 5.5rem 0 3.25rem;
    position: relative;
}

.detail-hero::after {
    content: '';
    position: absolute;
    right: 4%;
    top: 22%;
    width: clamp(120px, 18vw, 230px);
    height: clamp(130px, 20vw, 260px);
    border: 3px solid var(--text);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    opacity: 0.35;
    pointer-events: none;
    z-index: -1;
}

.kicker {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin: 0 0 1.3rem;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    font-family: var(--display);
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

h1 {
    font-size: clamp(4rem, 12vw, 9rem);
    line-height: 0.86;
    margin: 0 0 1.5rem;
    max-width: 920px;
}

.lede {
    font-family: var(--display);
    font-size: clamp(1.45rem, 3.1vw, 2.5rem);
    font-weight: 700;
    line-height: 1.08;
    max-width: 850px;
    margin: 0;
}

.contact-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.4rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    border: 2px solid var(--text);
    background: var(--bg);
    color: var(--text);
    padding: 0.25rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-decoration: none;
}

a.chip:hover {
    background: var(--text);
    color: var(--bg);
}

.section {
    padding: 2.25rem 0 5.5rem;
}

.project-boundary {
    border-left: 3px solid var(--text);
    color: var(--muted);
    font-weight: 700;
    max-width: 760px;
    margin: 1.75rem 0 0;
    padding-left: 1rem;
}

.project-showcase {
    display: grid;
    gap: 2.1rem;
}

.project-card {
    display: grid;
    grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.08fr);
    gap: 1.75rem;
    align-items: stretch;
    border: 3px solid var(--text);
    background: var(--bg);
    padding: 1.15rem;
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: -8px;
    bottom: -8px;
    border: 2px solid var(--text);
    z-index: -1;
    pointer-events: none;
}

.project-card:nth-child(2n) {
    transform: rotate(0.28deg);
}

.project-card:nth-child(2n + 1) {
    transform: rotate(-0.22deg);
}

.project-card.feature {
    grid-template-columns: minmax(360px, 1.08fr) minmax(0, 0.92fr);
    background: var(--light);
}

.project-card.compact {
    grid-template-columns: 220px minmax(0, 1fr);
}

.project-preview {
    display: block;
    min-height: 260px;
    border: 3px solid var(--text);
    background: var(--text);
    color: var(--bg);
    overflow: hidden;
    position: relative;
    text-decoration: none;
}

.project-preview::after {
    content: 'Open ↗';
    position: absolute;
    right: 0.8rem;
    bottom: 0.75rem;
    border: 2px solid var(--text);
    background: var(--bg);
    color: var(--text);
    font-family: var(--display);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    padding: 0.15rem 0.45rem;
}

.project-preview img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
}

.project-preview.placeholder {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 68% 28%, rgba(26, 26, 26, 0.14) 0 42px, transparent 43px),
        var(--bg-alt);
}

.project-preview.placeholder::after {
    content: none;
}

.project-preview.placeholder span {
    display: grid;
    place-items: center;
    width: 5.5rem;
    height: 5.5rem;
    border: 3px solid var(--text);
    border-radius: 40% 60% 55% 45% / 48% 45% 55% 52%;
    background: var(--bg);
    font-family: var(--display);
    font-size: 2rem;
    font-weight: 800;
}

.project-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0.4rem 0.25rem 0.25rem;
}

.project-tag {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin: 0 0 0.75rem;
    text-transform: uppercase;
}

.project-copy h2 {
    font-size: clamp(2rem, 3.4vw, 3.5rem);
    line-height: 0.95;
    margin: 0 0 0.8rem;
}

.project-copy p {
    color: var(--muted);
    font-size: 1rem;
    margin: 0 0 1rem;
}

.project-points {
    color: var(--muted);
    margin: 0 0 1.1rem;
    padding-left: 1.1rem;
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: auto;
}

.action {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border: 2px solid var(--text);
    background: var(--bg);
    color: var(--text);
    font-family: var(--display);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    padding: 0.25rem 0.75rem;
    text-decoration: none;
}

.action:hover,
.action.primary {
    background: var(--text);
    color: var(--bg);
}

.action.primary:hover {
    background: var(--bg);
    color: var(--text);
}

.action.disabled {
    color: var(--muted);
    border-color: rgba(26, 26, 26, 0.45);
}

.stack {
    display: grid;
    gap: 1.25rem;
}

.row {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    gap: 1.1rem;
    align-items: center;
    min-height: 112px;
    border: 3px solid var(--text);
    background: var(--bg);
    color: var(--text);
    padding: 1.15rem 1.25rem;
    position: relative;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.row::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 7px;
    right: -7px;
    bottom: -7px;
    border: 2px solid var(--text);
    z-index: -1;
    pointer-events: none;
}

.row:nth-child(2n) { transform: rotate(0.35deg); }
.row:nth-child(2n + 1) { transform: rotate(-0.28deg); }

.row:hover {
    background: var(--light);
    transform: translateY(-4px) rotate(0deg);
}

.mark {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 3px solid var(--text);
    background: var(--text);
    color: var(--bg);
    font-family: var(--display);
    font-weight: 800;
    line-height: 1;
    border-radius: 40% 60% 55% 45% / 48% 45% 55% 52%;
}

.mark.alt {
    background: var(--bg-alt);
    color: var(--text);
}

.mark.green {
    background: var(--light);
    color: var(--text);
}

.row h3 {
    margin: 0 0 0.25rem;
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
    line-height: 1.05;
}

.meta {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.45;
}

.arrow {
    font-family: var(--display);
    font-weight: 800;
    white-space: nowrap;
}

.detail-grid {
    display: grid;
    grid-template-columns: 0.72fr 1.28fr;
    gap: 3rem;
    padding: 2rem 0 5.5rem;
}

.facts {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.fact {
    border: 3px solid var(--text);
    background: var(--bg);
    padding: 1rem;
    position: relative;
}

.fact::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid var(--text);
    z-index: -1;
}

.fact span {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.fact strong {
    display: block;
    font-size: 1rem;
    line-height: 1.35;
}

.prose {
    display: grid;
    gap: 2rem;
}

.prose article {
    border-top: 3px solid var(--text);
    padding-top: 1.1rem;
}

.prose h2 {
    font-size: clamp(2rem, 3.2vw, 3rem);
    line-height: 1;
    margin: 0 0 0.75rem;
}

.prose p,
.prose li {
    color: var(--muted);
    font-size: 1rem;
}

.prose p {
    margin: 0;
}

.prose ul {
    margin: 0;
    padding-left: 1.2rem;
}

.quote {
    border: 3px solid var(--text);
    background: var(--text);
    color: var(--bg);
    font-family: var(--display);
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    font-weight: 800;
    line-height: 1.16;
    margin: 0;
    padding: 1.25rem;
    position: relative;
}

.quote::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 7px;
    right: -7px;
    bottom: -7px;
    border: 2px solid var(--text);
    z-index: -1;
}

@media (max-width: 820px) {
    .shell {
        width: min(100% - 2rem, var(--max));
    }

    .site-header,
    .nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-hero {
        padding-top: 4rem;
    }

    .detail-hero::after {
        display: none;
    }

    .row {
        grid-template-columns: 58px minmax(0, 1fr);
        min-height: 118px;
        gap: 0.9rem;
        padding: 1rem;
    }

    .mark {
        width: 46px;
        height: 46px;
        font-size: 0.9rem;
    }

    .arrow {
        display: none;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-card,
    .project-card.feature,
    .project-card.compact {
        grid-template-columns: 1fr;
        transform: none;
    }

    .project-preview,
    .project-preview img {
        min-height: 210px;
    }

    .project-copy {
        padding: 0.2rem 0 0;
    }
}
