/* ==================== 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);
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Helvetica Neue', sans-serif;
  overflow: hidden;
}

/* ==================== HEADER (Same as index) ==================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  box-sizing: border-box;
}

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

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

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

.top-controls {
  display: flex;
  gap: 1rem;
  z-index: 101;
  position: relative;
}

.top-controls button {
  background: rgba(255, 255, 255, 0.3);
  border: none;
  font-size: 1.2rem;
  color: var(--text);
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

[data-theme="dark"] .top-controls button {
  background: rgba(0, 0, 0, 0.3);
}

/* ==================== LAYOUT ==================== */
.about-page {
  display: flex;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

.text-content {
  flex: 1;
  padding: 6rem 4rem 4rem 6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1;
}

.about-title {
  font-size: 2.8rem;
  margin: 0 0 1rem 0;
}

.about-line {
  width: 80px;
  height: 2px;
  background-color: var(--text);
  margin-bottom: 2rem;
}

.about-description {
  font-size: 1.1rem;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
  line-height: 1.8;
  max-width: 520px;
}

.about-resume {
  margin-top: 2.5rem;
  font-size: 1rem;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  width: fit-content;
  position: relative;
  line-height: 1;
  transition: transform 0.3s ease;
}

.about-resume::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  background-color: var(--text);
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.about-resume:hover::after {
  transform: scaleX(1);
}


/* ==================== PHOTO ==================== */
.photo-container {
  flex: 1;
  height: 100vh;
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 0;
  overflow: hidden;
  z-index: 0;
}

.photo-container img {
  height: 100vh;
  width: auto;
  border-bottom-left-radius: 3rem;
  object-fit: cover;
  margin-right: 0;
  position: relative;
  top: 0;
  right: 0;
  display: block;
  max-width: none;
}

@media (max-width: 768px) {
  .about-page {
    flex-direction: column;
    height: auto;
  }

  .photo-container {
    order: -1;
    width: 100%;
    height: auto;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin-top: 4.5rem; /* ✅ beri jarak dari navbar */
  }

  .photo-container img {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: cover;
    border-bottom-left-radius: 1.5rem;
  }

  .text-content {
    padding: 2.5rem 1.5rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .about-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: left;
  }

  .about-line {
    margin-bottom: 1.5rem;
  }

  .about-description {
    font-size: 1rem;
    max-width: 100%;
    margin-bottom: 1.5rem;
  }

  .about-resume {
    margin-top: 0;
  }
}

/* ==================== OVERLAY ==================== */
.overlay {
  position: fixed;
  inset: 0;
  background-color: var(--bg);
  color: var(--text);
  z-index: 999;
  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;
  text-decoration: none;
  color: var(--text);
}

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

.brand-text {
  font-weight: 500;
  font-size: 0.9rem;
}

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

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

.overlay-content {
  position: absolute;
  top: 50%;
  left: 12vw;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

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

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

.overlay-nav li {
  font-size: 2.8rem;
  font-weight: bold;
  margin: 1rem 0;
  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;
  align-self: flex-start; /* ✅ sejajarkan kiri */
  margin-top: 1rem;
}

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

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

.overlay-blobs {
  position: absolute;
  left: 2rem;
  top: 30%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  pointer-events: none;
}

.overlay-blobs img {
  width: 120px;
  height: auto;
  object-fit: contain;
}

@media (max-width: 768px) {
  .overlay-content {
    left: 5vw;
  }

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

  .overlay-blobs img {
    width: 80px;
  }
}

/* Light Mode */
[data-theme="light"] .logo,
[data-theme="light"] .brand-logo {
  filter: invert(0%); /* Hitam atau warna asli */
}

/* Dark Mode */
[data-theme="dark"] .logo,
[data-theme="dark"] .brand-logo {
  filter: invert(100%); /* Membalik warna, jadi putih jika awalnya hitam */
}

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

/* Khusus ikon sun di dark mode: lebih cerah dan scale normal */
[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);
}

/* Khusus ikon moon: sedikit lebih kecil supaya proporsional */
#modeToggle img[src*="moon.svg"],
#modeToggleOverlay img[src*="moon.svg"] {
  transform: scale(0.79);
}

/* Hover efek untuk ikon (sedikit membesar dan lebih cerah) */
#modeToggle:hover img,
#modeToggleOverlay:hover img {
  filter: brightness(1.5);
  transform: scale(1.1);
}

/* Hover efek khusus dark mode + ikon sun */
[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);
}

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