:root {
    --bg: #edeae0;
    --bg-soft: #e3e0d5;
    --surface: #f5f2e9;
    --surface-muted: #d7d7c9;

    --fg: #3d484d;
    --muted: #68746d;

    --green: #a7c080;
    --teal: #7fbbb3;
    --orange: #e69875;
    --yellow: #dbbc7f;

    --border: #cbcbbd;

    --page-width: 1100px;
    --radius: 1rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.65;
}

a {
    color: inherit;
}

.site-header,
main {
    width: min(var(--page-width), calc(100% - 3rem));
    margin-inline: auto;
}

.site-header {
    border-bottom: 1px solid var(--border);
}

.nav {
    min-height: 5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    color: var(--fg);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
}

.brand::before {
    content: "●";
    margin-right: 0.55rem;
    color: var(--green);
    font-family: sans-serif;
    font-size: 0.75rem;
}

.nav-links {
    display: flex;
    gap: 1.6rem;
}

.nav-links a {
    color: var(--muted);
    font-size: 0.95rem;
    text-decoration: none;
    transition:
        color 150ms ease,
        transform 150ms ease;
}

.nav-links a:hover {
    color: var(--fg);
    transform: translateY(-1px);
}

.hero {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: 5rem;
}

.eyebrow,
.project-type {
    margin-bottom: 0.9rem;
    color: #738c61;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

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

h1,
h2,
h3 {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--fg);
}

h1 {
    max-width: 900px;
    margin-bottom: 2rem;
    font-size: clamp(3.1rem, 8vw, 6.5rem);
    font-weight: 500;
    line-height: 0.98;
    letter-spacing: -0.045em;
}

h1::selection,
h2::selection,
h3::selection {
    background: var(--green);
}

h2 {
    margin-bottom: 1rem;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    line-height: 1.1;
}

h3 {
    margin-bottom: 0.75rem;
    font-size: 1.45rem;
    font-weight: 600;
}

.intro {
    max-width: 640px;
    color: var(--muted);
    font-size: 1.15rem;
}

.section {
    padding-block: 5rem;
    border-top: 1px solid var(--border);
}

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

.narrow {
    max-width: 700px;
}

.narrow > p:last-child {
    color: var(--muted);
}

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

.project-card {
    position: relative;
    min-height: 240px;
    padding: 1.6rem;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow:
        0 1px 2px rgb(61 72 77 / 0.04),
        0 8px 24px rgb(61 72 77 / 0.04);

    transition:
        transform 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.project-card::after {
    content: "";
    position: absolute;
    right: 1.4rem;
    bottom: 1.4rem;

    width: 0.6rem;
    height: 0.6rem;

    background: var(--green);
    border-radius: 50%;
}

.project-card:nth-child(2)::after {
    background: var(--orange);
}

.project-card:nth-child(3)::after {
    background: var(--yellow);
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: #aeb9a5;

    box-shadow:
        0 2px 4px rgb(61 72 77 / 0.05),
        0 12px 30px rgb(61 72 77 / 0.08);
}

.project-card p:last-of-type {
    color: var(--muted);
}

.muted-card {
    background: var(--bg-soft);
}

::selection {
    background: #c8d7b6;
    color: var(--fg);
}

@media (max-width: 760px) {
    .site-header,
    main {
        width: min(var(--page-width), calc(100% - 2rem));
    }

    .nav {
        min-height: 6rem;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 0.4rem;
    }

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

    .hero {
        min-height: 62vh;
        padding-block: 4rem;
    }

    h1 {
        font-size: clamp(2.8rem, 13vw, 4.5rem);
    }
}

/* Identity */

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.brand::before {
    content: none;
}

.brand-mark {
    width: 0.75rem;
    height: 0.75rem;
    background: var(--green);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}

/* Gentle calls to action */

.quiet-link {
    width: fit-content;
    margin-top: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;

    color: var(--muted);
    font-size: 0.95rem;
    text-decoration: none;

    transition:
        color 150ms ease,
        gap 150ms ease;
}

.quiet-link:hover {
    color: var(--fg);
    gap: 0.8rem;
}

.section-intro {
    max-width: 560px;
    color: var(--muted);
}

/* Project cards */

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    color: inherit;
    text-decoration: none;
}

.project-card::after {
    content: none;
}

.card-link {
    margin-top: 2rem;

    color: #738c61;
    font-size: 0.9rem;
    font-weight: 600;
}

.card-link span {
    display: inline-block;
    margin-left: 0.25rem;
    transition: transform 150ms ease;
}

