/* ==========================================================================
   Fabian Weiß – Software Engineering
   Handgeschriebenes CSS, keine Abhängigkeiten.

   Responsive-Stufen (Desktop-first):
   - Desktop           ≥ 1200 px   (Basis-Styles)
   - Tablet Landscape  900–1199 px (@media (width < 75rem))
   - Tablet Portrait   600–899 px  (@media (width < 56.25rem))
   - Smartphone        < 600 px    (@media (width < 37.5rem))
   ========================================================================== */

/* Fonts (selbst gehostet, SIL Open Font License – siehe assets/fonts) */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* Design Tokens
   ========================================================================== */
:root {
  color-scheme: light dark;

  --bg: #f6f5f1;
  --bg-alt: #efeee8;
  --surface: #ffffff;
  --ink: #0e1628;
  --ink-soft: #37425a;
  --muted: #5d6679;
  --line: #e0ded6;

  --accent: #155dfc;
  --accent-strong: #0e47c7;
  --accent-soft: #e5edff;
  --on-accent: #ffffff;

  --band-bg: #0e1628;
  --band-ink: #eef2f8;
  --band-muted: #a7b1c5;
  --band-accent: #86abff;
  --band-line: rgb(255 255 255 / 0.12);

  --code-bg: #0b1221;
  --code-line: #1c2740;
  --code-text: #d5dcea;
  --code-muted: #7d89a3;

  --shadow: 0 1px 2px rgb(14 22 40 / 0.04), 0 16px 36px -16px rgb(14 22 40 / 0.16);
  --radius: 14px;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 72rem;
  --gutter: 2rem;
  --header-h: 4rem;
  --section-space: 7rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0e17;
    --bg-alt: #0e131f;
    --surface: #131a2a;
    --ink: #e9edf5;
    --ink-soft: #c1c8d6;
    --muted: #939cb0;
    --line: #232c3f;

    --accent: #5b8cff;
    --accent-strong: #86abff;
    --accent-soft: #17223d;
    --on-accent: #0a0e17;

    --band-bg: #060910;

    --code-bg: #070b13;
    --code-line: #1a2336;

    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 36px -16px rgb(0 0 0 / 0.6);
  }
}

@media (width < 75rem) {
  :root {
    --section-space: 6rem;
  }
}

@media (width < 56.25rem) {
  :root {
    --gutter: 1.5rem;
    --section-space: 5rem;
  }
}

@media (width < 37.5rem) {
  :root {
    --gutter: 1rem;
    --header-h: 3.5rem;
    --section-space: 4rem;
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1 0 auto;
}

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

h1,
h2,
h3 {
  margin: 0 0 0.6em;
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  overflow-wrap: break-word;
  hyphens: auto;
}

h1 {
  font-size: clamp(2.2rem, 1.3rem + 3.4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.9vw, 2.6rem);
}

h3 {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent);
}

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

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hidden {
  display: none !important;
}

.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

section[id] {
  scroll-margin-top: var(--header-h);
}

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

@media (width < 37.5rem) {
  body {
    font-size: 1rem;
  }
  h3 {
    font-size: 1.15rem;
  }
}

/* Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.8rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  background: var(--bg-alt);
  color: var(--ink);
}

.site-nav .nav-cta {
  margin-left: 0.5rem;
  background: var(--ink);
  color: var(--bg);
}

.site-nav .nav-cta:hover {
  background: var(--accent);
  color: var(--on-accent);
}

.back-link {
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

/* Sprachumschalter: zwei Links mit Flagge und Kürzel, ohne JavaScript. Er steht
   neben der Navigation statt darin, damit er auch auf dem Smartphone sichtbar
   bleibt – dort blendet die Navigation alles außer dem Kontakt-Knopf aus. */
.header-end {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.5rem;
}

