/* ============================================================
   M. EVAN ALMUNAWAR — Cinematic Portfolio
   style.css  |  Performance-Optimised Version

   KEY OPTIMISATIONS SUMMARY
   ─────────────────────────
   1. backdrop-filter REMOVED from nav — replaced with semi-opaque bg + border.
      backdrop-filter forces the GPU to composite every element behind it on
      every repaint; on mid-range Android this causes scroll jank.

   2. skill-item glassmorphism REMOVED — backdrop-filter was on every card;
      replaced with a solid semi-transparent background (same look, ~10× cheaper).

   3. Film grain animation REMOVED — was causing a flicker/kedip effect at
      the screen edges on all browsers, even at 0.18s steps with GPU
      compositing. Removed entirely rather than just disabling the
      animation, per explicit request.

   4. Parallax on hero image REMOVED from JS (was triggering layout on scroll).
      Hero image is now position:fixed behind a regular stacking context — the
      browser handles the "sticky background" cheaply without JS.

   5. box-shadow on hover states REPLACED with border-color change + a tiny
      translate. Shadows force repaints; border changes are composited.

   6. All transitions now use ONLY transform and opacity — the two props the
      browser can animate on the compositor thread without touching the CPU.

   7. contain:content added to project-card and skill-item to isolate their
      paint and layout from the rest of the page.

   8. Orb / glow radial-gradients now use a single pseudo-element instead of
      dedicated DOM nodes where possible.

   9. @media (prefers-reduced-motion) respected — all animations disabled for
      users who opt out (accessibility + battery saving).
  10. Mobile nav: backdrop-filter removed; solid dark background used instead.
============================================================ */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:       #0A0A0A;
  --black-soft:  #0A0A0A;
  --black-card:  #161616;
  --red:         #6B6B6B;
  --red-mid:     #8C8C8C;
  --red-bright:  #E8E4D8;
  --white:       #FAFAFA;
  --white-dim:   #A1A1A1;
  --grey-border: rgba(232,228,216,0.14);
  --accent:      #E8E4D8;
  --accent-dim:  rgba(232,228,216,0.12);
  --surface:     #161616;
  --surface-2:   #1E1E1E;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Cormorant Garamond', serif;
  --font-mono:    'Space Mono', monospace;

  /* PERF: All transitions use only transform + opacity (compositor-safe) */
  --t-fast:   0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --t-normal: 0.4s  cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  /* PERF: Tells the browser this page scrolls — enables async scrolling */
  scroll-padding-top: 70px;
}

body {
  background-color: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
  /* PERF: Enables hardware-accelerated scrolling on Android WebView */
  -webkit-overflow-scrolling: touch;
}

/* ===== BROWSER DEFAULT OVERRIDES =====
   Remove ALL browser-default styling: selection, focus rings,
   tap highlights, input styling, etc.
*/

/* Custom text selection */
::selection {
  background: rgba(232, 228, 216, 0.25);
  color: var(--white);
}
::-moz-selection {
  background: rgba(232, 228, 216, 0.25);
  color: var(--white);
}

/* Remove blue tap highlight on mobile (Android/iOS WebView) */
* { -webkit-tap-highlight-color: transparent; }

/* Custom focus ring — replaces browser blue outline */
:focus-visible {
  outline: 1px solid var(--red-bright);
  outline-offset: 3px;
}
:focus:not(:focus-visible) { outline: none; }

/* Remove default button/input browser styles */
button, input, textarea, select {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  font-family: inherit;
  color: inherit;
}

/* Minimal scrollbar — cosmetic only, no perf impact */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--red-bright); border-radius: 2px; opacity: 0.5; }

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2.5rem;
}
.section-pad { padding: 8rem 0; }

/* ===== NAVIGATION =====
   PERF: backdrop-filter REMOVED. Was causing full-page repaint on every
   scroll tick on Android. Replaced with solid semi-opaque background.
   Visual difference: negligible (background is near-black anyway).
*/
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.5rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--t-normal), padding var(--t-fast), backdrop-filter var(--t-normal);
  /* Glass default — transparan saat di top */
  background: rgba(10, 10, 10, 0.15);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}