.project-card:hover .card-link span {
    transform: translateX(0.2rem);
}

.card-link.muted {
    color: var(--muted);
}

/* Small, calm variation between cards */

.project-card:nth-child(1) {
    border-top: 3px solid var(--green);
}

.project-card:nth-child(2) {
    border-top: 3px solid var(--orange);
}

.project-card:nth-child(3) {
    border-top: 3px solid var(--yellow);
}

/* Footer */

.site-footer {
    width: min(var(--page-width), calc(100% - 3rem));
    margin-inline: auto;

    padding: 2.5rem 0 3.5rem;

    border-top: 1px solid var(--border);

    color: var(--muted);
    font-size: 0.85rem;
}

.site-footer p {
    margin: 0;
}

/* Warm secondary accents */

.nav-links a:hover,
.quiet-link:hover {
    text-decoration-color: var(--orange);
}

.eyebrow::before {
    content: "";
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    margin-right: 0.55rem;
    background: var(--orange);
    border-radius: 50%;
    vertical-align: 0.08em;
}

.project-card:nth-child(2) .project-type,
.project-card:nth-child(2) .card-link {
    color: #b86f52;
}

/* Project pages */

.project-page {
    padding-top: 2rem;
}

.project-hero {
    min-height: 72vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: 5rem;
}

.project-hero h1 {
    margin-bottom: 1.5rem;
}

.back-link {
    width: fit-content;
    margin-bottom: 4rem;
    color: var(--muted);
    font-size: 0.9rem;
    text-decoration: none;
}

.back-link:hover {
    color: var(--fg);
}

.project-lede {
    max-width: 720px;
    margin-bottom: 3rem;
    color: var(--muted);
    font-size: clamp(1.15rem, 2vw, 1.35rem);
    line-height: 1.7;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
}

.project-meta > div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.meta-label {
    color: #738c61;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.project-section {
    display: grid;
    grid-template-columns: minmax(120px, 0.3fr) minmax(0, 1fr);
    gap: 3rem;
    padding-block: 6rem;
    border-top: 1px solid var(--border);
}

.section-kicker {
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-copy {
    max-width: 760px;
}

.project-copy > p {
    color: var(--muted);
    font-size: 1.05rem;
}

.project-copy > p + p {
    margin-top: 1.5rem;
}

.tech-grid {
    margin-top: 2.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid var(--border);
}

.tech-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1.2rem 0;

    border-bottom: 1px solid var(--border);
}

.tech-item:nth-child(odd) {
    padding-right: 1.5rem;
}

.tech-item:nth-child(even) {
    padding-left: 1.5rem;
    border-left: 1px solid var(--border);
}

.tech-name {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.1rem;
}

.tech-detail {
    color: var(--muted);
    font-size: 0.85rem;
}

.architecture {
    margin-block: 3rem;
    padding: 2rem;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);

    text-align: center;
}

.architecture-node {
    width: min(320px, 100%);
    margin-inline: auto;
    padding: 1.2rem;

    display: flex;
    flex-direction: column;
    gap: 0.2rem;

    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
}

.accent-node {
    border-top: 3px solid var(--orange);
}

