/* =========================================
   PROJECT BASE — shared styles for all project subpages
   Loaded by every projects/*.html page
   ========================================= */

/* CASE STUDY / DEEP DIVE STYLES
   (Phishing Defender, HTML CV, Meta)
*/

/* --- Project Hero (Video/Image) --- */
.project-deep-dive .project-nav {
  padding: 0;
  mix-blend-mode: normal;
  z-index: 9999;
}

.back-link {
  color: var(--text-1);
  text-decoration: none;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 0.3s;
}
.back-link:hover {
  opacity: 0.7;
}

.project-hero {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* War 0.3 oben — zu schwach, Video-/Screenshot-Inhalt (z.B. eigener
     Spiel-Titelbildschirm bei phishing-defender) blieb lesbar und
     kollidierte optisch mit dem echten Hero-Titel darüber. */
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.92) 100%
  );
}

.hero-badge {
  display: inline-block;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
  font-weight: 600;
}

.hero-title {
  font-size: 6rem;
  line-height: 0.9;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 30px;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  /* Manche Titel sind aus zwei Teilen ohne Leerzeichen zusammengesetzt
     (z.B. "Community"+<span>Engine</span> = ein nicht umbrechbares Wort).
     Auf schmalen Screens reicht die Font-Size-Reduktion allein nicht immer
     aus — als Absicherung notfalls innerhalb des Worts umbrechen statt
     über den Viewport hinauslaufen zu lassen. */
  overflow-wrap: break-word;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: #e0e0e0;
  max-width: 600px;
  margin: 0 auto;
  font-weight: 300;
}

/* --- Deep Dive Content Sections --- */
.project-section {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}
.dark-bg {
  background-color: var(--bg);
}

.section-heading {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 40px;
  line-height: 1.1;
}

.section-tag {
  display: inline-block;
  color: var(--primary-color);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--primary-color);
  padding-bottom: 5px;
}

.text-lg {
  font-size: 1.3rem;
  line-height: 1.6;
  color: var(--text-1);
  margin-bottom: 20px;
}
.text-muted {
  color: #888;
  font-size: 1rem;
  margin-bottom: 40px;
}

.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.stats-row {
  display: flex;
  gap: 40px;
  border-top: 1px solid var(--border-strong);
  padding-top: 30px;
}

.stat-val {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-1);
  line-height: 1;
}
.stat-label {
  font-size: 0.8rem;
  color: #666;
  text-transform: uppercase;
  margin-top: 5px;
}

/* Enterprise Glass Frame */
.image-frame-cyber {
  position: relative;
  padding: 10px;
  background: var(--surface-1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.image-frame-cyber img {
  width: 100%;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--border);
}

/* Deactivated old scanline for cleaner look */
.scan-line {
  display: none;
}

@keyframes scanMove {
  0% {
    top: 2%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: 98%;
    opacity: 0;
  }
}

/* Timeline */
.timeline-steps {
  display: flex;
  justify-content: space-between;
  margin: 60px 0;
  position: relative;
}
.timeline-steps::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 0;
}
.timeline-step {
  position: relative;
  z-index: 1;
  background: var(--dark-bg);
  padding: 0 10px;
  text-align: center;
  width: 20%;
}
.t-circle {
  width: 30px;
  height: 30px;
  background: var(--card-bg);
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--primary-color);
}
.t-title {
  font-size: 0.9rem;
  color: var(--text-1);
  margin-bottom: 5px;
}
.t-desc {
  font-size: 0.8rem;
  color: #666;
}

/* Architecture & Evolution */
.architecture-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: start;
}
.arch-badges {
  display: flex;
  gap: 10px;
  margin-top: 25px;
}
.img-caption {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  color: #666;
  margin-top: 10px;
  font-style: italic;
}