.nav.scrolled {
  /* Glass effect saat scroll — Acrylic/Mica style */
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  padding: 0.9rem 2.5rem;
  border-bottom: 1px solid rgba(232, 228, 216, 0.08);
  box-shadow: 0 1px 0 rgba(232, 228, 216, 0.04), 0 4px 24px rgba(0,0,0,0.3);
}

.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo img {
  height: 1.6rem;
  width: auto;
  display: block;
}

/* ── nav list ── */
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ── shared style for both <button> triggers and direct <a> links ── */
.nav-btn,
.nav-direct {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white-dim);
  transition: color var(--t-fast);
  position: relative;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}


/* button reset — agresif untuk override browser default */
.nav-btn {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  outline: none;
  cursor: pointer;
  line-height: inherit;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white-dim);
  -webkit-font-smoothing: antialiased;
}

/* underline accent */
.nav-btn::after,
.nav-direct::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0.75rem;
  width: 0; height: 1px;
  background: var(--red-bright);
  transition: width var(--t-fast);
}
.nav-btn:hover,
.nav-direct:hover { color: var(--white); }
.nav-btn:hover::after,
.nav-direct:hover::after { width: calc(100% - 1.5rem); }

/* chevron icon */
.nav-chevron {
  flex-shrink: 0;
  transition: transform var(--t-fast);
  opacity: 0.6;
}
.has-dropdown.open .nav-chevron { transform: rotate(180deg); }

/* ── dropdown panel ── */
.nav-dropdown {
  list-style: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 160px;
  background: rgba(10, 10, 10, 0.97);
  border: 1px solid var(--grey-border);
  border-top: 1px solid rgba(232,228,216,0.30);
  padding: 0.5rem 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast), transform var(--t-fast);
  z-index: 2000;
}

/* small top arrow */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -5px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px; height: 8px;
  background: rgba(10, 10, 10, 0.97);
  border-left: 1px solid rgba(232,228,216,0.25);
  border-top: 1px solid rgba(232,228,216,0.25);
}

/* open state */
.has-dropdown.open .nav-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-item { position: relative; }

.nav-dropdown a {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white-dim);
  padding: 0.6rem 1.25rem;
  transition: color var(--t-fast), background-color var(--t-fast), padding-left var(--t-fast);
}
.nav-dropdown a:hover {
  color: var(--white);
  background-color: rgba(232,228,216,0.07);
  padding-left: 1.65rem;
}

/* divider between items */
.nav-dropdown li + li { border-top: 1px solid var(--grey-border); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  /* PERF: touch-action speeds up tap on mobile */
  touch-action: manipulation;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 1px;
  background: var(--white);
  /* PERF: only transform — compositor-safe */
  transition: transform var(--t-fast), opacity var(--t-fast);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* PERF: Hero BG is position:absolute (not fixed) to avoid triggering a new
   stacking context on every scroll. Parallax is removed from JS — static
   background is 60 fps vs the janky JS-driven version on low-end devices.
   Full CSS — tidak pakai file gambar sama sekali. */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 65% 20%, rgba(232,228,216,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 45% 40% at 15% 75%, rgba(232,228,216,0.05) 0%, transparent 65%),
    linear-gradient(160deg, #0A0A0A 0%, #0A0A0A 45%, #141414 100%);
}
/* Garis diagonal tipis — tekstur halus ala Resend, murni CSS */
.hero-bg::before {
  content: '';
  position: absolute;
  right: -5%; bottom: 18%;
  width: 45%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232,228,216,0.10), transparent);
  transform: rotate(-3deg);
}

