:root {
  color-scheme: light;
  --bg: #f5f4ef;
  --surface: #fbfaf7;
  --surface-strong: #e7edef;
  --text: #28373d;
  --muted: #66747a;
  --faint: #8c989b;
  --line: rgba(40, 55, 61, .12);
  --dusty: #91aab4;
  --dusty-deep: #647f8b;
  --dusty-soft: #e0e9eb;
  --ink-on-dusty: #fbfaf7;
  --shadow: rgba(55, 78, 86, .09);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", "Segoe UI", sans-serif;
  --mono: "DM Mono", Consolas, monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #202d32;
  --surface: #29383d;
  --surface-strong: #34474e;
  --text: #f1f0e9;
  --muted: #b7c1c2;
  --faint: #8d9b9e;
  --line: rgba(241, 240, 233, .14);
  --dusty: #a4bac1;
  --dusty-deep: #c0d0d3;
  --dusty-soft: #3b5056;
  --ink-on-dusty: #202d32;
  --shadow: rgba(4, 16, 22, .24);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f4ef;
  --surface: #fbfaf7;
  --surface-strong: #e7edef;
  --text: #28373d;
  --muted: #66747a;
  --faint: #8c989b;
  --line: rgba(40, 55, 61, .12);
  --dusty: #91aab4;
  --dusty-deep: #647f8b;
  --dusty-soft: #e0e9eb;
  --ink-on-dusty: #fbfaf7;
  --shadow: rgba(55, 78, 86, .09);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
img, svg { display: block; }
::selection { background: var(--dusty); color: var(--ink-on-dusty); }
:focus-visible { outline: 2px solid var(--dusty-deep); outline-offset: 4px; }
.wrap { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.mono { font-family: var(--mono); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 78px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -.02em; }
.brand-mark {
  display: grid;
  width: 35px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--dusty);
  border-radius: 11px;
  background: var(--dusty);
  color: var(--ink-on-dusty);
  font: 500 12px var(--mono);
}
.nav-right, .nav-links { display: flex; align-items: center; }
.nav-right { gap: 20px; }
.nav-links { gap: 26px; color: var(--muted); font-size: 13px; }
.nav-links a { transition: color .2s ease, transform .2s ease; }
.nav-links a:hover, .social-link:hover { color: var(--dusty-deep); transform: translateY(-1px); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
}
.nav-cta span { color: var(--dusty-deep); font-size: 17px; line-height: 12px; }
.theme-toggle, .menu-toggle {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.theme-toggle:hover, .menu-toggle:hover { transform: translateY(-2px); border-color: var(--dusty); background: var(--dusty-soft); }
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.menu-toggle { display: none; }

.hero { padding: 90px 0 108px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); align-items: center; gap: 72px; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--dusty-deep);
  font: 500 11px/1.4 var(--mono);
  letter-spacing: .15em;
  text-transform: uppercase;
}
.eyebrow::before { width: 22px; height: 1px; background: currentColor; content: ""; }
.hero h1 {
  max-width: 800px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(66px, 10vw, 126px);
  font-weight: 600;
  letter-spacing: -.07em;
  line-height: .82;
}
.hero h1 .name-line { display: block; color: var(--dusty-deep); }
.hero-subtitle { max-width: 450px; margin: 25px 0 0; color: var(--muted); font-size: 15px; }
.type-line { min-height: 29px; margin: 15px 0 0; color: var(--dusty-deep); font: 400 13px var(--mono); }
.type-cursor { display: inline-block; width: 7px; height: 16px; margin-left: 3px; vertical-align: -3px; background: currentColor; animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 30px; }
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.button:hover { transform: translateY(-2px); border-color: var(--dusty); }
.button:active { transform: translateY(0) scale(.98); }
.button-primary { border-color: var(--dusty); background: var(--dusty); color: var(--ink-on-dusty); }
.button-primary:hover { background: var(--dusty-deep); color: var(--ink-on-dusty); }
.button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px 24px; margin-top: 34px; color: var(--muted); font: 400 11px var(--mono); }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dusty-deep); box-shadow: 0 0 0 5px var(--dusty-soft); }
.avatar-wrap { position: relative; width: min(100%, 350px); justify-self: end; }
.avatar-placeholder {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px 28px 28px 4px;
  background: var(--surface-strong);
  box-shadow: 22px 22px 0 var(--dusty-soft), 0 25px 60px var(--shadow);
}
.avatar-photo { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; filter: saturate(.72) contrast(1.04); transition: filter .35s ease, transform .45s ease; }
.avatar-placeholder:hover .avatar-photo { filter: saturate(.95) contrast(1.04); transform: scale(1.025); }