.evolution-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin-top: 40px;
}
.evo-step {
  flex: 1;
  max-width: 500px;
}
.evo-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}
.step-num {
  font-size: 3rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.05);
  line-height: 1;
}
.evo-visual {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
  height: 300px;
}
.evo-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.evo-arrow {
  font-size: 3rem;
  color: var(--primary-color);
  opacity: 0.5;
}
.evo-desc {
  color: #888;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Challenges Grid */
.challenge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}
.challenge-card {
  background: var(--surface-1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px;
  transition: transform 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}
.challenge-card:hover {
  transform: translateY(-5px);
  border-color: rgba(157, 0, 255, 0.3);
}
.challenge-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}
.challenge-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-1);
  margin: 0;
}
.challenge-desc {
  color: #888;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #333;
}
.solution-block {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}
.solution-text {
  color: #ccc;
  font-size: 0.9rem;
  line-height: 1.5;
}
.solution-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 5px;
  font-weight: 700;
}

/* Documentation Downloads */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.doc-card {
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  padding: 25px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  transition: background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.doc-card:hover {
  background: var(--surface-2);
  border-color: var(--primary-color);
}
.doc-info h4 {
  color: var(--text-1);
  font-size: 1rem;
  margin-bottom: 5px;
}
.doc-info p {
  color: #666;
  font-size: 0.8rem;
  margin: 0;
}
.doc-icon {
  font-size: 1.5rem;
  color: var(--primary-color);
}

/* Gallery & Lightbox */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 200px;
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.gallery-item:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.gallery-item:hover .gallery-overlay {
  opacity: 1;
}
.gallery-overlay span {
  font-size: 2rem;
  color: var(--on-accent);
}

.zoomable-img {
  cursor: zoom-in;
  transition: transform 0.3s;
}
.zoomable-img:hover {
  transform: scale(1.02);
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(10px);
}
.lightbox.active {
  display: flex;
  opacity: 1;
}
.lightbox-content {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-strong);
}
.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: var(--on-accent);
  font-size: 3rem;
  cursor: pointer;
  transition: color 0.3s;
}
.lightbox-close:hover {
  color: var(--primary-color);
}

/* Use Case & Blueprint */
.use-case-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 30px;
}

.uc-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  padding: 15px 20px;
  border-radius: 8px;
  transition: background-color var(--dur) var(--ease-out), border-left-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
  border-left: 3px solid transparent;
}

.uc-card:hover {
  background: var(--surface-2);
  border-left-color: var(--primary-color);
  transform: translateX(5px);
}

.uc-id {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--primary-color);
  font-size: 0.9rem;
  padding: 5px 10px;
  background: rgba(157, 0, 255, 0.1);
  border-radius: 4px;
}

.uc-content h4 {
  font-size: 1rem;
  margin-bottom: 2px;
  color: var(--text-1);
}

.uc-content p {
  font-size: 0.85rem;
  color: #888;
  margin: 0;
}

.blueprint-frame {
  background: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid #333;
}

.blueprint-header {
  background: #252525;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #333;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot.red {
  background: #ff5f56;
}
.dot.yellow {
  background: #ffbd2e;
}
.dot.green {
  background: #27c93f;
}

.blueprint-title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #666;
}

.blueprint-body {
  position: relative;
  padding: 0;
}

.blueprint-body img {
  width: 100%;
  display: block;
  filter: brightness(0.9);
}

.blueprint-footer {
  background: #252525;
  padding: 5px 15px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #555;
  border-top: 1px solid #333;
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

/* Nav & Mobile Controls (Specific to Projects) */
.project-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--header-border);
  display: flex;
  align-items: center;
}

.nav-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Download Section Cards */
.download-section {
  background: radial-gradient(circle at center, var(--surface-1) 0%, var(--bg) 100%);
  padding-bottom: 50px;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 60px;
}

.download-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  position: relative;
  transition: transform 0.3s, border-color 0.3s;
  overflow: hidden;
}

.download-card:hover {
  transform: translateY(-5px);
  border-color: rgba(157, 0, 255, 0.3);
  background: var(--surface-1);
}

.primary-card {
  border-color: var(--primary-color);
  box-shadow: 0 0 30px rgba(157, 0, 255, 0.1);
}

.card-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--primary-color);
  color: var(--on-accent);
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  font-weight: bold;
}

.card-icon {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
  transition: transform 0.3s ease;
}

.download-card:hover .card-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
}

.download-card h3 {
  font-size: 1.4rem;
  margin-bottom: 5px;
  color: var(--text-1);
}

.version-info {
  color: #666;
  font-size: 0.9rem;
  font-family: var(--font-mono);
  margin-bottom: 20px;
}

