:root {
  --bg: #f3f1ff;
  --surface: #ffffff;
  --surface-2: #e9e5ff;
  --ink: #1d1a3b;
  --muted: #5d5a80;
  --line: #d6d1f5;
  --accent: #5a3df0;
  --accent-ink: #ffffff;
  --pop: #ff7a59;
  --shadow: 0 18px 40px -22px rgba(60, 40, 160, .45);
  --font-head: 'Bricolage Grotesque', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
:root[data-theme="dark"] {
  --bg: #100f24;
  --surface: #1a1938;
  --surface-2: #262352;
  --ink: #efedff;
  --muted: #a9a5d3;
  --line: #34316a;
  --accent: #a999ff;
  --accent-ink: #15123a;
  --pop: #ff9275;
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, .8);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  transition: background .3s, color .3s;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; margin: 0; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--pop); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.label { color: var(--accent); font-weight: 700; font-size: .95rem; margin-bottom: .75rem; }
h2 { font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 800; max-width: 18ch; }
.lead { color: var(--muted); max-width: 52ch; margin-top: 1rem; }

/* Navigasi */
header.nav {
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.brand { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; text-decoration: none; }
.brand span { color: var(--accent); }
.menu { display: flex; align-items: center; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.menu a { text-decoration: none; font-weight: 500; font-size: .98rem; color: var(--muted); transition: color .2s; }
.menu a:hover { color: var(--ink); }
.menu a.pill { color: var(--accent-ink); background: var(--accent); padding: .45rem 1rem; border-radius: 999px; font-weight: 700; }
.tools { display: flex; align-items: center; gap: .6rem; }
.btn-icon {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  height: 42px; padding: 0 .9rem; border-radius: 999px; font: inherit; font-weight: 500; font-size: .92rem;
}
.btn-icon:hover { border-color: var(--accent); }
#burger { display: none; width: 42px; padding: 0; justify-content: center; }

/* Hero */
.hero { padding-top: clamp(2.5rem, 7vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.tag { display: inline-block; background: var(--surface-2); color: var(--accent); font-weight: 700; font-size: .9rem; padding: .4rem .9rem; border-radius: 999px; margin-bottom: 1.4rem; }
.hero h1 { font-size: clamp(2.6rem, 8.5vw, 5.4rem); font-weight: 800; }
.hero h1 em { font-style: normal; display: block; color: var(--accent); }
.hero p.lead { font-size: 1.15rem; margin-top: 1.5rem; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 700; padding: .85rem 1.5rem; border-radius: 999px; border: 2px solid var(--accent); transition: transform .2s, background .2s; }
.btn.fill { background: var(--accent); color: var(--accent-ink); }
.btn.line { color: var(--ink); border-color: var(--line); background: var(--surface); }
.btn:hover { transform: translateY(-2px); }

.photo { position: relative; width: min(100%, 400px); margin-inline: auto; animation: masuk .9s cubic-bezier(.2,.7,.2,1) both; }
.photo::before {
  content: ""; position: absolute; inset: 0; transform: translate(-16px, 16px);
  border: 2px solid var(--accent); border-radius: 999px 999px 28px 28px; z-index: 0;
}
.photo img {
  position: relative; z-index: 1; display: block; width: 100%; height: auto; aspect-ratio: 3 / 4;
  object-fit: cover; object-position: center 60%;
  border-radius: 999px 999px 28px 28px; box-shadow: var(--shadow); background: var(--surface-2);
}
.badge { position: absolute; z-index: 2; right: -4px; bottom: 28px; background: var(--pop); color: #26120c; font-family: var(--font-head); font-weight: 800; padding: .6rem 1.1rem; border-radius: 14px; box-shadow: var(--shadow); transform: rotate(-4deg); }
@keyframes masuk { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* Tentang */
.about { background: var(--surface); border-block: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(2rem, 6vw, 4rem); align-items: start; }
.about-grid p { color: var(--muted); max-width: 60ch; }
.about-grid h2 { margin-bottom: 1.4rem; }
.facts { margin: 0; display: grid; gap: .8rem; }
.facts div { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 1rem 1.2rem; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; }

/* Projek */
.projects { margin-top: 2.5rem; display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
.card {
  display: flex; flex-direction: column; gap: .6rem; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 1.6rem;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
a.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.card .kind { color: var(--accent); font-weight: 700; font-size: .9rem; }
.card h3 { font-size: 1.45rem; font-weight: 700; }
.card p { color: var(--muted); margin: 0; flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.chips span { background: var(--surface-2); color: var(--ink); font-size: .85rem; padding: .25rem .75rem; border-radius: 999px; }
.visit { color: var(--accent); font-weight: 700; margin-top: .4rem; }

/* Blog */
.blog { background: var(--surface); border-block: 1px solid var(--line); }
.blog-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; }
.empty { margin-top: 2rem; border: 2px dashed var(--line); border-radius: 24px; padding: 2.2rem 1.5rem; text-align: center; color: var(--muted); }
.more { color: var(--accent); font-weight: 700; text-decoration: none; }

/* Fokus belajar */
.focus-list { margin-top: 2.5rem; display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
.focus-list .card { background: var(--surface); }
.focus-list .dot { width: 44px; height: 44px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 1.3rem; margin-bottom: .4rem; }
.quote { background: var(--accent); color: var(--accent-ink); padding: clamp(3rem, 7vw, 5rem) 0; }
.quote blockquote { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: clamp(1.5rem, 4.6vw, 2.6rem); line-height: 1.2; max-width: 24ch; }
.quote .mark { font-family: var(--font-head); font-size: 4rem; line-height: .5; display: block; margin-bottom: 1rem; opacity: .6; }

/* Kontak */
.contact-list { margin-top: 2.2rem; display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
.contact-item { display: flex; align-items: center; gap: 1rem; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 1.3rem 1.5rem; transition: transform .2s, border-color .2s, box-shadow .2s; min-width: 0; }
.contact-item:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.contact-item .ic { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.contact-item small { display: block; color: var(--muted); font-size: .9rem; }
.contact-item strong { display: block; font-family: var(--font-head); font-size: 1.15rem; overflow-wrap: anywhere; }

footer { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; color: var(--muted); font-size: .95rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 1.5rem; }
footer a { text-decoration: none; }
footer a:hover { color: var(--accent); }

/* Responsif */
@media (max-width: 860px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .photo { order: -1; width: min(72%, 320px); margin-left: calc(50% - min(72%, 320px) / 2 + 8px); }
  .focus-list { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  #burger { display: inline-flex; }
  .btn-icon .txt { display: none; }
  #theme { width: 42px; padding: 0; justify-content: center; }
  .menu {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1rem;
    display: none;
  }
  .menu.open { display: flex; }
  .menu li a { display: block; padding: .8rem 0; font-size: 1.05rem; }
  .menu li a.pill { display: inline-block; margin-top: .4rem; }
  .menu li + li { border-top: 1px solid var(--line); }
  .projects, .contact-list { grid-template-columns: 1fr; }
  .contact-item { padding: 1.1rem 1.1rem; gap: .8rem; }
  .contact-item strong { font-size: clamp(.82rem, 3.7vw, 1.05rem); overflow-wrap: normal; }
  .actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
