/* ============================================================
   WARKOP.RAFA — Portfolio Theme
   Warna dominan: Hijau • Putih • Merah (ala Indomie)
   ============================================================ */

:root {
  --green: #128c4a;
  --green-dark: #0b6b38;
  --green-deep: #07482a;
  --green-light: #e8f5ec;
  --red: #e2231a;
  --red-dark: #b81811;
  --white: #ffffff;
  --cream: #fffdf6;
  --ink: #1d2b24;
  --muted: #5c6b62;
  --line: #dfe9e1;
  --shadow: 0 18px 45px rgba(7, 72, 42, 0.12);
  --radius: 20px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
}

.container {
  width: min(1140px, 90%);
  margin: 0 auto;
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0;
  z-index: 200;
  background: linear-gradient(90deg, var(--red), var(--green));
  border-radius: 0 4px 4px 0;
  transition: width 0.1s linear;
}

/* ===== PRELOADER ===== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(226, 35, 26, 0.18), transparent 40%),
    var(--green-deep);
  transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.6s ease;
}

.preloader.done {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-100%);
}

.preloader-inner {
  text-align: center;
  color: var(--white);
}

.preloader-cup {
  font-size: 4rem;
  line-height: 1;
  animation: cupBounce 1.2s ease-in-out infinite;
}

@keyframes cupBounce {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-14px) rotate(6deg); }
}

.preloader-text {
  margin-top: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: #bff2cf;
}

.preloader-bar {
  width: 170px;
  height: 5px;
  margin: 1rem auto 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  overflow: hidden;
}

.preloader-bar span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--red), #ffd166, var(--red));
  animation: loadBar 1.1s ease-in-out infinite;
}

@keyframes loadBar {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}

/* ===== CONFETTI ===== */
.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 500;
  pointer-events: none;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 5%;
  background: rgba(255, 253, 246, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 6px 24px rgba(7, 72, 42, 0.08);
  border-bottom-color: var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--green-deep);
  letter-spacing: -0.02em;
}

.brand-cup {
  display: inline-block;
  font-size: 1.6rem;
  line-height: 1;
}

.brand:hover .brand-cup {
  animation: wobble 0.65s ease;
}

@keyframes wobble {
  0%, 100% { transform: rotate(0) scale(1); }
  25% { transform: rotate(-16deg) scale(1.12); }
  50% { transform: rotate(12deg); }
  75% { transform: rotate(-6deg); }
}

.brand-dot {
  color: var(--red);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  position: relative;
  overflow: hidden;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.55;
  transition: width 0.25s ease, left 0.25s ease;
}

.nav-link:hover::after {
  width: 45%;
  left: 27.5%;
}

.nav-link:hover {
  color: var(--green-dark);
  background: var(--green-light);
}

.nav-link.active {
  color: var(--white);
  background: var(--green);
}

/* ----- Language switch ----- */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: var(--green-light);
  border: 1px solid #c7e9d2;
}

.lang-btn {
  position: relative;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.lang-btn:hover {
  transform: scale(1.08);
}

.lang-btn.active {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 3px 8px rgba(18, 140, 74, 0.25);
}

.lang-divider {
  width: 1px;
  height: 14px;
  background: #b6dcc3;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  border-radius: 3px;
  background: var(--green-deep);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ===== PAGE / SECTION COMMON ===== */
.page {
  position: relative;
  padding: 7.5rem 0 5.5rem;
  overflow: hidden;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  margin-bottom: 2.6rem;
}

.section-number {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--red);
  opacity: 0.9;
}

.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 0.3rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--green-deep);
}

.section-subtitle {
  color: rgba(255, 255, 255, 0.8);
  margin-top: 0.7rem;
  max-width: 560px;
}

.section-heading--light .section-kicker {
  color: #bff2cf;
}

.section-heading--light .section-title {
  color: var(--white);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 12% 18%, rgba(226, 35, 26, 0.07), transparent 30%),
    radial-gradient(circle at 88% 82%, rgba(18, 140, 74, 0.1), transparent 35%),
    var(--cream);
}

