/* ============ Tokens ============ */
:root {
    --bg: #faf9f9;
    --surface: #ffffff;
    --surface-alt: #eef6f4;
    --ink: #1f2433;
    --text: #3e4456;
    --muted: #6b7183;
    --brand: #555b6e;
    --mint: #bee3db;
    --accent: #2a7f74;
    --accent-ink: #ffffff;
    --border: #e4e6ea;
    --shadow: 0 1px 2px rgba(31, 36, 51, .06), 0 8px 24px rgba(31, 36, 51, .08);
    --shadow-lg: 0 2px 4px rgba(31, 36, 51, .06), 0 18px 40px rgba(31, 36, 51, .14);
    --radius: 14px;
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-serif: 'Fraunces', Georgia, serif;
    --font-mono: ui-monospace, 'SFMono-Regular', Consolas, Monaco, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #14171f;
        --surface: #1c2029;
        --surface-alt: #181d24;
        --ink: #f1f3f6;
        --text: #c9ced8;
        --muted: #8d94a3;
        --brand: #bee3db;
        --accent: #6cc5b6;
        --accent-ink: #0f1a18;
        --border: #2a2f3a;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
        --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 40px rgba(0, 0, 0, .45);
    }
}

/* ============ Base ============ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
}

h1,
h2,
h3 {
    color: var(--ink);
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
}

h2 {
    font-size: clamp(1.7rem, 3.5vw, 2.4rem);
}

h3 {
    font-size: 1.3rem;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

ul {
    list-style: none;
}

sup {
    font-size: .6em;
    line-height: 0;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    width: min(1120px, 100% - 3rem);
    margin-inline: auto;
}

.narrow {
    width: min(760px, 100% - 3rem);
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    padding: .5rem 1rem;
    background: var(--ink);
    color: var(--bg);
    z-index: 100;
}

.skip-link:focus {
    left: 1rem;
}

.eyebrow {
    color: var(--accent);
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: .75rem;
}

.lead {
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 38rem;
}

/* ============ Buttons ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .8rem 1.4rem;
    border-radius: 999px;
    border: 2px solid var(--accent);
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
    font-size: 1rem;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--border);
}

.btn-ghost:hover {
    border-color: var(--accent);
}

.btn-small {
    padding: .45rem 1rem;
    font-size: .9rem;
}

/* ============ Nav ============ */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--ink);
}

.brand:hover {
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a:not(.btn) {
    color: var(--text);
    font-weight: 500;
    font-size: .95rem;
}

.nav-links a:not(.btn):hover {
    color: var(--accent);
    text-decoration: none;
}

@media (max-width: 560px) {
    .nav-links {
        gap: 1rem;
    }

    .nav-links li:nth-child(2),
    .nav-links li:nth-child(3) {
        display: none;
    }
}

/* ============ Hero ============ */
.hero {
    padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem);
    background:
        radial-gradient(60rem 30rem at 85% 10%, color-mix(in srgb, var(--mint) 55%, transparent), transparent 70%),
        var(--bg);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 3rem;
}

.hero-text h1 {
    margin-bottom: 1.25rem;
}

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

.hero-art {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    max-width: 380px;
    width: 100%;
    justify-self: center;
    border-radius: 28px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

#sketch-parent,
#sketch-parent canvas {
    width: 100% !important;
    height: 100% !important;
}

#sketch-parent:not(:empty)+.hero-art-fallback {
    display: none;
}

.hero-art-fallback {
    position: absolute;
    font-family: var(--font-serif);
    font-size: 8rem;
    font-weight: 600;
    color: var(--brand);
}

@media (max-width: 820px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-art {
        display: none;
    }
}

/* ============ Sections ============ */
.section {
    padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.section-alt {
    background: var(--surface-alt);
    border-block: 1px solid var(--border);
}

.section-head {
    margin-bottom: 2.5rem;
}

/* ============ Projects ============ */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr));
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-shot {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    background: var(--surface-alt);
}

.project-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform .5s ease;
}

.project-card:hover .project-shot img {
    transform: scale(1.03);
}

.project-body {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    padding: 1.5rem;
    flex: 1;
}

.project-meta {
    color: var(--muted);
    font-size: .9rem;
    margin-top: -.3rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .25rem;
}

.tags li {
    font-size: .78rem;
    font-weight: 500;
    padding: .2rem .65rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--mint) 45%, transparent);
    color: var(--ink);
}

.project-link {
    margin-top: auto;
    padding-top: .5rem;
    font-weight: 600;
}

.project-link span {
    display: inline-block;
    transition: transform .15s ease;
}

.project-link:hover span {
    transform: translateX(4px);
}

/* ============ Services ============ */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.service {
    padding: 1.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.service h3 {
    margin: 1rem 0 .5rem;
}

.service p {
    color: var(--muted);
}

.service-icon {
    width: 44px;
    height: 44px;
    padding: 10px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--mint) 55%, transparent);
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============ Verse ============ */
.verse blockquote {
    text-align: center;
}

.verse blockquote p {
    font-family: var(--font-serif);
    font-size: clamp(1.3rem, 2.6vw, 1.75rem);
    line-height: 1.5;
    color: var(--ink);
    font-style: italic;
}

.verse cite {
    display: block;
    margin-top: 1.25rem;
    font-style: normal;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-size: .85rem;
    color: var(--accent);
}

/* ============ Contact ============ */
.contact {
    text-align: center;
    padding: clamp(2rem, 5vw, 3.5rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.contact h2 {
    margin-bottom: 1rem;
}

.contact .lead {
    margin: 0 auto 2rem;
}


/* ============ Footer ============ */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.75rem 0;
    font-size: .9rem;
    color: var(--muted);
}

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

.footer-links {
    display: flex;
    gap: 1.25rem;
}

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

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

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}
