/* ── Fonts (self-hosted, latin subset, variable weight) ── */
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('/fonts/cormorant-garamond-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: italic;
    font-weight: 300 700;
    font-display: swap;
    src: url('/fonts/cormorant-garamond-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 300 500;
    font-display: swap;
    src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

/* ── Tokens ── */
:root {
    --bg:            #0d0c0a;
    --surface:       #12100e;
    --ctrl-bg:       #161412;
    --border:        #252220;
    --border-strong: #3a342d;
    --text:          #e6e1d6;
    --muted:         #948a7c;
    --faint:         #6a6358;
    --accent:        #c08030;
    --accent-dim:    #6a4818;
    --accent-soft:   rgba(192, 128, 48, 0.09);
    --on-accent:     #0d0c0a;
    --topbar-bg:     rgba(13, 12, 10, 0.78);
    --shadow:        0 24px 60px -24px rgba(0, 0, 0, 0.7);
    /* Status colours, the same AA-checked values status.lucafchala.com uses */
    --up:            #5fb878;
    --degraded:      #d4a03c;
    --down:          #e06666;

    --serif: 'Cormorant Garamond', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
    --mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    --ease:  cubic-bezier(0.16, 1, 0.3, 1);
    --gutter: 22px;
    color-scheme: dark;
}

[data-theme="light"] {
    --bg:            #f4efe6;
    --surface:       #f0eadf;
    --ctrl-bg:       #ede8df;
    --border:        #d8d1c4;
    --border-strong: #c4b9a6;
    --text:          #1c1a17;
    --muted:         #6b6152;
    --faint:         #9a8f80;
    --accent:        #8a5712;
    --accent-dim:    #c89050;
    --accent-soft:   rgba(160, 104, 32, 0.08);
    --on-accent:     #f4efe6;
    --topbar-bg:     rgba(244, 239, 230, 0.8);
    --shadow:        0 24px 60px -28px rgba(60, 40, 10, 0.35);
    --up:            #23703d;
    --degraded:      #8a5a0a;
    --down:          #a8282a;
    color-scheme: light;
}

html {
    background: var(--bg);
    color: var(--text);
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 76px;
    transition: background 0.25s, color 0.25s;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
    overflow-x: hidden;
}

/* Grain overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 60;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
    opacity: 0.28;
}

::selection { background: var(--accent); color: var(--on-accent); }

/* Cormorant defaults to old-style figures — keep callsigns and numbers on the baseline */
.name, .bio, .sign, .qsl-call, .sec-head h2, .card h3, .email-card .c-value { font-variant-numeric: lining-nums; }

abbr[title] { text-decoration: none; }

a { color: inherit; }

.wrap {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    background: var(--accent);
    color: var(--on-accent);
    padding: 8px 14px;
    border-radius: 3px;
    font-size: 12px;
    text-decoration: none;
    transition: top 0.15s;
}
.skip:focus { top: 12px; }

/* ── Top bar ── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--topbar-bg);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s, background 0.25s;
}
.topbar.scrolled { border-bottom-color: var(--border); }

.topbar .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 60px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-size: 11px;
    letter-spacing: 0.08em;
}
.brand svg { width: 26px; height: 26px; display: block; }
.brand .mark-bg { fill: var(--ctrl-bg); stroke: var(--border); }
.brand .mark-fg { fill: var(--accent); }
.brand-text { color: var(--muted); transition: color 0.15s; }
.brand:hover .brand-text { color: var(--text); }

.controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ctrl-group {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--ctrl-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 3px;
    transition: background 0.25s, border-color 0.25s;
}

.ctrl-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    min-width: 32px;
    height: 28px;
    padding: 0 8px;
    cursor: pointer;
    border-radius: 2px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: color 0.15s, background 0.15s;
}
.ctrl-btn:hover { color: var(--accent); }
.ctrl-btn[aria-pressed="true"] { color: var(--text); background: var(--border); }
.ctrl-btn svg { width: 15px; height: 15px; display: block; }

.ctrl-btn .icon-sun { display: none; }
[data-theme="light"] .ctrl-btn .icon-sun { display: block; }
[data-theme="light"] .ctrl-btn .icon-moon { display: none; }

.kbd, kbd {
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.04em;
    color: var(--muted);
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 3px;
    padding: 1px 5px;
    line-height: 1.4;
    background: var(--bg);
}
#btn-search .kbd { display: none; }
html:not(.js) #btn-search { display: none; }

/* ── Hero ── */
.hero {
    position: relative;
    padding: 56px 0 8px;
}

.toc { display: none; }

.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 26px;
}

.pulse {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}
.pulse::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    opacity: 0;
    animation: ping 2.4s var(--ease) infinite;
}

