/* =================================================================
   Dietsch Consulting – Stylesheet
   Alle Farb-, Schrift- und Maßangaben stehen als Custom Properties
   ganz oben. Wer das Erscheinungsbild anpassen will, ändert nur
   diesen Block.
   ================================================================= */

:root {
  /* Farben */
  --c-text:        #ffffff;
  --c-heading:     #ffffff;
  --c-muted:       #ffffff;
  --c-accent:      #37413a;
  --c-accent-dark: #0d8ec4;
  --c-line:        #e3e7ea;
  --c-bg:          #6BA539;
  --c-bg-soft:     #6BA539;
  --c-footer-bg:   #6BA539;
  --c-footer-text: #b6bcc1;

  /* Schrift */
  --font-body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue",
               Arial, "Noto Sans", sans-serif;

  /* Maße */
  --w-container: 1180px;
  --gap-side:    clamp(1rem, 4vw, 2.5rem);
  --section-y:   clamp(2rem, 5vw, 3.75rem);
  --radius:      3px;
}

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

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

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

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--c-accent);
  text-decoration: none;
  transition: color .18s ease;
}
a:hover, a:focus-visible { color: var(--c-accent-dark); text-decoration: underline; }

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

h1, h2, h3, h4 {
  color: var(--c-heading);
  font-weight: 600;
  line-height: 1.25;
  margin: 2em 0 .6em;
}
h1 { font-size: clamp(1.9rem, 1.35rem + 2.4vw, 3rem); margin-top: 0; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.75rem); }
h3 { font-size: clamp(1.15rem, 1rem + 0.6vw, 1.35rem); }

p { margin: 0 0 1.3em; }

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--c-accent);
  color: #fff;
  padding: .7rem 1.2rem;
}
.skip-link:focus { left: 0; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #6BA539;
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--c-line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
}

.header-brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--c-heading);
  margin-right: auto;
  white-space: nowrap;
}
.header-brand:hover { color: var(--c-accent); text-decoration: none; }

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

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(.9rem, 1.8vw, 1.85rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: block;
  padding: .45rem 0;
  color: var(--c-text);
  font-size: .875rem;
  letter-spacing: .03em;
  border-bottom: 2px solid transparent;
}
.nav-list a:hover,
.nav-list a:focus-visible { color: var(--c-accent); text-decoration: none; }
.nav-list .is-current > a {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
}

/* Menü-Schalter – nur auf schmalen Displays sichtbar.
   Die Checkbox bleibt sichtbar für die Tastatur (nicht display:none),
   damit das Menü auch ohne Maus geöffnet werden kann. */
.nav-button { display: none; }

.nav-toggle {
  position: absolute;
  width: 1px; height: 1px;
  margin: 0;
  opacity: 0;
}
@media (min-width: 981px) { .nav-toggle { display: none; } }
.nav-toggle:focus-visible ~ .nav-button {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}

.nav-bars,
.nav-bars::before,
.nav-bars::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-bars { position: relative; }
.nav-bars::before,
.nav-bars::after { content: ""; position: absolute; left: 0; }
.nav-bars::before { top: -6px; }
.nav-bars::after  { top:  6px; }

/* ---------- Banner und Seitenkopf ------------------------------- */

.page-banner {
  background: var(--c-bg-soft);
  border-bottom: 1px solid var(--c-line);
}
.page-banner .container { padding-block: 0; }
.page-banner img {
  width: 100%;
  aspect-ratio: 3 / 1;                 /* reserviert Platz, verhindert Layoutsprung */
  max-height: clamp(150px, 32vw, 320px);
  object-fit: cover;
  object-position: center;
}

/* Startseite: dort steht das Logo statt eines Fotos im Banner */
.page-banner--logo { background: var(--c-bg); border-bottom: 0; }
.page-banner--logo .container { padding-block: clamp(1.5rem, 4vw, 2.75rem); }
.page-banner--logo img {
  width: auto;
  aspect-ratio: auto;
  max-width: min(100%, 320px);
  max-height: none;
  object-fit: contain;
  margin-inline: auto;
}
.page-banner--logo2 img {
  width: auto;
  aspect-ratio: auto;
  max-width: none;
  max-height: min(60%, 120px);
  object-fit: contain;
  margin-inline: auto;
}

.page-intro {
  padding-block: clamp(1.75rem, 4vw, 3rem) clamp(1rem, 2vw, 1.5rem);
}
.tagline {
  margin: 0 0 .35em;
  color: var(--c-muted);
  font-size: clamp(.95rem, .9rem + .3vw, 1.15rem);
  font-weight: 400;
  letter-spacing: .01em;
}
.page-intro h1 { margin: 0; }

/* ---------- Inhalt ---------------------------------------------- */

.entry {
  padding-bottom: var(--section-y);
  max-width: 62rem;          /* angenehme Zeilenlänge */
}
.entry > :first-child { margin-top: 0; }

