/* gerlach.dev */

@font-face {
    font-family: "AvenirLTPro";
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    src: url("/fonts/385658_0_0.woff2") format("woff2");
}
@font-face {
    font-family: "AvenirLTPro";
    font-weight: 400;
    font-style: italic;
    font-display: swap;
    src: url("/fonts/385658_1_0.woff2") format("woff2");
}
@font-face {
    font-family: "AvenirLTPro";
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    src: url("/fonts/385658_2_0.woff2") format("woff2");
}
@font-face {
    font-family: "AvenirLTPro";
    font-weight: 600;
    font-style: italic;
    font-display: swap;
    src: url("/fonts/385658_3_0.woff2") format("woff2");
}
@font-face {
    font-family: "BebasNeue";
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    src: url("/fonts/BebasNeue-Regular.ttf") format("truetype");
}

:root {
    /* hover: quick in, slow out */
    --speed-in: 120ms;
    --speed-out: 600ms;
    --ease: cubic-bezier(0.5, 1, 0.89, 1);

    --font-text: "AvenirLTPro", "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-heading: "BebasNeue", "Arial Narrow", "Helvetica Neue", sans-serif; /* the logo font */
}


/* color schemes: one block per theme, picked by the body class (theme-dark, theme-blue, theme-light, …).
   $theme in index.php sets the class and the matching logo file; ?theme=blue etc. overrides it for testing. */

/* blue: white on a blue gradient */
.theme-blue {
    --color-blue: #0085ff;
    --color-bg-start: #1167fc; /*#005dff;*/
    --color-bg-end: #043ee9; /*#002ba9;*/
    --color-text: #fff;
    --color-muted: rgba(255, 255, 255, 0.7);
    --color-faint: rgba(255, 255, 255, 0.45);
    --color-tile: rgba(255, 255, 255, 0.15);
    --color-accent: #002261; /* section-label bar, NEU badge */
    --color-selection-bg: #fff;
    --color-selection-text: var(--color-blue);
    --color-focus: #fff;
}

/* light: the original black on white, blue accents */
.theme-light {
    --color-blue: #2C75FF;
    --color-bg-start: #fff;
    --color-bg-end: #fff;
    --color-text: #111;
    --color-muted: #6c6c6c;
    --color-faint: #bcbcbc;
    --color-tile: #f2f2f2;
    --color-accent: var(--color-blue);
    --color-selection-bg: var(--color-blue);
    --color-selection-text: #fff;
    --color-focus: var(--color-blue);
}

/* dark: white on black with a slight blue tint, blue accents (default) */
:root,
.theme-dark {
    --color-blue: #0085ff;
    --color-bg-start: #0b1020;
    --color-bg-end: #05070c;
    --color-text: #fff;
    --color-muted: rgba(255, 255, 255, 0.65);
    --color-faint: rgba(255, 255, 255, 0.4);
    --color-tile: rgba(255, 255, 255, 0.08);
    --color-accent: var(--color-blue);
    --color-selection-bg: var(--color-blue);
    --color-selection-text: #fff;
    --color-focus: var(--color-blue);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-text);
    line-height: 1.5;
    background: var(--color-bg-end); /* only visible on overscroll */
    color: var(--color-text);
}

/* the gradient lives on a fixed layer, so it spans the viewport, not the document */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(151deg, var(--color-bg-start), var(--color-bg-end));
}

::selection {
    background: var(--color-selection-bg);
    color: var(--color-selection-text);
}

a {
    color: inherit;
    /* underline distance */
    text-decoration-thickness: 0.5px;
    text-underline-offset: 4.5px;

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

.site {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 48px);
}


/* header */

header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

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

header nav {
    display: flex;
    gap: 30px;
    font-size: 18px;
}

header nav a {
    text-decoration: none;
    padding: 25px 0 10px 0;
}

.language-links {
    display: flex;
    gap: 4px;
}

.language-links a {
    color: var(--color-faint);
}
.language-links a.active {
    color: var(--color-text);
    font-weight: 700;
}


/* intro */

.intro {
    margin: clamp(40px, 8vw, 90px) 0 0 0;
    max-width: 620px;
    font-size: clamp(22px, 3.5vw, 32px);
    line-height: 1.35;
    font-weight: 400;
}
.intro strong {
    font-weight: 600;
}


/* section labels */

.section-label {
    margin: clamp(50px, 8vw, 100px) 0 20px 0;
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.section-label::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 21px;
    margin-right: 10px;
    background: var(--color-accent);
}


/* projects: the sticky ones as featured big boxes on top, the rest as a list below */

.projects-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px 24px;
    margin-bottom: 40px;
}

.project-featured-main {
    display: block;
    text-decoration: none;
}

.project-featured-main img {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 1; /* matches 1200x600 og-images */
    object-fit: cover;
    background: var(--color-tile);
    box-shadow: rgba(0, 0, 0, 0.2) 0 5px 10px;
    border-radius: 10px;
    transition: all var(--speed-out) var(--ease);
}

.project-featured-main:hover img {
    transform: scale(1.01);
    transition: all var(--speed-in) var(--ease);
}

.project-featured-main h3 {
    margin: 12px 0 0 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
}