.lang-switch {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.125rem;
  padding: 0.125rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.lang-opt {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0 0.6rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-opt:hover {
  background: var(--bg-alt);
  color: var(--ink);
}

.lang-opt[aria-current] {
  background: var(--ink);
  color: var(--bg);
}

.lang-flag {
  flex: none;
  width: 1.125rem;
  height: 0.75rem;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.1);
}

/* Tablet Landscape: etwas kompaktere Navigation */
@media (width < 75rem) {
  .site-nav ul {
    gap: 0.125rem;
  }
  .site-nav a {
    padding: 0 0.65rem;
  }
}

/* Tablet Portrait: nur Logo-Marke, Links kompakt */
@media (width < 56.25rem) {
  .brand-name {
    display: none;
  }
  .site-nav ul {
    gap: 0;
  }
  .site-nav a {
    padding: 0 0.5rem;
    font-size: 0.8125rem;
  }
  .site-nav .nav-cta {
    margin-left: 0.35rem;
    padding: 0 0.85rem;
  }
  .lang-opt {
    padding: 0 0.45rem;
    font-size: 0.75rem;
  }
}

/* Smartphone: Name wieder zeigen, nur Kontakt-Button */
@media (width < 37.5rem) {
  .brand-name {
    display: inline;
  }
  .site-nav li:not(:last-child) {
    display: none;
  }
  .site-nav .nav-cta {
    margin-left: 0;
    min-height: 2.25rem;
    font-size: 0.875rem;
  }
  .header-end {
    gap: 0.35rem;
  }
  .lang-opt {
    min-height: 1.875rem;
    gap: 0.25rem;
  }
}

/* Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--accent) 80%, transparent);
}

.btn-primary:hover {
  background: var(--accent-strong);
  color: var(--on-accent);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-1px);
  }
}

/* Labels
   ========================================================================== */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.section-label::before {
  content: "";
  flex: none;
  width: 1.5rem;
  height: 1px;
  background: currentColor;
}

/* Das Motto steht direkt unter der Hauptüberschrift und trägt zusammen mit ihr
   die Positionierung – deshalb deutlich größer als alles Erklärende darunter. */
.hero-motto {
  margin: 0.5rem 0 1.5rem;
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 1rem + 2.4vw, 3.1rem);
  font-weight: 700;
  letter-spacing: 0.005em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--accent);
}

/* Die Berufsbezeichnung ordnet ein, das Motto trägt die Aussage – deshalb
   steht die Überschrift hier kleiner als sonst auf der Seite. */
.hero-copy h1 {
  font-size: clamp(1.6rem, 1.15rem + 1.5vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
}

@media (width < 37.5rem) {
  .section-label {
    font-size: 0.7rem;
  }
}

/* Hero
   ========================================================================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(calc(100svh - var(--header-h)), 56rem);
  padding-block: 6rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 18%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 65% 60% at 75% 45%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse 65% 60% at 75% 45%, #000 15%, transparent 75%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: -14rem;
  right: -12rem;
  width: 42rem;
  height: 42rem;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 20%, transparent), transparent);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 4.5rem;
  align-items: center;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.lead {
  max-width: 38rem;
  font-size: clamp(1.075rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block: 2rem 2.75rem;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  margin: 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  font-size: 0.9375rem;
  color: var(--muted);
}

.hero-facts strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}

.code-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--code-line);
  border-radius: var(--radius);
  background: var(--code-bg);
  box-shadow: 0 40px 70px -30px rgb(8 15 35 / 0.5);
}

.code-card-bar,
.stack-panel-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--code-line);
}

.dot {
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #ff6b6b;
  opacity: 0.85;
}

.dot:nth-child(2) {
  background: #ffc857;
}

.dot:nth-child(3) {
  background: #5ee29b;
}

.code-card-title,
.stack-panel-title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--code-muted);
}

.code-card pre {
  margin: 0;
  padding: 1.25rem 1.4rem 1.5rem;
  overflow-x: auto;
  font: 400 0.875rem/1.7 var(--font-mono);
  color: var(--code-text);
}

.c-method { color: #7fb0ff; font-weight: 700; }
.c-path { color: #ffffff; }
.c-key { color: #9fb4d8; }
.c-str { color: #a5e3b5; }
.c-comment { color: #5f6b85; font-style: italic; }
.c-ok { color: #5ee29b; font-weight: 600; }
.c-bool { color: #f5b86b; }

/* Tablet Landscape: zweispaltig, aber enger */
@media (width < 75rem) {
  .hero {
    padding-block: 4.5rem;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
    gap: 3rem;
  }
  .hero-facts {
    gap: 1rem 2rem;
  }
  .code-card pre {
    padding: 1.1rem 1.15rem 1.25rem;
    font-size: 0.8rem;
  }
}

/* Tablet Portrait: einspaltig, Code-Karte unter dem Text */
@media (width < 56.25rem) {
  .hero {
    min-height: 0;
    padding-block: 4rem 4.5rem;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 3.5rem;
  }
  .lead {
    max-width: 40rem;
  }
  .code-card {
    width: 100%;
    max-width: 36rem;
  }
  .code-card pre {
    font-size: 0.875rem;
  }
}

/* Smartphone */
@media (width < 37.5rem) {
  .hero {
    padding-block: 2.5rem 3.5rem;
  }
  .hero-grid {
    gap: 2.5rem;
  }
  .hero-actions {
    flex-direction: column;
    margin-block: 1.75rem 2.25rem;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .hero-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    font-size: 0.875rem;
  }
  .hero-facts strong {
    font-size: 1.1rem;
  }
  .code-card pre {
    padding: 1rem;
    font-size: 0.72rem;
  }
}

/* Sections
   ========================================================================== */
.section {
  padding-block: var(--section-space);
}

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 44rem;
  margin-bottom: 3.5rem;
}

