/* ========== ROOT THEME ========== */
:root {
  --bg-light: #ffffff;
  --bg-dark: #0e0e0e;
  --text-light: #000000;
  --text-dark: #efefef;
  --accent: #ff0000;
}

[data-theme="light"] {
  --bg: var(--bg-light);
  --text: var(--text-light);
}
[data-theme="dark"] {
  --bg: var(--bg-dark);
  --text: var(--text-dark);
}

/* ========== GLOBAL RESET & LOCK SCROLL HORIZONTAL ========== */
html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Helvetica Neue', sans-serif;
  overflow-x: hidden; /* LOCK supaya gak bisa scroll horizontal */
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

/* ========== WRAPPER MAIN SECTION ========== */
.work-detail-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
  box-sizing: border-box;
}

/* ========== HEADER ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
}

.logo img {
  width: 50px;
  height: auto;
}

.logo span {
  font-weight: bold;
  text-transform: uppercase;
}

.top-controls {
  display: flex;
  gap: 1rem;
}

.top-controls button {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text);
  cursor: pointer;
}

/* ===== HERO IMAGE ===== */
.hero-image {
  max-width: 1000px;
  width: 100%;
  margin: 5rem auto 2rem auto; /* vertical margin + center horizontally */
  overflow: hidden;
  display: flex;
  justify-content: center; /* center content horizontal */
  align-items: center;
  padding: 0 1rem; /* beri sedikit padding supaya tidak mepet */
  box-sizing: border-box;
}

.hero-image img {
  width: 100%;
  max-width: 1000px;
  height: auto;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  display: block;
}

/* ========== PROJECT TITLE ========== */
.project-title {
  font-size: 3rem;
  font-weight: bold;
  text-align: center;
  margin-top: 7rem;
}

.work-line {
  height: 1px;
  background-color: var(--text);
  opacity: 0.5;
  margin: 1.2rem auto 2.2rem;
  width: 90%;
}

/* ========== PROJECT INFO ========== */
.project-info-columns {
  display: flex;
  justify-content: space-between;
  gap: 4rem;
  padding: 2rem;
  max-width: 1100px;
  margin: 0 auto 3rem auto;
  box-sizing: border-box;
  width: 100%;
}

.col-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.info-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  align-items: start;
}

.info-row h3 {
  font-size: 1rem;
  font-weight: bold;
  margin: 0;
  line-height: 1.5;
}

.info-multi p {
  margin: 0 0 0.2rem 0;
  font-size: 0.95rem;
  font-family: 'Courier New', Courier, monospace;
}

.col-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  font-size: 1rem;
  font-family: 'Courier New', Courier, monospace;
  line-height: 1.6;
}

/* ========== PROJECT PHOTOS ========== */
.project-photos {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  max-width: 1000px;
  margin: 2rem auto 3rem;
  width: 100%;
  box-sizing: border-box;
}

.project-photos img {
  width: 100%;
  border-radius: 16px;
  max-width: 900px;
  height: auto;
  object-fit: cover;
}

.project-photos figcaption {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  color: var(--text);
  opacity: 0.7;
}

/* ========== FOOTER NEXT PROJECT ========== */
.footer-next-project {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  max-width: 1100px;
  margin: 0 auto 4rem auto;
  box-sizing: border-box;
  width: 100%;
}

.footer-left {
  text-decoration: none;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-left:hover,
.footer-right:hover {
  color: var(--accent);
}

.arrow {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.footer-left:hover .arrow {
  transform: translateX(5px);
}

/* ========== OVERLAY MENU ========== */
.overlay {
  position: fixed;
  inset: 0;
  background-color: var(--bg);
  color: var(--text);
  z-index: 9999;
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.4s ease;
}

.overlay.visible {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.overlay-header {
  position: absolute;
  top: 2rem;
  left: 2rem;
  right: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.overlay-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  width: 50px;
  height: auto;
}

.brand-text {
  font-size: 1rem;
}

.overlay-controls button {
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  margin-left: 1rem;
}

.close-btn {
  font-size: 1.6rem;
}

.overlay-content {
  position: absolute;
  top: 50%;
  left: 10vw;
  transform: translateY(-50%);
}

.overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.overlay-nav {
  list-style: none;
  margin: 0 0 2rem 0;
  padding: 0;
}

.overlay-nav li {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  font-weight: bold;
  display: flex;
  align-items: center;
}

.overlay-nav .index {
  font-size: 0.9rem;
  margin-right: 0.8rem;
  opacity: 0.6;
}

.overlay-nav a {
  color: var(--text);
  text-decoration: none;
}

.overlay-nav a:hover {
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.social-links a {
  color: var(--text);
  text-decoration: none;
  position: relative;
}

.social-links a:hover {
  color: var(--accent);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .work-detail-section {
    padding: 0 1.5rem; /* padding kiri kanan utama */
  }

  .project-info-columns {
    flex-direction: column;
    gap: 2rem;
    padding: 0 1.5rem; /* padding kiri kanan agar simetris */
  }

  .footer-next-project {
    flex-direction: column;
    gap: 1rem;
    text-align: left;
    padding: 0 1.5rem; /* padding kiri kanan footer */
  }

  .overlay-nav li {
    font-size: 2rem;
  }

  .overlay-content {
    left: 5vw;
  }

  .hero-image {
    padding: 0 0.5rem; /* sedikit padding agar image tidak nempel ke pinggir */
  }
}

/* ========== THEME ICONS ========== */
[data-theme="light"] .logo,
[data-theme="light"] .brand-logo {
  filter: invert(0%);
}

[data-theme="dark"] .logo,
[data-theme="dark"] .brand-logo {
  filter: invert(100%);
}

#modeToggle img,
#modeToggleOverlay img {
  width: 24px;
  height: 24px;
  transition: filter 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  object-fit: contain;
}

[data-theme="dark"] #modeToggle img[src*="sun.svg"],
[data-theme="dark"] #modeToggleOverlay img[src*="sun.svg"] {
  filter: brightness(2.5) contrast(1.2);
  transform: scale(1);
}

#modeToggle img[src*="moon.svg"],
#modeToggleOverlay img[src*="moon.svg"] {
  transform: scale(0.79);
}

#modeToggle:hover img,
#modeToggleOverlay:hover img {
  filter: brightness(1.5);
  transform: scale(1.1);
}

[data-theme="dark"] #modeToggle:hover img[src*="sun.svg"],
[data-theme="dark"] #modeToggleOverlay:hover img[src*="sun.svg"] {
  filter: brightness(3) contrast(1.3);
  transform: scale(1.1);
}

#modeToggle:hover img[src*="moon.svg"],
#modeToggleOverlay:hover img[src*="moon.svg"] {
  transform: scale(0.9);
}
