* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Kalnia', serif;
  background-color: white;
  color: black;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 85px;
}

main {
  flex: 1;
  padding-bottom: 120px;
}

header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background-color: white;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 10px 2rem;
}

.logo img {
  height: 50px;
  width: auto;
}

nav a {
  margin-left: 2rem;
  text-decoration: none;
  color: black;
  font-size: 0.95rem;
  font-weight: bold;
  position: relative;
  padding-bottom: 5px;
  transition: color 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  display: block;
  margin-top: 2px;
  right: 0;
  background: black;
  transition: width 0.4s ease, left 0.4s ease;
}

nav a:hover {
  color: #555;
}

nav a:hover::after {
  width: 100%;
  left: 0;
  background: black;
}

header .separator {
  border: none;
  height: 2px;
  background-color: black;
  margin: 0.3rem 1rem 0;
}

.page-section {
  padding: 60px 2rem;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-margin-top: 95px;
}

.page-section:first-child {
  padding-top: 60px;
}

.intro {
  max-width: 700px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.intro h1 {
  font-size: 2.2rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
}

.subtitle {
  margin-bottom: 1.5rem;
  font-style: italic;
  font-size: 1.1rem;
}

.intro p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

#projects, #cv, #blog {
    text-align: center;
}
#projects .section-title,
#cv .section-title,
#blog .section-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  background-color: white;
  width: 100%;
  height: 90px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
}

footer .separator {
  border: none;
  height: 2px;
  background-color: black;
  margin: 0 1rem 0.3rem;
}

.footer-text {
  flex-grow: 1;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  overflow: hidden;
}

.footer-text > div:first-child { /* Selektiert den Icon-Wrapper (das erste Div im footer-text) */
  margin-right: auto; /* Schiebt alles andere nach rechts */
}

.centered-text {
  font-size: 0.8rem;
  /* margin-left: auto; Entfernt, da der Icon-Wrapper dies nun steuert */
  /* margin-right: auto; Entfernt, da der Icon-Wrapper dies nun steuert */
  text-align: center;
  /* Um es wirklich mittig zu halten, wenn Icons und Copyright variable Breiten haben: */
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.et-logo {
  height: 1.8rem;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  transform: translateY(-1px);
}

.copyright {
  font-size: 0.7rem;
  white-space: nowrap;
  color: #555;
  text-align: right;
  margin-left: auto; /* Schiebt das Copyright ganz nach rechts */
}

#contact .section-title {
    text-align: center;
    margin-bottom: 2.5rem;
}

#contactForm {
  max-width: 700px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  font-size: 1rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: 'Kalnia', serif;
  font-size: 1rem;
  background-color: #fdfdfd;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

#contactForm button {
  background-color: black;
  color: white;
  padding: 0.9rem 1.8rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Kalnia', serif;
  font-size: 1rem;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.2s;
  display: block;
  margin: 1rem auto 0;
}

#contactForm button:hover {
  background-color: #333;
  transform: translateY(-2px);
}

#contactForm button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#status {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 4px;
  text-align: center;
}

.success {
  background-color: #dff0d8;
  color: #3c763d;
  border: 1px solid #d6e9c6;
  display: block;
}

.error {
  background-color: #f2dede;
  color: #a94442;
  border: 1px solid #ebccd1;
  display: block;
}

#skills {
  background-color: #ffffff;
}

#skills .section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.skills-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: white;
  padding: 2rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 1px solid #e7e7e7;
  display: flex;
  flex-direction: column;
}

.skill-category h3 {
  font-size: 1.4rem;
  margin-bottom: 2rem;
  text-align: center;
  color: #333;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 1rem;
}

.skills-icons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 2rem 1.5rem;
  align-items: start;
  flex-grow: 1;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.skill-icon {
  font-size: 3.2rem;
  color: #555;
  margin-bottom: 0.75rem;
  transition: all 0.3s ease;
}

.skill-icon:hover {
  color: #000;
  transform: scale(1.1);
}

.skill-item p {
  font-size: 1rem;
  color: #666;
}

