/* holgerbergmann.de — same look as the 2012 site, rebuilt with current CSS */

@font-face {
    font-family: "Teko";
    /* Teko Light, mapped to the regular weight: closest match to the old condensed headline face */
    src: url("../fonts/teko-latin-300-normal.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Fanwood Text";
    src: url("../fonts/fanwood-text-latin-400-normal.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Fanwood Text";
    src: url("../fonts/fanwood-text-latin-400-italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

:root {
    --ink: #000;
    --paper: #fff;
    --grey: #6f6f6f;            /* hover / secondary; 5:1 on white */
    --bg-top: #f7f7f7;
    --bg-bottom: #bbb;
    --font-display: "Teko", "Agency FB", "Arial Narrow", sans-serif;
    --font-text: "Fanwood Text", Georgia, "Times New Roman", serif;
    --gutter: clamp(1rem, 4vw, 2.5rem);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg-bottom) linear-gradient(var(--bg-top), var(--bg-bottom) 800px) no-repeat;
    color: var(--ink);
    font-family: var(--font-text);
    font-size: 1.0625rem;
    line-height: 1.45;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--grey);
    text-decoration: underline;
}

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

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 10;
    padding: 0.5rem 0.75rem;
    background: var(--ink);
    color: var(--paper);
}

.skip-link:focus {
    top: 1rem;
    color: var(--paper);
}

/* ---------------------------------------------------------------- frame */

.page {
    width: min(80%, 72rem);
    min-height: 34rem;
    margin: 1.25rem auto 2rem;
    padding: 0 var(--gutter) 4rem;
    background: var(--paper);
}

.site-header {
    padding: 0.25rem 0 5.5rem;
}

.site-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.25rem);
    line-height: 1.1;
}

.site-title a:hover {
    text-decoration: none;
}

.layout {
    display: grid;
    grid-template-columns: minmax(11rem, 28%) minmax(0, 1fr);
    column-gap: var(--gutter);
    align-items: start;
}

/* ---------------------------------------------------------------- navigation */

.site-nav {
    font-family: var(--font-display);
    font-size: 1.875rem;
    line-height: 1.15;
    padding-top: 1.1rem;
    padding-left: 1.25rem;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav li {
    margin-bottom: 0.4rem;
}

.site-nav a {
    display: inline-block;
    padding: 0.1rem 0;
}

.site-nav a::before,
.entry__title::before {
    content: "| " / "";
}

.site-nav a:hover {
    text-decoration: none;
}

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

.site-nav__links {
    margin-top: 5rem !important;
    font-size: 0.8em;
}

/* ---------------------------------------------------------------- content */

.site-main:focus {
    outline: none;
}

.entry__title {
    margin: 0 0 1.25rem;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 1.1;
}

.entry__title a:hover {
    text-decoration: none;
}

.prose {
    max-width: 44rem;
}

.prose p {
    margin: 0 0 1.1em;
}

.prose h2,
.prose h3 {
    margin: 1.6em 0 0.3em;
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.15;
}

.prose h2 { font-size: 1.875rem; }
.prose h3 { font-size: 1.5rem; }

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

.prose a {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.prose ul,
.prose ol {
    padding-left: 1.2em;
}

/* the old site separated the short and the long biography with "***" */
.prose hr {
    border: 0;
    margin: 1.4em 0;
}

.prose hr::after {
    content: "***" / "";
}

.more {
    margin-left: 0.4em;
    font-style: italic;
    font-weight: bold;
    color: var(--grey);
    text-decoration: none !important;
}

.more:hover {
    color: var(--ink);
    text-decoration: underline !important;
}

.figure {
    margin: 0 0 2rem;
}

.figure img {
    display: block;
    max-width: min(100%, 31.25rem);
    height: auto;
}

.figure figcaption {
    margin-top: 0.9rem;
}

/* ---------------------------------------------------------------- small screens */

@media (max-width: 48rem) {
    .page {
        width: auto;
        margin: 0.75rem 0.75rem 1.5rem;
    }

    .site-header {
        padding-bottom: 1.5rem;
    }

    .layout {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 2rem;
    }

    .site-nav {
        padding: 0 0 1.5rem;
        border-bottom: 1px solid #ddd;
    }

    .site-nav__pages {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem 1.5rem;
    }

    .site-nav li {
        margin-bottom: 0;
    }

    .site-nav__links {
        margin-top: 0.75rem !important;
    }
}

@media print {
    body { background: none; }
    .page { width: auto; margin: 0; }
    .site-nav, .skip-link { display: none; }
    .layout { display: block; }
}