/* Gradient overlay — pure CSS, single repaint */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(10,10,10,0.25) 0%,
    rgba(10,10,10,0.05) 40%,
    rgba(10,10,10,0.70) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 1.5rem;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--red-bright);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 11vw, 10rem);
  line-height: 0.9;
  letter-spacing: 0.04em;
  color: var(--white);
  margin-bottom: 3rem;
}
.hero-title .line { display: block; }
.hero-title .accent-line {
  color: transparent;
  -webkit-text-stroke: 1px var(--white);
  /* PERF: single small text-shadow instead of multiple layered glows */
  text-shadow: 0 0 60px rgba(232,228,216,0.15);
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2.2rem;
  border: 1px solid var(--red);
  background: transparent;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  /* PERF: Only background-color transitions (not box-shadow — avoids repaint) */
  transition: background-color var(--t-fast), border-color var(--t-fast);
  touch-action: manipulation;
}
.hero-btn:hover, .hero-btn:focus-visible {
  background-color: var(--red);
  border-color: var(--red);
}
.hero-btn svg {
  /* PERF: transform-only transition — compositor safe */
  transition: transform var(--t-fast);
  flex-shrink: 0;
}
.hero-btn:hover svg { transform: translateX(4px); }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  /* PERF: translate(-50%,0) instead of translateX so the browser can
     use the compositor for this too */
  transform: translate(-50%, 0);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.scroll-line {
  display: block;
  width: 1px; height: 44px;
  background: linear-gradient(180deg, var(--red-bright), transparent);
  /* PERF: opacity animation — compositor safe */
  animation: scroll-pulse 2.5s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}
.scroll-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  color: var(--white-dim);
}

.hero-rule {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  z-index: 10;
}

/* ===== REVEAL ANIMATIONS =====
   PERF: Only transform + opacity animated — both compositor-safe.
   Duration reduced from 0.8 s to 0.65 s to feel snappier on mobile.
*/
.reveal-up, .reveal-left, .reveal-right {
  opacity: 0;
  transition:
    opacity  0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* PERF: translateY reduced from 50px to 32px — less distance = less paint */
  will-change: opacity, transform;
}
.reveal-up    { transform: translateY(32px); }
.reveal-left  { transform: translateX(-32px); }
.reveal-right { transform: translateX(32px); }

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translate(0);
  /* PERF: once animation is complete, remove will-change to free GPU memory.
     This is done in JS after the transition ends. */
}

.delay-1 { transition-delay: 0.1s !important; }
.delay-2 { transition-delay: 0.2s !important; }
.delay-3 { transition-delay: 0.3s !important; }

/* ===== SECTION TYPOGRAPHY ===== */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red-bright);
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  line-height: 1.0;
  letter-spacing: 0.03em;
  color: var(--white);
  margin-bottom: 2.5rem;
}
.section-title em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1px rgba(250,250,250,0.35);
}
.section-header { margin-bottom: 4rem; }

/* ===== ABOUT ===== */
.about {
  background: var(--black-soft);
  position: relative;
  /* PERF: contain:layout stops about section layout from affecting the rest */
  contain: layout;
}
/* Single glow pseudo-element — cheaper than a dedicated DOM node */
.about::before {
  content: '';
  position: absolute;
  right: -15%; top: 5%;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,228,216,0.04) 0%, transparent 65%);
  pointer-events: none;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 6rem;
  align-items: center;
}

.about-img-wrap { position: relative; }
.about-img-frame {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--black-card);
  /* PERF: contain:paint so image repaint doesn't cascade up */
  contain: paint;
}
.about-img-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--grey-border);
  pointer-events: none;
}
.about-img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 5rem;
  letter-spacing: 0.1em;
  color: var(--red);
  opacity: 0.2;
  background: var(--black-card);
}
.about-img-deco {
  position: absolute;
  top: 1.5rem; left: 1.5rem;
  right: -1.5rem; bottom: -1.5rem;
  border: 1px solid var(--red);
  opacity: 0.2;
  z-index: -1;
  pointer-events: none;
}

