/* style.css */

/* 1. Reset & Grundkonfiguration */
* {
  box-sizing: border-box;
}

:root {
  --header-offset: 10px;  /* Fallback */
}

/* Sticky-Footer-Grundlage */
html {
  scroll-padding-top: var(--header-offset);
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: #111827;
  background-color: #f3f4f6;

  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* 2. Sprache / Language Visibility */
.lang-de {
  display: none;
}

.lang-en {
  display: none;
}

/* 3. Hauptlayout: Header, Main, Footer */
header {
  background: linear-gradient(
    to bottom,
    rgba(38, 61, 77, 1),
    rgba(38, 61, 77, 0.97)
  );
  color: #FFFFFF;
  padding: 0.5rem 0.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  z-index: 1000;

  flex: 0 0 auto;
}

/* main füllt den verfügbaren Platz zwischen Header und Footer */
main {
  margin: 1.0rem auto 1.5rem auto;
  max-width: clamp(800px, 80vw, 1200px);
  padding: 0 1.5rem;

  flex: 1 0 auto;
}

footer {
  background: linear-gradient(
    to bottom,
    rgba(38, 61, 77, 1),
    rgba(38, 61, 77, 0.97)
  );
  color: #FFFFFF;
  padding: 0.5rem 0.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);

  flex: 0 0 auto;
}

/* 4. Header-Layout: Brand, Navigation, Sprachumschalter */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 1.0rem;
}

.brand-logo {
  max-height: 38px;
  height: auto;
  width: auto;
}

/* Logo im Footer wird zusätzlich über .footer-logo kontrolliert */
.footer-logo {
  flex-shrink: 0;
  max-height: 21.8px;
}

.brand-right {
  display: flex;
  flex-direction: column;
  gap: 0.0rem;
}

.brand-title {
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.0;
  white-space: nowrap;
}

.brand-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.0rem;
  font-size: 0.9rem;
}

.brand-nav a {
  text-decoration: none;
}

header .brand {
  font-size: 1.3rem;
  font-weight: 600;
}

nav {
  margin-top: 0.5rem;
}

nav a {
  color: #B8C4E0; /* unverändert wie vorher */
  margin-right: 1rem;
  text-decoration: none;
  font-size: 0.95rem;
}

nav a:hover {
  text-decoration: underline;
}

/* Sprachumschalter */
.language-switch {
  float: right;
  font-size: 0.9rem;
}

.lang-switcher button {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
  margin-left: 0.4rem;
}

.lang-switcher button.active {
  color: #f9fafb;
  font-weight: 600;
  text-decoration: underline;
}

/* 5. Seitenbereiche & Komponenten: Hero, Sections, Grid, Cards */
.hero {
  background-color: #e5e7eb;
  padding: 1.0rem;
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
}

.hero h1 {
  margin: 0 0 0.5rem 0;
}

.section {
  margin: 0 0 2rem 0;
}

.section h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.3rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.card {
  background-color: #ffffff;
  border-radius: 0.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid #e5e7eb;
}

/* Timeline (Experience-Seite) */
.timeline {
  border-left: 2px solid #e5e7eb;
  padding-left: 1rem;
  margin-top: 0.5rem;
}

.timeline-item {
  margin-bottom: 1.25rem;
}

.timeline-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
}

.timeline-period {
  margin: 0 0 0.5rem 0;
}

/* Tabellen (OpenPGP & ggf. weitere) */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1rem 0;
  font-size: 0.95rem;
}

th,
td {
  border: 1px solid #e5e7eb;
  padding: 0.4rem 0.6rem;
  text-align: left;
}

th {
  background-color: #f3f4f6;
  font-weight: 600;
}

/* 6. Typografie & Listen */
ul {
  padding-left: 1rem;
}

ul.subpoints {
  padding-left: 1.2rem;
}

.subpoints {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: #111827; /* jetzt normal dunkel */
}

.small {
  font-size: 0.85rem;
  color: #111827; /* kleine Texte ebenfalls gut lesbar */
}

/* 7. Footer-Elemente */
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.footer-text {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1rem;
  min-width: 0;
}

footer a {
  color: #B8C4E0;  /* wieder wie im Header-Menü */
  text-decoration: none;
  margin-right: 1rem;
}

footer a:hover {
  text-decoration: underline;
}

/* 8. Utility-Klassen */
.text-right {
  text-align: right;
}

/* etwas dunkler für bessere Lesbarkeit, Version bleibt separat reguliert */
.text-muted {
  color: #111827;
}

.version {
  font-size: 0.65rem;
  opacity: 0.8;
  user-select: none;
  margin: 0.2rem 0.5rem 0.1rem 0;
  white-space: nowrap;
}

/* 9. Media Queries */
@media (max-width: 600px) {
  .language-switch {
    float: none;
    margin-top: 0.5rem;
  }
}
