/* ===== "Under the hood" button (on project cards) ===== */

/*
  Zweiter Knopf neben "View demo" — deshalb bewusst ruhiger: gefuellter
  Grund statt Kontur, damit die Demo der erste Griff bleibt und die Technik
  daneben angeboten wird, statt mit ihr zu konkurrieren.
*/
.project-tech-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 6px 14px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-color);
  background: var(--primary-color-light);
  border: 1.5px solid transparent;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--tran-03);
}

.project-tech-btn i {
  font-size: 1rem;
}

.project-tech-btn:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

/* ===== Modal shell ===== */

.tech-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.78);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tech-modal.open {
  opacity: 1;
  visibility: visible;
}

.tech-modal-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 46rem;
  max-height: 86vh;
  background: var(--sidebar-color);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.tech-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.6rem 1.1rem;
  border-bottom: 1px solid var(--primary-color-light);
}

.tech-modal-heading {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tech-modal-app {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--container-text-color);
}

.tech-modal-kicker {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary-color);
}

.tech-modal-close {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--tran-03);
}

.tech-modal-close:hover {
  transform: rotate(90deg);
  color: var(--primary-color);
}

/* Gescrollt wird im Panel, nicht auf der Seite — die ist waehrenddessen
   gesperrt (lockScroll in website.js). */
.tech-modal-body {
  overflow-y: auto;
  padding: 0.4rem 1.6rem 1.6rem;
}

/* ===== Sections ===== */

.tech-section {
  padding-top: 1.5rem;
}

.tech-section-title {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 0.8rem;
}

.tech-prose {
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--text-color);
}

/* Label-Wert-Zeilen fuer Stack und Praxis */
.tech-rows {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.5rem 1.2rem;
  font-size: 0.8rem;
  line-height: 1.6;
}

.tech-rows dt {
  font-weight: 600;
  color: var(--container-text-color);
}

.tech-rows dd {
  color: var(--text-color);
}

/* Fortsetzungszeile ohne eigenes Label */
.tech-rows dt.tech-rows-cont {
  min-height: 1px;
}

/* ===== Decisions ===== */

.tech-decisions {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/*
  Der senkrechte Strich macht sichtbar, dass Problem und Antwort
  zusammengehoeren — ohne Aufzaehlungszeichen, die in einer Liste aus
  Absaetzen nur Unruhe stiften.
*/
.tech-decisions li {
  border-left: 2px solid var(--primary-color-light);
  padding-left: 0.9rem;
}

.tech-decision-problem {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--container-text-color);
  margin-bottom: 0.3rem;
}

.tech-decision-answer {
  font-size: 0.79rem;
  line-height: 1.7;
  color: var(--text-color);
}

/* ===== Legend ===== */

.tech-legend {
  margin-top: 1.8rem;
  padding: 0.9rem 1.1rem;
  background: var(--primary-color-light);
  border-radius: 0.7rem;
}

.tech-legend summary {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-color);
  cursor: pointer;
  list-style-position: outside;
}

.tech-legend summary:hover {
  color: var(--primary-color);
}

.tech-legend .tech-rows {
  grid-template-columns: 11rem 1fr;
  margin-top: 0.9rem;
  font-size: 0.75rem;
}

/* ===== Mobile ===== */

@media (max-width: 768px) {
  .tech-modal {
    padding: 0.8rem;
  }

  .tech-modal-inner {
    max-height: 92vh;
  }

  .tech-modal-head {
    padding: 1.1rem 1.2rem 0.9rem;
  }

  .tech-modal-body {
    padding: 0.2rem 1.2rem 1.2rem;
  }

  /* Einspaltig: 9rem Label neben Text wird bei 375px unlesbar schmal */
  .tech-rows,
  .tech-legend .tech-rows {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .tech-rows dd {
    margin-bottom: 0.55rem;
  }

  .tech-rows dt.tech-rows-cont {
    display: none;
  }

  /* Einspaltig faellt das Label weg — ohne das hier saehe die Fortsetzung
     aus wie ein eigener Eintrag ohne Ueberschrift. */
  .tech-rows dd:has(+ dt.tech-rows-cont) {
    margin-bottom: 0.1rem;
  }
}