.section-head p:last-child {
  margin: 0;
  font-size: 1.125rem;
  color: var(--muted);
}

@media (width < 56.25rem) {
  .section-head {
    margin-bottom: 2.5rem;
  }
}

@media (width < 37.5rem) {
  .section-head {
    margin-bottom: 2rem;
  }
  .section-head p:last-child {
    font-size: 1.0625rem;
  }
}

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

.tags li {
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* Über mich
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 5.5rem;
  align-items: center;
}

.about-photo {
  position: relative;
  margin-right: 1.25rem;
}

.about-photo::before {
  content: "";
  position: absolute;
  inset: 1.25rem -1.25rem -1.25rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 24px;
  opacity: 0.45;
}

.about-photo img {
  position: relative;
  width: 100%;
  /* Leichtes Hochformat (4:3 stehend) – wirkt bei Porträts ruhiger als ein Quadrat. */
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.about-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 2rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--line);
}

.about-facts dt {
  margin-bottom: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-facts dd {
  margin: 0;
  font-size: 0.975rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
}

/* Tablet Landscape */
@media (width < 75rem) {
  .about-grid {
    gap: 3.5rem;
  }
}

/* Tablet Portrait: kleines Foto neben dem Text */
@media (width < 56.25rem) {
  .about-grid {
    grid-template-columns: 13rem minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
  }
  .about-photo::before {
    inset: 0.75rem -0.75rem -0.75rem 0.75rem;
    border-radius: 18px;
  }
  .about-photo img {
    border-radius: 18px;
  }
  .about-facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
}

/* Smartphone: Foto über dem Text */
@media (width < 37.5rem) {
  .about-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }
  .about-photo {
    width: min(16rem, calc(100% - 0.75rem));
  }
}

/* Leistungen
   ========================================================================== */
.services {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
  .service-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    box-shadow: var(--shadow);
  }
}

.service-card p {
  font-size: 0.975rem;
  color: var(--muted);
}

.service-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1.25rem;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.service-icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

/* Tablet (Landscape + Portrait): 2 × 2 */
@media (width < 75rem) {
  .services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Smartphone: untereinander */
@media (width < 37.5rem) {
  .services {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
  .service-card {
    padding: 1.5rem;
  }
}

/* Stärken
   ========================================================================== */
.strengths-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 5rem;
  align-items: start;
}

.strengths-head {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  margin-bottom: 0;
}

.strength-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: strength;
}

.strength-list li {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  padding-block: 1.75rem;
  border-top: 1px solid var(--line);
  counter-increment: strength;
}

.strength-list li:first-child {
  padding-top: 0.25rem;
  border-top: 0;
}

.strength-list li:last-child {
  padding-bottom: 0;
}

.strength-list li > * {
  grid-column: 2;
}

.strength-list li::before {
  content: counter(strength, decimal-leading-zero);
  grid-row: 1 / span 2;
  padding-top: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-strong);
}

.strength-list h3 {
  margin-bottom: 0.45em;
}

