:root {
    color-scheme: light;
    --page-bg: #ebe8df;
    --surface: #ffffff;
    --surface-muted: #f4f8f7;
    --section-bg: #f4f0e8;
    --text: #09282d;
    --muted: #557077;
    --border: #dde5e2;
    --accent: #006b64;
    --accent-strong: #004f4a;
    --warm: #8a5a28;
    --shadow: 0 18px 45px rgba(15, 47, 49, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--page-bg);
    color: var(--text);
}

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

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    width: min(100% - 2rem, 72rem);
    margin: 1.5rem auto 0;
    padding: 1.25rem 3rem;
    background: var(--surface);
}

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand img {
    display: block;
    width: min(100%, 24rem);
    height: auto;
}

.site-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.site-nav a {
    color: var(--text);
    text-decoration: none;
}

.site-nav a:hover {
    color: var(--accent);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
    align-items: center;
    gap: 3rem;
    width: min(100% - 2rem, 72rem);
    margin: 0 auto;
    padding: 3rem;
    background: var(--surface-muted);
}

.eyebrow {
    margin: 0 0 0.75rem;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.1;
}

h1 {
    max-width: 10em;
    font-size: clamp(2.4rem, 7vw, 4.5rem);
}

h2 {
    max-width: 18em;
    font-size: clamp(1.8rem, 4vw, 3rem);
}

h3 {
    font-size: 1.35rem;
}

.hero-content p:not(.eyebrow),
.content-panel p {
    max-width: 42rem;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.65;
}

.credentials {
    font-weight: 700;
    color: var(--warm) !important;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0 1rem;
    border: 1px solid var(--accent-strong);
    border-radius: 6px;
    background: var(--accent);
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
}

.button.secondary {
    background: transparent;
    color: var(--accent-strong);
}

.portrait {
    width: 100%;
    max-height: 28rem;
    border: 8px solid var(--surface);
    border-radius: 0;
    object-fit: cover;
    box-shadow: 0 12px 35px rgba(30, 43, 48, 0.16);
}

.app-hero-image {
    object-fit: contain;
    background: var(--surface);
}

.section,
.content-page {
    width: min(100% - 2rem, 72rem);
    margin: 0 auto;
    padding: 4rem 3rem;
    background: var(--section-bg);
}

.section-heading {
    margin-bottom: 1.5rem;
}

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

.projects-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(17rem, 0.8fr);
    gap: 1rem;
    align-items: stretch;
}

.project-card {
    display: flex;
    min-height: 12rem;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
}

.project-card:hover {
    border-color: rgba(18, 109, 114, 0.45);
    box-shadow: 0 12px 28px rgba(30, 43, 48, 0.1);
}

.project-card.featured {
    background: var(--surface-muted);
}

.project-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.project-label {
    color: var(--warm);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.text-link {
    margin-top: auto;
    font-weight: 800;
}

.daily-card {
    min-height: 100%;
    background: #f8faf8;
}

.puzzle-link {
    display: grid;
    align-content: start;
    gap: 0.75rem;
    margin-top: auto;
    color: var(--text);
    text-decoration: none;
}

.puzzle-link img {
    width: 100%;
    min-height: 8rem;
    border-radius: 0;
    object-fit: contain;
    background: #f3f3ef;
}

.puzzle-link span {
    color: var(--muted);
    font-weight: 700;
    line-height: 1.4;
}

.puzzle-task {
    display: block;
}

.puzzle-task {
    min-height: 1.4em;
    color: var(--text) !important;
}

.section-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

.content-panel {
    max-width: 44rem;
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.legal-panel {
    max-width: 58rem;
}

.legal-panel h2 {
    margin-top: 2rem;
    font-size: 1.5rem;
}

.legal-panel h3 {
    margin-top: 1.5rem;
    font-size: 1.15rem;
}

.legal-panel p {
    max-width: 52rem;
}

.archive-page,
.project-page {
    padding-top: 4rem;
}

.archive-intro {
    margin-bottom: 2rem;
}

.archive-intro p {
    max-width: 44rem;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

.archive-list {
    border-top: 2px solid rgba(9, 40, 45, 0.24);
}

.archive-item {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr) max-content;
    gap: 1.5rem;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(9, 40, 45, 0.18);
}

.archive-number {
    color: #c44f1a;
    font-family: Georgia, serif;
    font-size: 2rem;
    line-height: 1;
}

.archive-item h2 {
    font-size: clamp(1.75rem, 3vw, 2.45rem);
}

.archive-item p {
    max-width: 45rem;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.55;
}

.project-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.project-hero:not(:has(img)) {
    grid-template-columns: minmax(0, 1fr);
}

.project-hero p {
    max-width: 45rem;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

.project-hero-image {
    width: 100%;
    border: 8px solid var(--surface);
    box-shadow: var(--shadow);
}

.small-media {
    max-width: 18rem;
    justify-self: center;
    object-fit: contain;
}

.project-detail {
    margin-bottom: 1rem;
}

.unframed-detail {
    max-width: 54rem;
}

.project-detail h2 {
    margin-bottom: 0.75rem;
    font-size: 1.55rem;
}

.project-detail p {
    max-width: 54rem;
}

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

.media-grid img {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--surface);
}

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

.logo-list {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.logo-list li {
    display: grid;
    gap: 0.45rem;
}

.logo-list img {
    max-width: min(100%, 28rem);
    height: auto;
}

.contact-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.75rem 1.5rem;
    margin: 2rem 0 0;
}

.contact-list dt {
    color: var(--muted);
    font-weight: 800;
}

.contact-list dd {
    margin: 0;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    width: min(100% - 2rem, 72rem);
    margin: 0 auto 1.5rem;
    padding: 1.5rem 3rem 2rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.95rem;
}

.site-footer a {
    color: var(--muted);
}

@media (max-width: 820px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 1rem;
    }

    .site-nav {
        justify-content: flex-start;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 1.25rem;
    }

    .section,
    .content-page,
    .site-footer {
        padding-right: 1rem;
        padding-left: 1rem;
    }

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

    .archive-item,
    .project-hero,
    .project-columns,
    .media-grid {
        grid-template-columns: 1fr;
    }

    .archive-item {
        gap: 0.75rem;
    }

    .archive-item > .project-label {
        justify-self: start;
    }

    .portrait {
        order: -1;
        max-height: 22rem;
    }
}

@media (max-width: 520px) {
    .site-nav,
    .hero-actions,
    .site-footer {
        width: 100%;
    }

    .site-nav {
        justify-content: space-between;
    }

    .button {
        width: 100%;
    }

    .contact-list {
        grid-template-columns: 1fr;
    }
}
