/* ==========================================================================
   style.css
   --------------------------------------------------------------------------
   Urutan isi:
   1. Design token (light & dark)
   2. Reset & dasar
   3. Tipografi
   4. Komponen bersama (tombol, label, folio, garis)
   5. Header & navigasi
   6. Hero
   7. About
   8. Skills
   9. Experience
   10. Portfolio & kartu proyek
   11. Philosophy
   12. Contact
   13. Footer & back to top
   14. Modal detail proyek
   15. State (loading, empty, error)
   16. Animasi & scroll reveal
   17. Responsif (tablet, desktop, large)

   Catatan: @font-face TIDAK ada di sini. Definisi font berada di fonts.css
   (data URI) supaya berkas ini tetap ringkas dan mudah dibaca saat mengubah
   warna atau tata letak.
   ========================================================================== */

/* 1. DESIGN TOKEN ========================================================= */
:root {
  /* Warna inti (identitas): hijau hutan + terakota di atas kertas gading. */
  --ivory: #f6f3ed;
  --ink: #1c2623;
  --forest: #234d42;
  --terracotta: #d76a42;

  --bg: #f6f3ed;
  --bg-alt: #efebe2;
  --surface: #ffffff;
  --surface-2: #f1ede4;
  --line: #dad3c6;
  --line-strong: #c6bdac;

  --text: #1c2623;
  --text-muted: #63695f;       /* kontras 5.10:1 pada --bg, lolos WCAG AA */
  --text-invert: #f6f3ed;

  --primary: #234d42;          /* kontras 8.57:1 pada --bg */
  --primary-contrast: #ffffff;
  --accent: #a0522d;           /* varian terakota yang lolos AA untuk teks kecil (5.07:1) */
  --accent-mark: #d76a42;      /* hanya untuk tanda besar / garis / angka folio (3.14:1, teks besar) */

  --band-bg: #1c2623;
  --band-text: #f6f3ed;
  --band-muted: #b9c2ba;
  --band-line: #3a453f;
  --band-accent: #e08b62;

  --shadow-sm: 0 1px 2px rgba(28, 38, 35, 0.06);
  --shadow-md: 0 10px 30px -18px rgba(28, 38, 35, 0.35);
  --shadow-lg: 0 30px 70px -40px rgba(28, 38, 35, 0.55);

  /* Latar setengah tembus ditulis sebagai rgba, bukan color-mix, supaya
     nilainya tetap terbaca oleh alat pemeriksa kontras dan peramban lama. */
  --header-bg: rgba(246, 243, 237, 0.9);
  --header-bg-solid: rgba(246, 243, 237, 0.97);
  --badge-bg: rgba(246, 243, 237, 0.92);

  /* Radius dipakai bertingkat sebagai penanda hierarki, bukan seragam. */
  --r-xs: 3px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1220px;
  --gap: 20px;
  --header-h: 66px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --speed: 260ms;
}

[data-theme="dark"] {
  --bg: #131a17;
  --bg-alt: #17211d;
  --surface: #1b2420;
  --surface-2: #212b26;
  --line: #2f3a35;
  --line-strong: #40514a;

  --text: #edeae3;
  --text-muted: #9aa39c;       /* kontras 6.81:1 pada --bg */
  --text-invert: #131a17;

  --primary: #7fb3a1;          /* kontras 7.46:1 pada --bg */
  --primary-contrast: #131a17;
  --accent: #e08b62;           /* 6.77:1 pada --bg */
  --accent-mark: #d76a42;

  --band-bg: #0e1512;
  --band-text: #edeae3;
  --band-muted: #a9b3ab;
  --band-line: #2b3631;
  --band-accent: #e08b62;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px -18px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 30px 70px -40px rgba(0, 0, 0, 0.9);

  --header-bg: rgba(19, 26, 23, 0.9);
  --header-bg-solid: rgba(19, 26, 23, 0.97);
  --badge-bg: rgba(19, 26, 23, 0.92);
}

/* 3. RESET & DASAR ======================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0.005em;
  overflow-x: hidden;
  transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

body.is-locked { overflow: hidden; }

img,
svg { max-width: 100%; }

img { height: auto; }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }

/* Atribut hidden harus selalu menang, termasuk pada elemen yang punya display sendiri */
[hidden] { display: none !important; }

ul, ol { padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: var(--r-xs);
  background: var(--surface-2);
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent-mark);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  background: var(--primary);
  color: var(--primary-contrast);
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  transition: top var(--speed) var(--ease);
}

