/* Base Reset & Variables */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0d1117;
  --bg-2: #161b22;
  --bg-3: #1c2a3a;
  --border: rgba(55, 138, 221, 0.15);
  --border-h: rgba(55, 138, 221, 0.35);
  --cyan: #378add;
  --cyan-l: #b5d4f4;
  --cyan-dim: rgba(55, 138, 221, 0.12);
  --text: #e6edf3;
  --text-2: #8b98a5;
  --text-3: #4a5568;
  --white: #ffffff;
  --mono: "JetBrains Mono", monospace;
  --sans: "Outfit", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

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

/* ── SELECTION ── */
::selection {
  background: var(--cyan-dim);
  color: var(--cyan-l);
}

/* ── NAVIGATION ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.75);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}
nav.nav-scrolled {
  background: rgba(22, 27, 34, 0.9);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}
.nav-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 58px;
}
.nav-logo {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--cyan);
  letter-spacing: 0.5px;
  text-decoration: none;
}
.nav-logo span {
  color: var(--text-2);
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-2);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition:
    color 0.2s,
    text-shadow 0.2s;
}
.nav-links a:hover {
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan-dim);
}

/* ── SECTIONS STRUCTURE ── */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2rem;
}
section {
  padding: 6rem 0;
  position: relative;
}

.section-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--cyan);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::after {
  content: "";
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: linear-gradient(90deg, var(--border-h), transparent);
}

/* ── HERO SECTION ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}
.hero-bg-fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  animation: floatOrbs 15s infinite ease-in-out alternate;
}
.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--cyan);
  top: -100px;
  left: -100px;
}
.orb-2 {
  width: 300px;
  height: 300px;
  background: var(--bg-3);
  bottom: -50px;
  right: -50px;
  animation-delay: -5s;
}

@keyframes floatOrbs {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(40px, 50px) scale(1.05);
  }
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(
    ellipse 80% 60% at 50% 40%,
    black 30%,
    transparent 80%
  );
  mask-image: radial-gradient(
    ellipse 80% 60% at 50% 40%,
    black 30%,
    transparent 80%
  );
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-h);
  border-radius: 20px;
  padding: 5px 14px;
  margin-bottom: 2.5rem;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--cyan);
  background: var(--cyan-dim);
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: blink 2.5s ease-in-out infinite;
  box-shadow: 0 0 6px var(--cyan);
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.hero h1 {
  font-family: var(--mono);
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}
.hero h1 .name-accent {
  color: var(--cyan);
}
.hero-tagline {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 300;
  color: var(--text-2);
  margin-bottom: 1.5rem;
  letter-spacing: 0.3px;
}
.hero-tagline .tag-sep {
  color: var(--border-h);
  margin: 0 6px;
}
.hero-desc {
  font-size: 16px;
  color: var(--text-2);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
  line-height: 1.75;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* BUTTONS */
.btn-primary,
.btn-outline {
  padding: 11px 26px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-family: var(--sans);
  letter-spacing: 0.3px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary {
  background: var(--cyan);
  color: var(--bg);
  font-weight: 500;
}
.btn-primary:hover {
  background: var(--cyan-l);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(55, 138, 221, 0.3);
}
.btn-outline {
  background: transparent;
  color: var(--cyan);
  border: 1px solid var(--border-h);
  font-weight: 400;
}
.btn-outline:hover {
  border-color: var(--cyan);
  background: var(--cyan-dim);
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--cyan), transparent);
  animation: scrollpulse 2s ease-in-out infinite;
}
@keyframes scrollpulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scaleY(1);
  }
  50% {
    opacity: 1;
    transform: scaleY(0.6);
  }
}

/* ── INTERACTION GLOBAL GLOW (SHADOW MOUSE DARI INDEX LAMA) ── */
#cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 450px;
  height: 450px;
  background: radial-gradient(
    circle,
    rgba(55, 138, 221, 0.06) 0%,
    transparent 65%
  );
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

/* CARD SPOTLIGHT GLOW */
.glow-card {
  position: relative;
  overflow: hidden;
}
.glow-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 0) var(--mouse-y, 0),
    var(--cyan-dim),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
  pointer-events: none;
}
.glow-card:hover::before {
  opacity: 1;
}
.glow-card-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ── DIVIDER ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
}

