/* Richard Mertz · Profil
   Fraunces (SIL OFL 1.1) und IBM Plex Mono (SIL OFL 1.1), lokal eingebunden. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/plex-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/plex-mono-medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* Farben ------------------------------------------------------------------ */

:root {
  color-scheme: light dark;
  --paper: #F4F0E8;
  --ink: #1C1B19;
  --muted: #5C574F;
  --rule: #B3AA9A;
  --tick: #5C574F;
  --accent: #A33D24;
  --on-accent: #F4F0E8;

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(1.25rem, 5.5vw, 3.5rem);
  --col: 20rem;          /* linke Spalte ab Tablet */
  --gap: clamp(2.5rem, 6vw, 6rem);
  --ease: cubic-bezier(.2, .7, .1, 1);

  /* Schrägstrich einer Maßkette */
  --slash: linear-gradient(to bottom right,
    transparent calc(50% - .75px), var(--tick) calc(50% - .75px),
    var(--tick) calc(50% + .75px), transparent calc(50% + .75px));
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121211;
    --ink: #EDE8DF;
    --muted: #A39D93;
    --rule: #4A463F;
    --tick: #A39D93;
    --accent: #E3825F;
    --on-accent: #121211;
  }
}

/* Grundlage --------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 380;
  line-height: 1.55;
  font-optical-sizing: auto;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }

a { color: inherit; }

::selection { background: var(--accent); color: var(--on-accent); }

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

.wrap {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px));
}

.icon {
  width: 1.375rem;
  height: 1.375rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
.icon .fill { fill: currentColor; stroke: none; }

/* Kopfbereich ------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1fr);
  column-gap: 1.375rem;
  padding-top: max(clamp(1.75rem, 7vw, 5rem), env(safe-area-inset-top, 0px));
}

.portrait {
  --off: 1.125rem;        /* Abstand der Maßlinien zum Foto */
  position: relative;
  grid-column: 1;
  grid-row: 1;
  padding: 0 var(--off) var(--off) 0;
}
.portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--rule);
}

/* Maßlinien am Foto: Linie, Hilfslinien an den Enden, Schrägstriche */
.dim {
  position: absolute;
  pointer-events: none;
  --t: 12px;
}
.dim-v {
  right: 0;
  top: calc(var(--t) / -2);
  width: var(--t);
  height: calc(100% - var(--off) + var(--t));
  background:
    linear-gradient(var(--rule), var(--rule)) center / 1px calc(100% - var(--t)) no-repeat,
    linear-gradient(var(--rule), var(--rule)) center calc(var(--t) / 2) / 100% 1px no-repeat,
    linear-gradient(var(--rule), var(--rule)) center calc(100% - var(--t) / 2 + 1px) / 100% 1px no-repeat,
    var(--slash) center top / var(--t) var(--t) no-repeat,
    var(--slash) center bottom / var(--t) var(--t) no-repeat;
  transform-origin: top;
}
.dim-h {
  bottom: 0;
  left: calc(var(--t) / -2);
  height: var(--t);
  width: calc(100% - var(--off) + var(--t));
  background:
    linear-gradient(var(--rule), var(--rule)) center / calc(100% - var(--t)) 1px no-repeat,
    linear-gradient(var(--rule), var(--rule)) calc(var(--t) / 2) center / 1px 100% no-repeat,
    linear-gradient(var(--rule), var(--rule)) calc(100% - var(--t) / 2 + 1px) center / 1px 100% no-repeat,
    var(--slash) left center / var(--t) var(--t) no-repeat,
    var(--slash) right center / var(--t) var(--t) no-repeat;
  transform-origin: left;
}

.ident {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  padding-bottom: calc(1.125rem + .1rem);
}

.eyebrow {
  font: 500 .75rem/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .9rem;
}

.name {
  font-size: clamp(2.5rem, 12.4vw, 7rem);
  font-weight: 360;
  line-height: .9;
  letter-spacing: -.012em;
}
.name span { display: block; }

.lead {
  grid-column: 1 / -1;
  margin-top: clamp(1.75rem, 7vw, 2.75rem);
  font-size: clamp(1.3rem, 5.5vw, 2.125rem);
  font-weight: 340;
  line-height: 1.27;
  letter-spacing: -.005em;
  max-width: 30ch;
  text-wrap: pretty;
}

