:root {
  --bg: #081124;
  --card: rgba(255, 255, 255, 0.04);
  --accent: #ff7846;
  --accent-2: #ffb36b;
  --glass-bg: rgba(20, 20, 25, 0.75);
  --panel-bg: rgba(255, 255, 255, 0.04);
  --muted: #9aa8bf;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-2: rgba(255, 255, 255, 0.02);
  --bg-glass: rgba(25, 25, 30, 0.65);
  --bg-blur: blur(14px);
  --radius: 14px;
  --glass-border: rgba(255, 255, 255, 0.06);
  font-family: "Merriweather", Georgia, serif, "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

* {
  box-sizing: border-box
}

html,
body {
  scroll-behavior: smooth;
  height: 100%;
  margin: 0;
}

a {
  text-decoration: none;
  /* ngilangin underline pada text ber href*/
  color: inherit;
  /* biar warnanya ikut warna teks di sekitarnya */
}


body {
  position: relative;
  background: none;
  color: #e6eef6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* animated gradient layer */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  /* top:0; right:0; bottom:0; left:0 */
  z-index: -1;
  /* di belakang semua konten */
  pointer-events: none;
  background: linear-gradient(70deg,
      #121212 0%,
      #121212 40%,
      #121212 80%);
  background-size: 300% 300%;
  background-repeat: no-repeat;
  will-change: background-position;
  animation: gradientShift 8s ease-in-out infinite;
}

/* animasi gerak halus (vertikal) */
@keyframes gradientShift {
  0% {
    background-position: 50% 0%;
  }

  50% {
    background-position: 50% 100%;
  }

  100% {
    background-position: 50% 0%;
  }
}

/* optional: reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) and (max-width: 900px) {
  body::before {
    animation: none;

    .topbar {
      flex-direction: column;
      gap: 12px;
      padding: 16px 20px;
    }

    .nav {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      justify-content: center;
    }

    .nav a {
      margin-left: 0;
    }

    /* Hero section */
    .hero {
      grid-template-columns: 1fr;
      padding: 28px 20px;
      gap: 20px;
    }

    .hero-left h2 {
      font-size: 1.6rem;
    }

    .hero-right {
      align-items: stretch;
    }

    .glass-stats {
      flex-direction: column;
    }

    .glass-stats>div {
      width: 100%;
    }

    /* Sections */
    .section {
      padding: 28px 20px;
    }

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

    /* Contact form */
    .contact .row {
      flex-direction: column;
    }

    /* Footer */
    .footer {
      padding: 20px;
    }
  }
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 28px;
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  background: linear-gradient(180deg, rgba(8, 17, 36, 0.45), rgba(8, 17, 36, 0.15));
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px
}

.logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #041024;
  box-shadow: 0 6px 20px rgba(96, 165, 250, 0.08);
  font-family: "JetBrains Mono", monospace;
}

.topbar h1 {
  margin: 0;
  font-size: 1.05rem
}

.topbar .muted {
  color: var(--muted);
  font-size: .78rem;
  margin-top: 2px
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
  font-weight: 600
}

.nav a:hover {
  color: var(--accent-2)
}

/* ---------- bubble effect ---------- */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}


/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  padding: 44px 48px;
  align-items: start;
}

.hero-left h2 {
  margin: 0;
  font-size: 2.1rem
}

.lead {
  position: relative;
  display: inline-block;
  font-weight: 500;
  color: #888888;
  /* warna dasar abu-abu */
  background: linear-gradient(90deg,
      rgba(136, 136, 136, 1) 0%,
      rgba(255, 255, 255, 0.99) 45%,
      rgba(255, 255, 255, 1) 50%,
      rgba(194, 183, 175, 0.9) 55%,
      rgba(136, 136, 136, 1) 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation:
    shimmerSmooth 6s linear infinite,
    shadowFollow 6.5s ease-in-out infinite,
    breathe 5.8s ease-in-out infinite;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.15),
    0 0 15px rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

@keyframes shimmerSmooth {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: -300% center;
  }
}

@keyframes shadowFollow {
  0% {
    text-shadow:
      2px 0 8px rgba(255, 255, 255, 0.1),
      4px 0 14px rgba(255, 255, 255, 0.05);
  }

  50% {
    text-shadow:
      -2px 0 12px rgba(255, 255, 255, 0.25),
      -4px 0 20px rgba(255, 255, 255, 0.15);
  }

  100% {
    text-shadow:
      2px 0 8px rgba(255, 255, 255, 0.1),
      4px 0 14px rgba(255, 255, 255, 0.05);
  }
}