.skip-link:focus { top: 12px; }

/* 4. TIPOGRAFI =========================================================== */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.35rem, 8.4vw, 4.4rem); }
h2 { font-size: clamp(2rem, 5.6vw, 3.1rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); line-height: 1.2; }

h1 em, h2 em {
  font-style: normal;
  color: var(--primary);
}

.eyebrow,
.folio,
.section-note,
.stamp-line,
.specimen-tag {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.75rem;           /* 12px, tetap terbaca */
  font-weight: 500;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  margin-bottom: 18px;
}

.eyebrow-mark {
  width: 26px;
  height: 10px;
  background: var(--accent-mark);
  border-radius: 1px;
}

.section-note {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 62ch;
}

/* 5. KOMPONEN BERSAMA ==================================================== */
.section {
  padding-block: clamp(64px, 9vw, 118px);
}

.section-head {
  display: grid;
  gap: 14px;
  margin-bottom: clamp(32px, 5vw, 56px);
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.section-title { max-width: 24ch; }
.section-title-lg { max-width: 22ch; }

.folio {
  font-family: var(--font-body);
  color: var(--accent);            /* rasio 5.07:1 pada latar gading: lolos AA */
  letter-spacing: 0.14em;
}

.folio::after {
  content: "";
  display: inline-block;
  width: 46px;
  height: 1px;
  margin-left: 12px;
  vertical-align: middle;
  background: var(--accent-mark);  /* garis dekoratif: tidak dibaca sebagai teks */
}

.sub-title {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;                      /* tap target nyaman di layar sentuh */
  padding: 12px 22px;
  border-radius: var(--r-sm);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background-color var(--speed) var(--ease),
              color var(--speed) var(--ease),
              border-color var(--speed) var(--ease),
              transform 160ms var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--primary);
  color: var(--primary-contrast);
}

.btn-primary:hover { background: var(--accent); color: var(--primary-contrast); }

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--surface);
}

.tag {
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  background: var(--surface);
}

.tag-demo {
  border-color: var(--accent-mark);
  color: var(--accent);
  background: transparent;
}

.tag-more { font-style: normal; }

.data-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-left: 14px;
  border-left: 2px solid var(--accent-mark);
}

/* 6. HEADER & NAVIGASI =================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  /* Latar tipis tembus, tanpa backdrop-filter: filter pada ancestor membuat
     header jadi containing block, sehingga panel menu fixed ikut terkurung. */
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
  transition: border-color var(--speed) var(--ease), background-color var(--speed) var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: var(--header-bg-solid);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.wordmark-mark {
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 2px;
  box-shadow: inset 0 0 0 2px transparent;
  position: relative;
}

.wordmark-mark::after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 7px;
  height: 7px;
  background: var(--accent-mark);
  border-radius: 1px;
}

.nav {
  display: none;
}

.nav-list {
  display: flex;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 12px;
  border-radius: var(--r-xs);
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--speed) var(--ease), background-color var(--speed) var(--ease);
}

.nav-link:hover { color: var(--text); background: var(--surface-2); }

.nav-link.is-active {
  color: var(--text);
  box-shadow: inset 0 -1.5px 0 0 var(--accent-mark);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }

.theme-toggle-icon-only,
.menu-toggle {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text);
}

.theme-toggle-icon-only {
  display: inline-flex;      /* ikon tema muncul di header pada layar sempit */
}

.nav .theme-toggle .icon-sun { display: inline; }
.nav .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }
.theme-toggle-icon { display: inline-flex; }

.menu-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}

.menu-toggle-bars span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--speed) var(--ease), opacity 160ms var(--ease);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.header-progress {
  display: block;
  height: 2px;
  width: 0;
  background: var(--accent-mark);
  transition: width 120ms linear;
}

/* Menu mobile */
@media (max-width: 1023px) {
  .nav {
    display: block;
    position: fixed;
    inset: var(--header-h) 0 0 auto;
    width: min(88vw, 380px);
    padding: 26px 24px 40px;
    background: var(--surface);
    border-left: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    /* Panel tetap di dalam lebar viewport supaya tidak menimbulkan
       gulir mendatar; tersembunyi lewat visibility + opacity, dan
       masuk dengan geser kecil dari atas. */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: transform 320ms var(--ease), opacity 260ms var(--ease), visibility 320ms;
    overflow-y: auto;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    gap: 2px;
    margin-bottom: 26px;
  }

  .nav-link {
    display: block;
    padding: 15px 10px;
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--text);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .nav-link.is-active { box-shadow: inset 3px 0 0 0 var(--accent-mark); padding-left: 16px; }

  .nav-foot { margin-top: 22px; }
}