.clock { color: var(--text); font-variant-numeric: tabular-nums; }

.name {
    font-family: var(--serif);
    font-size: clamp(64px, 17vw, 124px);
    font-weight: 300;
    line-height: 0.88;
    letter-spacing: -0.03em;
    margin-bottom: 28px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.name em {
    font-style: italic;
    color: var(--accent);
}

.roles {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 34px;
}
.roles li { display: inline-flex; align-items: center; gap: 14px; }
.roles li + li::before {
    content: '';
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--border-strong);
}

.callsign {
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 0.14em;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 460px; }
.cta .btn { justify-content: center; }
.cta .btn:last-child { grid-column: 1 / -1; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 18px;
    border-radius: 3px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); }
.btn-primary:hover { background: transparent; color: var(--accent); }
.btn-ghost { background: var(--ctrl-bg); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent-dim); color: var(--accent); }

/* ── Rule ── */
.rule {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 52px 0 40px;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.1em;
}
.rule::before,
.rule::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Bio ── */
.bio-wrapper {
    border-left: 2px solid var(--accent-dim);
    padding-left: 20px;
}

.bio {
    font-family: var(--serif);
    font-weight: 300;
    font-size: 19px;
    line-height: 1.75;
    color: var(--text);
    letter-spacing: 0.012em;
    font-feature-settings: "liga" 1, "kern" 1, "calt" 1;
    text-rendering: optimizeLegibility;
    max-width: 600px;
}
.bio::first-letter {
    font-family: var(--serif);
    font-size: 4.2em;
    font-weight: 600;
    font-style: italic;
    float: left;
    line-height: 0.8;
    margin-right: 0.09em;
    margin-top: 0.08em;
    color: var(--accent);
}
.bio strong { font-weight: 600; font-style: italic; }

.facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 36px;
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}
.facts > div {
    padding: 14px 16px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.facts dt {
    font-size: 9.5px;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2px;
}
.facts dd { font-size: 12.5px; }
.facts dd.hl { color: var(--accent); font-weight: 500; letter-spacing: 0.08em; }

/* ── Sections ── */
.section { padding-top: 88px; }

.sec-head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 14px;
}
.sec-num {
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--accent);
}
.sec-head h2 {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(34px, 8vw, 46px);
    line-height: 1;
    letter-spacing: -0.02em;
}
.sec-head h2 em { font-style: italic; color: var(--accent); }
.sec-head::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
    align-self: center;
    margin-left: 4px;
}

.sec-lede {
    color: var(--muted);
    font-size: 12.5px;
    max-width: 560px;
    margin-bottom: 28px;
}
.sec-lede strong { color: var(--text); font-weight: 400; }

/* ── Cards ── */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.card {
    position: relative;
    display: block;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 20px;
    background: linear-gradient(160deg, var(--ctrl-bg) 0%, var(--bg) 100%);
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, transform 0.25s var(--ease), box-shadow 0.25s;
}
a.card:hover,
.card.hoverable:hover {
    border-color: var(--accent-dim);
}
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.kicker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 9.5px;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--muted);
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.kicker a { color: var(--accent); text-decoration: none; letter-spacing: 0.1em; }
.kicker a:hover { text-decoration: underline; text-underline-offset: 3px; }

.card h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 24px;
    line-height: 1.15;
    margin-bottom: 6px;
}
.card p { color: var(--muted); font-size: 12px; }

.arr, .arr-ext {
    color: var(--accent-dim);
    display: inline-block;
    transition: color 0.15s, transform 0.2s var(--ease);
    font-family: var(--mono);
}
a:hover > .arr, a:hover .go .arr { color: var(--accent); transform: translateX(3px); }
a:hover > .arr-ext, a:hover .go .arr-ext { color: var(--accent); transform: translate(2px, -2px); }

