/* ==========================================================================
   Ikhsan Azwar Saufani — Portfolio
   Design language: Apple "quiet luxury" dark + visionOS glassmorphism
   - Pure CSS, no preprocessor, tokens in :root
   - One accent: electric blue
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Canvas & text */
  --bg-primary: #000000;
  --bg-elevated: #0a0a0c;
  --text-primary: #f5f5f7;
  --text-secondary: #86868b;
  --text-tertiary: #6e6e73;

  /* Accent */
  --accent-glow: #2997ff;
  --accent-solid: #0a84ff;
  --accent-soft: rgba(41, 151, 255, 0.14);

  /* Glass */
  --glass-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  --glass-bg-hover: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.035) 100%);
  --glass-blur: blur(20px) saturate(180%);
  --glass-border-top: rgba(255, 255, 255, 0.22);
  --glass-border-left: rgba(255, 255, 255, 0.14);
  --glass-border-edge: rgba(255, 255, 255, 0.09);
  --glass-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.15), 0 24px 48px -12px rgba(0, 0, 0, 0.65);
  --glass-shadow-hover: inset 0 1px 0 0 rgba(255, 255, 255, 0.22), 0 40px 70px -24px rgba(0, 0, 0, 0.85);

  /* Lines */
  --line-soft: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* Radii */
  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-pill: 9999px;

  /* Type */
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;

  /* Motion */
  --ease-apple: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 0.68, 0.16, 1);

  /* Layout */
  --nav-h: 56px;
  --nav-gap: 14px;
  --gutter: clamp(20px, 5vw, 40px);
  --max-w: 1200px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.45s var(--ease-apple), color 0.45s var(--ease-apple);
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, p, figure, ul, ol { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }

::selection { background: rgba(41, 151, 255, 0.28); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent-glow);
  outline-offset: 4px;
  border-radius: 6px;
}

section[id] { scroll-margin-top: calc(var(--nav-h) + var(--nav-gap) + 8px); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 300;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  background: #fff;
  color: #08080a;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: top 0.25s var(--ease-apple);
}
.skip-link:focus { top: 16px; }

/* ---------- Layout utilities ---------- */
.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}

.section {
  position: relative;
  padding-block: clamp(72px, 11vw, 132px);
  overflow: hidden;
  isolation: isolate;
}

/* ---------- Ambient light orbs ---------- */
.orb {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.2;
  pointer-events: none;
}
.orb--blue {
  width: min(620px, 90vw);
  height: min(620px, 90vw);
  background: radial-gradient(circle at 50% 50%, rgba(41, 151, 255, 0.95), rgba(41, 151, 255, 0) 68%);
  top: -180px;
  left: -160px;
}
.orb--violet {
  width: min(540px, 85vw);
  height: min(540px, 85vw);
  background: radial-gradient(circle at 50% 50%, rgba(128, 90, 255, 0.85), rgba(128, 90, 255, 0) 70%);
  bottom: -200px;
  right: -140px;
  opacity: 0.17;
}
.orb--teal {
  width: min(460px, 80vw);
  height: min(460px, 80vw);
  background: radial-gradient(circle at 50% 50%, rgba(64, 214, 200, 0.7), rgba(64, 214, 200, 0) 70%);
  top: 8%;
  right: -180px;
  opacity: 0.15;
}

/* ---------- Latar partikel (tsParticles: grab random color) ---------- */
.bg-particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 0.9s var(--ease-apple);
}

/* Tema terang: warna partikel diturunkan agar tetap lembut di atas putih. */
html[data-theme="light"] .bg-particles { opacity: 0.38; }

@media (prefers-reduced-motion: reduce) {
  .bg-particles { display: none; }
}

/* ---------- Glass card ---------- */
.glass-card {
  position: relative;
  background: var(--glass-bg);
  border-top: 1px solid var(--glass-border-top);
  border-left: 1px solid var(--glass-border-left);
  border-right: 1px solid var(--glass-border-edge);
  border-bottom: 1px solid var(--glass-border-edge);
  border-radius: var(--r-lg);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  overflow: hidden;
}

/* Specular sheen that follows the cursor (--mouse-x / --mouse-y from JS) */
.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  background: radial-gradient(
    380px circle at var(--mouse-x, 50%) var(--mouse-y, 0%),
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0.04) 42%,
    transparent 68%
  );
  opacity: 0;
  transition: opacity 0.45s var(--ease-apple);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .glass-card:hover::before { opacity: 1; }
}

