/* =========================== */
/* Page Base */
body.works-page {
  background: #FFFFFF;
  color: #000000;
  font-family: 'Sora', sans-serif; /* main body font */
}

/* =========================== */
/* Works Content Wrapper */
#works-content {
  max-width: 1000px;
  margin: 8rem auto 4rem auto;
  padding: 2rem;
}

/* Page Title */
#works-content h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 3.5rem;
  margin-bottom: 1.25rem;
  text-align: center;
  color: #000;
  font-weight: 700;
}

/* Paragraphs */
#works-content p {
  font-size: 1.2rem;
  line-height: 1.75;
  color: #444;
  margin-bottom: 1.25rem;
  text-align: center;
}

/* ===================== */
/* Filter Tabs */
#filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  max-width: 100%;
}

#filter-bar button {
  padding: 0.7rem 1.5rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  background: transparent;
  border: 1px solid #000;
  color: #000;
  cursor: pointer;
  transition: all 0.2s ease;
}

#filter-bar button:hover {
  background: #000;
  color: #FFF;
}

#filter-bar button.active {
  background: #000;
  color: #FFF;
}

/* Responsive: mobile */
@media (max-width: 768px) {
  #filter-bar {
    gap: 0.5rem;
    padding: 0 1rem;
  }

  #filter-bar button {
    flex: 1 1 100%;
    min-width: unset;
    max-width: unset;
    padding: 0.6rem 0.8rem;
    font-size: 1rem;
  }
}

/* ===================== */
/* Works Page Grid Layout */
#works-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

@media (max-width: 915px) {
  #works-gallery {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.project-card {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 0px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0px;
}

.project-card:hover {
  transform: scale(1.03);
}

/* ===================== */
/* Project Modal / Popup */
#project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95); /* darker shadow behind modal */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  z-index: 1000;
  overflow-y: auto;
  padding: 2rem;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

#project-modal.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#project-modal.hidden {
  display: none;
}

.modal-content {
  background-color: #FFF; /* white modal */
  border: 1px solid #DDD; /* squared border */
  border-radius: 0;        /* squared */
  max-width: 900px;
  width: 100%;
  padding: 2rem;
  box-sizing: border-box;
  position: relative;
}

/* Medium screens */
@media (max-width: 1200px) {
  .modal-content {
    max-width: 700px;
    padding: 1.8rem;
  }
}

/* Small screens */
@media (max-width: 768px) {
  .modal-content {
    max-width: 95%; /* fixes offscreen issue */
    padding: 1.5rem;
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: #000;
  cursor: pointer;
  font-weight: bold;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #4FC3F7;
}

.modal-body {
  margin-top: 2rem;
}

.modal-body h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 2.5rem;
  color: #000000;
  margin-top: 0;
  margin-bottom: 1rem;
  text-align: center;
}

.modal-body p {
  font-family: 'Sora', sans-serif;
  color: #333;
  margin-bottom: 1.5rem;
  text-align: left;
  white-space: pre-line;
}

/* ===================== */
/* Audio Boxes */
.modal-audio {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid #DDD;
  border-radius: 0;  /* squared */
  background-color: #FFF;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-sizing: border-box;
}

.modal-audio p.label {
  font-family: 'Sora', sans-serif;
  font-weight: bold;
  color: #222;
  font-size: 1rem;
  margin: 0;
}

.modal-audio p.desc {
  font-family: 'Sora', sans-serif;
  font-size: 0.95rem;
  color: #444;
  margin: 0 0 0.5rem 0;
}

.modal-audio .player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-audio .play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%; 
  border: 1px solid currentColor;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}

.modal-audio .transport {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-audio .progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(0, 0, 0, 0.2); /* darker progress bar */
  border-radius: 0;
  position: relative;
  cursor: pointer;
}

.modal-audio .progress-fill {
  height: 100%;
  width: 0%;
  background: #222;
  border-radius: 0;
}

.modal-audio .time {
  font-family: 'Sora', sans-serif;
  font-size: 12px;
  opacity: 0.8;
  white-space: nowrap;
}

/* ===================== */
/* Video Boxes – match audio boxes */
.modal-video-box {
  background-color: #FFF;
  border: 1px solid #DDD;
  border-radius: 0;
  padding: 1rem;
  margin-bottom: 1.5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal-video-box .label {
  font-family: 'Sora', sans-serif;
  font-weight: bold;
  color: #222;
  font-size: 1rem;
  margin: 0;
}

.modal-video-box .desc {
  font-family: 'Sora', sans-serif;
  font-size: 0.95rem;
  color: #444;
  margin: 0 0 0.75rem 0;
}

.modal-video-box iframe {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  display: block;
}

/* ===================== */
/* SoundCloud Boxes – match audio/video boxes */
.modal-soundcloud-box {
  background-color: #FFF;
  border: 1px solid #DDD;
  border-radius: 0; /* squared */
  padding: 1rem;
  margin-bottom: 1.5rem;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* space between label and description */
}

/* Label and body text inside SoundCloud boxes – match audio/video boxes */
.modal-soundcloud-box .label {
  font-weight: bold;
  color: #222;   /* darker label */
  font-size: 1rem;  /* match audio/video label size */
  margin: 0;
}

.modal-soundcloud-box .desc {
  font-size: 0.95rem;  /* match audio/video description */
  color: #555;         /* slightly lighter */
  margin: 0 0 0.75rem 0;
}

.modal-soundcloud-box p.label,
.modal-soundcloud-box p.desc {
  font-family: 'Sora', sans-serif;
}

.modal-soundcloud-box iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  display: block;
}

/* ===================== */
/* Text / External Link Boxes */
.modal-text-box {
  background-color: #FFF;
  border: 1px solid #DDD;
  border-radius: 0;       /* squared */
  padding: 1rem;
  margin-bottom: 1.5rem;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal-text-box .label {
  font-family: 'Sora', sans-serif;
  font-weight: bold;
  color: #222;      /* match audio/video labels */
  font-size: 1rem;
  margin: 0;
}

.modal-text-box .modal-external-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: #222;           /* consistent dark text */
  text-decoration: underline;
  font-size: 0.95rem;
  transition: opacity 0.15s ease;
}

.modal-text-box .modal-external-link:hover {
  opacity: 0.7;
}

/* ===================== */
/* Mini Floating Waveform */
#mini-waveform {
  position: fixed;
  bottom: 20px;
  left: 1.5rem;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 50px;
  width: 120px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#mini-waveform.show {
  opacity: 1;
  transform: translateY(0);
}

.wave-bar {
  background-color: #4FC3F7;
  width: 4px;
  height: 10%;
  transition: height 0.05s linear;
  border-radius: 2px;
}

@keyframes wave {
  0%, 100% { height: 10px; }
  50% { height: 40px; }
}

@media (max-width: 1015px) {
  #mini-waveform {
    display: none;
  }
}

/* ===================== */
/* Responsive adjustments */
@media (max-width: 768px) {
  #works-gallery {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-sample-row {
    flex-direction: column;
  }

  .sample-text,
  .sample-audio {
    flex: 1 1 100%;
  }
}

