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

html {
    scroll-behavior: smooth;
}

:root {
    --bg: #fcfcfd;
    --surface: #f6f8fa;
    --border: #e5eaf0;
    --text: #0f172a;
    --muted: #5b6472;
    --accent: #8bd3dd;
    --accent-strong: #0ea5a5;
}

body {
    font-family: system-ui, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

a {
    color: var(--accent-strong);
    text-decoration: none;
}
a:hover,
a:focus {
    text-decoration: underline;
}
a:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 2px;
}

.container {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 1rem;
}

.section {
    padding: 2.5rem 0;
}

.section__header {
    text-align: center;
    margin-bottom: 1.25rem;
}
.section__title,
.section_title {
    font-size: clamp(1.4rem, 2.2vw, 2rem);
    color: var(--accent-strong);
}

.nav_bar_all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 0.75rem;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 1rem;
    border-bottom: 1px solid var(--border);
}

.nav-toggle {
    display: none;
}

#home > div {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 1rem;
    display: grid;
    gap: 1.5rem;
    align-items: center;
    grid-template-columns: 1.2fr 0.8fr;
}
#home .section_title {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    line-height: 1.25;
}
#home p {
    max-width: 60ch;
}

.grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.grid--3cols {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.grid--1col {
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
.flow > * + * {
    margin-top: 0.75rem;
}

.eyebrow {
    color: var(--muted);
    font-size: 0.95rem;
}

.button {
    display: inline-block;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--accent-strong);
    color: var(--accent-strong);
    border-radius: 0.5rem;
}
.button:hover {
    background: var(--accent);
    color: white;
}

.card {
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: 0.6rem;
    padding: 1.1rem;
}
.card:hover {
    background: var(--surface);
}

.tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.tags li {
    border: 1px solid var(--border);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--muted);
}

.list--ordered {
    padding-left: 1.25rem;
}
.list--ordered li + li {
    margin-top: 0.4rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}
thead th {
    text-align: left;
    color: var(--muted);
    font-weight: 700;
}
th,
td {
    padding: 0.6rem 0.5rem;
    vertical-align: top;
}
tbody tr {
    border-bottom: 1px solid var(--border);
}
tbody tr:last-child {
    border-bottom: 0;
}
tbody tr:nth-child(even) {
    background: var(--surface);
}

#page-location,
#last-modified {
    color: var(--muted);
    font-size: 0.85rem;
}

.nav_bar_list {
    list-style: none;
    display: flex;
    gap: clamp(0.75rem, 2.5vw, 1.25rem);
    flex-wrap: wrap;
    padding: 0;
}
.nav_bar_list a {
    color: var(--text);
    opacity: 0.9;
    font-weight: 500;
    padding: 0.4rem 0.5rem;
    border-radius: 0.25rem;
}
.nav_bar_list a:hover {
    color: var(--accent-strong);
}
.nav_bar_list a:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 2px;
}

.nav_bar {
    padding-block: 0.25rem;
}

.theme-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.theme-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    opacity: 1;
    border-radius: 4px;
}

.image {
    display: grid;
    justify-items: center;
}
.image img,
.img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.list {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
    background: var(--bg);
}
.list__row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border);
}
.list__row:last-child {
    border-bottom: 0;
}
.list dt {
    font-weight: 600;
    color: var(--muted);
}
.list dd {
    margin: 0;
}

.footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    text-align: center;
}
.quote {
    max-width: 680px;
    margin: 0 auto 1rem auto;
    color: var(--muted);
}
.quote p {
    font-style: italic;
}
.quote cite {
    display: block;
    margin-top: 0.25rem;
}

.footer p {
    color: var(--muted);
    margin-top: 0.25rem;
}
.footer a {
    color: var(--accent-strong);
}

@media (max-width: 900px) {
    .nav_bar_all {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        position: relative;
    }
    #home > div {
        grid-template-columns: 1fr;
    }

    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 8px;
        border: 0;
        background: transparent;
        cursor: pointer;
        position: absolute;
        top: 8px;
        right: 16px;
        z-index: 2;
    }
    .nav-toggle .bar {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--text);
        border-radius: 2px;
    }

    .nav_bar {
        display: none;
        width: 100%;
    }
    .nav_bar.open {
        display: block;
    }
    .nav_bar_list {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    .nav_bar_list li {
        width: 100%;
    }
    .nav_bar_list a {
        display: block;
        width: 100%;
        padding: 0.6rem 0.4rem;
    }
}
@media (min-width: 768px) {
    .image img,
    .img {
        max-width: 420px;
    }
}
@media (min-width: 1024px) {
    .image img,
    .img {
        max-width: 560px;
    }
}

body,
.card,
.list,
.nav_bar_all,
.image img,
.img,
.tags li,
.button,
.list__row,
tbody tr,
.footer {
    transition: background-color 180ms ease, color 180ms ease,
        border-color 180ms ease, opacity 180ms ease;
}

html[data-theme="dark"] {
    --bg: #0b1220;
    --surface: #0f172a;
    --border: #233141;
    --text: #e6edf3;
    --muted: #9aa4b2;
    --accent: #164e63;
    --accent-strong: #22d3ee;
}
