/* ====================================================================
   EDI IRAWAN — PORTFOLIO STYLESHEET
   Struktur file ini:
   1. Root Variables (warna, font, spacing)
   2. Reset & Base
   3. Utility (container, buttons, section headings)
   4. Navbar
   5. Hero
   6. Work / Timeline
   7. About
   8. Portfolio (project cards + certificate cards)
   9. Contact
   10. Footer
   11. Floating WhatsApp & Back to top
   12. Scroll reveal animation
   13. Responsive (tablet & mobile)
   ==================================================================== */

/* ============ 1. ROOT VARIABLES ============ */
:root {
  /* ---- Warna (Dark theme, elegan tidak terlalu gelap pekat) ---- */
  --bg: #10151d;            /* latar utama */
  --bg-alt: #151b25;        /* latar section selang-seling */
  --surface: #1b2330;       /* kartu / panel */
  --surface-2: #232c3b;     /* kartu hover / elemen sekunder */
  --border: #2b3546;        /* garis pemisah halus */

  --text: #eef1f6;          /* teks utama */
  --text-muted: #97a2b5;    /* teks sekunder */
  --text-faint: #626d81;    /* teks tersier / caption */

  --accent: #e5b567;        /* aksen emas hangat — warna signature */
  --accent-soft: #e5b56722; /* aksen emas transparan (background) */
  --accent-2: #5fd7c4;      /* aksen teal kedua — dipakai seperlunya */

  --success: #5fd7a0;

  /* ---- Tipografi ----
     GANTI FONT DI SINI:
     1) Ubah URL Google Fonts di index.html (bagian <head>)
     2) Ubah nama font pada 3 variabel di bawah agar sesuai
  */
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif; /* untuk judul besar */
  --font-body: 'Inter', 'Segoe UI', sans-serif;             /* untuk paragraf/isi */
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;  /* untuk label/eyebrow/tag */

  /* ---- Spacing & layout ---- */
  --container-w: 1180px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --section-pad: clamp(64px, 9vw, 120px);

  --shadow-soft: 0 20px 60px -25px rgba(0, 0, 0, 0.55);
  --transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============ 2. RESET & BASE ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px; /* supaya section tidak ketutup navbar saat anchor jump */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }

::selection { background: var(--accent); color: #10151d; }

/* focus visibility (aksesibilitas) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ============ 2b. SCROLL PROGRESS BAR ============ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%; /* diisi via JS sesuai posisi scroll */
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  z-index: 1100;
  transform-origin: left;
  will-change: width;
}

/* ============ 3. UTILITY ============ */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: var(--section-pad); }
.section--alt { background: var(--bg-alt); }

.section__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section__title {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  margin-bottom: 14px;
}
.section__title--sm { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }

.section__subtitle {
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 48px;
  font-size: 1.02rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--accent);
  color: #14181f;
}
.btn--primary:hover { background: #f0c579; transform: translateY(-2px); }

.btn--outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.btn--ghost {
  color: var(--text);
  border: 1px solid transparent;
}
.btn--ghost:hover { color: var(--accent); }

.btn--sm { padding: 10px 20px; font-size: 0.85rem; }
.btn--block { width: 100%; }

/* ============ 4. NAVBAR ============ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding-block: 18px;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}
.navbar.is-scrolled {
  background: rgba(16, 21, 29, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px -18px rgba(0,0,0,0.6);
  padding-block: 12px;
  border-bottom: 1px solid var(--border);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
}

.navbar__logo-mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}
.navbar__logo-text { font-size: 1.05rem; color: var(--text); }
.navbar__logo-text span { color: var(--accent); }

.navbar__links {
  display: flex;
  gap: 8px;
}
.nav-link {
  position: relative;
  padding: 8px 16px;
  font-size: 0.92rem;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.is-active { color: var(--accent); background: var(--accent-soft); }

.navbar__actions { display: flex; align-items: center; gap: 14px; }
.navbar__cta { display: inline-flex; }

.navbar__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  border-radius: 8px;
}
.navbar__toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text);
  margin-inline: auto;
  transition: transform var(--transition), opacity var(--transition);
}
.navbar__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__toggle.is-open span:nth-child(2) { opacity: 0; }
.navbar__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ 5. HERO ============ */
.hero {
  position: relative;
  padding-top: clamp(140px, 18vw, 190px);
  padding-bottom: 90px;
  background:
    radial-gradient(60% 50% at 85% 10%, rgba(229, 181, 103, 0.10), transparent 60%),
    radial-gradient(50% 40% at 10% 90%, rgba(95, 215, 196, 0.06), transparent 60%);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 18px;
}
.eyebrow__prompt { color: var(--accent-2); margin-right: 4px; }
.cursor { animation: blink 1s step-end infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }

.hero__name {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  margin-bottom: 8px;
}

.hero__role {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--text-muted);
  margin-bottom: 22px;
  font-weight: 500;
}