.entry ul, .entry ol { margin: 0 0 1.3em; padding-left: 1.4em; }
.entry li { margin-bottom: .4em; }

.entry blockquote {
  margin: 2em 0;
  padding: 1.1rem 0 1.1rem 1.6rem;
  border-left: 3px solid var(--c-accent);
  color: var(--c-heading);
  font-size: clamp(1.02rem, .98rem + .3vw, 1.2rem);
  font-style: italic;
}
.entry blockquote p:last-child { margin-bottom: 0; }
.entry blockquote cite,
.entry blockquote .source {
  display: block;
  margin-top: .7em;
  color: var(--c-muted);
  font-size: .875rem;
  font-style: normal;
}

.entry address {
  font-style: normal;
  line-height: 1.2;
}

/* Zertifikatssiegel links neben dem Text */
.seal {
  float: left;
  width: clamp(88px, 16vw, 120px);
  margin: .2rem 1.4rem .8rem 0;
}
.clearfix::after { content: ""; display: table; clear: both; }

/* E-Mail-Symbol im Fließtext */
.mail-icon {
  display: inline-block;
  width: 1.55em;
  height: auto;
  vertical-align: -.4em;
  margin-left: .15em;
}

/* Aufruf am Ende einer Seite */
.callout {
  margin: 2.5em 0 0;
  padding: 1.2rem 1.4rem;
  background: var(--c-bg-soft);
  border-left: 3px solid var(--c-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- Skill-Tabelle --------------------------------------- */

.skills-table {
  width: 100%;
  margin: 1.5em 0 2em;
  border-collapse: collapse;
  font-size: .95rem;
}
.skills-table th,
.skills-table td {
  padding: .85rem 1rem;
  border: 1px solid var(--c-line);
  text-align: left;
  vertical-align: top;
}
.skills-table th {
  width: 12.5rem;
  background: var(--c-bg-soft);
  color: var(--c-heading);
  font-weight: 600;
}

/* Auf schmalen Displays wird aus jeder Zeile ein eigener Block */
@media (max-width: 760px) {
  .skills-table,
  .skills-table tbody,
  .skills-table tr,
  .skills-table th,
  .skills-table td { display: block; width: auto; }

  .skills-table tr {
    margin-bottom: 1rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .skills-table th,
  .skills-table td { border: 0; }
  .skills-table th { border-bottom: 1px solid var(--c-line); }
}

.codeblock {
  font-family: monospace;
  font-size: 0.9em;
  line-height: 1.1;
}
/* ---------- Fußzeile -------------------------------------------- */

.site-footer {
  margin-top: var(--section-y);
  padding-block: clamp(1.75rem, 4vw, 2.75rem);
  background: var(--c-footer-bg);
  color: var(--c-footer-text);
  font-size: .9rem;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.75rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.footer-nav a { color: #fff; }
.footer-nav a:hover { color: var(--c-accent); }
.copyright { margin: 0; color: var(--c-muted); }

/* ---------- Nach oben ------------------------------------------- */

.to-top {
  position: fixed;
  right: clamp(.75rem, 2vw, 1.5rem);
  bottom: clamp(.75rem, 2vw, 1.5rem);
  z-index: 90;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  background: var(--c-accent);
  color: #fff;
  border-radius: var(--radius);
  font-size: 1.15rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}
.to-top:hover { background: var(--c-accent-dark); color: #fff; text-decoration: none; }

/* =================================================================
   Umbruch auf Tablet und Smartphone
   ================================================================= */

@media (max-width: 980px) {

  .nav-button {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .2rem;
    color: var(--c-heading);
    font-size: .875rem;
    cursor: pointer;
    user-select: none;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: block;
    padding: 0 var(--gap-side);
    background: #fff;
    border-bottom: 1px solid var(--c-line);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .08);

    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height .28s ease, visibility 0s linear .28s;
  }

  .nav-toggle:checked ~ .site-nav {
    max-height: 34rem;
    visibility: visible;
    padding-block: .5rem 1.25rem;
    transition: max-height .28s ease, visibility 0s;
  }

  /* Symbol wird zum Kreuz */
  .nav-toggle:checked ~ .nav-button .nav-bars { background: transparent; }
  .nav-toggle:checked ~ .nav-button .nav-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-button .nav-bars::after  { transform: translateY(-6px) rotate(-45deg); }

  .nav-list { display: block; }
  .nav-list li { border-bottom: 1px solid var(--c-line); }
  .nav-list a {
    padding: .85rem 0;
    font-size: 1rem;
    border-bottom: 0;
  }
  .nav-list .is-current > a { border-bottom: 0; }

}

@media (max-width: 560px) {
  .nav-button-text { display: none; }
  .seal { float: none; margin: 0 0 1rem; }
}

/* Bewegungsreduktion respektieren */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* Druckausgabe */
@media print {
  .site-header, .to-top, .page-banner { display: none; }
  body { color: #000; font-size: 11pt; }
  a { color: #000; text-decoration: underline; }
}