/* 7. HERO ================================================================ */
.hero {
  position: relative;
  padding-block: clamp(44px, 8vw, 84px) clamp(28px, 5vw, 48px);
}

.hero-grid {
  display: grid;
  gap: clamp(34px, 6vw, 56px);
}

.hero-title {
  max-width: 15ch;
  margin-bottom: 22px;
  text-wrap: balance;
}

.hero-title::after {
  content: "";
  display: block;
  width: clamp(64px, 14vw, 128px);
  height: 6px;
  margin-top: 22px;
  background: var(--accent-mark);
  border-radius: 1px;
}

.hero-intro {
  max-width: 46ch;
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.hero-facts {
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--line);
}

.fact {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.fact dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  padding-top: 3px;
}

.fact dd { font-size: 0.92rem; }

/* Kartu spesimen: visual hero dari tipografi + bentuk CSS, bukan foto orang */
.hero-visual { display: flex; }

.specimen {
  width: 100%;
  max-width: 460px;
  margin-inline: auto;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 18px;
}

.specimen-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
}

.specimen-tag-alt { color: var(--accent); }

.specimen-name {
  font-family: var(--font-display);
  font-size: clamp(4.6rem, 20vw, 7rem);
  line-height: 0.84;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--primary);
}

.specimen-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 34px;
  gap: 6px;
}

.cell { border-radius: 2px; background: var(--surface-2); }
.cell-a { grid-column: span 3; grid-row: span 2; background: var(--primary); }
.cell-b { grid-column: span 2; background: var(--accent-mark); }
.cell-c { grid-column: span 1; }
.cell-d { grid-column: span 1; }
.cell-e { grid-column: span 2; background: var(--surface-2); }
.cell-f { grid-column: span 3; background: var(--line); }

.specimen-list {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text);
}

.specimen-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px dotted var(--line-strong);
}

.specimen-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent-mark);
  border-radius: 1px;
  flex: none;
}

.specimen-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.specimen-rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.hero-scroll { margin-top: 34px; }

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
}

.scroll-cue-line {
  display: block;
  width: 1px;
  height: 46px;
  background: var(--line-strong);
  position: relative;
  overflow: hidden;
}

.scroll-cue-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent-mark);
  transform-origin: top;
  animation: cue 2.4s var(--ease) infinite;
}

@keyframes cue {
  0% { transform: scaleY(0); }
  45% { transform: scaleY(1); }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* 8. ABOUT =============================================================== */
.section-about { background: var(--bg); }

.about-grid { display: grid; gap: clamp(28px, 5vw, 52px); }

.about-visual { display: grid; gap: 18px; align-content: start; }

.portrait { display: grid; gap: 12px; }

.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 340px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(150deg, var(--surface-2) 0 55%, transparent 55%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-initials {
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 4.6rem);
  font-weight: 600;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.portrait-cap {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  max-width: 340px;
}

.stamp {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  max-width: 340px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm);
}

.stamp-line { color: var(--text-muted); }
.stamp-line-alt { color: var(--accent); }

.lede {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  line-height: 1.4;
  margin-bottom: 26px;
  max-width: 46ch;
}

.about-details {
  display: grid;
  gap: 0;
  margin-bottom: 30px;
  border-top: 1px solid var(--line);
}

.row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.row dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  padding-top: 3px;
}

.row dd { font-size: 0.92rem; }

.focus-block { margin-bottom: 26px; }

.focus-block .sub-title { margin-bottom: 14px; }

.focus-list {
  display: grid;
  gap: 10px;
}

.focus-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-areas: "idx name" "idx note";
  column-gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

.focus-item:nth-child(2) { background: transparent; border-style: dashed; }
.focus-item:nth-child(3) { margin-left: 10px; }
.focus-item:nth-child(4) { margin-left: 20px; background: var(--surface-2); }

.focus-index {
  grid-area: idx;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--accent);
  line-height: 1.2;
}

.focus-item h4 {
  grid-area: name;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 500;
}

