:root {
  color-scheme: dark;
  --background: #08090a;
  --surface: #141719;
  --text: #f4f5f1;
  --muted: #b0b6b8;
  --line: #353a3e;
  --line-strong: #5b6268;
  --accent: #e4f222;
  --gutter: clamp(1rem, 5vw, 4rem);
  --header-h: 3.5rem;
}

* { box-sizing: border-box; }

html { scroll-padding-top: calc(var(--header-h) + 1rem); }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 1rem/1.65 system-ui, sans-serif;
}

h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  width: min(68rem, calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 20;
  top: .5rem;
  left: var(--gutter);
  padding: .5rem .75rem;
  background: var(--surface);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Header: sticky so LinkedIn is always one tap away */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--background) 92%, transparent);
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}
.site-name { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
/* Wordmark samuelpgt: hanya tipografi — "samuel" tipis, "pgt" tebal, rapat. */
.wordmark { font-size: 1.125rem; font-weight: 400; letter-spacing: -.04em; line-height: 1; }
.wordmark b { font-weight: 800; }
nav { display: flex; align-items: center; gap: 0 1.25rem; }
nav a { display: flex; align-items: center; min-height: 44px; color: var(--muted); }
nav .nav-cta {
  min-height: 34px;
  padding: 0 .75rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--text);
  text-decoration: none;
}
nav .nav-cta:hover { border-color: var(--accent); }

.label, .index, .dates, .status, .chip, .tool-meta {
  color: var(--muted);
  font: .8125rem/1.5 ui-monospace, monospace;
}

h1 {
  margin-block: .5rem 1rem;
  font-size: clamp(2.5rem, 6.2vw, 5rem);
  font-weight: 650;
  line-height: 1.03;
  letter-spacing: -.055em;
}
h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -.035em;
}
h3 { font-size: 1.0625rem; line-height: 1.4; }

/* Hero */
.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2.5rem, 6vw, 4.5rem); }
.intro { max-width: 52ch; font-size: 1.125rem; color: var(--muted); }
.career { max-width: 62ch; margin-top: 1rem; font-size: .9375rem; color: var(--muted); }
.career strong { color: var(--text); font-weight: 600; }

.proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2rem;
  border: 1px solid var(--line);
}
.proof li + li { border-left: 1px solid var(--line); }
.proof a {
  display: grid;
  gap: .25rem;
  height: 100%;
  padding: 1rem 1.125rem;
  text-decoration: none;
}
.proof a:hover { background: var(--surface); }
.proof a:hover strong { text-decoration: underline; }
.proof strong { font-weight: 650; line-height: 1.35; }
.proof span:last-child { color: var(--muted); font-size: .9375rem; line-height: 1.5; }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .55rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { border-color: var(--text); }
.button.primary { border-color: var(--accent); background: var(--accent); color: var(--background); }
.button.primary:hover { text-decoration: underline; }

/* Sections */
.section {
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line);
}
.case-study > h2 { margin-block: .4rem .9rem; max-width: 26ch; }
.case-intro { max-width: 62ch; color: var(--muted); }
.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  align-items: start;
  gap: clamp(1.5rem, 5vw, 4rem);
  margin-top: 2rem;
}

/* Case 01 */
.case-facts > div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: .25rem 1rem;
  padding-block: .9rem;
  border-top: 1px solid var(--line);
}
.case-facts dt { font: .8125rem/1.7 ui-monospace, monospace; color: var(--muted); }
.case-facts dd { line-height: 1.6; }

.journey { padding: 1.125rem; border: 1px solid var(--line); background: var(--surface); }
.journey-apps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: .75rem;
}
.journey-apps li {
  position: relative;
  padding: .6rem .7rem;
  border: 1px solid var(--line-strong);
  background: var(--background);
}
.journey-apps li + li::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  width: 1rem;
  border-top: 2px dotted var(--accent);
}
.journey-apps strong, .journey-apps span { display: block; }
.journey-apps strong { font-size: .875rem; }
.journey-apps span { color: var(--muted); font-size: .8125rem; }
.journey-handoffs {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .6rem;
  color: var(--muted);
  font-size: .8125rem;
}
.journey-handoffs::before {
  content: "";
  width: 1.25rem;
  border-top: 2px dotted var(--accent);
}
.journey-review {
  position: relative;
  margin-top: 1.5rem;
  padding: .7rem .8rem;
  border: 1px solid var(--accent);
}
.journey-review::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  height: 1.5rem;
  border-left: 1px solid var(--line-strong);
}
.journey-review strong, .journey-review span { display: block; }
.journey-review span { color: var(--muted); font-size: .875rem; }

