/* Reset & Base Styling */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #0d0d0e;
  color: #ededed;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Header Sesuai Mockup */
.header {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 3.5rem 2rem 1.5rem;
  background-color: transparent;
}

.header-center {
  text-align: center;
  margin-bottom: 2.5rem;
}

.main-title {
  font-size: 2.2rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ededed;
  margin-bottom: 0.4rem;
}

.sub-title {
  font-size: 0.95rem;
  color: #8c8c8e;
  letter-spacing: 0.02em;
}

.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.5rem;
}

/* Kiri: Dropdown Menu CSS */
.nav-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-left > a {
  text-decoration: none;
  color: #ededed;
  font-size: 0.95rem;
  font-weight: 400;
  transition: opacity 0.2s ease;
}

.nav-left > a:hover,
.nav-left > a.active {
  opacity: 0.7;
}

.filter-dropdown {
  position: relative;
}

.filter-trigger {
  background: none;
  border: none;
  color: #ededed;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  transition: opacity 0.2s ease;
}

.filter-trigger:hover,
.filter-trigger.active,
.filter-dropdown.open .filter-trigger {
  opacity: 0.7;
}

.chevron {
  font-size: 0.75rem;
}

/* Submenu Level 1 */
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 150px;
  background-color: #161618;
  border: 1px solid #27272a;
  list-style: none;
  padding: 0.35rem 0;
  z-index: 100;
}

.filter-dropdown.open .dropdown-menu {
  display: block;
}

.has-submenu {
  position: relative;
}

.submenu-trigger,
.submenu button {
  width: 100%;
  background: none;
  border: none;
  color: #d4d4d8;
  font-family: inherit;
  font-size: 0.88rem;
  text-align: left;
  padding: 0.55rem 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.submenu-trigger:hover,
.has-submenu.open > .submenu-trigger,
.submenu button:hover {
  background-color: #27272a;
  color: #ffffff;
}

.arrow-right {
  font-size: 0.75rem;
  color: #71717a;
}

/* Submenu Level 2 */
.submenu {
  display: none;
  position: absolute;
  top: -1px;
  left: calc(100% + 4px);
  min-width: 170px;
  background-color: #161618;
  border: 1px solid #27272a;
  list-style: none;
  padding: 0.35rem 0;
  z-index: 101;
}

.has-submenu.open .submenu {
  display: block;
}

/* Bar Indikator Filter Aktif */
.active-filter-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0 1rem;
  font-size: 0.85rem;
  color: #a1a1aa;
}

#clear-filter-btn {
  background: #1f1f22;
  border: 1px solid #2e2e32;
  color: #ededed;
  font-family: inherit;
  font-size: 0.78rem;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#clear-filter-btn:hover {
  background: #2e2e32;
}

/* Sosial Media Kanan */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-right a {
  color: #ededed;
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.nav-right a:hover {
  opacity: 0.6;
}

/* Main Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.5rem 2rem 6rem;
}

/* MASONRY LAYOUT DIKEMBALIKAN KE CSS COLUMN (PALING STABIL) */
.gallery {
  column-count: 3;
  column-gap: 4px;
}

.project-card {
  break-inside: avoid;
  margin-bottom: 4px;
  display: block;
}

.project-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Video Wrapper */
.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #161618;
  overflow: hidden;
  border-radius: 0;
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, opacity 0.3s ease;
}

.project-card:hover .video-wrapper video {
  opacity: 0.88;
  transform: scale(1.02);
}

.project-meta {
  display: none !important;
}

/* Detail Page Layout */
.detail-container {
  max-width: 960px;
  margin: 0 auto;
  padding-top: 2rem;
}

.detail-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 2rem;
}

.detail-nav a {
  color: #ededed;
  text-decoration: none;
  font-size: 0.95rem;
  transition: opacity 0.2s ease;
}

.detail-nav a:hover {
  opacity: 0.6;
}

.detail-header {
  margin-bottom: 2rem;
}

.detail-title {
  font-size: 2.2rem;
  font-weight: 600;
  color: #ededed;
  letter-spacing: -0.02em;
}

.detail-category {
  color: #71717a;
  font-size: 0.95rem;
  margin-top: 0.4rem;
}

/* Youtube Embed */
.video-embed-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.video-embed-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* STACK MEDIA VERTIKAL DI HALAMAN DETAIL */
.detail-media-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.media-item {
  width: 100%;
  background-color: #0d0d0e;
}

.media-item img,
.media-item video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* Detail Info */
.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  border-top: 1px solid #1f1f22;
  padding-top: 2rem;
}

.info-block h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #71717a;
  margin-bottom: 0.5rem;
}

.info-block p {
  color: #d4d4d8;
  font-size: 0.95rem;
  line-height: 1.6;
}

.info-block.span-full {
  grid-column: span 2;
}

/* Footer */
.footer {
  padding: 3rem;
  text-align: center;
  border-top: 1px solid #18181b;
  color: #52525b;
  font-size: 0.8rem;
}

/* Responsif */
@media (max-width: 900px) {
  .gallery {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .header {
    padding: 2.5rem 1.25rem 1rem;
  }
  .main-title {
    font-size: 1.6rem;
  }
  .nav-bar {
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
  }
  .container {
    padding: 0.5rem 1rem 4rem;
  }
  .gallery {
    column-count: 1;
    column-gap: 8px;
  }
  .project-card {
    margin-bottom: 8px;
  }
  .detail-title {
    font-size: 1.6rem;
  }
  .detail-info-grid {
    grid-template-columns: 1fr;
  }
  .info-block.span-full {
    grid-column: span 1;
  }
  
  .submenu {
    position: static;
    border: none;
    border-left: 1px solid #2e2e32;
    margin-left: 0.85rem;
    padding: 0.2rem 0;
  }
}
