:root {
  --gruen: #87e64c;
  --lila: #826fc9;
  --blau: #97dee6;
  --gelb: #dfe61e;
  --pink: #e63f77;
  --card: rgba(255, 255, 250, 0.95);
  --muted: #f6f2eb;
  --text: #222222;
  --shadow: rgba(20,20,20,0.08);
}

/* Floating decorative elements */
.floating-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.floating-element {
  position: absolute;
  width: 200px;
  height: 200px;
  object-fit: contain;
  opacity: 1;
  transition: opacity 0.4s ease;
  pointer-events: auto;
}

.floating-element:hover {
  opacity: 0.1;
}

/* Float animations (positions set dynamically by JavaScript) */
@keyframes float1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(10px, -15px) rotate(3deg); }
  50% { transform: translate(-8px, -10px) rotate(-2deg); }
  75% { transform: translate(5px, -20px) rotate(1deg); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-12px, 18px) rotate(-3deg); }
  66% { transform: translate(8px, 12px) rotate(2deg); }
}

@keyframes float3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  30% { transform: translate(15px, 10px) rotate(4deg); }
  60% { transform: translate(-10px, 15px) rotate(-3deg); }
}

@keyframes float4 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  40% { transform: translate(-15px, -12px) rotate(-2deg); }
  80% { transform: translate(12px, -8px) rotate(3deg); }
}

@keyframes float5 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-8px, 15px) rotate(2deg); }
  50% { transform: translate(10px, 8px) rotate(-4deg); }
  75% { transform: translate(-12px, -10px) rotate(1deg); }
}

/* Hide floating elements on tablet and mobile */
@media (max-width: 1024px) {
  .floating-elements {
    display: none;
  }
}

/* Global page background and base type */


main,
.article,
nav,
.Projekte-Container,
.file-system {
  background-color: var(--card);
}

* {
  transition: background-color 0.25s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

html,
.root {
  font-size: 18px;
  line-height: 35px;
}

main,
.article {
  font-family: sans-serif;
  font-size: 1em;
  line-height: 1.94444444em;
  max-width: 80%;
  margin: auto;
}

h1,
.h1 {
  font-size: 2.61111111em;
  line-height: 1.4893617em;
  margin-top: 0.74468085em;

}

h2,
.h2 {
  font-size: 2em;
  line-height: 1.4893617em;
  margin-top: 0.74468085em;
  margin-bottom: 0.74468085em;
}

h3,
.h3 {
  font-size: 1.61111111em;
  line-height: 1.20689655em;
  margin-top: 1.20689655em;
  margin-bottom: 0em;
}

h4,
.h4 {
  font-size: 1em;
  line-height: 1.94444444em;
  margin-top: 1.94444444em;
  margin-bottom: 0em;
}

h5,
.h5 {
  font-size: 1em;
  line-height: 1.94444444em;
  margin-top: 1.94444444em;
  margin-bottom: 0em;
}

p,
ul,
ol,
pre,
table,
blockquote {
  margin-top: 0em;
  margin-bottom: 1.94444444em;
  font-family: "Roboto Serif", serif;
}

ul ul,
ol ol,
ul ol,
ol ul {
  margin-top: 0em;
  margin-bottom: 0em;
}

/* Minimalistische Navigation */
nav {
  background-color: var(--card);
  border-bottom: 5px solid var(--lila);
  padding: 1.5em 0;
  margin-bottom: 2em;
  position: sticky;
  top: 0;
  z-index: 100;
}

.file-system {
  background-color: transparent;
  border: none;
  padding: 0;
  margin: 0;
  max-width: 80%;
  margin: 0 auto;
  font-family: 'Roboto Serif', serif;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-system {
  padding: 0.75em 1em;
}

.file-system h3 {
  margin: 0;
  font-size: 1em;
  border: none;
  padding: 0;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--lila);
}

.file-item {
  border: none;
  padding: 0;
  margin: 0;
  display: inline-block;
  margin-left: 2em;
}

.file-item:hover {
  border: none;
  background-color: transparent;
  padding-left: 0;
}

.file-icon {
  display: none;
}

.file-item a {
  text-decoration: none;
  color: #333;
  font-weight: 400;
  font-size: 0.95em;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

.file-item a:hover {
  color: white;
  background-color: var(--lila);
  font-weight: bolder;
  padding: 1em;
}

.file-date {
  margin-left: auto;
  font-size: 0.85em;
  color: var(--lila);
  font-weight: 400;
}

/* Burger Menu Styles */
.burger-menu {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5em;
  z-index: 101;
}

.burger-menu span {
  width: 28px;
  height: 3px;
  background-color: var(--lila);
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 3px;
}

.burger-menu.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-6px, 6px);
}

.burger-menu.active span:nth-child(2) {
  opacity: 0;
}