.focus-item p {
  grid-area: note;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 9. SKILLS ============================================================== */
.section-skills { background: var(--surface); border-block: 1px solid var(--line); }

.skills-grid { display: grid; gap: 26px; }

.skill-group { display: grid; gap: 12px; align-content: start; }

.skill-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.skill-group-note { font-size: 0.82rem; color: var(--text-muted); }

/* Bentuk 1: daftar besar bernomor untuk kemampuan teknis harian */
.skill-lead {
  padding: 22px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.skill-lead .skill-group-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 600;
  margin-bottom: 4px;
}

.skill-lead ol { display: grid; gap: 0; }

.skill-lead li {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: baseline;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 1.02rem;
}

.skill-lead li span:first-child {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--accent);
}

/* Bentuk 2: label besar yang mengalir, untuk kelompok desain */
.skill-tags { padding: 4px 0; }

.skill-tags .skill-group-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 500;
  margin-bottom: 10px;
}

.skill-tags ul { display: flex; flex-wrap: wrap; gap: 8px 18px; }

.skill-tags li {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3.4vw, 1.6rem);
  line-height: 1.3;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.skill-tags li::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--primary);
  border-radius: 50%;
  flex: none;
}

/* Bentuk 3: kisi chip rapat, untuk alat kerja */
.skill-compact { padding: 18px; background: var(--surface-2); border-radius: var(--r-md); }

.skill-compact .skill-group-title {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.skill-compact ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 8px;
}

.skill-compact li {
  padding: 7px 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

/* 10. EXPERIENCE ========================================================= */
.timeline {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  gap: 8px;
  padding: 22px 0 22px 20px;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 30px;
  width: 9px;
  height: 9px;
  background: var(--accent-mark);
  border-radius: 50%;
}

.timeline-item:last-child { border-bottom-color: var(--line-strong); }

.timeline-item.is-current::before { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-mark) 22%, transparent); }

.timeline-period {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
}

.timeline-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3.4vw, 1.6rem);
  font-weight: 600;
  line-height: 1.2;
}

.timeline-context { font-size: 0.85rem; color: var(--text-muted); }

.timeline-desc { font-size: 0.95rem; max-width: 62ch; }

.timeline-body { display: grid; gap: 8px; }

.timeline-skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* Label contoh berdiri sendiri, tidak melebar selebar kolom */
.timeline-body .tag-demo { justify-self: start; }

/* 11. PORTFOLIO ========================================================== */
.section-portfolio {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.section-head-wide { gap: 16px; }

.portfolio-tools {
  display: grid;
  gap: 14px;
  margin-top: 6px;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg);
  width: fit-content;
}

.segmented-btn {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--r-xs);
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.segmented-btn.is-active {
  background: var(--primary);
  color: var(--primary-contrast);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg);
  transition: border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.filter-btn:hover { border-color: var(--primary); color: var(--primary); }

.filter-btn.is-active {
  border-color: var(--accent-mark);
  color: var(--accent);
  box-shadow: inset 0 -2px 0 0 var(--accent-mark);
}

.project-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.project-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.project-card.is-hidden { display: none; }

.card-open {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
}

.card-open:focus-visible {
  outline: 2px solid var(--accent-mark);
  outline-offset: -3px;
}

.thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
  overflow: hidden;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 480ms var(--ease);
}

.project-card:hover .thumb img { transform: scale(1.045); }

.thumb-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 1;
  padding: 4px 8px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--badge-bg);
  color: var(--accent);
  border: 1px solid var(--accent-mark);
  border-radius: var(--r-xs);
}

.thumb-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 16px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: repeating-linear-gradient(45deg, var(--surface-2) 0 8px, var(--bg-alt) 8px 16px);
}

.thumb.has-error .thumb-fallback { display: grid; }

.card-body {
  display: grid;
  gap: 8px;
  padding: 18px;
  align-content: start;
}

.card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.card-category { color: var(--accent); }

.card-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.6vw, 1.7rem);
  font-weight: 600;
  line-height: 1.15;
}

.card-desc { font-size: 0.92rem; color: var(--text-muted); }

.card-tech { display: flex; flex-wrap: wrap; gap: 6px; }

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--primary);
  border-bottom: 1px solid transparent;
}

.project-card:hover .card-cta { border-bottom-color: var(--accent-mark); color: var(--accent); }

.card-cta::after {
  content: "+";
  font-size: 1rem;
  line-height: 1;
  color: var(--accent);
}

/* Kartu unggulan dapat porsi lebih besar agar grid terasa terarah */
@media (min-width: 1024px) {
  .project-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
  .project-card.is-wide { grid-column: span 2; }
  .project-card.is-wide .thumb { aspect-ratio: 16 / 9; }
  .project-card.is-wide .card-body { padding: 20px 22px 22px; }
}