/* Case 02 */
.status-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.status-steps li { padding-top: .9rem; border-top: 1px solid var(--line-strong); }
.status-steps .status {
  display: inline-block;
  margin-bottom: .5rem;
  padding: .05rem .45rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
.status-steps p { margin-top: .35rem; color: var(--muted); }
.case-note { max-width: 62ch; margin-top: 1.5rem; color: var(--muted); }
.case-note strong { color: var(--text); }

/* Case 03: steps + sticky decision map */
.triage-layout {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  margin-top: 2rem;
}
.triage-steps li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: .75rem;
  padding: 1.1rem 0 1.1rem .5rem;
  border-top: 1px solid var(--line);
  border-left: 3px solid transparent;
}
.triage-steps p { margin-top: .35rem; color: var(--muted); }
.triage-steps .is-active { border-left-color: var(--accent); }
.triage-steps .is-active .index { color: var(--accent); font-weight: 700; }

.triage-map {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  padding: 1.125rem;
  border: 1px solid var(--line);
  background: var(--surface);
}
.node {
  position: relative;
  padding: .45rem .6rem;
  border: 1px solid var(--line-strong);
  background: var(--background);
  font-size: .875rem;
  line-height: 1.35;
}
.node strong, .node span { display: block; }
.node span { color: var(--muted); font-size: .8125rem; }
.node.is-active { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }

.map-trunk { display: grid; gap: .75rem; margin-top: .75rem; }
.map-trunk .node + .node::before,
.map-lanes .node + .node::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 1rem;
  height: .75rem;
  border-left: 1px solid var(--line-strong);
}
.map-lanes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--line-strong);
}
.map-lanes::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 1rem;
  height: .75rem;
  border-left: 1px solid var(--line-strong);
}
.map-lanes li { display: grid; align-content: start; gap: .75rem; }
.map-lanes .trigger { color: var(--muted); }
.map-lanes .trigger.is-active { color: var(--text); }
.node.gate { border-style: dashed; border-color: var(--text); }
.node.gate::after {
  content: "Person";
  display: block;
  margin-top: .15rem;
  color: var(--muted);
  font: .6875rem/1.4 ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.node.gate.is-active { border-color: var(--accent); }

.map-key {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1rem;
  margin-top: .9rem;
  color: var(--muted);
  font-size: .8125rem;
}
.key::before {
  content: "";
  display: inline-block;
  width: .9rem;
  height: .6rem;
  margin-right: .4rem;
  border: 1px solid var(--line-strong);
  vertical-align: middle;
}
.key-gate::before { border-style: dashed; border-color: var(--text); }

.evidence-heading { margin-top: 2.5rem; }
.evidence { margin-top: .75rem; }
.evidence li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: .5rem 1.5rem;
  padding-block: .9rem;
  border-top: 1px solid var(--line);
}
.evidence li:last-child { border-bottom: 1px solid var(--line); }
.evidence p { margin-top: .2rem; max-width: 62ch; color: var(--muted); font-size: .9375rem; }
.chip {
  padding: .1rem .55rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  white-space: nowrap;
}
.chip-pass { border-color: var(--accent); color: var(--accent); }
.chip-open { border-style: dashed; }

/* Experience */
.experience-list { margin-top: 1.5rem; }
.experience-list li {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: .3rem 1rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}
.experience-list h3 + p { margin-top: .25rem; color: var(--muted); }

/* Tools and templates */
.tool-list { margin-top: 1.5rem; border-bottom: 1px solid var(--line); }
.tool { border-top: 1px solid var(--line); }
.tool summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .25rem 1rem;
  min-height: 44px;
  padding-block: .9rem;
  cursor: pointer;
  list-style: none;
}
.tool summary::-webkit-details-marker { display: none; }
.tool summary::before {
  content: "+";
  width: 1rem;
  color: var(--muted);
  font-family: ui-monospace, monospace;
}
.tool[open] summary::before { content: "−"; color: var(--accent); }
.tool-name { font-weight: 650; }
.tool summary:hover .tool-name { text-decoration: underline; }
.tool-static { padding: .9rem 0 .9rem 2rem; }
.tool-desc { margin-block: .2rem .25rem; color: var(--muted); max-width: 62ch; }
.tool-static > a { display: inline-flex; align-items: center; min-height: 44px; }
.tool-static .project-list { margin-top: .5rem; }
.tool-body { padding: 0 0 1.5rem 2rem; }
.tool-body > h3 { margin-top: 1.25rem; font-size: 1rem; }
.tool-body > h3:first-child { margin-top: 0; }

.project-list { margin-top: .5rem; }
.project-list > div {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: .25rem 1rem;
  padding-block: .65rem;
  border-top: 1px solid var(--line);
}
.project-list dt { font-weight: 600; }
.project-list dd { color: var(--muted); }