.strength-list p {
  margin: 0;
  color: var(--muted);
}

.stack-panel {
  margin-top: 4.5rem;
  overflow: hidden;
  border: 1px solid var(--code-line);
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-text);
  box-shadow: 0 40px 70px -40px rgb(8 15 35 / 0.45);
}

.stack-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stack-group {
  padding: 1.75rem;
  border-right: 1px solid var(--code-line);
}

.stack-group:last-child {
  border-right: 0;
}

.stack-group h3 {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--code-muted);
}

.stack-langs {
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack-langs li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 0.45rem;
  border-bottom: 1px dashed var(--code-line);
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 500;
  color: #ffffff;
}

.stack-langs li:last-child {
  border-bottom: 0;
}

.level {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgb(134 171 255 / 0.14);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #9dbbff;
}

.level-muted {
  background: rgb(255 255 255 / 0.06);
  color: #a7b1c5;
}

.tags-dark {
  margin: 0;
  padding: 0;
}

.tags-dark li {
  border-color: var(--code-line);
  background: rgb(255 255 255 / 0.04);
  color: var(--code-text);
}

.stack-meta {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--code-line);
}

.stack-meta div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
}

.stack-meta dt {
  padding-top: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--code-muted);
}

.stack-meta dd {
  margin: 0;
  font-size: 0.9375rem;
}

/* Tablet Landscape */
@media (width < 75rem) {
  .strengths-layout {
    gap: 3.5rem;
  }
  .stack-panel {
    margin-top: 3.5rem;
  }
  .stack-group {
    padding: 1.5rem 1.25rem;
  }
}

/* Tablet Portrait: Überschrift über der Liste, Stack 2 × 2 */
@media (width < 56.25rem) {
  .strengths-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .strengths-head {
    position: static;
    margin-bottom: 2.5rem;
  }
  .stack-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stack-group:nth-child(2n) {
    border-right: 0;
  }
  .stack-group:nth-child(-n + 2) {
    border-bottom: 1px solid var(--code-line);
  }
}

/* Smartphone: alles untereinander */
@media (width < 37.5rem) {
  .strengths-head {
    margin-bottom: 2rem;
  }
  .strength-list li {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    padding-block: 1.5rem;
  }
  .stack-panel {
    margin-top: 2.5rem;
  }
  .stack-groups {
    grid-template-columns: minmax(0, 1fr);
  }
  .stack-group {
    padding: 1.25rem;
    border-right: 0;
    border-bottom: 1px solid var(--code-line);
  }
  .stack-group:last-child {
    border-bottom: 0;
  }
  .stack-meta {
    padding: 1.25rem;
  }
  .stack-meta div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
  }
}

/* Projekte
   ========================================================================== */
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.project-card {
  padding: 2.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-meta .badge {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.project-details {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 0;
}

.project-details > div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}

.project-details dt {
  padding-top: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-details dd {
  margin: 0;
  font-size: 0.975rem;
}

.project-details .tags {
  margin: 0;
  padding: 0;
}

/* Tablet Landscape: zwei Spalten, kompaktere Karten */
@media (width < 75rem) {
  .project-card {
    padding: 1.75rem;
  }
  .project-details > div {
    grid-template-columns: 6.25rem minmax(0, 1fr);
  }
}

/* Tablet Portrait: eine Spalte */
@media (width < 56.25rem) {
  .projects {
    grid-template-columns: minmax(0, 1fr);
  }
  .project-card {
    padding: 2rem;
  }
  .project-details > div {
    grid-template-columns: 7.5rem minmax(0, 1fr);
  }
}

/* Smartphone: Label über dem Inhalt */
@media (width < 37.5rem) {
  .projects {
    gap: 1rem;
  }
  .project-card {
    padding: 1.5rem;
  }
  .project-details > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
  }
}

/* Arbeitsweise
   ========================================================================== */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding-top: 1.5rem;
  border-top: 2px solid var(--line);
  counter-increment: step;
}

.steps li::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 3rem;
  height: 2px;
  background: var(--accent);
}

.steps h3::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent-strong);
}

.steps p {
  margin: 0;
  font-size: 0.975rem;
  color: var(--muted);
}

