/* Yayasan Solusi Riset Edukasi (SORE)
   Standalone stylesheet. Deliberately not shared with the other site in this
   repo: the two are unrelated brands. */

:root {
  --green-900: #10371f;
  --green-800: #17512c;
  --green-700: #1e7a3e;
  --green-100: #dcece1;
  --clay: #a8542a;

  --bg: #fbfaf7;
  --bg-alt: #f3f1eb;
  --surface: #ffffff;
  --border: #e0dcd2;
  --border-strong: #c9c3b5;
  --text: #1d1c19;
  --text-muted: #5d5a52;
  --accent: var(--green-800);
  --accent-hover: var(--green-700);
  --on-accent: #ffffff;

  --wrap: 68rem;
  --measure: 38rem;
  --radius: 4px;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14150f;
    --bg-alt: #1c1e17;
    --surface: #1c1e17;
    --border: #32352b;
    --border-strong: #474b3d;
    --text: #eceade;
    --text-muted: #a9a698;
    --accent: #6ec48a;
    --accent-hover: #8ed8a5;
    --on-accent: #10371f;
    --green-100: #22301f;
  }
}

:root[data-theme="dark"] {
  --bg: #14150f;
  --bg-alt: #1c1e17;
  --surface: #1c1e17;
  --border: #32352b;
  --border-strong: #474b3d;
  --text: #eceade;
  --text-muted: #a9a698;
  --accent: #6ec48a;
  --accent-hover: #8ed8a5;
  --on-accent: #10371f;
  --green-100: #22301f;
}

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

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

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

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.011em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.35rem); }
h2 { font-size: clamp(1.55rem, 1.25rem + 1.3vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p, ul, ol { margin: 0 0 1.1em; }
p { max-width: var(--measure); }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }

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

strong { font-weight: 600; }

.muted { color: var(--text-muted); font-size: 0.9375rem; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Header ------------------------------------------------------------------ */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  padding-block: 0.75rem;
}

.brand-mark {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--accent);
}

.brand-sub {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.nav-toggle {
  display: none;
  font: inherit;
  font-size: 0.9rem;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  padding-block: 0.35rem;
  display: inline-block;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--text); }

.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

@media (max-width: 56rem) {
  .nav-toggle { display: block; }
  .site-nav {
    flex-basis: 100%;
    display: none;
    padding-bottom: 1rem;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding-block: 0.6rem; }
}

/* Sections ---------------------------------------------------------------- */

section { padding-block: clamp(3rem, 7vw, 5rem); }
section.tight { padding-block: clamp(2rem, 4vw, 3rem); }
section.alt { background: var(--bg-alt); }

.section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.lede {
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: var(--measure);
}

.prose > * { max-width: var(--measure); }
.prose h2 { margin-top: 2.25rem; }
.prose h3 { margin-top: 1.75rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.45em; }

/* Hero -------------------------------------------------------------------- */

.hero { padding-block: clamp(3.5rem, 9vw, 6.5rem); }

.hero h1 { max-width: 20ch; }

.hero-statement {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.55;
  max-width: 44ch;
  color: var(--text);
  margin-bottom: 1.75rem;
}

.hero-provenance {
  border-left: 3px solid var(--accent);
  padding-left: 1.1rem;
  max-width: 46ch;
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 2.25rem;
}

/* Buttons ----------------------------------------------------------------- */

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: transparent; border-color: var(--accent); color: var(--accent-hover); }

/* Cards ------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card h3 { margin-bottom: 0.4rem; }
.card p { font-size: 0.9375rem; color: var(--text-muted); margin-bottom: 0; max-width: none; }
.card .card-num {
  font-family: var(--serif);
  font-size: 0.8125rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.6rem;
}

/* Feature block ----------------------------------------------------------- */

.feature {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 52rem) {
  .feature { grid-template-columns: 1.15fr 1fr; gap: 3rem; }
}