@keyframes breathe {

  0%,
  100% {
    opacity: 0.95;
    filter: brightness(1);
  }

  50% {
    opacity: 1;
    filter: brightness(1.08);
  }
}



.accent {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  color: transparent;
  font-weight: 800
}

.cta-row {
  margin-top: 18px;
  display: flex;
  gap: 12px
}

.btn {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px
}

.btn.primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #041024;
  font-weight: 700;
  border: none
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted)
}

.meta-cards {
  display: flex;
  gap: 12px;
  margin-top: 20px
}

.meta {
  background: var(--glass);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--glass-border)
}

.m-title {
  font-size: .78rem;
  color: var(--muted)
}

.m-value {
  font-weight: 700
}

/* right column */
.hero-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end
}

.card {
  background: var(--card);
  transition: transform 0.3s ease, padding 0.3s ease;
  border-radius: 16px;
  border: 1px solid rgba(235, 193, 193, 0.03);
  width: 100%
}

.card:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(169, 169, 169, 0.4);
}

.profile-card {
  width: 100%;
  text-align: center
}

.profile-art {
  font-size: 48px
}

.glass-stats {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
  gap: 20px;
}

.glass-stats .stat {
  text-align: center;
  flex: 1;
}

.glass-stats strong {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: #fff;
}

.glass-stats span {
  display: block;
  margin-top: 5px;
  font-size: 0.9rem;
  color: #ccc;
}

/* ---------- Sections ---------- */
.section {
  padding: 36px 48px;
  /* Slight background tint */
  background-color: rgba(8, 17, 36, 0.4);
}

/* Optimization: Blur only on desktop/powerful devices */
@media (min-width: 768px) {
  .section {
    background-color: rgba(8, 17, 36, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
  }
}

/* Ensure drawing canvas stays clear */
.section#drawing-canvas {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background-color: transparent !important;
}

.section h2 {
  margin: 0 0 12px 0
}

.projects .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px
}

.project {
  background: var(--glass-2);
  border-radius: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.02);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.project:hover {
  transform: translateY(-4px);
  transform: scale(1.05) !important;
  transition-delay: 0s !important;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.proj-head {
  display: flex;
  justify-content: space-between;
  align-items: center
}

.tag {
  background: rgba(255, 255, 255, 0.02);
  padding: 6px 8px;
  border-radius: 8px;
  font-size: .78rem
}

.proj-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  align-items: center
}

.link {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 700
}

.tiny {
  color: var(--muted);
  font-size: .78rem
}

/* skills */

.section.skills {
  text-align: center;
}

.skills-list {
  display: grid;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}

.skill {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  transition: all 0.3s ease-in-out;
  cursor: pointer;
}

.skill .skill-level {
  font-weight: 60;
}

.skill:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: scale(1.05) !important;
  /* jangan kebesaran, 1.3 terlalu ekstrim */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4) !important;
}

/* contact */
/* contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}

.contact-left {
  padding-right: 20px;
}

.contact-left h2 {
  font-size: 2.8rem;
  line-height: 1.1;
  margin-bottom: 20px;
}

.contact-lead {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 30px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 30px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  color: #e6eef6;
}

.detail-item i {
  color: var(--accent);
  width: 20px;
  text-align: center;
}

.glass-form {
  background: var(--glass-2);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  padding: 32px;
  border-radius: 24px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.input-group {
  width: 100%;
}

input,
textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
  font-family: inherit;
  transition: all 0.3s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(255, 120, 70, 0.15);
  background: rgba(0, 0, 0, 0.3);
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.full-width {
  width: 100%;
  justify-content: center;
  padding: 14px;
  margin-top: 10px;
  font-size: 1.05rem;
}

.social-links.left-align {
  justify-content: flex-start;
  margin-top: 10px;
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-left {
    padding-right: 0;
    text-align: center;
  }

  .contact-left h2 {
    font-size: 2.2rem;
  }

  .social-links.left-align {
    justify-content: center;
  }
}

/* footer */
.footer {
  padding: 20px 48px;
  color: var(--muted);
  text-align: center
}

/* ===== Professional AI Assistant Section ===== */
.ai-assistant {
  padding: 100px 20px;
  background: radial-gradient(circle at center, rgba(255, 120, 70, 0.05) 0%, transparent 60%);
  text-align: center;
}

.ai-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.ai-header-group {
  margin-bottom: 10px;
}

.ai-assistant h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  /* Standard property added */
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.ai-assistant .muted {
  font-size: 1.1rem;
  color: #aaa;
  margin-bottom: 40px;
}

