/* PT Serif */
@font-face {
    font-family: 'PT Serif';
    src: url('/fonts/PTSerif-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PT Serif';
    src: url('/fonts/PTSerif-Italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'PT Serif';
    src: url('/fonts/PTSerif-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PT Serif';
    src: url('/fonts/PTSerif-BoldItalic.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* Oswald */
@font-face {
    font-family: 'Oswald';
    src: url('/fonts/Oswald-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Oswald';
    src: url('/fonts/Oswald-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Oswald';
    src: url('/fonts/Oswald-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Oswald';
    src: url('/fonts/Oswald-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #ffffff;
    --color-text: #1a1a1a;
    --color-link: #0052cc;
    --color-link-hover: #003d99;
    --color-secondary: #595959;
    --color-focus: #0052cc;
}

:root[data-theme="dark"] {
    --color-bg: #0C1A29;
    --color-text: #f0f0f0;
    --color-link: #489FE6;
    --color-link-hover: #5aa9ea;
    --color-secondary: #999999;
    --color-focus: #489FE6;
}

html, body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.6;
    font-family: 'PT Serif', Georgia, serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    max-width: 60rem;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.top-container {
    display: flex;
    flex-direction: row;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.bottom-container {
    display: flex;
    flex-direction: row;
    gap: 4rem;
}

.logo-container {
    width: 10rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.logo {
    width: 48px;
    height: 48px;
    color: var(--color-link);
}

nav {
    flex-shrink: 0;
    width: 10rem;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    position: sticky;
    top: 4rem;
}

main {
    flex: 1;
    max-width: 42rem;
}

nav li {
    margin: 0 0 0.25rem 0;
}

nav a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 1rem;
    display: inline-block;
    padding: 0.5rem 0.25rem;
    margin: -0.5rem -0.25rem;
    transition: color 0.2s ease;
}

nav a:hover {
    color: var(--color-link);
}

nav a:hover {
    text-decoration: underline;
}

nav a.active {
    font-weight: bold;
    color: var(--color-link);
    position: relative;
}

nav a.active::after {
    content: "•";
    position: absolute;
    left: -1rem;
    display: inline-block;
    text-decoration: none;
    color: var(--color-link);
}

main {
    flex: 1;
    max-width: 42rem;
}

p {
    margin: 0 0 1.5rem 0;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--color-link);
    text-decoration: underline;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-link-hover);
}

a:focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: 2px;
}

h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
}

h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem 0;
}

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

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-link);
    color: var(--color-bg);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus-visible {
    top: 0;
}

.theme-switcher {
    display: flex;
    gap: 0.5rem;
}

.theme-btn {
    background: none;
    border: none;
    color: var(--color-link);
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.theme-btn:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

.theme-btn:focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: 2px;
}

.theme-btn.active::after {
    content: "•";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
		margin-top: 0.5rem;
		top: 50%;
    color: var(--color-link);
}

section {
    margin-bottom: 3rem;
}

section:last-child {
    margin-bottom: 0;
}

.links {
    margin-top: 6rem;
    font-size: 16px;
    color: var(--color-text);
}

.links-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.links-content > div {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    body {
        padding: 2rem 1.5rem;
    }

    .top-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .bottom-container {
        flex-direction: column;
        gap: 2rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    nav {
        width: 100%;
    }

    nav ul {
        position: static;
        display: flex;
        gap: 1.5rem;
    }

    nav li {
        margin: 0;
    }

    nav a.active::after {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: 50%;
        margin-top: 0.5rem;
    }

    main {
        max-width: 100%;
    }
}

ul {
    list-style-position: inside;
    margin: 1rem 0;
}

li {
    margin: 0.5rem 0;
}

abbr {
    text-decoration: underline dotted;
    cursor: help;
    text-decoration-color: var(--color-link);
    position: relative;
}

abbr::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background: var(--color-bg);
    color: var(--color-text);
    border: 2px solid var(--color-link);
    font-size: 0.875rem;
    white-space: nowrap;
    border-radius: 0.25rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-bottom: 0.5rem;
    z-index: 1000;
}

abbr::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 0.375rem solid transparent;
    border-top-color: var(--color-link);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-bottom: 0.125rem;
    z-index: 1000;
}

abbr:hover::before,
abbr:hover::after,
abbr:focus::before,
abbr:focus::after {
    opacity: 1;
}

.breadcrumb {
    margin: 0 0 1rem 0;
    padding: 0;
    width: auto;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    padding-inline-start: 0;
    margin-inline-start: 0;
    font-size: 1rem;
}

.breadcrumb li {
    margin: 0;
}

.breadcrumb a,
.breadcrumb [aria-current="page"] {
    display: inline;
    padding: 0;
}

.breadcrumb li:not(:last-child)::after {
    content: "›";
    margin-left: 0.5rem;
    color: var(--color-secondary);
}

.breadcrumb [aria-current="page"] {
    color: var(--color-secondary);
}