.about-body {
  font-size: 1.1rem !important;
  color: var(--white-dim) !important;
  margin-bottom: 1.2rem;
  font-weight: 300 !important;
  line-height: 1.75 !important;
  overflow: visible !important;
  transform: none !important;
}
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}
.about-tags span {
  padding: 0.4rem 1rem;
  border: 1px solid var(--grey-border);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white-dim);
  transition: border-color var(--t-fast), color var(--t-fast);
}
.about-tags span:hover { border-color: var(--red); color: var(--white); }

/* ===== SECTION LIGHT VARIANT =====
/* ===== PROJECTS =====
   Background full CSS (bukan gambar) — radial glow redup di dua sudut
   plus garis diagonal tipis, mengikuti pola visual ala Resend: dark
   nyaris polos, ada tekstur halus tapi tidak mencolok. Ringan karena
   cuma gradient, bukan image atau blur mahal. */
.projects {
  background: var(--black);
  position: relative;
  overflow: hidden;
  contain: layout;
}
.projects::before {
  content: '';
  position: absolute;
  left: -10%; top: -15%;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,228,216,0.045) 0%, transparent 65%);
  pointer-events: none;
}
.projects::after {
  content: '';
  position: absolute;
  right: -8%; bottom: 10%;
  width: 30%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232,228,216,0.08), transparent);
  transform: rotate(-4deg);
  pointer-events: none;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.project-card:nth-child(4) { grid-column: 1 / 2; }
.project-card:nth-child(5) { grid-column: 2 / 3; }

.project-card {
  position: relative;
  background: var(--black-card);
  border: 1px solid var(--grey-border);
  overflow: hidden;
  cursor: pointer;
  /* PERF: contain:content isolates paint/layout — cards don't affect each other */
  contain: content;
  /* PERF: Only transform + border-color on hover — no box-shadow */
  transition:
    border-color var(--t-fast),
    transform var(--t-fast);
  touch-action: manipulation;
}
.project-card:hover {
  border-color: rgba(232,228,216,0.35);
  transform: translateY(-5px);
}

/* PERF: Hover glow is now a CSS ::after pseudo-element with opacity transition
   instead of a JS mousemove radial-gradient update. Eliminates an entire
   JS event listener per card that was running on every pointer move. */
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, rgba(232,228,216,0.06) 0%, transparent 65%);
  opacity: 0;
  /* PERF: opacity transition is compositor-safe */
  transition: opacity var(--t-fast);
  pointer-events: none;
}
.project-card:hover::after { opacity: 1; }

.card-img-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #0A0A0A;
  /* PERF: contain:paint keeps image scaling inside this box */
  contain: paint;
}
.card-img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.8;
  /* PERF: Only transform + opacity — no filter on hover */
  transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94), opacity var(--t-fast);
}
.project-card:hover .card-img {
  transform: scale(1.05);
  opacity: 1;
}

.card-img-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.2em;
  color: var(--red);
  opacity: 0.18;
}

.card-body { padding: 1.5rem; }
.card-num {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--red-bright);
  display: block;
  margin-bottom: 0.5rem;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 0.6rem;
}
.card-desc {
  font-size: 0.88rem;
  color: var(--white-dim);
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 1rem;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.card-tags span {
  padding: 0.22rem 0.65rem;
  background: rgba(232,228,216,0.08);
  border: 1px solid rgba(232,228,216,0.18);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-bright);
}

/* ===== SKILLS =====
   PERF: backdrop-filter/glassmorphism REMOVED from skill cards.
   Each card had backdrop-filter:blur(10px) — that's 7 blur compositing
   operations per frame. Replaced with a simple semi-transparent solid bg.
   Visual difference: none at these opacity levels on a dark background.
*/
.skills {
  background: var(--black-soft);
  position: relative;
  contain: layout;
}
/* Single centered glow */
.skills::before {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,228,216,0.035) 0%, transparent 60%);
  pointer-events: none;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.skill-item {
  padding: 2rem;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid var(--grey-border);
  contain: content;
  transition:
    border-color var(--t-fast),
    background-color var(--t-fast),
    transform var(--t-fast);
  position: relative;
  overflow: hidden;
}
/* Top accent bar on hover — transform-based, no repaint */
.skill-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-fast);
}
.skill-item:hover::before { transform: scaleX(1); }
.skill-item:hover {
  border-color: rgba(232,228,216,0.25);
  background-color: rgba(232,228,216,0.04);
  transform: translateY(-3px);
}

