/* ==========================================================================
   KUSDIARNO.MY.ID — "Rumah Digital"
   Dokumen teknis di atas kertas: kertas gading, tinta pekat, aksen hijau fosfor.
   Fraunces (cerita) + Archivo (body) + IBM Plex Mono (data teknis).
   Mobile dioptimalkan: peta ringkas tanpa gulir, nav pil, umpan balik sentuh.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --paper:        #F2EEE2;
  --ink:          #1B1914;
  --ink-body:     #403C32;
  --ink-soft:     #6B665A;
  --line:         rgba(27,25,20,.14);
  --accent:       #14603E;
  --accent-deep:  #0E4A2F;
  --accent-bright:#7BCB9A;
  --term-bg:      #17150F;
  --term-bar:     #25221A;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Archivo', 'Helvetica Neue', sans-serif;
  --mono:  'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* Grid kertas teknik, sangat halus */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(27,25,20,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27,25,20,.045) 1px, transparent 1px);
  background-size: 28px 28px;
}

main, .outro { position: relative; z-index: 1; }

::selection { background: var(--accent); color: var(--paper); }

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

strong { font-weight: 600; color: var(--ink); }

/* ---------- Dasar layout ---------- */
.container { width: min(1180px, 100% - 48px); margin-inline: auto; }

.section { padding-top: 118px; }

.section-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px 20px;
  padding-bottom: 34px;
}
.sec-num   { font: 600 12px var(--mono); color: var(--accent); letter-spacing: .12em; }
.sec-title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(28px, 4vw, 44px); line-height: 1; letter-spacing: -.01em;
}
.sec-rule  { flex: 1; min-width: 60px; border-top: 1px solid var(--ink); }
.sec-tag   { font: 500 10px var(--mono); color: var(--ink-soft); letter-spacing: .16em; }

.lead {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(19px, 2.4vw, 25px); line-height: 1.55;
  max-width: 56ch; margin-bottom: 56px;
}
.lead a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 4px; }
.lead a:hover, .lead a:active { color: var(--ink); }

.sub-label {
  font: 600 11px var(--mono); color: var(--accent);
  letter-spacing: .18em; text-transform: uppercase; margin: 26px 0 12px;
}
.sub-label:first-child { margin-top: 0; }

