/* ==========================================================================
   lukasmu.com — one stylesheet, no framework.
   Tokens first, then the home hero, then the legal pages.
   ========================================================================== */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("../assets/fonts/IBMPlexSans-Variable.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../assets/fonts/JetBrainsMono-Variable.woff2") format("woff2");
}

:root {
  /* Night sky over the Alps, and the yellow jacket in the photograph. */
  --ink: #0f1522;
  --navy: #1b2336;
  --slate: #293042;
  --mist: #c9d3e6;
  --snow: #fff;
  --acc: #f2a93b;
  --acc-ink: #1b1306;

  --paper: #f6f4ef;
  --paper-ink: #1b2336;
  --paper-muted: #4a5468;
  --paper-rule: #dcd7cc;

  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", "Roboto", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;

  /* Type scale. The home page uses only --text-sm and --text-term. */
  --text-sm: 0.875rem;
  --text-md: 1.0625rem;
  --text-lg: 1.375rem;
  --text-xl: clamp(1.5rem, 1.1rem + 1.5vw, 2.25rem);
  --text-term: clamp(0.95rem, 0.85rem + 0.45vw, 1.2rem);

  --gutter: clamp(1rem, 4vw, 3rem);
  --radius: 0.375rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--snow);
  background: var(--ink);
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 10;
  padding: 0.5rem 1rem;
  font: 600 var(--text-sm) / 1.4 var(--mono);
  color: var(--acc-ink);
  background: var(--acc);
  border-radius: var(--radius);
}
.skip:focus { top: 1rem; }

/* Small UI text is always mono at one size. */
.brand,
.langs,
.legal-links,
.page-foot,
.btn { font-family: var(--mono); font-size: var(--text-sm); }

/* ---------- Top bar (shared) --------------------------------------------- */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem var(--gutter);
}

.brand {
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}

.brand span { color: var(--acc); transition: color 0.15s; }

/* Text links in the chrome and the terminal: hover only changes colour and
   underline weight. Nothing moves. */
.legal-links a,
.page-foot a,
.term__log a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s, text-decoration-thickness 0.15s;
}

.legal-links a:hover,
.page-foot a:hover {
  color: var(--acc);
  text-decoration-thickness: 2px;
}

.term__log a:hover { color: var(--snow); text-decoration-thickness: 2px; }

.brand:hover { color: var(--acc); }
.brand:hover span { color: var(--snow); }

.langs {
  display: flex;
  gap: 0.125rem;
  margin: 0;
  padding: 0.2rem;
  list-style: none;
  background: rgb(15 21 34 / 75%);
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: calc(var(--radius) + 0.2rem);
}

.page .langs { background: transparent; border-color: transparent; }

.langs a {
  display: block;
  min-width: 2.5rem;
  padding: 0.3rem 0.55rem;
  text-align: center;
  text-decoration: none;
  color: var(--mist);
  border-radius: var(--radius);
  transition: color 0.2s, background-color 0.2s;
}
.langs a:hover { color: var(--snow); background: rgb(255 255 255 / 12%); }
.langs a[aria-current="true"] { color: var(--snow); background: rgb(255 255 255 / 18%); }

/* ---------- Home hero ---------------------------------------------------- */

.hero {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100vh;
  height: 100svh;
  min-height: 30rem;
  overflow: hidden;
  isolation: isolate;
}

.hero__photo,
.hero__photo img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.hero__photo img {
  object-fit: cover;
  object-position: 12% 20%;
}

/* A vignette keeps the top bar and footer readable on any part of the photo. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgb(15 21 34 / 92%), rgb(15 21 34 / 70%) 3.5rem, rgb(15 21 34 / 0%) 22%),
    linear-gradient(to top, rgb(15 21 34 / 95%), rgb(15 21 34 / 88%) 9rem, rgb(15 21 34 / 0%) 45%);
}

/* The terminal window. Its near-opaque ground guarantees WCAG AA contrast
   whatever the photo shows behind it. Everything inside is mono at one size. */
.term {
  place-self: center end;
  width: min(40rem, calc(100% - 2 * var(--gutter)));
  /* Sit right of the climber, but drift toward the centre on wide screens. */
  margin-right: max(var(--gutter), 38vw - 20rem);
  font-family: var(--mono);
  font-size: var(--text-term);
  line-height: 1.6;
  background: rgb(15 21 34 / 86%);
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 0.625rem;
  box-shadow: 0 24px 60px rgb(0 0 0 / 35%);
  backdrop-filter: blur(10px);
  /* Grow with the session, but never past the space between header and
     footer; the body scrolls instead of the page. */
  display: flex;
  flex-direction: column;
  max-height: calc(100% - 1.5rem);
  min-height: 0;
}

.term__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--mist);
  border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.term__bar i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: rgb(255 255 255 / 22%);
}

.term__bar span { margin-left: auto; margin-right: auto; padding-right: 2.2rem; }

.term__body {
  flex: 0 1 auto;
  min-height: 0;
  padding: 1.25rem 1.5rem 1.5rem;
  overflow: hidden auto;
  overflow-wrap: anywhere;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgb(255 255 255 / 25%) transparent;
}


.term__body p,
.term__body ul { margin: 0; }

.term__body strong { font-weight: 700; color: var(--snow); }