/* Instagram feature */
.ig-card {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
    padding: 22px;
    border-color: var(--accent-dim);
    background:
        radial-gradient(90% 120% at 100% 0%, var(--accent-soft), transparent 65%),
        linear-gradient(160deg, var(--ctrl-bg) 0%, var(--bg) 100%);
}
a.ig-card:hover { border-color: var(--accent); }
.ig-top {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.ig-badge {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    color: var(--on-accent);
    flex-shrink: 0;
}
.ig-badge svg { width: 24px; height: 24px; }
.ig-handle { display: flex; flex-direction: column; line-height: 1.3; margin-right: auto; }
.ig-handle b { font-weight: 500; font-size: 14px; }
.ig-handle small { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 9.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--accent-dim);
    border-radius: 20px;
    padding: 3px 10px 3px 9px;
}
.live-pill .pulse { width: 6px; height: 6px; }
.ig-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(26px, 7vw, 34px);
    line-height: 1.1;
    letter-spacing: -0.01em;
}
.ig-title em { font-style: italic; color: var(--accent); }
.ig-desc { font-size: 12px; color: var(--muted); max-width: 540px; }
.ig-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.ig-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ig-tags span {
    font-size: 10px;
    letter-spacing: 0.06em;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1px 9px;
    background: var(--bg);
}
.ig-follow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    border-radius: 3px;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background 0.15s, color 0.15s;
}
a.ig-card:hover .ig-follow { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-ig { background: var(--ctrl-bg); color: var(--text); border: 1px solid var(--accent-dim); }
.btn-ig svg { color: var(--accent); }
.btn-ig:hover { border-color: var(--accent); color: var(--accent); }
a.ctrl-btn { text-decoration: none; }

/* Recent galleries */
.recent { list-style: none; margin-top: 4px; }
.recent li + li { border-top: 1px dashed var(--border); }
.recent a {
    display: grid;
    grid-template-columns: 92px 1fr auto;
    align-items: baseline;
    gap: 12px;
    padding: 10px 0;
    text-decoration: none;
    font-size: 12.5px;
    transition: color 0.15s;
}
.recent a:hover { color: var(--accent); }
.recent time {
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.recent .tag {
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--accent-dim);
    border-radius: 2px;
    padding: 0 5px;
}

/* Kit list */
.kit { list-style: none; }
.kit li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 7px 0;
    font-size: 12px;
}
.kit li + li { border-top: 1px dashed var(--border); }
.kit small {
    font-size: 9.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
}

.more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--accent);
    text-decoration: none;
}
.more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Link rows */
.linklist { list-style: none; }
.linklist li + li { border-top: 1px solid var(--border); }
.linklist a {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4px 12px;
    padding: 14px 4px;
    text-decoration: none;
    transition: background 0.15s, padding 0.2s var(--ease);
    border-radius: 3px;
}
.linklist a:hover { background: linear-gradient(90deg, var(--accent-soft), transparent 85%); padding-left: 10px; }
.linklist .t { font-size: 13px; }
.linklist .d { grid-column: 1; font-size: 11px; color: var(--muted); }
.linklist .go { grid-row: 1 / span 2; grid-column: 2; font-size: 12px; }

/* ── QSL card ── */
.qsl {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    padding: 20px 20px 18px;
    background:
        radial-gradient(120% 90% at 100% 0%, var(--accent-soft), transparent 60%),
        linear-gradient(150deg, var(--ctrl-bg), var(--bg));
    box-shadow: var(--shadow);
}
.qsl::before {
    content: '';
    position: absolute;
    right: -110px;
    top: -120px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: repeating-radial-gradient(circle at center, transparent 0 25px, var(--accent-dim) 25px 26px);
    -webkit-mask-image: radial-gradient(circle at center, #000 30%, transparent 70%);
    mask-image: radial-gradient(circle at center, #000 30%, transparent 70%);
    opacity: 0.5;
    pointer-events: none;
}
.qsl-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 9.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}
.qsl-top .waves { color: var(--accent); letter-spacing: 0.02em; }
.qsl-call {
    font-family: var(--serif);
    font-weight: 600;
    font-style: italic;
    font-size: clamp(56px, 16vw, 84px);
    line-height: 1;
    letter-spacing: 0.01em;
    color: var(--accent);
    margin: 14px 0 16px;
}
.qsl-grid {
    display: grid;
    grid-template-columns: repeat(4, auto);
    justify-content: start;
    gap: 10px 22px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.qsl-grid > div { font-size: 12px; }
.qsl-grid span {
    display: block;
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}
.qsl-grid .wide { grid-column: 1 / -1; }
.qsl-foot {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}
.qsl-foot b { color: var(--text); font-weight: 400; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; list-style: none; }
.chips li {
    font-size: 10px;
    letter-spacing: 0.06em;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2px 10px;
    background: var(--ctrl-bg);
}

/* ── Contact ── */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}
.contact-grid .card { padding: 16px; grid-column: span 3; }
.contact-grid .card.full { grid-column: 1 / -1; }

.c-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 9.5px;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}
.card .c-value { font-size: 13px; color: var(--text); word-break: break-word; }
.c-desc { font-size: 11px; color: var(--muted); margin-top: 2px; }

