* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: #222;
  background: #f7f7f7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1, h2, h3, .logo, .btn {
  font-family: 'Poppins', sans-serif;
}

.hero {
  background: linear-gradient(135deg, #1f3c88, #4a90e2);
  color: white;
  padding: 20px 40px 60px;
}

.nav {
  max-width: 100%;
  margin: 0 auto;
  padding: -10px 40px;
  display: flex;
  align-items: center;
}

.nav-links {
  margin-left: auto;
  display: flex;
  gap: 36px;
  list-style: none;
  padding: 0;
  margin-top: 0;
  margin-bottom: 0;
  font-weight: 700;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 1.2rem;
}

.lang-btn {
  background: transparent;
  border: 1px transparent;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  margin-left: 10px;
  color: white;
  font-size: 18px;
}

.lang-btn:hover {
  transform: translateY(-1px);
}

.logo {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.logo-name {
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
}

.logo-name::after {
  content: "";
  position: absolute;
  left: 1%;
  bottom: 9px;
  width: 85%;
  height: 0.4rem;
  background: white;
  border-radius: 999px;
}

.logo-dot {
  position: absolute;
  right: 5px;
  bottom: 8px;
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

.page-hero-text {
  max-width: 1000px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-hero-text h1 {
  font-size: 3rem;
  margin-bottom: 15px;
}

.page-hero-text p {
  font-size: 1.5rem;
  line-height: 1.7;
  max-width: 700px;
}

/* Neues Layout: links TOC, rechts ein Kasten */
.project-layout {
  max-width: 1600px;
  margin: 60px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 280px minmax(0, 900px) 280px;
  gap: 32px;
  justify-content: center;
  align-items: start;
}

.toc-sidebar {
  position: sticky;
  top: 100px;
  width: 260px;
  background: white;
  padding: 24px;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  border-left: 5px solid #4a90e2;
}

.toc-sidebar h2 {
  font-size: 1.35rem;
  margin-bottom: 18px;
  color: #1f3c88;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li + li {
  margin-top: 12px;
}

.toc-list a {
  text-decoration: none;
  color: #222;
  font-weight: 600;
  line-height: 1.5;
}

.toc-list a:hover {
  color: #1f3c88;
  text-decoration: underline;
}

.project-content {
  width: 100%;
}

.project-card {
  margin: 0;
  width: 100%;
  background: white;
  padding: 28px 32px;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  border-left: 5px solid #4a90e2;
}

.toc-spacer {
  visibility: hidden;
}

.content-section + .content-section {
  margin-top: 32px;
}

.content-section h2 {
  font-size: 1.6rem;
  margin-bottom: 14px;
  color: #1f3c88;
}

.content-section p {
  text-align: justify;
  hyphens: auto;
}

.references-list {
  padding-left: 22px;
}

.references-list li {
  margin-bottom: 12px;
  text-align: justify;
  hyphens: auto;
}

.references-list a {
  color: #1f3c88;
  text-decoration: none;
  font-weight: 600;
}

.references-list a:hover {
  text-decoration: underline;
}

.footer {
  text-align: center;
  padding: 30px 20px;
  background: #222;
  color: white;
  margin-top: 40px;
}

/* Tablet */
@media (max-width: 1100px) {
  .project-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 24px;
  }

  .page-hero-text h1 {
    font-size: 2.5rem;
  }

  .page-hero-text p {
    font-size: 1.25rem;
  }
}

/* Mobile */
@media (max-width: 900px) {
  .hero {
    padding: 20px 20px 40px;
  }

  .page-hero-text {
    margin-top: 30px;
  }

  .page-hero-text h1 {
    font-size: 2rem;
  }

  .page-hero-text p {
    font-size: 1.1rem;
  }

  .project-layout {
    grid-template-columns: 1fr;
    margin: 40px auto;
    padding: 0 16px;
  }

  .toc-sidebar {
    position: static;
  }

  .project-card {
    padding: 22px 20px;
  }

  .content-section h2 {
    font-size: 1.35rem;
  }
}

/* =========================
   Handy / Tablet Ergänzung
   oberer Code bleibt gleich
========================= */

@media (max-width: 992px) {
  .hero {
    padding: 20px 24px 50px;
  }

  .hero-wrapper {
    max-width: 90%;
    gap: 24px;
  }

  .hero-content h1 {
    font-size: 3.2rem;
  }

  .hero-content h2 {
    font-size: 1.5rem;
  }

  .hero-content p {
    font-size: 1.08rem;
    max-width: 100%;
  }

  .about,
  .contact,
  .journey {
    margin: 40px 20px;
    padding: 30px;
  }

  .projects {
    margin: 40px 20px;
    padding: 0;
  }

  .journey-item {
    grid-template-columns: 170px 1fr;
    gap: 16px;
  }

  .nav-links {
    gap: 24px;
  }

  .nav-links a {
    font-size: 1.05rem;
  }
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .hero {
    padding: 18px 16px 40px;
    min-height: auto;
  }

  .hero-wrapper {
    margin-top: 24px;
    max-width: 100%;
    gap: 20px;
  }

  .hero-content h1 {
    font-size: 2.4rem;
  }

  .hero-content h2 {
    font-size: 1.2rem;
  }

  .hero-content p {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 100%;
  }

  .hero-image img {
    width: 220px;
    height: 220px;
  }

  .logo {
    font-size: 1.6rem;
  }

  .nav {
    width: 100%;
  }

  .nav-links {
    gap: 16px;
    flex-wrap: wrap;
  }

  .nav-links a {
    font-size: 1rem;
  }

  .lang-btn {
    font-size: 16px;
  }

  .about,
  .contact,
  .journey {
    margin: 30px 14px;
    padding: 22px 18px;
  }

  .projects {
    margin: 30px 14px;
    padding: 0;
  }

  .about h2,
  .contact h2,
  .journey h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }

  .about p,
  .contact p,
  .journey-content p {
    font-size: 0.98rem;
    line-height: 1.6;
  }

  .journey-item {
    grid-template-columns: 130px 1fr;
    gap: 14px;
  }

  .journey-content h3 {
    font-size: 1.05rem;
  }

  .schulabshluss,
  .umzug,
  .Bachelor,
  .Master {
    font-size: 1.2rem;
  }

  .cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.9rem;
  }

  .hero-content h2 {
    font-size: 1rem;
  }

  .hero-content p {
    font-size: 0.95rem;
  }

  .hero-image img {
    width: 180px;
    height: 180px;
  }

  .logo {
    font-size: 1.3rem;
  }

  .nav-links {
    gap: 12px;
  }

  .nav-links a {
    font-size: 0.95rem;
  }

  .about h2,
  .contact h2,
  .journey h2 {
    font-size: 1.5rem;
  }

  .journey-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .journey-year {
    margin-bottom: 4px;
  }
}

/* Hamburger-Button standardmäßig verstecken */
.menu-toggle {
  display: none;
  background: rgba(34, 47, 68, 0.95);
  border: none;
  border-radius: 14px;
  width: 52px;
  height: 52px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #5f6977;
  border-radius: 999px;
}

/* Nur für Mobile */
@media (max-width: 768px) {
  .nav {
    position: relative;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
  }

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    right: 16px;
    width: 220px;
    background: rgba(34, 47, 68, 0.98);
    border-radius: 16px;
    padding: 14px;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    color: white;
    font-size: 1rem;
    display: block;
    width: 100%;
  }
}