/* ---------- Typography ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 8px 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(245, 245, 247, 0.68);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(1.95rem, 4.4vw, 3.05rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.lead {
  margin-top: 20px;
  max-width: 650px;
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.55vw, 1.125rem);
  line-height: 1.62;
  letter-spacing: -0.008em;
}

.text-link {
  color: var(--accent-glow);
  text-decoration: none;
  border-bottom: 1px solid rgba(41, 151, 255, 0.35);
  padding-bottom: 1px;
  transition: border-color 0.25s var(--ease-apple), color 0.25s var(--ease-apple);
}
@media (hover: hover) {
  .text-link:hover { border-bottom-color: currentColor; }
}

.section-head {
  max-width: 780px;
  margin-bottom: clamp(34px, 5vw, 58px);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}
.section-head--center .lead { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 14px 28px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-text);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.35s var(--ease-apple), background-color 0.3s var(--ease-apple),
              border-color 0.3s var(--ease-apple), box-shadow 0.4s var(--ease-apple);
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: linear-gradient(180deg, #3fa8ff 0%, var(--accent-solid) 100%);
  color: #fff;
  box-shadow: 0 12px 32px -12px rgba(41, 151, 255, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.36);
}
.btn--glass {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line-strong);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
}
.btn--nav {
  min-height: 36px;
  padding: 8px 18px;
  font-size: 14px;
}

@media (hover: hover) {
  .btn--primary:hover {
    background: linear-gradient(180deg, #55b4ff 0%, #1a8dff 100%);
    box-shadow: 0 16px 40px -12px rgba(41, 151, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.42);
    transform: translateY(-1px);
  }
  .btn--glass:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.26);
    transform: translateY(-1px);
  }
}

/* ---------- Floating glass navigation ---------- */
.global-nav {
  position: fixed;
  inset: var(--nav-gap) 0 auto;
  z-index: 100;
  padding-inline: 16px;
}

.global-nav__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--nav-h);
  max-width: 1060px;
  margin-inline: auto;
  padding: 0 8px 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-soft);
  background: rgba(16, 16, 18, 0.52);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 14px 34px -18px rgba(0, 0, 0, 0.9);
  transition: background-color 0.4s var(--ease-apple), border-color 0.4s var(--ease-apple);
}
.global-nav.is-scrolled .global-nav__inner {
  background: rgba(10, 10, 12, 0.74);
  border-color: var(--line-strong);
}

.global-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06));
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.brand-name { color: rgba(245, 245, 247, 0.92); }

.global-nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.global-nav__links a {
  position: relative;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  color: rgba(245, 245, 247, 0.68);
  font-size: 13px;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: color 0.25s var(--ease-apple), background-color 0.25s var(--ease-apple);
}
@media (hover: hover) {
  .global-nav__links a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
}
.global-nav__links a[aria-current="true"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.global-nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}

/* Theme switch: sun in dark mode, moon in light mode */
.theme-toggle {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  cursor: pointer;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: background-color 0.3s var(--ease-apple), border-color 0.3s var(--ease-apple),
              transform 0.3s var(--ease-apple);
}
.theme-toggle:active { transform: scale(0.94); }
@media (hover: hover) {
  .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--line-strong);
  }
}
.theme-toggle__icon {
  position: absolute;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.35s var(--ease-apple), transform 0.45s var(--ease-apple);
}
.theme-toggle__icon--moon { opacity: 0; transform: rotate(-40deg) scale(0.6); }
html[data-theme="light"] .theme-toggle__icon--sun { opacity: 0; transform: rotate(40deg) scale(0.6); }
html[data-theme="light"] .theme-toggle__icon--moon { opacity: 1; transform: none; }

.nav-toggle {
  display: none;
  place-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 17px;
  height: 1.5px;
  margin-inline: auto;
  background: rgba(245, 245, 247, 0.9);
  transition: transform 0.3s var(--ease-apple), opacity 0.2s var(--ease-apple);
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }

.nav-drawer {
  position: fixed;
  top: calc(var(--nav-gap) + var(--nav-h) + 8px);
  left: 16px;
  right: 16px;
  z-index: 99;
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: rgba(12, 12, 14, 0.9);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 24px 48px -18px rgba(0, 0, 0, 0.9);
  animation: drawer-in 0.3s var(--ease-apple) both;
}
.nav-drawer[hidden] { display: none; }
.nav-drawer a {
  padding: 14px 12px;
  color: rgba(245, 245, 247, 0.88);
  font-size: 16px;
  text-decoration: none;
  border-radius: var(--r-sm);
  border-bottom: 1px solid var(--line-soft);
}
.nav-drawer a:last-child { border-bottom: 0; }
.nav-drawer a:active { background: rgba(255, 255, 255, 0.06); }