.hero-decor {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

.hero-decor--left {
  width: 340px;
  height: 340px;
  left: -170px;
  bottom: -120px;
  background: var(--green-light);
}

.hero-decor--right {
  width: 220px;
  height: 220px;
  right: -90px;
  top: 90px;
  border: 26px solid rgba(226, 35, 26, 0.08);
}

/* ----- Partikel terbang di hero ----- */
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  bottom: -48px;
  opacity: 0;
  will-change: transform, opacity;
  animation-name: floatParticle;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes floatParticle {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  12% { opacity: 0.55; }
  88% { opacity: 0.3; }
  100% { transform: translate3d(var(--drift, 24px), -108vh, 0) rotate(200deg); opacity: 0; }
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.4rem;
}

.eyebrow-line {
  display: inline-block;
  width: 34px;
  height: 3px;
  border-radius: 3px;
  background: var(--red);
}

.hero-sapa {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.5vw, 4.8rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--green-deep);
  margin-bottom: 1.3rem;
}

.hero-title span {
  position: relative;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--green) 0%, var(--green-dark) 25%, var(--red) 50%, var(--green-dark) 75%, var(--green) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: shimmerText 8s linear infinite;
}

@keyframes shimmerText {
  0% { background-position: 0% 50%; }
  100% { background-position: 250% 50%; }
}

.hero-title span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 100%;
  height: 10px;
  background: rgba(226, 35, 26, 0.18);
  z-index: -1;
  transform: rotate(-1.5deg);
}

/* ----- Typewriter ----- */
.type-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: -0.4rem 0 1.2rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--muted);
  min-height: 1.7rem;
}

.type-label {
  color: var(--green-dark);
}

.type-text {
  color: var(--red);
  font-weight: 800;
}

.type-cursor {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background: var(--red);
  animation: blink 0.75s step-end infinite;
}

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

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.badge {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.badge--green {
  background: var(--green-light);
  color: var(--green-dark);
  border: 1px solid #c7e9d2;
}

.badge--red {
  background: rgba(226, 35, 26, 0.1);
  color: var(--red-dark);
  border: 1px solid rgba(226, 35, 26, 0.2);
}

.hero-desc {
  max-width: 540px;
  color: var(--muted);
  font-size: 1.02rem;
  margin-bottom: 2rem;
}

.hero-desc strong {
  color: var(--green-dark);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2.4rem;
}

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -140%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  animation: btnShine 3.8s ease-in-out infinite;
}

@keyframes btnShine {
  0%, 55% { left: -140%; }
  80%, 100% { left: 170%; }
}

/* Ripple saat tombol diklik */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transform: scale(0);
  pointer-events: none;
  animation: rippleOut 0.65s ease-out forwards;
}

@keyframes rippleOut {
  to { transform: scale(1); opacity: 0; }
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(18, 140, 74, 0.28);
}

.btn-primary:hover {
  background: var(--green-dark);
  box-shadow: 0 14px 28px rgba(18, 140, 74, 0.35);
}

.btn-outline {
  border-color: var(--green);
  color: var(--green-dark);
  background: transparent;
}

.btn-outline:hover {
  background: var(--green-light);
}

.hero-scroll {
  font-size: 0.78rem;
  color: #93a199;
  letter-spacing: 0.04em;
}

/* ----- Menu board illustration ----- */
.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
}

.board {
  width: 100%;
  max-width: 380px;
  background: var(--green-deep);
  color: var(--white);
  border-radius: 16px;
  padding: 1.4rem 1.5rem 1.3rem;
  box-shadow: var(--shadow);
  border: 6px solid #3a2a1d;
  transform: rotate(2deg);
  animation: boardFloat 6s ease-in-out infinite;
}

@keyframes boardFloat {
  0%, 100% { transform: rotate(2deg) translateY(0); }
  50% { transform: rotate(2.6deg) translateY(-10px); }
}

.board-head {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.3);
  padding-bottom: 0.9rem;
  margin-bottom: 0.9rem;
}

.board-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
}

.board-dot:nth-child(2) {
  background: #f5c542;
}