.hero__desc {
  max-width: 540px;
  color: var(--text-muted);
  margin-bottom: 34px;
}

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 46px; }

.hero__meta {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}
.hero__meta li {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  color: var(--text-faint);
}
.hero__meta span {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text);
  font-weight: 700;
}

.hero__visual { display: flex; justify-content: center; }

/* Panggung visual: menampung foto + elemen dekoratif di sekelilingnya */
.hero__photo-stage {
  position: relative;
  width: min(380px, 80vw);
  aspect-ratio: 4 / 5;
  perspective: 1400px;
}

/*
  PLUG & PLAY IMAGE:
  Dimensi foto SEPENUHNYA dikontrol lewat CSS (aspect-ratio + object-fit).
  Ganti file assets/profile.jpg dengan foto lain (nama file sama) —
  ukuran/rasio foto baru akan otomatis menyesuaikan tanpa merusak layout.
*/
.hero__photo-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), border-radius 1.2s ease-in-out;
  /* Masking bentuk organik / tidak beraturan (blob), bukan kotak/lingkaran template */
  border-radius: 62% 38% 55% 45% / 55% 45% 62% 38%;
  animation: blobMorph 10s ease-in-out infinite;
}

.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s ease;
}
.hero__photo-stage:hover .hero__photo {
  transform: scale(1.08);
}

/* Lapisan cahaya diagonal yang menyapu foto saat hover (efek "shine") */
.hero__photo-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(238, 241, 246, 0.16) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.8s ease;
  pointer-events: none;
}
.hero__photo-stage:hover .hero__photo-glow { transform: translateX(120%); }

/* Cincin dekoratif berputar pelan di belakang foto */
.hero__ring {
  position: absolute;
  pointer-events: none;
}
.hero__ring--outer {
  inset: -22px;
  border: 1px dashed var(--border);
  border-radius: 45% 55% 40% 60% / 60% 40% 55% 45%;
  animation: spinSlow 26s linear infinite;
}
.hero__ring--dot {
  top: -6px;
  left: 50%;
  width: 10px; height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
  transform-origin: 5px 200px; /* mengorbit mengelilingi pusat foto */
  animation: spinSlow 26s linear infinite;
}

.hero__badge {
  position: absolute;
  left: 16px; bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 21, 29, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text);
  z-index: 2;
}
.hero__badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(95, 215, 160, 0.18);
}

/* Chip keahlian mengambang, memberi kesan hidup pada hero */
.hero__float-chip {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.6);
  z-index: 2;
  animation: floatChip 5s ease-in-out infinite;
}
.hero__float-chip--1 { top: 6%; right: -6%; animation-delay: 0s; }
.hero__float-chip--2 { bottom: 14%; left: -10%; animation-delay: 1.4s; }

@keyframes blobMorph {
  0%, 100% { border-radius: 62% 38% 55% 45% / 55% 45% 62% 38%; }
  50% { border-radius: 45% 55% 40% 60% / 60% 40% 55% 45%; }
}
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes floatChip {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__photo-frame, .hero__ring--outer, .hero__ring--dot, .hero__float-chip {
    animation: none;
  }
}