/* ── ABOUT SECTION ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 3.5rem;
  align-items: start;
}
.about-text p {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.85;
  margin-bottom: 1rem;
  font-weight: 300;
}
.about-text p strong {
  color: var(--text);
  font-weight: 500;
}
.about-text p em {
  color: var(--cyan);
  font-style: normal;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  text-align: center;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.stat-card:hover {
  border-color: var(--border-h);
  transform: scale(1.02);
}
.stat-num {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--cyan);
}
.stat-label {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 3px;
  letter-spacing: 0.3px;
}

/* ── SKILLS ── */
.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.skill-cat-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-3);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--text);
  font-family: var(--mono);
  transition: all 0.2s ease;
  cursor: default;
}
.chip:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-dim);
  transform: translateY(-2px);
}
.chip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0.6;
}

/* ── EXPERIENCE ── */
.exp-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 2.25rem;
  transition: border-color 0.3s;
}
.exp-card:hover {
  border-color: var(--border-h);
}
.exp-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--cyan);
}
.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.exp-title {
  font-weight: 500;
  font-size: 16px;
  color: var(--white);
}
.exp-company {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  margin-top: 3px;
}
.exp-badge {
  background: var(--cyan-dim);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-h);
  white-space: nowrap;
}
.exp-list {
  list-style: none;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.exp-list li {
  font-size: 14px;
  color: var(--text-2);
  padding-left: 18px;
  position: relative;
  line-height: 1.65;
}
.exp-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-size: 11px;
  top: 3px;
}

.achievement {
  margin-top: 1.25rem;
  background: rgba(55, 138, 221, 0.04);
  border: 1px solid var(--border-h);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}
.achievement-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--cyan);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.achievement p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.65;
}
.achievement p strong {
  color: var(--cyan);
  font-weight: 500;
}

/* ── PROJECTS ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Mengunci jadi 2 kolom sejajar */
  gap: 1.25rem;
}
.project-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.6rem;
  transition:
    border-color 0.25s,
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}
.project-card:hover {
  border-color: var(--cyan);
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}
.project-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.25rem;
}
.project-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}
.project-links {
  display: flex;
  gap: 8px;
  position: relative;
  z-index: 5;
}
.project-link {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-2);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  transition: all 0.2s;
}
.project-link:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: var(--cyan-dim);
}
.project-name {
  font-weight: 500;
  font-size: 15px;
  color: var(--white);
  line-height: 1.3;
}
.project-desc {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 300;
  line-height: 1.7;
  flex: 1;
  margin-bottom: 1rem;
}
.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
}
.stack-tag {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-2);
}
.project-highlight {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--cyan);
  margin-top: 0.75rem;
  line-height: 1.5;
  padding: 6px 10px;
  background: rgba(55, 138, 221, 0.05);
  border-radius: 4px;
}

/* ── FOOTER ── */
footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}
.footer-top {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer-name {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--cyan);
}
.footer-tagline {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 4px;
}
.footer-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.footer-link {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 9px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12px;
  transition: all 0.2s;
}
.footer-link:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}
.footer-bottom {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 2rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-copy,
.footer-built {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}

/* ── ANIMATION REVEAL ENGINE ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.7s cubic-bezier(0.25, 1, 0.5, 1),
    transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 {
  transition-delay: 0.12s;
}
.delay-2 {
  transition-delay: 0.24s;
}
.delay-3 {
  transition-delay: 0.36s;
}

/* ── RESPONSIVE RESPONSES ── */
@media (max-width: 640px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about-stats {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .stat-card {
    flex: 1;
    min-width: 100px;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 32px;
  }
  #cursor-glow {
    display: none;
  }

  /* ── STYLING HAMBURGER & MENU MOBILE ── */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 110;
  }
  .hamburger-line {
    width: 100%;
    height: 2px;
    background-color: var(--text-2);
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* Animasi Hamburger berubah jadi 'X' saat aktif */
  .nav-toggle.toggle-active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background-color: var(--cyan);
  }
  .nav-toggle.toggle-active .hamburger-line:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.toggle-active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background-color: var(--cyan);
  }

  /* Menu navigasi bergeser dari atas ke bawah saat aktif */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(13, 17, 23, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 105;
  }
  .nav-links.menu-active {
    right: 0;
  }
  .nav-links a {
    font-size: 18px;
    font-weight: 500;
  }
}
