/* Didaftarkan agar transisi mask spotlight kucing bisa beranimasi */
@property --spotlight-size {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}

:root {
  --bg: #140509;
  --bg-2: #2A0A13;
  --text: #FCEDD8;
  --muted: #E0A3B0;

  --accent: #FFD464;     
  --coral: #FF5E5E;       
  --coral-dark: #B0183D;    

  --glass: rgba(226, 60, 100, 0.08);
  --glass-b: rgba(255, 212, 100, 0.2);
  --r-lg: 24px; --r-md: 16px; --r-pill: 999px;
  --sp: clamp(16px, 4vw, 32px); --nav-h: 72px;
  --shadow: 0 20px 50px -20px rgba(176, 24, 61, 0.4);
  --t: .3s; --ease: cubic-bezier(.2, .7, .2, 1);
  --font-h: 'Poppins', system-ui, sans-serif;
  --font-b: 'Poppins', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body { font-family: var(--font-b); background: var(--bg); color: var(--text); line-height: 1.7; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, video { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-h); line-height: 1.15; letter-spacing: -.02em; }

.skip-link { position: fixed; top: -60px; left: 16px; z-index: 2000; padding: 10px 18px; border-radius: var(--r-pill); background: var(--accent); color: var(--bg); font-weight: 600; transition: top var(--t); }
.skip-link:focus { top: 12px; }

/* ---------- Background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 80% at 50% 0%, var(--bg-2), var(--bg) 70%); }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45; will-change: transform; animation: float 24s ease-in-out infinite alternate; }
.orb-a { width: 46vmax; height: 46vmax; left: -12vmax; top: -12vmax; background: var(--coral-dark); }
.orb-b { width: 38vmax; height: 38vmax; right: -10vmax; top: 25vh; background: var(--coral); opacity: .3; animation-duration: 30s; animation-delay: -8s; }
.orb-c { width: 30vmax; height: 30vmax; left: 30vw; bottom: -14vmax; background: var(--accent); opacity: .2; animation-duration: 36s; animation-delay: -14s; }
@keyframes float { to { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); } }
.grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent); mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent); }
#particles { position: absolute; inset: 0; width: 100%; height: 100%; }

.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, var(--coral), var(--accent)); z-index: 1100; }

/* ---------- Glass ---------- */
.glass { position: relative; background: var(--glass); border: 1px solid var(--glass-b); border-radius: var(--r-lg); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); box-shadow: var(--shadow); overflow: hidden; }
/* Spotlight mengikuti kursor (--mx/--my diisi oleh script.js, desktop saja) */
.glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity var(--t); background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 212, 100, .13), transparent 60%); }
.glass:hover::before { opacity: 1; }
/* Kartu timeline butuh overflow visible agar titik penanda tidak terpotong */
.timeline > li.glass { overflow: visible; }

/* ---------- Navbar ---------- */
.navbar { position: fixed; inset: 0 0 auto 0; height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--sp); z-index: 1000; transition: background var(--t), border-color var(--t); border-bottom: 1px solid transparent; }
.navbar.scrolled { background: rgba(20, 5, 9, 0.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-color: var(--glass-b); }
.logo { font-family: var(--font-h); font-weight: 700; font-size: 1.3rem; color: #fff; }
.logo span { color: var(--coral); }
.nav-links { display: flex; gap: 6px; }
.nav-links a { display: block; padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid transparent; color: var(--muted); font-size: .92rem; transition: color var(--t), background var(--t), border-color var(--t); }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); background: var(--glass); border-color: var(--glass-b); }
.burger { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; position: relative; }
.burger i { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); border-radius: 2px; transition: transform var(--t), top var(--t); }
.burger i:first-child { top: 18px; }
.burger i:last-child { top: 25px; }
.burger[aria-expanded="true"] i:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] i:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Layout ---------- */
.wrap { width: min(1080px, 100% - 2*var(--sp)); margin-inline: auto; }
.section { padding: clamp(72px, 12vw, 130px) 0; }
.section h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 40px; color: #fff; }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 40px; width: min(1080px, 100% - 2*var(--sp)); margin-inline: auto; padding: calc(var(--nav-h) + 24px) 0 60px; position: relative; }
.pill { display: inline-block; padding: 6px 14px; border: 1px solid var(--glass-b); background: var(--glass); border-radius: var(--r-pill); font-size: .85rem; color: var(--accent); margin-bottom: 24px; }

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(120deg, var(--text) 0%, var(--coral) 25%, var(--accent) 50%, var(--coral) 75%, var(--text) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shineText 6s linear infinite;
}
@keyframes shineText { to { background-position: 200% center; } }

