:root {
    --bg: #f4f7f8;
    --surface: #ffffff;
    --surface-soft: #eef3f4;
    --ink: #111820;
    --muted: #5f6975;
    --line: #dbe3e6;
    --accent: #147a63;
    --accent-dark: #0e5b4c;
    --accent-soft: #e4f1ed;
    --warm: #cf5f4a;
    --shadow: 0 18px 48px rgba(17, 24, 32, 0.08);
    --max-width: 1080px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

section {
    scroll-margin-top: 112px;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(17, 24, 32, 0.045) 1px, transparent 1px),
        linear-gradient(180deg, rgba(17, 24, 32, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black, transparent 72%);
}

a {
    color: inherit;
    text-decoration: none;
}

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

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(20, 122, 99, 0.35);
    outline-offset: 3px;
}

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

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

.skip-link {
    position: absolute;
    left: 24px;
    top: -80px;
    z-index: 20;
    padding: 10px 14px;
    color: #ffffff;
    background: var(--ink);
    border-radius: 6px;
}

.skip-link:focus {
    top: 18px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 18px 24px 0;
}

.site-nav {
    width: min(var(--max-width), 100%);
    min-height: 68px;
    margin: 0 auto;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(219, 227, 230, 0.95);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(17, 24, 32, 0.08);
    backdrop-filter: blur(18px);
}

.site-name {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    color: var(--ink);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0;
}

.site-name::before {
    content: "";
    width: 12px;
    height: 12px;
    margin-right: 10px;
    background: var(--accent);
    border-radius: 3px;
}

.nav-links,
.intro-actions,
.contact-links,
.site-footer nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-links a,
.site-footer a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 10px 12px;
    color: var(--muted);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 800;
}

.nav-links a:hover,
.site-footer a:hover {
    color: var(--ink);
    background: var(--surface-soft);
}

.page {
    width: min(var(--max-width), calc(100% - 48px));
    margin: 0 auto;
}

.intro {
    padding: 86px 0 76px;
}