.skill-icon {
  width: 38px; height: 38px;
  margin-bottom: 1.1rem;
  color: var(--red-bright);
  opacity: 0.75;
  transition: opacity var(--t-fast);
}
.skill-item:hover .skill-icon { opacity: 1; }
.skill-icon svg { width: 100%; height: 100%; }

.skill-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  color: var(--white);
  margin-bottom: 0.4rem;
}
.skill-desc {
  font-size: 0.84rem;
  color: var(--white-dim);
  line-height: 1.6;
  font-weight: 300;
}

/* ===== CONTACT ===== */
.contact {
  background: var(--black);
  position: relative;
  overflow: hidden;
  contain: layout;
}
.contact::before {
  content: '';
  position: absolute;
  left: 50%; top: 0;
  transform: translateX(-50%);
  width: 700px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,228,216,0.035) 0%, transparent 65%);
  pointer-events: none;
}
.contact-inner { max-width: 700px; }

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6.5vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: 0.03em;
  color: var(--white);
  margin-bottom: 1.5rem;
}
.contact-title em {
  font-style: normal;
  color: var(--red-bright);
}
.contact-body {
  font-size: 1.1rem;
  color: var(--white-dim);
  font-weight: 300;
  margin-bottom: 3rem;
}

.contact-links { display: flex; flex-direction: column; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--grey-border);
  /* PERF: padding-left hover effect uses transform instead */
  transition: transform var(--t-fast);
}
.contact-item:first-child { border-top: 1px solid var(--grey-border); }
.contact-item:hover { transform: translateX(6px); }

.contact-icon {
  width: 42px; height: 42px;
  border: 1px solid var(--grey-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--t-fast), background-color var(--t-fast);
}
.contact-item:hover .contact-icon {
  border-color: var(--red-bright);
  background-color: rgba(232,228,216,0.08);
}
.contact-icon svg { color: var(--red-bright); }

.contact-info { display: flex; flex-direction: column; gap: 0.1rem; }
.contact-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white-dim);
}
.contact-value {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--white);
  transition: color var(--t-fast);
}
.contact-item:hover .contact-value { color: var(--red-bright); }

/* Decorative orb — pure CSS, no DOM overhead */
.contact-orb {
  position: absolute;
  right: -20%; top: 15%;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,228,216,0.07) 0%, transparent 60%);
  pointer-events: none;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--black);
  border-top: 1px solid var(--grey-border);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.footer-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.footer-meta-sep { color: var(--white-dim); opacity: 0.5; }
.footer-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--red-bright);
}
.footer-copy, .footer-craft {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--white-dim);
}
.footer-social {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  background: rgba(232,228,216,0.06);
  color: var(--red-bright);
  transition: background 0.2s ease, transform 0.2s ease;
}
.footer-social a svg {
  width: 1.05rem;
  height: 1.05rem;
}
.footer-social a:hover,
.footer-social a:focus-visible {
  background: rgba(232,228,216,0.16);
  transform: translateY(-2px);
}