.lead { max-width: 52ch; color: var(--muted); font-size: 1.1rem; margin-bottom: 36px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }

.btn { display: inline-block; padding: 14px 26px; border-radius: var(--r-pill); font-weight: 600; transition: transform var(--t) var(--ease), box-shadow var(--t), background var(--t); }
.btn:hover { transform: translateY(-3px); }
.btn-primary { background: linear-gradient(120deg, var(--coral), var(--accent)); color: var(--bg); box-shadow: 0 10px 30px -10px rgba(255, 94, 94, 0.5); }
.btn-ghost { border: 1px solid var(--glass-b); background: var(--glass); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

.scroll-hint { position: absolute; left: 50%; bottom: 20px; width: 26px; height: 42px; margin-left: -13px; border: 2px solid var(--glass-b); border-radius: 14px; opacity: .8; transition: opacity var(--t); }
.scroll-hint:hover { opacity: 1; }
.scroll-hint i { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--accent); animation: scrollDot 1.8s ease-in-out infinite; }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

.hero-visual { position: relative; justify-self: center; width: min(300px, 100%); }
.avatar { aspect-ratio: 4/5; display: grid; place-items: center; overflow: hidden; border-radius: 24px; animation: boxWarp 6s ease-in-out infinite alternate; position: relative; cursor: pointer; }
.avatar-hint { margin-top: 14px; text-align: center; font-size: .8rem; color: var(--muted); opacity: .8; }

@keyframes boxWarp {
  0%   { border-radius: 24px; transform: scale(1) rotate(0deg); }
  25%  { border-radius: 40px 16px 30px 20px; }
  50%  { border-radius: 18px 38px 20px 35px; transform: scale(1.02) rotate(1deg); }
  75%  { border-radius: 35px 22px 42px 18px; }
  100% { border-radius: 20px 35px 22px 38px; transform: scale(1) rotate(-1deg); }
}

.badge { position: absolute; padding: 10px 16px; border-radius: var(--r-pill); font-size: .85rem; cursor: pointer; transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease, color .3s ease; user-select: none; z-index: 10; }
.b1 { top: 8%; left: -16%; animation: floatCat 5s ease-in-out infinite alternate; }
.b2 { bottom: 22%; right: -14%; animation: floatTech 6s ease-in-out infinite alternate-reverse; }
.badge:hover { transform: scale(1.1) translateY(-4px); }
.b1:hover { border-color: rgba(255, 212, 100, .8); box-shadow: 0 8px 25px -5px rgba(255, 212, 100, .5); color: var(--accent); }
.b2:hover { border-color: rgba(255, 94, 94, .8); box-shadow: 0 8px 25px -5px rgba(255, 94, 94, .5); color: var(--coral); }
@keyframes floatCat  { 0% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-12px) rotate(2deg); }  100% { transform: translateY(-4px) rotate(-2deg); } }
@keyframes floatTech { 0% { transform: translateY(0) rotate(1deg); }  50% { transform: translateY(-14px) rotate(-3deg); } 100% { transform: translateY(-6px) rotate(2deg); } }

