/* OXIDT — "dark forge". One stylesheet for the whole site; the blog at /blog
   brings its own. */

:root {
    --ox-orange: #e56b17;
    --ox-orange-soft: color-mix(in srgb, #e56b17 14%, transparent);
    --ox-bg: #0c0b0a;
    --ox-bg-2: #141210;
    --ox-line: #2a2622;
    --ox-text: #f3efe9;
    --ox-muted: #a49d94;
    --ox-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --ox-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
    color-scheme: dark;
}

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

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

body {
    margin: 0;
    background: var(--ox-bg);
    color: var(--ox-text);
    font-family: var(--ox-sans);
    line-height: 1.6;
}

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

h1, h2, h3, p, ul, figure, pre { margin: 0; }

.skip {
    position: absolute;
    left: -999px;
}

.skip:focus {
    left: 1rem;
    top: 1rem;
    z-index: 10;
    padding: 0.5rem 1rem;
    background: var(--ox-orange);
    color: #140b04;
}

.ox-wrap {
    max-width: 72rem;
    margin-inline: auto;
    padding-inline: 1.25rem;
}

:is(.ox-nav, .ox-hero, .ox-section, .ox-footer) a {
    color: inherit;
    text-decoration: none;
}

/* ── Nav ── */

.ox-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--ox-line);
    background: color-mix(in srgb, var(--ox-bg) 82%, transparent);
    backdrop-filter: blur(12px);
}

.ox-nav .ox-wrap {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 4rem;
}

.ox-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    font-size: 0.95rem;
}

.ox-brand img {
    width: 1.6rem;
    height: auto;
}

.ox-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
    font-size: 0.9rem;
    color: var(--ox-muted);
}

.ox-links a:hover {
    color: var(--ox-text);
}

@media (max-width: 40rem) {
    .ox-links .ox-hide-sm {
        display: none;
    }
}

/* ── Buttons ── */

a.ox-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.75rem;
    padding: 0 1.2rem;
    border-radius: 0.5rem;
    background: var(--ox-orange);
    color: #140b04;
    font-weight: 600;
    font-size: 0.95rem;
    transition: filter 0.15s ease, background-color 0.15s ease;
}

a.ox-btn:hover {
    filter: brightness(1.1);
}

a.ox-btn-ghost {
    background: transparent;
    color: var(--ox-text);
    box-shadow: inset 0 0 0 1px var(--ox-line);
}

a.ox-btn-ghost:hover {
    filter: none;
    background: var(--ox-bg-2);
}

.ox-links a.ox-btn {
    min-height: 2.25rem;
    padding: 0 0.9rem;
    font-size: 0.85rem;
    color: #140b04;
}

/* ── Hero ── */

.ox-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--ox-line);
    background:
        radial-gradient(60rem 30rem at 85% -10%, color-mix(in srgb, var(--ox-orange) 22%, transparent), transparent 60%),
        linear-gradient(var(--ox-line) 1px, transparent 1px) 0 0 / 100% 3.5rem,
        var(--ox-bg);
    background-blend-mode: normal;
}

.ox-hero::after {
    /* Fade the grid lines out toward the bottom. */
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 30%, var(--ox-bg));
    pointer-events: none;
}

.ox-hero .ox-wrap {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 3rem;
    align-items: center;
    padding-block: 5.5rem 6rem;
}

@media (min-width: 60rem) {
    .ox-hero .ox-wrap {
        grid-template-columns: 1.15fr 1fr;
        padding-block: 7rem 7.5rem;
    }
}

.ox-eyebrow {
    margin: 0 0 1.25rem;
    font-family: var(--ox-mono);
    font-size: 0.8rem;
    color: var(--ox-orange);
}

.ox-hero h1 {
    margin: 0;
    font-size: clamp(2.6rem, 6vw + 0.5rem, 4.6rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    font-weight: 700;
}

.ox-hero h1 em {
    font-style: normal;
    color: var(--ox-orange);
}

.ox-lead {
    margin: 1.5rem 0 0;
    max-width: 34rem;
    font-size: 1.15rem;
    line-height: 1.65;
    color: var(--ox-muted);
}

.ox-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2.25rem;
}

/* ── Terminal ── */

.ox-term {
    min-width: 0;
    border: 1px solid var(--ox-line);
    border-radius: 0.75rem;
    background: #0a0908;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.ox-term-bar {
    display: flex;
    gap: 0.4rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--ox-line);
}

.ox-term-bar span {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 999px;
    background: var(--ox-line);
}

.ox-term pre {
    margin: 0;
    padding: 1.25rem 1.25rem 1.5rem;
    overflow-x: auto;
    background: none;
    font-family: var(--ox-mono);
    font-size: 0.82rem;
    line-height: 1.75;
    color: var(--ox-text);
    white-space: pre;
}

