:root {
    color-scheme: light dark;

    --bg: #f4efe9;
    --bg-soft: #ebe2d8;
    --surface: #fffdfb;
    --text: #2a221d;
    --text-muted: #6b5f56;
    --border: rgba(42, 34, 29, 0.12);

        --brand: #a63d26;
    --brand-light: #b84a31;
    --brand-deep: #7d2b1a;
        --accent: #a63d26;
    --accent-text: #a63d26;
    --button-bg: var(--brand);
    --on-accent: #fff;
    --glow: rgba(166, 61, 38, 0.13);

    --shadow: 0 1px 2px rgba(42, 34, 29, 0.06), 0 18px 48px -18px rgba(42, 34, 29, 0.35);
    --radius: 1.25rem;
    --radius-sm: 0.75rem;

    --container: 70rem;
    --measure: 46rem;
    --gutter: clamp(1rem, 4vw, 2rem);

    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Avenir Next Condensed", "Bahnschrift SemiCondensed", "Roboto Condensed", "sans-serif-condensed",
                    "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #181411;
        --bg-soft: #2a231e;
        --surface: #211b17;
        --text: #e8dfd7;
        --text-muted: #a99d93;
        --border: rgba(232, 223, 215, 0.1);

        --accent: #d4553f;
        --accent-text: #e8735c;
        --glow: rgba(166, 61, 38, 0.18);

        --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 24px 60px -24px rgba(0, 0, 0, 0.85);
    }
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg);
    background-image:
        radial-gradient(60rem 40rem at -10% -10%, var(--glow), transparent 70%),
        radial-gradient(50rem 35rem at 110% 110%, var(--glow), transparent 70%);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--accent-text);
    text-underline-offset: 0.2em;
    text-decoration-thickness: 1px;
}

a:hover {
    text-decoration-thickness: 2px;
}

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

.container {
    width: min(100% - 2 * var(--gutter), var(--container));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: var(--gutter);
    top: -10rem;
    z-index: 100;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--button-bg);
    color: var(--on-accent);
    font-weight: 600;
    text-decoration: none;
}

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

.site-header {
    padding-block: clamp(0.75rem, 2.5vw, 1.25rem);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 2.75rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text);
    text-decoration: none;
    font-family: var(--font-display);
    font-stretch: condensed;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.7rem;
    background: linear-gradient(150deg, var(--brand-light), var(--brand-deep));
    color: var(--on-accent);
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 6px 16px -8px rgba(125, 43, 26, 0.8);
}

.site-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a {
    display: block;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    background: var(--bg-soft);
    color: var(--text);
}

.site-main {
    flex: 1 0 auto;
    padding-block: clamp(1rem, 4vw, 3rem);
}

.site-main--center {
    display: grid;
    align-content: center;
}

.site-footer {
    padding-block: 1.5rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    color: var(--text-muted);
    font-size: 0.9rem;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.site-footer ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a {
    color: inherit;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--text);
    text-decoration: underline;
}

.vcard {
    display: grid;
    grid-template-columns: minmax(15rem, 19rem) 1fr;
    width: min(100%, 58rem);
    margin-inline: auto;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.vcard__aside {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    background: linear-gradient(160deg, var(--brand-light) 0%, var(--brand) 45%, var(--brand-deep) 100%);
}

.vcard__aside::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0 2px, transparent 2px 16px);
    pointer-events: none;
}

.vcard__portrait {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 12.5rem;
}

.vcard__photo {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border: 0.35rem solid var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 16px 36px -14px rgba(0, 0, 0, 0.6);
}

.vcard__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.75rem;
    padding: clamp(1.75rem, 5vw, 3.25rem);
}

