:root {
    --ink: #27231f;
    --muted: #645c55;
    --line: #ded7ce;
    --paper: #fbfaf7;
    --soft: #f0ebe3;
    --accent: #a83a1f;
    --accent-dark: #762714;
    --green: #42664a;
    --blue: #245f73;
    --white: #fff;
    --shadow: 0 18px 45px rgba(39, 35, 31, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 18px;
    line-height: 1.6;
}

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

a {
    color: inherit;
}

.button,
.portfolio-card,
.text-link {
    text-decoration: none;
}

.portfolio-hero {
    padding: clamp(5rem, 10vw, 8rem) clamp(1rem, 5vw, 5rem);
    color: var(--white);
    background: linear-gradient(135deg, var(--ink), var(--blue));
}

.portfolio-hero-content {
    max-width: 960px;
}

.eyebrow {
    margin: 0 0 0.7rem;
    color: #f0b69d;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

h1 {
    max-width: 920px;
    margin-bottom: 1.2rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.5rem, 7vw, 5rem);
    line-height: 1;
    font-weight: 500;
}

h2 {
    margin-bottom: 1rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1;
    font-weight: 500;
}

.lead {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.section {
    padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 5vw, 5rem);
}

.section-heading {
    max-width: 900px;
    margin-bottom: 2.5rem;
}

.section-heading .eyebrow {
    color: var(--accent);
}

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

.portfolio-card {
    display: grid;
    align-content: start;
    color: inherit;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: 0 10px 22px rgba(39, 35, 31, 0.07);
}

.portfolio-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--soft);
}

.portfolio-card-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
    padding: 1.1rem 1.2rem 1.25rem;
}

.portfolio-card-content > .tag,
.portfolio-card-content > h2,
.portfolio-card-content > p {
    grid-column: 1 / -1;
}

.portfolio-card h2 {
    margin: 0;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    line-height: 1.08;
}

.portfolio-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
}

.portfolio-card .tag {
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.text-link {
    width: fit-content;
    color: var(--accent);
    font-weight: 800;
    transition: color 0.2s ease, text-underline-offset 0.2s ease, transform 0.2s ease;
}

.portfolio-card-content > .text-link {
    grid-column: 2;
    justify-self: end;
    white-space: nowrap;
}

.text-link:hover {
    color: var(--accent-dark);
    text-underline-offset: 0.34em;
    transform: translateY(-1px);
}

footer {
    display: grid;
    gap: 0.5rem;
    padding: 2rem clamp(1rem, 5vw, 5rem);
    color: rgba(255, 255, 255, 0.78);
    background: var(--ink);
    font-size: 0.95rem;
}

footer p {
    margin: 0;
}

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

@media (max-width: 680px) {
    body {
        font-size: 16px;
    }

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