.avatar img.main-img { position: relative; width: 100%; height: 100%; object-fit: cover; z-index: 1; display: block; }
.avatar img.kucing-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 100% 200%;
  transform: scale(1.25); transform-origin: 50% 10%;
  z-index: 2; pointer-events: none;
  -webkit-mask-image: radial-gradient(circle var(--spotlight-size, 0px) at var(--mouse-x, 50%) var(--mouse-y, 50%), #000 50%, transparent 100%);
  mask-image: radial-gradient(circle var(--spotlight-size, 0px) at var(--mouse-x, 50%) var(--mouse-y, 50%), #000 50%, transparent 100%);
  transition: --spotlight-size .25s ease;
}

/* ---------- About ---------- */
.panel { padding: clamp(24px, 4vw, 40px); display: grid; gap: 16px; color: var(--muted); font-size: 1.05rem; width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.chips li { padding: 6px 14px; border-radius: var(--r-pill); border: 1px solid var(--glass-b); color: var(--text); font-size: .88rem; }

/* ---------- Cards & Timeline ---------- */
.card { padding: 28px; transition: transform var(--t) var(--ease), border-color var(--t), box-shadow var(--t); }
.card:hover { transform: translateY(-6px); border-color: rgba(255, 212, 100, .4); }
.role { display: inline-block; padding: 4px 12px; border-radius: var(--r-pill); background: rgba(255, 94, 94, .15); color: var(--coral); font-size: .82rem; margin-bottom: 14px; }
.card h3 { font-size: 1.25rem; margin-bottom: 10px; color: #fff; }
.card p { color: var(--muted); }
.date { display: block; margin-top: 16px; font-size: .85rem; color: var(--muted); opacity: .75; }

.timeline { position: relative; display: grid; gap: 20px; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--coral), var(--accent), transparent); }
.timeline > li::after { content: ""; position: absolute; left: -33px; top: 34px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--coral); box-shadow: 0 0 12px var(--coral); }

.timeline .card { display: grid; grid-template-columns: 1fr 180px; gap: 20px; align-items: center; }
.exp-content { display: flex; flex-direction: column; }
.exp-media { width: 100%; aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--glass-b); background: rgba(0, 0, 0, .2); cursor: zoom-in; }
.exp-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--t) var(--ease); }
.card:hover .exp-media img { transform: scale(1.06); }

.ach-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.ach dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; margin-top: 16px; font-size: .92rem; }
.ach dt { color: var(--muted); }
.ach dd { color: var(--text); }

.cert-link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 500; border-bottom: 1px dotted var(--accent); transition: color .2s, border-color .2s; }
.cert-link:hover { color: var(--coral); border-color: var(--coral); }

/* ---------- Karya ---------- */
.works-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.work-card { padding: 0; display: flex; flex-direction: column; border-radius: var(--r-lg); }
.media-holder { width: 100%; aspect-ratio: 16 / 9; background: rgba(0, 0, 0, .4); overflow: hidden; position: relative; border-bottom: 1px solid var(--glass-b); }
.media-holder img, .media-holder video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease); }
.work-card:hover .media-holder img { transform: scale(1.05); }
.work-info { padding: 24px; display: flex; flex-direction: column; gap: 8px; }

/* Slider foto */
.photo-section-header { display: flex; justify-content: space-between; align-items: center; margin-top: 56px; margin-bottom: 24px; }
.photo-section-header h3 { font-size: 1.5rem; color: var(--text); }
.slider-nav { display: flex; gap: 10px; }
.slide-btn { width: 42px; height: 42px; border-radius: 50%; background: var(--glass); border: 1px solid var(--glass-b); color: var(--text); font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--t), border-color var(--t), transform var(--t), color var(--t); user-select: none; }
.slide-btn:hover { background: rgba(255, 94, 94, .25); border-color: var(--coral); color: var(--accent); transform: scale(1.08); }

/* Padding negatif memberi ruang agar glow kartu tidak terpotong */
.photo-slider-container { width: 100%; overflow: hidden; padding: 16px 12px 28px; margin: -16px -12px -28px; }
.photo-slider { display: flex; gap: 24px; overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-width: none; -ms-overflow-style: none; }
.photo-slider::-webkit-scrollbar { display: none; }
.photo-slider .work-card { flex: 0 0 calc(33.333% - 16px); min-width: 280px; scroll-snap-align: start; }

/* ---------- Skills ---------- */
.skills { display: flex; flex-wrap: wrap; gap: 14px; }
.skills li { padding: 14px 26px; border-radius: var(--r-pill); font-weight: 500; transition: transform var(--t) var(--ease), border-color var(--t); }
.skills li:hover { transform: translateY(-4px); border-color: rgba(255, 212, 100, .6); }