.vcard__name {
    margin: 0;
    font-family: var(--font-display);
    font-stretch: condensed;
    font-weight: 700;
    font-size: clamp(2.75rem, 7vw, 4.5rem);
    line-height: 0.92;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.vcard__name span {
    display: block;
}

.vcard__name .accent {
    color: var(--accent);
}

.vcard__role {
    margin: 0.85rem 0 0;
    color: var(--text-muted);
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.eyebrow {
    margin: 0 0 0.6rem;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-stretch: condensed;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.focus-list {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 1.1rem;
}

.focus-list li {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.focus-list li::before {
    content: "";
    flex: none;
    width: 0.9em;
    height: 3px;
    border-radius: 2px;
    background: var(--accent);
    transform: translateY(-0.32em);
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0;
    padding: 1.5rem 0 0;
    list-style: none;
    border-top: 1px solid var(--border);
}

.contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 2.875rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-soft);
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.contact-link__arrow {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: var(--accent-text);
    transition: color 0.15s ease, transform 0.15s ease;
}

.contact-link:hover .contact-link__arrow {
    transform: translate(2px, -2px);
}

.contact-link:hover {
    background: var(--button-bg);
    border-color: var(--button-bg);
    color: var(--on-accent);
}

.contact-link:hover .contact-link__arrow {
    color: var(--on-accent);
}

.contact-link:active {
    transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
    .contact-link,
    .contact-link__arrow {
        transition: none;
    }

    .contact-link:hover .contact-link__arrow {
        transform: none;
    }
}

@media (max-width: 47.99rem) {
    .vcard {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .vcard__aside {
        padding: 2rem 1.5rem 0;
    }

    .vcard__portrait {
        max-width: 10.5rem;
        margin-bottom: -5.25rem;
    }

    .vcard__body {
        padding: calc(5.25rem + 1.5rem) clamp(1.25rem, 5vw, 2rem) clamp(1.5rem, 6vw, 2rem);
        gap: 1.5rem;
    }

    .focus-list {
        width: fit-content;
        margin-inline: auto;
        text-align: left;
        font-size: clamp(1rem, 4.6vw, 1.1rem);
    }

    .contact-links {
        justify-content: center;
    }

    .contact-links li {
        flex: 1 1 9rem;
    }

    .contact-link {
        width: 100%;
    }

    .site-footer__inner {
        flex-direction: column;
        text-align: center;
    }

    .site-footer ul {
        justify-content: center;
    }
}

.page {
    width: min(100%, var(--measure));
    margin-inline: auto;
}

.page__header {
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: none;
}

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

.page__title {
    margin: 0;
    font-family: var(--font-display);
    font-stretch: condensed;
    font-weight: 700;
    font-size: clamp(2.25rem, 8vw, 3.5rem);
    line-height: 1;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    overflow-wrap: break-word;
}

.toc {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.toc a {
    padding: 0.4rem 0.95rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}

.toc a:hover {
    border-color: var(--accent);
    color: var(--accent-text);
}

.panel {
    padding: clamp(1.25rem, 5vw, 2.75rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    scroll-margin-top: 1.5rem;
}

.panel + .panel {
    margin-top: clamp(1.25rem, 4vw, 2rem);
}

.prose {
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.prose > :first-child {
    margin-top: 0;
}

.prose > :last-child {
    margin-bottom: 0;
}

.prose h2 {
    margin: 0 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--accent);
    font-family: var(--font-display);
    font-stretch: condensed;
    font-size: clamp(1.75rem, 6vw, 2.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.prose h3 {
    margin: 2rem 0 0.6rem;
    font-size: 1.25rem;
    line-height: 1.3;
}

.prose h2 + h3 {
    margin-top: 0;
}

.prose h4 {
    margin: 1.5rem 0 0.4rem;
    font-size: 1.05rem;
    line-height: 1.35;
    color: var(--accent-text);
}

.prose p,
.prose ul,
.prose ol {
    margin: 0 0 1rem;
}

.prose blockquote {
    margin: 1.5rem 0;
    padding: 0.25rem 0 0.25rem 1.25rem;
    border-left: 3px solid var(--accent);
    color: var(--text-muted);
}

.prose code {
    padding: 0.1em 0.35em;
    border-radius: 0.35em;
    background: var(--bg-soft);
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.9em;
}

.prose pre {
    overflow-x: auto;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
}

.prose pre code {
    padding: 0;
    background: none;
}

.prose img {
    height: auto;
    border-radius: var(--radius-sm);
}

.notice {
    width: min(100%, 34rem);
    margin-inline: auto;
    text-align: center;
}

.notice h1 {
    margin: 0 0 1.5rem;
    font-family: var(--font-display);
    font-stretch: condensed;
    font-size: clamp(1.75rem, 6vw, 2.25rem);
    line-height: 1.1;
    text-transform: uppercase;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.875rem;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    background: var(--button-bg);
    color: var(--on-accent);
    font-weight: 600;
    text-decoration: none;
}

.button:hover {
    background: var(--brand-deep);
}
