/* =====================================================================
   Personal site — shared styles
   Design: quiet monochrome "gallery" aesthetic. The black & white
   portrait and logo are the only images; everything else is type,
   ink, paper and a single hairline system. One characterful serif
   for the name, a clean sans for reading, a mono for small labels.
   ===================================================================== */

/* ------- Fonts ------- */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ------- Tokens ------- */
:root {
  --ink:       #18171b;   /* near-black text            */
  --ink-soft:  #3a393f;   /* softer body ink            */
  --muted:     #7a7982;   /* captions, secondary        */
  --paper:     #fbfaf8;   /* page background            */
  --paper-2:   #f1efe9;   /* section band               */
  --line:      #e3e1db;   /* hairlines                  */
  --line-ink:  #cbc9c2;   /* stronger hairline          */

  --display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --body:    'Inter', system-ui, -apple-system, sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

  --wrap: 1120px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

/* ------- Reset-ish ------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* Focus visibility (accessibility floor) */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ------- Layout helpers ------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

/* ---------------------------------------------------------------------
   Header / nav
   --------------------------------------------------------------------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}
/* The logo sits inside a dark chip so it reads cleanly whether the PNG
   has a transparent or a solid black background. */
.brand-badge {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--ink);
  display: grid; place-items: center;
  overflow: hidden;
  flex: none;
}
.brand-badge img { width: 100%; height: 100%; object-fit: cover; }
.brand-name {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}
.nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2rem); }
.nav a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--ink-soft);
  position: relative;
  padding-block: 4px;
}
.nav a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
}
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }
.nav .nav-mono { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; }
@media (max-width: 620px) { .nav a:not(.nav-keep) { display: none; } }

/* ---------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------- */
.hero { padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5.5rem); }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.hero-copy { max-width: 34ch; }
.hero-name {
  font-family: var(--display);
  font-weight: 400;
  color: var(--ink);
  font-size: clamp(3.2rem, 9vw, 6.4rem);
  line-height: 0.94;
  letter-spacing: -0.01em;
  margin: 1.1rem 0 0;
}
.hero-name em { font-style: italic; }
.hero-role {
  margin: 1.1rem 0 0;
  font-size: 1.15rem;
  color: var(--ink);
  font-weight: 500;
}
.hero-lede {
  margin: 1.4rem 0 0;
  color: var(--ink-soft);
  max-width: 42ch;
}
.hero-cta { margin-top: 2rem; display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* Portrait */
.portrait {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 380px;
}
.portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.02);
  background: var(--paper-2);
}
.portrait::after {
  /* thin ledger line under the portrait, echoing the file listing */
  content: attr(data-caption);
  display: block;
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--line-ink);
  padding-top: 0.55rem;
}

/* Buttons */
.btn {
  --bg: var(--ink); --fg: var(--paper);
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.7rem 1.15rem;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--ghost { --bg: transparent; --fg: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn .arrow { transition: transform 0.18s ease; }
.btn:hover .arrow { transform: translateX(2px); }

/* ---------------------------------------------------------------------
   Focus areas ("What I do") — a ledger of rows, not a numbered list
   --------------------------------------------------------------------- */
.band { background: var(--paper-2); border-block: 1px solid var(--line); }
.section { padding-block: clamp(3rem, 7vw, 5rem); }
.section-head { max-width: 52ch; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section-head h2 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--ink);
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  line-height: 1.05;
  margin: 0.6rem 0 0;
}

.ledger { border-top: 1px solid var(--line-ink); }
.row {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: clamp(0.75rem, 3vw, 2rem);
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.row-tag { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); padding-top: 0.35rem; }
.row-body h3 {
  font-size: 1.18rem;
  color: var(--ink);
  margin: 0 0 0.3rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.row-body p { margin: 0; color: var(--ink-soft); max-width: 60ch; }

/* ---------------------------------------------------------------------
   Contact
   --------------------------------------------------------------------- */
.contact .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: end;
}
.contact h2 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--ink);
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1;
  margin: 0.6rem 0 0;
}
.contact-mail {
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-ink);
  transition: border-color 0.2s ease;
  overflow-wrap: anywhere;
}
.contact-mail:hover { border-color: var(--ink); }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.links a {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--mono); font-size: 0.85rem;
  text-decoration: none; color: var(--ink-soft);
}
.links a:hover { color: var(--ink); }
.links .dash { color: var(--line-ink); }

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
.site-foot { border-top: 1px solid var(--line); padding-block: 2.5rem; }
.site-foot .wrap {
  display: flex; flex-wrap: wrap; gap: 1rem 2rem;
  align-items: center; justify-content: space-between;
}
.foot-left { display: inline-flex; align-items: center; gap: 0.7rem; }
.foot-meta { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); letter-spacing: 0.06em; }
.foot-nav { display: flex; gap: 1.4rem; }
.foot-nav a { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-soft); text-decoration: none; }
.foot-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------------
   Legal / document pages (Impressum, Datenschutz)
   --------------------------------------------------------------------- */
.doc { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 8vw, 6rem); }
.doc .wrap { max-width: 760px; }
.back {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em;
  color: var(--muted); text-decoration: none; margin-bottom: 2rem;
}
.back:hover { color: var(--ink); }
.doc h1 {
  font-family: var(--display); font-weight: 400; color: var(--ink);
  font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1; margin: 0 0 2rem;
}
.doc h2 {
  font-size: 1.15rem; color: var(--ink); font-weight: 600;
  margin: 2.4rem 0 0.6rem; letter-spacing: -0.005em;
}
.doc h3 { font-size: 1rem; color: var(--ink); font-weight: 600; margin: 1.6rem 0 0.4rem; }
.doc p { margin: 0.5rem 0; color: var(--ink-soft); }
.doc a { color: var(--ink); text-underline-offset: 2px; }
.doc address { font-style: normal; color: var(--ink-soft); line-height: 1.7; }
.doc .fill {
  background: #fff6d6;
  border-bottom: 1px dashed #c9b45a;
  padding: 0 0.15em;
  color: var(--ink);
  font-style: normal;
}
.doc .note {
  margin-top: 2.75rem;
  padding: 1.1rem 1.25rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.92rem;
  color: var(--muted);
}

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .portrait { order: -1; justify-self: start; max-width: 300px; }
  .contact .wrap { grid-template-columns: 1fr; }
  .row { grid-template-columns: 2.6rem 1fr; }
}

/* ---------------------------------------------------------------------
   Intro: the logo fades in centre-screen, half-turns to the left, then
   flies up to its resting place in the header. Enabled only when <html>
   carries .has-intro — added by a tiny inline script on the home page,
   and skipped automatically when reduced motion is requested.
   --------------------------------------------------------------------- */
.has-intro .brand-badge { opacity: 0; }              /* hide real badge until the flyer lands */

.intro-logo {
  position: fixed;
  top: 0; left: 0;
  width: 34px; height: 34px;                          /* matches the header badge */
  border-radius: 9px;
  background: var(--ink);
  display: grid; place-items: center;
  overflow: hidden;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.16);
}
.intro-logo img { width: 100%; height: 100%; object-fit: cover; }

/* Load-in motion (gentle, opt-out friendly) */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); animation: rise 0.7s cubic-bezier(.2,.7,.2,1) forwards; }
  .reveal.d1 { animation-delay: 0.05s; }
  .reveal.d2 { animation-delay: 0.13s; }
  .reveal.d3 { animation-delay: 0.21s; }
  .reveal.d4 { animation-delay: 0.29s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}