/* ==========================================================================
   alexander.kune.de — Stylesheet
   Keine externen Ressourcen: keine Web-Fonts, keine Frameworks, kein Tracking.
   ========================================================================== */

/* --- Design-Tokens: Hell (Standard) ------------------------------------- */

:root {
  --bg:            #fbfaf8;
  --bg-alt:        #f3f1ed;
  --surface:       #ffffff;
  --surface-2:     #f7f5f2;
  --border:        #e2ded7;
  --border-strong: #cec8be;
  --text:          #1a1d21;
  --text-muted:    #5d6570;
  --accent:        #0d5c63;
  --accent-hover:  #0a464c;
  --accent-soft:   #e3f0f0;
  --accent-text:   #ffffff;
  --shadow:        0 1px 2px rgba(26, 29, 33, .04), 0 8px 24px rgba(26, 29, 33, .06);
  --shadow-lift:   0 2px 4px rgba(26, 29, 33, .05), 0 14px 36px rgba(26, 29, 33, .10);

  --radius:    14px;
  --radius-sm: 9px;
  --maxw:      1120px;
  --gutter:    clamp(1.25rem, 5vw, 3rem);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;

  color-scheme: light;
}

/* --- Design-Tokens: Dunkel ---------------------------------------------- */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #101315;
    --bg-alt:        #15191c;
    --surface:       #171b1f;
    --surface-2:     #1d2226;
    --border:        #2a3036;
    --border-strong: #3b434a;
    --text:          #e9ebed;
    --text-muted:    #9aa4ae;
    --accent:        #5fcfc6;
    --accent-hover:  #85ded6;
    --accent-soft:   #17302f;
    --accent-text:   #08211f;
    --shadow:        0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .32);
    --shadow-lift:   0 2px 4px rgba(0, 0, 0, .34), 0 14px 36px rgba(0, 0, 0, .44);

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg:            #101315;
  --bg-alt:        #15191c;
  --surface:       #171b1f;
  --surface-2:     #1d2226;
  --border:        #2a3036;
  --border-strong: #3b434a;
  --text:          #e9ebed;
  --text-muted:    #9aa4ae;
  --accent:        #5fcfc6;
  --accent-hover:  #85ded6;
  --accent-soft:   #17302f;
  --accent-text:   #08211f;
  --shadow:        0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .32);
  --shadow-lift:   0 2px 4px rgba(0, 0, 0, .34), 0 14px 36px rgba(0, 0, 0, .44);

  color-scheme: dark;
}

/* --- Grundlagen ---------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-underline-offset: .18em;
}
a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }

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

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.2;
  letter-spacing: -.018em;
  font-weight: 650;
  text-wrap: balance;
}

p { margin: 0 0 1rem; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

ul { margin: 0; padding: 0; list-style: none; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: .85rem 1.25rem;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- Kopfzeile ----------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--border);
}

@supports (backdrop-filter: blur(1px)) {
  .site-header { backdrop-filter: saturate(1.5) blur(12px); }
}

.site-header > .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  margin-right: auto;
  color: var(--text);
  text-decoration: none;
  padding: .35rem 0;
}
.brand:hover { color: var(--text); }
.brand strong { font-size: 1.02rem; font-weight: 650; letter-spacing: -.01em; }
.brand span {
  font-size: .715rem;
  color: var(--text-muted);
  letter-spacing: .075em;
  text-transform: uppercase;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.site-nav a {
  display: block;
  padding: .6rem .7rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .92rem;
  font-weight: 550;
  text-decoration: none;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }

.header-tools {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding-left: .3rem;
  border-left: 1px solid var(--border);
}

.lang-switch,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: .5rem .7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  font: inherit;
  font-size: .82rem;
  font-weight: 650;
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
}
.lang-switch:hover,
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-dark { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-dark { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-light { display: none; }
}

/* Navigation auf schmalen Viewports: horizontal scrollbar statt Burger-Menü.
   Die Kopfzeile klebt oben, darf also nur zwei Zeilen hoch werden. Kippt die
   dritte Zeile hinzu, verdeckt sie beim Sprung auf einen Anker die Überschrift. */
@media (max-width: 860px) {
  html { scroll-padding-top: 9rem; }
  .site-header > .container {
    flex-wrap: wrap;
    min-height: 0;
    gap: .45rem 1rem;
    padding-block: .45rem;
  }
  /* Die Trennlinie sitzt bei umgebrochener Kopfzeile zwischen Marke und
     Schaltflächen und wirkt dort wie ein Versehen. */
  .header-tools { border-left: 0; padding-left: 0; }
  .brand { margin-right: auto; }
  .site-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter);
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav ul { gap: .1rem; padding-bottom: .15rem; }
  .site-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    white-space: nowrap;
    padding: .5rem .7rem;
  }
}

