/* ==========================================================
   Portofolio Yowtech
   Palet: Kertas #e9edf3 · Tinta #0a1428 · Kobalt #2b50ff · Garis #c4cddc
   Tipe : Bricolage Grotesque (judul) · Manrope (isi) · IBM Plex Mono (kode)
   ========================================================== */

:root {
  --paper: #e9edf3;
  --ink: #0a1428;
  --muted: #4a5670;
  --line: #c4cddc;
  --cobalt: #2b50ff;
  --white: #ffffff;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --font-code: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --radius: 6px;
  --pad: clamp(1.5rem, 4vw, 3.5rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--font-code); }

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

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

.skip {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius);
  transition: top 0.2s var(--ease-out);
}
.skip:focus { top: 1rem; }

/* ---------- Layout utama ---------- */

.page {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  min-height: 100vh;
  min-height: 100svh;
}

/* ---------- Identitas ---------- */

.identity {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  height: 100svh;
  padding: var(--pad);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  border-right: 1px solid var(--line);
}

.name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4.5rem, 12vw, 10.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
  font-variation-settings: "opsz" 96;
}

.role {
  margin-top: 1rem;
  max-width: 22ch;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--muted);
}

/* Teks naik dari balik garis (satu momen saat halaman dibuka) */
.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}
.line > span {
  display: block;
  transform: translateY(110%);
  animation: rise 1s var(--ease-out) forwards;
}
.name .line > span { animation-delay: 0.1s; }
.role .line > span { animation-delay: 0.3s; }

@keyframes rise {
  to { transform: translateY(0); }
}

.facts {
  display: grid;
  gap: 0;
}
.facts > div {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  opacity: 0;
  animation: fade 0.8s var(--ease-out) forwards;
}
.facts > div:nth-child(1) { animation-delay: 0.55s; }
.facts > div:nth-child(2) { animation-delay: 0.65s; }
.facts > div:nth-child(3) { animation-delay: 0.75s; }

.facts dt {
  font-size: 0.9rem;
  color: var(--muted);
}
.facts dd {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Konten ---------- */

.content {
  padding: 0 var(--pad);
  max-width: 54rem;
}

.content > section {
  padding: clamp(3rem, 8vw, 6rem) 0;
  border-top: 1px solid var(--line);
  opacity: 0;
  animation: fade 0.9s var(--ease-out) forwards;
}
.content > section:first-child {
  border-top: 0;
  padding-top: var(--pad);
}
.content > section:nth-of-type(1) { animation-delay: 0.45s; }
.content > section:nth-of-type(2) { animation-delay: 0.6s; }
.content > section:nth-of-type(3) { animation-delay: 0.75s; }

h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.lead {
  margin-top: 0.75rem;
  max-width: 46ch;
  color: var(--muted);
}

/* ---------- Perintah instalasi ---------- */

.install {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.5rem 0.5rem 1.25rem;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius);
}

.install code {
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  font-weight: 500;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.5rem 0;
}
.install code::-webkit-scrollbar { display: none; }

.install button {
  flex: none;
  min-width: 6.5rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 4px;
  background: var(--cobalt);
  color: var(--white);
  font: 600 0.95rem/1 var(--font-body);
  cursor: pointer;
  transition: background-color 0.25s var(--ease-io), transform 0.2s var(--ease-out);
}
.install button:active { transform: scale(0.97); }
.install button.is-done { background: #14804a; }
.install button:focus-visible {
  outline-color: var(--white);
  outline-offset: 2px;
}
@media (hover: hover) {
  .install button:hover { background: #1f3fe0; }
  .install button.is-done:hover { background: #14804a; }
}

/* ---------- Baris tautan ---------- */

.rows {
  margin-top: 2rem;
  border-bottom: 1px solid var(--line);
}
.rows li + li { border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 1px solid var(--line); }

.row {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-inline: calc(var(--row-x) * -1);
  padding: 1.35rem var(--row-x);
  --row-x: 1rem;
  transition: color 0.35s var(--ease-io);
}

.row::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--cobalt);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--ease-io);
}

.row-main {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}
.row-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.row-sub {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  transition: color 0.35s var(--ease-io);
}
.row-action {
  flex: none;
  font-weight: 600;
  padding-bottom: 2px;
  border-bottom: 2px solid currentColor;
  transition: transform 0.4s var(--ease-out);
}

.row:focus-visible {
  outline-offset: -3px;
}
.row:focus-visible::before { transform: scaleY(1); }
.row:focus-visible { color: var(--white); }
.row:focus-visible .row-sub { color: rgba(255, 255, 255, 0.82); }
.row:focus-visible { outline-color: var(--ink); }

@media (hover: hover) {
  .row:hover { color: var(--white); }
  .row:hover::before { transform: scaleY(1); }
  .row:hover .row-sub { color: rgba(255, 255, 255, 0.82); }
  .row:hover .row-action { transform: translateX(-0.35rem); }
}

/* ---------- Footer ---------- */

.foot {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Layar kecil ---------- */

@media (max-width: 56rem) {
  .page { grid-template-columns: minmax(0, 1fr); }

  .identity {
    position: static;
    height: auto;
    gap: 3rem;
    padding-top: clamp(2.5rem, 10vw, 4rem);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .name { font-size: clamp(5rem, 30vw, 9rem); }

  .content { max-width: none; }
  .content > section:first-child { padding-top: clamp(3rem, 8vw, 6rem); }
}

@media (max-width: 30rem) {
  .facts > div { grid-template-columns: 1fr; gap: 0.1rem; }
  .install { padding-left: 1rem; }
  .install button { min-width: 5.5rem; }
}

/* Layar pendek: panel identitas tidak perlu menempel */
@media (min-width: 56.01rem) and (max-height: 40rem) {
  .identity { position: static; height: auto; min-height: 100svh; }
}

/* ---------- Gerak dikurangi ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .line > span,
  .facts > div,
  .content > section {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .row,
  .row::before,
  .row-sub,
  .row-action,
  .install button { transition: none; }
}