/* ---------- Reveal on scroll ---------- */
[data-reveal].pre { opacity: 0; transform: translateY(28px); }
[data-reveal].in {
  opacity: 1; transform: none;
  transition: opacity .8s cubic-bezier(.2,.6,.25,1), transform .8s cubic-bezier(.2,.6,.25,1);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(242,238,226,.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--ink);
}
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  height: 56px; gap: 0 32px;
}
.brand {
  font: 700 12px var(--mono); letter-spacing: .1em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand-dot { color: var(--accent); }
.site-nav { display: flex; gap: 24px; }
.site-nav a {
  font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); text-decoration: none; transition: color .15s;
  white-space: nowrap; padding: 8px 0; touch-action: manipulation;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.cur  { color: var(--accent); }
.header-clock {
  margin-left: auto; font: 500 11px var(--mono);
  font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap;
}
.progress {
  position: absolute; left: 0; bottom: -1px; height: 2px;
  width: 0; background: var(--accent);
}

/* ---------- Hero ---------- */
.hero { padding: 90px 0 72px; }
.hero-container { position: relative; }

/* tanda registrasi ala dokumen cetak */
.mark { position: absolute; width: 16px; height: 16px; opacity: .55; }
.mark.tl { top: 24px; left: 0;    border-top: 1.5px solid var(--ink); border-left: 1.5px solid var(--ink); }
.mark.tr { top: 24px; right: 0;   border-top: 1.5px solid var(--ink); border-right: 1.5px solid var(--ink); }
.mark.bl { bottom: 12px; left: 0; border-bottom: 1.5px solid var(--ink); border-left: 1.5px solid var(--ink); }
.mark.br { bottom: 12px; right: 0;border-bottom: 1.5px solid var(--ink); border-right: 1.5px solid var(--ink); }

.hero-meta {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 24px;
  padding: 16px 0 14px; border-bottom: 1px solid var(--ink);
  font: 500 10.5px var(--mono); letter-spacing: .16em; color: var(--ink-soft);
}
.hm-right { text-align: right; }

.hero-grid {
  display: grid; grid-template-columns: minmax(0, 6.5fr) minmax(0, 5.5fr);
  gap: 40px; align-items: center; margin-top: 56px;
}

/* ---------- Lembar identitas (foto) ---------- */
.hero-id {
  display: flex; align-items: stretch; gap: 24px;
  margin-bottom: 36px;
}

.photo-frame {
  flex: none; width: clamp(112px, 24vw, 168px);
  border: 1px solid var(--ink); background: #ECE7D8;
  box-shadow: 6px 6px 0 rgba(27,25,20,.15);
}
.photo-window { position: relative; aspect-ratio: 4 / 5; overflow: hidden; }
.photo-window img {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 22%;
  filter: grayscale(1) sepia(.18) contrast(1.05) brightness(1.03);
  transition: filter .45s ease;
}
/* monokrom di kertas — menyala berwarna saat disentuh / diketuk */
.photo-frame:hover img,
.photo-frame.show-color img { filter: none; }

.photo-fallback {
  position: absolute; inset: 0; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background-color: #E9E4D4;
  background-image: repeating-linear-gradient(-45deg, rgba(27,25,20,.05) 0 1px, transparent 1px 8px);
}
.no-photo .photo-fallback { display: flex; }
.no-photo .photo-window img { display: none; }
.pf-letter { font-family: var(--serif); font-weight: 600; font-size: 46px; line-height: 1; }
.pf-label  { font: 600 8.5px var(--mono); letter-spacing: .2em; color: var(--ink-soft); }
.photo-cap {
  border-top: 1px solid var(--ink); padding: 7px 10px;
  font: 600 8.5px var(--mono); letter-spacing: .14em; color: var(--ink-soft);
}

.id-data { list-style: none; flex: 1; display: flex; flex-direction: column; }
.id-data li {
  flex: 1; display: flex; justify-content: space-between; align-items: center;
  gap: 18px; padding: 6px 2px 6px 0;
  border-bottom: 1px dashed rgba(27,25,20,.3);
}
.id-data li:first-child { border-top: 1px solid var(--ink); }
.id-data li:last-child  { border-bottom: 1px solid var(--ink); }
.id-data span:first-child { font: 600 9px var(--mono); letter-spacing: .18em; color: var(--ink-soft); }
.id-data span:last-child  { font: 600 10.5px var(--mono); letter-spacing: .1em; }

/* petunjuk ketuk-untuk-warna hanya di perangkat sentuh */
@media (hover: none) {
  .photo-frame { cursor: pointer; touch-action: manipulation; }
  .photo-cap::after { content: " · KETUK: WARNA"; }
}

/* ---------- Judul & teks hero ---------- */
.hero-title {
  font-family: var(--serif); font-weight: 560;
  font-size: clamp(44px, 13vw, 112px); line-height: .98; letter-spacing: -.02em;
}
.t-dot { color: var(--accent); }

.hero-roles {
  margin-top: 22px;
  font: 500 11.5px var(--mono); letter-spacing: .16em; text-transform: uppercase;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0;
}
.role-sep { color: var(--accent); padding: 0 12px; }

.hero-lede {
  margin-top: 28px; max-width: 52ch;
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 18.5px; line-height: 1.65; color: var(--ink-body);
}
.hero-lede strong { font-style: normal; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 24px; border: 1px solid var(--ink); border-radius: 2px;
  font: 600 11.5px var(--mono); letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; touch-action: manipulation;
  transition: background .18s, color .18s, border-color .18s;
}
.btn svg { width: 11px; height: 11px; flex: none; }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover, .btn-solid:active { background: var(--accent); border-color: var(--accent); }
.btn-ghost { color: var(--ink); background: transparent; }
.btn-ghost:hover, .btn-ghost:active { background: var(--ink); color: var(--paper); }

.scroll-hint {
  position: absolute; bottom: 14px; right: 44px;
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 9.5px var(--mono); letter-spacing: .2em;
  color: var(--ink-soft); text-decoration: none;
}
.scroll-hint svg { width: 10px; height: 10px; animation: drift 2.4s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(5px); } }