.ox-term .p { color: var(--ox-orange); }
.ox-term .c { color: #6f6860; }
.ox-term .s { color: #b9d58c; }
.ox-term .k { color: #e9b872; }

/* ── Sections ── */

.ox-section {
    padding-block: 5rem;
    border-bottom: 1px solid var(--ox-line);
}

.ox-section-alt {
    background: var(--ox-bg-2);
}

.ox-label {
    margin: 0 0 0.75rem;
    font-family: var(--ox-mono);
    font-size: 0.78rem;
    color: var(--ox-orange);
}

.ox-section h2 {
    margin: 0;
    font-size: clamp(1.75rem, 2.5vw + 1rem, 2.5rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-weight: 700;
}

.ox-intro {
    margin: 0.9rem 0 0;
    max-width: 38rem;
    color: var(--ox-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* ── Featured ── */

.ox-feature {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

@media (min-width: 60rem) {
    .ox-feature {
        grid-template-columns: 1fr 1.3fr;
        gap: 4rem;
    }
}

.ox-points {
    margin: 1.75rem 0 2rem;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.7rem;
    color: var(--ox-muted);
}

.ox-points li {
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.55;
}

.ox-points li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--ox-orange);
}

.ox-shot {
    margin: 0;
    border: 1px solid var(--ox-line);
    border-radius: 0.75rem;
    overflow: hidden;
    background: var(--ox-bg-2);
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}

.ox-shot img {
    display: block;
    width: 100%;
    height: auto;
}

/* ── Cards ── */

.ox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
    gap: 1rem;
    margin-top: 2.5rem;
}

.ox-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.5rem;
    border: 1px solid var(--ox-line);
    border-radius: 0.75rem;
    background: var(--ox-bg);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.ox-section-alt .ox-card {
    background: var(--ox-bg);
}

a.ox-card:hover {
    border-color: color-mix(in srgb, var(--ox-orange) 60%, var(--ox-line));
    transform: translateY(-2px);
}

.ox-card-kicker {
    font-family: var(--ox-mono);
    font-size: 0.74rem;
    color: var(--ox-muted);
}

.ox-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.ox-card-text {
    color: var(--ox-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.ox-card-link {
    margin-top: auto;
    padding-top: 0.6rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ox-orange);
}

.ox-card-img {
    margin: -1.5rem -1.5rem 0.75rem;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-bottom: 1px solid var(--ox-line);
    border-radius: 0.75rem 0.75rem 0 0;
    background: var(--ox-bg-2);
}

.ox-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
}

.ox-badge {
    align-self: flex-start;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--ox-orange-soft);
    color: var(--ox-orange);
    font-family: var(--ox-mono);
    font-size: 0.72rem;
}

/* ── Footer ── */

.ox-footer {
    border-top: 1px solid var(--ox-line);
    padding-block: 3rem;
    color: var(--ox-muted);
    font-size: 0.9rem;
}

.ox-footer .ox-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

.ox-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-left: auto;
}

.ox-footer a:hover {
    color: var(--ox-text);
}

/* ── Text pages (about, legal) ── */

.ox-page {
    max-width: 44rem;
    margin-inline: auto;
    padding: 4rem 1.25rem 6rem;
}

.ox-page h1 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
}

.ox-prose > * + * { margin-top: 1.1rem; }

.ox-prose :is(h2, h3) {
    margin-top: 2.5rem;
    line-height: 1.3;
}

.ox-prose h2 { font-size: 1.5rem; }
.ox-prose h3 { font-size: 1.15rem; }

.ox-prose ul { padding-left: 1.25rem; }

.ox-prose a {
    color: var(--ox-orange);
    text-underline-offset: 3px;
}

.ox-prose code {
    font-family: var(--ox-mono);
    font-size: 0.9em;
}

/* ── About ── */

.ox-about-hero {
    display: grid;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 60rem) {
    .ox-about-hero { grid-template-columns: 1.15fr 0.85fr; }
    .ox-name { grid-template-columns: 0.9fr 1.1fr; }
    .ox-about-cols { grid-template-columns: 1fr 1fr; }
}

.ox-portrait {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid var(--ox-line);
    aspect-ratio: 813 / 900;
    max-width: 28rem;
    justify-self: center;
}

.ox-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ox-portrait figcaption {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    display: flex;
    flex-direction: column;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--ox-bg);
    border: 1px solid var(--ox-line);
    font-size: 0.85rem;
    line-height: 1.3;
}

.ox-portrait figcaption span {
    color: var(--ox-muted);
    font-size: 0.75rem;
}

.ox-name,
.ox-about-cols {
    display: grid;
    gap: 3rem;
    align-items: center;
}

.ox-about-cols { align-items: start; }

.ox-dict {
    padding: 2rem;
    border-radius: 1.25rem;
    background: var(--ox-bg);
    border: 1px solid var(--ox-line);
}

.ox-dict-word {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.ox-dict-meta {
    color: var(--ox-muted);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.95rem;
}

.ox-dict hr {
    border: 0;
    border-top: 1px solid var(--ox-line);
    margin: 1.25rem 0;
}

.ox-dict-def {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.1rem;
}

.ox-dict-def em,
.ox-hero h1 em {
    color: var(--ox-orange);
}

.ox-values {
    display: grid;
    gap: 1px;
    margin-top: 2.5rem;
    border: 1px solid var(--ox-line);
    border-radius: 1rem;
    overflow: hidden;
    background: var(--ox-line);
}

@media (min-width: 48rem) {
    .ox-values { grid-template-columns: repeat(3, 1fr); }
}

.ox-value {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.75rem;
    background: var(--ox-bg-2);
}

.ox-about-cols .ox-points a,
.ox-contact a.ox-btn-ghost {
    color: inherit;
}

.ox-about-cols .ox-points a {
    color: var(--ox-orange);
    text-decoration: none;
}

.ox-about-cols .ox-btn { margin-top: 1.5rem; }

.ox-contact { text-align: center; }
.ox-contact .ox-intro { margin-inline: auto; }
.ox-contact .ox-actions { justify-content: center; flex-wrap: wrap; }

/* ── Latest writing (home) ── */

.ox-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.ox-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