.term__cmd { margin-top: 1rem !important; color: var(--mist); }
.term__body > h1 + .term__cmd { margin-top: 0 !important; }
.term__ps1 { color: var(--acc); }

/* Steps the intro has not typed yet keep their space, so nothing jumps. */
.is-pending { visibility: hidden; }

.term__roles {
  padding: 0;
  list-style: none;
  color: var(--acc);
}

.term__roles li::before { content: "- "; color: var(--mist); }

.term__log > * { margin: 0; }
.term__log .term__dir { color: #8fb4ff; }
.term__log .term__title { margin-top: 0.25rem; font-weight: 700; color: var(--acc); }
.term__log .term__art { color: var(--acc); line-height: 1.2; }
.term__log a { color: var(--acc); }
.term__log .term__out { white-space: pre-wrap; }

.term__line {
  display: flex;
  gap: 0.6ch;
  margin: 1rem -0.5rem 0;
  padding: 0.1rem 0.5rem;
  border-radius: 0.25rem;
  cursor: text;
  transition: background-color 0.15s;
}

.term__line input {
  flex: 1;
  min-width: 0;
  padding: 0;
  font: inherit;
  color: var(--snow);
  caret-color: var(--acc);
  background: transparent;
  border: 0;
  outline: 0;
}

/* Focus shows as a soft highlight of the prompt line (plus the caret)
   rather than a box. */
.term__line:focus-within { background: rgb(255 255 255 / 7%); }

.term__line input::placeholder { color: rgb(201 211 230 / 75%); }

.hero__foot {
  display: flex;
  flex-wrap: wrap-reverse;
  align-items: end;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 1.25rem var(--gutter) 1.5rem;
}

.icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.icons a {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: var(--radius);
  background: rgb(15 21 34 / 55%);
  backdrop-filter: blur(6px);
  transition: transform 0.25s var(--ease), background-color 0.25s, color 0.25s, border-color 0.25s;
}

.icons a:hover {
  color: var(--acc-ink);
  background: var(--acc);
  border-color: var(--acc);
  transform: translateY(-1px);
}

.icons svg { width: 1.15rem; height: 1.15rem; }

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0;
  color: var(--mist);
}



@media (width <= 720px) {
  .hero__photo img { object-position: 18% 0; }
  .term {
    place-self: end center;
    margin: 0 0 1rem;
  }
  .term__body { padding: 1rem 1.1rem 1.25rem; }
  /* On phones the roles wrap as one line, so the photo stays visible. */
  .term__roles li { display: inline; }
  .term__roles li::before { content: none; }
  .term__roles li + li::before { content: " · "; color: var(--mist); }
  .hero__foot {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .icons,
  .legal-links { justify-content: center; }
  .icons a { width: 2.5rem; height: 2.5rem; }
}

/* ---------- Easter egg --------------------------------------------------- */

.snow {
  position: fixed;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- Legal and error pages --------------------------------------- */

.page {
  min-height: 100vh;
  color: var(--paper-ink);
  background: var(--paper);
  color-scheme: light;
}

.page .bar {
  color: var(--snow);
  background: var(--navy);
}

.page__head {
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter) clamp(2rem, 4vw, 3rem);
  color: var(--snow);
  background:
    linear-gradient(rgb(27 35 54 / 85%), rgb(27 35 54 / 96%)),
    url("../assets/images/mountains-960.webp") center 75% / cover;
}

.page__head h1 {
  max-width: 44rem;
  margin: 0 auto;
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
  hyphens: auto;
}

.page__head p {
  max-width: 44rem;
  margin: 0.75rem auto 0;
  color: var(--mist);
}

/* Legal texts exist once per language; the html lang decides which shows.
   Without JS the page stays German. */
[data-locale] { display: none; }

html[lang="de"] [data-locale="de"],
html[lang="en"] [data-locale="en"],
html[lang="nl"] [data-locale="nl"] { display: block; }

.prose {
  max-width: calc(44rem + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) 4rem;
}

.prose h2 {
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.25rem;
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.25;
  border-top: 1px solid var(--paper-rule);
}

.prose h2:first-child,
.prose .note + h2 { margin-top: 0; padding-top: 0; border-top: 0; }

.prose h3 { margin: 1.75rem 0 0.4rem; font-size: var(--text-md); font-weight: 600; }

.prose p,
.prose ul,
.prose address { margin: 0 0 1rem; }

.prose address { font-style: normal; }

.prose a { color: var(--slate); text-decoration-color: var(--acc); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentcolor; }

.prose .note {
  margin-bottom: 2rem;
  padding: 0.9rem 1.1rem;
  color: var(--paper-muted);
  background: #ece8df;
  border-left: 4px solid var(--acc);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.prose .objection {
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid var(--paper-rule);
  border-radius: var(--radius);
}

.prose .objection h3 { margin-top: 0; }

.prose .meta { color: var(--paper-muted); }

.page-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 1.5rem var(--gutter);
  color: var(--mist);
  background: var(--navy);
}

.page-foot nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }


.btn {
  display: inline-block;
  padding: 0.7rem 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--acc-ink);
  text-decoration: none;
  background: var(--acc);
  border: 1px solid var(--acc);
  border-radius: var(--radius);
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .icons a:hover { transform: none; }
}

.prose .btn { color: var(--acc-ink); text-decoration: none; }
