/* en.bayusetiawan.com — monochrome, no-build stylesheet
   Palette: pure black / white / greys only. No accent color. */

:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #595959;
  --faint: #595959;
  --line: #e6e6e6;
  --line-strong: #d0d0d0;
  --panel: #f7f7f7;
  --code-bg: #f2f2f2;

  --measure: 42rem;      /* reading width */
  --wide: 46rem;         /* list width */
  --radius: 10px;
  --gap: 1.5rem;
  --pad: 1.5rem;         /* horizontal page gutter (24px, mobile-safe) */

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --fg: #ececec;
    --muted: #9c9c9c;
    --faint: #9c9c9c;
    --line: #2a2a2a;
    --line-strong: #3a3a3a;
    --panel: #181818;
    --code-bg: #1c1c1c;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  width: 100%; max-width: var(--wide); margin: 0 auto;
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
}
.wrap-narrow {
  width: 100%; max-width: var(--measure); margin: 0 auto;
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

/* ---------- skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--fg); color: var(--bg);
  padding: .6rem 1rem; border-radius: 0 0 var(--radius) 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(8px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 66px;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; letter-spacing: -.01em; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--fg); color: var(--bg); font-size: .95rem; font-weight: 700;
}
.brand-name { font-size: 1.05rem; }
.nav { display: flex; gap: 1.25rem; font-size: .94rem; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--fg); }

/* ---------- hero ---------- */
.hero { padding-block: 3.25rem 1.75rem; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .14em;
  font-size: .72rem; color: var(--faint); margin: 0 0 .6rem;
}
.hero-title {
  margin: 0; font-size: clamp(2.1rem, 6vw, 3.1rem);
  line-height: 1.05; letter-spacing: -.025em; font-weight: 800;
}
.hero-lead { margin: 1rem 0 0; color: var(--muted); font-size: 1.15rem; max-width: 34rem; }

/* ---------- list ---------- */
.list-section { padding-block: 1.75rem 3.5rem; }
.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.post-item { border-bottom: 1px solid var(--line); }
.post-item article { padding: 1.6rem 0; }
.post-date {
  margin: 0 0 .4rem; font-size: .78rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint);
}
.post-title { margin: 0 0 .5rem; font-size: 1.5rem; line-height: 1.25; letter-spacing: -.015em; font-weight: 700; }
.post-title a { background-image: none; }
.post-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.post-excerpt { margin: 0 0 .8rem; color: var(--muted); }
.post-more { font-size: .9rem; color: var(--fg); font-weight: 600; }
.post-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.empty { color: var(--muted); padding: 1rem 0; }

/* ---------- article ---------- */
.post { padding-block: 2.75rem 3rem; max-width: var(--measure); }
.post-head { margin-bottom: 1.75rem; }
.post-h1 {
  margin: 0 0 .7rem; font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.12; letter-spacing: -.025em; font-weight: 800;
}
.post-head .post-date {
  margin: 0 0 .85rem; font-size: .78rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint);
}
.post-head .post-date time { color: inherit; }
.post-dek {
  margin: 0;
  padding-left: .85rem;
  border-left: 3px solid var(--line-strong);
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.55;
  font-style: italic;
  letter-spacing: .002em;
}
.post-back { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .95rem; }

