/* ============================================================
   Kevin Indra Saputra — Portfolio · "Engineering Minimal"
   Light, monochrome + one signal-green accent.
   Signature element: monospace build-manifest spec sheet.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

:root {
  --ink:      #0A0A0A;
  --bg:       #FAFAF8;
  --surface:  #FFFFFF;
  --hair:     #E5E5E0;
  --hair-2:   #D6D6CF;
  --muted:    #6B6B64;
  --faint:    #9A9A91;
  --accent:   #15B371;        /* signal green — graphical use */
  --accent-strong: #0C7A4D;   /* darker green — small text/links (AA) */
  --accent-soft: #15B37114;

  --maxw: 1120px;
  --gutter: clamp(22px, 5.5vw, 80px);

  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

.mono { font-family: var(--mono); }

/* small section eyebrow / label */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px; background: var(--hair-2);
  display: inline-block;
}
.eyebrow .n { color: var(--accent-strong); }

/* ====================== HEADER ====================== */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.site-head.scrolled { border-bottom-color: var(--hair); }
.site-head .wrap {
  height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo { display: flex; align-items: baseline; gap: 9px; }
.logo .mark { font-weight: 600; font-size: 16px; letter-spacing: -0.02em; }
.logo .dom { font-family: var(--mono); font-size: 12px; color: var(--faint); }

.head-nav { display: flex; align-items: center; gap: 28px; }
.head-nav .links { display: flex; gap: 24px; }
.head-nav .links a {
  font-size: 14px; color: var(--muted);
  position: relative; padding-bottom: 3px;
  transition: color 0.18s ease;
}
.head-nav .links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1px;
  background: var(--accent); transition: width 0.22s ease;
}
.head-nav .links a:hover { color: var(--ink); }
.head-nav .links a:hover::after,
.head-nav .links a.active::after { width: 100%; }
.head-nav .links a.active { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.01em;
  padding: 11px 18px; border-radius: 0;
  border: 1px solid var(--ink); background: var(--ink); color: var(--bg);
  cursor: pointer; transition: all 0.18s ease; white-space: nowrap;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); transform: translateY(-1px); }
.btn svg { width: 14px; height: 14px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--hair-2); }
.btn.ghost:hover { background: transparent; color: var(--accent-strong); border-color: var(--accent); transform: translateY(-1px); }

/* ====================== HERO ====================== */
.hero { padding-top: clamp(70px, 13vh, 140px); padding-bottom: clamp(56px, 10vh, 120px); }
.hero .who {
  font-family: var(--mono); font-size: 13px; color: var(--muted);
  margin-bottom: 30px; display: inline-flex; align-items: center; gap: 11px;
}
.hero .who .pin { color: var(--accent-strong); }
.hero h1 {
  font-size: clamp(2.3rem, 5.6vw, 4.05rem);
  line-height: 1.04; font-weight: 600; letter-spacing: -0.035em;
  max-width: 18ch; text-wrap: balance; margin-bottom: 30px;
}
.hero h1 .em { color: var(--accent-strong); }
.hero .sub {
  font-family: var(--mono); font-size: clamp(13px, 1.5vw, 15px);
  line-height: 1.7; color: var(--muted); max-width: 60ch;
  letter-spacing: 0; margin-bottom: 42px;
}
.hero .sub b { color: var(--ink); font-weight: 500; }
.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ====================== SECTION SCAFFOLD ====================== */
section { padding-block: clamp(64px, 9vh, 110px); }
.section-top { margin-bottom: 56px; }
.section-top h2 {
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600;
  letter-spacing: -0.025em; margin-top: 16px;
}
.section-top .desc { color: var(--muted); max-width: 52ch; margin-top: 12px; text-wrap: pretty; }
.divider { height: 1px; background: var(--hair); }

/* ====================== SPEC-SHEET CARD (signature) ====================== */
.work { display: grid; gap: 28px; }
.spec {
  border: 1px solid var(--hair);
  border-radius: 0;
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}
.spec:hover { border-color: var(--hair-2); box-shadow: 0 1px 0 var(--hair), 0 18px 40px -28px #0a0a0a22; transform: translateY(-2px); }
.spec-grid { display: grid; grid-template-columns: 1.15fr 1fr; }
.spec-body { padding: clamp(28px, 3.4vw, 46px); }
.spec-visual {
  border-left: 1px solid var(--hair);
  background:
    repeating-linear-gradient(135deg, #f4f4f0 0 11px, #fafaf8 11px 22px);
  position: relative;
  display: grid; place-items: center;
  min-height: 280px;
  padding: 26px;
}

.spec-id {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--faint); text-transform: uppercase; margin-bottom: 20px;
  display: flex; justify-content: space-between; align-items: center;
}
.spec-id .tag { color: var(--accent-strong); }
.spec h3 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); font-weight: 600; letter-spacing: -0.03em; }
.spec .role { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 6px; }
.spec .blurb { color: var(--muted); margin-top: 20px; max-width: 46ch; text-wrap: pretty; }
.spec .blurb b { color: var(--ink); font-weight: 500; }