/* ---------- Topologi SVG ---------- */
.topo-head {
  display: flex; justify-content: space-between;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
  font: 600 10px var(--mono); letter-spacing: .18em; color: var(--ink-soft);
}
.topo-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; }
.topo-svg  { display: block; width: 100%; height: auto; }
.topo-svg--wide { min-width: 500px; }
.topo-svg--compact { display: none; min-width: 0; }
.topo-svg--compact .n-label  { font-size: 12.5px; }
.topo-svg--compact .hub-sub  { font-size: 9px; letter-spacing: .18em; }
.topo-hint { display: none; }

.wire { stroke: var(--accent); stroke-width: 1.3; fill: none; stroke-opacity: .85; }
.wire--ghost { stroke: var(--ink); stroke-dasharray: 4 4; stroke-opacity: .5; }
.junc circle { fill: var(--ink); opacity: .45; }
.pkt  { fill: var(--ink); }

.node { cursor: pointer; }
.n-box {
  fill: var(--paper); stroke: var(--ink); stroke-width: 1.25;
  transition: fill .15s;
}
.n-box--dash { stroke-dasharray: 5 4; }
.n-label {
  font: 600 11px var(--mono); letter-spacing: .06em;
  fill: var(--ink); text-anchor: middle; pointer-events: none; transition: fill .15s;
}
.n-dot { fill: var(--accent); transition: fill .15s; }
.node:hover .n-box, .node:focus .n-box, .node:active .n-box { fill: var(--ink); }
.node:hover .n-label, .node:focus .n-label, .node:active .n-label { fill: var(--paper); }
.node:hover .n-dot, .node:focus .n-dot, .node:active .n-dot { fill: var(--accent-bright); }

.hub-box  { fill: var(--ink); transition: fill .15s; }
.hub-label{
  font: 600 13px var(--mono); letter-spacing: .1em;
  fill: var(--paper); text-anchor: middle; pointer-events: none;
}
.hub-sub {
  font: 500 8.5px var(--mono); letter-spacing: .22em;
  fill: rgba(242,238,226,.6); text-anchor: middle; pointer-events: none;
}
.node--hub:hover .hub-box, .node--hub:focus .hub-box, .node--hub:active .hub-box { fill: var(--accent); }