.board-dot:nth-child(3) {
  background: #7dd89a;
}

.board-title {
  margin-left: auto;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.9rem;
}

.board-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.18);
  font-size: 0.93rem;
}

.board-list li b {
  color: #ffd166;
  white-space: nowrap;
}

.board-list--best {
  background: rgba(226, 35, 26, 0.9);
  margin: 0.6rem -0.6rem 0;
  padding: 0.6rem !important;
  border-radius: 8px;
  border-bottom: none !important;
}

.board-list--best b {
  color: var(--white) !important;
}

.board-foot {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.85rem;
  font-style: italic;
  color: #bff2cf;
}

.steam {
  position: absolute;
  font-size: 2.2rem;
  color: rgba(18, 140, 74, 0.35);
  animation: steam 3s ease-in-out infinite;
}

.steam--1 {
  top: -28px;
  left: 22%;
}

.steam--2 {
  top: -10px;
  right: 18%;
  animation-delay: 1.2s;
}

@keyframes steam {
  0%, 100% { transform: translateY(0) rotate(-8deg); opacity: 0.2; }
  50% { transform: translateY(-14px) rotate(8deg); opacity: 0.6; }
}

/* ===== MARQUEE ===== */
.marquee {
  overflow: hidden;
  background: var(--green-deep);
  border-top: 4px solid var(--red);
  border-bottom: 4px solid var(--red);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  width: max-content;
  padding: 0.75rem 0;
  animation: marquee 22s linear infinite;
}

.marquee-track span {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--white);
  white-space: nowrap;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== ABOUT ===== */
.about {
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
}

.about-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
}

.about-card--story {
  border-top: 5px solid var(--green);
}

.about-icon {
  font-size: 2rem;
  margin-bottom: 0.7rem;
}

.about-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--green-deep);
  margin-bottom: 0.9rem;
}

.about-card p {
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.about-card--facts {
  background: var(--green-light);
  border-color: #c7e9d2;
  border-top: 5px solid var(--red);
}

.fact-list li {
  display: flex;
  flex-direction: column;
  padding: 0.65rem 0;
  border-bottom: 1px dashed #b6dcc3;
}

.fact-list li:last-child {
  border-bottom: 0;
}

.fact-list span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green-dark);
  font-weight: 800;
}

.fact-list strong {
  font-size: 0.95rem;
  color: var(--ink);
}

.fact-list .status {
  color: var(--red-dark);
}

/* ===== SKILLS ===== */
.skills {
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.06), transparent 30%),
    linear-gradient(150deg, var(--green-dark), var(--green-deep));
  color: var(--white);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.skill-card {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 1.8rem;
  border-top: 6px solid var(--green);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
  transform-style: preserve-3d;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}

.skill-card:hover {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-8px);
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.22);
}

.skill-card--music { border-top-color: var(--red); }
.skill-card--code { border-top-color: var(--green); }
.skill-card--electric { border-top-color: #f5c542; }

.skill-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.skill-icon {
  font-size: 2.4rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.skill-card:hover .skill-icon {
  transform: scale(1.18) rotate(-8deg);
}

.skill-tag {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--green-dark);
}

.skill-card--music .skill-tag { background: rgba(226, 35, 26, 0.1); color: var(--red-dark); }
.skill-card--electric .skill-tag { background: #fff6da; color: #8a6500; }

.skill-card h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--green-deep);
  margin-bottom: 0.4rem;
}

.skill-card-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
}

.skill-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ----- Animatable level bars ----- */
.level {
  display: block;
  flex-shrink: 0;
  width: 70px;
  height: 8px;
  border-radius: 8px;
  background: #e6ede8;
  overflow: hidden;
}

.level-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--green), #4ecb7b);
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.level.animated .level-fill {
  width: var(--fill, 0%);
}

.level-1 { --fill: 20%; }
.level-2 { --fill: 40%; }
.level-3 { --fill: 60%; }
.level-4 { --fill: 80%; }
.level-5 { --fill: 100%; }

.skill-hint {
  margin-top: 1.1rem;
  font-size: 0.72rem;
  color: #98a69e;
  font-style: italic;
}

