/* =========================================================
   PORTFOLIO — ROBLOX DEVELOPER
   Token desain: studio viewport, hitam & abu, aksen biru "studio"
   ========================================================= */

:root {
  /* --- Colors --- */
  --bg: #0A0B0D;
  --bg-elevated: #131417;
  --panel: #15171A;
  --panel-hover: #1B1D21;
  --border: #26282D;
  --border-strong: #34373D;
  --text-primary: #F2F2F0;
  --text-secondary: #9CA3AF;
  --text-muted: #6B6F76;
  --accent: #5B8DEF;
  --accent-dim: #3A5A9A;
  --accent-glow: rgba(91, 141, 239, 0.18);
  --success: #4ADE80;

  /* --- Type --- */
  --font-display: 'Sora', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* --- Layout --- */
  --max-width: 1180px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --nav-height: 76px;
}

/* =========================================================
   RESET
   ========================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
  overflow-x: hidden;
}

h1, h2, h3, h4,
.hero__title, .section-title, .navbar__logo,
.skill-card__title, .project-card__title, .project-modal__title,
.stat-card__number {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
input, textarea { font-family: inherit; }

::selection { background: var(--accent-dim); color: #fff; }

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

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

/* =========================================================
   SCROLLBAR — dark, semi-transparent, on-theme
   ========================================================= */
html {
  scrollbar-color: rgba(255, 255, 255, 0.16) rgba(0, 0, 0, 0.35);
  scrollbar-width: thin;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.35);
}
::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.14);
  border-radius: 100px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: background-color 0.2s;
}
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.24);
}

/* =========================================================
   ATMOSPHERE — noise overlay + custom cursor
   ========================================================= */
/* Noise overlay dimatikan: feTurbulence + mix-blend-mode di-repaint
   browser tiap frame composite, salah satu penyebab utama scroll berat. */
.noise-overlay { display: none; }

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
  box-shadow: 0 0 12px var(--accent-glow);
  display: none;
  /* Posisi diatur lewat JS dengan transform: translate(x, y) translate(-50%, -50%)
     (lihat js/main.js bagian 7) karena transform tidak memicu reflow/layout
     seperti left/top, jauh lebih ringan saat mouse bergerak cepat. */
}
@media (hover: hover) and (pointer: fine) {
  .cursor-dot { display: block; }
}
.cursor-dot.is-hover {
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1.5px solid var(--accent);
}

/* =========================================================
   NAVBAR
   ========================================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 500;
  background: rgba(10, 11, 13, 0.85);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.navbar.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 11, 13, 0.9);
}

.navbar__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.navbar__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
}
.navbar__logo-bracket { color: var(--accent); }

.navbar__links {
  display: flex;
  gap: 36px;
}
.navbar__link {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 0;
  transition: color 0.2s;
}
.navbar__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.navbar__link:hover { color: var(--text-primary); }
.navbar__link.active { color: var(--text-primary); }
.navbar__link.active::after { width: 100%; }

.navbar__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.navbar__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
}
.navbar__burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-primary);
  transition: transform 0.25s, opacity 0.25s;
}
.navbar__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__burger.is-open span:nth-child(2) { opacity: 0; }
.navbar__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 12px 24px 24px;
  gap: 4px;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 480;
}
.mobile-menu.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu__link {
  padding: 14px 4px;
  font-size: 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.mobile-menu__link:last-child { border-bottom: none; }

/* =========================================================
   HERO / VIEWPORT
   ========================================================= */
.viewport-section {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 32px) 24px 90px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(91,141,239,0.10), transparent 55%),
    var(--bg);
}

/* Scrim gelap di atas banner karakter (z-index 1) supaya teks hero (z-index 2)
   tetap terbaca jelas di atas warna foto, tanpa perlu menghilangkan warnanya.
   Pakai ::after (bukan ::before) supaya urutan render-nya di ATAS gambar
   .hero__character, bukan di bawahnya. */
.viewport-section::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(10,11,13,0.55) 30%, rgba(10,11,13,0.35) 55%, rgba(10,11,13,0.75) 100%),
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(10,11,13,0.25), rgba(10,11,13,0.82) 75%);
}

