
:root {
    --bg: #ffffff;
    --fg: #111111;
    --muted: #666;
    --accent: #111;
    --border: #e6e6e6;
    --radius: 14px;
    --shadow: 0 6px 28px rgba(0, 0, 0, .08);
    --maxw: 1100px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0e0f11;
        --fg: #f2f2f2;
        --muted: #a7a7a7;
        --accent: #f2f2f2;
        --border: #222;
    }
}

* {
    box-sizing: border-box
}

html, body {
    height: 100%
}

body {
    margin: 0;
    font: 16px/1.65 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--fg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration-color: rgba(0, 0, 0, .25)
}

a:hover {
    text-decoration-color: currentColor
}

.container {
    max-width: var(--maxw);
    margin-inline: auto;
    padding: 0 20px
}

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 64px
}

.logo {
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    gap: .45em;
}

.logo::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px inset var(--bg);
}

nav {
    --pad: 16px
}

.menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu a {
    display: block;
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid transparent;
}

.menu a:focus-visible {
    outline: 3px solid #7aa7ff55;
    outline-offset: 2px;
    border-color: transparent
}

.menu a:hover {
    background: rgba(0, 0, 0, .04)
}

@media (prefers-color-scheme: dark) {
    .menu a:hover {
        background: rgba(255, 255, 255, .06)
    }
}

/* Burger */
.burger {
    appearance: none;
    border: 0;
    background: transparent;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.burger:focus-visible {
    outline: 3px solid #7aa7ff55;
    outline-offset: 2px
}

.burger span, .burger::before, .burger::after {
    content: "";
    display: block;
    width: 22px;
    height: 2px;
    background: var(--fg);
    border-radius: 1px;
    transition: .25s ease;
}

.burger::before {
    transform: translateY(-6px)
}

.burger::after {
    transform: translateY(6px)
}

.burger[aria-expanded="true"] span {
    transform: scaleX(0)
}

.burger[aria-expanded="true"]::before {
    transform: translateY(0) rotate(45deg)
}

.burger[aria-expanded="true"]::after {
    transform: translateY(0) rotate(-45deg)
}

/* Mobile panel  */
.panel {
    position: fixed;
    inset: 64px 0 auto 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    transition: transform .32s ease;
    will-change: transform;
    box-shadow: var(--shadow);
}

.panel.open {
    transform: translateY(0)
}

.panel .menu {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px
}

.panel .menu a {
    width: 100%;
    padding: 12px 14px
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .28);
    backdrop-filter: saturate(100%) blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.overlay.show {
    opacity: 1;
    pointer-events: auto
}

/* Desktop */
@media (min-width: 1000px) {
    .burger {
        display: none
    }

    .panel {
        display: none
    }

    nav .menu-desktop {
        display: flex
    }

    nav .menu-desktop .menu a {
        padding: 10px 14px
    }
}

@media (max-width: 999.98px) {
    nav .menu-desktop {
        display: none
    }
}

/* ===== Main content typography ===== */
main {
    padding: 42px 0
}

.page-title {
    font-size: clamp(28px, 5vw, 56px);
    line-height: 1.1;
    margin: 10px 0 26px;
    letter-spacing: -.01em;
    font-weight: 800;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.2;
    margin: 1.4em 0 .6em;
}

h1 {
    font-size: clamp(28px, 4.4vw, 44px)
}

h2 {
    font-size: clamp(24px, 3.4vw, 34px)
}

h3 {
    font-size: clamp(20px, 2.6vw, 26px)
}

h4 {
    font-size: clamp(18px, 2.2vw, 22px)
}

h5 {
    font-size: clamp(16px, 2vw, 18px)
}

h6 {
    font-size: clamp(14px, 1.8vw, 16px);
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted)
}

p {
    margin: .8em 0
}

strong {
    font-weight: 800
}

blockquote {
    margin: 1.4em 0;
    padding: 14px 18px;
    border-left: 4px solid var(--fg);
    background: linear-gradient(0deg, rgba(0, 0, 0, .04), rgba(0, 0, 0, .04));
    border-radius: 0 var(--radius) var(--radius) 0;
}

@media (prefers-color-scheme: dark) {
    blockquote {
        background: linear-gradient(0deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .06))
    }
}

/* Lists */
ul, ol {
    padding-left: 1.4em;
    margin: .8em 0
}

li {
    margin: .35em 0
}

ul {
    list-style: disc
}

ul ul {
    list-style: circle
}

ol {
    list-style: decimal
}

ol ol {
    list-style: lower-alpha
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 12px
}

figure {
    margin: 1.2em 0
}

figure figcaption {
    font-size: .9rem;
    color: var(--muted);
    margin-top: .35em
}

.float-left {
    float: left;
    margin: 0 1rem .5rem 0;
    max-width: 50%
}

.float-right {
    float: right;
    margin: 0 0 .5rem 1rem;
    max-width: 50%
}

@media (max-width: 700px) {
    .float-left, .float-right {
        float: none;
        margin: 0 0 .75rem 0;
        max-width: 100%
    }
}

/* Tables */
.table-wrap {
    width: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    box-shadow: var(--shadow)
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 620px;
    background: var(--bg)
}

thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    text-align: left;
    background: linear-gradient(0deg, rgba(0, 0, 0, .04), rgba(0, 0, 0, .04));
    font-weight: 700;
}

th, td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border)
}

tbody tr:hover td {
    background: rgba(0, 0, 0, .02)
}

@media (prefers-color-scheme: dark) {
    thead th {
        background: linear-gradient(0deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .06))
    }

    tbody tr:hover td {
        background: rgba(255, 255, 255, .03)
    }
}

caption {
    caption-side: top;
    text-align: left;
    padding: 10px 0;
    font-weight: 700
}

/* Cards / helpers */
.lead {
    font-size: clamp(18px, 2.2vw, 22px);
    color: var(--muted)
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    background: var(--bg);
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 28px 0;
    color: var(--muted);
    font-size: .95rem
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important
    }
}