.figure {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.figure img { width: 100%; }

.figure figcaption {
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  line-height: 1.45;
}

/* Facts strip ------------------------------------------------------------- */

.facts {
  display: grid;
  gap: 1.25rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  border-top: 1px solid var(--border);
  padding-top: 1.75rem;
}

.fact dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.fact dd {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.45;
}

/* Definition-style rows --------------------------------------------------- */

.rows { border-top: 1px solid var(--border); margin-top: 1.5rem; }

.row {
  display: grid;
  gap: 0.35rem 2rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 46rem) {
  .row { grid-template-columns: 13rem 1fr; }
}

.row dt { font-weight: 600; font-size: 0.9375rem; }
.row dd { margin: 0; color: var(--text-muted); font-size: 0.9375rem; }
.row dd p { max-width: none; margin-bottom: 0.5em; }
.row dd p:last-child { margin-bottom: 0; }

/* Department / workstream blocks ------------------------------------------ */

.block {
  border-top: 2px solid var(--accent);
  padding-top: 1.25rem;
  margin-bottom: 2.5rem;
}

.block-meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.status {
  display: inline-block;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--accent);
  border: 1px solid var(--border);
  vertical-align: 0.15em;
  margin-left: 0.5rem;
}

/* Timeline ---------------------------------------------------------------- */

.timeline { list-style: none; padding: 0; margin: 1.5rem 0 0; }

.timeline li {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 1.5rem;
  border-left: 1px solid var(--border-strong);
  margin-left: 0.4rem;
}

.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }

.timeline li::before {
  content: "";
  position: absolute;
  left: -0.3125rem;
  top: 0.45rem;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--accent);
}

.timeline h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.timeline p { font-size: 0.9375rem; color: var(--text-muted); margin-bottom: 0; }

/* People ------------------------------------------------------------------ */

.organ { margin-bottom: 3rem; }
.organ > h2 { margin-bottom: 0.25rem; }
.organ > .muted { margin-bottom: 1.5rem; }

.people {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}

.person {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.person .avatar {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 0.85rem;
  background: var(--bg-alt);
}

.person .avatar-placeholder {
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.75rem;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
}

.person h3 { font-size: 1.05rem; margin-bottom: 0.15rem; }
.person .role { font-size: 0.8125rem; color: var(--accent); font-weight: 600; margin-bottom: 0.5rem; }
.person p { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0; max-width: none; }

.person-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
}

/* Publications ------------------------------------------------------------ */

.pub-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border); }

.pub-item { border-bottom: 1px solid var(--border); padding-block: 1.5rem; }

.pub-meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.pub-item h2 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.pub-item h2 a { color: var(--text); text-decoration: none; }
.pub-item h2 a:hover { color: var(--accent); text-decoration: underline; }
.pub-item p { font-size: 0.9375rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.pub-authors { font-size: 0.875rem; color: var(--text-muted); }

.pub-header { border-bottom: 1px solid var(--border); padding-bottom: 1.75rem; margin-bottom: 2rem; }

/* Callouts ---------------------------------------------------------------- */

.callout {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-block: 1.75rem;
  max-width: var(--measure);
}

.callout p:last-child { margin-bottom: 0; }
.callout p { font-size: 0.9375rem; }

.callout.warn { border-left-color: var(--clay); }

/* CTA --------------------------------------------------------------------- */

.cta {
  background: var(--green-900);
  color: #f4f1e8;
}

.cta h2, .cta p { color: inherit; }
.cta .lede { color: #cfd8ce; }
.cta a { color: #a8e0ba; }

.cta .btn {
  background: #f4f1e8;
  border-color: #f4f1e8;
  color: var(--green-900);
}
.cta .btn:hover { background: #ffffff; border-color: #ffffff; color: var(--green-900); }

/* Footer ------------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding-top: 3rem;
  margin-top: 1rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  padding-bottom: 2rem;
}

.footer-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.footer-legal p { max-width: 34ch; }

.footer-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9375rem; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-block: 1.25rem;
}

.footer-bottom p { margin: 0; }

/* Tables ------------------------------------------------------------------ */

.table-scroll { overflow-x: auto; margin-block: 1.5rem; }

table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
th, td { text-align: left; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--border); }
th { font-weight: 600; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }

/* Placeholders ------------------------------------------------------------ */

/* Marks copy that is waiting on real content from the team. Deliberately
   visible so nothing ships unnoticed. */
.todo {
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 6px,
    rgba(168, 84, 42, 0.07) 6px,
    rgba(168, 84, 42, 0.07) 12px
  );
  border: 1px dashed var(--clay);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin-block: 1.25rem;
  max-width: var(--measure);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.todo::before {
  content: "Placeholder";
  display: block;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--clay);
  margin-bottom: 0.35rem;
}

.todo p { margin-bottom: 0; max-width: none; }

/* Caption awaiting confirmed details. Same signal, inline. */
.todo-caption {
  border-left: 3px solid var(--clay);
  font-style: italic;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
