/* ==========================================================================
   Portofolio Syaepuddin (Sypdn)
   Mobile-first. Tema gelap default, tema terang lewat [data-theme="light"].

   Alasan desain (satu baris per keputusan, sesuai aturan antislop R-31):
   - Palet: biru-cyan sebagai satu aksen utama, violet hanya dipakai di gradien
     judul dan bingkai foto sebagai motif identitas. Sisanya netral.
   - Inter untuk teks (terbaca di layar kecil), JetBrains Mono hanya untuk aksen
     kode: peran yang diketik, level, tag, dan angka statistik.
   - Radius: 10px untuk kontrol, 16px untuk kartu, 32px untuk foto. Tidak ada pil.
   - Glassmorphism hanya di navbar saat scroll, tidak di tempat lain.
   - Glow hanya di hover ikon sosial dan tombol utama (aksen fokus).
   - Gerak: reveal saat scroll, hover ikon, gradien hero. Semua mati saat
     prefers-reduced-motion: reduce.
   ========================================================================== */

/* ---------- 1. Token warna ---------- */
:root,
[data-theme="dark"] {
  --bg: #0b0d14;
  --bg-alt: #0f121b;
  --surface: #141824;
  --surface-2: #1a1f2e;
  --border: #2a3144;
  --text: #e8eaf2;
  --muted: #a3a9bb;
  --accent: #38bdf8;
  --accent-2: #8b5cf6;
  --on-accent: #04121c;
  --glass: rgba(11, 13, 20, 0.72);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  --hero-glow-1: rgba(56, 189, 248, 0.22);
  --hero-glow-2: rgba(139, 92, 246, 0.2);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-alt: #eceff6;
  --surface: #ffffff;
  --surface-2: #f1f3f9;
  --border: #cfd5e3;
  --text: #11131a;
  --muted: #4b5262;
  --accent: #0369a1;
  --accent-2: #6d28d9;
  --on-accent: #ffffff;
  --glass: rgba(246, 247, 251, 0.78);
  --shadow: 0 12px 32px rgba(17, 19, 26, 0.12);
  --hero-glow-1: rgba(3, 105, 161, 0.14);
  --hero-glow-2: rgba(109, 40, 217, 0.12);
  color-scheme: light;
}

/* ---------- 2. Dasar ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: clip; /* tooltip ikon tidak boleh memicu scroll horizontal */
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* Atribut hidden harus selalu menang atas display lain */
[hidden] { display: none !important; }

/* Semua kontrol interaktif menunjukkan cursor pointer (R-39) */
a[href], button, summary, select, label[for], [role="button"] { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button { font: inherit; color: inherit; }

/* Fokus jelas untuk navigasi keyboard (R-32) */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--accent); color: var(--on-accent); }

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 16px;
}
@media (min-width: 640px) { .container { padding-inline: 24px; } }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.text-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-link:hover { text-decoration-thickness: 2px; }

.note { color: var(--muted); }