.section-label {
    margin-bottom: 16px;
    color: var(--accent);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

h1 {
    max-width: 820px;
    margin-bottom: 18px;
    font-size: clamp(54px, 9vw, 104px);
    font-weight: 850;
    line-height: 0.93;
    letter-spacing: 0;
}

.intro-line {
    max-width: 780px;
    margin-bottom: 22px;
    color: var(--ink);
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 750;
    line-height: 1.12;
}

.intro-copy {
    max-width: 720px;
    margin-bottom: 34px;
    font-size: 19px;
}

.quick-facts {
    margin-top: 44px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.quick-facts article {
    min-height: 118px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.quick-facts span {
    display: block;
    margin-bottom: 18px;
    color: var(--warm);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.quick-facts p {
    margin-bottom: 0;
    color: var(--ink);
    font-weight: 800;
    line-height: 1.35;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 11px 17px;
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 15px;
    font-weight: 850;
}

.button.primary {
    color: #ffffff;
    background: var(--ink);
    border-color: var(--ink);
}

.button.primary:hover {
    color: #ffffff;
    background: var(--accent);
    border-color: var(--accent);
}

.button.secondary {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.72);
}

.button.secondary:hover {
    color: #ffffff;
    background: var(--warm);
    border-color: var(--warm);
}

.content-section {
    padding: 74px 0;
    border-top: 1px solid var(--line);
}

.two-column {
    display: grid;
    grid-template-columns: minmax(220px, 0.52fr) minmax(0, 1fr);
    gap: 72px;
}

h2 {
    margin-bottom: 18px;
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 850;
    line-height: 0.98;
    letter-spacing: 0;
}

h3 {
    margin-bottom: 10px;
    font-size: 21px;
    line-height: 1.22;
}

.prose {
    max-width: 760px;
}

.prose p,
.section-heading p {
    font-size: 18px;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 34px;
}

.work-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.role-card {
    margin-bottom: 16px;
    padding: 30px;
    display: grid;
    grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
    gap: 48px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 42px rgba(17, 24, 32, 0.06);
}

.role-card h3 {
    margin-bottom: 6px;
    font-size: 28px;
}

.role-meta,
.role-company {
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.role-meta {
    margin-bottom: 16px;
    color: var(--accent);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    text-transform: uppercase;
}

.role-copy p:last-child {
    margin-bottom: 0;
}

.pill-row {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pill-row span {
    padding: 5px 8px;
    color: var(--accent-dark);
    background: var(--accent-soft);
    border: 1px solid #c8e3da;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.link-row {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.link-row a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 8px 11px;
    color: var(--ink);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 850;
}

.link-row a:hover {
    color: #ffffff;
    background: var(--accent);
    border-color: var(--accent);
}

.work-item,
.note-card,
.legal-card,
.detail-card,
.background-card,
.writing-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.work-item {
    min-height: 210px;
    padding: 24px;
}

.work-item h3::before {
    content: "";
    display: block;
    width: 34px;
    height: 4px;
    margin-bottom: 18px;
    background: var(--accent);
    border-radius: 999px;
}

.work-item p {
    margin-bottom: 0;
}

.work-item .pill-row {
    margin-top: 18px;
}

.detail-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
    gap: 16px;
}

.detail-card {
    padding: 24px;
}

.detail-card h3 {
    margin-top: 22px;
}

.detail-card h3:first-of-type {
    margin-top: 0;
}

.detail-card p:last-child {
    margin-bottom: 0;
}

.approach-list {
    display: grid;
    gap: 12px;
}

.approach-list p {
    margin-bottom: 0;
    padding: 18px 20px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 700;
}

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

.project-feature,
.project-mini {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.project-feature {
    grid-column: 1 / -1;
    min-height: 260px;
    padding: 30px;
    display: grid;
    grid-template-columns: minmax(220px, 0.44fr) minmax(0, 1fr);
    gap: 44px;
    align-items: start;
    box-shadow: 0 14px 42px rgba(17, 24, 32, 0.06);
}

.project-feature h3 {
    font-size: 34px;
}

.project-feature-copy p:last-child,
.project-mini p:last-child {
    margin-bottom: 0;
}

.project-mini {
    padding: 22px;
}

.project-mini + .project-mini {
    margin-top: 0;
}

.project-type {
    margin-bottom: 16px;
    color: var(--warm);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

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

.background-card {
    padding: 24px;
}

.background-card p:last-child {
    margin-bottom: 0;
}

.writing-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.writing-card {
    padding: 24px;
}

.writing-card p:last-child {
    margin-bottom: 0;
}

.note-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.note-card {
    min-height: 236px;
    padding: 26px;
}

.note-topic {
    margin-bottom: 22px;
    color: var(--warm);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.note-card h3 {
    max-width: 460px;
}

.note-card p:last-child {
    margin-bottom: 0;
}

.contact-section {
    margin: 72px 0;
    padding: 34px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, auto);
    align-items: center;
    gap: 34px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 42px rgba(17, 24, 32, 0.06);
}

.contact-section p {
    max-width: 650px;
    margin-bottom: 0;
    font-size: 18px;
}

.contact-links {
    justify-content: flex-end;
}

.text-link {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 9px 10px;
    color: var(--muted);
    border-radius: 6px;
    font-size: 15px;
    font-weight: 850;
}

.text-link:hover {
    color: var(--ink);
    background: var(--surface-soft);
}

.site-footer {
    width: min(var(--max-width), calc(100% - 48px));
    margin: 0 auto;
    padding: 28px 0 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.site-footer p {
    margin-bottom: 0;
    font-size: 15px;
}

.page-main {
    width: min(960px, calc(100% - 48px));
    margin: 0 auto;
}

.page-hero {
    padding: 92px 0 46px;
}

.page-hero p:not(.section-label) {
    max-width: 760px;
    font-size: 19px;
}

.updated-date {
    margin-top: 24px;
}

.legal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding-bottom: 88px;
}

.legal-card {
    padding: 26px;
}

.legal-card h2 {
    font-size: 24px;
    line-height: 1.16;
}

.legal-card p,
.legal-card li {
    color: var(--muted);
}

.legal-card p:last-child,
.legal-card ul:last-child {
    margin-bottom: 0;
}

.legal-card a {
    color: var(--accent);
    font-weight: 850;
}

@media (max-width: 900px) {
    .site-nav {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px;
    }

    .intro {
        padding: 72px 0 70px;
    }

    .two-column,
    .role-card,
    .project-feature,
    .contact-section {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .work-list,
    .note-list,
    .legal-grid,
    .detail-grid,
    .project-list,
    .quick-facts,
    .background-grid,
    .writing-list {
        grid-template-columns: 1fr;
    }

    .contact-links {
        justify-content: flex-start;
    }
}

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

    .site-header {
        padding: 10px 12px 0;
    }

    .site-nav,
    .page,
    .site-footer,
    .page-main {
        width: min(100% - 28px, var(--max-width));
    }

    .nav-links {
        gap: 4px;
    }

    .nav-links a {
        min-height: 38px;
        padding: 8px 9px;
        font-size: 14px;
    }

    h1 {
        font-size: 54px;
    }

    .intro-line {
        font-size: 24px;
    }

    .content-section {
        padding: 58px 0;
    }

    .intro-actions,
    .contact-links {
        align-items: stretch;
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .work-item,
    .note-card,
    .legal-card,
    .detail-card,
    .background-card,
    .writing-card,
    .role-card,
    .project-feature,
    .project-mini,
    .contact-section {
        padding: 20px;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}
