:root {
  /* ===== Base Colors ===== */
  --color-bg-light-pink: #fdeaf1;
  --color-bg-pink-gradient-start: #ffe0f1;
  --color-bg-pink-gradient-end: #faf9f9;
  --color-bg-white: #fdfdfd;

  --color-pink-primary: #c56a8d;
  --color-pink-soft: #ee84ac;
  --color-pink-medium: #e79fb6;
  --color-rose-mauve: #caa1ad;
  --color-rose-deep: #9b6884;
  --color-rose-light: #cbbebe;

  --color-button-bg: #e9afc3;
  --color-button-hover: #d497ad;

  --color-card-bg: rgba(255, 255, 255, 0.6);
  --color-card-border: #cbbebe;

  --color-shadow-soft: rgba(155, 104, 132, 0.2);
  --color-shadow-strong: rgba(155, 104, 132, 0.4);

  /* ===== Text Colors ===== */
  --color-text-primary: #502020; /* untuk heading besar (Portfolio, Titles) */
  --color-text-secondary: #6d4b57; /* untuk paragraf dan deskripsi */
  --color-text-light: #fff8fb; /* teks di atas background gelap */
  --color-text-accent: #c56a8d; /* link hover, highlight */

  /* Fonts */
  --font-primary: 'Radley', sans-serif;
  --font-secondary: 'Carlito', sans-serif;

  /* Spacing System (8px base) */
  --space-1: 0.5rem; /* 8px */
  --space-2: 1rem; /* 16px */
  --space-3: 1.5rem; /* 24px */
  --space-4: 2rem; /* 32px */
  --space-6: 3rem; /* 48px */
  --space-8: 4rem; /* 64px */
  --space-12: 6rem; /* 96px */
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  background: url('../assets/images/background-pattern.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow-x: hidden;
  max-width: 100vw;
  line-height: 1.6;
}

main {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Fonts */
.radley {
  font-family: var(--font-primary);
}

.carlito {
  font-family: var(--font-secondary);
}

/* ============================================
     DEBUG SCREENS (Remove in Production)
     ============================================ */
.debug-screens::before {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  padding: 0.25rem 0.5rem;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  pointer-events: none;
  content: 'xs';
}

@media (min-width: 640px) {
  .debug-screens::before {
    content: 'sm';
    background: red;
  }
}

@media (min-width: 768px) {
  .debug-screens::before {
    content: 'md';
    background: blue;
  }
}

@media (min-width: 1024px) {
  .debug-screens::before {
    content: 'lg';
    background: green;
  }
}

@media (min-width: 1280px) {
  .debug-screens::before {
    content: 'xl';
    background: rgb(133, 133, 1);
  }
}

@media (min-width: 1536px) {
  .debug-screens::before {
    content: '2xl';
    background: purple;
  }
}

/* ============================================
     LAYOUT UTILITIES
     ============================================ */
.my-container {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--space-2);
}

.my-section {
  padding-block: 64px;
}

/* Responsive Container Widths */
@media (min-width: 640px) {
  .my-container {
    max-width: 640px;
  }
  .my-section {
    padding-block: 120px;
  }
}

@media (min-width: 768px) {
  .my-container {
    max-width: 800px;
  }
  .my-section {
    padding-block: 120px;
  }
}

@media (min-width: 1024px) {
  .my-container {
    max-width: 960px;
  }
  .my-section {
    padding-block: 120px;
  }
}

@media (min-width: 1280px) {
  .my-container {
    max-width: 1024px;
  }
  .my-section {
    padding-block: 120px;
  }
}

@media (min-width: 1536px) {
  .my-container {
    max-width: 1080px;
  }
  .my-section {
    padding-block: 120px;
  }
}

.header-navbar {
  position: fixed;
  top: var(--space-4);
  width: 100%;
  z-index: 999;
  margin: 0 auto;
  transition: top 0.3s ease-in-out;
}

.nav-links {
  display: none;
  justify-content: center;
  align-items: center;
  border-radius: 50px;
  gap: var(--space-8);
  padding: 12px 64px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  z-index: 1;
  overflow: hidden;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-links::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: 50px;
  background: linear-gradient(to right, #9b6884, #cbbebe);

  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  z-index: -1;
}

.nav-link {
  text-decoration: none;
  &:hover {
    transform: scale(1.05);
  }
}

.mobile-nav-button {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  padding: 12px;
  aspect-ratio: 1/1;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  z-index: 1;
  cursor: pointer;
  overflow: hidden;
}

@media (min-width: 768px) {
  .mobile-nav-button {
    display: none;
  }
}

.mobile-nav-button::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: 50px;
  background: linear-gradient(to right, #9b6884, #cbbebe);

  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  z-index: -1;
}

.nav-links-mobile {
  display: flex;
  position: absolute;
  right: 16px;
  top: 54px;
  width: fit-content;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 24px;
  gap: var(--space-2);
  backdrop-filter: blur(8px);
  padding: 24px 32px;
  background: rgba(255, 255, 255, 0.4);
}

.nav-links-mobile::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: 24px;
  background: linear-gradient(to right, #9b6884, #cbbebe);

  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  z-index: -1;
}

@media (min-width: 768px) {
  .nav-links-mobile {
    display: none;
  }
}

.nav-links-mobile-item {
  list-style: none;
}

.nav-links-mobile-item a {
  text-decoration: none;
  &:hover {
    transform: scale(1.05);
  }
}

.video-gradient-overlay {
  position: absolute;
  bottom: -100px;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to bottom, transparent, #ffe0f18a, transparent);
  pointer-events: none;
  z-index: 1;
}

.typed::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 0.8em;
  margin-top: -10px;
  margin-left: 2px;
  margin-right: -14px;
  vertical-align: middle;
  background: var(--color-text-primary);
  animation: blink 1s steps(2, start) infinite;
}

footer .typed::after {
  background: var(--color-text-light);
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

/* ============================================
     ACCORDION COMPONENT
     ============================================ */
.accordion-item {
  margin-bottom: 12px;
  overflow: hidden;
  height: auto;
}

.accordion-item:last-child {
  margin-bottom: 0;
}

.accordion-item.active {
  margin-bottom: -16px;
}

.accordion-header {
  background: var(--color-pink-primary);
  color: var(--color-text-light);
  cursor: pointer;
  border-radius: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  font-weight: 900;
  transition: all 0.3s ease-in-out;
  position: relative;
}

.accordion-header h4 {
  font-size: 1.25rem;
  line-height: 1.25rem;
  font-family: var(--font-primary);
  font-style: italic;
  font-weight: 400;
}

.accordion-header:hover {
  background: var(--color-pink-soft);
}

.accordion-header i {
  font-size: 1.2rem;
  transition: transform 0.3s ease-in-out;
}

.accordion-header.active i {
  transform: rotate(180deg);
}

.accordion-header.active {
  border-radius: 28px 28px 0 0;
}

@media (min-width: 768px) {
  .accordion-header {
    padding: 16px 32px;
  }
  .accordion-header h4 {
    font-size: 1.5rem;
  }
  .accordion-header i {
    font-size: 1.2rem;
  }
}

.accordion-content {
  position: relative;
  height: 0;
  top: -34px;
  z-index: -1;
  overflow: hidden;
  background: var(--color-bg-white);
  border-radius: 28px;
}

.accordion-body {
  padding: 46px 32px 24px 32px;
  color: var(--color-text-primary);
}

@media (min-width: 640px) {
  .accordion-body {
    padding: 46px 32px 16px 32px;
  }
}

@media (min-width: 768px) {
  .accordion-body {
    padding: 46px 32px 16px 32px;
  }
}

/* Accordion Content Sections */
.accordion-skill-section,
.accordion-education-section,
.accordion-experience-section {
  margin-bottom: 10px;
}

.accordion-skill-section:last-child,
.accordion-education-section:last-child,
.accordion-experience-section:last-child {
  margin-bottom: 0;
}

.accordion-skill-title {
  font-weight: bold;
  margin-bottom: 10px;
}

.accordion-skill-list {
  list-style: none;
  padding-left: 20px;
}

.accordion-skill-list li {
  position: relative;
  padding-left: 15px;
}

.accordion-skill-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  top: -2px;
  font-size: 1.3rem;
  font-weight: bold;
}

/* ============================================
     MODAL COMPONENT
     ============================================ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.modal-container {
  position: relative;
  z-index: 1;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.modal.active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-content {
  background: rgba(80, 32, 32, 0.9);
  border-radius: 24px;
  padding: 2rem;
  position: relative;
  height: 90vh;
  overflow-y: auto;
}

.modal-content.no-container {
  padding: 0;
  height: 100%;
  max-width: 100%;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(80, 32, 32, 0.9);
  color: var(--color-text-light);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-content.no-container .modal-close {
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
}

.modal-close:hover {
  transform: scale(1.2);
}

.modal-close:active {
  transform: rotate(90deg) scale(0.95);
}

.modal-gallery {
  margin-top: 1rem;
}

.modal-gallery img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive adjustments - Mobile (<640px) */
@media (max-width: 639px) {
  .modal-container {
    max-width: 90%;
    max-height: 85vh;
  }

  .modal-content {
    padding: 1rem;
    border-radius: 16px;
    height: fit-content;
  }

  .modal-content.no-container {
    height: auto;
  }

  .modal-close {
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .modal-content.no-container .modal-close {
    top: 0.5rem;
    right: 0.5rem;
  }

  .modal-content img {
    max-width: 100%;
    height: auto;
    max-height: calc(85vh - 2rem);
    object-fit: contain;
  }

  .modal-content h2 {
    font-size: 1.5rem !important;
    padding-right: 2.5rem;
  }
}

/* Responsive adjustments - md and above (≥768px) */
@media (min-width: 768px) {
  .modal-content {
    padding: 2.5rem;
  }

  .modal-close {
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
  }
}

/* ============================================
     LAYOUT SECTION - FOLDER SLIDES
     ============================================ */
.layout-slide-folder-1,
.layout-slide-folder-2 {
  user-select: none;
}

.folder-wrapper {
  pointer-events: none;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-inside-slide-folder-1,
.content-inside-slide-folder-2 {
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile: Smaller translate values */
@media (max-width: 494px) {
  .layout-slide-folder-1 .folder-wrapper {
    transform: translateX(460px);
  }

  .layout-slide-folder-1.active .folder-wrapper {
    transform: translateX(100px);
  }

  .layout-slide-folder-2 .folder-wrapper {
    transform: translateX(-360px);
  }

  .layout-slide-folder-2.active .folder-wrapper {
    transform: translateX(-20px);
  }
}

@media (min-width: 495px) and (max-width: 639px) {
  .layout-slide-folder-1 .folder-wrapper {
    transform: translateX(460px);
  }

  .layout-slide-folder-1.active .folder-wrapper {
    transform: translateX(100px);
  }

  .layout-slide-folder-2 .folder-wrapper {
    transform: translateX(-360px);
  }

  .layout-slide-folder-2.active .folder-wrapper {
    transform: translateX(-40px);
  }
}

/* Tablet and above: Medium translate values */
@media (min-width: 640px) {
  .layout-slide-folder-1 .folder-wrapper {
    transform: translateX(600px);
  }

  .layout-slide-folder-1.active .folder-wrapper {
    transform: translateX(120px);
  }

  .layout-slide-folder-2 .folder-wrapper {
    transform: translateX(-600px);
  }

  .layout-slide-folder-2.active .folder-wrapper {
    transform: translateX(-120px);
  }
}

/* Desktop (lg and above): Original translate values */
@media (min-width: 1024px) {
  .layout-slide-folder-1 .folder-wrapper {
    transform: translateX(1000px);
  }

  .layout-slide-folder-1.active .folder-wrapper {
    transform: translateX(240px);
  }

  .layout-slide-folder-2 .folder-wrapper {
    transform: translateX(-1000px);
  }

  .layout-slide-folder-2.active .folder-wrapper {
    transform: translateX(-240px);
  }
}

.layout-slide-folder-1,
.layout-slide-folder-2 {
  pointer-events: all;
}

.folder-image {
  pointer-events: none;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.content-inside-slide-folder-1,
.content-inside-slide-folder-2 {
  pointer-events: none;
  z-index: 10;
}

.content-inside-slide-folder-1 img,
.content-inside-slide-folder-2 img {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

/* ============================================
     BRANDING SECTION - CONTENT
     ============================================ */
.branding-content-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--color-bg-white);
  border-radius: 24px;
  padding: 1.6rem;
  transition: all 0.3s ease;

  &:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }
}

.branding-content-card .img-wrapper {
  margin-bottom: 1.4rem;
}

.branding-content-card img {
  aspect-ratio: 1/1;
  border-radius: 14px;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.branding-content-card .description {
  font-size: 14px;
  line-height: 20px;
  color: var(--color-text-primary);
  font-family: var(--font-secondary);
  text-align: center;
  margin-bottom: 1.4rem;
}

.branding-content-card button {
  background-color: var(--color-pink-primary);
  font-size: 1.4rem;
  font-family: var(--font-primary);
  font-style: italic;
  color: var(--color-text-light);
  border: none;
  border-radius: 999px;
  padding: 4px 32px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: fit-content;
  margin-top: auto;

  &:hover {
    transform: scale(1.1);
    background-color: var(--color-pink-soft);
  }
}

/* ============================================
     VIDEO PROJECTS SECTION - CONTENT
     ============================================ */
.video-projects-content-container {
  display: flex;
  flex-direction: column;
  gap: 4rem;

  @media (min-width: 768px) {
    flex-direction: row;
  }
}

.video-project-item {
  position: relative;
  flex: 1;
}

.video-card {
  position: relative;
  width: 100%;
  height: 320px;
  margin-bottom: 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-card:hover {
  transform: scale(1.02);
}

.folder-tab {
  position: absolute;
  top: 0;
  left: 0;
  width: 160px;
  height: 64px;
  background: var(--color-pink-soft);
  border-radius: 20px 20px 0 0;
  z-index: 1;
  box-shadow: 0 -2px 8px rgba(197, 106, 141, 0.15);
}

.folder-header {
  position: absolute;
  top: 24px;
  left: 0;
  width: 100%;
  z-index: 2;
  height: calc(100% - 24px);
  background: var(--color-pink-soft);
  border-radius: 0 32px 32px 32px;
}

.folder-body {
  position: absolute;
  top: 64px;
  left: 0;
  z-index: 3;
  width: 100%;
  height: calc(100% - 32px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 32px;
  background: var(--color-bg-white);
  border-radius: 20px;
}

.video-thumbnail {
  width: 80%;
  aspect-ratio: 14/9;
  background: var(--color-pink-primary);
  border-radius: 20px;
  cursor: pointer;
}

.video-thumbnail iframe {
  width: 100%;
  height: 100%;
  border-radius: 20px;
}

/* ============================================
     FOOTER SECTION - CONTENT
     ============================================ */
.divider {
  width: 100%;
  height: 1px;
  background: var(--color-text-light);
  margin-block: 4px;
}