.card-specs {
  list-style: none;
  margin-bottom: 25px;
  color: #aaa;
  font-size: 0.9rem;
  line-height: 1.6;
}

.dl-button {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--text-1);
  color: var(--bg);
  text-decoration: none;
  font-weight: 700;
  border-radius: 8px;
  transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}

.dl-button:hover {
  background: var(--primary-color);
  color: var(--on-accent);
  box-shadow: 0 5px 20px rgba(157, 0, 255, 0.4);
}

.dl-button.outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-1);
}
.dl-button.outline:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  box-shadow: none;
}

.dl-button.disabled {
  background: #333;
  color: #666;
  cursor: not-allowed;
}

.checksum {
  margin-top: 15px;
  font-size: 0.7rem;
  color: #444;
  font-family: var(--font-mono);
}

/* Terminal "How To Run" */
.terminal-wrapper {
  max-width: 700px;
  margin: 80px auto 0;
  background: #0f0f0f;
  border-radius: 8px;
  border: 1px solid #333;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.terminal-header-bar {
  background: #1f1f1f;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #333;
}

.term-title {
  margin-left: auto;
  font-family: var(--font-mono);
  color: #666;
  font-size: 0.8rem;
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.comment {
  color: #666;
  margin-bottom: 5px;
}
.code-line {
  color: var(--text-1);
  margin-bottom: 15px;
}
.prompt {
  color: var(--primary-color);
  font-weight: bold;
  margin-right: 10px;
}
.code-output {
  color: #4caf50;
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0.8;
}



/* Code Window Styling */
.code-showcase {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-top: 40px;
  flex-wrap: wrap;
}
.code-window {
  flex: 1;
  min-width: 300px;
  background: #1e1e1e;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid #333;
  overflow: hidden;
}
.code-header {
  background: #252526;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #333;
}
.code-title {
  margin-left: 10px;
  font-family: var(--font-mono);
  color: #888;
  font-size: 12px;
}
pre {
  margin: 0;
  padding: 20px;
  color: var(--text-1);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
}
.code-description {
  flex: 0.8;
  min-width: 250px;
}
.code-description h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
}
.code-description p {
  color: #ccc;
  line-height: 1.6;
  font-size: 15px;
}

/* Comparison Grid */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 40px;
}
.comp-card {
  padding: 30px;
  border-radius: 12px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  transition: 0.3s;
}
.comp-card:hover {
  transform: translateY(-5px);
}
.comp-card.bad {
  border-top: 3px solid #ff4444;
}
.comp-card.good {
  border-top: 3px solid #00c851;
  background: rgba(0, 200, 81, 0.05);
}
.comp-card h3 {
  color: var(--text-1);
  margin: 15px 0;
  font-size: 20px;
}
.comp-card ul {
  list-style: none;
  padding: 0;
}
.comp-card li {
  margin-bottom: 10px;
  color: #aaa;
  position: relative;
  padding-left: 20px;
}
.comp-card li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #555;
}
.comp-card.good li::before {
  color: #00c851;
}

@keyframes pulse-neon {
  0% {
    box-shadow: 0 0 0 0 rgba(157, 0, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(157, 0, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(157, 0, 255, 0);
  }
}

/* ============================================================
   PROJECT NAV — complete rewrite
   ============================================================ */

/* Container fills the 80px bar height */
.project-nav .nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 30px;
}

/* Back link — reset uppercase/tracking from global .back-link */
.project-nav .back-link {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.project-nav .back-link:hover {
  color: var(--text-1);
}

/* Center section links (desktop) */
.project-nav .nav-content-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0 20px;
}

.project-nav .internal-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.project-nav .internal-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.project-nav .internal-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--primary-color);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-nav .internal-links a:hover {
  color: var(--text-1);
}

.project-nav .internal-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Right-side controls — lang + hamburger */
.project-nav .mobile-header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  position: relative;
  z-index: 10000;
}

/* Override global 992px rule that adds width:100% to lang-pill in mobile context */
.project-nav .lang-pill {
  margin: 0;
  width: auto; /* Pill bleibt kompakt in der mobile-header-controls-Leiste */
}

