/* krystianschmidt.de — design "L · Mix", dark mono.
   No inline styles anywhere: the CSP only allows this stylesheet. */

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

:root {
  color-scheme: dark;

  --bg: #050607;
  --bg-strip: #080a0b;
  --surface: #0b0e10;
  --accent-bg: #07120f;
  --line: #14191c;
  --border: #1a1f23;
  --border-strong: #262d31;

  --text: #e8ecee;
  --text-2: #c9d0d4;
  --muted: #9ba4aa;
  --dim: #7a848a; /* 5.3:1 on --bg, passes AA for small text */

  --accent: #34f5c5;
  --accent-ink: #04110d;
  --accent-line: #1f4d42;
  --off: #262d31;

  --radius-s: 4px;
  --radius-m: 8px;
  --radius-l: 10px;
  --wrap: 1120px;
  --gutter: 1.5rem;

  --font: "Geist Mono", ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
b, strong { font-weight: 700; }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 8px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-s);
  font-weight: 700;
  text-decoration: none;
  z-index: 10;
}
.skip-link:focus { top: 12px; color: var(--accent-ink); }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- header ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  font-size: 13px;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-nav a:hover { color: var(--accent); }

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

.hero { border-top: 1px solid var(--line); }

.hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 56px;
  padding-top: 88px;
  padding-bottom: 72px;
}

.hero-text {
  flex: 1 1 460px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.eyebrow { font-size: 13px; color: var(--accent); }

.hero h1 {
  font-size: clamp(40px, 5.6vw, 64px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.lead {
  font-size: 17px;
  color: var(--text-2);
  max-width: 30em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 6px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-s);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}
.btn-primary:hover { color: var(--accent-ink); background: #6ff8d6; }

.btn-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  color: var(--text);
}
.btn-icon:hover { border-color: var(--accent); }

.hero-art {
  flex: 0 1 420px;
  min-width: 260px;
  display: flex;
  justify-content: center;
}
.hero-art svg { width: 100%; max-width: 400px; height: auto; }

.glance {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-strip);
}
.glance ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 36px;
  padding-top: 14px;
  padding-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
}
.glance .val { color: var(--text); }

/* ---------- keypad animation ---------- */

@keyframes kp {
  0%, 10% { fill: var(--off); }
  14%, 78% { fill: var(--accent); }
  84%, 100% { fill: var(--off); }
}
@keyframes granted {
  0%, 46% { opacity: 0; }
  52%, 80% { opacity: 1; }
  86%, 100% { opacity: 0; }
}
.kp { fill: var(--off); animation: kp 5s ease-out infinite; }
.kp1 { animation-delay: 0s; }
.kp2 { animation-delay: .35s; }
.kp3 { animation-delay: .7s; }
.kp4 { animation-delay: 1.05s; }
.kp5 { animation-delay: 1.4s; }
.kp6 { animation-delay: 1.75s; }
.granted { opacity: 0; animation: granted 5s infinite; }
.granted text { font-family: var(--font); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .kp, .granted { animation: none; }
  .kp { fill: var(--accent); }
  .granted { opacity: 1; }
}

/* ---------- sections ---------- */

.main {
  display: flex;
  flex-direction: column;
  gap: 96px;
  padding-top: 96px;
  padding-bottom: 56px;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  scroll-margin-top: 24px;
}

.section h2 {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}
.section h2 .num { color: var(--accent); }
.section h2 .sub { color: var(--dim); }

.card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
}
.card .desc { font-size: 13px; color: var(--muted); }
.card--accent { border-top: 2px solid var(--accent); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 12px;
}
.card-grid--built { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.card-grid--built .card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* skills */

.skill-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 16px;
  align-items: start;
}

.skill-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.skill-group h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
}
.tile {
  height: 96px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-2);
  text-align: center;
}

/* homelab */

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  font-size: 13px;
}
.flow > li {
  padding: 16px;
  background: var(--bg-strip);
}
.flow > li + li { border-left: 1px solid var(--line); }
.flow .hop-in { flex: 1 1 140px; color: var(--muted); }
.flow .hop-proxy { flex: 2 1 220px; background: var(--accent-bg); }
.flow .hop-svc { flex: 2 1 200px; }
.flow .hop-proxy .name { color: var(--accent); display: block; }
.flow .hop-proxy .detail { font-size: 12px; color: var(--muted); }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 12px;
  font-size: 13px;
}
.facts > li {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}
.facts .key-accent { color: var(--accent); }
.facts .detail { color: var(--muted); }

/* ---------- footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* ---------- prose pages (datenschutz, 404) ---------- */

.prose {
  max-width: 44em;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 72px;
  padding-bottom: 72px;
}
.prose h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.prose h2 {
  margin: 18px 0 0;
  font-size: 15px;
  color: var(--accent);
  font-weight: 500;
}
.prose p,
.prose li { color: var(--text-2); }
.prose ul { list-style: square; padding-left: 1.3em; }
.prose .meta { font-size: 13px; color: var(--muted); }

.prose .eyebrow { color: var(--accent); }

.prose .notfound-code {
  font-size: clamp(64px, 14vw, 140px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--accent);
}

/* ---------- small screens ---------- */

@media (max-width: 560px) {
  .hero-inner { padding-top: 56px; padding-bottom: 40px; gap: 24px; }
  .hero-art svg { max-width: 220px; }
  .main { gap: 72px; padding-top: 72px; }
  .flow > li + li { border-left: 0; border-top: 1px solid var(--line); }
  .flow > li { flex-basis: 100%; }
}

/* ---------- print: a clean one-page profile ---------- */

@media print {
  :root {
    --bg: #fff; --bg-strip: #fff; --surface: #fff; --accent-bg: #fff;
    --line: #ccc; --border: #ccc; --border-strong: #999;
    --text: #000; --text-2: #222; --muted: #444; --dim: #555;
    --accent: #000; --accent-ink: #fff;
  }
  body { font-size: 11pt; }
  .skip-link, .site-nav, .hero-art, .actions .btn-icon { display: none; }
  .btn-primary { background: none; color: #000; padding: 0; min-height: 0; }
  .btn-primary::after { content: " (contact@krystianschmidt.de)"; font-weight: 400; }
  .hero-inner, .main { padding-top: 24px; padding-bottom: 24px; gap: 24px; }
  .section { break-inside: avoid; }
  .card--accent { border-top-width: 1px; }
}
