:root {
    color-scheme: light;
    --primary: #006b9f;
    --dark: #1e293b;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
}

* {
    box-sizing: border-box;
}

body {
    position: relative;
    isolation: isolate;
    margin: 0;
    background-color: var(--light-bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    z-index: -1;
    inset: 0;
    /* Public-domain portrait by Alfred Edward Chalon, via Wikimedia Commons. */
    background-image: url("ada.jpg");
    background-repeat: repeat;
    background-position: center top;
    background-size: 38px auto;
    filter: grayscale(1);
    opacity: 0.09;
    pointer-events: none;
}

a {
    color: var(--primary);
}

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

.container {
    width: min(100% - 32px, 800px);
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 0;
}

.site-name {
    color: var(--dark);
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
}

.site-header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.language-switch {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.language-switch button {
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--primary);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.language-switch button[aria-pressed="true"] {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
}

.site-header nav a {
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}

.site-header nav a[aria-current="page"] {
    color: var(--dark);
}

.profile-card,
.post-card,
.post {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.04);
}

.profile-card {
    margin-bottom: 34px;
    padding: 30px;
    text-align: center;
}

.profile-avatar {
    width: 130px;
    height: 130px;
    margin-bottom: 15px;
    border: 4px solid var(--primary);
    border-radius: 50%;
    object-fit: cover;
}

.profile-name {
    margin: 0 0 5px;
    color: var(--dark);
    font-size: 1.8rem;
}

.profile-title {
    margin: 0 0 15px;
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.contact-link {
    text-decoration: none;
}

.contact-link:hover {
    text-decoration: underline;
}

.profile-bio {
    max-width: 600px;
    margin: 0 auto 12px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.fictional-employee {
    margin: 0 0 15px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background: #e0f2fe;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
}

.feed {
    scroll-margin-top: 20px;
}

.section-title {
    margin: 0 0 18px;
    color: var(--dark);
    font-size: 1.25rem;
}

.post-card,
.post {
    margin-bottom: 20px;
    padding: 24px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.tags {
    color: var(--primary);
    font-weight: 500;
}

.post-title {
    margin: 0 0 10px;
    color: var(--dark);
    font-size: 1.2rem;
    line-height: 1.35;
}

.post-card > p,
.post-content p {
    margin: 0 0 14px;
}

.read-more {
    display: inline-block;
    margin-top: 2px;
    font-weight: 600;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    margin: 0 0 14px;
    font-weight: 600;
    text-decoration: none;
}

.post-content {
    padding-top: 18px;
    border-top: 1px solid var(--border);
    font-size: 0.97rem;
}

.post-content p:last-child {
    margin-bottom: 0;
}

.site-footer {
    margin: 34px 0 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

.site-footer p {
    margin: 4px 0;
}

.easter-egg-hint {
    margin: 0 0 20px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #e0f2fe;
    color: var(--primary);
    font-weight: 600;
    text-align: center;
}

@media (max-width: 560px) {
    body::before {
        background-size: 105px auto;
        opacity: 0.06;
    }

    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding: 16px 0 20px;
    }

    .site-header nav {
        gap: 14px;
    }

    .language-switch {
        margin-left: 0;
    }

    .profile-card,
    .post-card,
    .post {
        padding: 20px;
    }
}