.projects a { /* Eingefügte Regel */
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  body {
    padding-top: 120px;
  }

  .nav-bar {
    flex-direction: column;
    align-items: center;
    padding: 0.8rem 1rem;
  }
  .nav-bar .logo {
    margin-bottom: 0.8rem;
  }
  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
  nav a {
    margin: 0.5rem 0.8rem;
    font-size: 0.9rem;
  }
  header .separator {
    margin: 0.5rem 1rem 0;
  }

  .page-section {
    padding: 40px 1.5rem;
    min-height: 70vh;
    scroll-margin-top: 130px;
  }

  .intro h1 {
    font-size: 1.8rem;
  }
  .subtitle {
    font-size: 1rem;
  }
  .intro p {
    font-size: 0.95rem;
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  #skills .section-title {
      margin-bottom: 3rem;
  }

  .skills-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .skill-category {
    padding: 1.5rem;
  }
  .skill-category h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
  }
  .skills-icons {
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 1.5rem 1rem;
  }
  .skill-icon {
    font-size: 2.8rem;
  }
  .skill-item p {
    font-size: 0.9rem;
  }

  #contact .section-title {
    margin-bottom: 2rem;
  }
  .form-group label {
    font-size: 0.95rem;
  }
  .form-group input,
  .form-group textarea {
    font-size: 0.95rem;
  }
  #contactForm button {
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
  }

  footer {
    height: 90px;
  }
  footer .separator {
    margin: 0 1.5rem 0.3rem;
  }
  .footer-text {
      padding: 0 1.5rem;
      position: relative; /* Für absolute Positionierung von .centered-text */
  }
  .footer-text > div:first-child {
      /* Icons bleiben links */
  }
  .centered-text {
      font-size: 0.75rem;
      /* Absolute Positionierung beibehalten oder anpassen */
  }
  .et-logo {
    height: 1.5rem;
  }
  .copyright {
      font-size: 0.65rem;
      /* margin-left: auto; bleibt für Rechtsbündigkeit */
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 110px;
  }
  main {
    padding-bottom: 100px;
  }

  .nav-bar {
    padding: 0.5rem 1rem;
  }
  .logo img {
    height: 40px;
  }
  nav a {
    margin: 0.4rem 0.5rem;
    font-size: 0.85rem;
    padding-bottom: 3px;
  }
  nav a::after {
    margin-top: 1px;
  }
  header .separator {
    margin: 0.4rem 1rem 0;
  }

  .page-section {
    padding: 30px 1rem;
    min-height: auto;
    scroll-margin-top: 120px;
  }
   .page-section:not(:last-child) {
      margin-bottom: 2rem;
  }

  .intro h1 {
    font-size: 1.6rem;
  }
  .subtitle {
    font-size: 0.9rem;
  }
  .intro p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .section-title {
    font-size: 1.8rem;
  }
   #skills .section-title {
      margin-bottom: 2.5rem;
  }

  .skills-icons {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .skill-icon {
    font-size: 2.5rem;
  }
  .skill-item p {
    font-size: 0.85rem;
  }
   .skill-category h3 {
    font-size: 1.1rem;
  }

  #contactForm button {
    width: 100%;
    padding: 0.9rem;
  }

  footer .separator {
    margin: 0 1rem 0.3rem;
  }
  .footer-text {
      padding: 0 1rem;
      flex-direction: column;
      height: auto;
      padding-top: 0.5rem;
      padding-bottom: 0.5rem;
      align-items: center; /* Alle Elemente zentrieren, wenn untereinander */
  }
  .footer-text > div:first-child { /* Icon-Wrapper */
      margin-right: 0; /* Kein Margin mehr, da untereinander */
      margin-bottom: 0.5rem;
  }
  .centered-text {
    font-size: 0.7rem;
    text-align: center;
    position: static; /* Absolute Positionierung aufheben */
    transform: none; /* Transform aufheben */
    margin-bottom: 0.5rem;
  }
  .et-logo {
    height: 1.3rem;
  }
  .copyright {
    font-size: 0.6rem;
    text-align: center;
    white-space: normal;
    margin-left: 0; /* Kein Margin mehr, da untereinander */
  }
}