.topo-monitor {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 0 2px; border-top: 1px solid var(--ink);
  font: 500 10.5px var(--mono); letter-spacing: .06em; color: var(--ink-soft);
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex: none; margin-top: 4px;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* ---------- 01 Kronologi: timeline ---------- */
.timeline { position: relative; --rail: 133px; margin-top: 8px; }
.tl-rail {
  position: absolute; top: 12px; bottom: 56px;
  left: calc(var(--rail) - 1px); width: 2px; background: var(--line);
}
.tl-fill {
  position: absolute; top: 0; left: 0; width: 100%; height: 0; background: var(--accent);
}
.tl-item {
  display: grid; grid-template-columns: 112px 44px 1fr;
  padding: 4px 0 56px;
}
.tl-year {
  font: 500 22px/1.2 var(--mono); color: var(--ink-soft);
  letter-spacing: -.01em; transition: color .3s; padding-top: 4px;
}
.tl-item.active .tl-year { color: var(--accent); }
.tl-marker { position: relative; }
.tl-marker::after {
  content: ""; position: absolute; left: 50%; top: 10px;
  width: 11px; height: 11px; border-radius: 50%;
  transform: translateX(-50%);
  background: var(--paper); border: 2px solid var(--ink);
  transition: background .3s, border-color .3s;
}
.tl-item.active .tl-marker::after { background: var(--accent); border-color: var(--accent); }
.tl-title {
  font-family: var(--serif); font-weight: 600; font-size: 23px;
  letter-spacing: -.01em; margin-bottom: 10px;
}
.tl-body p { font-size: 15px; line-height: 1.75; color: var(--ink-body); max-width: 58ch; }

/* ---------- 02 Teknologi ---------- */
.split {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 64px; align-items: start;
}
.split p { color: var(--ink-body); max-width: 60ch; margin-bottom: 24px; }

.stat-block {
  position: relative; border: 1px solid var(--ink);
  padding: 46px 36px 34px; background: var(--paper);
  box-shadow: 8px 8px 0 rgba(27,25,20,.12);
}
.stat-fig {
  position: absolute; top: -8px; left: 20px;
  background: var(--paper); padding: 0 10px;
  font: 600 10px var(--mono); letter-spacing: .16em; color: var(--accent);
}
.stat-num {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(64px, 8vw, 108px); line-height: .95; letter-spacing: -.02em;
}
.stat-pct { color: var(--accent); }
.stat-cap {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 14.5px; line-height: 1.7; color: var(--ink-body);
}
.stat-note { margin-top: 14px; font: 400 11px var(--mono); color: var(--ink-soft); }

/* ---------- 03 Ekosistem: ledger produk ---------- */
.ledger-cols, .product-row {
  display: grid;
  grid-template-columns: 64px 212px 1fr auto 30px;
  gap: 0 24px; align-items: center;
}
.ledger-cols {
  padding: 0 20px 12px; border-bottom: 1px solid var(--ink);
  font: 600 9.5px var(--mono); letter-spacing: .18em; color: var(--ink-soft);
}
.lc-right { justify-self: end; }

.product-ledger { list-style: none; border-bottom: 1px solid var(--ink); }
.product-row {
  padding: 27px 20px; color: inherit; text-decoration: none;
  border-top: 1px solid var(--ink); touch-action: manipulation;
  transition: background .16s, color .16s;
}
.product-ledger li:first-child .product-row { border-top: none; }
.product-row:hover, .product-row:active { background: var(--ink); color: var(--paper); }

.p-index { font: 500 11px var(--mono); color: var(--ink-soft); }
.p-name  {
  font-family: var(--serif); font-weight: 600; letter-spacing: -.01em;
  font-size: clamp(21px, 2.4vw, 31px); line-height: 1.1;
}
.p-desc  { font-size: 14.5px; color: var(--ink-body); }
.p-host  { font: 500 12px var(--mono); color: var(--accent); white-space: nowrap; }
.p-arrow { width: 17px; height: 17px; justify-self: end; transition: transform .18s; }

.product-row:hover .p-index, .product-row:hover .p-desc,
.product-row:active .p-index, .product-row:active .p-desc { color: rgba(242,238,226,.65); }
.product-row:hover .p-host, .product-row:active .p-host { color: var(--accent-bright); }
.product-row:hover .p-arrow, .product-row:active .p-arrow { transform: translate(3px, -3px); }

.product-row--portal { background: var(--accent); color: var(--paper); }
.product-row--portal .p-index, .product-row--portal .p-desc { color: rgba(242,238,226,.75); }
.product-row--portal .p-host { color: var(--accent-bright); }
.product-row--portal:hover, .product-row--portal:active { background: var(--ink); }

/* ---------- 04 Keahlian ---------- */
.skills-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 60px; align-items: start;
}
.skills-intro { color: var(--ink-body); max-width: 52ch; margin-bottom: 40px; }

