/* Base */
:root {
  --bg: #0b0f14;
  --fg: #eaf0f6;
  --muted: #aab4bf;
  --brand: #7c5cff;
  --brand-2: #00d4ff;
  --card: #121824;
  --line: #1c2433;
  --ring: rgba(124, 92, 255, .35);
  --vg: rgba(10, 14, 20, .75);
}

:root.light {
  --bg: #f7f9fc;
  --fg: #0e1726;
  --muted: #4a5d75;
  --brand: #5b45e0;
  --brand-2: #00b8d4;
  --card: #ffffff;
  --line: #e5eaf1;
  --ring: rgba(91, 69, 224, .25);
  --vg: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 800px at 10% -10%, rgba(124, 92, 255, .15), transparent 60%),
    radial-gradient(900px 600px at 120% 10%, rgba(0, 212, 255, .12), transparent 40%),
    var(--bg);
  color: var(--fg);
  line-height: 1.6;
}

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

.section {
  padding: 80px 0;
}

.section.alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-title {
  font-size: 32px;
  margin: 0 0 24px;
  letter-spacing: -.02em;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  animation: slideUp 0.8s ease forwards;
}

.lead {
  color: var(--muted);
  max-width: 72ch;
}

/* Animations */
@keyframes slideUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideLeft {
  0% {
    opacity: 0;
    transform: translateX(-40px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideRight {
  0% {
    opacity: 0;
    transform: translateX(40px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

/* Grid */
.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px min(4vw, 24px);
  background: var(--vg);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: .2px;
  color: var(--fg);
  text-decoration: none;
}

.brand span {
  color: var(--brand);
}

.nav {
  position: relative;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background .3s;
}

.nav-link.active,
.nav-link:hover {
  color: var(--fg);
  background: rgba(124, 92, 255, .12);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle .bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--fg);
  margin: 3px 0;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  color: var(--fg);
  background: transparent;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: rotate(10deg) scale(1.05);
}

.theme-toggle .icon {
  width: 22px;
  height: 22px;
  display: none;
}

.theme-toggle .sun {
  color: #facc15;
}

/* kuning */
.theme-toggle .moon {
  color: #7c5cff;
}

/* ungu */
body.light .theme-toggle .sun {
  display: block;
}

body.light .theme-toggle .moon {
  display: none;
}

body:not(.light) .theme-toggle .sun {
  display: none;
}

body:not(.light) .theme-toggle .moon {
  display: block;
}

/* Hero */
.hero {
  padding-top: 64px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 600;
  color: var(--brand-2);
  font-size: 12px;
  animation: slideLeft 0.8s ease forwards;
}

.hero-title {
  font-size: clamp(32px, 4vw, 56px);
  margin: 8px 0 10px;
  animation: slideRight 0.9s ease forwards;
}

.hero-subtitle {
  color: var(--muted);
  max-width: 60ch;
  opacity: 0;
  animation: fadeIn 1.2s ease forwards;
  animation-delay: 0.5s;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin: 22px 0;
  opacity: 0;
  animation: slideUp 0.8s ease forwards;
  animation-delay: 0.7s;
}

.hero-meta {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  color: var(--muted);
  opacity: 0;
  animation: fadeIn 1s ease forwards;
  animation-delay: 1s;
}

.hero-art {
  display: grid;
  place-items: center;
  opacity: 0;
  animation: slideUp 1.2s ease forwards;
  animation-delay: 0.8s;
}

.avatar-placeholder {
  width: 260px;
  height: 260px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 20px 80px rgba(0, 0, 0, .35);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: transform .2s;
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  border-color: transparent;
}

.btn.ghost {
  color: var(--fg);
}

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

/* Cards */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.0));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  opacity: 0;
  transform: translateY(30px);
  animation: slideUp 0.8s ease forwards;
}

.feature-cards .card h3,
.service-cards .card h3 {
  margin: 6px 0 8px;
}

.service-card {
  opacity: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.0));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  /* transform: translateX(80px); */
  transition: all 0.8s ease-out;
}

/* Muncul dari kiri */
.service-card.from-left {
  transform: translateX(-80px);
}

.service-card.from-right {
  transform: translateX(80px);
}


/* Saat visible */
.service-card.show {
  opacity: 1;
  transform: translateX(0);
}

/* Hover effect */
.service-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Resume */
.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.timeline li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: start;
  opacity: 0;
  animation: slideLeft 0.8s ease forwards;
}

.timeline .time {
  color: var(--muted);
  font-weight: 600;
}

.timeline .content {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 14px;
}

.skills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-left: 18px;
}

.skills li {
  color: var(--muted);
}

/* Portfolio */
.portfolio-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.filter-btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: all .3s;
}

.filter-btn.active,
.filter-btn:hover {
  outline: 2px solid var(--ring);
}

.portfolio-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  transition: transform .4s ease, opacity .4s ease;
  opacity: 0;
  transform: translateY(40px);
  animation: slideUp 0.8s ease forwards;
  cursor: pointer;
}

