/* ── TOKENS ─────────────────────────────────────────── */
:root {
  --bg: #0d0d0d;
  --bg2: #141414;
  --bg3: #1c1c1c;
  --line: #242424;
  --muted: #555;
  --body: #a8a8a8;
  --heading: #f0ede8;
  --accent: #c8f55a;
  --accent2: #5af5c8;
  --card-bg: #161616;
  --card-br: #252525;
  --shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
  --radius: 14px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="light"] {
  --bg: #f7f6f2;
  --bg2: #f0efe9;
  --bg3: #e8e7e0;
  --line: #dddcd5;
  --muted: #aaa;
  --body: #555;
  --heading: #111;
  --accent: #2e7d00;
  --accent2: #007d5a;
  --card-bg: #fff;
  --card-br: #e0dfd8;
  --shadow: 0 4px 32px rgba(0, 0, 0, 0.08);
}

/* ── RESET ──────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--body);
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  transition:
    background var(--transition),
    color var(--transition);
  overflow-x: hidden;
}

/* ── SCROLLBAR ─────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 2px;
}

/* ── NOISE OVERLAY ────────────────────────────────── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* ── SELECTION ────────────────────────────────────── */
::selection {
  background: var(--accent);
  color: #111;
}

/* ── LAYOUT ───────────────────────────────────────── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── NAV ──────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: all var(--transition);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
/* pill container */
.nav-pill {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(20, 20, 20, 0.85);
  border: 1px solid var(--line);
  border-radius: 50px;
  backdrop-filter: blur(20px) saturate(180%);
  padding: 6px 6px 6px 20px;
  transition: all var(--transition);
  white-space: nowrap;
}
[data-theme="light"] .nav-pill {
  background: rgba(255, 255, 255, 0.85);
}
nav.scrolled .nav-pill {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.nav-logo {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--heading);
  text-decoration: none;
  letter-spacing: -0.02em;
  margin-right: 28px;
  flex-shrink: 0;
}
.nav-logo span {
  color: var(--accent);
}
.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin-right: 8px;
}
.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition);
  padding: 6px 14px;
  border-radius: 50px;
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--heading);
  background: var(--bg3);
}
.nav-links a.active {
  color: var(--accent);
}

/* theme toggle inside pill */
.theme-btn {
  background: var(--bg3);
  border: 1px solid var(--accent);
  border-radius: 50px;
  padding: 7px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--body);
  font-size: 0.8rem;
  font-family: "DM Mono", monospace;
  transition: all var(--transition);
}
.theme-btn:hover {
  opacity: 0.85;
  transform: scale(0.97);
}
.theme-icon {
  font-size: 0.9rem;
}

/* hamburger — only on mobile */
.nav-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  z-index: 101;
}
.nav-mobile-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(20px);
  padding: 10px 10px 10px 18px;
}
[data-theme="light"] .nav-mobile-bar {
  background: rgba(255, 255, 255, 0.9);
}
.nav-mobile-logo {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--heading);
  text-decoration: none;
}
.nav-mobile-logo span {
  color: var(--accent);
}
.nav-mobile-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.theme-btn-sm {
  background: var(--bg3);
  border: 1px solid var(--line);
  border-radius: 50px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--body);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.theme-btn-sm:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.menu-btn {
  background: var(--bg3);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--heading);
  font-size: 1.1rem;
  transition: all var(--transition);
}
.menu-btn:hover {
  border-color: var(--heading);
}
.menu-btn.open {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
}