.email-card .c-value {
    font-family: var(--serif);
    font-size: clamp(24px, 6.4vw, 30px);
    font-weight: 500;
    line-height: 1.2;
}
.email-card .c-value a { text-decoration: none; }
.email-card .c-value a:hover { color: var(--accent); }
.email-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

.mini-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 12px;
    border-radius: 3px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.mini-btn:hover { border-color: var(--accent-dim); color: var(--accent); }
.mini-btn svg { width: 13px; height: 13px; }
html:not(.js) .needs-js { display: none; }

.support {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
}
.card.support { border-left: 2px solid var(--accent); }
.support .cup { font-size: 22px; line-height: 1; }
.support .t { font-size: 13px; }
.support .d { font-size: 11px; color: var(--muted); }

.socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    list-style: none;
}
.socials a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--ctrl-bg);
    font-size: 11.5px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s, color 0.15s;
}
.socials a:hover { border-color: var(--accent-dim); color: var(--accent); }
.socials .h { color: var(--muted); font-size: 10.5px; }

/* ── Ecosystem ── */
.eco {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    list-style: none;
}
.eco a {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 14px 14px 13px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--surface);
    text-decoration: none;
    transition: border-color 0.2s, transform 0.25s var(--ease), background 0.2s;
}
.eco a:hover { border-color: var(--accent-dim); transform: translateY(-2px); background: var(--ctrl-bg); }
.eco .sub {
    padding-right: 12px; /* room for the status dot */
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    min-width: 0;
    font-size: 12.5px;
    margin-bottom: 4px;
}
.eco .sub b { font-weight: 500; color: var(--text); }
.eco .sub i { font-style: normal; color: var(--muted); font-size: 10.5px; }
.eco .d { font-size: 10.5px; color: var(--muted); line-height: 1.55; }
.eco .live { position: absolute; top: 12px; right: 12px; display: flex; }
.eco .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); }
.eco .live[data-status="degraded"] .live-dot { background: var(--degraded); }
.eco .live[data-status="down"] .live-dot { background: var(--down); }
.eco .live:not([data-status="up"]) .live-dot { box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px currentColor; }
.eco .live[data-status="degraded"] { color: var(--degraded); }
.eco .live[data-status="down"] { color: var(--down); }

/* ── Verification ── */
.fp-card { padding: 18px 20px; }
.fp {
    display: grid;
    grid-template-columns: repeat(5, auto);
    justify-content: start;
    gap: 2px 1.1em;
    font-family: var(--mono);
    font-size: clamp(13px, 4vw, 16px);
    letter-spacing: 0.06em;
    color: var(--text);
    line-height: 1.8;
    margin: 4px 0 14px;
}
.fp span:nth-last-child(-n+2) { color: var(--accent); }
.verify-note {
    margin-top: 16px;
    font-size: 11px;
    color: var(--muted);
    border-left: 2px solid var(--accent-dim);
    padding-left: 12px;
}

/* ── Footer ── */
.site-foot {
    margin-top: 104px;
    border-top: 1px solid var(--border);
    padding: 30px 0 calc(48px + env(safe-area-inset-bottom));
    font-size: 10.5px;
    color: var(--muted);
}
.foot-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.sign {
    font-family: var(--serif);
    font-style: italic;
    font-size: 30px;
    line-height: 1;
    color: var(--text);
}
.sign em { color: var(--accent); }
.foot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    list-style: none;
    margin-bottom: 14px;
}
.foot-links a {
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.05em;
    background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat;
    transition: color 0.15s, background-size 0.2s;
}
.foot-links a:hover { color: var(--accent); background-size: 100% 1px; }
.foot-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; }
.shortcuts { display: none; }
html.js .shortcuts { display: block; }
.shortcuts kbd { margin: 0 2px; }

/* ── Command palette ── */
.palette {
    margin: 12vh auto auto;
    width: min(560px, calc(100vw - 24px));
    max-height: min(560px, 76vh);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.75);
    padding: 0;
    overflow: hidden;
}
.palette[open] { display: flex; flex-direction: column; animation: pop 0.22s var(--ease); }
.palette::backdrop { background: rgba(5, 4, 3, 0.62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.pal-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border-bottom: 1px solid var(--border);
}
.pal-head svg { width: 15px; height: 15px; color: var(--muted); flex-shrink: 0; }
.pal-input {
    flex: 1;
    height: 54px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-family: var(--mono);
    font-size: 14px;
}
.pal-input::placeholder { color: var(--faint); }
.pal-input::-webkit-search-cancel-button { display: none; }
.pal-list { list-style: none; overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.pal-group {
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 10px 10px 4px;
}
.pal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 4px;
    font-size: 12.5px;
    cursor: pointer;
}
.pal-item small { color: var(--muted); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.pal-item[aria-selected="true"] { background: var(--ctrl-bg); box-shadow: inset 2px 0 0 var(--accent); }
.pal-item[aria-selected="true"] small { color: var(--accent); }
.pal-empty { padding: 22px 10px; color: var(--muted); font-size: 12px; text-align: center; }
.pal-foot {
    display: flex;
    gap: 14px;
    padding: 9px 14px;
    border-top: 1px solid var(--border);
    font-size: 10px;
    color: var(--muted);
}

/* ── Toast ── */
.toast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom));
    transform: translate(-50%, 20px);
    z-index: 70;
    background: var(--text);
    color: var(--bg);
    font-size: 11px;
    letter-spacing: 0.06em;
    padding: 9px 16px;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Focus ── */
