/* ==========================================================================
   Grundlegende Variablen und Reset
   ========================================================================== */
:root {
  --text: #222;
  --bg: #fff;
  --accent: #1a5f7a;
  --border: #ddd;
  --muted: #666;
}

* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
header {
  background: #f8f9fa;
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;

}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.3px;
}

.brand:hover {
  text-decoration: underline;
}

.menu {
  display: none;
  /* Wird erst auf kleinen Bildschirmen eingeblendet */
  border: 1px solid var(--border);
  background: transparent;
  padding: 0.5rem 0.9rem;
  font-size: 0.95rem;
  color: var(--accent);
  border-radius: 4px;
  cursor: pointer;
}

nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

nav a {
  margin-right: 1.2rem;
  text-decoration: none;
  color: var(--accent);
  font-weight: 500;
  display: inline-block;
}

nav a:hover {
  text-decoration: underline;
}

.has-nav-tooltip {
  position: relative;
}

.nav-tooltip {
  position: absolute;
  z-index: 10;
  top: 100%;
  left: 0;
  padding: .4rem .65rem;
  border: 1px solid var(--border);
  border-radius: .35rem;
  background: var(--bg);
  color: var(--accent);
  font-size: .875rem;
  font-weight: 500;
  white-space: nowrap;
  visibility: hidden;
}

.has-nav-tooltip:hover .nav-tooltip,
.has-nav-tooltip:focus-visible .nav-tooltip {
  visibility: visible;
}

/* ==========================================================================
   Allgemeine Elemente
   ========================================================================== */
main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

h1,
h2 {
  color: var(--accent);
}

footer {
  text-align: center;
  line-height: 1.7;
  margin: 3rem auto 1rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

footer a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

footer a:hover,
footer a:focus-visible {
  text-decoration-thickness: 2px;
}

.footer-links {
  margin: 0.4rem 0;
}

.footer-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.6rem;
}

.placeholder {
  background: #f5f5f5;
  border-left: 3px solid var(--accent);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  color: var(--muted);
}

.footer-links a {
  font-weight: 700;
}


/* ==========================================================================
   Header Sequential Pop Animation
   (wird über die Klasse .played gesteuert, die per JavaScript gesetzt wird)
   ========================================================================== */