/* Chat Panel */
.chat-panel {
  width: 100%;
  background: var(--glass-2);
  /* Consistent glass theme */
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chat-panel:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.chat-body {
  height: 400px;
  padding: 30px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: rgba(0, 0, 0, 0.2);
}

/* Messages */
.msg {
  padding: 14px 20px;
  border-radius: 18px;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 80%;
  position: relative;
  animation: fadeIn 0.3s ease-out;
}

.msg.sys {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  color: #f0f0f0;
  border-bottom-left-radius: 4px;
}

.msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #121212;
  font-weight: 500;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 15px rgba(255, 120, 70, 0.2);
}

/* Input Area */
.chat-form {
  display: flex;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  gap: 15px;
}

.chat-form input {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 20px;
  border-radius: 30px;
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.chat-form input:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.4);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 120, 70, 0.1);
}

.chat-form input::placeholder {
  color: #888;
}

.send-btn {
  background: var(--accent);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(255, 120, 70, 0.3);
}

.send-btn:hover {
  transform: scale(1.1);
  background: var(--accent-2);
}

.chat-panel:focus-within {
  border-color: rgba(255, 255, 255, 0.2);
}

/* Subtle fade animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

/* About Me specific style */
.about-card {
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(6px);
  margin-top: 16px;
  line-height: 1.8;
}

/* ✨ Animation */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

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

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

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

/* responsive */
@media (max-width:900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 28px
  }

  .hero-right {
    align-items: flex-start
  }

  #chat-widget {
    right: 12px;
    bottom: 12px
  }
}

/* ---------- Button Hover Animation ---------- */

.btn.primary {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn.primary:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(255, 115, 0, 0.4);
}


/* ---------- fun fact ---------- */
/* ---------- fun fact ---------- */
.funfact-swiper {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  height: 280px;
  /* Increased height for bouncing cards */
  padding-top: 20px;
}

/* ===== FUN FACTS ===== */
.funfacts {
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-bottom: 60px;
}

.funfact-hint {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  animation: bounceHint 2s infinite;
  opacity: 1;
  user-select: none;
  letter-spacing: 0.5px;
}

@keyframes bounceHint {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.funfact-item {
  display: flex !important;
  /* Force flex for swiper slide */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 40px 30px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  user-select: none;
  text-align: center;
  height: auto;
  min-height: 200px;
  max-width: 320px;
  margin: 0 auto;
  /* Center in slide */
}

/* Playful glow on hover */
.funfact-item:hover {
  transform: translateY(-10px) scale(1.05) rotate(1deg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border-color: var(--accent-2);
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(255, 120, 70, 0.2);
}

.funfact-item i {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 10px rgba(255, 120, 70, 0.3));
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.funfact-item:hover i {
  transform: scale(1.3) rotate(15deg);
}

.funfact-item p {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.4;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.swiper-pagination-bullet {
  background: var(--muted);
  opacity: 0.3;
  width: 10px;
  height: 10px;
  transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--accent);
  width: 24px;
  border-radius: 8px;
}

.funfact-swiper .swiper-wrapper {
  align-items: center;
  /* Center slides vertically */
}

.funfact-swiper .swiper-slide {
  height: auto;
  opacity: 0.4;
  transform: scale(0.9);
  transition: all 0.5s ease;
  filter: blur(2px);
}

.funfact-swiper .swiper-slide-active {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

/* Navigation arrows styling */
.swiper-button-next,
.swiper-button-prev {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  color: var(--accent) !important;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 1.2rem;
  font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: var(--accent);
  color: #fff !important;
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 120, 70, 0.4);
}

.swiper-pagination {
  display: none;
}


/*contact button animation*/
.social-links {
  margin-top: 20px;
  display: flex;
  gap: 18px;
  justify-content: center;
}

.social-links a {
  color: var(--muted);
  font-size: 1.6rem;
  transition: transform 0.3s ease, color 0.3s ease;
}

.social-links a:hover {
  color: var(--accent-2);
  transform: scale(1.2);
}

.contact .btn.primary {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}


/* ===== Certificates Section ===== */
.certificates {
  text-align: center;
  padding: 80px 20px;
  background: radial-gradient(circle at center, rgba(255, 120, 70, 0.03) 0%, transparent 70%);
}

.certificates h2 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.certificates .muted {
  font-size: 1rem;
  color: #aaa;
  margin-bottom: 50px;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  justify-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.cert-item {
  position: relative;
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
  background: var(--glass-2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  width: 100%;
  padding: 12px;
  backdrop-filter: blur(6px);
}

/* Hover Effect: Professional Lift */
.cert-item:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 120, 70, 0.3);
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.3),
    0 0 15px rgba(255, 120, 70, 0.15);
}

.cert-item img {
  width: 100%;
  aspect-ratio: 4/3;
  /* Enforce uniform ratio */
  object-fit: cover;
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.5s ease;
}

.cert-item img {
  width: 100%;
  height: auto;
  /* Fix distortion/squashing */
  display: block;
  border-radius: 4px;
  /* Reduce corner clipping */
  object-fit: contain;
}

.cert-item:hover img {
  transform: scale(1.03);
}

/* Caption Area */
.cert-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: rgba(13, 13, 16, 0.9);
  backdrop-filter: blur(8px);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.cert-item:hover .cert-caption {
  transform: translateY(0);
}

.caption-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.caption-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
  .cert-grid {
    gap: 20px;
    padding: 10px;
  }
}