.portfolio-item:hover {
  transform: translateY(-5px) scale(1.02);
}

.portfolio-item .thumb {
  aspect-ratio: 16/10;
  /* border-bottom: 1px solid rgba(0, 212, 255, .35); */
  /* background: linear-gradient(135deg, rgba(124, 92, 255, .35), rgba(0, 212, 255, .35)); */
}

.portfolio-item .info {
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(124, 92, 255, .35), rgba(0, 212, 255, .35));
}

.portfolio-item h3 {
  margin: 4px 0 6px;
}

/* Contact */
.contact-form {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 18px;
  opacity: 0;
  animation: fadeIn 1s ease forwards;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid label {
  display: grid;
  gap: 8px;
}

.form-grid label.full {
  grid-column: 1/-1;
}

input,
textarea {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
}

input:focus,
textarea:focus {
  outline: 2px solid var(--ring);
  border-color: transparent;
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 10px;
}

.form-note {
  color: var(--muted);
  font-size: 12px;
}

/* Footer */
.site-footer {
  padding: 26px 0;
  border-top: 1px solid var(--line);
  margin-top: 40px;
  opacity: 0;
  animation: fadeIn 1s ease forwards;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.social {
  list-style: none;
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.social a {
  color: var(--muted);
  text-decoration: none;
  transition: color .3s;
}

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

/* Scroll to top */
.scroll-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.scroll-top.show {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  transform: translateY(-2px);
}

.profile-photo {
  width: 25vw;
  height: auto;
  min-width: 300px;
}

/* //ABOUT// */

.about-text p {
  color: var(--muted);
  margin-bottom: 24px;
}

.about-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-image img {
  max-width: 380px;
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  transform: scale(0.95);
  transition: transform 0.4s ease;
}

.about-image img:hover {
  transform: scale(1);
}

/* Animasi saat muncul */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
}

.fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.8s ease;
}

.fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.8s ease;
}

.fade-in {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* Hover efek untuk card */
.feature-cards .card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-cards .card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.mt-16 {
  margin-top: 16px;
}

.mt-32 {
  margin-top: 32px;
}

.mt-42 {
  margin-top: 42px;
}

/* ====== Resume Animations ====== */
.resume-card {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
}

/* Saat visible */
.resume-card.show {
  opacity: 1;
  transform: translateY(0);
}

/* Hover effect biar tetap interaktif */
.resume-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hide-profile {
  display: none;
}


/* FOOTER */

.footer {
  background: #111;
  color: #ccc;
  padding: 30px 20px;
  text-align: left;
}

.footer h3 {
  margin-bottom: 15px;
  font-size: 18px;
  color: #fff;
}

.contact-section ul {
  list-style: none;
  padding: 0;
}

.contact-section li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 15px;
}

.contact-section i {
  font-size: 20px;
  color: #ccc;
  width: 25px;
  text-align: center;
}

.contact-section a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

.contact-section a:hover {
  color: #1da1f2;
  /* contoh efek hover biru */
}

.copyright {
  margin-top: 25px;
  border-top: 1px solid #333;
  padding-top: 15px;
  text-align: center;
  font-size: 14px;
  color: #777;
}


/* Responsive */
@media (max-width: 980px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

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

  .resume-grid {
    grid-template-columns: 1fr;
  }

  .timeline {
    grid-template-columns: 1fr;
  }

  .timeline li {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: none;
  }

  .nav-list {
    position: absolute;
    right: 0;
    top: 56px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(10, 14, 20, .95);
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    min-width: 200px;
    display: none;
  }

  .nav.open .nav-list {
    display: flex;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-text {
    order: 2;
    /* turun ke bawah */
  }

  .hero-art {
    order: 1;
    /* naik ke atas */
  }

  .fade-left,
  .fade-right {
    transform: translateY(5px);
    animation: slideUp 0.6s ease forwards;
  }

  .service-card.from-left {
    transform: translateX(0px);
  }

  .service-card.from-right {
    transform: translateX(0px);
  }


  @keyframes slideLeft {
    0% {
      opacity: 0;
      transform: translateX(-10px);
    }

    100% {
      opacity: 1;
      transform: translateX(0);
    }
  }

  @keyframes slideRight {
    0% {
      opacity: 0;
      transform: translateX(10px);
    }

    100% {
      opacity: 1;
      transform: translateX(0);
    }
  }
}


/* Modal Background */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.3s ease;
}

/* Modal Box */
.modal-content {
  background: #fff;
  color: #333;
  margin: 15% auto;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  animation: slideDown 0.3s ease;
}

/* Close Button */
.modal-content .close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 22px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
}

.modal-content h2 {
  margin-top: 0;
  color: var(--brand);
}

.email-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.email-modal-content {
  background: #fff;
  color: #333;
  padding: 20px 30px;
  border-radius: 8px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  animation: popIn 0.3s ease;
  position: relative;
}

.email-modal-content .close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 22px;
  cursor: pointer;
  color: #666;
}

.porto-image {
  width: 100%;
  height: auto;
}

.portfolio-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}


/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}