@keyframes drawer-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  padding-top: calc(var(--nav-h) + var(--nav-gap) + clamp(48px, 8vw, 96px));
  padding-bottom: clamp(56px, 9vw, 104px);
  overflow: hidden;
  text-align: center;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -10% -10% auto;
  height: 70%;
  z-index: 0;
  background: radial-gradient(60% 60% at 50% 0%, rgba(41, 151, 255, 0.16), transparent 70%);
  pointer-events: none;
}
.hero__glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(
    560px circle at var(--glow-x, 50%) var(--glow-y, 28%),
    rgba(41, 151, 255, 0.18),
    rgba(41, 151, 255, 0.04) 45%,
    transparent 70%
  );
  pointer-events: none;
}

.hero__copy {
  max-width: 900px;
  margin-inline: auto;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(245, 245, 247, 0.72);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-glow);
  box-shadow: 0 0 0 4px rgba(41, 151, 255, 0.16);
}
.dot--live {
  background: #30d158;
  box-shadow: 0 0 0 4px rgba(48, 209, 88, 0.16);
}

.hero__name {
  margin-top: 26px;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8.2vw, 5.6rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: var(--text-primary);
}

.hero__tagline {
  margin-top: 26px;
  max-width: 720px;
  margin-inline: auto;
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 2.2vw, 1.5rem);
  font-weight: 400;
  line-height: 1.32;
  letter-spacing: -0.022em;
  color: rgba(245, 245, 247, 0.88);
}
.hero__bio {
  margin-top: 20px;
  max-width: 620px;
  margin-inline: auto;
  color: var(--text-secondary);
  font-size: clamp(0.9375rem, 1.35vw, 1.0625rem);
  line-height: 1.62;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 38px;
}
.hero__meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
  color: var(--text-tertiary);
  font-size: 12.5px;
  letter-spacing: 0.01em;
}
.hero__meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.hero__figure {
  margin: clamp(44px, 6vw, 76px) auto 0;
  max-width: 1000px;
  padding: 10px;
  border-radius: 32px;
  text-align: center;
}
.hero__figure img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transform-origin: center;
}
.hero__figure figcaption {
  margin-top: 14px;
  margin-bottom: 6px;
  color: rgba(245, 245, 247, 0.42);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Filters ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}
.filter {
  min-height: 40px;
  padding: 9px 20px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(245, 245, 247, 0.72);
  font-size: 14px;
  letter-spacing: -0.01em;
  cursor: pointer;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: background-color 0.3s var(--ease-apple), border-color 0.3s var(--ease-apple),
              color 0.3s var(--ease-apple), transform 0.25s var(--ease-apple);
}
.filter:active { transform: scale(0.96); }
.filter.is-active {
  background: rgba(245, 245, 247, 0.95);
  border-color: transparent;
  color: #08080a;
  font-weight: 600;
  box-shadow: 0 10px 26px -12px rgba(255, 255, 255, 0.5);
}
@media (hover: hover) {
  .filter:not(.is-active):hover {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
  }
}
.filters__count {
  margin-left: auto;
  color: var(--text-tertiary);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Project showcase ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 20px;
  align-items: stretch;
}