.skill-list { list-style: none; }
.skill-list li { border-top: 1px solid var(--ink); padding: 28px 0; }
.skill-code {
  display: block; margin-bottom: 10px;
  font: 600 11px var(--mono); letter-spacing: .12em; color: var(--accent);
}
.skill-list h3 {
  font-family: var(--serif); font-weight: 600; font-size: 23px;
  letter-spacing: -.01em; margin-bottom: 8px;
}
.skill-list p { font-size: 15px; line-height: 1.7; color: var(--ink-body); }

.meta-list { margin-top: 44px; border-top: 1px solid var(--ink); }
.meta-list > div {
  display: grid; grid-template-columns: 160px 1fr;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.meta-list dt {
  font: 600 10px var(--mono); letter-spacing: .14em;
  color: var(--ink-soft); text-transform: uppercase; padding-top: 3px;
}
.meta-list dd { font: 500 13.5px var(--mono); }

/* ---------- Terminal ---------- */
.terminal {
  position: relative; border: 1px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(27,25,20,.14);
  transition: box-shadow .2s;
}
.terminal:focus-within { box-shadow: 8px 8px 0 rgba(20,96,62,.3); }
.term-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 9px 14px; background: var(--term-bar);
  border-bottom: 1px solid #000;
}
.term-title {
  font: 600 11px var(--mono); color: #EDE8D9; letter-spacing: .04em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.term-tag   { font: 500 9.5px var(--mono); color: #8A857A; letter-spacing: .14em; text-transform: uppercase; flex: none; }

.term-scroll {
  max-height: 430px; overflow-y: auto; overscroll-behavior: contain;
  padding: 18px 20px 16px; background: var(--term-bg);
}
.term-scroll::-webkit-scrollbar { width: 8px; }
.term-scroll::-webkit-scrollbar-thumb { background: #3B382E; }
.term-scroll::-webkit-scrollbar-track { background: transparent; }

.t-line { font: 400 13px/1.65 var(--mono); color: #D5D0C0; margin: 0 0 3px; }
.t-line b   { font-weight: 600; color: #FFFDF6; }
.t-dim      { color: #9B968A; }
.t-err      { color: #E0A090; }
.t-line a   { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 3px; }
.t-p        { color: var(--accent-bright); font-weight: 600; }
.t-c        { color: var(--accent-bright); font-weight: 600; }
.t-pre      { font: inherit; white-space: pre; overflow-x: auto; margin: 4px 0 6px; }

.term-input-line {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px;
  font: 400 13px/1.65 var(--mono); margin-top: 4px;
}
.term-text { color: #FFFDF6; word-break: break-all; }
.term-caret {
  display: inline-block; width: 8px; height: 15px;
  background: var(--accent-bright); vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }

.term-hidden-input {
  position: absolute; top: 0; left: 0;
  width: 1px; height: 1px; opacity: 0;
  border: 0; padding: 0; pointer-events: none;
  font-size: 16px; background: transparent; color: transparent;
}
.term-foot { margin-top: 12px; font: 400 10.5px var(--mono); color: var(--ink-soft); }

/* ---------- 05 Komunitas ---------- */
.community-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 60px; align-items: start;
}
.community-grid p { color: var(--ink-body); max-width: 54ch; }

.comm-card {
  border: 1px solid var(--ink); background: var(--paper);
  box-shadow: 8px 8px 0 rgba(27,25,20,.12);
}
.comm-head {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px;
  background: var(--ink); color: var(--paper);
  padding: 13px 18px;
  font: 600 10.5px var(--mono); letter-spacing: .14em;
}
.comm-body { padding: 28px 24px 24px; }
.comm-body > p:first-child { color: var(--ink-body); font-size: 15px; }
.comm-list { list-style: none; margin-top: 22px; }
.comm-list li {
  display: flex; gap: 12px; padding: 13px 0;
  border-top: 1px dashed rgba(27,25,20,.35);
  font-size: 14.5px; color: var(--ink-body);
}
.li-mark { color: var(--accent); font: 700 14px var(--mono); flex: none; }
.comm-note {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line);
  font-family: var(--serif); font-style: italic; font-size: 16.5px; color: var(--ink);
}

/* ---------- Outro & footer ---------- */
.outro { background: var(--ink); color: var(--paper); margin-top: 118px; }
.outro-container { padding: 118px 0 96px; }
.outro-kicker {
  font: 600 11px var(--mono); letter-spacing: .24em;
  color: var(--accent-bright); margin-bottom: 30px;
}
.outro-quote {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(27px, 4.6vw, 54px); line-height: 1.22;
  letter-spacing: -.01em; max-width: 24ch;
}
.outro-quote em { color: var(--accent-bright); }
.outro-note { margin-top: 32px; max-width: 56ch; color: #D5D0C0; font-size: 16px; }

.site-footer { border-top: 1px solid rgba(242,238,226,.18); padding: 28px 0; }
.footer-grid {
  display: flex; flex-wrap: wrap; gap: 14px 44px; justify-content: space-between;
  font: 500 10.5px var(--mono); letter-spacing: .12em;
  text-transform: uppercase; color: #A9A496;
}
.footer-grid a {
  color: var(--paper); text-decoration: none;
  border-bottom: 1px solid rgba(242,238,226,.4); padding-bottom: 2px;
  transition: color .15s, border-color .15s;
}
.footer-grid a:hover, .footer-grid a:active { color: var(--accent-bright); border-color: var(--accent-bright); }

/* ---------- Scroll offset anchor ---------- */
section[id] { scroll-margin-top: 84px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1020px) {
  .hero-grid, .split, .skills-grid, .community-grid { gap: 48px; }
}

@media (max-width: 900px) {
  .hero { padding-top: 78px; }
  .hero-grid, .split, .skills-grid, .community-grid { grid-template-columns: 1fr; }
  .hero-topo { max-width: 640px; }
  .split p { margin-bottom: 20px; }
  .section { padding-top: 96px; }
  .scroll-hint { display: none; }
}

/* ---- Peta ringkas menggantikan peta lebar di layar kecil ---- */
@media (max-width: 600px) {
  .topo-svg--wide { display: none; }
  .topo-svg--compact { display: block; }
  .topo-wrap { overflow-x: visible; }
}

/* ---- Header dua baris di ponsel: brand+jam / nav pil bergulir ---- */
@media (max-width: 780px) {
  .header-inner { height: auto; padding: 10px 0 0; gap: 6px 16px; }
  .header-clock { font-size: 10px; }
  .site-nav {
    order: 5; flex: 1 1 100%;
    display: flex; gap: 8px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-height: 76px; opacity: 1; touch-action: pan-x;
    transition: max-height .28s ease, opacity .2s ease, padding .28s ease;
    padding: 2px 0 10px;
    /* gradasi tepi: penanda bahwa baris bisa digeser */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a {
    flex: none; display: inline-block;
    border: 1px solid var(--line); border-radius: 3px;
    background: var(--paper); color: var(--ink);
    padding: 8px 14px;
  }
  .site-nav a.cur {
    border-color: var(--accent); color: var(--accent);
    background: rgba(20,96,62,.07);
  }

  /* menyusut saat menggulir ke bawah, muncul lagi saat ke atas */
  .site-header.nav-hide .site-nav {
    max-height: 0; opacity: 0; overflow: hidden; padding: 0;
  }

  .hero { padding-top: 108px; }
  section[id] { scroll-margin-top: 122px; }
}

@media (max-width: 640px) {
  .container { width: calc(100% - 40px); }
  .section { padding-top: 84px; }
  .outro { margin-top: 84px; }
  .outro-container { padding: 84px 0 70px; }

  /* meta hero ditumpuk vertikal agar tidak dempet */
  .hero-meta { flex-direction: column; gap: 2px; }
  .hm-right { text-align: left; }
  .hero-grid { margin-top: 44px; }
  .hero-id { margin-bottom: 30px; }

  /* judul section: nomor+judul+tag, garis penuh di bawahnya */
  .section-head { gap: 10px 14px; padding-bottom: 26px; }
  .sec-rule { order: 9; flex-basis: 100%; min-width: 0; }

  .lead { margin-bottom: 42px; }

  /* timeline: penanda di kiri, tahun & isi di kanan */
  .timeline { --rail: 13px; }
  .tl-item {
    grid-template-columns: 28px 1fr;
    grid-template-areas: "m y" "m b";
    row-gap: 8px; padding-bottom: 44px;
  }
  .tl-year   { grid-area: y; font-size: 20px; }
  .tl-marker { grid-area: m; }
  .tl-body   { grid-area: b; }
  .tl-title  { font-size: 21px; }
  .tl-body p { font-size: 14.5px; }
  .tl-marker::after { top: 8px; }

  /* ledger produk: tumpuk vertikal, host jadi chip */
  .ledger-cols { display: none; }
  .product-row { display: block; position: relative; padding: 24px 18px; }
  .p-index { display: block; margin-bottom: 8px; }
  .p-name  { font-size: 22px; }
  .p-desc  { display: block; margin-top: 9px; font-size: 14px; }
  .p-host  {
    display: inline-block; margin-top: 14px; white-space: normal;
    padding: 6px 10px; border: 1px solid var(--line); border-radius: 2px;
  }
  .product-row:hover .p-host, .product-row:active .p-host { border-color: rgba(242,238,226,.35); }
  .p-arrow { position: absolute; top: 26px; right: 18px; }

  .stat-block { padding: 42px 24px 28px; box-shadow: 6px 6px 0 rgba(27,25,20,.12); }
  .comm-body { padding: 22px 18px 20px; }
  .comm-note { font-size: 15.5px; }
  .skill-list li { padding: 24px 0; }
  .skill-list h3 { font-size: 21px; }
  .meta-list > div { grid-template-columns: 132px 1fr; }

  .term-scroll { max-height: 360px; padding: 14px 14px 12px; }
  .term-bar { padding: 8px 12px; }
  .term-title { font-size: 10px; }
  .t-line { font-size: 12px; }
  .term-foot { font-size: 10px; }

  /* footer ditumpuk rapi */
  .footer-grid { flex-direction: column; gap: 12px; align-items: flex-start; }
}

@media (max-width: 480px) {
  .hero-id { gap: 16px; }
  .photo-frame { width: 96px; box-shadow: 4px 4px 0 rgba(27,25,20,.15); }
  .photo-cap { padding: 5px 7px; font-size: 7.5px; letter-spacing: .1em; }
  .id-data span:first-child { font-size: 8px; }
  .id-data span:last-child  { font-size: 9.5px; }
  .id-data li { padding: 4px 0; gap: 10px; }
  .pf-letter { font-size: 36px; }
  .pf-label  { font-size: 7.5px; }

  .hero-title { font-size: clamp(42px, 12.5vw, 48px); }
  .hero-roles { font-size: 10px; }
  .role-sep { padding: 0 8px; }
  .hero-lede { font-size: 17px; margin-top: 22px; }

  /* CTA selebar layar di ponsel kecil */
  .hero-cta { gap: 10px; margin-top: 32px; }
  .btn { flex: 1 1 100%; padding: 16px 20px; }

  .terminal { box-shadow: 6px 6px 0 rgba(27,25,20,.14); }
  .comm-card { box-shadow: 6px 6px 0 rgba(27,25,20,.12); }
  .term-tag { display: none; }

  .outro-quote { font-size: clamp(24px, 7.5vw, 30px); }
}

/* ==========================================================================
   AKSESIBILITAS: kurangi gerakan
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
  .packets { display: none; }
  [data-reveal].pre { opacity: 1; transform: none; }
}