/* the build-manifest block */
.manifest {
  margin-top: 28px; border-top: 1px solid var(--hair);
  font-family: var(--mono); font-size: 13px;
}
.manifest .row {
  display: grid; grid-template-columns: 92px 1fr; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid var(--hair);
  align-items: start;
}
.manifest .row:last-child { border-bottom: none; }
.manifest .key { color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; font-size: 11.5px; padding-top: 1px; }
.manifest .val { color: var(--ink); }
.manifest .val .sub { color: var(--muted); }
.manifest .status { display: inline-flex; align-items: center; gap: 8px; }
.manifest .status .d { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.manifest .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.manifest .chips span { border: 1px solid var(--hair-2); border-radius: 0; padding: 1px 7px; color: var(--ink); }

/* image slot inside spec visual */
.spec-visual image-slot { width: 100%; height: 100%; min-height: 240px; }
.spec-visual .vlabel {
  position: absolute; left: 16px; bottom: 14px;
  font-family: var(--mono); font-size: 11px; color: var(--faint);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  padding: 3px 8px; border-radius: 0; border: 1px solid var(--hair);
}

/* live deployment panel (replaces screenshot — links to real env) */
.spec-visual.live { background: var(--surface); }
.deploy {
  width: 100%; max-width: 320px;
  border: 1px solid var(--hair); border-radius: 0;
  background: var(--bg); overflow: hidden;
  font-family: var(--mono); font-size: 13px;
  box-shadow: 0 16px 34px -26px #0a0a0a40;
}
.deploy-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--hair); background: var(--surface);
}
.deploy-bar .dots { display: flex; gap: 6px; }
.deploy-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--hair-2); display: block; }
.deploy-bar .env { font-size: 10.5px; letter-spacing: 0.1em; color: var(--accent-strong); border: 1px solid var(--accent); border-radius: 0; padding: 1px 6px; }
.deploy-url {
  display: flex; align-items: center; gap: 9px;
  padding: 16px 14px 2px; color: var(--ink); font-size: 13px; word-break: break-all;
}
.deploy-url svg { width: 14px; height: 14px; color: var(--faint); flex-shrink: 0; }
.deploy-go {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 14px; padding: 12px; border-radius: 0;
  background: var(--ink); color: var(--bg); font-size: 12.5px;
  transition: background 0.18s ease;
}
.deploy-go:hover { background: var(--accent-strong); }
.deploy-go svg { width: 13px; height: 13px; }
.deploy-note {
  padding: 0 14px 14px; color: var(--muted); font-size: 11px;
  display: flex; align-items: center; gap: 7px; line-height: 1.4;
}
.deploy-note::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); flex-shrink: 0; }

/* clickable project card (stretched link) */
.spec { position: relative; }
.spec h3 a.card-link { color: inherit; transition: color 0.18s ease; }
.spec h3 a.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.spec h3 a.card-link:hover { color: var(--accent-strong); }
.spec h3 .ext { font-size: 0.58em; color: var(--faint); vertical-align: middle; margin-left: 4px; transition: color 0.18s ease; }
.spec h3 a.card-link:hover .ext { color: var(--accent-strong); }
.spec .deploy-go { position: relative; z-index: 2; }

/* internal (non-public) project note */
.internal-note {
  margin-top: 18px; font-family: var(--mono); font-size: 11.5px; color: var(--faint);
  display: flex; align-items: center; gap: 8px;
}
.internal-note::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }

/* system schematic (PrimeSystem) */
.schematic {
  display: grid; gap: 14px; width: 100%; max-width: 320px;
  font-family: var(--mono); font-size: 12px;
}
.schematic .node {
  border: 1px solid var(--hair-2); border-radius: 0;
  background: var(--surface); padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.schematic .node .lbl { color: var(--ink); }
.schematic .node .meta { color: var(--faint); font-size: 11px; }
.schematic .node.accent { border-color: var(--accent); }
.schematic .node.accent .dotmini { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; margin-right: 7px; }
.schematic .flow { text-align: center; color: var(--accent-strong); line-height: 0.6; }

/* ====================== ABOUT ====================== */
.about-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(40px, 7vw, 90px); align-items: start; }
.about-copy p { color: var(--muted); margin-bottom: 20px; max-width: 56ch; text-wrap: pretty; }
.about-copy p:last-child { margin-bottom: 0; }
.about-copy strong { color: var(--ink); font-weight: 500; }
.principles { margin-top: 34px; display: grid; gap: 1px; background: var(--hair); border: 1px solid var(--hair); border-radius: 0; overflow: hidden; }
.principles .p {
  background: var(--surface); padding: 16px 20px;
  display: grid; grid-template-columns: 30px 1fr; gap: 14px; align-items: baseline;
}
.principles .p .num { font-family: var(--mono); font-size: 12px; color: var(--accent-strong); }
.principles .p .t { font-weight: 500; }
.principles .p .t span { color: var(--muted); font-weight: 400; }

