/* cazon.uk redesign - responsive terminal/minimal layout */
:root {
    --bg: #000000;
    --bar: #08090e;
    --panel: #070708;
    --panel-2: #101113;
    --line: rgba(125, 141, 171, 0.18);
    --line-strong: rgba(125, 141, 171, 0.30);
    --text: #cbd2e2;
    --text-soft: #aab2c4;
    --muted: #747d93;
    --muted-2: #586174;
    --white: #f4f6ff;
    --blue: #5f8cff;
    --purple: #a166ff;
    --page-width: clamp(38rem, 44vw, 52rem);
    --compact-width: min(100%, 42rem);
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    color-scheme: dark;
    font-size: clamp(15px, calc(12px + 0.22vw), 18px);
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100svh;
    background: var(--bg);
    color: var(--text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 1rem;
    line-height: 1.85;
    letter-spacing: -0.012em;
}

body.nav-open {
    overflow: hidden;
}

.site-shell {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover,
a:focus-visible {
    text-decoration: underline;
}

.topbar {
    width: 100%;
    height: 2.55rem;
    background: var(--bar);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    width: min(var(--page-width), calc(100% - 2.5rem));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand:hover,
.brand:focus-visible {
    color: var(--blue);
    text-decoration: none;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.9rem;
}

.desktop-nav a {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.desktop-nav a.active,
.desktop-nav a:hover,
.desktop-nav a:focus-visible {
    color: var(--blue);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    width: 2.3rem;
    height: 2.3rem;
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--blue);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 1.25rem;
    height: 1px;
    margin: 0.34rem auto;
    background: currentColor;
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 160ms ease, visibility 160ms ease;
}

.mobile-drawer {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 90;
    width: min(18rem, 66vw);
    background: #080909;
    border-left: 1px solid var(--line-strong);
    transform: translateX(100%);
    transition: transform 180ms ease;
    box-shadow: -18px 0 40px rgba(0, 0, 0, 0.4);
}

body.nav-open .mobile-overlay {
    opacity: 1;
    visibility: visible;
}

body.nav-open .mobile-drawer {
    transform: translateX(0);
}

.mobile-close {
    position: absolute;
    top: 1rem;
    right: 1.05rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    background: transparent;
    color: #8493bc;
    font-size: 1.9rem;
    line-height: 1;
    cursor: pointer;
}

.mobile-nav {
    margin-top: 4.6rem;
    border-top: 1px solid var(--line);
}

.mobile-nav a {
    display: block;
    padding: 1.55rem 1.85rem;
    border-bottom: 1px solid var(--line);
    color: var(--white);
    font-size: 1.23rem;
    line-height: 1;
    letter-spacing: -0.035em;
}

.mobile-nav a.active {
    color: var(--blue);
}

.page {
    width: min(var(--page-width), calc(100% - 2.5rem));
    margin: 0 auto;
    padding: clamp(2rem, 4vh, 3rem) 0 4.6rem;
    flex: 1 0 auto;
}

.kicker {
    margin: 0 0 0.55rem;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
}

/* OG page heading used on the front page */
h1 {
    margin: 0 0 1.15rem;
    color: var(--white);
    font-size: clamp(1.55rem, 1.25rem + 0.55vw, 2rem);
    line-height: 1.14;
    letter-spacing: -0.065em;
    font-weight: 850;
}

.path-title {
    margin: 0;
    color: var(--white);
    font-size: clamp(1.55rem, 1.25rem + 0.55vw, 2rem);
    line-height: 1.22;
    letter-spacing: -0.065em;
    font-weight: 850;
}

.subtitle {
    margin: 0 0 1.35rem;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.8;
}

.divider {
    width: 100%;
    height: 1px;
    margin: 1.35rem 0 2.15rem;
    background: var(--line);
}

.blue {
    color: var(--blue);
}

.red {
    color: #ff5c68;
}

.home-banner {
    margin-top: 0;
    margin-bottom: 2.15rem;
}

.banner-img {
    display: block;
    width: min(20rem, 100%);
    height: auto;
    border: 1px solid var(--line-strong);
}

.copyleft {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.72rem;
}

.blog-list {
    width: var(--compact-width);
    border-top: 1px solid var(--line);
}

.blog-row {
    display: grid;
    grid-template-columns: minmax(8.5rem, 0.32fr) 1fr;
    gap: 1.35rem;
    padding: 0.75rem 0 0.83rem;
    border-bottom: 1px solid var(--line);
    align-items: baseline;
}

.blog-date,
.collection-type,
.article-date {
    color: var(--muted);
    font-size: 0.82rem;
}

.blog-title a {
    color: var(--blue);
}

.section-heading {
    margin: 2.15rem 0 0.95rem;
    color: var(--blue);
    font-size: 0.82rem;
    font-weight: 850;
    letter-spacing: 0.01em;
}

.page-content p,
.blog-post p,
.collection-page p,
.error-content p {
    margin: 0 0 1.1rem;
    max-width: var(--page-width);
    color: var(--text);
    font-size: 0.94rem;
    line-height: 1.95;
}

.system-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    line-height: 1.45;
}

.system-table td {
    border: 1px solid var(--line);
    padding: 0.72rem 0.95rem;
}

.system-table td:first-child {
    width: 8rem;
    background: var(--panel-2);
    color: var(--blue);
}

.collection-list {
    width: 100%;
}

.collection-card {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 1.25rem;
    align-items: center;
    min-height: 2.65rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--line);
    border-bottom: 0;
    background: rgba(255, 255, 255, 0.01);
}

.collection-card:last-child {
    border-bottom: 1px solid var(--line);
}

.collection-title {
    text-align: right;
}

.collection-title a::after {
    content: " →";
}

.blog-post {
    width: 100%;
}

.post-title {
    margin: 0 0 0.45rem;
    color: var(--white);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 1.6rem + 0.9vw, 2.85rem);
    line-height: 1.05;
    letter-spacing: -0.08em;
    font-weight: 700;
}

