body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  background-color: #fffe91;
  /* background-color: #fff176; */
  /* Sonnengelb */
  color: #333;
}

header {
  position: relative;
  height: 200px;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
}

.brand img {
  width: clamp(48px, 8vw, 100px);
  height: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.brand-text h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  color: #fff;
  line-height: 1.1;
}

.brand-text h2 {
  margin: 0;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 400;
  color: #fff;
}

@media (max-width: 600px) {
  .brand {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }

  .brand-text {
    align-items: center;
  }
}

canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.matrix-canvas {
  z-index: 1;
}

.menu-canvas {
  z-index: 0;
}

main {
  padding: 40px;
  max-width: 1200px;
  margin: auto;
}

#about {
  max-width: 50%;
  min-width: 320px; /* entspricht der project-card Mindestbreite */
  margin: 0 auto 40px;
  text-align: justify;
  hyphens: auto;
  line-height: 1.5;
}

@media (max-width: 900px) {
  #about {
    max-width: 100%;
  }
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.project-card {
  background: #fff;
  border-radius: 16px;
  /* overflow: visible; */
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.project-card h3 {
  margin: 16px 20px 4px;
}

.project-card .subtitle {
  margin: 0 20px 12px;
  color: #666;
  font-size: 0.95rem;
}

.project-image {
  display: flex;
  justify-content: center;
  margin: 20px 0 10px;
}

.project-image :only-child {
  width: 90%;
  min-height: 400px;
  border: 4px solid #000;
  border-radius: 14px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
  display: block;
}

.features {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 20px;
}

.features span {
  background: #f4f4f4;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.85rem;
}

.tech {
  padding: 12px 20px;
  font-size: 0.85rem;
  color: #555;
}

.project-link {
  display: block;
  padding: 14px 20px 20px;
  font-weight: 600;
  text-decoration: none;
  color: #0055a3;
}

.clickable {
  cursor: pointer;
}

.social-links {
  display: flex;
  gap: 40px;
  margin-top: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
  width: 80px;
  transition: transform 0.3s;
}

.social-card img {
  width: 30px;
  height: 30px;
  margin-bottom: 8px;
  filter: invert(0%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%)
    contrast(100%);
}

.social-card:hover {
  transform: scale(1.2);
  img {
    filter: none;
  }
}

.social-card span {
  font-size: 0.9rem;
  text-align: center;
}

/* Kontaktformular */
.graybox {
  background: #fff;
  padding: 20px;
  /*			background-color: #f4f4f4;*/
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

#contactForm {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#contactForm label {
  text-align: left;
  font-size: 1rem;
  font-weight: bold;
  color: #003366;
}

#contactForm input,
#contactForm textarea {
  /* width: 100%; */
  padding: 10px;
  border: 2px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#contactForm input:focus,
#contactForm textarea:focus {
  border-color: #003366;
  box-shadow: 0 0 5px rgba(0, 51, 102, 0.5);
  outline: none;
}

#contactForm button {
  background-color: #003366;
  color: #fff;
  border: none;
  padding: 10px;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

#contactForm button:hover {
  background-color: #0055a3;
  box-shadow: 0 0 0 4px rgba(0, 85, 163, 0.25);
}

#contactForm button:active {
  transform: scale(1);
}

/* Ladeanimation */
#contactForm .loader {
  border: 3px solid #fff;
  border-top: 3px solid transparent;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  animation: spin 1s linear infinite;
  margin-left: 8px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Button deaktiviert */
#contactForm button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

#scrollTopBtn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 2rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10;
}

#scrollTopBtn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#scrollTopBtn:hover {
  transform: translateY(-4px);
  background: rgba(0, 0, 0, 0.9);
}

#scrollTopBtn .arrow {
  transform: translateY(-6px);
}