.planner-intro, .planner-note { max-width: 64ch; color: var(--muted); }
.planner-note { margin-top: 1rem; font-size: .9375rem; }
.planner-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 1.5rem 3rem;
  margin-top: 1.25rem;
}
.planner-layout label { display: block; margin-bottom: .25rem; }
.planner-layout input {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-bottom: .85rem;
  padding: .4rem .6rem;
  border: 1px solid #737a80;
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.planner-result { padding: 1.125rem; border: 1px solid var(--line); background: var(--surface); }
.planner-value { margin-block: .25rem .5rem; font-size: 1.5rem; font-weight: 650; }
.planner-result p:last-child { color: var(--muted); }

/* Footer CTA */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { padding-block: clamp(2.5rem, 6vw, 4rem); }
.site-footer h2 { max-width: 24ch; }
.site-footer p { margin-top: .5rem; color: var(--muted); }

/* Career timeline: segment width = months in role (set by workflow.js) */
.career-chart { margin-top: 1.75rem; }
.career-bar { display: flex; gap: 3px; }
.career-bar li { flex: var(--months) 1 0; min-width: 3rem; }
.career-bar .seg {
  display: block;
  height: .5rem;
  margin-bottom: .65rem;
  background: var(--line-strong);
  transform-origin: left center;
}
.career-bar li:nth-child(2) .seg { background: var(--muted); }
.career-bar li:last-child .seg { background: var(--accent); }
.career-bar strong { display: block; font-size: .875rem; line-height: 1.3; }
.career-bar li > span:last-child { color: var(--muted); font-size: .8125rem; }
.career-axis {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .75rem;
  padding-top: .5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: .75rem/1.5 ui-monospace, monospace;
}

/* Case 01 track: a dot travels under the applications */
.journey-track { position: relative; }
.journey-dot { display: none; }

/* Case 02: the finished state is the outcome */
.status-steps li:nth-child(2) .status::before {
  content: "";
  display: inline-block;
  width: .375rem;
  height: .375rem;
  margin-right: .4rem;
  border-radius: 50%;
  background: currentColor;
  vertical-align: .1em;
}
.status-steps li:last-child .status { border-color: var(--accent); color: var(--accent); }

/* Motion: only when workflow.js adds .motion (JS on, no reduced-motion).
   Each sequence runs once when its figure scrolls into view and ends on the
   same state the static page shows. */
.motion .career-chart:not(.in-view) .seg { transform: scaleX(0); }
.motion .career-chart.in-view .seg { transition: transform 700ms cubic-bezier(.2, .7, .2, 1); }
.motion .career-chart.in-view li:nth-child(2) .seg { transition-delay: 250ms; }
.motion .career-chart.in-view li:nth-child(3) .seg { transition-delay: 500ms; }
.motion .career-chart.in-view li:nth-child(4) .seg { transition-delay: 750ms; }
.motion .career-chart.in-view li:nth-child(5) .seg { transition-delay: 1000ms; }

.motion .journey .journey-dot {
  display: block;
  position: absolute;
  top: calc(100% + .3rem);
  left: 0;
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
}
.motion .journey.in-view .journey-dot { animation: journey-travel 1800ms ease-in-out forwards; }
.motion .journey:not(.in-view) .journey-apps li + li::before { opacity: .15; }
.motion .journey.in-view .journey-apps li + li::before { transition: opacity 300ms ease; }
.motion .journey.in-view .journey-apps li:nth-child(2)::before { transition-delay: 450ms; }
.motion .journey.in-view .journey-apps li:nth-child(3)::before { transition-delay: 1050ms; }
.motion .journey.in-view .journey-apps li { animation: node-lit 800ms ease both; }
.motion .journey.in-view .journey-apps li:nth-child(2) { animation-delay: 600ms; }
.motion .journey.in-view .journey-apps li:nth-child(3) { animation-delay: 1200ms; }
.motion .journey:not(.in-view) .journey-review { border-color: var(--line-strong); }
.motion .journey.in-view .journey-review { transition: border-color 400ms ease 1900ms; }

.motion .status-steps:not(.in-view) li:last-child .status { border-color: var(--line-strong); color: var(--muted); }
.motion .status-steps.in-view .status { animation: chip-lit 900ms ease both; }
.motion .status-steps.in-view li:nth-child(2) .status { animation-delay: 700ms; }
.motion .status-steps.in-view li:nth-child(2) .status::before { animation: pulse 500ms ease-in-out 700ms 3; }
.motion .status-steps.in-view li:last-child .status { animation: chip-final 500ms ease 1600ms both; }

@keyframes journey-travel {
  0% { left: 0; opacity: 1; }
  85% { left: calc(100% - .5rem); opacity: 1; }
  100% { left: calc(100% - .5rem); opacity: 0; }
}
@keyframes node-lit {
  0%, 100% { border-color: var(--line-strong); }
  35%, 65% { border-color: var(--accent); }
}
@keyframes chip-lit {
  0%, 100% { border-color: var(--line-strong); color: var(--muted); }
  30%, 70% { border-color: var(--accent); color: var(--accent); }
}
@keyframes chip-final {
  from { border-color: var(--line-strong); color: var(--muted); }
  to { border-color: var(--accent); color: var(--accent); }
}
@keyframes pulse {
  50% { opacity: .2; }
}

@media (max-width: 760px) {
  .career-bar strong { font-size: .8125rem; }
  .career-bar li > span:last-child { font-size: .75rem; }
}
/* Below 560px the 3-month segment is only ~48px wide, so the role labels
   collide. Hide them there — the Experience list below names every role
   with its dates, so nothing is lost. */
@media (max-width: 560px) {
  .career-bar strong, .career-bar li > span:last-child { display: none; }
}
@media (max-width: 420px) {
  .motion .journey .journey-dot { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .triage-steps li, .node { transition: border-color 180ms ease, box-shadow 180ms ease, color 180ms ease; }
}

@media (max-width: 760px) {
  nav { gap: 0 1rem; }
  .proof { grid-template-columns: minmax(0, 1fr); }
  .proof li + li { border-left: 0; border-top: 1px solid var(--line); }
  .proof a { padding: .8rem 1rem; }
  .case-layout, .triage-layout, .planner-layout, .status-steps { grid-template-columns: minmax(0, 1fr); }
  .case-facts > div { grid-template-columns: minmax(0, 1fr); }
  .triage-map { position: static; order: -1; }
  .map-lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1rem; }
  .experience-list li { grid-template-columns: minmax(0, 1fr); }
  .project-list > div { grid-template-columns: minmax(0, 1fr); }
  .tool-body, .tool-static { padding-left: 0; }
  .evidence li { grid-template-columns: minmax(0, 1fr); }
  .evidence .chip { justify-self: start; }
}

@media (max-width: 560px) { .nav-hide-sm { display: none !important; } }

@media (max-width: 400px) { .nav-hide-xs { display: none !important; } }

@media (max-width: 420px) {
  .journey-apps { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .journey-apps li + li::before {
    top: auto;
    bottom: 100%;
    right: auto;
    left: 1rem;
    width: 0;
    height: .75rem;
    border-top: 0;
    border-left: 2px dotted var(--accent);
  }
}

/* Products: one card per product (HariBahagia first). */
.product {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.product-mark {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 12px;
  background: #f4e3e6;
  color: #8a3d52;
  font: 700 1.125rem/1 Georgia, serif;
}
.product-body h3 { font-size: 1.375rem; }
.product-desc { margin-top: .5rem; max-width: 62ch; }
.product-points { margin-block: .75rem 1.25rem; color: var(--muted); }
.product-points li { position: relative; padding-left: 1rem; max-width: 62ch; }
.product-points li + li { margin-top: .35rem; }
.product-points li::before { content: ""; position: absolute; left: 0; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
@media (max-width: 560px) {
  .product { grid-template-columns: minmax(0, 1fr); padding: 1.25rem; }
}

/* Design system section: two style previews (Joy, Focus). Static, no motion. */
.ds-styles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.ds-style { display: grid; gap: .35rem; align-content: start; padding: 1.25rem; border: 1px solid var(--line); }
.ds-aa { font-size: 2.5rem; font-weight: 700; line-height: 1; }
.ds-name { font-weight: 650; font-size: 1.125rem; }
.ds-use { color: var(--muted); font-size: .9375rem; max-width: 40ch; }
.ds-sample { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: .75rem; }
.ds-btn { display: inline-flex; align-items: center; min-height: 36px; padding: 0 1rem; font-size: .875rem; font-weight: 700; }
.ds-joy { background: #1c1e23; border-color: #33363e; border-radius: 20px; }
.ds-joy .ds-aa { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; font-weight: 800; color: #efebe6; }
.ds-joy .ds-btn { border-radius: 999px; background: #8fc4aa; color: #10201a; }
.ds-dots { display: inline-flex; gap: 6px; }
.ds-dots i { width: 14px; height: 14px; border-radius: 50%; background: #8fc4aa; }
.ds-dots i:nth-child(2) { background: #eba4b5; }
.ds-dots i:nth-child(3) { background: #b9aee6; }
.ds-dots i:nth-child(4) { background: #9cc3e8; }
.ds-dots i:nth-child(5) { background: var(--accent); }
.ds-focus { background: var(--background); border-color: var(--line-strong); border-radius: 6px; }
.ds-focus .ds-btn { border-radius: 6px; background: var(--accent); color: var(--background); }
.ds-tag { font: .75rem/1.5 ui-monospace, monospace; color: var(--muted); border: 1px dashed var(--line-strong); padding: 0 .4rem; border-radius: 3px; }
.product-points code { font-size: .875em; }
@media (max-width: 560px) { .ds-styles { grid-template-columns: minmax(0, 1fr); } }
