:root {
    --header-height: 70px;

    /* Unified color palette */
    --primary:     #2563eb;
    --primary-lt:  #dbeafe;
    --accent:      #0ea5e9;
    --text-dark:   #1e293b;
    --text-muted:  #64748b;
    --bg-page:     #f8fafc;
    --bg-sidebar:  #f1f5f9;
    --bg-card:     #ffffff;
    --border:      #e2e8f0;
}

/* General Page Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 20px;
    line-height: 1.8;
    background-color: var(--bg-page);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography - Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    color: var(--text-dark);
}

h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.75rem); }
h4 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h5 { font-size: clamp(1.1rem, 2vw, 1.25rem); }
h6 { font-size: clamp(1rem, 1.5vw, 1.1rem); }

/* Typography - Paragraphs */
p {
    margin-bottom: 1.25rem;
    line-height: 1.85;
    color: var(--text-dark);
}

/* Links */
a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

strong, b {
    font-weight: 600;
}

/* Language switcher */
.lang-container {
    margin: 10px 0;
    display: flex;
    justify-content: center;
    width: 100%;
}

.lang-switcher {
    display: flex;
    gap: 10px;
}

.lang-switcher a, .lang-switcher .selected-lang {
    text-decoration: none;
    color: var(--primary);
    font-weight: bold;
}

.lang-switcher a:hover {
    color: var(--accent);
}

.selected-lang {
    color: var(--text-muted);
}

/* Container Layout */
.container {
    display: flex;
    max-width: 100%;
    width: 100%;
    margin: 0;
    overflow-x: hidden;
    padding-top: var(--header-height);
}

/* Sidebar */
.sidebar {
    background-color: var(--bg-sidebar);
    color: var(--text-dark);
    padding: 24px 20px;
    width: 250px;
    min-width: 220px;
    max-width: 250px;
    position: fixed;
    top: var(--header-height);
    left: 0;
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid #e2e8f0;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}

.sidebar-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-dark);
}

.sidebar-content ul {
    list-style: none;
    padding: 0;
}

.sidebar-content li {
    margin-bottom: 10px;
    padding-left: 8px;
}

.sidebar-content a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1.05rem;
    transition: color 0.2s ease;
}

.sidebar-content a:hover {
    color: var(--primary);
    text-decoration: none;
}

/* Main Content */
.content {
    flex-grow: 1;
    margin-left: 250px;
    padding: 32px 40px;
    background-color: var(--bg-page);
    font-size: 1.05rem;
    line-height: 1.85;
    min-width: 0;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

/* Centered inner wrapper */
.content-inner {
    max-width: 1000px;
    margin: 0 auto;
}

/* Card-style section */
.card {
    background-color: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 28px 32px;
    margin-bottom: 32px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

.card h2 {
    font-size: 1.15rem;
    color: #1e40af;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-lt);
}

/* Keyword / tag badge */
.keyword {
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 0.92em;
}

/* Top Menu — Option A: white + bottom border */
.top-menu {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}

.top-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.top-menu li {
    display: inline;
    margin: 0 18px;
}

.top-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.2px;
    transition: color 0.2s ease;
}

.top-menu a:hover {
    color: var(--primary);
}

.top-menu a.active {
    color: #2563eb;
    border-bottom: 2px solid #2563eb;
    padding-bottom: 2px;
}

/* Profile avatar */
.author__avatar {
    display: table-cell;
    vertical-align: top;
    width: max-content;

    img {
      max-width: 100%;
      width: 200px;
      border-radius: 50%;
    }
}

/* Image Preview Styling */
.image-preview {
    display: none;
    position: absolute;
    border: 1px solid var(--border);
    background: white;
    padding: 5px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.image-preview.show {
    opacity: 1;
}

/* Social Menu */
.social-menu {
    text-align: center;
    margin-top: 24px;
}

.social-menu ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.social-menu li {
    display: flex;
    align-items: center;
}

.social-menu a {
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.social-menu a:hover {
    color: var(--primary);
}

.social-menu i {
    font-size: 1.1rem;
}

/* Name item in sidebar */
.name-item {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    line-height: 1.2;
    color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding-top: 0;
    }

    .sidebar {
        position: relative;
        top: 0;
        width: 100%;
        max-width: 100%;
        height: auto;
        min-width: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .content {
        margin-left: 0;
        width: 100%;
        padding: 16px 20px;
    }

    .content-inner {
        max-width: 100%;
    }

    .top-menu a {
        font-size: 1rem;
    }

    .name-item {
        font-size: 1.1rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    body {
        font-size: 16px;
    }

    .sidebar {
        padding: 15px;
    }

    .content {
        padding: 15px;
    }

    .top-menu {
        padding: 0 16px;
    }

    .top-menu li {
        margin: 0 10px;
    }

    .card {
        padding: 20px;
        border-radius: 10px;
    }

    .sidebar-content li {
        padding-left: 4px;
    }
}