/* ---------- prose ---------- */
.prose { font-size: 1.075rem; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.15rem; }
.prose h2 {
  font-size: 1.45rem; line-height: 1.25; letter-spacing: -.015em;
  margin-top: 2.4rem; margin-bottom: .6rem; font-weight: 700;
}
.prose h3 { font-size: 1.18rem; margin-top: 1.9rem; margin-bottom: .5rem; font-weight: 700; }
.prose p { margin: 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }
.prose a:hover { text-decoration-color: var(--fg); }
.prose ul, .prose ol { margin: 0; padding-left: 1.3rem; }
.prose li { margin: .35rem 0; }
.prose li::marker { color: var(--faint); }
.prose blockquote {
  margin: 1.5rem 0; padding: .4rem 0 .4rem 1.2rem;
  border-left: 3px solid var(--line-strong); color: var(--muted);
  font-style: italic;
}
.prose blockquote p { margin: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2rem 0; }
.prose code {
  font-family: var(--mono); font-size: .88em;
  background: var(--code-bg); padding: .15em .4em; border-radius: 5px;
}
.prose pre {
  background: var(--code-bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.1rem; overflow-x: auto;
  line-height: 1.55;
}
.prose pre code { background: none; padding: 0; font-size: .85rem; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.prose table { border-collapse: collapse; width: 100%; min-width: 760px; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: .55rem .75rem; text-align: left; white-space: nowrap; }
.prose th { background: var(--panel); font-weight: 600; }
.prose ul ul, .prose ol ol, .prose ul ol, .prose ol ul { margin: .35rem 0 .35rem 0; }
.prose img {
  max-width: 100%; height: auto; margin: 1.6rem 0;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--panel);
}

/* ---------- pages ---------- */
.page { padding-block: 2.75rem 3rem; }
.page-title {
  margin: 0 0 1.5rem; font-size: clamp(1.9rem, 5vw, 2.5rem);
  line-height: 1.12; letter-spacing: -.025em; font-weight: 800;
}
.email-line { margin: 1.4rem 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: .6rem 1.05rem; border-radius: 999px;
  background: var(--fg); color: var(--bg); font-size: .92rem; font-weight: 600;
  border: 1px solid var(--fg);
}
.btn:hover { text-decoration: none; opacity: .85; }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--fg); opacity: 1; }
/* buttons must never show an underline on their text, even inside .prose */
.btn, .btn:visited, .btn:hover, .btn:focus, .btn:active,
.btn-ghost, .btn-ghost:visited, .btn-ghost:hover, .btn-ghost:focus, .btn-ghost:active,
.prose .btn, .prose .btn:visited, .prose .btn:hover, .prose .btn:focus, .prose .btn:active,
.prose .btn-ghost, .prose .btn-ghost:visited, .prose .btn-ghost:hover, .prose .btn-ghost:focus, .prose .btn-ghost:active {
  text-decoration: none;
}
.prose a.btn, .prose a.btn-ghost { text-decoration: none; }

/* ---------- 404 ---------- */
.notfound { padding-block: 5rem 6rem; text-align: center; }
.nf-code { font-size: clamp(3.5rem, 14vw, 6rem); font-weight: 800; letter-spacing: -.04em; margin: 0; color: var(--line-strong); }
.nf-title { font-size: clamp(1.5rem, 5vw, 2rem); margin: .2rem 0 .8rem; letter-spacing: -.02em; }
.nf-text { color: var(--muted); margin: 0 auto 1.8rem; max-width: 30rem; }
.nf-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 2rem; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; font-size: .88rem; color: var(--muted);
  padding-top: 1.6rem; padding-bottom: 1.6rem;
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
}
.foot-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--fg); }
.copy { margin: 0; }
.muted { color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .hero { padding-block: 2.25rem 1.25rem; }
  .header-inner { min-height: 60px; }
  .nav { gap: .9rem; font-size: .9rem; }
  .brand-name { display: none; }
  .post-title { font-size: 1.3rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* very narrow phones: keep at least 20px gutters without cramping */
@media (max-width: 360px) {
  :root { --pad: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}


/* Latest posts list on article page (monochrome) */
.more-posts{margin:3rem 0 0;padding:1.75rem 0 0;border-top:1px solid rgba(128,128,128,.3)}
.more-posts-title{font-size:.8rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;opacity:.6;margin:0 0 1rem}
.more-posts-list{list-style:none;margin:0;padding:0}
.more-posts-item{display:flex;flex-wrap:wrap;align-items:baseline;gap:.1rem .75rem;padding:.7rem 0;border-bottom:1px solid rgba(128,128,128,.2)}
.more-posts-item:last-child{border-bottom:0}
.more-posts-link{color:inherit;text-decoration:none;font-size:1rem;line-height:1.4}
.more-posts-link:hover{text-decoration:underline}
.more-posts-date{font-size:.78rem;color:var(--faint);white-space:nowrap}
@media (max-width:480px){.more-posts{margin-top:2.25rem}.more-posts-item{padding:.6rem 0}}