.section { position: relative; padding-block: 104px; border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 40px; }
.section-heading h2 { margin: 0; font-family: var(--serif); font-size: clamp(46px, 6vw, 72px); font-weight: 600; letter-spacing: -.055em; line-height: .95; }
.section-heading > p { max-width: 330px; margin: 0; color: var(--muted); font-size: 13px; }
.section .eyebrow::before { width: auto; height: auto; background: none; content: counter(section, decimal-leading-zero); }
main { counter-reset: section; }
.section { counter-increment: section; }
.section .eyebrow::after { width: 20px; height: 1px; background: currentColor; content: ""; }

.about-grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: 76px; }
.about-facts, .service-list, .timeline { border-top: 1px solid var(--line); }
.fact, .service-row { display: flex; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.fact span:first-child, .service-num, .skill-level, .project-number, .certificate-date, .contact-link span:first-child { color: var(--faint); }
.fact span:last-child { text-align: right; }
.about-copy { max-width: 680px; }
.about-copy p { margin: 0 0 16px; color: var(--muted); font-size: 16px; line-height: 1.8; }
.about-copy p strong { color: var(--text); font-weight: 600; }
.edit-note, .skill-footnote, .project-disclaimer { color: var(--faint) !important; font: 400 11px/1.7 var(--mono) !important; }

.skills-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; }
.skill-group { padding-top: 17px; border-top: 1px solid var(--line); }
.skill-group h3 { margin: 0 0 17px; font-size: 17px; font-weight: 600; }
.skill-list, .skill-empty { display: grid; gap: 13px; }
.skill-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.skill-level, .project-number, .certificate-date { font: 400 10px var(--mono); white-space: nowrap; }
.tools-list, .project-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-tag, .tech-tag { display: inline-flex; padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font: 400 10px var(--mono); }