/* Auf Telefonen ist der Markenuntertitel breiter als der verbleibende Platz. Er
   drängt EN- und Farbschema-Schalter in eine dritte Zeile und treibt die klebende
   Kopfzeile auf ein Viertel der Bildschirmhöhe. Die Angabe steht ohnehin im
   Impressum und im Untertitel des Hero-Bereichs. */
@media (max-width: 560px) {
  .brand span { display: none; }
}

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

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3rem); }

/* Ab mittlerer Breite steht die Überschrift links, der Einleitungstext rechts
   daneben. Sonst endet der auf 62ch begrenzte Textblock deutlich vor dem
   darunterliegenden Raster und lässt rechts eine sichtbare Lücke. */
@media (min-width: 950px) {
  .section-head {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    column-gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
  }
  .section-head > .eyebrow { grid-column: 1; grid-row: 1; }
  .section-head > h2 { grid-column: 1; grid-row: 2; margin-bottom: 0; }
  .section-head > p { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
}

.eyebrow {
  display: block;
  margin-bottom: .7rem;
  color: var(--accent);
  font-size: .765rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.section-head p {
  color: var(--text-muted);
  font-size: 1.06rem;
  margin-bottom: 0;
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
  padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 7vw, 5rem);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.3rem, 6vw, 3.6rem);
  letter-spacing: -.032em;
  margin-bottom: .3rem;
}

.hero-role {
  margin-bottom: 1.4rem;
  color: var(--text-muted);
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  font-weight: 550;
}

.hero-lead {
  max-width: 56ch;
  font-size: clamp(1.02rem, 1.7vw, 1.14rem);
  color: var(--text);
}

.hero-portrait {
  width: clamp(150px, 20vw, 200px);
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface);
  box-shadow: var(--shadow-lift);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .7rem 1.3rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn--primary {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: var(--shadow);
}
.btn--primary:hover { background: var(--accent-hover); color: var(--accent-text); }
.btn--ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn svg { width: 17px; height: 17px; flex: none; }

/* Eckdaten unter dem Hero. Bewusst als ruhige Textzeile gesetzt und nicht als
   Kachelreihe mit übergroßen Zahlen, wie sie auf Produkt-Landingpages üblich ist. */
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.75rem;
  margin-top: clamp(2.25rem, 4.5vw, 3rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .93rem;
}

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { order: -1; width: 128px; }
}

/* --- Karten (Leistungen) -------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(285px, 100%), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.card {
  padding: clamp(1.4rem, 2.5vw, 1.85rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: var(--border-strong);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 1rem;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}
.card-icon svg { width: 21px; height: 21px; }

.card h3 { font-size: 1.09rem; margin-bottom: .45rem; }
.card p { color: var(--text-muted); font-size: .95rem; margin-bottom: 0; }

/* --- Fähigkeitenprofil ---------------------------------------------------- */

.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(1.35rem, 2.5vw, 2rem);
}

.skill-group {
  padding-top: 1.15rem;
  border-top: 2px solid var(--accent);
}

.skill-group h3 {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .85rem;
}

.tags { display: flex; flex-wrap: wrap; gap: .4rem; }

.tags li {
  padding: .32rem .68rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .845rem;
  color: var(--text);
  line-height: 1.5;
}

.section--alt .tags li { background: var(--surface); }

/* --- Branchen ------------------------------------------------------------- */

.sectors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.sectors > li {
  display: flex;
  gap: 1rem;
  padding: clamp(1.3rem, 2.4vw, 1.75rem);
  background: var(--bg);
}

/* Hinweis für spätere Änderungen: Die Trennlinien dieses Rasters entstehen durch
   den durchscheinenden Container-Hintergrund. Eine unbesetzte Zelle wird deshalb
   als graue Restfläche sichtbar — anders als bei den übrigen Rastern der Seite.
   Die Zahl der Einträge sollte daher bei sechs bleiben: Das geht bei einer, zwei
   und drei Spalten glatt auf. Bei einer abweichenden Zahl muss der letzte Eintrag
   die Schlusszeile füllen (`grid-column: 1 / -1`). */

