/* ==========================================================================
   Portofolio Eko Supriyono — lembar ujian yang sudah diperiksa
   Satu aksen, netral ditint ke arah rona aksen, tanpa pustaka luar.
   ========================================================================== */

:root {
  /* Aksen diwajibkan pada prompt */
  --accent: #0b5fa5;
  --accent-quiet: color-mix(in oklab, var(--accent) 8%, oklch(0.985 0.003 250));

  /* Netral: ditint tipis ke arah rona aksen (250), bukan abu mati */
  --ink: oklch(0.21 0.012 250);
  --ink-muted: oklch(0.45 0.02 250);
  --paper: oklch(0.985 0.003 250);
  --surface: oklch(0.995 0.002 250);
  --rule: oklch(0.90 0.008 250);
  --rule-strong: oklch(0.83 0.01 250);

  /* Skala jarak 4 pt, nama semantik */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Skala huruf, rasio 1,25 ke atas */
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.24rem + 1.1vw, 2rem);
  --step-3: clamp(2.25rem, 1.55rem + 3vw, 3.5rem);
  --step-4: clamp(2.75rem, 1.7rem + 4.5vw, 4.75rem);

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-figure: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --measure: 68ch;
  --wrap: 72rem;
  --radius: 3px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  padding: 0 clamp(1rem, 5vw, 3rem) var(--space-3xl);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-synthesis-weight: none;
}

body > main,
body > footer { max-width: var(--wrap); margin-inline: auto; }

h1, h2, h3 { line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -0.015em; }
h2 { font-size: var(--step-2); font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: var(--step-1); }
p { margin: 0; max-width: var(--measure); }
ul, ol, dl { margin: 0; padding: 0; }
address { font-style: normal; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 0.15s var(--ease), text-decoration-thickness 0.15s var(--ease);
}
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius); }

/* --------------------------------------------------------------- kepala --- */

.site-head { scroll-margin-top: 0; }

/* Bar navigasi: material tembus pandang, menempel di atas, menipis saat digulir */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in oklab, var(--paper) 80%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.15s var(--ease);
}
.site-nav__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding-inline: clamp(1rem, 5vw, 3rem);
  padding-block: var(--space-md);
  transition: padding-block 0.2s var(--ease);
}
.site-nav.is-scrolled .site-nav__inner { padding-block: var(--space-xs); }
.site-nav.is-scrolled { border-color: var(--rule-strong); }

.brand {
  font-weight: 700;
  font-size: var(--step-0);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--accent); }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-lg);
  list-style: none;
}
.site-nav a:not(.brand) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-muted);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}
.site-nav a:not(.brand):hover { color: var(--accent); }

@media (prefers-reduced-transparency: reduce) {
  .site-nav { background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .site-nav { background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: var(--rule-strong); }
}

/* Hero */
.hero {
  display: grid;
  gap: var(--space-lg);
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 3rem);
  padding-block: clamp(var(--space-2xl), 8vw, var(--space-4xl)) var(--space-2xl);
  border-bottom: 1px solid var(--rule-strong);
}

.hero img {
  grid-area: 1 / 1;
  width: 100%;
  max-width: 9rem;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  filter: grayscale(0.15);
}

.hero .intro { grid-area: 2 / 1; display: grid; gap: var(--space-md); }

.eyebrow {
  font-family: var(--font-figure);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.hero h1 {
  font-size: var(--step-4);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.hero .tagline { color: var(--ink-muted); font-weight: 400; font-size: var(--step-1); line-height: 1.5; max-width: 42ch; }

.terminal {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  max-width: fit-content;
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--accent-quiet);
  font-family: var(--font-figure);
  font-size: var(--step--1);
  color: var(--ink-muted);
}
.terminal .prompt { color: var(--accent); font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-xs); }

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-xs) var(--space-lg);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--accent); color: var(--surface); }
.btn--primary:hover { background: color-mix(in oklab, var(--accent) 86%, black); }
.btn--ghost { border: 1px solid var(--rule-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

@media (min-width: 60rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 14rem;
    grid-template-rows: auto;
    align-items: center;
    column-gap: var(--space-2xl);
  }
  .hero img { grid-area: 1 / 2; max-width: 100%; }
  .hero .intro { grid-area: 1 / 1; }
}

/* ---------------------------------------------------------------- isi --- */

main { display: grid; gap: var(--space-3xl); padding-top: var(--space-3xl); }

section { display: grid; gap: var(--space-lg); scroll-margin-top: 4.5rem; }

section > h2 {
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--rule);
}

section > h2[data-kicker]::before {
  content: "// " attr(data-kicker);
  display: block;
  font-family: var(--font-figure);
  font-size: var(--step--1);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin-bottom: var(--space-xs);
}