.project {
  display: flex;
  flex-direction: column;
  padding: 12px 12px 24px;
  transition: transform 0.55s var(--ease-apple), box-shadow 0.5s var(--ease-apple),
              background 0.5s var(--ease-apple);
}
.project__media {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 16 / 11;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 1;
}
.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-apple), filter 0.6s var(--ease-apple);
}
.project__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 10px 0;
  position: relative;
  z-index: 1;
}
.project__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.tag {
  padding: 5px 11px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(41, 151, 255, 0.22);
  background: rgba(41, 151, 255, 0.12);
  color: #6fb6ff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
}
.tag--muted {
  border-color: var(--line-soft);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(245, 245, 247, 0.6);
  font-weight: 500;
}
.project__title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.022em;
}
.project__desc {
  margin-top: 10px;
  margin-bottom: 18px;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.6;
}
.project__role {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-tertiary);
  font-size: 12.5px;
  line-height: 1.55;
}
.project__role span {
  display: block;
  margin-bottom: 5px;
  color: rgba(245, 245, 247, 0.56);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

@media (hover: hover) and (pointer: fine) {
  .project:hover,
  .project.reveal:hover {
    transform: translateY(-6px);
    background: var(--glass-bg-hover);
    box-shadow: var(--glass-shadow-hover);
  }
  .project:hover .project__media img { transform: scale(1.055); }
}

/* `hidden` must win over display:flex */
.project[hidden] { display: none; }

/* Filtered-out cards fade, then get removed from layout by JS */
.project.is-hidden,
.project.reveal.is-hidden {
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  pointer-events: none;
}

/* ---------- Bento grid (skills + highlights) ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}

.bento .skill {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  padding: 30px 26px;
}
.skill__icon {
  width: 30px;
  height: 30px;
  margin-bottom: 20px;
  fill: none;
  stroke: var(--accent-glow);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skill__title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.022em;
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding: 0;
  list-style: none;
}
.badge {
  padding: 7px 13px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(245, 245, 247, 0.76);
  font-size: 12.5px;
  line-height: 1.4;
  transition: border-color 0.25s var(--ease-apple), color 0.25s var(--ease-apple),
              background-color 0.25s var(--ease-apple);
}
@media (hover: hover) {
  .badge:hover {
    border-color: rgba(41, 151, 255, 0.4);
    background: rgba(41, 151, 255, 0.1);
    color: #fff;
  }
}

.bento__tile {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding: 30px 28px;
  transition: background 0.5s var(--ease-apple), box-shadow 0.5s var(--ease-apple),
              transform 0.55s var(--ease-apple);
}
.bento__tile > * { position: relative; z-index: 1; }
.bento__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.6vw, 3.1rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  margin-top: 8px;
  color: var(--text-tertiary);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.tile__note {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}
.status__head {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(245, 245, 247, 0.9);
  font-size: 14.5px;
  font-weight: 500;
}
.bento__status .text-link { font-size: 14.5px; }

@media (hover: hover) and (pointer: fine) {
  .bento__tile:hover,
  .bento__tile.reveal:hover {
    transform: translateY(-4px);
    background: var(--glass-bg-hover);
    box-shadow: var(--glass-shadow-hover);
  }
}

/* ---------- Experience ---------- */
.exp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.exp {
  display: flex;
  flex-direction: column;
  padding: 30px 26px;
  transition: transform 0.55s var(--ease-apple), box-shadow 0.5s var(--ease-apple),
              background 0.5s var(--ease-apple);
}
.exp__index {
  color: var(--accent-glow);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
}
.exp__role {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.022em;
}
.exp__org {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.5;
}
.exp__desc {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  color: rgba(245, 245, 247, 0.6);
  font-size: 14px;
  line-height: 1.62;
}
@media (hover: hover) and (pointer: fine) {
  .exp:hover,
  .exp.reveal:hover {
    transform: translateY(-4px);
    background: var(--glass-bg-hover);
    box-shadow: var(--glass-shadow-hover);
  }
}

/* ---------- Contact ---------- */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: clamp(32px, 5vw, 68px);
  align-items: start;
}
.contact__intro .display-lg { max-width: 540px; }

.mail-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}
.mail-row > a {
  font-size: clamp(1rem, 1.9vw, 1.22rem);
  letter-spacing: -0.015em;
}

.copy-mail {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(245, 245, 247, 0.8);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: background-color 0.3s var(--ease-apple), border-color 0.3s var(--ease-apple),
              color 0.3s var(--ease-apple), transform 0.25s var(--ease-apple);
}
.copy-mail:active { transform: scale(0.96); }
.copy-mail svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.copy-mail.is-copied {
  border-color: rgba(48, 209, 88, 0.45);
  background: rgba(48, 209, 88, 0.16);
  color: #8ceaa6;
}
@media (hover: hover) {
  .copy-mail:hover { background: rgba(255, 255, 255, 0.11); color: #fff; }
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}
.social {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(245, 245, 247, 0.8);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: background-color 0.3s var(--ease-apple), border-color 0.3s var(--ease-apple),
              transform 0.35s var(--ease-apple), color 0.3s var(--ease-apple);
}
.social:active { transform: scale(0.94); }
.social svg { width: 19px; height: 19px; fill: currentColor; stroke: none; }
.social svg.is-stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (hover: hover) {
  .social:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.24);
    color: #fff;
    transform: translateY(-2px) scale(1.05);
  }
}