.burger-menu.active span:nth-child(3) {
  transform: rotate(45deg) translate(-6px, -6px);
}

.nav-menu {
  display: flex;
}

.project-item {
  color: black;
  height: 100%;
  width: 100%;
  min-height: 300px;
  display: flex;
  flex-direction: column;
}

.project-item img {
  width: 100%;
  height: auto;
  display: block;
}

/**** Portfolio Projekte Container ****/
.Projekte-Container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.Projekte-Spalte {
  display: flex;
  flex-direction: column;
}

/**** Portfolio Projekte (inneres Grid) ****/
.Projekte {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  grid-auto-rows: max-content;
}

/* Filter Buttons */
.filter-buttons {
  margin-bottom: 2em;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5em 1.5em;
  border: 2px solid var(--pink);
  background-color: transparent;
  color: var(--pink);
  font-family: 'Pixelify Sans', monospace;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
  border-radius: 999px;
}

.filter-btn:hover {
  background-color: var(--pink);
  color: #fff;
}

.filter-btn.active {
  background-color: var(--pink);
  color: #fff;
}

/* Cozy button shadow */
.filter-btn {
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

/* Back button styled like filter buttons but using blue */
#project-back {
  padding: 0.5em 1.5em;
  border: 2px solid var(--blau);
  background-color: transparent;
  color: var(--blau);
  font-family: 'Pixelify Sans', monospace;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

#project-back:hover {
  background-color: var(--blau);
  color: #fff;
}

#project-back:active {
  transform: translateY(1px);
}

/* Play-overlay for video posters */
.video-play-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 5px solid var(--blau);;
  color: var(--blau);
  z-index: 5;
}

.video-play-overlay:hover {
  background: rgba(0,0,0,0.6);
  transform: translate(-50%, -50%) scale(1.5);
}

.video-play-overlay svg {
  display: block;
}

/* PDF viewer styles */
.pdf-viewer-wrapper {
  border: 1px solid rgba(0,0,0,0.06);
  padding: 0.75rem;
  background: var(--card);
  border-radius: 8px;
}
.pdf-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.pdf-controls button {
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.06);
  background: white;
  cursor: pointer;
}
.pdf-canvas {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
}

/* Responsive embed (iframe) wrapper - maintains 16:9 aspect ratio */
.embed-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  margin-bottom: 1rem;
}
.embed-wrapper iframe {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.project-item.hidden {
  display: none;
}

/********** contact *****/

#contact-elements {
  display: grid;
  grid-template-columns: 50% 50%;
  margin: 0;
}

#contact-elements h1 {
  font-size: 6em;
  color: var(--pink);
  margin: 0;
}

#contact-elements a {
  font-size: 3.5em;
  display: inline;
  text-decoration: none;
  color: black;
  padding: 0;
  margin: 0;
  width: auto;
}

#contact-elements a:hover {
  text-decoration: underline;
  color: var(--gelb);
  font-weight: 800;
}

.contact-links {
  text-align: right;
  display: grid;
  grid-template-rows: repeat(5, auto);
  grid-gap: 0.5em;
  align-items: center;
}

/* Audio controls overlay (bottom-right) */
.audio-controls {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  align-items: flex-end;
}

/* visually hide native audio elements (we use custom UI) */
.audio-controls audio {
  display: none !important;
}

/* Collapsed circular toggle button */
.audio-toggle {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(245,245,245,0.95));
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid rgba(0,0,0,0.06);
  transition: transform 260ms ease;
}

.audio-toggle span {
  font-size: 20px;
  font-weight: 800;
  color: var(--lila);
}

/* Single widget that expands upward */
.audio-widget {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  transform-origin: bottom right;
}

.audio-panel {
  width: auto;
  background: rgba(255,255,255,0.98);
  border-radius: 12px;
  padding: 0.45rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.16);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  transform-origin: bottom right;
  transform: scaleY(0);
  opacity: 0;
  transition: transform 300ms cubic-bezier(.2,.9,.2,1), opacity 200ms ease;
  overflow: hidden;
}

.audio-panel .audio-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 90px;
}

.audio-entry .label {
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 0.9em;
  color: var(--text);
}

.audio-entry button {
  background: var(--lila);
  color: white;
  border: none;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Pixelify Sans', sans-serif;
}

.audio-toggle span,
.audio-entry .label,
.audio-entry button {
  font-family: 'Pixelify Sans', sans-serif;
}

.audio-entry input[type='range'] {
  width: 80px;
}

.audio-widget.expanded .audio-panel {
  transform: scaleY(1);
  opacity: 1;
}

.audio-widget.expanded > .audio-toggle {
  transform: rotate(45deg);
}