/* ---------- 3. Layar loading ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background: var(--bg);
  /* Pengaman: kalau JavaScript gagal, layar ini tetap hilang sendiri setelah 3 detik */
  animation: loader-failsafe 0.4s ease 3s forwards;
}
.loader.is-done {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
.loader-mark {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 2.75rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
}
.loader-bar {
  position: relative;
  width: 120px;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--border);
}
.loader-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: var(--accent);
  border-radius: 3px;
  animation: loader-slide 1s ease-in-out infinite;
}
@keyframes loader-slide {
  from { transform: translateX(-100%); }
  to { transform: translateX(250%); }
}
@keyframes loader-failsafe {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* ---------- 4. Navbar ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
/* Transparan di atas, permukaan solid setelah scroll (tanpa blur) */
.site-header.is-scrolled {
  background: var(--surface);
  border-bottom-color: var(--border);
}
.site-header.nav-open {
  background: var(--surface);
  border-bottom-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.brand:hover { color: var(--accent); }

.nav-actions { display: flex; gap: 8px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 1.05rem;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn:active { background: var(--surface-2); }

[data-theme="dark"] .icon-moon,
[data-theme="light"] .icon-sun { display: none; }

/* Menu mobile */
.nav-links {
  display: none;
  position: absolute;
  top: 72px; left: 0; right: 0;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.site-header.nav-open .nav-links {
  display: flex;
  animation: menu-in 0.2s ease;
}
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.nav-links a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a[aria-current="true"] { color: var(--accent); background: var(--surface-2); }

/* Ikon hamburger berubah jadi X */
.bars { display: block; width: 20px; }
.bars span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav-links {
    display: flex;
    position: static;
    flex-direction: row;
    gap: 2px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .nav-links a {
    position: relative;
    min-height: 44px;
    padding: 0 12px;
  }
  .nav-links a:hover { background: none; }
  .nav-links a[aria-current="true"] { background: none; }
  /* Indikator section aktif */
  .nav-links a::after {
    content: "";
    position: absolute;
    left: 12px; right: 12px; bottom: 6px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.25s ease;
  }
  .nav-links a[aria-current="true"]::after { transform: scaleX(1); }
}

/* ---------- 5. Tombol ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  line-height: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover {
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 40%, transparent);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-sm { min-height: 44px; padding: 0 16px; font-size: 0.9rem; }

/* ---------- 6. Ikon sosial media ---------- */
.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.social-row--center { justify-content: center; }

.social {
  --brand: var(--accent);
  position: relative;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.3rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.2s ease, border-color 0.2s ease;
}
.social-row--sm .social { width: 44px; height: 44px; font-size: 1.15rem; }
.social-row--lg .social { width: 60px; height: 60px; font-size: 1.6rem; border-radius: 14px; }

/* Warna khas tiap platform, muncul saat hover/fokus */
.social[data-id="github"] { --brand: #181717; }
[data-theme="dark"] .social[data-id="github"] { --brand: #f0f6fc; }
.social[data-id="linkedin"] { --brand: #0a66c2; }
[data-theme="dark"] .social[data-id="linkedin"] { --brand: #70b5f9; }
.social[data-id="telegram"] { --brand: #26a5e4; }
.social[data-id="tiktok"] { --brand: #fe2c55; }
.social[data-id="instagram"] { --brand: #e4405f; }
.social[data-id="youtube"] { --brand: #ff0000; }
.social[data-id="whatsapp"] { --brand: #25d366; }
.social[data-id="email"] { --brand: #ea4335; }

.social:hover,
.social:focus-visible {
  transform: translateY(-4px);
  color: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 38%, transparent);
}
.social:active { transform: translateY(-1px); }

/* Tooltip nama platform */
.social::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.social:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
@media (hover: hover) {
  .social:hover::after { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- 7. Section umum ---------- */
.section {
  padding-block: clamp(64px, 9vw, 112px);
  scroll-margin-top: 72px;
}
.section-alt { background: var(--bg-alt); }

.section-head { margin-bottom: clamp(28px, 5vw, 48px); }
.section-title {
  font-size: clamp(1.8rem, 4.6vw, 2.6rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-lead {
  margin-top: 12px;
  max-width: 60ch;
  color: var(--muted);
}

/* Animasi muncul saat scroll. Hanya aktif kalau main.js berjalan (kelas js-ready). */
.js-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js-ready .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 8. Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: 112px 64px;
  overflow: hidden;
  scroll-margin-top: 0;
}

/* Gradien bergerak pelan, hanya di hero (identitas, bukan dekorasi di semua section) */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-bg::before,
.hero-bg::after {
  content: "";
  position: absolute;
  width: 70vmax; height: 70vmax;
  border-radius: 50%;
  will-change: transform;
}
.hero-bg::before {
  top: -35vmax; left: -20vmax;
  background: radial-gradient(circle, var(--hero-glow-1), transparent 65%);
  animation: drift-a 22s ease-in-out infinite alternate;
}
.hero-bg::after {
  bottom: -40vmax; right: -25vmax;
  background: radial-gradient(circle, var(--hero-glow-2), transparent 65%);
  animation: drift-b 26s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(12vmax, 8vmax); } }
@keyframes drift-b { to { transform: translate(-10vmax, -8vmax); } }

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 40px;
  align-items: center;
}

.hero-photo { order: -1; }

.hero-hello {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.95rem;
  color: var(--muted);
}
.hero-title {
  margin-top: 4px;
  font-size: clamp(2.7rem, 10vw, 5.2rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.grad {
  color: var(--accent); /* cadangan untuk browser tanpa background-clip: text */
  background-image: linear-gradient(100deg, var(--accent), var(--accent-2), var(--accent));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: grad-shift 10s linear infinite;
}
@keyframes grad-shift { to { background-position: 200% center; } }

.hero-role {
  margin-top: 14px;
  min-height: 3.2em;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(1rem, 3.6vw, 1.3rem);
  line-height: 1.6;
  color: var(--accent);
}
.caret {
  display: inline-block;
  width: 2px; height: 1.1em;
  margin-left: 3px;
  vertical-align: text-bottom;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-tagline {
  margin-top: 8px;
  font-size: clamp(1.25rem, 3.6vw, 1.75rem);
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.hero-meta { margin-top: 8px; color: var(--muted); }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.hero .social-row { margin-top: 32px; }

/* Foto: bingkai gradien + garis offset sebagai motif identitas */
.photo-ring {
  position: relative;
  width: min(62vw, 240px);
  aspect-ratio: 1;
  padding: 5px;
  border-radius: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.photo-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translate(12px, 12px);
  border: 1px solid var(--accent-2);
  border-radius: 32px;
  opacity: 0.6;
  z-index: -1;
}
.photo-ring img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 27px;
  background: #fff;
}
.photo-fallback {
  position: absolute;
  inset: 5px;
  display: none;
  place-items: center;
  border-radius: 27px;
  background: var(--surface);
  color: var(--accent);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 5rem;
}
.hero-photo.no-photo img { display: none; }
.hero-photo.no-photo .photo-fallback { display: grid; }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.25fr 0.75fr; gap: 64px; }
  .hero-photo { order: 0; justify-self: center; }
  .photo-ring { width: min(100%, 380px); }
  .hero-role { min-height: 1.6em; }
  .photo-fallback { font-size: 8rem; }
}

/* Tombol jeda animasi (gerak otomatis lebih dari 5 detik harus bisa dihentikan) */
.motion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.875rem;
}
.motion-toggle:hover { color: var(--text); }
.motion-toggle[hidden] { display: none; }
.motion-paused .grad,
.motion-paused .hero-bg::before,
.motion-paused .hero-bg::after { animation-play-state: paused; }
.motion-paused .caret { display: none; }

/* ---------- 9. Tentang ---------- */
.about-grid {
  display: grid;
  gap: 48px;
  align-items: start;
}
.about-copy p {
  margin-top: 20px;
  max-width: 62ch;
  color: var(--muted);
}
.about-copy .section-title + p { margin-top: 24px; }

.stats { display: grid; }
.stat {
  display: flex;
  flex-direction: column-reverse; /* dt (label) lebih dulu di HTML, angka tampil di atas */
  gap: 4px;
  padding-block: 22px;
  border-top: 1px solid var(--border);
}
.stat:last-child { border-bottom: 1px solid var(--border); }
.stat-num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 500;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.03em;
}
.stat-label { color: var(--muted); }

@media (min-width: 900px) {
  .about-grid { grid-template-columns: 1.3fr 0.7fr; gap: 80px; }
}

/* ---------- 10. Keahlian ---------- */
.skills-grid {
  display: grid;
  gap: 16px;
}
.skill-panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.skill-panel h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 1.05rem;
  font-weight: 600;
}
.skill-panel h3 i { color: var(--accent); font-size: 1.1rem; }

.skill-list { display: grid; gap: 14px; }
.skill-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 12px;
}
.skill-icon {
  display: grid;
  place-items: center;
  width: 28px;
  font-size: 1.45rem;
  color: var(--accent);
}
.skill-name { font-weight: 500; line-height: 1.35; }
.skill-level {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}
.level { display: inline-flex; gap: 3px; }
.level i {
  width: 14px; height: 6px;
  border-radius: 2px;
  background: var(--border);
}
.level i.on { background: var(--accent); }
.level-text {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  line-height: 1;
  color: var(--muted);
}

@media (min-width: 700px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .skill-panel--wide { grid-column: 1 / -1; }
  .skill-panel--wide .skill-list { grid-template-columns: repeat(2, 1fr); column-gap: 40px; }
}
@media (min-width: 1000px) {
  .skills-grid { grid-template-columns: repeat(3, 1fr); }
  .skill-panel--wide .skill-list { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 11. Proyek ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.filter-btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  font-weight: 500;
  color: var(--muted);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.filter-btn:hover { border-color: var(--accent); color: var(--text); }
.filter-btn[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.project-grid {
  display: grid;
  gap: 16px;
  grid-auto-flow: dense;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.project-card.is-hidden { display: none; }

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 1.15rem;
}
/* Status adalah informasi nyata (selesai, dikembangkan, direncanakan), bukan hiasan */
.card-status {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--muted);
}
.card-status[data-status="selesai"] { border-color: var(--accent); color: var(--accent); }

.project-card h3 {
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.project-card p { color: var(--muted); font-size: 0.95rem; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--muted);
}

.card-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }

.project-card--featured {
  padding: 28px;
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
}
.project-card--featured h3 { font-size: 1.4rem; }
.project-card--featured p { font-size: 1rem; }

.empty {
  padding: 32px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

@media (min-width: 640px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .project-grid { grid-template-columns: repeat(3, 1fr); }
  .project-card--featured { grid-column: span 2; }
}

/* ---------- 12. Perjalanan ---------- */
.timeline-wrap { max-width: 820px; }
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 8px; bottom: 8px; left: 7px;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding-bottom: 36px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  top: 6px; left: -32px;
  width: 16px; height: 16px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg-alt);
}
.timeline-when {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.85rem;
  color: var(--accent);
}
.timeline-item h3 {
  margin-top: 4px;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
}
.timeline-item p { margin-top: 6px; color: var(--muted); }

/* ---------- 13. Statistik GitHub ---------- */
.gh-grid {
  display: grid;
  gap: 16px;
}
.gh-card {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 170px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
}
.gh-card img { width: 100%; max-width: 495px; height: auto; transition: opacity 0.3s ease; }
.gh-card.is-loading img { opacity: 0; }
.gh-card .gh-status {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.gh-card.is-loading .gh-status { display: grid; }

.gh-fallback {
  margin-top: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.gh-fallback h3 { font-size: 1.05rem; font-weight: 600; }
.gh-fallback p { margin-top: 6px; color: var(--muted); }
.gh-fallback ul { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 14px; }
.gh-fallback li { color: var(--muted); }
.gh-fallback li strong {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: var(--accent);
  font-weight: 500;
}
.gh-fallback .btn { margin-top: 18px; }

@media (min-width: 800px) {
  .gh-grid { grid-template-columns: repeat(2, 1fr); }
  .gh-card--wide { grid-column: 1 / -1; }
}

/* ---------- 14. Terhubung ---------- */
.connect { background: var(--bg-alt); }
.connect-inner {
  max-width: 720px;
  text-align: center;
}
.connect-inner .section-lead { margin-inline: auto; }
.connect-inner .social-row { margin-top: 36px; }
/* Ruang untuk tooltip di atas ikon */
.connect-inner .social-row { padding-top: 8px; }

/* ---------- 15. Footer ---------- */
.site-footer {
  padding-block: 32px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.copyright { color: var(--muted); font-size: 0.9rem; }
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 4px;
  color: var(--muted);
  font-weight: 500;
}
.to-top:hover { color: var(--accent); }

@media (min-width: 800px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ---------- 16. Kurangi gerak (R-39) ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .loader { display: none; }
  .caret { display: none; }
  .hero-bg::before,
  .hero-bg::after { animation: none; }
  .grad { animation: none; }
  .js-ready .reveal { opacity: 1; transform: none; }
  .btn:hover,
  .social:hover,
  .social:focus-visible,
  .project-card:hover { transform: none; }
}