/* ===== Zoom Overlay & Animation ===== */
.zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 999;
  overflow-y: auto;
  /* 🔥 scroll aktif */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  /* biar dari atas */
  padding: 60px 0;
  /* kasih ruang scroll */
}

.zoom-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.zoom-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90%;
  margin: auto;
  text-align: center;
}

.zoom-img {
  width: 100%;
  height: auto;
  max-width: 800px;
  border-radius: 12px;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  cursor: zoom-out;
}

.zoom-caption {
  color: white;
  margin-top: 24px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  padding: 0 20px;
  max-width: 700px;
}

.zoom-caption.show {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Experience Section ========== */
.section.experience {
  text-align: center;
}

.experience {
  background: rgba(255, 255, 255, 0);
  border-radius: 16px;
  padding: 60px 40px;
  position: relative;

}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 0;
}

/* Continuous vertical line */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 24px;
  /* Align with marker center */
  width: 2px;
  background: linear-gradient(180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.15) 15%,
      rgba(255, 255, 255, 0.15) 85%,
      rgba(255, 255, 255, 0) 100%);
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  /* Space for marker */
  margin-bottom: 50px;
}

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

/* Marker / Dot */
.timeline-marker {
  position: absolute;
  left: 17px;
  /* Center on line (24px - 16px/2 + 1px adjust) */
  top: 24px;
  /* Align with header roughly */
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0d0d0f;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 120, 70, 0.2);
  transition: all 0.3s ease;
  z-index: 2;
}

/* Timeline Content Card */
.timeline-item:hover .timeline-marker {
  transform: scale(1.3);
  background: var(--accent);
  box-shadow: 0 0 15px var(--accent);
}

.timeline-content {
  background: var(--glass-2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 24px 30px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.timeline-content:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.exp-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.exp-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: contain;
  background: #fff;
  padding: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.exp-header:hover .exp-logo {
  transform: scale(1.1) rotate(-3deg);
}

.exp-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.org {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  transition: color 0.3s ease;
}

.exp-header:hover .org {
  color: var(--accent-2);
}

.exp-period-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 6px;
  width: fit-content;
}

/* Role Grid */
.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.role-card {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
}

.role-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-2);
}

.role-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.subrole {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-1, #ffdcc5);
  margin: 0;
}

.tiny-date {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  margin-left: 10px;
}

