:root {
  color-scheme: light;
  --bg: #f6f4ee;
  --surface: #fffefa;
  --ink: #202722;
  --muted: #4e5952;
  --line: #d9ddd5;
  --accent: #285a46;
  --accent-hover: #1f4636;
  --accent-soft: #e8eee8;
  --code-bg: #eef2ec;
  --code-ink: var(--ink);
  --code-comment: #66746a;
  --code-border: #cdd5cb;
  --quote-bg: #edf1e9;
  --code-pad: 20px;
  --measure: 68ch;
  --radius: 6px;
  --pill-radius: 999px;
  --motion: 160ms ease;
  --shadow-header: 0 1px 12px rgb(32 39 34 / 6%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.72 "Source Sans 3", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  transition: color var(--motion);
}
a:hover { color: var(--accent-hover); }
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.wrap { width: min(100% - 56px, 1120px); margin-inline: auto; }

/* Header sticky + blur. Fallback: latar solid --bg untuk browser tanpa backdrop-filter. */
.site {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  box-shadow: var(--shadow-header);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site {
    background: rgb(246 244 238 / 82%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}
.site .wrap {
  min-height: 94px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.site .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font: 600 25px/1 "Newsreader", Georgia, serif;
  letter-spacing: -.035em;
  text-decoration: none;
}
.site .brand::before {
  width: 12px;
  height: 12px;
  background: var(--accent);
  content: "";
  transform: rotate(45deg);
}
.site nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 38px); }
.site nav a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--motion);
}
.site nav a:hover { color: var(--ink); }
.site nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: .45em;
}

/* Hairline progres baca di bawah header; diam jika tidak didukung. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .site::after {
      position: absolute;
      left: 0;
      right: 0;
      bottom: -1px;
      height: 2px;
      background: var(--accent);
      content: "";
      transform: scaleX(0);
      transform-origin: 0 50%;
      animation: read-progress linear both;
      animation-timeline: scroll(root);
    }
  }
}
@keyframes read-progress { to { transform: scaleX(1); } }

main { flex: 1 0 auto; min-width: 0; padding: 74px 0 100px; }
h1, h2, h3 {
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  font-weight: 500;
}
h1 {
  margin: 0 0 18px;
  font-size: clamp(2.8rem, 7vw, 5rem);
  letter-spacing: -.045em;
  line-height: .99;
}
h2 {
  margin: 48px 0 14px;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  letter-spacing: -.025em;
  line-height: 1.16;
}
h3 { margin: 32px 0 10px; font-size: 1.45rem; }
p { margin: 0 0 20px; }
ul, ol { margin: 0 0 22px; padding-left: 1.4em; }
li { padding-left: .2em; margin: 6px 0; }
strong { font-weight: 700; }

.card { background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.home-intro {
  max-width: 760px;
  padding: 0 0 40px;
  border-bottom: 1px solid var(--line);
}
.home-intro h1 { max-width: 12ch; }
.home-main .home-intro h1 {
  font-size: clamp(3.25rem, 9vw, 6rem);
  letter-spacing: -.055em;
}
.lead {
  max-width: 54ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.posts {
  max-width: 940px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.posts li {
  position: relative;
  margin: 0;
  padding: 27px 0 27px 11rem;
  border-bottom: 1px solid var(--line);
}
.posts li::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 9.25rem;
  width: 1px;
  background: var(--accent);
  content: "";
}
.posts a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  color: var(--ink);
  text-decoration: none;
}
.posts a:hover .t { color: var(--accent); text-decoration: underline; text-underline-offset: .16em; }
.posts .t {
  font: 500 clamp(1.45rem, 2.5vw, 1.9rem)/1.2 "Newsreader", Georgia, serif;
  letter-spacing: -.025em;
  transition: color var(--motion);
}
.posts .d {
  position: absolute;
  top: 34px;
  left: 0;
  padding: 2px 10px;
  border-radius: var(--pill-radius);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: background-color var(--motion), color var(--motion);
}
.posts p { margin: 9px 0 0; color: var(--muted); font-size: 16px; }

.article {
  max-width: var(--measure);
  margin: 0 auto;
}
.article h1 {
  max-width: 18ch;
  margin-bottom: 20px;
  font-size: clamp(2.65rem, 6.2vw, 4.5rem);
  line-height: 1.02;
}
.article .meta {
  display: inline-block;
  margin: 0 0 24px;
  padding: 3px 12px;
  border-radius: var(--pill-radius);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .03em;
}
.article .lead {
  max-width: 60ch;
  padding: 0 0 32px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
}
.article h2 { margin-top: 48px; }
.article > p, .article > ul, .article > blockquote { max-width: var(--measure); }

code {
  padding: .12em .38em;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--ink);
  font: .84em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}
pre {
  margin: 26px 0;
  max-width: 100%;
  padding: var(--code-pad);
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-ink);
  -webkit-overflow-scrolling: touch;
}
pre code {
  display: block;
  min-width: max-content;
  padding: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font-size: 13.5px;
  line-height: 1.7;
  overflow-wrap: normal;
  white-space: pre;
}
pre .comment, pre .token.comment { color: var(--code-comment); }
blockquote {
  margin: 30px 0;
  padding: 20px 24px;
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--quote-bg);
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.55;
}
blockquote code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
hr { height: 1px; margin: 42px 0; border: 0; background: var(--line); }

.about { max-width: 68ch; margin-inline: auto; }
.about h1 { margin-bottom: 24px; }
.about .lead { margin-bottom: 26px; }
.about h2 { margin-top: 42px; }

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
footer .wrap { padding-top: 24px; padding-bottom: 36px; }
footer code { font-size: .82em; }

/* Nonaktifkan transisi bagi pengguna yang meminta reduced motion. */
@media (prefers-reduced-motion: reduce) {
  a, .site nav a, .posts .t, .posts .d { transition: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { width: min(100% - 36px, 1120px); }
  .site .wrap { min-height: 76px; gap: 12px; }
  .site .brand { gap: 9px; font-size: 22px; }
  .site .brand::before { width: 9px; height: 9px; }
  .site nav { gap: 16px; }
  .site nav a { font-size: 14px; }
  main { padding: 52px 0 72px; }
  h1 { font-size: clamp(2.65rem, 12vw, 4rem); }
  .home-intro { padding-bottom: 30px; }
  .posts { margin-top: 0; }
  .posts li { padding: 19px 0 21px; }
  .posts li::before { display: none; }
  .posts a { gap: 4px; }
  .posts .d { position: static; order: -1; font-size: 12px; }
  .posts p { margin-top: 8px; font-size: 15px; }
  .article h1 { font-size: clamp(2.6rem, 11vw, 4rem); }
  .article .lead { padding-bottom: 25px; }
  .article h2 { margin-top: 39px; }
  pre { margin: 22px -2px; --code-pad: 16px; }
  pre code { font-size: 12.5px; }
  blockquote { padding: 17px 18px; font-size: 1.12rem; }
}

@media (max-width: 380px) {
  .wrap { width: min(100% - 30px, 1120px); }
  .site .wrap { align-items: flex-start; flex-direction: column; justify-content: center; gap: 11px; padding-top: 12px; padding-bottom: 12px; }
  .site nav { padding-left: 18px; }
}
