:root {
    --bg: #fbfaf8;
    --fg: #1b1a18;
    --muted: #56534d;
    --rule: #e2ded6;
    --accent: #7a5c12;
    --hero-h: clamp(300px, 46vh, 440px);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #141414;
        --fg: #ececea;
        --muted: #a3a09a;
        --rule: #2c2b29;
        --accent: #d8b45a;
    }
}

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

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

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.wrap {
    max-width: 46rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    min-height: var(--hero-h);
    display: flex;
    align-items: flex-end;
    background-color: #141414;
    background-image: url("/golden.jpg");
    background-position: center 40%;
    background-size: cover;
    background-repeat: no-repeat;
}

/* Scrim: dark enough for white text in both themes, fading into the page below. */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.52) 0%,
            rgba(0, 0, 0, 0.64) 40%,
            rgba(0, 0, 0, 0.78) 70%,
            rgba(0, 0, 0, 0.80) 88%,
            var(--bg) 100%);
}

.hero > .wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-top: 4rem;
    padding-bottom: 4.75rem;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

h1 {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.role {
    margin-top: 0.65rem;
    font-size: clamp(0.95rem, 2.4vw, 1.05rem);
    color: rgba(255, 255, 255, 0.94);
    /* No text-wrap: balance here — with pipe separators it strands a lone
       segment plus a dangling pipe on the first line. Natural wrapping fills
       the line and breaks at the last segment instead. */
}

.role .seg {
    display: inline-block;
    white-space: nowrap;
}

/* Separator rides with the segment it follows, so it never starts a line. */
/* Pipe rides with the segment it follows, so it never starts a line.
   Suppressed after the last role segment (:nth-last-child(2)) because the
   city below it is on its own line and needs no separator. */
.role .seg:not(:last-child):not(:nth-last-child(2))::after {
    content: "|";
    margin: 0 0.55em;
    color: rgba(255, 255, 255, 0.42);
}

/* The city always sits on its own line, not only on narrow screens. */
.role .place {
    display: block;
    margin-top: 0.1em;
}

/* Narrow screens: the segments stack, so drop the separators entirely. */
@media (max-width: 39.99rem) {
    .role {
        line-height: 1.45;
    }

    .role .seg {
        display: block;
        white-space: normal;
    }

    .role .seg:not(:last-child):not(:nth-last-child(2))::after {
        content: none;
    }
}

/* ---------- Body ---------- */

main {
    padding: 2.75rem 0 0;
}

.lede {
    font-size: 1.125rem;
    line-height: 1.55;
    color: var(--fg);
    text-wrap: pretty;
}

.purpose {
    margin-top: 1.15rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--rule);
    color: var(--fg);
    text-wrap: pretty;
}

section {
    margin-top: 2.5rem;
}

h2 {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 1rem;
}

p + p {
    margin-top: 0.9rem;
}

ul {
    list-style: none;
}

.stack > li + li {
    margin-top: 0.55rem;
}

.stack .meta {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.accounts li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.6rem;
    align-items: baseline;
}

.accounts li + li {
    margin-top: 0.55rem;
}

.accounts .label {
    min-width: 6.5rem;
    color: var(--muted);
}

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

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

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

.note {
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: 0.6rem;
}

footer {
    margin: 3.5rem 0 3rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--rule);
    color: var(--muted);
    font-size: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
    justify-content: space-between;
}

/* ---------- Language switcher ---------- */

.langs {
    position: absolute;
    top: 1.25rem;
    /* matches .wrap's horizontal padding so it lines up with the text column */
    right: 1.5rem;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.25rem 0.9rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.94);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

.langs a {
    color: inherit;
    text-decoration-color: rgba(255, 255, 255, 0.5);
}

.langs a:hover {
    color: #ffffff;
    text-decoration-color: #ffffff;
}

.langs a:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.langs [aria-current="true"] {
    font-weight: 600;
    text-decoration: none;
    cursor: default;
}