.arc { border: 1px solid var(--hair); border-radius: 0; background: var(--surface); font-family: var(--mono); font-size: 13px; overflow: hidden; }
.arc .arc-head { padding: 14px 18px; border-bottom: 1px solid var(--hair); font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--faint); }
.arc .item { padding: 15px 18px; border-bottom: 1px solid var(--hair); }
.arc .item:last-child { border-bottom: none; }
.arc .item .org { color: var(--ink); display: flex; justify-content: space-between; gap: 12px; }
.arc .item .org .yr { color: var(--faint); }
.arc .item .desc2 { color: var(--muted); font-size: 12px; margin-top: 5px; }
.arc .item .desc2 .hl { color: var(--accent-strong); }

/* ====================== STACK ====================== */
.stack-list { display: grid; gap: 1px; background: var(--hair); border: 1px solid var(--hair); border-radius: 0; overflow: hidden; }
.stack-row {
  background: var(--surface); padding: 22px clamp(20px, 3vw, 34px);
  display: grid; grid-template-columns: 160px 1fr; gap: 24px; align-items: center;
}
.stack-row .cat { font-family: var(--mono); font-size: 12px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--faint); }
.stack-row .items { display: flex; flex-wrap: wrap; gap: 10px; }
.stack-row .items span {
  font-size: 15px; color: var(--ink);
  border: 1px solid var(--hair); border-radius: 0; padding: 7px 14px;
  background: var(--bg); transition: border-color 0.18s ease, color 0.18s ease;
}
.stack-row .items span:hover { border-color: var(--accent); color: var(--accent-strong); }

/* ====================== CONTACT ====================== */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.contact h2 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.02; }
.contact h2 .em { color: var(--accent-strong); }
.contact .lead { color: var(--muted); margin-top: 20px; max-width: 40ch; text-wrap: pretty; }
.contact .email-big {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 30px;
  font-family: var(--mono); font-size: clamp(15px, 2vw, 19px); color: var(--ink);
  border-bottom: 1px solid var(--hair-2); padding-bottom: 6px; transition: color 0.18s, border-color 0.18s;
}
.contact .email-big:hover { color: var(--accent-strong); border-color: var(--accent); }
.contact-card { border: 1px solid var(--hair); border-radius: 0; background: var(--surface); padding: 8px 0; }
.contact-card a {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 22px; border-bottom: 1px solid var(--hair);
  font-family: var(--mono); font-size: 14px; color: var(--ink); transition: background 0.16s ease;
}
.contact-card a:last-child { border-bottom: none; }
.contact-card a:hover { background: var(--bg); }
.contact-card a .l { display: flex; align-items: center; gap: 12px; }
.contact-card a .l svg { width: 17px; height: 17px; color: var(--muted); }
.contact-card a:hover .l svg { color: var(--accent-strong); }
.contact-card a .arrow { color: var(--faint); transition: transform 0.18s ease, color 0.18s ease; }
.contact-card a:hover .arrow { color: var(--accent-strong); transform: translate(2px, -2px); }

/* ====================== FOOTER ====================== */
footer { border-top: 1px solid var(--hair); padding-block: 30px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; color: var(--faint); }
footer a { color: var(--muted); } footer a:hover { color: var(--accent-strong); }

/* ====================== MOTION ====================== */
@media (prefers-reduced-motion: no-preference) {
  .anim-ready .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
  .anim-ready .reveal.in { opacity: 1; transform: none; }
  .anim-ready .reveal.d1 { transition-delay: 0.08s; }
  .anim-ready .reveal.d2 { transition-delay: 0.16s; }
}

/* ====================== RESPONSIVE ====================== */
@media (max-width: 860px) {
  .spec-grid { grid-template-columns: 1fr; }
  .spec-visual { border-left: none; border-top: 1px solid var(--hair); min-height: 220px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .head-nav .links { display: none; }
}
@media (max-width: 540px) {
  body { font-size: 16px; }
  .stack-row { grid-template-columns: 1fr; gap: 12px; }
  .manifest .row { grid-template-columns: 80px 1fr; }
  .logo .dom { display: none; }
}
