/* Farbvariablen für eine einfache Anpassung. */
:root {
  --primary-color: #007acc;
  --secondary-color: #ff6f61;
  --bg-color: #f5f7fa;
  --text-color: #333333;
  --max-width: 960px;
}

/* Basis-Reset und Typografie */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  background-color: var(--bg-color);
  color: var(--text-color);
  scroll-behavior: smooth;
}

.only-print { display: none !important; }

/* Navigationsleiste */
nav {
  background-color: #ffffff;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  z-index: 1000;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
}

nav a:hover {
  color: var(--primary-color);
}

/* Hero‑Sektion auch wenn ich final gar kein hero pattern verwendet habe ;)*/
header.hero {
  position: relative;
  background-image: url('hero-bg.png');
  background-size: cover;
  background-position: center;
  color: var(--text-color);
  padding: 4rem 2rem 6rem 2rem;
  overflow: hidden;
}

/* Halbtransparenter überzug zur verbesserung der lesbarkeit */
header.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
}

header.hero .hero-content {
  position: relative;
  max-width: var(--max-width);
  margin: auto;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

header.hero h1 {
  margin: 0;
  font-size: 2.5rem;
  color: var(--primary-color);
}

header.hero h2 {
  margin: 0.5rem 0 1rem 0;
  font-size: 1.5rem;
  color: var(--secondary-color);
}

header.hero p {
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Stil für den lebenslauf in der hero‑sektion */
.profile-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

/* Container für Text innerhalb der hero‑sektion */
.hero-text {
  flex: 1 1 300px;
  min-width: 280px;
  text-align: left;
}

/* Überschriften und Absätze innerhalb der hero sektion linksbündig setzen */
.hero-text h1,
.hero-text h2,
.hero-text p {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  margin-top: 1.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background-color: var(--secondary-color);
}
 
section {
  padding: 4rem 1rem;
}

section h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary-color);
  font-size: 2rem;
  margin: 0.5rem 3rem;
}

.about, .hobbies, .contact, .timeline {
  max-width: var(--max-width);
  margin: 0 auto;
}

.about p {
  text-align: justify;
  margin-bottom: 1rem;
}

/* TimeLine‑Layout */
.timeline {
  position: relative;
  padding-top: 2rem;
  overflow: hidden;
}

/* Vertikale Linie in der Mitte der Timeline */
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  /* Startpunkt am oberen Rand des Zeitstrahl‑Containers */
  top: 0;
  bottom: 0;
  background-color: var(--primary-color);
}

/* Einzelnes Timeline‑Element */
.timeline-item {
  position: relative;
  width: 50%;
  padding: 5px;
}

/* Gerade und Ungerade elemente unterschiedlich ausrichten */
.timeline-item:nth-child(odd) {
  float: left;
  clear: both;
  text-align: right;
  padding-right: 2rem;
}

.timeline-item:nth-child(even) {
  float: right;
  clear: both;
  text-align: left;
  padding-left: 2rem;
}

/* Markierungskreise an der zeitachse */
.timeline-item::before {
  content: '';
  position: absolute;
  top: 24px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  border: 4px solid var(--primary-color);
  z-index: 2;
}

.timeline-item:nth-child(odd)::before {
  right: -9px;
}

.timeline-item:nth-child(even)::before {
  left: -9px;
}

/* Karte innerhalb des Timeline‑Elements */
.timeline-content {
  background-color: #ffffff;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.timeline-content h3 {
  margin-top: 0;
  color: var(--secondary-color);
  font-size: 1.25rem;
}

.timeline-content span {
  display: block;
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 0.5rem;
}

.timeline-content .smaller-text {
  font-size: 0.85em;
}

/* Hobbys‑Grid */
.hobbies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.hobby-card {
  background-color: #ffffff;
  border-top: 5px solid var(--primary-color);
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.hobby-card h3 {
  margin-top: 0;
  color: var(--secondary-color);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.hobby-card p {
  margin: 0;
}

/* Kontaktbereich */
.contact {
  text-align: center;
}

.contact a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.contact a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* Footer */
footer {
  background-color: transparent;
}

/* Media Query für kleinere Bildschirme */
@media (max-width: 768px) {
  .timeline::before {
    left: 8px;
  }
  .timeline-item {
    width: 100%;
    text-align: left;
  }
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    float: none;
    clear: both;
    padding-right: 2rem;
    text-align: left;
    padding-left: 2rem;
    right: 0px;
  }

  .timeline-item:nth-child(even)::before {
    left: 0px;
  }
  .timeline-item::before {
    left: 0;
    right: auto;
  }
}

/* Druckoptimierung: Ziel ist eine saubere, lineare Darstellung ohne überflüssige Elemente. */
@media print {
  nav,
  .hide-by-print,
  .btn {
    display: none !important; /* Navigation und Buttons für den Ausdruck ausblenden */
  }

  .only-print { display: block !important; }
  .print-banner {
    /* statt fixed -> nur einmal am Anfang, nicht pro Seite */
    position: static;
    margin: 0 0 0mm 0;
    border-bottom: 1px solid #ccc;
    text-align: center;
    font-size: 11pt;
    background-color: #ffffff;
  }
  
  header.hero {
    position: relative;
    background-image: url('hero-bg.png');
    background-size: cover;
    background-position: center;
    color: var(--text-color);
    padding: 1rem 2rem 2rem 1rem;
    font-size: 0.8rem;
    overflow: hidden;
  }

  section {
    padding: 0.2rem 2rem;
    font-size: 0.8rem;
  }
  section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 2rem;
    margin: 0.5rem 2rem;
  }
  .timeline::before {
    left: 10px; 
    top: 0;  
  }
  .timeline-item {
    width: 100%;
    float: right;
    clear: both;
    text-align: left;
    padding-left: 2rem;
  } 
  
  .timeline-item:nth-child(odd)::before {
    right: 0px;
  }

  .timeline-item:nth-child(even)::before {
    left: 0px;
  }
  
  .timeline-item::before {
    left: 1px;
  }

  .timeline-content {
    text-align: left;
  }

  .timeline-content .smaller-text {
    font-size: 1em;
  }

  .timeline-content {
    box-shadow: none;
    border: 1px solid #ccc;
    padding: 0.75rem;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
}