.skills-next {
  text-align: center;
  margin-top: 3rem;
}

.skills-next p {
  color: #bff2cf;
  margin-bottom: 1rem;
  font-weight: 600;
}

/* ===== PROJECT / KARYA ===== */
.projects {
  background: linear-gradient(180deg, var(--white), var(--cream));
}

.projects .section-subtitle {
  color: var(--muted);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  align-items: start;
}

/* Kartu musik dibuat selebar grid supaya daftar lagunya lega */
.project-card--music {
  grid-column: 1 / -1;
}

.project-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: 0 10px 28px rgba(7, 72, 42, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.project-card--music { border-top: 5px solid var(--red); }
.project-card--code { border-top: 5px solid var(--green); }
.project-card--electric { border-top: 5px solid #f5c542; }

.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.project-icon {
  font-size: 2.1rem;
  line-height: 1;
}

.project-tag {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--green-dark);
}

.project-card--music .project-tag { background: rgba(226, 35, 26, 0.1); color: var(--red-dark); }
.project-card--electric .project-tag { background: #fff6da; color: #8a6500; }

.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--green-deep);
  margin-bottom: 0.4rem;
}

.project-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
}

/* ----- Audio tracks ----- */
.track-list {
  display: grid;
  gap: 0.7rem;
}

.track {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
}

.track-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}

.track-num {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--red);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 800;
}

.track-info strong {
  display: block;
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.25;
}

.track-info small {
  display: block;
  font-size: 0.73rem;
  color: var(--muted);
}

.track audio {
  display: block;
  width: 100%;
  height: 38px;
}

.track-empty {
  display: none;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--red-dark);
}

.track.missing audio {
  display: none;
}

.track.missing .track-empty {
  display: block;
}

/* ----- Daftar lagu per koleksi ----- */
.song-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem;
  margin-top: 0.4rem;
}

.song-group h4 {
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-dark);
}

.song-group ul {
  display: grid;
  gap: 0.45rem;
}

.song-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cream);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.song-item:hover {
  background: var(--green-light);
  border-color: #c7e9d2;
  transform: translateX(3px);
}

.song-play {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-size: 0.62rem;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.song-item:hover .song-play {
  background: var(--green);
  transform: scale(1.1);
}

.song-meta {
  min-width: 0;
}

.song-meta strong {
  display: block;
  font-size: 0.82rem;
  line-height: 1.25;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-meta small {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
}

.music-hint {
  margin-top: 1rem;
  font-size: 0.72rem;
  font-style: italic;
  color: var(--muted);
}

/* ----- Popup pemutar musik ----- */
.music-modal {
  max-width: 520px;
}

.music-desc {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.music-player {
  width: 100%;
  margin-top: 1rem;
}

/* ----- Daftar project ----- */
.project-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--line);
}

.project-list li:last-child {
  border-bottom: 0;
}

.project-list-icon {
  font-size: 1.3rem;
  line-height: 1.2;
}

.project-list strong {
  display: block;
  font-size: 0.9rem;
  color: var(--ink);
}

.project-list small {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.3rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--green);
}

.project-link:hover {
  color: var(--red);
  gap: 0.65rem;
}

.projects-note {
  margin-top: 1.6rem;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

.projects-note code {
  background: var(--green-light);
  color: var(--green-dark);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
}

/* ===== CONTACT ===== */
.contact {
  background:
    radial-gradient(circle at 15% 85%, rgba(226, 35, 26, 0.1), transparent 30%),
    var(--green);
}

.contact-inner .section-heading {
  margin-bottom: 2.2rem;
}

.contact-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  color: var(--white);
  transition: background 0.2s ease, transform 0.2s ease;
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.contact-icon {
  font-size: 1.6rem;
  transition: transform 0.3s ease;
}

.contact-item:hover .contact-icon {
  transform: rotate(10deg) scale(1.15);
}

.contact-item small {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.8;
}

.contact-item strong {
  font-size: 0.98rem;
}

.contact-note {
  margin-top: 1.4rem;
  color: #d6f3de;
  font-size: 0.78rem;
}

.contact-note code {
  background: rgba(0, 0, 0, 0.18);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--green-deep);
  color: rgba(255, 255, 255, 0.7);
  padding: 1.6rem 0;
  font-size: 0.82rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  text-align: center;
}