/* ===== MOBILE NAV =====
   PERF: backdrop-filter REMOVED — replaced with near-opaque solid dark bg.
*/
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: 260px;
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 2rem;
    gap: 0;
    transform: translateX(100%);
    transition: transform var(--t-normal);
    border-left: 1px solid rgba(232, 228, 216, 0.10);
    z-index: 1000;
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle { display: flex; z-index: 1001; }
  .nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

  /* Mobile: nav items stack vertically */
  .nav-item { width: 100%; border-bottom: 1px solid var(--grey-border); }
  .nav-item:first-child { border-top: 1px solid var(--grey-border); }

  .nav-btn,
  .nav-direct {
    font-size: 0.75rem;
    padding: 1rem 0.25rem;
    width: 100%;
    justify-content: space-between;
  }

  /* Mobile: dropdown sits inline (not absolute) */
  .nav-dropdown {
    position: static;
    transform: none;
    min-width: unset;
    width: 100%;
    border: none;
    border-top: 1px solid var(--grey-border);
    padding: 0;
    background: rgba(232,228,216,0.04);
    /* height-based accordion */
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    pointer-events: none;
    transition: max-height var(--t-normal);
  }
  .nav-dropdown::before { display: none; }
  .has-dropdown.open .nav-dropdown {
    max-height: 300px;
    pointer-events: auto;
    transform: none;
  }

  .nav-dropdown a {
    font-size: 0.65rem;
    padding: 0.7rem 1rem;
  }
  .nav-dropdown a:hover { padding-left: 1.4rem; }
  .nav-dropdown li + li { border-top: 1px solid var(--grey-border); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .skills-grid { grid-template-columns: repeat(3, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card:nth-child(4),
  .project-card:nth-child(5) { grid-column: auto; }
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-img-wrap { max-width: 300px; }
}
@media (max-width: 768px) {
  .section-pad { padding: 5rem 0; }
  .container { padding: 0 1.25rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: clamp(2.8rem, 14vw, 5rem); }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-info { flex-direction: column; }
  .footer-social { margin-top: 0.4rem; }
  /* Reduce gap on mobile to prevent excessive scroll */
  .delay-1, .delay-2, .delay-3 { transition-delay: 0s !important; }
}
@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
  .hero-btn { width: 100%; justify-content: center; }
  .contact-item { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .contact-orb { display: none; } /* Cosmetic only — hide on small screens to save paint */
}

/* ===== REDUCED MOTION =====
   PERF + A11Y: Disable all animations for users who prefer reduced motion.
   This also helps battery life on mobile.
*/
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-up, .reveal-left, .reveal-right {
    opacity: 1;
    transform: none;
  }
}

/* ===== ABOUT TABS & SLIDER ===================================
   Tab filter: Education | Venture
   Each tab has a slider (carousel) that auto-paginates content.
   Data-driven: add items to the JS array, HTML updates itself.
============================================================ */

/* Tab buttons */
.about-tabs {
  display: flex;
  gap: 0;
  margin-top: 2.5rem;
  border-bottom: 1px solid var(--grey-border);
}
.about-tab-btn {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white-dim);
  padding: 0.65rem 1.4rem;
  cursor: pointer;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--t-fast), border-color var(--t-fast);
  touch-action: manipulation;
}
.about-tab-btn:hover { color: var(--white); }
.about-tab-btn.active {
  color: var(--red-bright);
  border-bottom-color: var(--red-bright);
}

/* Slider wrapper */
.about-slider-wrap {
  margin-top: 1.8rem;
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* The track — slides sit side-by-side, translated with transform */
.about-slider-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  width: 100%;
  align-items: flex-start; /* biar tingginya ikut konten masing-masing, tidak stretch */
}

/* Each "page" — fixed width = 100% of wrapper */
.about-slide {
  min-width: 100%;
  width: 100%;
  box-sizing: border-box;
  padding: 1.8rem 1.5rem;
  background: rgba(232,228,216,0.03);
  border: 1px solid var(--grey-border);
  position: relative;
  overflow: hidden; /* cegah konten nembus keluar */
  word-break: break-word;
}
.about-slide::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(232,228,216,0.25), transparent);
}