/* 12. PHILOSOPHY ========================================================= */
.section-philosophy {
  background: var(--band-bg);
  color: var(--band-text);
  padding-block: clamp(56px, 8vw, 96px);
}

.philosophy-grid { display: grid; gap: 18px; }

.folio-light { color: var(--band-accent); }

.philosophy-statement {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 6vw, 3.2rem);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.015em;
  max-width: 30ch;
  text-wrap: balance;
}

.philosophy-note {
  font-size: 0.95rem;
  color: var(--band-muted);
  max-width: 56ch;
  padding-top: 18px;
  border-top: 1px solid var(--band-line);
}

/* 13. CONTACT ============================================================ */
.contact-grid { display: grid; gap: clamp(28px, 5vw, 48px); }

.contact-lead { display: grid; gap: 16px; align-content: start; }

.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.contact-feedback {
  font-size: 0.85rem;
  color: var(--primary);
  min-height: 1.2em;
}

.contact-empty {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 14px;
  border-left: 2px solid var(--accent-mark);
  max-width: 52ch;
}

.contact-side { display: grid; gap: 16px; align-content: start; }

.contact-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  display: grid;
  gap: 12px;
}

.contact-card-note { background: var(--surface-2); border-style: dashed; }

.social-list { display: grid; gap: 0; }

.social-list li { border-bottom: 1px solid var(--line); }

.social-list li:last-child { border-bottom: 0; }

.social-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px;
  min-height: 44px;
  font-size: 0.92rem;
  transition: color var(--speed) var(--ease);
}

.social-link:hover { color: var(--primary); }

.social-link span:last-child {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.social-empty, .contact-loc { font-size: 0.85rem; color: var(--text-muted); }

/* 14. FOOTER & BACK TO TOP ============================================== */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding-top: clamp(40px, 6vw, 64px);
}

.footer-grid { display: grid; gap: 26px; padding-bottom: 30px; }

.footer-brand { display: grid; gap: 10px; }

.wordmark-footer { font-size: 1.3rem; }

.footer-tagline {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 32ch;
}

.footer-nav ul { display: flex; flex-wrap: wrap; gap: 6px 18px; }

.footer-nav a {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.footer-nav a:hover { color: var(--primary); }

.footer-social { display: flex; flex-wrap: wrap; gap: 8px; }

.footer-social a {
  display: inline-flex;
  align-items: center;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  font-size: 0.82rem;
  color: var(--text-muted);
  min-height: 44px;
}

.footer-social a:hover { border-color: var(--primary); color: var(--primary); }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 16px 22px;
  border-top: 1px solid var(--line);
}

.copyright { font-size: 0.82rem; color: var(--text-muted); }

.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  background: var(--primary);
  color: var(--primary-contrast);
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 220ms var(--ease), transform 220ms var(--ease), background-color var(--speed) var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.to-top:hover { background: var(--accent); color: var(--primary-contrast); }

/* 15. MODAL DETAIL PROYEK ============================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: end;
  justify-items: center;
}

.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 16, 0.62);
  opacity: 0;
  transition: opacity 240ms var(--ease);
}

.modal.is-open .modal-backdrop { opacity: 1; }

.modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 940px;
  max-height: 92vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow-lg);
  transform: translateY(24px);
  opacity: 0;
  transition: transform 280ms var(--ease), opacity 240ms var(--ease);
}

.modal.is-open .modal-panel { transform: translateY(0); opacity: 1; }

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  line-height: 1;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
}

.modal-close:hover { border-color: var(--accent-mark); color: var(--accent); }

.modal-body { display: grid; gap: 20px; }

.modal-hero { background: var(--surface-2); aspect-ratio: 16 / 9; overflow: hidden; }

.modal-hero img { width: 100%; height: 100%; object-fit: cover; }

.modal-content { padding: 0 22px 26px; display: grid; gap: 22px; }

.modal-head { display: grid; gap: 8px; }

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.modal-meta strong { color: var(--accent); font-weight: 500; }

.modal-section { display: grid; gap: 8px; }

.modal-section p { font-size: 0.95rem; max-width: 68ch; }

.highlight-list { display: grid; gap: 8px; }

.highlight-list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  font-size: 0.93rem;
  color: var(--text-muted);
}

.highlight-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 8px;
  background: var(--accent-mark);
  border-radius: 1px;
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.modal-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}

.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }

.modal-note { font-size: 0.82rem; color: var(--text-muted); }

/* 16. STATE (loading, empty, error) ==================================== */
.panel-error {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--accent-mark);
  border-left-width: 3px;
  border-radius: var(--r-sm);
  background: var(--surface);
}