.projects { background: var(--surface); }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.project-card, .certificate-item { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.project-card:hover, .certificate-item:hover { transform: translateY(-5px); border-color: var(--dusty); box-shadow: 0 18px 38px var(--shadow); }
.project-art { display: grid; min-height: 235px; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line); background: linear-gradient(rgba(126,155,171,.13) 1px, transparent 1px), linear-gradient(90deg, rgba(126,155,171,.13) 1px, transparent 1px), var(--surface-strong); background-size: 24px 24px; }
.terminal { width: min(78%, 330px); padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 16px 35px var(--shadow); color: var(--muted); font: 400 11px/1.9 var(--mono); }
.terminal-top { display: flex; gap: 5px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.terminal-top i { width: 6px; height: 6px; border-radius: 50%; background: var(--dusty); }
.terminal-code { padding-top: 10px; }
.terminal-code b { color: var(--dusty-deep); font-weight: 400; }
.terminal-code span { color: var(--text); }
.project-body { padding: 20px; }
.project-top { display: flex; justify-content: space-between; gap: 15px; align-items: start; }
.project-card h3, .certificate-caption h3 { margin: 0; font-size: 19px; font-weight: 600; }
.project-body p { min-height: 44px; margin: 10px 0 15px; color: var(--muted); font-size: 12px; line-height: 1.7; }

.timeline { max-width: 820px; margin-left: 10px; border-left: 1px solid var(--line); border-top: 0; }
.timeline-item { position: relative; display: grid; grid-template-columns: 155px 1fr; gap: 30px; padding: 0 0 34px 28px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { position: absolute; top: 6px; left: -4px; width: 7px; height: 7px; border-radius: 50%; background: var(--dusty); box-shadow: 0 0 0 5px var(--dusty-soft); content: ""; }
.timeline-date { color: var(--dusty-deep); font: 400 11px/1.6 var(--mono); }
.timeline-item h3 { margin: 0; font-size: 16px; font-weight: 600; }
.timeline-item p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.certificate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.certificate-image-link { display: grid; min-height: 220px; aspect-ratio: 1.5; place-items: center; overflow: hidden; background: var(--surface-strong); }
.certificate-image { width: 100%; height: 100%; object-fit: contain; transition: transform .3s ease; }
.certificate-image-link:hover .certificate-image { transform: scale(1.025); }
.certificate-caption { padding: 16px 18px 18px; border-top: 1px solid var(--line); }
.certificate-caption h3 { font-size: 16px; }
.certificate-caption p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.certificate-date { display: block; margin-top: 12px; letter-spacing: .08em; text-transform: uppercase; }

.contact-panel { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 35px; }
.contact-panel h2 { max-width: 680px; margin: 0; font-family: var(--serif); font-size: clamp(45px, 6vw, 76px); font-weight: 600; letter-spacing: -.06em; line-height: .98; }
.contact-panel h2 span { color: var(--dusty-deep); }
.contact-panel > div:first-child > p:last-child { max-width: 460px; margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.contact-links { display: grid; min-width: min(100%, 285px); }
.contact-link { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.contact-link span:last-child { color: var(--dusty-deep); }
.contact-link:hover span:last-child { text-decoration: underline; text-underline-offset: 4px; }
footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; min-height: 80px; align-items: center; justify-content: space-between; gap: 20px; color: var(--faint); font: 400 10px var(--mono); }
.footer-inner .brand { color: var(--text); font: 600 12px var(--sans); }
.social-link { transition: color .2s ease, transform .2s ease; }

[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .65s ease, transform .65s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* Kursor desktop: ring tipis + titik aksen agar selaras dengan dusty blue. */
.custom-cursor {
  display: block;
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  border: 1px solid var(--dusty-deep);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0);
  transition: width .28s cubic-bezier(.16, 1, .3, 1), height .28s cubic-bezier(.16, 1, .3, 1), opacity .2s ease, border-color .25s ease, background-color .25s ease;
}
.custom-cursor::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--dusty-deep);
  content: "";
  transform: translate(-50%, -50%);
  transition: transform .28s cubic-bezier(.16, 1, .3, 1), background-color .25s ease;
}
.custom-cursor.is-visible { opacity: 1; }
.custom-cursor.is-hovering {
  width: 46px;
  height: 46px;
  border-color: var(--dusty);
  background: color-mix(in srgb, var(--dusty-soft) 58%, transparent);
}
.custom-cursor.is-hovering::after {
  background: var(--dusty-deep);
  transform: translate(-50%, -50%) scale(1.5);
}

/* Softer editorial finish */
body {
  background:
    radial-gradient(ellipse at 84% 8%, color-mix(in srgb, var(--dusty-soft) 46%, transparent), transparent 28rem),
    var(--bg);
}
.wrap { width: min(1120px, calc(100% - 56px)); }
.nav { min-height: 82px; }
.brand-mark { border-radius: 50%; background: var(--dusty-soft); color: var(--dusty-deep); }
.nav-links { gap: 23px; font-size: 12px; }
.nav-cta { background: transparent; }
.hero { padding: 104px 0 118px; }
.hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(270px, .8fr); gap: 80px; }
.hero h1 { max-width: 720px; font-size: clamp(62px, 8.4vw, 104px); line-height: .88; letter-spacing: -.065em; }
.hero h1 .name-line { color: var(--text); }
.hero h1 { color: var(--dusty-deep); }
.hero-subtitle { max-width: 410px; margin-top: 22px; }
.type-line { color: var(--dusty-deep); }
.button { border-radius: 999px; }
.button-primary { box-shadow: 0 8px 20px color-mix(in srgb, var(--dusty) 22%, transparent); }
.avatar-wrap { width: min(100%, 335px); }
.avatar-placeholder {
  border-radius: 24px;
  box-shadow: 12px 12px 0 var(--dusty-soft), 0 24px 52px var(--shadow);
}
.section { padding-block: 88px; }
.section-heading { margin-bottom: 34px; }
.section-heading h2 { font-size: clamp(42px, 5vw, 60px); }
.about-grid { grid-template-columns: .82fr 1.18fr; gap: 88px; }
.about-facts { padding-top: 4px; }
.fact { padding-block: 12px; }
.about-copy p { font-size: 15px; }
.skill-group { padding-top: 19px; }
.project-card, .certificate-item {
  border-radius: 20px;
  border-color: color-mix(in srgb, var(--line) 78%, var(--dusty-soft));
}
.project-art {
  min-height: 245px;
  background-image:
    linear-gradient(color-mix(in srgb, var(--dusty) 11%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--dusty) 11%, transparent) 1px, transparent 1px);
  background-color: var(--surface-strong);
}
.terminal { border-radius: 13px; }
.certificate-image-link { background: color-mix(in srgb, var(--surface-strong) 60%, var(--bg)); }
.contact-panel h2 { font-size: clamp(43px, 5.4vw, 68px); }
.footer-inner { font-size: 11px; }