/* Kontaktleiste */
.contact {
  grid-column: 1 / -1;
  margin-top: clamp(1.75rem, 7vw, 2.75rem);
}
.contact ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--rule);
}
.contact li + li { border-left: 1px solid var(--rule); }
.contact a {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  min-height: 5rem;
  padding: 1.05rem .9rem 1rem;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s, color .2s;
}
.contact li:first-child a { padding-left: 0; }
.contact .label {
  font: 500 .75rem/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.contact .detail {
  display: none;
  font: 400 .8125rem/1.3 var(--mono);
  color: var(--muted);
}
.contact a:hover, .contact a:active { color: var(--accent); }

/* Kontakt speichern */
.save {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-top: 1rem;
  min-height: 3.5rem;
  padding: .9rem 1.1rem;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  font: 500 .8125rem/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  border-radius: 1px;
  -webkit-tap-highlight-color: transparent;
  transition: filter .2s;
}
.save .ext {
  margin-left: auto;
  font-weight: 400;
  letter-spacing: .04em;
  text-transform: none;
  opacity: .8;
}
.save:hover { filter: brightness(1.08); }
.save:active { filter: brightness(.94); }

/* Abschnitte -------------------------------------------------------------- */

.section {
  padding-top: clamp(3.5rem, 13vw, 7rem);
}

/* Überschrift als Maßkette: Segment mit Nummer, Segment mit Titel */
.chain {
  position: relative;
  display: flex;
  align-items: flex-end;
  margin-bottom: clamp(1.5rem, 5vw, 2.25rem);
  font: 500 .75rem/1.2 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  view-timeline-name: --chain;
}
.chain .seg {
  position: relative;
  padding: 0 .9rem 15px;
}
.chain .n {
  flex: 0 0 3.25rem;
  padding-inline: 0;
  text-align: center;
  color: var(--accent);
}
.chain .t { flex: 1 1 auto; }
.chain .seg::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 1px;
  background: var(--rule);
  transform-origin: left;
}
.chain .seg::after,
.chain::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 13px;
  height: 13px;
  background:
    linear-gradient(var(--rule), var(--rule)) center / 1px 100% no-repeat,
    var(--slash) center / 11px 11px no-repeat;
}
.chain .seg::after { left: -6px; }
.chain::after { right: -6px; }

.text {
  font-size: clamp(1.0625rem, 4.3vw, 1.25rem);
  line-height: 1.6;
  max-width: 36em;
  text-wrap: pretty;
}

/* Kundenrückmeldung */
.voice {
  font-size: clamp(1.45rem, 6.4vw, 2.5rem);
  font-weight: 320;
  line-height: 1.25;
  letter-spacing: -.008em;
  max-width: 24ch;
  text-wrap: balance;
}
.note {
  margin-top: 1.1rem;
  font: 400 .75rem/1.4 var(--mono);
  letter-spacing: .06em;
  color: var(--muted);
}

/* Stärken */
.traits { counter-reset: trait; }
.traits li {
  counter-increment: trait;
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  column-gap: .5rem;
  padding-block: 1.15rem 1.35rem;
  border-top: 1px solid var(--rule);
}
.traits li:first-child { border-top: 0; padding-top: .25rem; }
.traits li::before {
  content: counter(trait, decimal-leading-zero);
  grid-row: 1 / span 2;
  padding-top: .38rem;
  font: 500 .75rem/1 var(--mono);
  letter-spacing: .08em;
  color: var(--accent);
}
.traits h3 {
  font-size: 1.25rem;
  font-weight: 480;
  line-height: 1.3;
  margin-bottom: .3rem;
}
.traits p { color: var(--muted); max-width: 34em; }

/* Stationen als senkrechte Maßkette */
.track {
  --x: 6px;
  --top: .4rem;
  position: relative;
  padding-left: 1.75rem;
}
.track::before {
  content: "";
  position: absolute;
  left: var(--x);
  top: var(--top);
  bottom: 0;
  width: 1px;
  background: var(--rule);
}
.track > li {
  position: relative;
  padding-bottom: 2.25rem;
}
.track > li:last-child { padding-bottom: 1.25rem; }
.track > li::before,
.track::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  background:
    linear-gradient(var(--rule), var(--rule)) center / 100% 1px no-repeat,
    var(--slash) center / 11px 11px no-repeat;
}
.track > li::before {
  left: calc(-1.75rem + var(--x) - 6px);
  top: calc(var(--top) - 6px);
}
.track::after {
  left: 0;
  bottom: -6px;
}
.when {
  font: 400 .8125rem/1 var(--mono);
  letter-spacing: .04em;
  color: var(--accent);
  margin-bottom: .6rem;
  font-variant-numeric: tabular-nums;
}
.track h3 {
  font-size: 1.25rem;
  font-weight: 480;
  line-height: 1.3;
  text-wrap: balance;
}
.where {
  color: var(--muted);
  margin-top: .15rem;
}
.where + p {
  margin-top: .55rem;
  max-width: 36em;
  text-wrap: pretty;
}

/* Kenntnisse */
.langs {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 2rem;
  font-size: 1.25rem;
  font-weight: 420;
}
.langs span { color: var(--muted); font-weight: 380; }
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: .55rem 1rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font: 400 .875rem/1.4 var(--mono);
}
.skills li::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: .6rem;
  vertical-align: -.02em;
  background: linear-gradient(to bottom right,
    transparent calc(50% - .75px), var(--accent) calc(50% - .75px),
    var(--accent) calc(50% + .75px), transparent calc(50% + .75px));
}