.viewport-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 10%, transparent 75%);
  /* Animasi grid-drift dihapus: background-position yang bergerak terus
     memaksa repaint area penuh di setiap frame, ini berat terutama saat
     elemen ini ikut di-scroll bersama halaman. Grid statis tetap terlihat
     bagus tanpa membebani performa. */
}

.viewport-hud {
  position: absolute;
  inset: 24px;
  z-index: 2;
  pointer-events: none;
}
.hud-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--border-strong);
  opacity: 0.8;
}
.hud-corner--tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.hud-corner--tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.hud-corner--bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.hud-corner--br { bottom: 0; right: 0; border-left: none; border-top: none; }

.hud-label {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.7;
}
.hud-label--top { top: 28px; left: 36px; }
.hud-label--bottom { bottom: 0; right: 36px; }

.hero {
  position: relative;
  z-index: 2;
  max-width: 780px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: hero-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: clamp(11.5px, 2.6vw, 12.5px);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 8px 18px 8px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
  white-space: nowrap;
}
.eyebrow-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.eyebrow-icon svg { width: 14px; height: 14px; }

.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 4vw, 52px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  text-wrap: balance;
  font-feature-settings: "ss01" on;
}
.hero__title-accent {
  color: var(--accent);
  font-weight: 700;
}

.hero__subtitle {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(15px, 2.2vw, 17.5px);
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 40px;
  letter-spacing: -0.003em;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero__scroll-cue {
  position: absolute;
  bottom: 36px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}
.scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scroll-pulse 1.8s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ---------- Gambar karakter (banner latar penuh, warna asli tetap terlihat) ----------
   Ditampilkan sebagai banner full-width di belakang teks hero. Warna foto
   asli dipertahankan (tidak di-grayscale), hanya opacity diturunkan dan
   tepi atas/kiri/kanan/bawah di-fade ke background gelap lewat mask-image
   supaya menyatu sebagai elemen latar tanpa terlihat seperti kotak foto
   yang ditempel. Elemen ini murni dekoratif (pointer-events: none). */
.hero__character {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  opacity: 0.55;
  pointer-events: none;
  -webkit-mask-image:
    linear-gradient(to top, transparent 0%, black 28%, black 78%, transparent 100%),
    linear-gradient(to left, transparent 0%, black 14%, black 86%, transparent 100%);
  -webkit-mask-composite: source-in, source-in;
  mask-image:
    linear-gradient(to top, transparent 0%, black 28%, black 78%, transparent 100%),
    linear-gradient(to left, transparent 0%, black 14%, black 86%, transparent 100%);
  mask-composite: intersect, intersect;
}
@media (max-width: 900px) {
  .hero__character { opacity: 0.4; object-position: center 30%; }
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn span[data-lucide] { width: 16px; height: 16px; }
.btn span[data-lucide] svg { width: 16px; height: 16px; }

.btn--primary {
  background: var(--accent);
  color: #07090d;
}
.btn--primary:hover {
  background: #6f9cf2;
  transform: translateY(-2px);
}

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

.btn--full { width: 100%; justify-content: center; }

/* =========================================================
   SECTION SHARED
   ========================================================= */
.section {
  padding: 120px 24px;
  border-top: 1px solid var(--border);
}
.section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-heading { margin-bottom: 56px; max-width: 640px; }
.section-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.section-title em {
  font-style: normal;
  color: var(--accent);
}
.section-desc {
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 540px;
}

/* Reveal-on-scroll utility */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   ABOUT
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 64px;
}
.about-lead {
  color: var(--text-secondary);
  font-size: 16.5px;
  margin-bottom: 20px;
}
.about-lead strong { color: var(--text-primary); font-weight: 600; }

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 36px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.25s, transform 0.25s;
}
.stat-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}
.stat-card__number {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}
.stat-card__label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* =========================================================
   SKILLS
   ========================================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.skill-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: border-color 0.25s, transform 0.25s, background 0.25s;
}
.skill-card:hover {
  border-color: var(--accent-dim);
  background: var(--panel-hover);
  transform: translateY(-4px);
}
.skill-card__icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  color: var(--accent);
  margin-bottom: 18px;
}
.skill-card__icon svg { width: 20px; height: 20px; }
.skill-card__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.skill-card__desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  min-height: 42px;
}
.skill-card__bar {
  height: 4px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}