/* mobile drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: 76px;
  left: 16px;
  right: 16px;
  background: rgba(20, 20, 20, 0.97);
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(24px);
  padding: 12px;
  z-index: 100;
  transform: translateY(-8px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
[data-theme="light"] .nav-drawer {
  background: rgba(255, 255, 255, 0.97);
}
.nav-drawer.open {
  display: block;
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
.nav-drawer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-drawer ul a {
  display: block;
  padding: 12px 16px;
  border-radius: 10px;
  color: var(--body);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition);
}
.nav-drawer ul a:hover,
.nav-drawer ul a.active {
  background: var(--bg3);
  color: var(--heading);
}
.nav-drawer ul a.active {
  color: var(--accent);
}

/* ── HERO ─────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero-code-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.hero-code-bg canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hero-code-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(13,13,13,0.92) 0%,
    rgba(13,13,13,0.75) 20%,
    rgba(13,13,13,0.35) 42%,
    rgba(13,13,13,0.1) 60%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}
[data-theme="light"] .hero-code-fade {
  background: linear-gradient(
    to right,
    rgba(247,246,242,0.92) 0%,
    rgba(247,246,242,0.75) 20%,
    rgba(247,246,242,0.35) 42%,
    rgba(247,246,242,0.1) 60%,
    transparent 100%
  );
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}
.hero h1 {
  font-size: clamp(36px, 8vw, 80px);
  line-height: 1.1;
  word-break: break-word;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "DM Mono", monospace;
  font-size: 0.78rem;
  color: var(--accent);
  background: rgba(200, 245, 90, 0.08);
  border: 1px solid rgba(200, 245, 90, 0.2);
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 32px;
  animation: fadeUp 0.6s ease both;
}
.hero-tag::before {
  content: "▶";
  font-size: 0.6rem;
}
h1 {
  font-family: "Syne", sans-serif;
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 800;
  line-height: 0.95;
  color: var(--heading);
  letter-spacing: -0.04em;
  animation: fadeUp 0.6s 0.1s ease both;
}
h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero-sub {
  margin-top: 28px;
  font-size: 1.05rem;
  max-width: 480px;
  color: var(--body);
  line-height: 1.8;
  animation: fadeUp 0.6s 0.3s ease both; /* delay diubah 0.2s → 0.3s */
}
.role-line {
  opacity: 0;
  animation: fadeUp 0.6s 0.2s ease both;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  margin-top: 44px;
  flex-wrap: wrap;
  animation: fadeUp 0.6s 0.4s ease both;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #111;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 14px 28px;
  border-radius: 50px;
  text-decoration: none;
  transition: all var(--transition);
  border: 1px solid var(--accent);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(200, 245, 90, 0.25);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--heading);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 14px 28px;
  border-radius: 50px;
  text-decoration: none;
  border: 1px solid var(--line);
  transition: all var(--transition);
}
.btn-ghost:hover {
  border-color: var(--heading);
}
.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-family: "DM Mono", monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeUp 0.6s 0.5s ease both;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(var(--accent), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}
@media (max-width: 768px) {
  .hero {
    padding-bottom: 100px; /* ← beri ruang untuk hero-scroll */
  }

  .hero-scroll {
    left: 0;
    right: 0;
    transform: translateX(-50%);
    bottom: 20px;
  }
}
@keyframes scrollLine {
  0%,
  100% {
    opacity: 0.3;
    transform: scaleY(1);
  }
  50% {
    opacity: 1;
    transform: scaleY(1.2);
  }
}

/* ── SECTION BASE ─────────────────────────────────── */
section {
  padding: 100px 0;
}
.section-label {
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
}
h2 {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--heading);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.section-divider {
  border: none;
  height: 1px;
  background: var(--line);
  margin: 0;
}

/* ── ABOUT ────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  margin-top: 60px;
}
.about-text p {
  color: var(--body);
  margin-bottom: 20px;
  font-size: 1rem;
}
.about-text p strong {
  color: var(--heading);
  font-weight: 500;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-top: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  padding: 24px;
  background: var(--card-bg);
  transition: background var(--transition);
}
.stat:hover {
  background: var(--bg3);
}
.stat-num {
  font-family: "Syne", sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.04em;
}
.stat-num span {
  color: var(--accent);
}
.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}
.about-skills-col {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.skill-group-title {
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  font-family: "DM Mono", monospace;
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 6px;
  background: var(--bg3);
  border: 1px solid var(--line);
  color: var(--body);
  transition: all var(--transition);
  cursor: default;
}
.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(200, 245, 90, 0.05);
}
.tag.accent {
  border-color: rgba(200, 245, 90, 0.3);
  color: var(--accent);
  background: rgba(200, 245, 90, 0.05);
}

/* ── PROJECTS ─────────────────────────────────────── */
#projects {
  background: var(--bg2);
}
.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 60px;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-br);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.project-img {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg3);
  position: relative;
}
.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .project-img img {
  transform: scale(1.05);
}
.project-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg3), var(--line));
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
  flex-direction: column;
  gap: 8px;
}
.placeholder-icon {
  font-size: 2rem;
  opacity: 0.4;
}
.project-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.project-num {
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.project-title {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--heading);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.project-desc {
  font-size: 0.875rem;
  color: var(--body);
  line-height: 1.65;
}
.project-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.project-links {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: center;
}
.project-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-tag {
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--bg3);
  color: var(--accent);
}
.project-link {
  color: var(--accent2);
  text-decoration: none;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition);
}
.project-link:hover {
  gap: 8px;
}