/* ---------- Tools ---------- */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px; }
.tool-card { padding: 24px 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; transition: transform var(--t) var(--ease), border-color var(--t), box-shadow var(--t); cursor: default; }
.tool-card:hover { transform: translateY(-6px); border-color: rgba(255, 212, 100, .5); box-shadow: 0 12px 30px -10px rgba(255, 94, 94, .3); }
.tool-icon { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; }
.tool-icon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .3)); }
.tool-card span { font-size: .95rem; font-weight: 500; color: var(--text); }

/* ---------- Contact & Footer ---------- */
.contact { text-align: center; padding: clamp(40px, 7vw, 80px) var(--sp); display: grid; justify-items: center; gap: 20px; }
.socials { display: flex; gap: 22px; margin-top: 10px; }
.socials a { color: var(--muted); border-bottom: 1px solid var(--glass-b); padding-bottom: 2px; transition: color var(--t), border-color var(--t); }
.socials a:hover { color: var(--accent); border-color: var(--accent); }
.copyright { text-align: center; margin-top: 48px; font-size: .85rem; color: var(--muted); }

/* ---------- Animasi masuk ---------- */
.hero-in { opacity: 0; transform: translateY(18px); animation: in .7s var(--ease) forwards; animation-delay: var(--d, 0ms); }
@keyframes in { to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

.reveal.in.card, .reveal.in.glass { transition-delay: 0ms; }

.img-modal { position: fixed; inset: 0; z-index: 9999; display: flex; justify-content: space-between; align-items: center; padding: 20px; background: rgba(20, 5, 9, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s; }
.img-modal.show { opacity: 1; visibility: visible; }
.modal-container { display: flex; flex-direction: column; align-items: center; justify-content: center; max-width: 85vw; max-height: 85vh; }
.modal-content { max-width: 100%; max-height: 80vh; border-radius: var(--r-md); border: 1px solid var(--glass-b); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .8); transform: scale(.92); transition: transform .3s var(--ease); object-fit: contain; }
.img-modal.show .modal-content { transform: scale(1); }
.modal-counter { margin-top: 12px; color: var(--muted); font-size: .9rem; letter-spacing: 1px; }
.modal-nav { background: var(--glass); border: 1px solid var(--glass-b); color: var(--text); width: 50px; height: 50px; flex-shrink: 0; border-radius: 50%; font-size: 1.4rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s, border-color .2s, transform .2s, color .2s; user-select: none; z-index: 10001; }
.modal-nav:hover { background: rgba(255, 94, 94, .3); border-color: var(--coral); color: var(--accent); transform: scale(1.1); }
.close-modal { position: absolute; top: 16px; right: 24px; background: none; border: 0; color: var(--text); font-size: 38px; font-weight: 700; cursor: pointer; transition: color .2s, transform .2s; line-height: 1; padding: 4px 10px; z-index: 10002; }
.close-modal:hover { color: var(--coral); transform: scale(1.15); }

@media (max-width: 860px) {
  .burger { display: block; }
  .nav-links { position: absolute; top: calc(100% + 8px); left: var(--sp); right: var(--sp); flex-direction: column; padding: 12px; background: rgba(20, 5, 9, .95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--glass-b); border-radius: var(--r-md); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity var(--t), transform var(--t), visibility var(--t); }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: 12px 16px; }
  .hero { grid-template-columns: 1fr; padding-top: calc(var(--nav-h) + 40px); }
  .hero-visual { justify-self: start; width: min(240px, 70%); margin-left: 18px; }
  .b1 { left: -10%; top: 4%; }
  .b2 { right: -20%; bottom: 22%; }
  .ach-grid { grid-template-columns: 1fr; }
  .photo-slider .work-card { flex: 0 0 calc(50% - 12px); }
  /* Ringankan efek berat di perangkat kecil */
  .orb { filter: blur(60px); }
  .glass { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .scroll-hint { display: none; }
}

@media (max-width: 640px) {
  .timeline .card { grid-template-columns: 1fr; }
  .exp-media { aspect-ratio: 16 / 9; }
  .modal-nav { position: absolute; bottom: 20px; width: 44px; height: 44px; }
  .modal-prev { left: 25vw; }
  .modal-next { right: 25vw; }
}

@media (max-width: 600px) {
  .photo-slider .work-card { flex: 0 0 88%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal, .hero-in { opacity: 1; transform: none; }
}