header nav a {
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

header.played nav a {
  opacity: 1;
  transform: scale(1);
}

/* Gestaffelte Delays für die einzelnen Menüpunkte */
header.played nav a:nth-child(1) {
  transition-delay: 0.08s;
}

header.played nav a:nth-child(2) {
  transition-delay: 0.18s;
}

header.played nav a:nth-child(3) {
  transition-delay: 0.28s;
}

header.played nav a:nth-child(4) {
  transition-delay: 0.38s;
}

header.played nav a:nth-child(5) {
  transition-delay: 0.48s;
}

header.played nav a:nth-child(6) {
  transition-delay: 0.58s;
}

header.played nav a:nth-child(7) {
  transition-delay: 0.68s;
}

/* Aktive Seite im Header */
header nav a.active {
  font-weight: 700;
  text-decoration: underline;
  transform: scale(1.05);
}

header.played nav a.active {
  transform: scale(1.05);
}

/* ==========================================================================
   Startseite: Portrait + Intro-Text
   ========================================================================== */
.intro {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.portrait {
  width: 220px;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.intro-text {
  flex: 1;
  min-width: 260px;
}

body.played .portrait {
  opacity: 1;
  transform: scale(1);
  transition-delay: 0.65s;
}

/* Name Animation (nach dem Foto) */
.intro-text h1 {
  opacity: 0.1;
  transition: opacity 2s ease-out;
}

body.played .intro-text h1 {
  opacity: 1;
  transition-delay: 1.4s;
}

/* ==========================================================================
   Activities / Roles (Current & Former)
   ========================================================================== */
.personal-note {
  font-style: italic;
  color: var(--muted);
  margin-bottom: 1.8rem;
}

.roles {
  list-style: none;
  /* Keine Standard-Bullets */
  padding: 0;
  margin: 0 0 2.2rem 0;
}

.roles li {
  margin-bottom: 0.8rem;
  padding: 0.9rem 1rem;
  background: #f8f9fa;
  /* Leichter Hintergrund für Current Activities */
  border-radius: 6px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.9rem;
  text-align: start;
  line-height: 1.45;
}

/* Etwas anderer Hintergrund für Former Activities */
.roles.former li {
  background: #f4f5f6;
}

.role-logo {
  display: block;
  box-sizing: border-box;
  width: 83.2px;
  height: 62.4px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  padding: 3px;
  background: #fff;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover nur, wenn das Logo in einem Link steckt */
a .role-logo:hover {
  border-color: var(--accent);
  transform: scale(1.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.period {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.roles .period {
  white-space: normal;
}

/* Etwas mehr Abstand vor dem nächsten Abschnitt (Former Activities) */
.roles+h2 {
  margin-top: 2.5rem;
}

h2 {
  font-size: 1.25rem;
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
}

/* ==========================================================================
   Responsive Design (Mobile / schmale Bildschirme)
   ========================================================================== */
@media (max-width: 900px) {

  /* Header wird zum Hamburger-Menü */
  header {
    padding: 0.9rem 1rem;
  }

  .menu {
    display: block;
  }

  nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border);
    padding-top: 0.5rem;
  }

  nav.open {
    display: flex;
  }

  nav a {
    margin-right: 0;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #eee;
  }

  nav a:last-child {
    border-bottom: none;
  }

  /* Intro auf dem Handy untereinander */
  .intro {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .portrait {
    width: 180px;
  }

  /* Activities auf dem Handy etwas großzügiger */
  .roles li {
    padding: 1rem 0.9rem;
    margin-bottom: 0.9rem;
  }
}


/* ===== Dropdown für Simulations ===== */
nav li {
  position: relative;
}

nav .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 100;
  padding: 0.4rem 0;
}

nav li:hover>.submenu,
nav li:focus-within>.submenu {
  display: block;
}

nav .submenu a {
  display: block;
  padding: 0.6rem 1rem;
  margin: 0;
  white-space: nowrap;
  color: var(--accent);
  text-decoration: none;
}

nav .submenu a:hover {
  background: #f8f9fa;
  text-decoration: none;
}

/* Auf dem Handy: Untermenü untereinander, kein Hover */
@media (max-width: 900px) {
  nav .submenu {
    position: static;
    display: none;
    border: none;
    box-shadow: none;
    background: transparent;
    padding-left: 1rem;
  }

  nav li.open>.submenu,
  nav .submenu.open {
    display: block;
  }

  nav .submenu a {
    padding: 0.5rem 0.5rem;
    border-bottom: 1px solid #eee;
  }
}


/* ===== Dropdown für Simulations ===== */
.nav-item {
  position: relative;
  display: inline-block;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 100;
  padding: 0.4rem 0;
}

.nav-item:hover>.submenu,
.nav-item:focus-within>.submenu {
  display: block;
}

.submenu a {
  display: block;
  padding: 0.6rem 1rem;
  margin: 0;
  white-space: nowrap;
  color: var(--accent);
  text-decoration: none;
}

.submenu a:hover {
  background: #f8f9fa;
}

/* Mobile */
@media (max-width: 900px) {
  .nav-item {
    display: block;
    width: 100%;
  }

  .submenu {
    position: static;
    display: none;
    border: none;
    box-shadow: none;
    background: transparent;
    padding-left: 1rem;
  }

  .nav-item.open>.submenu,
  nav.open .submenu {
    display: block;
  }
}

/* Industry pages */
.lang-switch {
  margin: 0.2rem 0 1.4rem;
}

.lang-block {
  margin: 2rem 0 2.4rem;
  padding-top: 0.2rem;
}

.lang-block h2 {
  margin-top: 0;
}

blockquote.quote {
  margin: 1.2rem 0;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--accent);
  background: #f8f9fa;
  color: var(--text);
}

.quote-source {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Industry: Foto oben rechts, Text läuft darum. Auf schmalen Screens unter dem Titel. */
.visit-layout::after {
  content: "";
  display: block;
  clear: both;
}

.visit-layout h1 {
  margin-top: 0;
}

.visit-photo {
  float: right;
  width: min(340px, 42%);
  margin: 0 0 0.6rem 1.75rem;
}

.visit-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.visit-photo figcaption {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.visit-layout .lang-block {
  margin-top: 0;
}

.setup-photo {
  clear: both;
  margin: 1.2rem 0 1.4rem;
}

.setup-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.setup-photo figcaption {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.setup-photo figcaption span {
  display: block;
}

.setup-photo figcaption span + span {
  margin-top: 0.2rem;
}

@media (max-width: 700px) {
  .visit-layout {
    display: flex;
    flex-direction: column;
  }

  .visit-layout h1 {
    order: 1;
  }

  .visit-layout .personal-note {
    order: 2;
    margin-bottom: 0.9rem;
  }

  .visit-photo {
    order: 3;
    float: none;
    width: 100%;
    margin: 0 0 0.4rem;
  }

  .visit-layout .lang-block {
    order: 4;
    margin-top: 1.2rem;
  }
}

/* Simulations: getrennte Balken */
.sim-list {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sim-list a,
.sim-list .sim-pending {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1.1rem;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid var(--accent);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}

.sim-list a:hover {
  background: #f3f6f8;
}

.sim-list .sim-pending {
  border-left-color: var(--border);
  color: var(--muted);
}

.sim-logo {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.sim-logo-pending {
  background: #e9ecef;
  border: 1px dashed #c5c9ce;
}

.sim-pending .period {
  margin-left: auto;
  font-weight: 400;
  white-space: normal;
}