.sector-icon {
  flex: none;
  color: var(--accent);
  margin-top: .1rem;
}
.sector-icon svg { width: 22px; height: 22px; }

.sectors h3 { font-size: 1.02rem; margin-bottom: .3rem; }
.sectors p { color: var(--text-muted); font-size: .925rem; margin-bottom: 0; }

/* --- Arbeitsweise --------------------------------------------------------- */

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
  counter-reset: principle;
}

.principles > li {
  position: relative;
  padding-left: 3.1rem;
  counter-increment: principle;
}

.principles > li::before {
  content: counter(principle, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: -.1rem;
  font-family: var(--font-mono);
  font-size: .92rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.principles h3 { font-size: 1.01rem; margin-bottom: .3rem; }
.principles p { color: var(--text-muted); font-size: .93rem; margin-bottom: 0; }

/* Bei sieben Einträgen bleibt der letzte allein in der Schlusszeile stehen.
   Über zwei Spalten gesetzt wirkt er als bewusster Abschluss statt als Rest. */
@media (min-width: 950px) {
  .principles > li:last-child:nth-child(3n + 1) { grid-column: span 2; }
}

/* --- Profil (Definitionsliste) -------------------------------------------- */

/* Zweispaltig: Bei vier Einträgen ergäbe ein dreispaltiges Raster 3 + 1 und
   ließe den letzten Eintrag mit zwei leeren Spalten daneben stehen. */
.profile-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem) clamp(2rem, 5vw, 4rem);
  margin: 0;
}

.profile-list dt {
  margin-bottom: .4rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
  font-size: .785rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-list dd { margin: 0; font-size: .96rem; }
.profile-list dd + dd { margin-top: .5rem; }
.profile-list .muted { color: var(--text-muted); font-size: .9rem; }

/* --- Kontakt -------------------------------------------------------------- */

.contact-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(1.75rem, 4vw, 3rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-item h3 {
  font-size: .785rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .45rem;
}

.contact-item p { font-size: 1.02rem; font-weight: 550; }

/* Die beiden direkten Kontaktverweise sind eigenständige Ziele und daher
   auf mindestens 44 px Höhe gebracht. Der Verweis auf den PGP-Schlüssel
   steht innerhalb eines Fließtextes und bleibt bewusst inline. */
.contact-item > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1.02rem;
  font-weight: 550;
}
.contact-item .muted { display: block; margin-top: .2rem; color: var(--text-muted); font-size: .875rem; font-weight: 400; }
.contact-item code { font-family: var(--font-mono); font-size: .95rem; }

/* PGP steht unter der Karte statt darin: für die meisten Anfragenden ist der
   Schlüssel unwichtig und nähme sonst ein Drittel der Kontaktfläche ein. */
.contact-note {
  margin-top: 1.15rem;
  padding-left: .15rem;
  color: var(--text-muted);
  font-size: .89rem;
}
.contact-note code { font-family: var(--font-mono); font-size: .93rem; }

/* --- Fußzeile ------------------------------------------------------------- */

.site-footer {
  padding-block: 2.5rem 3rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .89rem;
}

.site-footer > .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1.25rem;
  margin-left: auto;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--accent); text-decoration: underline; }

/* --- Rechtstexte (Impressum, Datenschutz) --------------------------------- */

.legal { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.legal .container { max-width: 720px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 1.75rem; }
.legal h2 {
  font-size: 1.12rem;
  margin-top: 2.4rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.legal address { font-style: normal; margin-bottom: 1rem; line-height: 1.8; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 0 0 1rem; }
.legal dt { color: var(--text-muted); }
.legal dd { margin: 0; }
.legal p { color: var(--text); }
.legal .back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
}
.legal .back-link:hover { text-decoration: underline; }

@media (max-width: 520px) {
  .legal dl { grid-template-columns: 1fr; gap: 0 0; }
  .legal dt { margin-top: .6rem; }
}

/* --- Bewegungsreduktion ---------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .card:hover { transform: none; }
}

/* --- Druck ---------------------------------------------------------------- */

@media print {
  .site-header, .site-footer, .actions, .theme-toggle, .lang-switch, .skip-link { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section { padding-block: 1.5rem; break-inside: avoid; }
  /* Die wechselnden Abschnittshintergründe ergäben graue Bänder auf Papier. */
  .section--alt { background: none; border: 0; }
  .card, .contact-card, .sectors > li { box-shadow: none; border: 1px solid #ccc; }
  a { color: #000; text-decoration: underline; }
}
