/* Senja — Ghost theme */
:root {
  --paper: #fbf9f4;
  --surface: #f2efe4;
  --card: #f2efe4;
  --ink: #2a2922;
  --mute: #6f6a55;
  --line: #e4dfcf;
  --pill: #e6e2d1;
  --field: #fff;
  --accent: #5b5d46;
  --btn: var(--accent);
  --font-head: var(--gh-font-heading, "Newsreader", Georgia, "Times New Roman", serif);
  --font-body: var(--gh-font-body, "Instrument Sans", "Segoe UI", system-ui, sans-serif);
  --pad: clamp(1.1rem, 4vw, 2.5rem);
  --max: 1180px;
  --measure: 38rem;
  --r-lg: 18px;
  --r-md: 12px;
}
[data-mode="dark"] {
  --paper: #151510;
  --surface: #1c1c16;
  --card: #22221b;
  --ink: #ece8d8;
  --mute: #a39e88;
  --line: #34332a;
  --pill: #32322a;
  --field: var(--card);
  --btn: color-mix(in srgb, var(--accent) 85%, #fff);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .18em; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 500; line-height: 1.12; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
p { margin: 0; }
.wrap { width: min(100% - 2 * var(--pad), var(--max)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--ink); color: var(--paper); padding: .5rem 1rem; border-radius: 999px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: .7rem 1.5rem; border: 0; border-radius: 999px; background: var(--btn); color: #fff; font: 500 .9rem var(--font-body); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .7; cursor: wait; }
.btn-sm { padding: .5rem 1.1rem; font-size: .8rem; }
.btn-block { width: 100%; padding: .85rem 1.5rem; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.icon-btn:hover { background: var(--pill); }

/* Header: floating pill */
/* tinggi 0 + relative: pill melayang di atas hero, tapi posisinya tepat di bawah announcement bar */
.site-header { position: relative; height: 0; z-index: 30; }
.header-wrap { position: relative; padding-top: 1rem; }
.bar { display: flex; align-items: center; gap: 1.5rem; padding: .5rem .55rem .5rem 1.25rem; background: color-mix(in srgb, var(--paper) 94%, transparent); border-radius: 999px; box-shadow: 0 8px 24px -12px rgba(0, 0, 0, .28); backdrop-filter: blur(10px); }
.brand { font: 500 1.5rem/1 var(--font-head); letter-spacing: -.01em; text-decoration: none; }
.brand-logo { max-height: 2rem; width: auto; }
.logo-dark { display: none; }
[data-mode="dark"] .logo-dark { display: block; }
[data-mode="dark"] .logo-light { display: none; }
.nav { flex: 1; display: flex; justify-content: center; }
.nav-list { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; font: 500 .8rem var(--font-body); }
.nav-list a { text-decoration: none; opacity: .8; }
.nav-list a:hover, .nav-current a { opacity: 1; }
.nav-current a { text-decoration: underline; text-underline-offset: .35em; }
.tools { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.link-signin { font: 500 .8rem var(--font-body); text-decoration: none; padding: 0 .4rem; }
.menu-btn { display: none; }
.mode-toggle .ico-sun { display: none; }
[data-mode="dark"] .mode-toggle .ico-sun { display: block; }
[data-mode="dark"] .mode-toggle .ico-moon { display: none; }
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: calc(100% + .5rem); background: var(--paper); border-radius: 24px; padding: 1rem 1.5rem 1.25rem; box-shadow: 0 16px 32px -16px rgba(0, 0, 0, .35); }
  .menu-open .nav { display: block; }
  .nav-list { flex-direction: column; gap: .8rem; font-size: 1rem; }
}
@media (max-width: 560px) { .link-signin { display: none; } }

/* Home hero */
.hero { position: relative; display: flex; align-items: flex-end; min-height: clamp(30rem, 70vh, 46rem); background: #4b4d39; color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(18, 18, 10, .66), rgba(18, 18, 10, .1) 58%); }
.hero-inner { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; padding-bottom: clamp(1.75rem, 4vw, 3rem); padding-top: 7rem; }
.hero h1 { font-size: clamp(2.5rem, 6.4vw, 4.75rem); line-height: .98; letter-spacing: -.02em; max-width: 12ch; text-shadow: 0 2px 24px rgba(0, 0, 0, .25); }
.hero-side { flex: 0 0 min(100%, 21rem); display: flex; flex-direction: column; gap: 1.1rem; text-align: right; font-size: .95rem; line-height: 1.45; }
.hero-side p { text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.hero-side .hero-note { margin-top: -.5rem; font-size: .8rem; opacity: .85; }
@media (max-width: 760px) {
  .hero-inner { flex-direction: column; align-items: flex-start; }
  .hero-side { flex-basis: auto; width: 100%; text-align: left; }
}

/* Sections */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-surface { background: var(--surface); }
.section-surface .card { background: var(--paper); }
.section-surface .pill { background: var(--pill); }

/* Carousel */
.carousel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.carousel-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.2rem); font-weight: 400; }
.car-nav { display: flex; gap: .5rem; flex: none; }
.car-nav button { width: 2.25rem; height: 2.25rem; border: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; background: var(--ink); color: var(--paper); }
.car-nav button:disabled { background: var(--pill); color: var(--mute); cursor: default; }
.carousel-track { display: flex; gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.carousel-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 calc((100% - 3rem) / 3); scroll-snap-align: start; display: flex; min-width: 0; }
.slide .card { width: 100%; }
.dots { display: flex; justify-content: center; gap: .45rem; margin-top: 1.75rem; min-height: 6px; }
.dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; }
.dots button[aria-current="true"] { background: var(--ink); }
@media (max-width: 900px) { .slide { flex-basis: calc((100% - 1.5rem) / 2); } }
@media (max-width: 600px) { .slide { flex-basis: 85%; } .carousel-track { gap: 1rem; } }

/* Cards */
.card { display: flex; flex-direction: column; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px; }
.card-media { position: relative; display: block; aspect-ratio: 8 / 5; border-radius: var(--r-md); overflow: hidden; background: var(--pill); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.lock { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); width: 1.9rem; height: 1.9rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .28); color: #fff; backdrop-filter: blur(6px); }
.card-body { display: flex; flex-direction: column; align-items: flex-start; gap: .7rem; padding: 1rem .75rem .85rem; flex: 1; }
.pill { display: inline-block; padding: .2rem .8rem; border-radius: 999px; background: var(--pill); color: var(--mute); font: 500 .72rem var(--font-body); text-decoration: none; }
a.pill:hover { color: var(--ink); }
.card-title { font-size: 1.3rem; line-height: 1.22; font-weight: 500; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; text-underline-offset: .2em; }
.card-excerpt { color: var(--mute); font-size: .88rem; line-height: 1.6; }
.card-date { margin-top: auto; padding-top: .25rem; color: var(--mute); font-size: .75rem; }

.card--text .card-body { padding-top: .85rem; }
.lock-inline { display: inline-flex; color: var(--mute); }

/* Lists & load more */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2rem clamp(1.5rem, 4vw, 3rem); }
.split-title { font-size: clamp(1.7rem, 3.4vw, 2.2rem); font-weight: 400; position: sticky; top: 6.5rem; align-self: start; max-width: 12ch; }
.list { display: grid; gap: 1.75rem; }
.list--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.list--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.more-wrap { display: flex; justify-content: center; margin-top: 2.5rem; }
@media (max-width: 900px) { .list--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .split { grid-template-columns: minmax(0, 1fr); } .split-title { position: static; max-width: none; } }
@media (max-width: 600px) { .list--2, .list--3 { grid-template-columns: minmax(0, 1fr); } }
.pagination { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; font-size: .9rem; }

/* Archive heads */
.page-pad { padding-top: 7rem; }
.page-head { padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(1.75rem, 3vw, 2.5rem); }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 400; }
.page-desc { max-width: 38rem; color: var(--mute); font-size: 1.05rem; margin-top: .9rem; }
.page-count { color: var(--mute); font-size: .85rem; margin-top: .7rem; }
.author-head { display: flex; gap: 1.5rem; align-items: center; }
.avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex: none; }