.contact__form {
  display: grid;
  gap: 16px;
  padding: clamp(24px, 3.4vw, 34px);
}
.contact__form > * { position: relative; z-index: 1; }

.field { display: grid; gap: 8px; }
.field label {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.25s var(--ease-apple);
}
.field:focus-within label { color: var(--accent-glow); }
.field input,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-family: var(--font-text);
  font-size: 15.5px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  transition: border-color 0.3s var(--ease-apple), box-shadow 0.3s var(--ease-apple),
              background-color 0.3s var(--ease-apple);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(134, 134, 139, 0.75); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(41, 151, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(41, 151, 255, 0.16);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: rgba(255, 69, 58, 0.7); }

.form-status {
  min-height: 18px;
  color: var(--accent-glow);
  font-size: 12.5px;
  line-height: 1.5;
}
.form-status.is-error { color: #ff6961; }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  padding-block: clamp(56px, 8vw, 92px) 30px;
  border-top: 1px solid var(--line-soft);
  overflow: hidden;
  isolation: isolate;
}
.footer__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
}
.footer__name {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.footer__role {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 13.5px;
}
.footer__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 32px;
  border-top: 1px solid var(--line-soft);
}
.footer__col { display: flex; flex-direction: column; }
.footer__head {
  margin-bottom: 12px;
  color: rgba(245, 245, 247, 0.66);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.footer__col a {
  padding-block: 5px;
  color: var(--text-secondary);
  font-size: 13.5px;
  text-decoration: none;
  transition: color 0.25s var(--ease-apple);
}
.footer__col a:hover { color: var(--text-primary); }

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-tertiary);
  font-size: 11.5px;
}
.footer__legal a { color: var(--text-tertiary); text-decoration: none; }
.footer__legal a:hover { color: var(--text-primary); }

/* ---------- Photo preview (glass lightbox) ---------- */
img.photo-zoom { cursor: zoom-in; }

body.has-lightbox { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 56px);
  background: rgba(4, 4, 6, 0.5);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  opacity: 0;
  pointer-events: none;
  /* Tanpa transisi `visibility`: lapisan langsung bisa menerima klik saat dibuka,
     sehingga klik tombol X tidak pernah jatuh ke halaman di belakangnya. */
  transition: opacity 0.35s var(--ease-apple);
}
.lightbox.is-open { opacity: 1; }
.lightbox.is-pinned { pointer-events: auto; }

.lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 100%;
  max-height: 100%;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.35s var(--ease-apple), transform 0.5s var(--ease-apple);
}
.lightbox.is-open .lightbox__figure { opacity: 1; transform: none; }

.lightbox__img {
  width: auto;
  height: auto;
  max-width: min(1080px, 100%);
  max-height: 78vh;
  object-fit: contain;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 50px 90px -30px rgba(0, 0, 0, 0.9);
}

.lightbox__caption {
  max-width: 620px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.94);
  font-size: 12.5px;
  line-height: 1.45;
  text-align: center;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.lightbox__caption:empty { display: none; }

.lightbox__close {
  position: absolute;
  top: clamp(12px, 2vw, 24px);
  right: clamp(12px, 2vw, 24px);
  z-index: 5;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  backdrop-filter: blur(12px) saturate(180%);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-apple), background-color 0.2s var(--ease-apple);
}
.lightbox.is-pinned .lightbox__close {
  opacity: 1;
  pointer-events: auto;
}
.lightbox__close:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 3px;
}
.lightbox__close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}
@media (hover: hover) {
  .lightbox__close:hover { background: rgba(255, 255, 255, 0.26); }
}

/* ---------- Word-by-word headline reveal ---------- */
.split-ready .word {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.16em;
  margin-bottom: -0.16em;
  vertical-align: bottom;
}
.split-ready .word__inner {
  display: inline-block;
  background: linear-gradient(180deg, #ffffff 14%, rgba(245, 245, 247, 0.66) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  will-change: transform, opacity;
}

/* ---------- Reveal (progressively enhanced by GSAP) ---------- */
.reveal { opacity: 0; }

/* Only when GSAP is absent do we fall back to CSS transitions */
html:not(.gsap-ready) .reveal {
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease-apple), transform 0.7s var(--ease-apple);
}
html:not(.gsap-ready) .reveal.is-visible { transform: none; }
.reveal.is-visible { opacity: 1; }

/* ==========================================================================
   LIGHT THEME
   Activated by html[data-theme="light"] via the nav theme toggle.
   Tokens are remapped first, then the few surfaces that carry literal
   dark-mode colours are overridden.
   ========================================================================== */