.skill-card__bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.skill-card.is-visible .skill-card__bar span { width: var(--skill-level); }

/* =========================================================
   PROJECTS / FILTER / CARDS
   ========================================================= */
.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.filter-chip {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 9px 18px;
  border-radius: 100px;
  transition: all 0.2s;
}
.filter-chip:hover { color: var(--text-primary); border-color: var(--border-strong); }
.filter-chip.active {
  background: var(--accent);
  color: #07090d;
  border-color: var(--accent);
}

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

.project-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
}

.project-card__media {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-elevated);
}
.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .project-card__media img { transform: scale(1.06); }

.project-card__corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--accent);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.project-card:hover .project-card__corner { opacity: 1; }
.project-card__corner--tl { top: 10px; left: 10px; border-top: 2px solid; border-left: 2px solid; }
.project-card__corner--br { bottom: 10px; right: 10px; border-bottom: 2px solid; border-right: 2px solid; }

.project-card__tag {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  background: rgba(10,11,13,0.75);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: 100px;
  text-transform: uppercase;
}

.project-card__status {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  border: 1px solid;
}
.project-card__status--rilis {
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.4);
  color: var(--success);
}
.project-card__status--joki {
  background: var(--accent-glow);
  border-color: var(--accent-dim);
  color: var(--accent);
}

.project-card__body { padding: 20px 22px 24px; }
.project-card__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}
.project-card__desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}
.project-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.project-card__stack {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.stack-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
}
.project-card__arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.25s;
  flex-shrink: 0;
}
.project-card__arrow svg { width: 14px; height: 14px; }
.project-card:hover .project-card__arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: #07090d;
  transform: rotate(45deg);
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: start;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 32px;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text-secondary);
  transition: color 0.2s;
  width: fit-content;
}
.contact-link svg { width: 17px; height: 17px; color: var(--accent); }
.contact-link:hover { color: var(--text-primary); }

.contact-form {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row label {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}
.form-row input,
.form-row textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  color: var(--text-primary);
  font-size: 14.5px;
  resize: vertical;
  transition: border-color 0.2s;
}
.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--accent);
  outline: none;
}
.form-note {
  font-size: 13px;
  color: var(--success);
  min-height: 18px;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
}
.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}
.footer__socials { display: flex; gap: 18px; }
.footer__socials a { color: var(--text-secondary); transition: color 0.2s; }
.footer__socials a:hover { color: var(--accent); }
.footer__socials svg { width: 18px; height: 18px; }

