/* Arfanaa Portofolio — editorial premium, vanilla CSS, zero dependencies.
   Kertas krem hangat + serif display Fraunces + grotesque Switzer.
   Tokens only; everything downstream references them. */
@font-face {
  font-family: "Fraunces";
  src: url("fonts/Fraunces-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/Fraunces-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/Fraunces-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/Fraunces-900.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("fonts/Switzer-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("fonts/Switzer-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("fonts/Switzer-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #faf6ec;        /* kertas krem hangat — latar halaman */
  --paper: #fffdf6;        /* panel, nyaris putih hangat */
  --ink: #211d15;          /* tinta hangat, bukan hitam murni */
  --muted: #6b6152;        /* teks sekunder hangat (kontras ≥ 4.5:1 di krem) */
  --accent: #211d15;       /* aksen = tinta (monokrom — biru aviasi dihapus 2026-11-07) */
  --accent-ink: #faf6ec;   /* teks di atas tinta */
  --ink-2: #38322a;        /* tinta hover (naik satu tingkat) */
  --line: #dcd2b8;         /* hairline hangat */
  --radius: 2px;
  --step-small: clamp(0.75rem, 0.72rem + 0.12vw, 0.8125rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.375rem, 1.15rem + 1vw, 1.875rem);
  --step-head: clamp(2.25rem, 1.4rem + 3.8vw, 4.25rem);
  --step-display: clamp(4rem, 12.5vw, 11rem);
  --space-section: clamp(5rem, 10vw, 9rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Switzer", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: var(--step-body);
  line-height: 1.55;
  letter-spacing: -0.005em;
  overflow-x: clip;
}

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

img { display: block; max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 3px; }
a:not(.btn):not(.topbar-cta):hover { color: var(--ink-2); }

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

h1, h2, h3 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  text-wrap: balance;
  margin: 0;
}

h2 { font-size: var(--step-head); }
h3 { font-size: var(--step-lead); line-height: 1.15; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

.wrap {
  width: min(1240px, 100% - 2 * clamp(1.25rem, 5vw, 3rem));
  margin-inline: auto;
}

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

/* ---------- Pesawat 3D: canvas fixed di belakang konten ---------- */
#jet3d {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}
.topbar, main { position: relative; z-index: 1; }

/* ---------- Top bar ---------- */
.topbar { border-bottom: 1px solid var(--line); }
.topbar-in {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 68px;
  gap: 1rem;
}
.topbar nav { display: flex; align-items: center; gap: 0.25rem; }
.topbar-link {
  display: inline-block;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  padding: 0.75rem 0.6rem;
  min-height: 44px;
}
.topbar-link:hover { color: var(--ink); }
.topbar-cta {
  background: var(--ink);
  color: var(--cream);
  padding: 0.6rem 1.1rem;
  margin-left: 0.5rem;
  border-radius: var(--radius);
  transition: background-color 0.2s var(--ease-out);
}
.topbar-cta:hover { background: var(--ink-2); color: var(--cream); }

/* Layar kecil: tautan seksi disembunyikan — topbar hanya tombol Hubungi.
   Enam tautan tidak muat di 390px dan membuat halaman meluber 51px. */
@media (max-width: 767px) {
  .topbar-link:not(.topbar-cta) { display: none; }
}

/* ---------- Hero: nama sebagai komposisi ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem); }
.hero-in {
  display: flex;
  flex-direction: column;
}
.display {
  font-size: var(--step-display);
  font-weight: 600;
  line-height: 0.88;
  letter-spacing: -0.03em;
  text-transform: none;
}
.display-line { display: block; }
.hero-foot {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  display: grid;
  gap: 1.25rem;
}
.hero-role {
  font-family: "Fraunces", Georgia, serif;
  font-size: var(--step-lead);
  font-weight: 400;
  line-height: 1.35;
  max-width: 34ch;
  margin: 0;
}
.hero-meta {
  font-size: var(--step-small);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}
/* ---------- Tombol ---------- */
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--cream);
  font-weight: 600;
  font-size: var(--step-body);
  text-decoration: none;
  padding: 1rem 1.75rem;
  min-height: 56px;
  border-radius: var(--radius);
  transition: background-color 0.2s var(--ease-out), transform 0.15s var(--ease-out);
}
.btn:hover { background: var(--ink-2); color: var(--cream); }
.btn:active { transform: scale(0.97); }

/* ---------- Sections: nomor + hairline ---------- */
.section { padding-block: var(--space-section) 0; }
.section:last-of-type { padding-bottom: var(--space-section); }

.sec-head {
  display: flex;
  align-items: baseline;
  gap: clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.25rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.sec-num {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 900;
  font-size: clamp(1rem, 1rem + 1vw, 1.5rem);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ---------- 01 Profil ---------- */
.profil-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
}
.profil-photo { margin: 0; }
.profil-photo img {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: top center;
  /* Tanpa background & tanpa radius — PNG transparan menyatu dengan krem halaman. */
  background: transparent;
}
.profil-photo figcaption {
  margin-top: 0.75rem;
  font-size: var(--step-small);
  color: var(--muted);
}
.profil-text { max-width: 34ch; }
.lead {
  font-family: "Fraunces", Georgia, serif;
  font-size: var(--step-lead);
  line-height: 1.4;
  font-weight: 400;
}
.signoff {
  margin-top: 1.75rem;
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-size: var(--step-lead);
}

/* ---------- 02 Pendidikan ---------- */
.edu {
  display: grid;
  gap: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}
.edu-degree {
  margin-top: 0.75rem;
  font-size: var(--step-lead);
  color: var(--muted);
}
.edu-facts {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.edu-facts dt {
  font-size: var(--step-small);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.edu-facts dd {
  margin: 0.35rem 0 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.edu-facts-note {
  font-family: "Switzer", system-ui, sans-serif;
  font-weight: 400;
  font-size: var(--step-body);
  color: var(--muted);
}

/* ---------- 03 Pengalaman ---------- */
.jobs { display: grid; gap: clamp(3rem, 7vw, 5rem); }
.job {
  display: grid;
  gap: 1.25rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}
.job-date {
  display: grid;
  gap: 0.35rem;
  align-content: start;
}
.job-index {
  font-size: var(--step-small);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.job-date time {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.job-place {
  margin-top: 0.5rem;
  font-weight: 600;
  font-size: var(--step-lead);
}
.job ul {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.75rem;
}
.job ul li {
  padding-left: 1.5rem;
  position: relative;
  max-width: 62ch;
}
.job ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  background: var(--accent);
}
.schematic-fig { margin: 2rem 0 0; max-width: 560px; }
.schematic {
  width: 100%;
  height: auto;
  color: var(--accent);
  opacity: 0.8;
}
.schematic-fig figcaption {
  margin-top: 0.5rem;
  font-size: var(--step-small);
  color: var(--muted);
}

/* ---------- 04 Lisensi ---------- */
.license-note {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-size: var(--step-lead);
  color: var(--muted);
  margin-bottom: 2rem;
}
.licenses { display: grid; gap: 0; }
.license {
  display: flex;
  align-items: baseline;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line);
  padding-block: 1.5rem;
}
.license:last-child { border-bottom: 1px solid var(--line); }
.license-code {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 900;
  font-size: clamp(3rem, 3rem + 4vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--accent);
  min-width: 2.2ch;
}
.license-name {
  font-family: "Fraunces", Georgia, serif;
  font-size: var(--step-head);
  font-weight: 600;
}

/* ---------- 05 Keahlian ---------- */
.skills { display: grid; }
.skills li {
  display: flex;
  align-items: baseline;
  gap: clamp(1rem, 3vw, 2rem);
  border-top: 1px solid var(--line);
  padding-block: 1.1rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.25rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.skills li:last-child { border-bottom: 1px solid var(--line); }
.skill-num {
  font-family: "Switzer", system-ui, sans-serif;
  font-size: var(--step-small);
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- 06 Kontak: krem, sama seperti halaman ---------- */
.cta-field {
  background: var(--cream);
  color: var(--ink);
  padding-bottom: var(--space-section);
  margin-top: var(--space-section);
}
.cta-field .sec-head {
  border-bottom-color: var(--line);
}
.cta-field .sec-num { color: var(--ink); }
.cta-side {
  font-family: "Fraunces", Georgia, serif;
  font-size: var(--step-lead);
  line-height: 1.4;
  max-width: 30ch;
  margin-bottom: 2.5rem;
}
.cta-contacts { display: grid; gap: 0; margin-bottom: 2.5rem; }
.cta-contacts li {
  border-top: 1px solid var(--line);
  padding-block: 1.1rem;
}
.cta-contacts li:last-child { border-bottom: 1px solid var(--line); }
.cta-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--ink);
  text-decoration: none;
}
.cta-item:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.cta-icon {
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.cta-icon svg { display: block; width: 1.25rem; height: 1.25rem; }
.cta-item:hover .cta-icon { background: var(--ink); color: var(--cream); }
.cta-text { display: grid; gap: 0.15rem; min-width: 0; }
.cta-label {
  font-size: var(--step-small);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted); /* kontras 5,6:1 di atas krem (≥ 4,5:1) */
}
.cta-value {
  font-weight: 500;
  font-size: var(--step-lead);
  color: var(--ink);
  overflow-wrap: break-word;
}
.cta-item:hover .cta-value { text-decoration: underline; }

/* ---------- Motion: satu momen, bukan taburan ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.7s var(--ease-out) var(--d, 0ms),
    transform 0.7s var(--ease-out) var(--d, 0ms);
}

/* ---------- Tablet / desktop ---------- */
@media (min-width: 768px) {
  .hero-foot {
    grid-template-columns: 1.4fr 1fr;
    align-items: end;
  }
  .hero-role { margin: 0; }
  .hero-meta { text-align: right; }
  .profil-grid { grid-template-columns: 5fr 7fr; align-items: start; }
  .profil-text { padding-top: 0.5rem; }
  .edu { grid-template-columns: 1fr auto; align-items: end; }
  .job { grid-template-columns: 3fr 8fr; }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 5vw, 4rem); }
  .cta-contacts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; }
  .cta-contacts li:last-child { border-bottom: 1px solid var(--line); }
}

@media (min-width: 1024px) {
  .profil-grid { grid-template-columns: 5fr 6fr; }
  .profil-photo { position: sticky; top: 2rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
  .js .reveal.in { transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