/* Slide content layout */
.slide-period {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--red-bright);
  margin-bottom: 0.5rem;
}
.slide-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}
.slide-subtitle {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white-dim);
  margin-bottom: 1rem;
}
.slide-desc {
  font-size: 0.95rem;
  color: var(--white-dim);
  line-height: 1.75;
  font-weight: 300;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}
.slide-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.1rem;
}
.slide-tags span {
  padding: 0.25rem 0.75rem;
  background: rgba(232,228,216,0.07);
  border: 1px solid rgba(232,228,216,0.15);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-bright);
  border-radius: 2px;
}

/* Founder badge — special callout inside Venture slides */
.slide-founder-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(232,228,216,0.08);
  border: 1px solid rgba(232,228,216,0.22);
  padding: 0.3rem 0.9rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red-bright);
}
.slide-founder-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--red-bright);
  box-shadow: 0 0 6px var(--red-bright);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* Status badge — dipakai di card-tags untuk menandai produk yang sedang live */
.status-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.status-live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px #34d399;
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

/* Slider navigation */
.about-slider-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}

/* Dot indicators */
.about-slider-dots {
  display: flex;
  gap: 0.5rem;
}
.slider-dot {
  width: 18px; height: 2px;
  background: var(--grey-border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--t-fast), width var(--t-fast);
  touch-action: manipulation;
}
.slider-dot.active {
  background: var(--red-bright);
  width: 32px;
}

/* Prev / Next arrows */
.about-slider-arrows {
  display: flex;
  gap: 0.5rem;
}
.slider-arrow {
  width: 34px; height: 34px;
  border: 1px solid var(--grey-border);
  background: none;
  color: var(--white-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
  touch-action: manipulation;
}
.slider-arrow:hover {
  border-color: var(--red-bright);
  color: var(--red-bright);
  background: rgba(232,228,216,0.06);
}
.slider-arrow:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}
.slider-arrow svg { width: 14px; height: 14px; pointer-events: none; }

/* Page counter */
.slider-counter {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--white-dim);
}

/* Tab panel visibility */
.about-tab-panel { display: none; }
.about-tab-panel.active { display: block; }

/* Responsive */
@media (max-width: 600px) {
  .about-slide { padding: 1.2rem 1rem; }
  .slide-title { font-size: 1.3rem; }
}

/* ===== RESEARCH SECTION ===== */
.research { background: var(--black-soft); }
.research-card {
  position: relative;
  background: var(--black-card);
  border: 1px solid var(--grey-border);
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.research-card:hover {
  border-color: rgba(232,228,216,0.35);
  transform: translateY(-3px);
}
.research-main { padding: 1.75rem 2rem; }
.research-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.research-side {
  padding: 1.75rem 2rem;
  border-left: 1px solid var(--grey-border);
  background: rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}
.research-side-divider { height: 1px; background: var(--grey-border); }
.research-side-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.25rem;
}
.research-side-value {
  font-size: 0.8rem;
  color: var(--white);
  word-break: break-all;
}
.research-side-value.mono { font-family: var(--font-mono); }
.research-badge {
  padding: 0.22rem 0.75rem;
  background: rgba(232,228,216,0.08);
  border: 1px solid rgba(232,228,216,0.3);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red-bright);
}
.research-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--white-dim);
}
.research-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 0.03em;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.research-desc {
  font-size: 0.9rem;
  color: var(--white-dim);
  line-height: 1.65;
  font-weight: 300;
  margin-bottom: 1.25rem;
}
.research-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid rgba(250,250,250,0.4);
  padding-bottom: 2px;
  transition: border-color var(--t-fast), opacity var(--t-fast);
}
.research-link:hover { border-color: var(--white); opacity: 0.85; }
.research-link svg { width: 13px; height: 13px; }

@media (max-width: 700px) {
  .research-card { grid-template-columns: 1fr; }
  .research-side { border-left: none; border-top: 1px solid var(--grey-border); }
}
@media (max-width: 600px) {
  .research-main, .research-side { padding: 1.4rem 1.3rem; }
  .research-title { font-size: 1.35rem; }
}