/* ── CONTACT ──────────────────────────────────────── */
.contact-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  padding-top: 20px;
}
.contact-inner h2 {
  margin-bottom: 20px;
}
.contact-inner p {
  margin-bottom: 44px;
  font-size: 1rem;
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "DM Mono", monospace;
  font-size: 1rem;
  color: var(--heading);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
  transition: color var(--transition);
}
.contact-email:hover {
  color: var(--accent);
}
.contact-divider {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 40px 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.contact-divider::before,
.contact-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ── FOOTER ───────────────────────────────────────── */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-copy {
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
  color: var(--muted);
}
.footer-copy span {
  color: var(--accent);
}
.social-links {
  display: flex;
  gap: 4px;
}
.social-link {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all var(--transition);
}
.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(200, 245, 90, 0.05);
  transform: translateY(-2px);
}
.social-link svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

/* ── ANIMATIONS ───────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ───────────────────────────────────── */

/* Desktop: show pill nav, hide mobile nav */
.nav-mobile {
  display: none;
}
.nav-drawer {
  display: none;
}

@media (max-width: 1024px) {
  .container {
    padding: 0 24px;
  }
  .nav-inner {
    padding: 0 24px;
  }
  .hero-inner {
    padding: 0 24px;
  }
  .about-grid {
    gap: 48px;
  }
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ≤768px: switch to mobile nav */
@media (max-width: 768px) {
  /* Hide desktop pill, show mobile bar */
  nav {
    display: none;
  }
  .nav-mobile {
    display: block;
  }

  /* hero push down for mobile bar */
  .hero {
    padding-top: 100px;
  }

  /* hero CTA stack */
  .hero-sub {
    font-size: 0.95rem;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-primary,
  .btn-ghost {
    justify-content: center;
    text-align: center;
  }

  /* about */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

  /* projects */
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .projects-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* contact */
  .contact-email {
    font-size: 0.88rem;
    word-break: break-all;
  }

  /* footer */
  .footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  section {
    padding: 72px 0;
  }
}

/* ≤480px */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  .hero-inner {
    padding: 0 16px;
  }
  .footer-inner {
    padding: 0 16px;
  }

  .hero {
    padding-top: 90px;
    min-height: 95vh;
  }
  .hero-tag {
    font-size: 0.7rem;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat {
    padding: 16px;
  }
  .stat-num {
    font-size: 1.8rem;
  }

  .project-body {
    padding: 16px;
  }
  .project-title {
    font-size: 1rem;
  }

  .tag {
    font-size: 0.72rem;
    padding: 4px 10px;
  }
  .btn-primary,
  .btn-ghost {
    padding: 12px 20px;
    font-size: 0.85rem;
  }

  section {
    padding: 56px 0;
  }
  h2 {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }
}

/* ≤360px */
@media (max-width: 360px) {
  .about-stats {
    grid-template-columns: 1fr;
  }
  .stat-num {
    font-size: 1.6rem;
  }
}

.stat {
  position: relative;
  overflow: hidden;
}
.stat.shaking {
  animation: errShake 0.07s infinite;
}
@keyframes errShake {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-2px, 1px);
  }
  50% {
    transform: translate(2px, -1px);
  }
  75% {
    transform: translate(-1px, 2px);
  }
  100% {
    transform: translate(0, 0);
  }
}

/* ── GHOST CARD SILHOUETTES ───────────────────────── */
.ghost-cards-preview {
  position: relative;
  display: none;
  margin-top: 24px;
  pointer-events: none;
  user-select: none;
}

