/* Centered stage + header + (nav | body) layout */

/* Self-hosted Inter (no external font requests) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    src: url('fonts/inter/Inter-Regular.woff2') format('woff2');
    font-display: swap;
}

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

:root {
    --bg: #f6f6f6;
    --text: #1b1b1b;
    --muted: #444444;

    /* Hairline divider */
    --hair: rgba(0, 0, 0, 0.12);

    /* Spacing (8px rhythm) */
    --s1: 8px;
    --s2: 16px;
    --s3: 24px;
    --s4: 32px;
    --s5: 40px;
    --s6: 48px;
    --s7: 56px;

    /* Accent (CTA) */
    --accent: #111111;
    --accent-ink: #ffffff;

    --stage: 1100px;
    --gutter: clamp(18px, 4vw, 56px);

    --sidebar: 180px;
    --gap: clamp(22px, 4vw, 56px);
    --textcol: 68ch;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 75%;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--bg);
}

strong {
    font-weight: 600;
}

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

.skip-link {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 10px 12px;
    background: #ffffff;
    color: var(--text);
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    transform: translateY(-140%);
    transition: transform 120ms ease;
    z-index: 999;
}

.skip-link:focus,
.skip-link:focus-visible {
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .skip-link {
        transition: none;
    }
}

.stage {
    max-width: var(--stage);
    margin: 0 auto;
    padding: 56px var(--gutter);
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.header a {
    text-decoration: none;
}

.brand {
    display: flex;
    align-items: center;
}

.header-claim {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.2;
    text-align: center;
}

/* --- Avatar styles (quiet clarity) --- */
.avatar {
    display: block;
    border-radius: 14px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    background: #f3f3f3;
}

.avatar--header {
    width: 72px;
    height: 72px;
    object-fit: cover;
    filter: grayscale(30%);
}

.avatar--about {
    width: 220px;
    height: 220px;
    object-fit: cover;
    filter: grayscale(15%);
}

@media (max-width: 640px) {
    .avatar--header {
        width: 56px;
        height: 56px;
    }

    .avatar--about {
        width: 160px;
        height: 160px;
    }
}

/* Layout helpers */
.header-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-row .header-claim {
    text-align: left;
}

.about-row {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

@media (max-width: 800px) {
    .about-row {
        flex-direction: column;
    }
}

/* Primary nav under the header line */
.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    justify-content: center;
}

.site-nav a {
    color: inherit;
    padding: 4px 0;
    width: fit-content;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.site-nav a[aria-current="page"],
.site-nav a.active {
    color: var(--text);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.prose hr,
hr {
    border: 0;
    border-top: 1px solid var(--hair);
}

.rule {
    border: 0;
    border-top: 1px solid var(--hair);
    margin: var(--s3) 0 var(--s5);
}

.layout {
    display: grid;
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
    column-gap: var(--gap);
    align-items: start;
    width: min(100%, calc(var(--sidebar) + var(--gap) + var(--textcol)));
    margin: 0 auto;
}

.sidebar {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: right;
    padding-top: var(--s1);
}

.sidebar-byline {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: var(--s4);
}

.sidebar-byline a {
    text-decoration: none;
}

.sidebar-byline a:hover {
    text-decoration: underline;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.logo-link picture {
    display: block;
}

.logo {
    width: 39px;
    height: auto;
    display: block;
}

.main {
    max-width: var(--textcol);
    margin: 0 auto;
    padding-top: var(--s1);
}

/* Home hero */
.hero {
    margin-top: var(--s2);
    margin-bottom: var(--s6);
    text-align: center;
}

.kicker {
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 13px;
    margin-bottom: var(--s2);
}

.hero h1 {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--s2);
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: var(--s2);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--hair);
    background: transparent;
    text-decoration: none;
}

.btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

.btn.primary {
    background: rgba(0, 0, 0, 0.06);
    font-weight: 600;
}

/* Entry component (Writing/Projects + Home lists) */
.entries {
    margin-top: var(--s3);
}

.entry {
    padding: 14px 0;
    border-top: 1px solid #ddd;
}

.entry:first-child {
    border-top: 0;
    padding-top: 0;
}

.entry-title {
    font-weight: 600;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

.entry-meta {
    font-size: 13px;
    color: #555555;
    margin-top: 6px;
}

.entry-desc {
    margin-top: 10px;
    margin-bottom: 0;
}

h2 {
    font-size: 26px;
    font-weight: 600;
    margin-top: var(--s6);
    margin-bottom: var(--s3);
}

/* Keep nav and body aligned at the top under the header */
.prose > h2:first-child,
.prose > h2:first-of-type,
.prose > h3:first-child,
.prose > h3:first-of-type {
    margin-top: 0;
}

.prose > .section-header:first-child {
    margin-top: 0;
}

h3 {
    font-size: 20px;
    font-weight: 600;
    margin-top: var(--s5);
    margin-bottom: var(--s2);
}

p {
    margin-bottom: var(--s3);
}

.lead {
    font-size: 14.25px;
    line-height: 1.6;
    margin-bottom: var(--s4);
}

/* Home callout card */
.callout {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: var(--s3) 0 var(--s6);
}

.callout p {
    margin-bottom: var(--s2);
}

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

.callout-links {
    color: var(--muted);
}

/* Links (kein „Underline-Teppich“) */
a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
}

a:hover {
    text-decoration-thickness: 2px;
}

/* opt-out for specific links */
a.no-underline,
a.no-underline:hover {
    text-decoration: none;
}

/* external links: no underline (arrow indicates external) */
a.ext,
a.ext:hover {
    text-decoration: none;
}

/* Keep external links distinguishable when keyboard-focused */
a.ext:focus-visible {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

/* external link mark */
a.ext::after {
    content: "↗";
    font-size: 0.78em;
    margin-left: 0.28em;
    opacity: 0.55;
    position: relative;
    top: -0.06em;
}

a.ext:hover::after {
    opacity: 0.85;
}

/* Keyboard focus minimal, ohne Akzentfarbe */
a:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.5);
    outline-offset: 3px;
}

/* Lists */
ul, ol {
    margin-left: var(--s4);
    margin-bottom: var(--s3);
}

/* Home: align project list text with other sections */
.home-projects {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

li {
    margin-bottom: 12px;
}

/* Article lists for writing and projects pages */
.article-list {
    list-style: none;
    margin-left: 0;
}

.article-list li {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #ddd;
}

.article-list li:last-child {
    border-bottom: none;
}

.article-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.article-meta {
    font-size: 14px;
    color: #555555;
    margin-bottom: 10px;
}

.article-description {
    font-size: 17px;
    color: #222222;
    line-height: 1.7;
}

/* Section headers */
.section-header {
    font-size: 16px;
    font-weight: 600;
    margin-top: 50px;
    margin-bottom: 25px;
    color: #555555;
}

.section-header-tight {
    margin-top: 0;
}

/* Footer */
footer {
    margin-top: 80px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    font-size: 14px;
    color: #555555;
}

footer p {
    margin-bottom: 10px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .stage {
        padding: 40px var(--gutter);
    }

    .layout {
        grid-template-columns: 1fr;
        row-gap: 28px;
        width: 100%;
    }

    .lead-row {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .lead-row .lead {
        grid-column: 1;
    }

    .sidebar {
        text-align: left;
        padding-top: 0;
    }

    .main {
        padding-top: 0;
    }

    .sidebar-byline {
        margin-bottom: 12px;
    }

@media (max-width: 520px) {
    .header {
        flex-direction: column;

    .hero {
        text-align: left;
    }

    .cta-row {
        justify-content: flex-start;
    }