@media (max-width: 760px) {
  .wrap { width: min(100% - 40px, 560px); }
  .hero { padding: 72px 0 88px; }
  .hero-grid { gap: 34px; }
  .hero h1 { font-size: clamp(60px, 15vw, 88px); }
  .avatar-wrap { width: min(100%, 320px); }
  .avatar-placeholder { box-shadow: 9px 9px 0 var(--dusty-soft), 0 18px 40px var(--shadow); }
  .section { padding-block: 72px; }
  .about-grid { gap: 36px; }
  .section-heading h2 { font-size: 49px; }
}
@media (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body.has-custom-cursor, body.has-custom-cursor a, body.has-custom-cursor button { cursor: none; }
}

@media (max-width: 760px) {
  .wrap { width: min(100% - 40px, 560px); }
  .nav { min-height: 70px; }
  .menu-toggle { display: inline-grid; }
  .nav-links { position: absolute; top: 69px; right: 0; left: 0; display: none; align-items: stretch; gap: 0; padding: 10px 20px 20px; border-bottom: 1px solid var(--line); background: var(--bg); }
  .nav-links.is-open { display: flex; flex-direction: column; }
  .nav-links > a:not(.nav-cta) { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .nav-cta { justify-content: space-between; margin-top: 14px; }
  .theme-toggle { display: none; }
  .hero { padding: 62px 0 82px; }
  .hero-grid, .about-grid, .contact-panel { grid-template-columns: 1fr; gap: 30px; }
  .hero h1 { font-size: clamp(64px, 17vw, 102px); }
  .hero-copy { max-width: 440px; }
  .avatar-wrap { width: min(100%, 360px); justify-self: start; }
  .avatar-placeholder { box-shadow: 14px 14px 0 var(--dusty-soft), 0 18px 40px var(--shadow); }
  .section { padding-block: 76px; }
  .section-heading { align-items: start; flex-direction: column; gap: 14px; margin-bottom: 28px; }
  .section-heading h2 { font-size: 52px; }
  .skills-grid, .project-grid, .certificate-grid { grid-template-columns: 1fr; }
  .project-grid { gap: 18px; }
  .timeline-item { grid-template-columns: 1fr; gap: 5px; padding-left: 22px; }
  .contact-panel h2 { font-size: clamp(46px, 13vw, 70px); }
  .contact-links { min-width: 100%; }
  .footer-inner { min-height: 105px; flex-wrap: wrap; padding-block: 18px; }
  .footer-inner > span { order: 3; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .custom-cursor { display: none; }
}