.scroll-cue {
  position: absolute;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.scroll-cue span {
  width: 4px; height: 8px;
  border-radius: 2px;
  background: var(--accent);
  animation: scrollCue 1.6s ease infinite;
}
@keyframes scrollCue {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* ============ 6. WORK / TIMELINE ============ */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 8px; bottom: 8px; left: 108px;
  width: 1px;
  background: var(--border);
}

.timeline__item {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 28px;
  position: relative;
}

.timeline__marker { position: relative; }
.timeline__year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  display: inline-block;
}
.timeline__marker::after {
  content: "";
  position: absolute;
  right: -4.5px; top: 4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  transition: transform var(--transition), border-color var(--transition);
}
.timeline__card:hover { transform: translateY(-3px); border-color: var(--accent); }
.timeline__card h3 { font-size: 1.15rem; margin-bottom: 4px; }
.timeline__company { color: var(--accent-2); font-size: 0.88rem; margin-bottom: 12px; }
.timeline__desc { color: var(--text-muted); font-size: 0.94rem; margin-bottom: 16px; }

.timeline__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.timeline__tags li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
}

/* ============ 7. ABOUT ============ */
/* Layout Baris Atas (Foto & Teks) */
.about__top {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 56px;
  align-items: center; /* Membuat teks sejajar secara vertikal dengan foto */
  margin-bottom: 60px; /* Jarak antara baris atas dan baris bawah */
}

/* Layout Baris Bawah (Pendidikan & Keahlian) */
.about__bottom {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Membagi dua bagian sama rata */
  gap: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border); /* Garis pemisah tipis yang elegan */
}

/* --- Elemen Internal --- */
.about__visual { position: relative; }
.about__photo-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
.about__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.about__card {
  position: absolute;
  right: -18px; bottom: -22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-soft);
}
.about__card-title { font-size: 0.72rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.about__card-value { font-family: var(--font-display); font-weight: 600; color: var(--accent); }

.about__text { color: var(--text-muted); margin-bottom: 16px; line-height: 1.6; }
.about__subheading { font-size: 1.1rem; margin-bottom: 24px; color: var(--accent-2); }

.edu-list { display: flex; flex-direction: column; gap: 20px; }
.edu-list li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
}
.edu-list__period { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent-2); padding-top: 2px;}
.edu-list__title { font-weight: 600; margin-bottom: 4px; font-size: 1.05rem; }
.edu-list__place { font-size: 0.88rem; color: var(--text-muted); }

.skill-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.skill-chips li {
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: transform var(--transition), border-color var(--transition), color var(--transition);
  cursor: default;
}
.skill-chips li:hover { 
  border-color: var(--accent); 
  color: var(--accent); 
  transform: translateY(-2px);
}

/* ============ BAHASA (LANGUAGES) ============ */
.lang-list { 
  display: flex; 
  flex-direction: column; 
  gap: 12px; 
}

.lang-list li { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding-bottom: 12px; 
  border-bottom: 1px solid var(--border); 
}

.lang-list li:last-child { 
  border-bottom: none; 
  padding-bottom: 0;
}

.lang-name { 
  font-weight: 500; 
  color: var(--text);
}

.lang-level { 
  font-family: var(--font-mono);
  font-size: 0.75rem; 
  color: var(--accent-2); 
  background: var(--surface); 
  padding: 4px 10px; 
  border-radius: 4px; 
  border: 1px solid var(--border); 
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============ GAYA SERTIFIKASI ALA LINKEDIN ============ */
.linkedin-cert-list {
  display: flex;
  flex-direction: column;
}

.linkedin-cert-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.linkedin-cert-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Kotak Logo Perusahaan/Institusi */
.linkedin-cert-logo {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.linkedin-cert-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Detail Teks */
.linkedin-cert-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.linkedin-cert-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.linkedin-cert-issuer {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.linkedin-cert-date {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-top: 2px;
}

.linkedin-cert-id {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
  word-break: break-all;
}

/* Tombol Show Credential */
.linkedin-cred-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 14px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  margin-top: 10px;
}

.linkedin-cred-btn svg {
  stroke: var(--text-muted);
  transition: transform 0.25s ease, stroke 0.25s ease;
}

.linkedin-cred-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-2);
}