/* Buttons for each audio (compact) */
.audio-btn {
  background: var(--lila);
  color: white;
  border: none;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 0.95em;
  text-transform: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.audio-btn:hover { transform: translateY(-3px); }

.audio-btn.playing {
  background: var(--gelb);
  color: #111;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12) inset;
}

/* Arrange buttons horizontally inside panel */
.audio-panel { flex-wrap: nowrap; }

/* Volume slider styling */
.audio-volume {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 6px;
  background: #ddd;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
}
.audio-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--lila);
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.audio-volume:focus { outline: none; }

/* --- Site Footer --- */
.site-footer {
  background-color: var(--card);
  border-top: 4px solid var(--lila);
  padding: 1.25rem 0;
  color: var(--text);
  margin-top: 3rem;
}
.site-footer .footer-inner {
  max-width: 80%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Roboto Serif', serif;
}
.site-footer .footer-left { font-size: 0.95rem; }
.site-footer .social-links a {
  color: var(--lila);
  text-decoration: none;
  margin-left: 0.9rem;
  font-weight: 500;
}
.site-footer .social-links a:hover { text-decoration: underline; color: var(--pink); }
.site-footer small { color: #666; font-size: 0.9rem; }

@media (max-width: 720px) {
  .site-footer .footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
  .site-footer .social-links a { margin-left: 0.45rem; }
}

/* Prevent the fixed audio-controls from blocking clicks when collapsed */
.audio-controls { pointer-events: none; }
.audio-controls .audio-toggle { pointer-events: auto; }
.audio-widget.expanded, .audio-widget.expanded * { pointer-events: auto; }

/* ========== RESPONSIVE MEDIA QUERIES ========== */

/* Tablets and medium screens */
@media (max-width: 1024px) {
  html, .root {
    font-size: 16px;
  }
  
  main, .article, .file-system {
    max-width: 90%;
  }
  
  .Projekte-Container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  h1, .h1 {
    font-size: 2.2em;
  }
  
  h2, .h2 {
    font-size: 1.75em;
  }
}

/* Small tablets and large phones (landscape) */
@media (max-width: 768px) {
  html, .root {
    font-size: 15px;
  }
  
  main, .article, .file-system {
    max-width: 95%;
  }
  
  nav {
    padding: 1em 0;
  }
  
  .file-system {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  
  .file-system h3 {
    font-size: 1.1em;
  }
  
  .burger-menu {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 72px;
    flex-direction: column;
    background-color: var(--card);
    width: 100%;
    text-align: center;
    transition: left 0.3s ease;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    z-index: 100;
    padding: 2em 0;
    border-bottom: 5px solid var(--lila);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .file-item {
    margin: 1.2em 0;
    margin-left: 0;
  }
  
  .file-item a {
    font-size: 1.2em;
  }
  
  .file-date {
    display: none;
  }
    .audio-controls {
    display: none !important;
  }
    .Projekte-Container {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  h1, .h1 {
    font-size: 2em;
  }
  
  h2, .h2 {
    font-size: 1.5em;
  }
  
  .filter-buttons {
    gap: 0.5rem;
  }
  
  .filter-btn, #project-back {
    padding: 0.4em 1em;
    font-size: 0.9em;
  }
  
  #contact-elements {
    grid-template-columns: 1fr;
    gap: 2em;
  }
  
  #contact-elements h1 {
    font-size: 3.5em;
    text-align: center;
  }
  
  #contact-elements a {
    font-size: 2em;
    text-align: center;
  }
  
  .contact-links {
    text-align: center;
  }
  
  .audio-controls {
    bottom: 0.5rem;
    right: 0.5rem;
  }
  
  .audio-toggle {
    width: 60px;
    height: 60px;
  }
  
  .audio-toggle span {
    font-size: 18px;
  }
}

/* Mobile phones (portrait) */
@media (max-width: 480px) {
  html, .root {
    font-size: 14px;
    line-height: 30px;
  }
  
  main, .article {
    max-width: 100%;
    padding: 0 1em;
  }
  
  .file-system {
    max-width: 100%;
    padding: 0.5em;
  }
  
  nav {
    margin-bottom: 1em;
    border-bottom: 3px solid var(--lila);
  }
  
  h1, .h1 {
    font-size: 1.8em;
    line-height: 1.2em;
    margin-top: 0.5em;
  }
  
  h2, .h2 {
    font-size: 1.3em;
    line-height: 1.3em;
  }
  
  h3, .h3 {
    font-size: 1.2em;
  }
  
  .filter-buttons {
    justify-content: center;
  }
  
  .filter-btn, #project-back {
    padding: 0.35em 0.8em;
    font-size: 0.85em;
  }
  
  #contact-elements h1 {
    font-size: 2.5em;
  }
  
  #contact-elements a {
    font-size: 1.5em;
  }
  
  .site-footer .footer-inner {
    max-width: 95%;
    font-size: 0.85em;
  }
  
  .audio-controls {
    display: none !important;
  }
  
  .video-play-overlay {
    width: 56px;
    height: 56px;
  }
}