.role-desc {
  font-size: 0.95rem;
  color: #c7c7c7;
  line-height: 1.5;
  margin: 0;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-stack span {
  font-size: 0.75rem;
  background: rgba(255, 120, 70, 0.15);
  color: var(--accent-2);
  padding: 4px 8px;
  border-radius: 6px;
}

@media (max-width: 768px) {
  .timeline::before {
    left: 20px;
  }

  .timeline-marker {
    left: 13px;
  }

  .timeline-item {
    padding-left: 45px;
  }

  .exp-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

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

  .role-header {
    flex-direction: column;
    gap: 4px;
  }
}

.small {
  font-size: 0.9rem;
}

.muted {
  opacity: 0.8;
}




/* ========== MOBILE RESPONSIVE ========== */

/* Tablets and smaller (below 900px) */
@media (max-width: 900px) {

  /* Topbar */
  .topbar {
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
  }

  .nav {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: center;
    overflow-x: auto;
    width: 100%;
  }

  .nav a {
    margin-left: 0;
    white-space: nowrap;
    font-size: 0.85rem;
  }

  /* Hero section */
  .hero {
    grid-template-columns: 1fr;
    padding: 28px 20px;
  }

  .hero-left h2 {
    font-size: 1.6rem;
  }

  .hero-right {
    align-items: stretch;
  }

  .glass-stats {
    flex-direction: column;
  }

  /* Sections */
  .section {
    padding: 28px 20px;
  }

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

  /* Contact form */
  .contact .row {
    flex-direction: column;
  }

  /* Footer */
  .footer {
    padding: 20px;
  }
}

/* Mobile phones (below 600px) */
@media (max-width: 600px) {
  .topbar h1 {
    font-size: 1rem;
  }

  .topbar .muted {
    font-size: 0.7rem;
  }

  .hero {
    padding: 20px 16px;
  }

  .hero-left h2 {
    font-size: 1.3rem;
  }

  .meta-cards {
    flex-direction: column;
  }

  .section {
    padding: 24px 16px;
  }

  .funfact-swiper {
    padding: 0 35px;
    height: 100px;
  }

  .funfact-swiper .swiper-slide {
    font-size: 15px;
    padding: 0 15px;
  }

  .swiper-button-next,
  .swiper-button-prev {
    width: 10px;
    height: 10px;
  }

  .chat-open {
    width: calc(100vw - 20px);
  }

  .chat-toggle {
    width: 56px;
    height: 56px;
  }

  .social-links a {
    font-size: 1.3rem;
  }
}

/* ========== MOBILE RESPONSIVE ========== */

/* Tablets and smaller (below 900px) */
@media (max-width: 900px) {

  /* Topbar */
  .topbar {
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
  }

  .nav {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: center;
    overflow-x: auto;
    width: 100%;
  }

  .nav a {
    margin-left: 0;
    white-space: nowrap;
    font-size: 0.85rem;
  }

  /* Hero section */
  .hero {
    grid-template-columns: 1fr;
    padding: 28px 20px;
  }

  .hero-left h2 {
    font-size: 1.6rem;
  }

  .hero-right {
    align-items: stretch;
  }

  .glass-stats {
    flex-direction: column;
  }

  /* Sections */
  .section {
    padding: 28px 20px;
  }

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

  /* Contact form */
  .contact .row {
    flex-direction: column;
  }

  /* Footer */
  .footer {
    padding: 20px;
  }
}

/* Mobile phones (below 600px) */
@media (max-width: 600px) {
  .topbar h1 {
    font-size: 1rem;
  }

  .topbar .muted {
    font-size: 0.7rem;
  }

  .hero {
    padding: 20px 16px;
  }

  .hero-left h2 {
    font-size: 1.3rem;
  }

  .meta-cards {
    flex-direction: column;
  }

  .section {
    padding: 24px 16px;
  }

  .funfact-swiper {
    padding: 0 35px;
    height: 100px;
  }

  .funfact-swiper .swiper-slide {
    font-size: 15px;
    padding: 0 15px;
  }

  .swiper-button-next,
  .swiper-button-prev {
    width: 10px;
    height: 10px;
  }

  .chat-open {
    width: calc(100vw - 20px);
  }

  .chat-toggle {
    width: 56px;
    height: 56px;
  }

  .social-links a {
    font-size: 1.3rem;
  }
}


/* ========== COLLAPSIBLE HEADER ========== */
.topbar {
  transition: all 0.3s ease;
}

.topbar.scrolled {
  padding: 8px 28px;
}

.topbar.scrolled>div {
  display: none;
}

.topbar.scrolled .nav {
  margin: 0 auto;
  gap: 16px;
}

.topbar.scrolled .nav a {
  font-size: 0.85rem;
}

.skill-level {
  color: #FFD700;
  /* warna emas/kuning */
  font-weight: 3;
}

/* Drawing Canvas Section */
.drawing-canvas {
  height: 85vh;
  /* Large empty space */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  /* Transparent background to see stars */
  background: transparent;
  cursor: crosshair;
  /* Hint at interactivity */
}

.drawing-hint {
  text-align: center;
  pointer-events: none;
  /* Allow drawing "through" the text */
  opacity: 0.6;
  transition: opacity 0.5s;
}

.drawing-canvas:hover .drawing-hint {
  opacity: 0.3;
  /* Fade out text when hovering to focus on drawing */
}

.drawing-hint h2 {
  font-size: 2.5rem;
  background: linear-gradient(90deg, var(--accent), #fff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.draw-btn {
  position: absolute;
  bottom: 20px;
  padding: 12px 24px;
  border-radius: 30px;
  background: var(--accent);
  color: white;
  border: none;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 120, 70, 0.3);
  z-index: 10;
  display: none;
  /* Hidden by default on desktop */
}

@media (max-width: 768px) {
  .draw-btn {
    display: block;
    /* Show on mobile */
  }
}

/* Class to lock scrolling when drawing mode is active */
.drawing-active {
  overflow: hidden;
  touch-action: none;
}