.article-date {
    margin-bottom: 2.2rem;
    font-size: 0.74rem;
}

.tldr {
    margin: 0 0 1.35rem;
    padding: 0.9rem 1.1rem;
    max-width: var(--page-width);
    border: 1px solid var(--line);
    border-left: 3px solid var(--blue);
    background: #080808;
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.95;
}

.tldr strong {
    color: var(--white);
}

.blog-post h2 {
    margin: 2rem 0 0.85rem;
    color: var(--blue);
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.6;
    letter-spacing: 0.01em;
}

.blog-post h3 {
    margin: 1.55rem 0 0.78rem;
    color: var(--white);
    font-size: 0.9rem;
    line-height: 1.6;
}

.quote {
    margin: 1.2rem 0 1.35rem;
    max-width: var(--page-width);
    padding: 0.78rem 1rem;
    border-left: 3px solid var(--purple);
    background: #090909;
    color: var(--muted);
    font-style: italic;
    line-height: 1.9;
}

.back-link {
    margin-top: 2.65rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.site-footer {
    flex: 0 0 auto;
    border-top: 1px solid var(--line);
    padding: 1rem 1.25rem 1.15rem;
    color: var(--muted-2);
    text-align: center;
    font-size: 0.72rem;
}

.error-code {
    margin: 0;
    color: var(--blue);
    font-size: clamp(3.2rem, 2.5rem + 1vw, 4rem);
    line-height: 1;
    letter-spacing: -0.08em;
}

@media (max-width: 720px) {
    html {
        font-size: clamp(15px, 3.8vw, 17px);
    }

    .topbar {
        height: 2.55rem;
    }

    .topbar-inner {
        width: 100%;
        padding: 0 1rem;
    }

    .desktop-nav {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .page {
        width: 100%;
        padding: 2.25rem 1.25rem 4.4rem;
    }

    .path-title {
        font-size: 1.55rem;
    }

    h1 {
        font-size: 1.55rem;
        line-height: 1.14;
        margin-bottom: 1.15rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .blog-row {
        grid-template-columns: 1fr;
        gap: 0.15rem;
        padding: 0.85rem 0;
    }

    .banner-img {
        width: min(19rem, 100%);
    }

    .collection-card {
        grid-template-columns: 1fr;
        gap: 0.15rem;
        padding: 0.8rem 0.82rem;
    }

    .collection-title {
        text-align: left;
    }

    .system-table,
    .system-table tbody,
    .system-table tr,
    .system-table td {
        display: block;
        width: 100% !important;
    }

    .system-table tr:not(:last-child) td:last-child {
        border-bottom: 0;
    }

    .post-title {
        font-size: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-overlay,
    .mobile-drawer {
        transition: none;
    }
}