/* Kontaktdaten */
.facts div {
  display: grid;
  grid-template-columns: 5.25rem 1fr;
  gap: .75rem;
  padding-block: .85rem;
  border-top: 1px solid var(--rule);
}
.facts div:first-child { border-top: 0; padding-top: .25rem; }
.facts div:last-child { border-bottom: 1px solid var(--rule); }
.facts dt {
  padding-top: .3rem;
  font: 500 .75rem/1.2 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  text-decoration-color: var(--rule);
  overflow-wrap: break-word;
}
.facts a:hover { color: var(--accent); text-decoration-color: currentColor; }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-top: clamp(3rem, 10vw, 5rem);
  padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px));
  font: 400 .75rem/1.4 var(--mono);
  letter-spacing: .08em;
  color: var(--muted);
}
.foot a {
  color: inherit;
  text-underline-offset: .25em;
  text-decoration-color: var(--rule);
}
.foot a:hover { color: var(--accent); text-decoration-color: currentColor; }

/* Impressum und Datenschutz ----------------------------------------------- */

.legal-head {
  padding-top: max(clamp(1.75rem, 7vw, 4rem), env(safe-area-inset-top, 0px));
}
.back {
  display: inline-block;
  padding-block: .6rem;
  font: 500 .75rem/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}
.back::before { content: "\2190\00a0\00a0"; }
.back:hover { text-decoration: underline; text-underline-offset: .3em; }
.legal-title {
  margin-top: clamp(1.25rem, 5vw, 2.5rem);
  font-size: clamp(2.1rem, 9vw, 4.5rem);
  font-weight: 360;
  line-height: 1;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.legal .section:first-child { padding-top: clamp(2.5rem, 9vw, 4.5rem); }
.legal h3 {
  margin: 2rem 0 .5rem;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.3;
}
.legal h3:first-child { margin-top: 0; }
.legal .body > p { max-width: 38em; text-wrap: pretty; }
.legal .body > p + p { margin-top: .75rem; }
.legal .body > p a {
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  text-decoration-color: var(--rule);
  overflow-wrap: break-word;
}
.legal .body > p a:hover { color: var(--accent); text-decoration-color: currentColor; }
.legal .facts + .note,
.legal .body > p.note { margin-top: 1.5rem; }

/* Schnellkontakt am unteren Rand (nur Handy) ------------------------------ */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 max(.5rem, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(.5rem, env(safe-area-inset-left, 0px));
  background: var(--paper);
  border-top: 1px solid var(--rule);
  transform: translateY(100%);
  visibility: hidden;
  transition: transform .35s var(--ease), visibility 0s linear .35s;
}
.dock.is-shown {
  transform: none;
  visibility: visible;
  transition: transform .35s var(--ease), visibility 0s;
}
.dock a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: .7rem .25rem .65rem;
  min-height: 3.75rem;
  text-decoration: none;
  font: 500 .625rem/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  -webkit-tap-highlight-color: transparent;
}
.dock .dock-save { color: var(--accent); }

/* Tablet und Desktop ------------------------------------------------------ */

@media (min-width: 56rem) {
  .hero {
    grid-template-columns: var(--col) minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr;
    column-gap: var(--gap);
  }
  .portrait { grid-row: 1 / span 4; align-self: start; --off: 1.5rem; }
  .ident { grid-column: 2; padding-bottom: 0; padding-top: 1rem; }
  .eyebrow { margin-bottom: 1.4rem; }
  .lead, .contact { grid-column: 2; }
  .lead { margin-top: 2.25rem; }
  .contact { margin-top: 2.5rem; }
  .contact a { padding: 1.15rem 1.25rem 1.2rem; }
  .save {
    grid-column: 2;
    justify-self: start;
    min-width: 19rem;
  }

  .section {
    display: grid;
    grid-template-columns: var(--col) minmax(0, 1fr);
    column-gap: var(--gap);
  }
  .chain { grid-column: 1 / -1; }
  .body { grid-column: 2; max-width: 44rem; }

  .traits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2.5rem;
  }
  .traits li:nth-last-child(2) { border-bottom: 1px solid var(--rule); }

  .track > li {
    display: grid;
    grid-template-columns: 10.5rem minmax(0, 1fr);
    column-gap: 1.5rem;
  }
  .track > li > * { grid-column: 2; }
  .track > li > .when { grid-column: 1; grid-row: 1 / span 3; padding-top: .45rem; }

  .foot { padding-bottom: 3rem; }
  .dock { display: none; }
}

@media (min-width: 72rem) {
  .contact .detail { display: block; }
}

/* Bewegung ---------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .portrait img { animation: reveal 1.1s var(--ease) both; }
  .dim-v { animation: grow-y .9s .45s var(--ease) both; }
  .dim-h { animation: grow-x .9s .6s var(--ease) both; }
  .eyebrow { animation: rise .8s .15s var(--ease) both; }
  .name span { animation: rise .9s .25s var(--ease) both; }
  .name span + span { animation-delay: .33s; }
  .lead { animation: rise .9s .5s var(--ease) both; }
  .contact, .save { animation: fade .8s .7s var(--ease) both; }

  @supports (animation-timeline: view()) {
    .chain .seg::before {
      animation: grow-x linear both;
      animation-timeline: --chain;
      animation-range: cover 0% cover 18%;
    }
  }
}

@keyframes reveal { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes rise   { from { opacity: 0; transform: translateY(.4em); } }
@keyframes fade   { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .dock, .dock.is-shown { transition: none; }
}