/* ===== PROJECT ACTIONS ===== */
.project-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1.3rem;
}

.project-actions .project-link {
  margin-top: 0;
}

.detail-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 2px solid var(--green);
  background: transparent;
  color: var(--green-dark);
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.detail-btn:hover {
  background: var(--green);
  color: var(--white);
  transform: translateY(-2px);
}

/* ===== POPUP / MODAL ===== */
body.no-scroll {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(7, 40, 25, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: 22px;
  padding: 2rem 1.8rem 1.7rem;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  border-top: 6px solid var(--green);
  opacity: 0;
  transform: translateY(24px) scale(0.9);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1.4, 0.36, 1);
}

.modal-overlay.open .modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: var(--green-light);
  color: var(--green-deep);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.25s ease, background 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
  transform: rotate(90deg) scale(1.1);
  background: var(--red);
  color: var(--white);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1.2;
  color: var(--green-deep);
  margin-bottom: 0.5rem;
  padding-right: 2rem;
}

.modal-text {
  color: var(--muted);
  margin-bottom: 1.2rem;
}

/* ----- Welcome popup ----- */
.welcome-modal {
  text-align: center;
  border-top-color: var(--red);
}

.welcome-cup {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.modal-overlay.open .welcome-cup {
  animation: cupPop 0.7s cubic-bezier(0.22, 1.4, 0.36, 1) both;
}

@keyframes cupPop {
  0% { transform: scale(0) rotate(-25deg); }
  70% { transform: scale(1.15) rotate(8deg); }
  100% { transform: scale(1) rotate(0); }
}

.welcome-modal .modal-title {
  padding-right: 0;
}

.welcome-cta {
  width: 100%;
  margin-top: 0.3rem;
}

.welcome-note {
  margin-top: 0.9rem;
  font-size: 0.72rem;
  color: #98a69e;
}

/* ----- Detail popup ----- */
.detail-icon {
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.detail-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--green-dark);
  margin-bottom: 0.6rem;
}

.detail-body {
  color: var(--muted);
  font-size: 0.92rem;
}

.detail-body p {
  margin-bottom: 0.7rem;
}