/* Tampilan seksi: selalu solid dan terbaca jelas */
.reveal {
  opacity: 1;
  transform: none;
}

#tentang dl {
  display: grid;
  grid-template-columns: minmax(7rem, auto) minmax(0, 1fr);
  gap: var(--space-xs) var(--space-lg);
  max-width: var(--measure);
}
#tentang dt { color: var(--ink-muted); font-size: var(--step--1); letter-spacing: 0.02em; }
#tentang dd { margin: 0; }
#tentang dt, #tentang dd { padding-block: var(--space-xs); border-bottom: 1px solid var(--rule); }

#keahlian { gap: var(--space-xl); }
#keahlian > h2 { border-bottom: 1px solid var(--rule); }
#keahlian > h3 {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
#keahlian > ul { list-style: none; display: grid; gap: var(--space-xs); }
#keahlian > ul li { padding-left: var(--space-lg); position: relative; }
#keahlian > ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.6rem;
  height: 1px;
  background: var(--rule-strong);
}

#keahlian > ul.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}
#keahlian > ul.chips li {
  padding: var(--space-2xs) var(--space-sm);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  font-family: var(--font-figure);
  font-size: var(--step--1);
  color: var(--ink);
}
#keahlian > ul.chips li::before { content: none; }

@media (min-width: 48rem) {
  #keahlian {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--space-xl);
    align-items: start;
  }
  #keahlian > h2 { grid-area: 1 / 1 / 2 / 4; }
}

/* Tiga kelompok keahlian: penempatan eksplisit supaya setiap h3 dan ul-nya
   menempati kolom yang sama, bukan mengalir baris demi baris. */
@media (min-width: 48rem) {
  #keahlian > h3:nth-of-type(1) { grid-area: 2 / 1; }
  #keahlian > h3:nth-of-type(2) { grid-area: 2 / 2; }
  #keahlian > h3:nth-of-type(3) { grid-area: 2 / 3; }
  #keahlian > ul:nth-of-type(1) { grid-area: 3 / 1; }
  #keahlian > ul:nth-of-type(2) { grid-area: 3 / 2; }
  #keahlian > ul:nth-of-type(3) { grid-area: 3 / 3; }
}

/* ------------------------------------------------------------- proyek --- */

#proyek { counter-reset: entri; gap: var(--space-xl); }

#proyek article {
  counter-increment: entri;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--rule-strong);
}

#proyek article::before {
  content: "~/proyek/entri-" counter(entri, decimal-leading-zero);
  font-family: var(--font-figure);
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  color: var(--accent);
}

#proyek h3 { max-width: 34ch; font-weight: 650; }
#proyek article > p { color: var(--ink-muted); }
#proyek article > p strong { color: var(--ink); font-weight: 600; }
#proyek article > p:first-of-type strong {
  font-family: var(--font-figure);
  font-size: var(--step--1);
  letter-spacing: 0.02em;
}

#proyek img {
  width: 100%;
  height: auto;
  margin-block: var(--space-sm);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}

@media (min-width: 64rem) {
  #proyek > h2 { grid-column: 1 / -1; }
  #proyek { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-2xl); }
  #proyek article:nth-of-type(1) { grid-column: 1 / -1; }
  #proyek article:nth-of-type(1) img { max-width: 46rem; }
}

/* Daftar nilai: angka tabular, sejajar, dipindai sekali lihat */
.marks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: var(--space-md) var(--space-lg);
  list-style: none;
  margin-block: var(--space-xs) var(--space-sm);
  padding: var(--space-lg);
  border-block: 1px solid var(--rule-strong);
  background: var(--accent-quiet);
}
.marks li { display: grid; gap: var(--space-2xs); }
.marks b {
  font-family: var(--font-figure);
  font-size: var(--step-1);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.marks span { color: var(--ink-muted); font-size: var(--step--1); line-height: 1.45; }

/* ------------------------------------------------------ cv dan kontak --- */

#unduhan-cv { gap: var(--space-md); }
#unduhan-cv a {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-xs) var(--space-lg);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
#unduhan-cv a:hover { background: var(--accent); color: var(--surface); }

#kontak address { display: grid; gap: var(--space-xs); }
#kontak address p { display: flex; flex-wrap: wrap; gap: var(--space-xs); color: var(--ink-muted); }

/* ------------------------------------------------------------- kaki --- */

body > footer {
  margin-top: var(--space-3xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--rule-strong);
  color: var(--ink-muted);
  font-size: var(--step--1);
  display: grid;
  gap: var(--space-2xs);
}
body > footer .build-note {
  font-family: var(--font-figure);
  color: var(--ink-muted);
}

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