.ghost-cards-preview.has-ghosts {
  display: block;
}

/* Grid matches .projects-grid */
.ghost-stack {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  /* Only show the top 25% of the cards */
  max-height: 25vh;
  overflow: hidden;
}

/* Ghost card = real card styling but dimmed */
.ghost-card {
  background: var(--card-bg);
  border: 1px solid var(--card-br);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  /* minimum height so the image portion is visible */
  min-height: 320px;
}

/* Dark overlay over each ghost card */
.ghost-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  border-radius: var(--radius);
  pointer-events: none;
  z-index: 1;
}

/* The image inside ghost card */
.ghost-card-img {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg3);
  flex-shrink: 0;
}

.ghost-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5) saturate(0.6);
}

/* Fake body below the image — just coloured blocks */
.ghost-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  background: var(--card-bg);
}

.ghost-block {
  border-radius: 5px;
  background: var(--bg3);
  opacity: 0.45;
}
.ghost-block.num {
  height: 9px;
  width: 22%;
}
.ghost-block.title {
  height: 14px;
  width: 58%;
  opacity: 0.55;
}
.ghost-block.line {
  height: 9px;
  width: 90%;
}
.ghost-block.line2 {
  height: 9px;
  width: 70%;
}

/* Each subsequent ghost is more faded */
.ghost-card:nth-child(2) {
  opacity: 0.6;
}
.ghost-card:nth-child(3) {
  opacity: 0.3;
}

/* Gradient fade — bottom of the strip fades into bg */
.ghost-cards-preview::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
  z-index: 10;
}

@media (max-width: 768px) {
  .ghost-stack {
    grid-template-columns: 1fr;
  }
}

/* Load More */
.load-more-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--body);
  font-size: 0.875rem;
  font-family: "DM Sans", sans-serif;
  cursor: pointer;
  transition: all var(--transition);
}

.load-more-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
  transform: translateY(-2px);
}

.load-more-btn svg {
  transition: transform var(--transition);
}

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

/* Kartu tersembunyi */
.project-card.hidden-card {
  display: none;
}

/* Animasi saat muncul */
.project-card.reveal-card {
  animation: fadeInUp 0.5s ease forwards;
}

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

.logo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #333;
}

.glitch-text {
  position: relative;
  display: inline-block;
  color: var(--accent);
}
.glitch-text {
  color: var(--heading);
}

.glitch-text .accent {
  color: var(--accent);
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  opacity: 0;
}

.glitch-text::before {
  color: var(--accent);
  text-shadow: -1px 0 var(--accent);
}
.glitch-text::after {
  color: #00ffcc;
  text-shadow: 1px 0 #00ffcc;
}

.glitch-text.is-glitching {
  animation: glitch-main 0.25s steps(2) forwards;
}
.glitch-text.is-glitching::before {
  animation: glitch-top 0.25s steps(2) forwards;
}
.glitch-text.is-glitching::after {
  animation: glitch-bot 0.25s steps(2) forwards;
}

@keyframes glitch-main {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 1px);
  }
  40% {
    transform: translate(2px, -1px);
  }
  60% {
    transform: translate(-1px, 2px);
  }
  80% {
    transform: translate(1px, -2px);
  }
  100% {
    transform: translate(0);
  }
}

@keyframes glitch-top {
  0% {
    opacity: 0.8;
    clip-path: inset(0 0 60% 0);
    transform: translate(-3px, -1px);
  }
  25% {
    clip-path: inset(20% 0 40% 0);
    transform: translate(3px, 0);
  }
  50% {
    clip-path: inset(40% 0 20% 0);
    transform: translate(-2px, 1px);
  }
  75% {
    clip-path: inset(60% 0 0% 0);
    transform: translate(2px, -1px);
  }
  100% {
    opacity: 0;
    transform: translate(0);
  }
}

@keyframes glitch-bot {
  0% {
    opacity: 0.7;
    clip-path: inset(60% 0 0 0);
    transform: translate(3px, 1px);
  }
  25% {
    clip-path: inset(40% 0 20% 0);
    transform: translate(-3px, 0);
  }
  50% {
    clip-path: inset(20% 0 40% 0);
    transform: translate(2px, -1px);
  }
  75% {
    clip-path: inset(0% 0 60% 0);
    transform: translate(-2px, 1px);
  }
  100% {
    opacity: 0;
    transform: translate(0);
  }
}