main:focus { outline: none; }
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 3px;
}

/* ── Reveal on scroll (only with JS) ── */
.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }

.hero > * { animation: rise 0.9s var(--ease) both; }
.hero > :nth-child(2) { animation-delay: 0.06s; }
.hero > :nth-child(3) { animation-delay: 0.14s; }
.hero > :nth-child(4) { animation-delay: 0.22s; }
.hero > :nth-child(5) { animation-delay: 0.28s; }

@keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes ping {
    0%   { transform: scale(0.6); opacity: 0.9; }
    80%, 100% { transform: scale(1.6); opacity: 0; }
}
@keyframes pop {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

/* ── Responsive ── */
@media (min-width: 600px) {
    :root { --gutter: 32px; }
    .hero { padding-top: 84px; }
    .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .grid-2 { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
    .grid-2.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .eco { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .contact-grid .card:not(.full),
    .contact-grid .card.wa { grid-column: span 2; }
    .bio { font-size: 21px; }
    #btn-search .kbd { display: inline; }
    .cta { display: flex; flex-wrap: wrap; max-width: none; }
}

@media (min-width: 720px) {
    .toc {
        display: block;
        position: absolute;
        right: 0;
        bottom: 8px;
        min-width: 190px;
        list-style: none;
        border-left: 1px solid var(--border);
        padding-left: 18px;
    }
    .toc a {
        display: flex;
        gap: 12px;
        font-size: 11px;
        letter-spacing: 0.04em;
        color: var(--muted);
        text-decoration: none;
        line-height: 2.3;
        transition: color 0.15s, transform 0.2s var(--ease);
    }
    .toc a span:first-child { color: var(--muted); font-size: 10px; }
    .toc a:hover { color: var(--accent); transform: translateX(3px); }
    .toc a:hover span:first-child { color: var(--accent); }
}

/* The logo + name + the four control groups need ~398 px: the name goes before
   the bar overflows (390 px is the most common iPhone width). */
@media (max-width: 400px) {
    .brand-text { display: none; }
}

@media (max-width: 380px) {
    .contact-grid .card:not(.full) { grid-column: 1 / -1; }
    .recent a { grid-template-columns: 1fr auto; }
    .recent time { grid-column: 1 / -1; }
    .qsl-grid { grid-template-columns: repeat(2, auto); }
}

/* ── Motion ── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    .js .reveal { opacity: 1; transform: none; }
}

/* ── Print ── */
@media print {
    :root, [data-theme="light"] { --bg: #fff; --text: #000; --muted: #444; --accent: #6a4818; --border: #ccc; --ctrl-bg: #fff; --surface: #fff; }
    body::before, .topbar, .palette, .toast, .cta, .shortcuts, .needs-js, .skip { display: none !important; }
    .section { padding-top: 32px; break-inside: avoid; }
    .js .reveal { opacity: 1; transform: none; }
    a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9px; color: #666; }
    .card, .qsl { box-shadow: none; }
}

/* ── Hidden: radio sweep (hold the callsign) ── */
body.radio-sweep::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    top: -12%;
    height: 14%;
    background: linear-gradient(180deg, transparent, rgba(192, 128, 48, 0.32), transparent);
    z-index: 58;
    pointer-events: none;
    animation: sweep-down 2.2s ease-in-out;
}
@keyframes sweep-down {
    0%   { top: -14%; opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* ── Hidden: Morse flash (five quick taps on the name) ── */
.morse-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 58;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}
.morse-overlay.visible { opacity: 1; }
.morse-led {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.12;
    box-shadow: 0 0 0 rgba(192, 128, 48, 0);
    transition: opacity 0.06s linear, box-shadow 0.06s linear;
}
.morse-led.on {
    opacity: 1;
    box-shadow: 0 0 20px 5px var(--accent-dim);
}
.morse-caption {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
}