.node-small {
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.architecture-node > span:last-child:not(.node-small) {
    color: var(--muted);
    font-size: 0.85rem;
}

.architecture-arrow {
    display: block;
    margin: 0.7rem 0;
    color: #738c61;
}

.architecture-split {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.project-note {
    padding-left: 1rem;
    border-left: 3px solid var(--green);
}

.project-next h2::after {
    content: "●";
    margin-left: 0.6rem;
    color: var(--orange);
    font-family: sans-serif;
    font-size: 0.4em;
    vertical-align: middle;
}

.project-footer {
    padding-block: 3rem 6rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 760px) {
    .project-hero {
        min-height: auto;
        padding-block: 4rem;
    }

    .back-link {
        margin-bottom: 3rem;
    }

    .project-section {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding-block: 4rem;
    }

    .project-meta {
        gap: 1.5rem;
    }

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

    .tech-item:nth-child(odd),
    .tech-item:nth-child(even) {
        padding-inline: 0;
        border-left: 0;
    }

    .architecture-split {
        grid-template-columns: 1fr;
    }
}

/* Project pages */

.project-page {
    padding-top: 2rem;
}

.project-hero {
    min-height: 72vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: 5rem;
}

.project-hero h1 {
    margin-bottom: 1.5rem;
}

.back-link {
    width: fit-content;
    margin-bottom: 4rem;
    color: var(--muted);
    font-size: 0.9rem;
    text-decoration: none;
}

.back-link:hover {
    color: var(--fg);
}

.project-lede {
    max-width: 720px;
    margin-bottom: 3rem;
    color: var(--muted);
    font-size: clamp(1.15rem, 2vw, 1.35rem);
    line-height: 1.7;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
}

.project-meta > div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.meta-label {
    color: #738c61;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.project-section {
    display: grid;
    grid-template-columns: minmax(120px, 0.3fr) minmax(0, 1fr);
    gap: 3rem;
    padding-block: 6rem;
    border-top: 1px solid var(--border);
}

.section-kicker {
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-copy {
    max-width: 760px;
}

.project-copy > p {
    color: var(--muted);
    font-size: 1.05rem;
}

.project-copy > p + p {
    margin-top: 1.5rem;
}

/* Stack */

.tech-grid {
    margin-top: 2.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid var(--border);
}

.tech-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--border);
}

.tech-item:nth-child(odd) {
    padding-right: 1.5rem;
}

.tech-item:nth-child(even) {
    padding-left: 1.5rem;
    border-left: 1px solid var(--border);
}

.tech-name {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.1rem;
}

.tech-detail {
    color: var(--muted);
    font-size: 0.85rem;
}

/* Architecture */

.architecture {
    margin-block: 3rem;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.architecture-node {
    width: min(320px, 100%);
    margin-inline: auto;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
}

.accent-node {
    border-top: 3px solid var(--orange);
}

.node-small {
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.architecture-node > span:last-child:not(.node-small) {
    color: var(--muted);
    font-size: 0.85rem;
}

.architecture-arrow {
    display: block;
    margin: 0.7rem 0;
    color: #738c61;
}

.architecture-split {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.project-note {
    padding-left: 1rem;
    border-left: 3px solid var(--green);
}

/* Small warm accent */

.project-next h2::after {
    content: "●";
    margin-left: 0.6rem;
    color: var(--orange);
    font-family: sans-serif;
    font-size: 0.4em;
    vertical-align: middle;
}

.project-footer {
    padding-block: 3rem 6rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 760px) {
    .project-hero {
        min-height: auto;
        padding-block: 4rem;
    }

    .back-link {
        margin-bottom: 3rem;
    }

    .project-section {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding-block: 4rem;
    }

    .project-meta {
        gap: 1.5rem;
    }

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

    .tech-item:nth-child(odd),
    .tech-item:nth-child(even) {
        padding-inline: 0;
        border-left: 0;
    }

    .architecture-split {
        grid-template-columns: 1fr;
    }
}

/* Open-source project details */

.external-project-link {
    margin-top: 2rem;
}

.code-note {
    margin-block: 2rem;
    padding: 1.25rem 1.4rem;

    display: flex;
    flex-direction: column;
    gap: 0.45rem;

    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--orange);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.code-note-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.code-note code {
    color: var(--fg);
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

/* Homepage identity */

.hero-note {
    margin-top: 0.25rem;
    color: #8a7462;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.95rem;
    font-style: italic;
}

#about p {
    color: var(--muted);
}

#about p + p {
    margin-top: 1.35rem;
}

/* Contact */

.contact-intro {
    max-width: 560px;
    color: var(--muted);
}

.contact-links {
    margin-top: 2.5rem;

    display: flex;
    flex-direction: column;

    border-top: 1px solid var(--border);
}

.contact-link {
    min-height: 3.8rem;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;

    border-bottom: 1px solid var(--border);

    color: var(--fg);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
    text-decoration: none;
}

.contact-link > span:last-child {
    color: var(--orange);

    transition:
        transform 150ms ease,
        color 150ms ease;
}

a.contact-link:hover > span:last-child {
    color: #b86f52;
    transform: translateX(0.2rem);
}

.pending-link {
    color: var(--muted);
}

/* Technologies used in practice */

.practice-list {
    margin-top: 2.5rem;
    border-top: 1px solid var(--border);
}

.practice-item {
    display: grid;
    grid-template-columns: minmax(130px, 0.35fr) minmax(0, 1fr);
    gap: 2rem;

    padding-block: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.practice-item h3 {
    margin: 0;
    font-size: 1.05rem;
}

.practice-item p {
    margin: 0;
    color: var(--muted);
}

@media (max-width: 760px) {
    .practice-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* 404 */

.not-found {
    min-height: calc(100vh - 12rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: 5rem;
}

.not-found h1 {
    margin-bottom: 2rem;
}

/* Site identity */

.brand-name {
    letter-spacing: -0.01em;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.footer-meta {
    color: #8a7462;
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
}

@media (max-width: 600px) {
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.4rem;
    }
}

/* Accessibility + responsive polish */

:root {
    /* Darker text variants preserve the palette while improving contrast. */
    --muted: #5f6a64;
    --green-text: #536d45;
    --orange-text: #8d5945;
}

/* Keyboard navigation */

.skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;

    padding: 0.7rem 1rem;

    background: var(--surface);
    color: var(--fg);
    border: 2px solid var(--orange-text);
    border-radius: 0.5rem;

    font-weight: 600;
    text-decoration: none;

    transform: translateY(-200%);
}

.skip-link:focus {
    transform: translateY(0);
}

:focus-visible {
    outline: 3px solid var(--orange-text);
    outline-offset: 4px;
    border-radius: 0.2rem;
}

/* Accessible text accents */

.eyebrow,
.project-type,
.meta-label,
.card-link,
.architecture-arrow {
    color: var(--green-text);
}

.project-card:nth-child(2) .project-type,
.project-card:nth-child(2) .card-link {
    color: var(--orange-text);
}

.hero-note,
.footer-meta {
    color: #735f50;
}

/* Small-screen resilience */

img,
svg,
video {
    max-width: 100%;
    height: auto;
}

p,
li,
code {
    overflow-wrap: break-word;
}

.nav-links {
    flex-wrap: wrap;
}

.nav-links a {
    padding-block: 0.4rem;
}

code {
    font-size: 0.92em;
}

/* Respect people who prefer reduced animation. */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .project-card:hover,
    .nav-links a:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .site-header,
    main,
    .site-footer {
        width: calc(100% - 1.5rem);
    }

    .nav-links {
        gap: 0.9rem;
    }

    .hero,
    .project-hero {
        padding-block: 3rem;
    }

    .project-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .architecture {
        padding: 1rem;
    }

    h1 {
        letter-spacing: -0.035em;
    }
}

/* Quiet continuation beneath the project grid */

.projects-note {
    margin-top: 1.25rem;
    color: var(--muted);
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-size: 0.95rem;
}

/* Cozy */

.project-card.project-card-cozy {
    background: var(--surface);
    color: var(--fg);
    border-color: var(--border);
    border-top-color: var(--yellow);
    opacity: 1;
}

.project-card.project-card-cozy:hover {
    background: var(--surface);
}

.project-card.project-card-cozy .project-type,
.project-card.project-card-cozy .card-link {
    color: var(--fg);
}

/* Cozy project page — slightly more editorial breathing room */

.project-cozy-page .project-lede {
    max-width: 46rem;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    line-height: 1.7;
}

.project-cozy-page .content-section {
    max-width: 50rem;
    padding-block: 3.75rem;
}

.project-cozy-page .content-section + .content-section {
    border-top: 1px solid var(--border);
}

.project-cozy-page .content-section h2 {
    max-width: 42rem;
    margin-bottom: 1.4rem;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    line-height: 1.15;
}

.project-cozy-page .content-section p {
    max-width: 46rem;
    line-height: 1.8;
}

.project-cozy-page .content-section p + p {
    margin-top: 1.25rem;
}

.project-cozy-page .section-number {
    margin-bottom: 0.8rem;
}

@media (max-width: 600px) {
    .project-cozy-page .content-section {
        padding-block: 2.75rem;
    }

    .project-cozy-page .content-section h2 {
        line-height: 1.2;
    }
}

/* About this site */

.footer-details {
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
}

.footer-site-link {
    color: var(--muted);
    font-size: 0.9rem;
    text-decoration: none;
}

.footer-site-link:hover {
    color: var(--fg);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.about-site-page .project-lede {
    max-width: 46rem;
}

.about-site-page .content-section {
    max-width: 50rem;
    padding-block: 3.75rem;
}

.about-site-page .content-section + .content-section {
    border-top: 1px solid var(--border);
}

.about-site-page .content-section h2 {
    max-width: 42rem;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    line-height: 1.15;
}

.about-site-page .content-section p {
    max-width: 46rem;
    line-height: 1.8;
}

.about-site-page .content-section p + p {
    margin-top: 1.25rem;
}

.site-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.75rem;
}

.site-notes span {
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 999px;

    color: var(--muted);
    font-size: 0.85rem;
}

@media (max-width: 600px) {
    .footer-details {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.35rem;
    }

    .about-site-page .content-section {
        padding-block: 2.75rem;
    }
}