/* Post hero */
.post-hero { position: relative; display: flex; align-items: flex-end; min-height: clamp(19rem, 30vw, 26rem); background: #4b4d39; color: #fff; overflow: hidden; }
.post-hero-bg { position: absolute; inset: -24px; width: calc(100% + 48px); height: calc(100% + 48px); max-width: none; object-fit: cover; filter: blur(18px) saturate(1.05); }
.post-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(18, 18, 10, .62), rgba(18, 18, 10, .32)); }
.post-hero-inner { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; padding-top: 7rem; padding-bottom: 1.75rem; }
.ph-left { display: flex; flex-direction: column; align-items: flex-start; gap: .9rem; max-width: 34rem; }
.ph-left h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.02; letter-spacing: -.02em; }
.pill-glass { background: rgba(255, 255, 255, .22); color: #fff; backdrop-filter: blur(6px); }
a.pill-glass:hover { color: #fff; background: rgba(255, 255, 255, .34); }
.ph-right { display: flex; flex-direction: column; align-items: flex-end; gap: 1rem; max-width: 30rem; text-align: right; font-size: .95rem; line-height: 1.45; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.author-chip { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; text-align: right; }
.author-chip img { width: 2.4rem; height: 2.4rem; border-radius: 50%; object-fit: cover; }
.author-chip span { display: flex; flex-direction: column; line-height: 1.25; }
.author-chip strong { font: 500 .95rem var(--font-head); }
.author-chip time { font-size: .72rem; opacity: .85; }
@media (max-width: 760px) {
  .post-hero-inner { flex-direction: column; align-items: flex-start; }
  .ph-right { align-items: flex-start; text-align: left; max-width: none; }
}
.plain-head { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; max-width: calc(var(--measure) + 4rem); padding-bottom: 1.5rem; }
.plain-head h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.05; }
.lede { font-size: 1.15rem; color: var(--mute); }
.byline { font-size: .85rem; color: var(--mute); }

/* Post body */
.post-article { --wide: 68rem; display: grid; grid-template-columns: [full-start] minmax(var(--pad), auto) [wide-start] minmax(auto, calc((var(--wide) - var(--measure)) / 2)) [main-start] min(var(--measure), calc(100% - 2 * var(--pad))) [main-end] minmax(auto, calc((var(--wide) - var(--measure)) / 2)) [wide-end] minmax(var(--pad), auto) [full-end]; padding-top: clamp(2rem, 5vw, 3.5rem); }
.post-article > * { grid-column: main-start / main-end; min-width: 0; }
.post-article > .post-image { grid-column: wide-start / wide-end; margin: 0 0 2.5rem; }
.post-image img { width: 100%; border-radius: var(--r-lg); }
.post-image figcaption { margin-top: .6rem; font-size: .78rem; color: var(--mute); text-align: center; }
.gh-content { display: contents; font-size: 1.0625rem; line-height: 1.7; }
.gh-content > * { grid-column: main-start / main-end; min-width: 0; margin: 0 0 1.4rem; }
.gh-content > .kg-width-wide { grid-column: wide-start / wide-end; }
.gh-content > .kg-width-full { grid-column: full-start / full-end; }
.gh-content > .kg-width-full img { width: 100%; }
.gh-content h2 { font-size: 1.85rem; margin-top: 2.4rem; font-weight: 500; }
.gh-content h3 { font-size: 1.45rem; margin-top: 2rem; }
.gh-content h4 { font-size: 1.2rem; margin-top: 1.6rem; }
.gh-content a { text-decoration-thickness: 1px; }
.gh-content blockquote { margin-left: 0; padding-left: 1.2rem; border-left: 1px solid var(--ink); font-style: italic; }
.gh-content blockquote.kg-blockquote-alt { border: 0; padding: 0; text-align: center; font: italic 500 clamp(1.6rem, 3.4vw, 2.2rem) / 1.2 var(--font-head); margin-block: 2rem; }
.gh-content ul, .gh-content ol { padding-left: 1.4rem; }
.gh-content li + li { margin-top: .4rem; }
.gh-content hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.5rem; }
.gh-content img { border-radius: var(--r-md); }
.gh-content figcaption { margin-top: .6rem; font-size: .78rem; color: var(--mute); text-align: center; }
.gh-content pre { overflow-x: auto; padding: 1rem 1.2rem; background: var(--surface); border-radius: var(--r-md); font-size: .9rem; line-height: 1.5; }
.gh-content :not(pre) > code { background: var(--surface); padding: .1em .35em; border-radius: 4px; font-size: .92em; }
.gh-content iframe { max-width: 100%; }
.gh-content .kg-btn { border-radius: 999px; }
.has-dropcap .gh-content > p:first-child::first-letter { float: left; font: 500 4.4em / .82 var(--font-head); padding: .06em .12em 0 0; }
.post-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; padding: 2.5rem 0 4rem; }
.foot-label { font-size: 1.1rem; font-weight: 500; margin-bottom: .9rem; }
.taglist { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.taglist a { display: block; padding: .45rem 1.1rem; border-radius: 999px; background: var(--pill); font-size: .85rem; text-decoration: none; }
.taglist a:hover { background: var(--ink); color: var(--paper); }
.share { display: flex; gap: .6rem; }
.share a, .share button { width: 2.25rem; height: 2.25rem; border: 0; border-radius: 50%; background: var(--pill); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font: 600 .8rem var(--font-body); text-decoration: none; cursor: pointer; }
.share a:hover, .share button:hover, .share .is-done { background: var(--ink); color: var(--paper); }
.post-comments { padding-bottom: 3rem; }
@media (max-width: 520px) { .post-foot { grid-template-columns: minmax(0, 1fr); } }

/* Footer */
.site-footer { margin-top: clamp(3.5rem, 8vw, 6rem); padding: clamp(3rem, 7vw, 5rem) 0 2rem; border-top: 1px solid var(--line); }
.foot-top { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, .7fr) minmax(0, .6fr); gap: 2.5rem; }
.foot-brand { font: 500 1.6rem var(--font-head); }
.foot-desc { color: var(--mute); max-width: 24rem; margin: .9rem 0 1.5rem; font-size: .95rem; }
.foot-about .btn { max-width: 24rem; }
.foot-heading { font: 500 1.15rem var(--font-head); margin-bottom: 1rem; }
.foot-col .nav-list, .foot-links { flex-direction: column; gap: .7rem; list-style: none; margin: 0; padding: 0; display: flex; font-size: .85rem; }
.foot-col .nav-list a, .foot-links a { text-decoration: none; opacity: .85; }
.foot-col .nav-list a:hover, .foot-links a:hover { opacity: 1; text-decoration: underline; }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--mute); font-size: .8rem; }
.mode-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--pill); }
.mode-switch button { width: 1.8rem; height: 1.8rem; border: 0; border-radius: 50%; background: transparent; color: var(--mute); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
[data-mode="light"] [data-mode-set="light"], [data-mode="dark"] [data-mode-set="dark"] { background: var(--paper); color: var(--ink); }
@media (max-width: 760px) { .foot-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-about { grid-column: 1 / -1; } }

/* Subscribe form */
.sub-form { max-width: 24rem; }
.sub-field { display: flex; align-items: center; gap: .5rem; padding: .3rem .3rem .3rem 1.25rem; background: var(--field); border: 1px solid var(--line); border-radius: 999px; }
.sub-field:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.sub-input { flex: 1; min-width: 0; padding: .6rem 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 400 .9rem var(--font-body); }
.sub-input::placeholder { color: var(--mute); }
.sub-field .btn { padding: .65rem 1.3rem; }
.sub-form.loading .btn { opacity: .7; pointer-events: none; }
.sub-note, .sub-msg { margin-top: .75rem; padding-left: .25rem; color: var(--mute); font-size: .78rem; }
.sub-msg { display: none; }
.sub-form.success .sub-msg--ok, .sub-form.error .sub-msg--err { display: block; }
.sub-form.success .sub-note, .sub-form.error .sub-note { display: none; }
.sub-form.error .sub-msg--err { color: #b3261e; }
[data-mode="dark"] .sub-form.error .sub-msg--err { color: #f2b8b5; }

/* Archive head (tag / author) */
.archive-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(2rem, 4vw, 3rem); }
.archive-id { display: flex; align-items: center; gap: 1.1rem; min-width: 0; }
.archive-avatar { width: 5.5rem; height: 5.5rem; border-radius: var(--r-md); object-fit: cover; flex: none; }
.archive-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.4rem); font-weight: 400; }
.archive-count { margin-left: .15em; font: 400 .4em var(--font-body); color: var(--mute); vertical-align: super; }
.archive-social { display: flex; align-items: center; gap: .85rem; list-style: none; margin: .7rem 0 0; padding: 0; }
.archive-social a, .archive-loc { display: inline-flex; color: var(--ink); opacity: .85; }
.archive-social a:hover { opacity: 1; }
.archive-desc { max-width: 28rem; margin-left: auto; text-align: right; color: var(--mute); font-size: .9rem; line-height: 1.6; }
@media (max-width: 760px) {
  .archive-head { flex-direction: column; gap: 1.25rem; }
  .archive-desc { margin-left: 0; text-align: left; }
}

/* Error */
.error-page { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; padding-bottom: 6rem; }
.error-code { font: 400 clamp(4rem, 14vw, 9rem) / 1 var(--font-head); color: var(--mute); }
.error-page h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.error-page .btn { margin-top: .75rem; }

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