:root {
    color-scheme: light;
    --background: #f7f8f8;
    --surface: #fcfdfd;
    --text: #1f2528;
    --muted: #64727a;
    --accent: #6f8794;
    --line: #d9dee0;
    --shadow: 0 24px 70px rgba(31, 37, 40, 0.11);
    --max-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--background);
}

body {
    min-height: 100%;
    margin: 0;
    background:
        linear-gradient(270deg, rgba(111, 135, 148, 0.06), transparent 40%),
        var(--background);
    color: var(--text);
    font-family: Inter, "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

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

.page-shell {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    grid-template-areas:
        "portrait hero"
        "portrait about"
        "portfolio portfolio";
    column-gap: clamp(2.5rem, 6vw, 6rem);
    row-gap: clamp(2.5rem, 5vw, 4rem);
    width: min(calc(100% - 3rem), var(--max-width));
    margin: 0 auto;
    padding: clamp(4rem, 8vw, 7rem) 0;
}

.hero {
    grid-area: hero;
    align-self: start;
    max-width: 680px;
}

.kicker {
    margin: 0 0 0.75rem;
    color: var(--accent);
    font-size: clamp(0.72rem, 1.1vw, 0.82rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.45;
    text-transform: uppercase;
}

h1,
h3,
h4,
h2,
p {
    margin-top: 0;
}

h1 {
    max-width: 10.5ch;
    margin-bottom: 1rem;
    font-size: clamp(2.4rem, 3.6vw, 3.5rem);
    font-weight: 650;
    line-height: 1;
}

.subheading {
    max-width: 620px;
    margin-bottom: 1.35rem;
    color: var(--muted);
    font-size: clamp(1rem, 1.45vw, 1.14rem);
    font-weight: 600;
    line-height: 1.55;
}

.intro {
    max-width: 620px;
    margin-bottom: 0;
    padding-left: 1.25rem;
    border-left: 3px solid var(--accent);
    color: #263034;
    font-size: clamp(1.02rem, 1.35vw, 1.16rem);
    line-height: 1.6;
}

.portrait-panel {
    grid-area: portrait;
    align-self: stretch;
    justify-self: start;
    width: min(100%, 300px);
    margin: 0;
}

.portrait-panel img {
    width: 100%;
    height: 100%;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 18px 46px rgba(31, 37, 40, 0.09);
    object-fit: cover;
    object-position: 50% 48%;
}

.about {
    grid-area: about;
    max-width: 760px;
    padding-top: clamp(1.5rem, 4vw, 3rem);
    border-top: 1px solid var(--line);
}

h2 {
    margin-bottom: 1.75rem;
    color: var(--accent);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
}

.about-copy {
    display: grid;
    gap: 1.25rem;
}

.about-copy p {
    max-width: 64ch;
    margin-bottom: 0;
    color: #273034;
    font-size: clamp(1rem, 1.35vw, 1.08rem);
}

.portfolio {
    grid-area: portfolio;
    max-width: 100%;
    padding-top: clamp(2.5rem, 5vw, 4.5rem);
    border-top: 1px solid var(--line);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: clamp(1rem, 2vw, 1.35rem);
}

.project-card {
    display: grid;
    align-content: start;
    padding: clamp(1.25rem, 2vw, 1.6rem);
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(252, 253, 253, 0.76);
}

.project-card-featured {
    background: rgba(252, 253, 253, 0.9);
}

.project-card-wide {
    grid-column: 1 / -1;
}

.project-label {
    margin-bottom: 0.85rem;
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.3;
    text-transform: uppercase;
}

.project-card h3 {
    margin-bottom: 0.8rem;
    color: var(--text);
    font-size: clamp(1.04rem, 1.6vw, 1.2rem);
    font-weight: 700;
    line-height: 1.28;
}

.project-subtitle {
    margin-bottom: 1.05rem;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1.45;
}

.project-description {
    margin-bottom: 1.15rem;
    color: #273034;
    font-size: 0.96rem;
    line-height: 1.58;
}

.case-study-summary {
    display: grid;
    gap: 1rem;
    margin-bottom: 0;
}

.case-study-summary h4 {
    margin-bottom: 0.3rem;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.35;
    text-transform: uppercase;
}

.case-study-summary p {
    margin-bottom: 0;
    color: #273034;
    font-size: 0.94rem;
    line-height: 1.54;
}

.case-study-link,
.project-link {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    margin-top: 1.35rem;
    padding: 0.7rem 0.95rem;
    border: 1px solid var(--accent);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

@media (max-width: 860px) {
    body {
        background: var(--background);
    }

    .page-shell {
        grid-template-columns: 1fr;
        grid-template-areas:
            "hero"
            "portrait"
            "about"
            "portfolio";
        width: min(calc(100% - 2rem), 640px);
        padding: 3rem 0 4rem;
        row-gap: 3rem;
    }

    h1 {
        max-width: 9ch;
        margin-bottom: 1rem;
    }

    .subheading {
        margin-bottom: 1.6rem;
    }

    .intro {
        padding-left: 1rem;
        font-size: 1.08rem;
    }

    .portrait-panel {
        align-self: start;
        justify-self: start;
        width: min(100%, 300px);
    }

    .portrait-panel img {
        height: auto;
        border-radius: 16px;
    }

    .about,
    .portfolio {
        padding-top: 2.4rem;
    }
}

@media (max-width: 680px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-shell {
        width: min(calc(100% - 1.5rem), 420px);
        padding: 2.25rem 0 3rem;
        row-gap: 2.25rem;
    }

    .kicker {
        margin-bottom: 0.9rem;
    }

    h1 {
        font-size: clamp(2.1rem, 9vw, 2.7rem);
    }

    .portrait-panel img {
        border-radius: 14px;
    }

    .portrait-panel {
        width: min(100%, 220px);
    }
}