.linkedin-cred-btn:hover svg {
  stroke: var(--accent);
  transform: translate(1px, -1px);
}
/* ============ 8. PORTFOLIO ============ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-bottom: 80px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition);
}
.project-card:hover { transform: translateY(-6px); border-color: var(--accent); }

.project-card__media {
  position: relative;
  overflow: hidden;
}
/*
  PLUG & PLAY IMAGE:
  Ganti assets/project1.jpg, project2.jpg, dst dengan gambar proyek Anda
  (nama file sama). aspect-ratio + object-fit menjaga proporsi kartu.
*/
.project-card__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .project-card__media img { transform: scale(1.06); }

.project-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16,21,29,0.1), rgba(16,21,29,0.92));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  opacity: 0;
  transition: opacity var(--transition);
}
.project-card:hover .project-card__overlay,
.project-card:focus-within .project-card__overlay { opacity: 1; }

.project-card__body { padding: 22px 24px 26px; }
.project-card__body h3 { font-size: 1.1rem; margin-bottom: 8px; }
.project-card__body p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 16px; }

.project-card__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.project-card__tags li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--accent-2);
}

/* Certificates */
.cert-header { margin-bottom: 32px; }

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

.cert-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition);
}
.cert-card:hover { transform: translateY(-4px); border-color: var(--accent-2); }

.cert-card__thumb { position: relative; }
/* Ganti assets/cert1.jpg, cert2.jpg, dst — rasio kartu tetap terjaga */
.cert-card__thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.cert-card__body { padding: 18px 20px 22px; position: relative; }
.cert-card__badge {
  position: absolute;
  top: -16px; left: 20px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--accent-2);
  color: #0d1a17;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 600;
}
.cert-card__body h4 { font-size: 1rem; margin: 10px 0 4px; }
.cert-card__issuer { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }
.cert-card__link { font-size: 0.85rem; color: var(--accent); font-weight: 600; }
.cert-card__link:hover { text-decoration: underline; }

/* ============ MODAL (POP-UP GAMBAR) ============ */
.cert-modal {
  display: none; /* Sembunyikan modal secara default */
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(16, 21, 29, 0.9); /* Latar belakang gelap menyesuaikan tema */
  backdrop-filter: blur(8px); /* Efek blur pada background */
}

.cert-modal__content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.3s ease-out;
}

.cert-modal__close {
  position: absolute;
  top: 25px;
  right: 40px;
  color: #f1f1f1;
  font-size: 45px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
  z-index: 10000;
}

.cert-modal__close:hover,
.cert-modal__close:focus {
  color: var(--accent, #e5b567); /* Warna tombol X berubah saat di-hover */
  text-decoration: none;
}

/* Animasi munculnya gambar */
@keyframes zoomIn {
  from {
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}


/* ============ 9. CONTACT ============ */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.contact__list { margin-top: 32px; display: flex; flex-direction: column; gap: 18px; }
.contact__list li { display: flex; flex-direction: column; gap: 2px; }
.contact__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}
.contact__list a { font-weight: 600; transition: color var(--transition); }
.contact__list a:hover { color: var(--accent); }

.social-row { display: flex; gap: 12px; margin-top: 14px; }
.social-icon {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition), transform var(--transition);
}
.social-icon svg { width: 18px; height: 18px; }
.social-icon:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }

.contact__form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 0.85rem; color: var(--text-muted); }
.form-group input, .form-group textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.94rem;
  transition: border-color var(--transition);
  resize: vertical;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent);
  outline: none;
}
.form-note { font-size: 0.78rem; color: var(--text-faint); text-align: center; }