.detail-body ul {
  list-style: none;
  display: grid;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

.detail-body li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.detail-body li::before {
  content: "•";
  color: var(--red);
  font-weight: 800;
}

.detail-actions {
  margin-top: 1.2rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.detail-actions .btn {
  padding: 0.7rem 1.2rem;
  font-size: 0.85rem;
}

/* ----- Pop-in untuk isi modal ----- */
.modal-overlay.open .detail-icon,
.modal-overlay.open .detail-tag,
.modal-overlay.open .modal-title,
.modal-overlay.open .detail-body,
.modal-overlay.open .detail-actions {
  animation: fadeUp 0.5s ease both;
}

.modal-overlay.open .detail-tag { animation-delay: 0.05s; }
.modal-overlay.open .modal-title { animation-delay: 0.1s; }
.modal-overlay.open .detail-body { animation-delay: 0.16s; }
.modal-overlay.open .detail-actions { animation-delay: 0.22s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 90vw;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  background: var(--green-deep);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translate(-50%, 140%);
  transition: transform 0.4s cubic-bezier(0.22, 1.4, 0.36, 1), opacity 0.3s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast-icon {
  font-size: 1.1rem;
}

.toast--wa {
  border-left: 4px solid #25d366;
}

.toast--gmail {
  border-left: 4px solid var(--red);
}

/* ===== FLOATING WHATSAPP ===== */
.float-wa {
  position: fixed;
  right: 22px;
  bottom: 82px;
  z-index: 90;
  overflow: hidden;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #25d366;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.85);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, background 0.2s ease;
}

.float-wa.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.float-wa:hover {
  background: #1ebe5d;
  transform: translateY(-4px) scale(1.06);
}

/* ===== BACK TO TOP ===== */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  overflow: hidden;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--white);
  background: var(--red);
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(226, 35, 26, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.85);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.to-top:hover {
  background: var(--red-dark);
  transform: translateY(-4px) scale(1.06);
}

/* ===== TOGGLE ANIMASI ===== */
.anim-toggle {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 2px solid var(--green);
  background: var(--white);
  color: var(--green-dark);
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(7, 72, 42, 0.16);
  transition: transform 0.2s ease, background 0.2s ease;
}

.anim-toggle:hover {
  transform: translateY(-2px);
  background: var(--green-light);
}

.anim-toggle[hidden] {
  display: none;
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Variasi arah reveal */
.reveal-left { transform: translateX(-44px); }
.reveal-right { transform: translateX(44px); }
.reveal-zoom { transform: scale(0.92); }

.reveal-left.visible,
.reveal-right.visible,
.reveal-zoom.visible {
  transform: none;
}

/* ----- Intro hero setelah preloader ----- */
body.loaded .hero-copy > * {
  animation: introUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.loaded .hero-copy > *:nth-child(2) { animation-delay: 0.08s; }
body.loaded .hero-copy > *:nth-child(3) { animation-delay: 0.16s; }
body.loaded .hero-copy > *:nth-child(4) { animation-delay: 0.24s; }
body.loaded .hero-copy > *:nth-child(5) { animation-delay: 0.32s; }
body.loaded .hero-copy > *:nth-child(6) { animation-delay: 0.4s; }
body.loaded .hero-copy > *:nth-child(7) { animation-delay: 0.48s; }
body.loaded .hero-copy > *:nth-child(8) { animation-delay: 0.56s; }

body.loaded .hero-art {
  animation: introArt 0.9s 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes introUp {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes introArt {
  from { opacity: 0; transform: translateY(30px) scale(0.94); }
  to { opacity: 1; transform: none; }
}

/* ----- Nomor section memantul ----- */
.section-heading.visible .section-number {
  animation: numberPop 0.6s cubic-bezier(0.22, 1.4, 0.36, 1) both;
}

@keyframes numberPop {
  0% { transform: scale(0.4) rotate(-12deg); opacity: 0; }
  70% { transform: scale(1.15) rotate(4deg); }
  100% { transform: scale(1) rotate(0); opacity: 0.9; }
}

/* ----- Kilau menyapu kartu ----- */
.skill-card,
.project-card {
  position: relative;
  overflow: hidden;
}

.skill-card::after,
.project-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 55%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  transition: left 0.75s ease;
  pointer-events: none;
}

.skill-card:hover::after,
.project-card:hover::after {
  left: 165%;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 2.5rem;
  }

  .hero-art {
    order: -1;
  }

  .about-grid,
  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .song-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-card {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .page {
    padding: 6.5rem 0 4rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background: var(--white);
    padding: 1rem 5%;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-link {
    text-align: center;
  }

  .hero-title span {
    white-space: normal;
  }

  .contact-card {
    grid-template-columns: 1fr;
  }

  .song-groups {
    grid-template-columns: 1fr;
  }

  .section-heading {
    gap: 0.8rem;
  }

  .section-number {
    font-size: 2rem;
  }

  .footer-inner {
    flex-direction: column;
  }

  .to-top {
    right: 14px;
    bottom: 14px;
  }

  .float-wa {
    right: 14px;
    bottom: 74px;
  }
}

@media (max-width: 420px) {
  .brand-name {
    font-size: 1.05rem;
  }

  .btn {
    width: 100%;
  }

  .lang-btn {
    padding: 0.3rem 0.45rem;
  }

  .modal {
    padding: 1.6rem 1.2rem 1.4rem;
  }

  .modal-title {
    font-size: 1.45rem;
  }

  .project-actions {
    justify-content: flex-start;
  }
}

/* Kurangi animasi kalau pengguna memilih reduced motion */
@media (prefers-reduced-motion: reduce) {
  html:not(.force-anim) *, html:not(.force-anim) *::before, html:not(.force-anim) *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