/* Tablet Portrait: 2 × 2 */
@media (width < 56.25rem) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem 2rem;
  }
}

/* Smartphone: untereinander */
@media (width < 37.5rem) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }
}

/* Kontakt
   ========================================================================== */
.section-contact {
  background: var(--band-bg);
  color: var(--band-muted);
}

.section-contact h2 {
  color: var(--band-ink);
}

.section-contact .section-label {
  color: var(--band-accent);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 5rem;
  align-items: start;
}

.contact-copy > p:not(.section-label):not(.availability) {
  font-size: 1.125rem;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.5rem 0 2rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--band-line);
  border-radius: 999px;
  font-size: 0.9375rem;
  color: var(--band-ink);
}

.availability-dot {
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--band-accent);
  box-shadow: 0 0 0 4px rgb(134 171 255 / 0.2);
}

.contact-links {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-links a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--band-line);
  border-radius: 12px;
  color: var(--band-ink);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.contact-links a:hover {
  border-color: var(--band-accent);
  background: rgb(255 255 255 / 0.04);
  color: var(--band-ink);
}

.contact-links svg {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--band-accent);
}

.contact-links small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--band-muted);
}

.contact-form {
  display: grid;
  gap: 1.1rem;
  padding: 2.5rem;
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink-soft);
  box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.6);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.field label span {
  font-weight: 400;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  font: inherit;
  font-size: 1rem; /* ≥ 16px verhindert Auto-Zoom auf iOS */
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}

.form-note {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.contact-form .btn {
  justify-self: start;
}

/* Tablet Landscape */
@media (width < 75rem) {
  .contact-grid {
    gap: 3rem;
  }
  .contact-form {
    padding: 2rem;
  }
}

/* Tablet Portrait: Text + Kontaktwege nebeneinander, Formular darunter */
@media (width < 56.25rem) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }
  .contact-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Smartphone */
@media (width < 37.5rem) {
  .contact-copy > p:not(.section-label):not(.availability) {
    font-size: 1.0625rem;
  }
  .availability {
    margin-bottom: 1.5rem;
  }
  .contact-links {
    grid-template-columns: minmax(0, 1fr);
  }
  .contact-form {
    padding: 1.5rem;
    border-radius: 14px;
  }
  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .contact-form .btn {
    justify-self: stretch;
  }
}

/* Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--band-line);
  background: var(--band-bg);
  font-size: 0.875rem;
  color: var(--band-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.75rem;
}

.site-footer p {
  margin: 0;
}

.site-footer ul {
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--band-ink);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--band-ink);
  text-decoration: underline;
}

@media (width < 37.5rem) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* Rechtliche Seiten (Impressum, Datenschutz)
   ========================================================================== */
.legal {
  padding-block: clamp(3rem, 8vw, 5.5rem);
}

.legal .container {
  max-width: 46rem;
}

.legal h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
}

.legal h2 {
  margin-top: 2.5rem;
  font-size: 1.35rem;
}

.legal h3 {
  margin-top: 1.75rem;
  font-size: 1.1rem;
}

.legal address {
  font-style: normal;
}

.legal ul {
  padding-left: 1.25rem;
}

.legal li + li {
  margin-top: 0.35rem;
}

.legal .notice {
  margin-block: 1.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
}

.legal .notice h2,
.legal .notice h3 {
  margin-top: 0;
}

.legal .notice p:last-child {
  margin-bottom: 0;
}

.legal .meta {
  margin-top: 3rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Danke-, Fehler- und 404-Seite */
.status-page {
  display: grid;
  place-items: center;
  padding-block: clamp(4rem, 12vw, 8rem);
}

.status-page .container {
  max-width: 40rem;
  text-align: center;
}

.status-icon {
  display: inline-grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.5rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.status-icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.status-page h1 {
  font-size: clamp(1.9rem, 1.5rem + 1.8vw, 2.6rem);
}

.status-page p {
  font-size: 1.0625rem;
}

.status-page ul {
  display: inline-block;
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
  text-align: left;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Kontaktformular: Honeypot-Feld für Bots, für Menschen unsichtbar */
.form-extra {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form {
  position: relative;
}

.contact-form .btn:disabled {
  cursor: progress;
  opacity: 0.7;
}