.project-nav .lang-pill-seg {
  flex: none; /* Kein flex:1 stretch im Projekt-Header */
}

/* Hamburger — hidden on desktop */
.project-nav .hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
  flex-shrink: 0;
}

.project-nav .hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* X animation — JS adds .active to each span */
.project-nav .hamburger span.active:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.project-nav .hamburger span.active:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.project-nav .hamburger span.active:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ── Mobile overlay (≤ 1100px) ── */
@media (max-width: 1100px) {

  /* Reveal hamburger */
  .project-nav .hamburger {
    display: flex;
  }

  /* Premium Glassmorphism Drawer */
  .project-nav .nav-content-wrapper {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 80vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--header-bg-scrolled);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid var(--border);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.4s ease, visibility 0.4s ease;
    padding: 40px 20px;
    flex: none;
  }

  .project-nav .nav-content-wrapper.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
  }

  .project-nav .internal-links {
    flex-direction: column;
    gap: 20px;
    align-items: center;
    width: 100%;
  }

  .project-nav .internal-links a {
    font-size: 1.2rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
    padding: 12px 0;
    display: block;
    text-align: center;
    transition: color 0.3s ease, transform 0.3s ease;
    width: 100%;
  }

  .project-nav .internal-links a:hover,
  .project-nav .internal-links a:active {
    color: var(--text-1);
    transform: scale(1.05);
  }

  .project-nav .internal-links a.nav-download-btn {
    background: var(--primary-color);
    color: var(--on-accent);
    padding: 12px 30px;
    border-radius: 50px;
    margin-top: 15px;
    display: inline-block;
    width: auto;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(157, 0, 255, 0.3);
  }

  .project-nav .internal-links a::after {
    display: none;
  }
}

/* ── Hero-Title auf kleinen Screens (≤480px) ──
   .hero-title steht bei 6rem fest ohne responsive Anpassung — auf Handys
   läuft der Text seitlich aus dem Viewport. studynexus.css hatte dafür
   schon einen eigenen Fix (2.8rem), der aber nur dort galt, nicht in
   diesem geteilten Base-File — betraf dadurch alle anderen Projektseiten
   (community-software, html-cv, phishing-defender, portfolio-meta). */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2.8rem;
  }
}

/* ── Mehrspaltige Layouts stapeln (≤768px) ──
   .mission-grid / .architecture-grid / .comparison-grid: feste
   2-Spalten-Grids ohne jede Mobile-Anpassung — auf schmalen Screens
   quetschten sich beide Spalten nebeneinander bzw. überlappten sich.
   .timeline-steps: feste width:20%-Kinder in einer Flex-Reihe (bis zu
   5 Items nebeneinander) — Text lief dadurch in eine 1-Wort-pro-Zeile-
   Spalte. Betraf alle Seiten, die project-base.css nutzen (community-
   software, html-cv, phishing-defender, portfolio-meta). */
@media (max-width: 768px) {
  .mission-grid,
  .architecture-grid,
  .comparison-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Grid-Kinder haben per Default min-width:auto — dadurch schrumpft eine
     1fr-Spalte NICHT unter die Content-Mindestbreite ihrer Kinder (z.B.
     ein langer Fließtext-Absatz). Ohne das hier blieb die Spalte trotz
     "1fr" ~560px breit auf einem 335px verfügbaren Platz → Überlauf. */
  .mission-grid > *,
  .architecture-grid > *,
  .comparison-grid > * {
    min-width: 0;
  }

  .timeline-steps {
    flex-direction: column;
    gap: 30px;
  }
  .timeline-step {
    width: 100%;
  }
  .timeline-steps::before {
    display: none;
  }

  /* .hero-content ist das einzige Flex-Kind in .project-hero (display:flex)
     und erbt denselben min-width:auto-Fallstrick wie die Grid-Spalten oben.
     Bei einem einwortigen, nicht umbrechbaren Projekttitel (z.B.
     "CommunityEngine") verhindert das den Schrumpf unter dessen
     Content-Breite → der Container läuft unsichtbar (von .project-hero's
     overflow:hidden geschluckt) links/rechts über den Viewport hinaus. */
  .hero-content {
    min-width: 0;
  }
}