.tech-marquee-section {
  margin-top: 4rem;
  position: relative;
  padding: 20px 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem; /* jarak antar dua baris */
}

.marquee-reverse {
  animation: scroll-reverse 35s linear infinite;
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-33.333%);
  }
}

@keyframes scroll-reverse {
  from {
    transform: translateX(-33.333%);
  }
  to {
    transform: translateX(0);
  }
}

/* fade edges */
.tech-marquee-section::before,
.tech-marquee-section::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 140px;
  z-index: 2;
  pointer-events: none;
}
.tech-marquee-section::before {
  left: 0;
  background: linear-gradient(to right, var(--bg) 20%, transparent);
}
.tech-marquee-section::after {
  right: 0;
  background: linear-gradient(to left, var(--bg) 20%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
}
.marquee-track {
  animation: scroll 35s linear infinite;
}

/* arah kebalik */
.marquee-reverse {
  animation: scroll-reverse 35s linear infinite;
}
/* 
.marquee-track:hover {
  animation-play-state: paused;
} */

@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-33.333%);
  }
}

.tech-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 40px;
  /* grey + very faint */
  filter: grayscale(1) brightness(1.6);
  opacity: 0.2;
  transition:
    opacity 0.35s,
    filter 0.35s;
  cursor: default;
}

[data-theme="light"] .tech-item {
  filter: grayscale(1) brightness(0.4);
  opacity: 0.25;
}

[data-theme="light"] .tech-item:hover {
  filter: grayscale(0.3) brightness(0.7);
  opacity: 0.6;
}

.tech-item:hover {
  opacity: 0.5;
  filter: grayscale(0.5) brightness(1.3);
}

.tech-item svg {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: block;
}

/* ── LIGHTBOX MODAL ─────────────────────────────────── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.lightbox-container {
  position: relative;
  width: 90vw;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}
.lightbox-title {
  font-family: "Syne", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: 0.02em;
}
.lightbox-counter {
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
  color: var(--muted);
}
.lightbox-close {
  background: none;
  border: none;
  color: var(--heading);
  font-size: 1.5rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
  line-height: 1;
}
.lightbox-close:hover {
  background: var(--bg3);
}
.lightbox-track-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg2);
  border: 1px solid var(--card-br);
}
.lightbox-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.lightbox-slide {
  min-width: 100%;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lightbox-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 70vh;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox-slide.no-image {
  min-height: 300px;
  flex-direction: column;
  gap: 12px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.85rem;
}
.lightbox-slide.no-image .no-img-icon {
  font-size: 3rem;
  opacity: 0.4;
}

/* Nav arrows */
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s, opacity 0.2s;
  font-size: 1.1rem;
  line-height: 1;
}
.lightbox-arrow:hover {
  background: rgba(0,0,0,0.85);
}
.lightbox-arrow.disabled {
  opacity: 0.25;
  cursor: default;
}
.lightbox-arrow-prev { left: 12px; }
.lightbox-arrow-next { right: 12px; }

/* Dots */
.lightbox-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 4px 0;
}
.lightbox-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.lightbox-dot.active {
  background: var(--accent);
  transform: scale(1.4);
}

/* Clickable project image cursor */
.project-img {
  cursor: zoom-in;
}

/* ── LIGHTBOX ZOOM ADDITIONS ────────────────────────── */
.lightbox-zoom-btn {
  background: none;
  border: 1px solid var(--card-br);
  color: var(--heading);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.lightbox-zoom-btn:hover {
  background: var(--bg3);
}
.lightbox-zoom-btn.zoomed {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(200, 245, 90, 0.08);
}
.lightbox-zoom-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  padding: 5px 12px;
  border-radius: 20px;
  pointer-events: none;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.5s ease;
  z-index: 3;
}
.lightbox-zoom-hint.hidden {
  opacity: 0;
}
.lightbox-slide img {
  transition: transform 0.15s ease;
  cursor: zoom-in;
}