/* ============ 10. FOOTER ============ */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding-top: 56px; }
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  align-items: start;
  padding-bottom: 40px;
}
.footer__brand p { color: var(--text-muted); font-size: 0.9rem; margin-top: 14px; max-width: 280px; }
.footer__nav { display: flex; flex-direction: column; gap: 12px; }
.footer__nav a { color: var(--text-muted); font-size: 0.92rem; transition: color var(--transition); }
.footer__nav a:hover { color: var(--accent); }

.footer__bottom {
  border-top: 1px solid var(--border);
  padding-block: 20px;
}
.footer__bottom p { font-size: 0.82rem; color: var(--text-faint); text-align: center; }

/* ============ 11. FLOATING WHATSAPP & BACK TO TOP ============ */
.wa-float {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #0d1a17;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px -10px rgba(37, 211, 102, 0.6);
  z-index: 900;
  transition: transform var(--transition);
}
.wa-float::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid #25D366;
  opacity: 0.5;
  animation: waPulse 2.2s ease-out infinite;
}
@keyframes waPulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}
.wa-float:hover { transform: scale(1.08); }

.back-to-top {
  position: fixed;
  right: 24px; bottom: 92px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition), border-color var(--transition);
  z-index: 900;
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { border-color: var(--accent); color: var(--accent); }

/* ============ 12. SCROLL REVEAL ANIMATION ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Saat GSAP + ScrollTrigger berhasil dimuat, GSAP mengambil alih
   sepenuhnya timing animasi reveal (stagger dsb). Transisi CSS di atas
   dimatikan agar tidak "berebut" dengan tween GSAP. */
html.gsap-active .reveal {
  transition: none;
}

/* ============ 13. RESPONSIVE ============ */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { order: -1; margin-bottom: 12px; }
  .hero__photo-stage { width: min(300px, 60vw); }
  .about__visual { max-width: 320px; margin-inline: auto; }
  .contact__grid { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .navbar__nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(300px, 80vw);
    background: var(--bg-alt);
    border-left: 1px solid var(--border);
    padding: 100px 32px 32px;
    transform: translateX(100%);
    transition: transform var(--transition);
  }
  .navbar__nav.is-open { transform: translateX(0); }
  .navbar__links { flex-direction: column; gap: 6px; }
  .nav-link { display: block; padding: 12px 16px; }
  .navbar__toggle { display: flex; }
  .navbar__cta { display: none; }

  .project-grid { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 640px) {
  .container { padding-inline: 18px; }
  .section { padding-block: 64px; }
  .hero { padding-top: 130px; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__meta { gap: 22px; }
  .timeline::before { left: 68px; }
  .timeline__item { grid-template-columns: 68px 1fr; gap: 16px; }
  .about__card { right: 0; left: 0; margin-inline: auto; width: fit-content; bottom: -18px; }
  .contact__form { padding: 26px; }
  .wa-float { width: 52px; height: 52px; right: 16px; bottom: 16px; }
  .back-to-top { right: 16px; bottom: 82px; }
  .hero__float-chip { display: none; }
}

/* ============ RESPONSIVE ABOUT SECTION ============ */

/* Untuk Tablet (Layar di bawah 992px) */
@media (max-width: 992px) {
  .about__top {
    gap: 32px;
    grid-template-columns: 1fr 1fr; /* Seimbangkan rasio di layar medium */
  }
}

/* Untuk Mobile / HP (Layar di bawah 768px) */
@media (max-width: 768px) {
  /* Ubah baris atas dan bawah menjadi 1 kolom (atas-bawah) */
  .about__top,
  .about__bottom {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  /* Pusatkan foto di mobile */
  .about__visual {
    max-width: 380px;
    margin: 0 auto; 
  }

  /* Beri jarak lebih antara baris atas dan bawah di mobile */
  .about__top {
    margin-bottom: 40px;
  }
}

/* Untuk Layar HP yang sangat kecil (di bawah 480px) */
@media (max-width: 480px) {
  .about__card {
    right: -10px;
    bottom: -15px;
    padding: 12px 16px;
  }

  /* Tumpuk tahun dan nama sekolah agar teks tidak berdesakan */
  .edu-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .edu-list__period {
    margin-bottom: 4px;
  }
}