.panel-error-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.panel-error-text { font-size: 0.92rem; color: var(--text-muted); }

.empty-state {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 30px 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: var(--bg);
}

.empty-title { font-family: var(--font-display); font-size: 1.3rem; }

.empty-text { font-size: 0.92rem; color: var(--text-muted); }

#project-grid.is-loading { pointer-events: none; }

/* State loading gambar: kerangka berkilau sampai file selesai dibaca */
.thumb.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--surface-2) 30%, var(--bg-alt) 50%, var(--surface-2) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.4s linear infinite;
}

.skeleton-card {
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(100deg, var(--bg) 30%, var(--surface-2) 50%, var(--bg) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -20% 0; }
}

.noscript-note {
  padding: 16px 20px;
  margin-block: 20px;
  border-left: 3px solid var(--accent-mark);
  background: var(--surface);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* 17. ANIMASI & SCROLL REVEAL ========================================== */
.has-js [data-reveal] > * { opacity: 0; }

.has-js [data-reveal].is-revealed > * {
  animation: rise 620ms var(--ease) both;
}

.has-js [data-reveal].is-revealed > *:nth-child(1) { animation-delay: 40ms; }
.has-js [data-reveal].is-revealed > *:nth-child(2) { animation-delay: 110ms; }
.has-js [data-reveal].is-revealed > *:nth-child(3) { animation-delay: 180ms; }
.has-js [data-reveal].is-revealed > *:nth-child(4) { animation-delay: 240ms; }
.has-js [data-reveal].is-revealed > *:nth-child(5) { animation-delay: 300ms; }
.has-js [data-reveal].is-revealed > *:nth-child(n+6) { animation-delay: 340ms; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.has-js .hero-lead > *,
.has-js .hero-visual {
  animation: rise 700ms var(--ease) both;
}

.has-js .hero-visual { animation-delay: 180ms; }

#data-error[hidden] { display: none; }

.theme-fade,
.theme-fade * {
  transition: background-color 260ms var(--ease), border-color 260ms var(--ease), color 260ms var(--ease) !important;
}

@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;
  }

  .has-js [data-reveal] > *,
  .has-js .hero-lead > *,
  .has-js .hero-visual { opacity: 1; transform: none; animation: none; }

  .scroll-cue-line::after { animation: none; transform: scaleY(1); }
}

/* 18. RESPONSIF ========================================================= */
@media (min-width: 600px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .focus-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .focus-item:nth-child(3), .focus-item:nth-child(4) { margin-left: 0; }
  .footer-grid { grid-template-columns: 1.4fr 1fr; }
}

@media (min-width: 768px) {
  :root { --header-h: 72px; }

  .wrap { padding-inline: 32px; }

  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; }

  .hero-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 0; }

  .fact {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 16px 14px 0;
    border-top: 1px solid var(--line);
  }

  .about-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }

  .skills-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

  .skill-group-lead { grid-column: 1 / -1; }

  /* Kelompok alat kerja jadi strip lebar berisi kotak-kotak kecil */
  .skill-group:nth-child(3) { grid-column: 1 / -1; }

  .modal { align-items: center; padding: 24px; }

  .modal-panel { border-radius: var(--r-lg); }

  .modal-content { padding: 0 32px 34px; }
}

@media (min-width: 1024px) {
  .nav {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .nav .theme-toggle { display: inline-flex; }

  .nav-foot { display: flex; margin-top: 0; }

  .theme-toggle-icon-only { display: none; }

  .menu-toggle { display: none; }

  .about-details { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 34px; }

  .row { grid-template-columns: 120px 1fr; }

  .timeline-item {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 8px 30px;
    padding: 26px 0 26px 26px;
  }

  .timeline-period { grid-column: 1; padding-top: 6px; }

  .timeline-body { grid-column: 2; display: grid; gap: 8px; }

  .skills-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }

  .skill-group-lead { grid-column: span 7; }

  .skill-group:nth-child(2) { grid-column: span 5; }

  .skill-group:nth-child(3) { grid-column: span 12; }

  .philosophy-grid { grid-template-columns: 80px minmax(0, 1fr); align-items: start; }

  .philosophy-note { grid-column: 2; }

  .contact-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); }

  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
}

@media (min-width: 1440px) {
  :root { --wrap: 1320px; }

  .project-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
}
