/* Font Faces */
@font-face {
    font-family: 'Ancient Kyiv';
    src: url('../fonts/ancient-kyiv/AncientKyiv.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Kyiv Machine';
    src: url('../fonts/kyiv-machine/KyivMachine-nR0aM.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Basic Reset & Body Styles */
body {
    margin: 0;
    font-family: 'Kyiv Machine', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    padding: 0;
}

/* Header Styles */
header {
    background-color: #333;
    color: #fff;
    padding: 1em 0;
    text-align: center;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1em;
}

header h1 {
    margin: 0;
    font-size: 1.1em;
    font-family: 'Kyiv Machine', Arial, sans-serif;
    font-weight: 400;
}

header h1 .header-meta {
    opacity: 0.8;
}

header h1 a {
    color: #fff;
    text-decoration: none;
}

header ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1em;
    align-items: center;
}

header ul li a {
    color: #fff;
    text-decoration: none;
    padding: 0.5em 1em;
    transition: background-color 0.3s ease;
}

header ul li a:hover {
    background-color: #575757;
    border-radius: 4px;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-trigger {
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #333;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    min-width: 160px;
    z-index: 100;
    flex-direction: column;
    padding: 0.25em 0;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    display: flex;
}

.dropdown-menu li a {
    display: block;
    white-space: nowrap;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-weight: bold;
}

.language-toggle span {
    color: #ffd700; /* Highlight active language */
}

.language-toggle a {
    color: #fff;
    text-decoration: none;
}

.language-toggle a:hover {
    text-decoration: underline;
}

/* Hide Pandoc-generated title block (duplicates header) */
#title-block-header {
    display: none;
}

/* Headings use Ancient Kyiv globally */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Ancient Kyiv', serif;
}

/* Main Content Styling */
.content {
    max-width: 1200px;
    margin: 2em auto;
    padding: 1em 4em;
    font-size: 1.15em;
    line-height: 1.9;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.content h1, .content h2, .content h3, .content h4, .content h5, .content h6 {
    font-family: 'Ancient Kyiv', serif;
    color: #2c3e50;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    line-height: 1.2;
    text-align: center;
}

.content h1 { font-size: 2.5em; }
.content h2 { font-size: 2em; }
.content h3 { font-size: 1.75em; }
.content h4 { font-size: 1.5em; }
.content h5 { font-size: 1.25em; }
.content h6 { font-size: 1em; }

.content p {
    margin-bottom: 1em;
}

.content a {
    color: #3498db;
    text-decoration: none;
}

.content a:hover {
    text-decoration: underline;
}

.content ul, .content ol {
    margin-bottom: 1em;
    padding-left: 20px;
}

.content li {
    margin-bottom: 0.5em;
}

.content blockquote {
    border-left: 4px solid #ccc;
    padding-left: 1em;
    margin-left: 0;
    color: #666;
    font-style: italic;
}

.content code {
    font-family: 'Courier New', Courier, monospace;
    background-color: #eee;
    padding: 0.2em 0.4em;
    border-radius: 4px;
}

.content pre {
    background-color: #eee;
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
}

.content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

.content th, .content td {
    border: 1px solid #ddd;
    padding: 0.8em;
    text-align: left;
}

.content th {
    background-color: #f2f2f2;
}