/* =========================================================
   PROJECT DETAIL MODAL
   ========================================================= */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.project-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.project-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6,7,9,0.9);
  /* backdrop-filter blur dihapus: modal di-render saat user klik (bukan
     terus-menerus saat scroll) jadi dampaknya kecil, tapi tetap dihapus
     untuk konsistensi performa di device rendah. Opacity dinaikkan
     sedikit (0.82 -> 0.9) supaya tetap terasa "gelap" tanpa efek blur. */
}
.project-modal__panel {
  position: relative;
  z-index: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  max-width: 920px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transform: translateY(24px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.project-modal.is-open .project-modal__panel {
  transform: translateY(0) scale(1);
}

.project-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(10,11,13,0.7);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.project-modal__close:hover { background: var(--accent); color: #07090d; transform: rotate(90deg); }
.project-modal__close svg { width: 17px; height: 17px; }

.project-modal__media {
  position: relative;
  background: var(--panel);
  min-height: 280px;
}
.project-modal__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.project-modal__media-tag {
  position: absolute;
  bottom: 16px;
  left: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  background: rgba(10,11,13,0.8);
  border: 1px solid var(--border-strong);
  padding: 6px 12px;
  border-radius: 100px;
  z-index: 1;
}

.project-modal__body {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
}
.project-modal__index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.project-modal__title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 14px;
}
.project-modal__desc {
  font-size: 14.5px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.project-modal__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.meta-block { display: flex; flex-direction: column; gap: 4px; }
.meta-block__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.meta-block__value { font-size: 14px; color: var(--text-primary); font-weight: 500; }

.project-modal__highlights {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  flex-grow: 1;
}
.project-modal__highlights li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}
.project-modal__highlights li::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.project-modal__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.project-modal__nav { display: flex; gap: 8px; }
.project-modal__nav button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.project-modal__nav button:hover { border-color: var(--accent); color: var(--accent); }
.project-modal__nav svg { width: 16px; height: 16px; }

/* =========================================================
   RESPONSIVE
   Breakpoints: 1180 (laptop) / 980 (tablet) / 720 (mobile) / 460 (small phone)
   ========================================================= */

/* ---------- Laptop / smaller desktop ---------- */
@media (max-width: 1180px) {
  .navbar__inner { padding: 0 24px; }
  .navbar__links { gap: 28px; }
}

/* ---------- Tablet ---------- */
@media (max-width: 980px) {
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .skills-grid,
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .project-modal__panel { grid-template-columns: 1fr; }
  .project-modal__media { min-height: 220px; }

  .section { padding: 96px 24px; }
  .section-heading { margin-bottom: 44px; }
}

/* ---------- Mobile (phones, small tablets in portrait) ---------- */
@media (max-width: 720px) {
  .navbar__links,
  .navbar__status { display: none; }
  .navbar__burger { display: flex; }
  .navbar__inner { padding: 0 20px; }

  .section { padding: 72px 20px; }
  .section-heading { margin-bottom: 36px; }
  .skills-grid,
  .projects-grid,
  .about-stats { grid-template-columns: 1fr; }

  .hero { max-width: 100%; }
  .hero__title { letter-spacing: -0.02em; }
  .hero__title-break { display: none; }
  .hero__subtitle { max-width: 100%; }
  .hero__actions { flex-direction: column; width: 100%; max-width: 340px; }
  .hero__actions .btn { width: 100%; justify-content: center; }

  .viewport-hud { inset: 16px; }
  .hud-label--top { left: 28px; }
  .hud-label--bottom { right: 28px; }

  .about-stats { gap: 12px; }
  .stat-card { padding: 18px 16px; flex-direction: row; align-items: center; justify-content: space-between; }

  .contact-form { padding: 26px 22px; }
  .contact-grid { gap: 32px; }

  .project-modal { padding: 0; }
  .project-modal__panel { max-height: 100vh; max-height: 100dvh; border-radius: 0; }
  .project-modal__body { padding: 28px 22px; }
  .project-modal__meta { grid-template-columns: 1fr 1fr; }
  .project-modal__actions { flex-wrap: wrap; gap: 14px; }
  .project-modal__actions .btn { width: 100%; justify-content: center; order: 2; }
  .project-modal__nav { order: 1; align-self: flex-end; }

  .footer__inner { flex-direction: column; text-align: center; gap: 14px; }
}

/* ---------- Small phones ---------- */
@media (max-width: 460px) {
  .navbar__logo { font-size: 18px; }
  .navbar__inner { padding: 0 16px; }

  .section { padding: 64px 16px; }
  .viewport-section { padding-left: 16px; padding-right: 16px; }

  .hero__eyebrow { font-size: 11px; padding: 7px 14px 7px 12px; }
  .hero__title { font-size: clamp(24px, 7vw, 30px); margin-bottom: 16px; }
  .hero__subtitle { font-size: 14.5px; margin-bottom: 30px; }
  .btn { padding: 13px 22px; font-size: 14px; }

  .section-tag { font-size: 12px; }
  .section-desc { font-size: 14.5px; }

  .stat-card__number { font-size: 22px; }
  .filter-bar { gap: 8px; }
  .filter-chip { font-size: 12px; padding: 8px 14px; }

  .project-modal__title { font-size: 22px; }
  .project-modal__meta { grid-template-columns: 1fr; gap: 12px; }
}

/* ---------- Very small phones ---------- */
@media (max-width: 360px) {
  .hero__title { font-size: 23px; }
  .navbar__logo { font-size: 17px; }
}

/* ---------- Large screens: keep hero from over-stretching ---------- */
@media (min-width: 1600px) {
  .hero { max-width: 880px; }
}