.project-featured-main p {
    margin: 2px 0 0 0;
    font-size: 14px;
    color: var(--color-muted);
}

/* the "Mehr →" link, both tiers */
.project-more {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--color-muted);
    text-decoration: none;
}


/* the rest: a list sorted by newest activity */

.projects {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 40px;
}

/* image left, text right; the "Mehr" link sits at the bottom of the image
   unless the text above pushes it down */
.project {
    max-width: 560px;
    display: grid;
    grid-template-columns: 180px 1fr;
    grid-template-rows: 1fr auto;
    column-gap: 16px;
}

.project-main {
    display: contents;
    text-decoration: none;
}

.project-main img {
    grid-row: 1 / -1;
    align-self: start;
    display: block;
    width: 180px;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    background: var(--color-tile);
    box-shadow: rgba(0, 0, 0, 0.2) 0 5px 10px;
    border-radius: 10px;
    transition: all var(--speed-out) var(--ease);
}

.project-text {
    grid-column: 2;
    padding-top: 4px;
}

.project-main:hover img,
.project-main:focus-visible img {
    transform: scale(1.02);
    transition: all var(--speed-in) var(--ease);
}
/* .project-main is display: contents, so the focus ring has to go on the image */
.project-main:focus-visible img {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
}

.project-title {
    display: block;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.3;
}

.project-tagline {
    display: block;
    font-size: 14px;
    color: var(--color-muted);
}

.project .project-more {
    grid-column: 2;
    align-self: end;
    justify-self: start;
    margin: 4px 0 0 0;
}

.update-line {
    display: block;
    margin: 10px 0 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--color-muted);
}
.update-line strong {
    font-weight: 400;
    color: var(--color-text);
}

.badge-new {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 3px 1px 3px;
    background: var(--color-accent);
    color: var(--color-text);
    font-family: var(--font-heading);
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.06em;
    vertical-align: 2px;
    border-radius: 3px;
}


/* referenzen: client work, like big projects but smaller */

.references {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px 24px;
}

.reference {
    display: block;
    text-decoration: none;
}

.reference > a {
    display: block;
    text-decoration: none;
}

.reference img {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    background: var(--color-tile);
    box-shadow: rgba(0, 0, 0, 0.2) 0 5px 10px;
    border-radius: 10px;
    margin-bottom: 14px;
    transition: all var(--speed-out) var(--ease);
}

.reference:hover img,
.reference:focus-visible img {
    transform: scale(1.02);
    transition: all var(--speed-in) var(--ease);
}

.reference h3 {
    margin: 10px 0 0 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.reference .description {
    margin: 2px 0 0 0;
    font-size: 13px;
    color: var(--color-muted);
}
.reference .description a {
    color: var(--color-text);
    text-underline-offset: 3.5px;

}

.references-blurb {
    margin: 0 0 32px 0;
    max-width: 620px;
    font-size: 15px;
}


/* elsewhere */

.elsewhere {
    margin: 0;
    padding: 0;
    list-style: none;
    max-width: 620px;
}

.elsewhere li {
    margin-bottom: 14px;
    font-size: 15px;
    color: var(--color-muted);
}

.elsewhere a {
    color: var(--color-text);
}


/* about */

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

.portrait {
    flex: 0 0 160px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 12px;
    color: var(--color-muted);
}
.portrait img {
    border-radius: 50%;
}

.about-text {
    max-width: 620px;
    font-size: 15px;
}
.about-text p {
    margin: 0 0 14px 0;
}


/* imprint & privacy, hidden until #imprint-privacy is targeted */

.imprint-privacy {
    display: none;
    max-width: 620px;
    padding-top: 20px;
    font-size: 15px;
}
/* shown via .visible (JS) or :target (no-JS fallback; JS adds html.js to opt out,
   because pushState never clears :target) */
html:not(.js) .imprint-privacy:target,
.imprint-privacy.visible {
    display: block;
}
.imprint-privacy h3 {
    margin: 24px 0 4px 0;
    font-size: 15px;
    font-weight: 600;
}
.imprint-privacy p,
.imprint-privacy ul {
    margin: 0 0 10px 0;
    color: var(--color-muted);

}
.imprint-privacy ul {
    padding: 0;
    margin-left: 1.5em;
}
.imprint-privacy a {
    color: var(--color-text);
}


/* footer */

footer {
    margin-top: clamp(60px, 10vw, 120px);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 13px;
}

footer a {
    color: var(--color-muted);
    text-decoration: none;
}

.legal-links {
    display: flex;
    gap: 20px;
}


/* responsive */

@media (max-width: 900px) {
    .projects-featured {
        grid-template-columns: 1fr;
    }
    .projects {
        grid-template-columns: 1fr;
    }
    .references {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 560px) {
    .references {
        grid-template-columns: 1fr 1fr;
    }
    /* project list stacks: image on top, text below */
    .project {
        max-width: none;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .project-main img {
        grid-row: auto;
        width: 100%;
    }
    .project-text {
        grid-column: 1;
        margin-top: 8px;
    }
    .project .project-more {
        grid-column: 1;
    }
    .about {
        flex-direction: column;
    }
    header nav {
        gap: 16px;
    }
}
