
:root{
  --bg: #081124;
  --card: rgba(255,255,255,0.04);
  --accent: #fffdfd;
  --accent-2: #fe4b09;
  --muted: #9aa8bf;
  --glass: rgba(255,255,255,0.03);
  --glass-2: rgba(255,255,255,0.02);
  --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; }

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,
              #807f88 0%,
              #704e4e 40%,
              #3a3a3a 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{color:var(--muted); margin-top:10px}
.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}
.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 */
.skills-list {
  display: grid;
  gap: 12px;
  max-width: 400px;
}

.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 form{max-width:720px}
.row{display:flex; gap:12px}
input, textarea{width:100%; padding:12px; border-radius:10px; border:1px solid rgba(255,255,255,0.04); background:transparent; color:inherit}
input::placeholder, textarea::placeholder{color:var(--muted)}

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

/* ---------- Chat widget ---------- */
#chat-widget{
  position:fixed; right:22px; bottom:48px; z-index:120;
  transition: all .28s ease;
  width:420px; max-width:92vw; font-family: Inter;
  box-shadow: 0 20px 10px rgba(3,6,14,0.6);
}
.chat-closed{width:64px; height:64px;}
.chat-open{width:360px; height:430px; border-radius:16px; overflow:hidden}
.chat-toggle{
  width:64px; height:64px; border-radius:50%; border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center; font-size:20px;
  background:linear-gradient(90deg,var(--accent),var(--accent-2));
  color:#041024; box-shadow: 0 10px 30px rgba(96,165,250,0.12);
}
.chat-panel{
  display:flex; flex-direction:column; height:100%; background: linear-gradient(180deg,#041024, #072034);
  border-radius:16px; overflow:hidden;
}
.chat-header{display:flex; justify-content:space-between; align-items:center; padding:14px; border-bottom:1px solid rgba(255,255,255,0.03)}
.chat-body{padding:12px; overflow:auto; flex:1; display:flex; flex-direction:column; gap:8px}
.msg{max-width:86%; padding:10px 12px; border-radius:12px}
.msg.user{align-self:flex-end; background: linear-gradient(90deg,#0b2a3a, #0e3a55); color:#bfeaff}
.msg.sys{align-self:flex-start; background:rgba(255,255,255,0.02)}
.chat-form{display:flex; gap:8px; padding:12px; border-top:1px solid rgba(255,255,255,0.03)}
.chat-form input{flex:1; padding:10px; border-radius:10px}
.chat-form button{padding:10px 12px; border-radius:10px; border:none; cursor:pointer; background:rgba(255,255,255,0.03)}

/* 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 ---------- */
.funfact-swiper {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  height: 80px; /* give it a fixed height to prevent layout shifts */
}

.funfact-swiper .swiper-wrapper {
  position: relative;
  height: 100%;
}

.funfact-swiper .swiper-slide {
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0 !important;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0s 0.6s;
  padding: 0 60px;
}

.funfact-swiper .swiper-slide-active {
  opacity: 1 !important;
  visibility: visible !important;
  transition: opacity 0.6s ease, visibility 0s 0s;
}


/* styling navigation arrows */
.swiper-button-next,
.swiper-button-prev {
  width: 12px;
  height: 12px;
  background: rgba(255, 188, 121, 0.2);
  border-radius: 90%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.swiper-button-next::after,
.swiper-button-prev::after {
  content: '';
  display: none;
}

.swiper-button-prev {
  left: 3px;
}

.swiper-button-next {
  right: 3px;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: rgba(255, 113, 11, 0.4);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.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);   /* biar glow oranye saat hover */
  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;
}

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

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

/* Grid Layout */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  justify-items: center;
}

.cert-item {
  position: relative;
  cursor: pointer;
  border-radius: 15px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cert-item:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.cert-item img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  transition: opacity 0.3s ease;
}

.cert-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.9rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cert-item:hover .cert-caption {
  opacity: 1;
}

/* ==== Modal Preview ==== */
.cert-modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(6px);
}

.cert-modal-img {
  display: block;
  margin: auto;
  max-width: 90%;
  max-height: 80vh;
  border-radius: 12px;
}

.cert-modal-caption {
  color: #fff;
  text-align: center;
  margin-top: 20px;
}

.cert-modal-caption h3 {
  font-weight: 600;
  margin-bottom: 8px;
}

.cert-modal-caption p {
  color: #ccc;
  font-size: 0.95rem;
}

.cert-modal .close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.cert-modal .close:hover {
  color: #ff5555;
}


/* ========== 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;
}

