/* markusbach.com – shared styles */

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/jost-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/jost-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #1e2636;        /* text, headings */
  --muted: #5a6476;      /* secondary text */
  --paper: #ffffff;      /* page */
  --wash: #f3f5f8;       /* alternating sections */
  --line: #dde2ea;       /* rules */
  --link: #24589f;       /* links, buttons */
  --link-hover: #183f75;
  --measure: 40rem;
  --wide: 68rem;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: 400; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.25rem); font-weight: 350; letter-spacing: -0.01em; margin-bottom: 1.25rem; }
h3 { font-size: 1.25rem; font-weight: 500; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand img { height: 2.6rem; width: auto; }
.site-nav ul { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 450; }
.site-nav a:hover { color: var(--link); text-decoration: underline; }
@media (max-width: 640px) {
  .site-header .wrap { flex-wrap: wrap; padding-block: .5rem; }
  .brand img { height: 2rem; }
  .site-nav { width: 100%; overflow-x: auto; }
  .site-nav ul { gap: 1.1rem; font-size: 1rem; }
}

/* Hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 2rem; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6.5vw, 4.75rem); font-weight: 300; letter-spacing: -0.02em; }
.hero .role { font-size: clamp(1.15rem, 2vw, 1.4rem); color: var(--muted); margin: .6rem 0 1.6rem; }
.hero .intro { max-width: 34rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.button {
  display: inline-block; padding: .6rem 1.15rem; border: 1px solid var(--link); border-radius: 3px;
  text-decoration: none; font-weight: 500; font-size: 1rem;
}
.button.primary { background: var(--link); color: #fff; }
.button.primary:hover { background: var(--link-hover); border-color: var(--link-hover); color: #fff; }
.button:not(.primary):hover { background: var(--wash); }

.isodose { width: 100%; max-width: 30rem; justify-self: end; }
.isodose path { fill: none; stroke-width: 1.6; stroke-linejoin: round; }
.isodose text { font-family: inherit; font-size: 13px; font-weight: 500; }
.isodose .target { fill: #c8423b; fill-opacity: .08; stroke: none; }
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .isodose { order: -1; max-width: 15rem; justify-self: start; margin-bottom: .5rem; }
  .isodose text { display: none; }
}

/* Sections */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section.alt { background: var(--wash); }
.prose { max-width: var(--measure); }

/* Work */
.work-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; }
@media (max-width: 860px) { .work-grid { grid-template-columns: 1fr; gap: 2rem; } }
.facts { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.facts li { border: 1px solid var(--line); background: var(--paper); border-radius: 2rem; padding: .2rem .85rem; font-size: 1rem; }
.focus { color: var(--muted); font-size: 1rem; margin-top: 1rem; }

.career h3 { margin-bottom: 1rem; }
.career ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.career li { position: relative; padding: 0 0 1.25rem 1.25rem; }
.career li::before {
  content: ""; position: absolute; left: -6px; top: .55rem; width: 10px; height: 10px;
  border-radius: 50%; background: var(--paper); border: 2px solid var(--link);
}
.career .years { display: block; font-size: .95rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.career .role { display: block; font-weight: 500; }
.career .org { display: block; font-size: 1rem; }
.career .more { margin: .5rem 0 0 1.25rem; font-size: 1rem; }

/* Activities */
.activities { list-style: none; padding: 0; margin: 0; }
.activity {
  display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 1.75rem;
  padding: 1.75rem 0; border-top: 1px solid var(--line);
}
.activity:last-child { border-bottom: 1px solid var(--line); }
.activity img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; background: var(--wash); }
.activity h3 { margin-bottom: .5rem; }
.activity p { max-width: var(--measure); }
.activity p:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  .activity { grid-template-columns: 1fr; gap: 1rem; }
  .activity img { max-width: 24rem; }
}
.history { margin-top: 1.5rem; }
.history summary { cursor: pointer; font-weight: 500; color: var(--link); padding: .5rem 0; }
.history .activity { grid-template-columns: 9rem minmax(0, 1fr); padding: 1.25rem 0; }
@media (max-width: 640px) { .history .activity { grid-template-columns: 1fr; } }

/* Gallery */
.gallery { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; } }
.gallery button { all: unset; display: block; width: 100%; cursor: zoom-in; }
.gallery button:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; background: var(--line); }
.gallery figcaption { font-size: .95rem; color: var(--muted); margin-top: .4rem; }

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 62rem); max-height: 92vh; }
.lightbox::backdrop { background: rgba(14, 18, 27, .88); }
.lightbox figure { margin: 0; }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; }
.lightbox figcaption { color: #fff; text-align: center; margin-top: .6rem; }
.lightbox .controls { display: flex; justify-content: center; gap: .75rem; margin-top: .75rem; }
.lightbox button {
  font: inherit; font-size: 1rem; color: #fff; background: transparent;
  border: 1px solid rgba(255,255,255,.5); border-radius: 3px; padding: .35rem .9rem; cursor: pointer;
}
.lightbox button:hover { background: rgba(255,255,255,.12); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; font-size: 1rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 0; padding: 0; }
.site-footer p { margin: 0; }

/* Legal pages */
.legal { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 350; margin-bottom: 1.5rem; }
.legal h2 { font-size: 1.35rem; font-weight: 500; margin: 2rem 0 .6rem; }
.legal address { font-style: normal; margin-bottom: 1em; }
.legal ul { padding-left: 1.2rem; }
.legal .stand { color: var(--muted); font-size: 1rem; margin-top: 2.5rem; }

/* Language switch */
.site-nav .lang { margin-left: .5rem; padding-left: 1.25rem; border-left: 1px solid var(--line); display: flex; gap: .6rem; }
.site-nav .lang a { color: var(--muted); }
.site-nav .lang a[aria-current="true"] { color: var(--ink); font-weight: 600; text-decoration: none; }
@media (max-width: 640px) { .site-nav .lang { margin-left: auto; padding-left: .9rem; } }