html[data-theme="light"] {
  color-scheme: light;

  --bg-primary: #f5f5f7;
  --bg-elevated: #ffffff;
  --text-primary: #1d1d1f;
  --text-secondary: #55555c;
  --text-tertiary: #6e6e73;

  --accent-glow: #0071e3;
  --accent-solid: #0071e3;
  --accent-soft: rgba(0, 113, 227, 0.12);

  --glass-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.66) 100%);
  --glass-bg-hover: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.86) 100%);
  --glass-border-top: rgba(255, 255, 255, 0.95);
  --glass-border-left: rgba(255, 255, 255, 0.7);
  --glass-border-edge: rgba(18, 18, 22, 0.08);
  --glass-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.9), 0 20px 40px -20px rgba(20, 20, 25, 0.22);
  --glass-shadow-hover: inset 0 1px 0 0 #ffffff, 0 34px 60px -26px rgba(20, 20, 25, 0.3);

  --line-soft: rgba(18, 18, 22, 0.1);
  --line-strong: rgba(18, 18, 22, 0.18);
}

html[data-theme="light"] ::selection { background: rgba(0, 113, 227, 0.18); color: #1d1d1f; }

/* Glass sheen becomes a cool blue highlight on white glass */
html[data-theme="light"] .glass-card::before {
  background: radial-gradient(
    380px circle at var(--mouse-x, 50%) var(--mouse-y, 0%),
    rgba(0, 113, 227, 0.16),
    rgba(0, 113, 227, 0.05) 42%,
    transparent 68%
  );
}

/* Ambient orbs: softer so the canvas stays airy */
html[data-theme="light"] .orb { opacity: 0.12; }
html[data-theme="light"] .orb--violet { opacity: 0.1; }
html[data-theme="light"] .orb--teal { opacity: 0.1; }
html[data-theme="light"] .hero::before {
  background: radial-gradient(60% 60% at 50% 0%, rgba(0, 113, 227, 0.1), transparent 70%);
}
html[data-theme="light"] .hero__glow {
  background: radial-gradient(
    560px circle at var(--glow-x, 50%) var(--glow-y, 28%),
    rgba(0, 113, 227, 0.12),
    rgba(0, 113, 227, 0.03) 45%,
    transparent 70%
  );
}

/* Navigation */
html[data-theme="light"] .global-nav__inner {
  background: rgba(255, 255, 255, 0.64);
  border-color: rgba(18, 18, 22, 0.08);
  box-shadow: inset 0 1px 0 #ffffff, 0 14px 34px -22px rgba(20, 20, 25, 0.35);
}
html[data-theme="light"] .global-nav.is-scrolled .global-nav__inner {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(18, 18, 22, 0.12);
}
html[data-theme="light"] .brand-mark {
  border-color: rgba(18, 18, 22, 0.12);
  background: linear-gradient(180deg, #ffffff, rgba(245, 245, 247, 0.9));
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 #ffffff, 0 2px 6px rgba(20, 20, 25, 0.08);
}
html[data-theme="light"] .brand-name { color: rgba(29, 29, 31, 0.88); }
html[data-theme="light"] .global-nav__links a { color: rgba(29, 29, 31, 0.62); }
html[data-theme="light"] .global-nav__links a:hover { color: #1d1d1f; background: rgba(18, 18, 22, 0.05); }
html[data-theme="light"] .global-nav__links a[aria-current="true"] {
  color: #1d1d1f;
  background: rgba(18, 18, 22, 0.07);
}
html[data-theme="light"] .nav-toggle span { background: rgba(29, 29, 31, 0.8); }
html[data-theme="light"] .nav-drawer {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(18, 18, 22, 0.1);
  box-shadow: 0 24px 48px -22px rgba(20, 20, 25, 0.3);
}
html[data-theme="light"] .nav-drawer a {
  color: rgba(29, 29, 31, 0.85);
  border-bottom-color: rgba(18, 18, 22, 0.08);
}
html[data-theme="light"] .nav-drawer a:active { background: rgba(18, 18, 22, 0.05); }
html[data-theme="light"] .theme-toggle {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(18, 18, 22, 0.1);
}
html[data-theme="light"] .theme-toggle:hover {
  background: #ffffff;
  border-color: rgba(18, 18, 22, 0.2);
}

/* Typography & hero */
html[data-theme="light"] .eyebrow,
html[data-theme="light"] .hero__badge {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(18, 18, 22, 0.08);
  color: rgba(29, 29, 31, 0.66);
  box-shadow: inset 0 1px 0 #ffffff;
}
html[data-theme="light"] .hero__tagline { color: rgba(29, 29, 31, 0.86); }
html[data-theme="light"] .hero__meta-dot { background: rgba(18, 18, 22, 0.3); }
html[data-theme="light"] .hero__figure img { border-color: rgba(18, 18, 22, 0.08); }
html[data-theme="light"] .hero__figure figcaption { color: rgba(29, 29, 31, 0.45); }
html[data-theme="light"] .split-ready .word__inner {
  /* background-image so the shorthand does not reset background-clip back to border-box */
  background-image: linear-gradient(180deg, #1d1d1f 14%, rgba(29, 29, 31, 0.62) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Buttons */
html[data-theme="light"] .btn--glass {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(18, 18, 22, 0.12);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 #ffffff, 0 8px 20px -14px rgba(20, 20, 25, 0.3);
}
html[data-theme="light"] .btn--glass:hover {
  background: #ffffff;
  border-color: rgba(18, 18, 22, 0.2);
}

/* Filters */
html[data-theme="light"] .filter {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(18, 18, 22, 0.09);
  color: rgba(29, 29, 31, 0.7);
}
html[data-theme="light"] .filter.is-active {
  background: #1d1d1f;
  color: #ffffff;
  box-shadow: 0 10px 26px -14px rgba(20, 20, 25, 0.5);
}
html[data-theme="light"] .filter:not(.is-active):hover {
  border-color: rgba(18, 18, 22, 0.2);
  background: #ffffff;
  color: #1d1d1f;
}

/* Cards */
html[data-theme="light"] .project__media {
  background: rgba(18, 18, 22, 0.04);
  border-color: rgba(18, 18, 22, 0.06);
}
html[data-theme="light"] .tag {
  border-color: rgba(0, 113, 227, 0.22);
  background: rgba(0, 113, 227, 0.09);
  color: #0a6ecb;
}
html[data-theme="light"] .tag--muted {
  border-color: rgba(18, 18, 22, 0.1);
  background: rgba(18, 18, 22, 0.04);
  color: rgba(29, 29, 31, 0.6);
}
html[data-theme="light"] .project__role span { color: rgba(29, 29, 31, 0.55); }
html[data-theme="light"] .badge {
  background: rgba(18, 18, 22, 0.035);
  border-color: rgba(18, 18, 22, 0.09);
  color: rgba(29, 29, 31, 0.75);
}
html[data-theme="light"] .badge:hover {
  border-color: rgba(0, 113, 227, 0.35);
  background: rgba(0, 113, 227, 0.08);
  color: #0071e3;
}
html[data-theme="light"] .status__head { color: rgba(29, 29, 31, 0.88); }
html[data-theme="light"] .exp__desc { color: rgba(29, 29, 31, 0.62); }

/* Contact */
html[data-theme="light"] .copy-mail {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(18, 18, 22, 0.14);
  color: rgba(29, 29, 31, 0.78);
}
html[data-theme="light"] .copy-mail:hover { background: #ffffff; color: #1d1d1f; }
html[data-theme="light"] .copy-mail.is-copied {
  border-color: rgba(36, 138, 61, 0.4);
  background: rgba(36, 138, 61, 0.12);
  color: #1f7a3c;
}
html[data-theme="light"] .social {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(18, 18, 22, 0.09);
  color: rgba(29, 29, 31, 0.75);
}
html[data-theme="light"] .social:hover {
  background: #ffffff;
  border-color: rgba(18, 18, 22, 0.2);
  color: #1d1d1f;
}
html[data-theme="light"] .field input,
html[data-theme="light"] .field textarea {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(18, 18, 22, 0.12);
  color: #1d1d1f;
}
html[data-theme="light"] .field input::placeholder,
html[data-theme="light"] .field textarea::placeholder { color: rgba(110, 110, 115, 0.8); }
html[data-theme="light"] .field input:focus,
html[data-theme="light"] .field textarea:focus {
  background: #ffffff;
  border-color: rgba(0, 113, 227, 0.6);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.14);
}
html[data-theme="light"] .form-status.is-error { color: #c4271d; }

/* Footer */
html[data-theme="light"] .footer__head { color: rgba(29, 29, 31, 0.62); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento .skill { grid-column: span 1; }
  .bento__tile { grid-column: span 2; }
}

@media (max-width: 900px) {
  .exp-grid { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .contact__form { max-width: 560px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__col:first-child { grid-column: span 2; }
}

@media (max-width: 834px) {
  :root { --nav-h: 52px; }
  .global-nav__links { display: none; }
  .nav-toggle { display: grid; }
  .global-nav__actions { margin-left: auto; }
  .brand-name { display: none; }
  .hero { min-height: auto; padding-top: calc(var(--nav-h) + var(--nav-gap) + 72px); }
  .hero__figure img { aspect-ratio: 16 / 10; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .bento { grid-template-columns: 1fr; }
  .bento .skill,
  .bento__tile { grid-column: span 1; }
  .bento__stats { gap: 12px; }
  .hero__name { font-size: clamp(2.35rem, 11vw, 3.2rem); }
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
    margin-inline: auto;
  }
  .hero__figure { padding: 7px; border-radius: 26px; }
  .hero__figure img { border-radius: 20px; }
  .filters__count { width: 100%; margin: 4px 0 0; }
  .project-grid { gap: 16px; }
  .project { padding: 10px 10px 20px; }
  .contact__form { padding: 22px; }
  .footer__grid { grid-template-columns: 1fr; gap: 26px; }
  .footer__col:first-child { grid-column: auto; }
  .footer__actions { width: 100%; }
  .footer__actions .btn { flex: 1; }
}

@media (max-width: 419px) {
  .hero__tagline { font-size: 16.5px; }
  .btn { font-size: 15px; padding: 13px 22px; }
  .stat__value { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
/* ══════════════════════════════════════════════════════════════════════════
   Media interaktif: kartu video, penanda kursor, isyarat ketuk, lightbox video
   ══════════════════════════════════════════════════════════════════════════ */

/* ---------- Kartu proyek sebagai pemicu pratinjau ---------- */
.project__media {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
  cursor: zoom-in;
}
.project__media img,
.project__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-apple), filter 0.6s var(--ease-apple);
}
@media (hover: hover) and (pointer: fine) {
  .project:hover .project__media video { transform: scale(1.055); }
}
.project__media:focus-visible {
  outline: 2px solid rgba(41, 151, 255, 0.85);
  outline-offset: 3px;
}

/* Badge penanda video */
.project__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 8px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(12, 12, 16, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 0.5s var(--ease-apple), background-color 0.4s var(--ease-apple);
}
.project__badge svg { width: 14px; height: 14px; }
@media (hover: hover) and (pointer: fine) {
  .project:hover .project__badge {
    transform: translateY(-2px);
    background: rgba(12, 12, 16, 0.72);
  }
}

/* ---------- Ajakan di dalam gambar saat kursor berhenti di atasnya ---------- */
.project__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(120% 90% at 50% 55%, rgba(6, 6, 10, 0.06) 0%, rgba(6, 6, 10, 0.5) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease-apple);
}
.project__media:hover::after,
.project__media:focus-visible::after { opacity: 1; }

.project__cta {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 10px 15px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(16, 16, 20, 0.46);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.005em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-50% + 10px)) scale(0.88);
  filter: blur(5px);
  transition: opacity 0.4s var(--ease-apple),
              transform 0.6s cubic-bezier(0.34, 1.4, 0.64, 1),
              filter 0.4s var(--ease-apple);
}
.project__cta svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.project__media:hover .project__cta,
.project__media:focus-visible .project__cta {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  filter: blur(0);
}
.project__media:active .project__cta { transform: translate(-50%, -50%) scale(0.96); }

/* Layar sentuh tidak punya hover: ajakan ini digantikan isyarat ketuk. */
@media (hover: none), (pointer: coarse) {
  .project__cta { display: none; }
}

/* ---------- Isyarat ketuk saat menggulir (layar sentuh) ---------- */
.scroll-hint {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 240;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 11px 18px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(16, 16, 20, 0.66);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 14px) scale(0.96);
  transition: opacity 0.35s var(--ease-apple), transform 0.45s var(--ease-apple);
}
.scroll-hint svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: #2997ff;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.scroll-hint.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
@media (hover: hover) and (pointer: fine) {
  .scroll-hint { display: none; }
}

/* ---------- Lightbox: video ---------- */
.lightbox__video {
  width: auto;
  height: auto;
  max-width: min(1080px, 100%);
  max-height: 78vh;
  background: #000;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 50px 90px -30px rgba(0, 0, 0, 0.9);
}
.lightbox__video[hidden],
.lightbox__img[hidden] { display: none; }
