:root{
  --bg:#14161a;
  --panel:#1c2024;
  --panel-hover:#21262b;
  --border:#2a2f34;
  --border-soft:#23272b;
  --text:#edece9;
  --text-dim:#9aa1a8;
  --text-faint:#5d636a;
  --accent:#ff7a45;
  --accent-soft:rgba(255,122,69,0.12);
  --teal:#58d6c4;
  --teal-soft:rgba(88,214,196,0.10);
  --ok:#4ade80;
  --ok-soft:rgba(74,222,128,0.10);
  --gone:#e2646b;
  --gone-soft:rgba(226,100,107,0.10);
  --high:#f2a950;
  --high-soft:rgba(242,169,80,0.10);
  --diff-add:#4ade80;
  --diff-add-bg:rgba(74,222,128,0.08);
  --diff-del:#e2646b;
  --diff-del-bg:rgba(226,100,107,0.08);
  --font-mono:'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-sans:'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }

body{
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-sans);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  padding:0 1.25rem 4rem;
}

.wrap{ max-width:720px; margin:0 auto; }
.wrap.wide{ max-width:820px; }

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

.icon{ width:1em; height:1em; vertical-align:-0.125em; fill:currentColor; display:inline-block; flex-shrink:0; }

/* ---------- top load bar ---------- */
.load-bar{
  position:fixed; top:0; left:0; height:3px; width:0;
  background:linear-gradient(90deg,var(--accent),var(--teal));
  z-index:50;
}
@media (prefers-reduced-motion: no-preference){
  .load-bar{ animation:loadbar 1s ease-out forwards, settle .5s ease 1.1s forwards; }
}
@media (prefers-reduced-motion: reduce){
  .load-bar{ width:100%; opacity:.18; }
}
@keyframes loadbar{ from{ width:0 } to{ width:100% } }
@keyframes settle{ to{ opacity:.18 } }

/* ---------- entrance stagger ---------- */
@media (prefers-reduced-motion: no-preference){
  .enter{ opacity:0; transform:translateY(8px); animation:enter .6s ease forwards; }
  .enter-1{ animation-delay:.05s } .enter-2{ animation-delay:.15s }
  .enter-3{ animation-delay:.25s } .enter-4{ animation-delay:.35s }
  .enter-5{ animation-delay:.45s }
  @keyframes enter{ to{ opacity:1; transform:none } }
}

/* ---------- scroll reveal ---------- */
.reveal{ opacity:0; transform:translateY(14px); transition:opacity .6s ease, transform .6s ease; }
.reveal.in-view{ opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1 !important; transform:none !important; transition:none !important; }
}

a:focus-visible, button:focus-visible{
  outline:2px solid var(--teal); outline-offset:3px; border-radius:2px;
}

/* ---------- request bar (header) ---------- */
.request-bar{
  padding:1.5rem 0 1.1rem;
  border-bottom:1px solid var(--border-soft);
  margin-bottom:2.75rem;
}
.request-line{
  display:flex; align-items:baseline; gap:.6rem; flex-wrap:wrap;
  font-family:var(--font-mono); font-size:clamp(.95rem,3vw,1.05rem);
}
.method-badge{
  font-weight:700; font-size:.72rem; letter-spacing:.05em;
  padding:.2rem .45rem; border-radius:4px;
  background:var(--accent-soft); color:var(--accent);
  border:1px solid rgba(255,122,69,.3);
}
.request-path{ font-weight:600; color:var(--text); }
.protocol{ color:var(--text-faint); font-weight:400; }
.cursor{ display:inline-block; width:.55ch; background:var(--accent); margin-left:2px; }
@media (prefers-reduced-motion: no-preference){
  .cursor{ animation:blink 1s step-end infinite; }
}
@keyframes blink{ 50%{ opacity:0 } }

.request-meta{
  display:flex; align-items:center; gap:.5rem; margin-top:.5rem;
  font-family:var(--font-mono); font-size:.78rem; color:var(--text-dim);
}
.status-dot{ width:7px; height:7px; border-radius:50%; background:var(--ok); box-shadow:0 0 6px rgba(74,222,128,.6); }
.request-meta .divider{ color:var(--text-faint); }

.request-headers{
  margin-top:1rem; display:flex; flex-direction:column; gap:.25rem;
  font-family:var(--font-mono); font-size:.78rem;
}
.request-headers .hkey{ color:var(--teal); margin-right:.6rem; }
.request-headers .hval{ color:var(--text-dim); }

.routes{
  display:flex; flex-wrap:wrap; gap:1.1rem; margin-top:1.25rem;
  font-family:var(--font-mono); font-size:.78rem;
}
.routes a{ color:var(--text-dim); padding:.15rem 0; border-bottom:1px solid transparent; }
.routes a:hover, .routes a.is-active{ color:var(--accent); border-bottom-color:var(--accent); }

.back-link{
  display:inline-flex; align-items:center; gap:.45rem;
  font-family:var(--font-mono); font-size:.8rem; color:var(--text-dim);
  margin-top:1.1rem; padding:.15rem 0; border-bottom:1px solid transparent;
}
.back-link:hover{ color:var(--accent); border-bottom-color:var(--accent); }

/* ---------- hero ---------- */
.hero{ margin-bottom:3.5rem; }
.response-line{
  font-family:var(--font-mono); font-size:.85rem; color:var(--text-faint);
  margin-bottom:.9rem;
}
.response-line .ok{ color:var(--ok); font-weight:600; }

.hero-title{
  font-family:var(--font-mono); font-weight:700;
  font-size:clamp(2.2rem,7.5vw,3.4rem); line-height:1.08;
  letter-spacing:-0.01em; margin-bottom:1rem;
}

.hero-tags{
  font-family:var(--font-mono); color:var(--teal);
  font-size:clamp(.78rem,2.4vw,.85rem); letter-spacing:.01em;
  margin-bottom:1.35rem; line-height:1.7;
}

.hero-desc{
  color:var(--text-dim); font-size:clamp(.95rem,2.8vw,1rem);
  max-width:560px; margin-bottom:1.75rem;
}

.social-links{
  display:flex; flex-wrap:wrap; gap:.9rem 1.4rem;
  font-family:var(--font-mono); font-size:.85rem;
}
.social-link-item{
  display:inline-flex; align-items:center; gap:.45rem; color:var(--text-dim);
  padding:.3rem 0; border-bottom:1px solid transparent;
}
.social-link-item:hover{ color:var(--accent); border-bottom-color:var(--accent); }

/* ---------- section chrome ---------- */
.content-section{ margin-bottom:3.25rem; }
.section-eyebrow{
  display:flex; align-items:baseline; justify-content:space-between;
  font-family:var(--font-mono); margin-bottom:1.35rem;
  border-bottom:1px solid var(--border-soft); padding-bottom:.6rem;
  gap:.75rem; flex-wrap:wrap;
}
.section-eyebrow .path{
  color:var(--teal); font-size:.85rem; font-weight:600; letter-spacing:.02em;
}
.section-eyebrow .count{ color:var(--text-faint); font-size:.72rem; }

/* ---------- endpoint rows (projects / education / writeups) ---------- */
.endpoint-row{
  display:block; padding:1.1rem 1.15rem; margin-bottom:.85rem;
  background:var(--panel); border:1px solid var(--border);
  border-left:2px solid var(--border); border-radius:6px;
  transition:background .18s ease, border-color .18s ease, transform .18s ease;
}
a.endpoint-row:hover{
  background:var(--panel-hover); border-left-color:var(--accent); transform:translateX(2px);
}
.endpoint-top{
  display:flex; align-items:center; gap:.6rem; flex-wrap:wrap;
  font-family:var(--font-mono); margin-bottom:.55rem;
}
.method{
  font-size:.68rem; font-weight:700; letter-spacing:.04em;
  padding:.15rem .4rem; border-radius:3px;
}
.method.get{ background:var(--teal-soft); color:var(--teal); border:1px solid rgba(88,214,196,.3); }
.endpoint-path{ font-weight:600; font-size:1.02rem; color:var(--text); }
.status{
  margin-left:auto; font-size:.68rem; font-weight:600; letter-spacing:.03em;
  padding:.15rem .45rem; border-radius:3px;
}
.status.ok{ background:var(--ok-soft); color:var(--ok); }
.status.critical{ background:var(--gone-soft); color:var(--gone); }
.status.high{ background:var(--high-soft); color:var(--high); }
.endpoint-desc{ color:var(--text-dim); font-size:.9rem; line-height:1.65; }
.endpoint-sub{ font-family:var(--font-mono); color:var(--text-faint); font-size:.78rem; margin-top:.35rem; }
.endpoint-tags{
  display:flex; flex-wrap:wrap; gap:.4rem; margin-top:.65rem;
  font-family:var(--font-mono); font-size:.68rem; color:var(--text-faint);
}
.endpoint-tags span{ padding:.12rem .4rem; border:1px solid var(--border); border-radius:3px; }

/* ---------- token rows (certifications) ---------- */
.token-row{
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
  padding:.95rem 1.1rem; margin-bottom:.65rem;
  background:var(--panel); border:1px solid var(--border);
  border-left:2px solid var(--border); border-radius:6px;
  flex-wrap:wrap;
}
.token-label{ font-family:var(--font-mono); font-size:.92rem; }
.token-label .bearer{ color:var(--text-faint); font-weight:400; margin-right:.4rem; }
.token-label strong{ color:var(--text); font-weight:600; }
.token-sub{ display:block; font-family:var(--font-mono); color:var(--text-faint); font-size:.74rem; margin-top:.2rem; }
.token-status{
  font-family:var(--font-mono); font-size:.68rem; font-weight:700; letter-spacing:.03em;
  padding:.2rem .5rem; border-radius:3px; white-space:nowrap;
}
.token-status.ok{ background:var(--ok-soft); color:var(--ok); }
.token-status.gone{ background:var(--gone-soft); color:var(--gone); }
.token-row.is-gone{ border-left-color:rgba(226,100,107,.4); }

/* ---------- contact / JSON payload ---------- */
.json-block{
  background:var(--panel); border:1px solid var(--border); border-radius:6px;
  padding:1.25rem 1.4rem; font-family:var(--font-mono); font-size:.85rem;
  overflow-x:auto;
}
.json-line{ white-space:pre; color:var(--text-dim); }
.json-line .jkey{ color:var(--teal); }
.json-line .jpunc{ color:var(--text-faint); }
.json-line a.jstr{ color:var(--accent); border-bottom:1px solid transparent; }
.json-line a.jstr:hover{ border-bottom-color:var(--accent); }
.json-indent{ padding-left:1.4rem; }

.eof{
  text-align:center; font-family:var(--font-mono); color:var(--text-faint);
  font-size:.78rem; margin-top:3.5rem;
}

/* ---------- article (writeup detail) ---------- */
.article-meta-table{
  width:100%; border-collapse:collapse; margin-bottom:2.25rem;
  font-family:var(--font-mono); font-size:.82rem;
}
.article-meta-table tr{ border-bottom:1px solid var(--border-soft); }
.article-meta-table tr:last-child{ border-bottom:none; }
.article-meta-table td{ padding:.55rem .2rem; vertical-align:top; }
.article-meta-table td:first-child{ color:var(--text-faint); width:38%; white-space:nowrap; }
.article-meta-table td:last-child{ color:var(--text); }

.article{ font-size:.98rem; color:var(--text-dim); }
.article h1{
  font-family:var(--font-mono); font-weight:700; color:var(--text);
  font-size:clamp(1.7rem,5vw,2.1rem); line-height:1.2; letter-spacing:-.01em;
  margin:2.6rem 0 1rem;
}
.article > h1:first-child{ margin-top:0; }
.article h2{
  font-family:var(--font-mono); font-weight:600; color:var(--text);
  font-size:1.25rem; letter-spacing:.01em;
  margin:2.4rem 0 1rem; padding-bottom:.5rem; border-bottom:1px solid var(--border-soft);
}
.article h3{
  font-family:var(--font-mono); font-weight:600; color:var(--teal);
  font-size:.95rem; text-transform:uppercase; letter-spacing:.04em;
  margin:1.75rem 0 .75rem;
}
.article p{ margin-bottom:1.1rem; line-height:1.75; }
.article ul, .article ol{ margin:0 0 1.1rem 1.3rem; }
.article li{ margin-bottom:.4rem; line-height:1.65; }
.article strong{ color:var(--text); font-weight:600; }
.article hr{ border:none; border-top:1px solid var(--border-soft); margin:2.5rem 0; }
.article a{ color:var(--accent); border-bottom:1px solid transparent; }
.article a:hover{ border-bottom-color:var(--accent); }

.article blockquote{
  margin:0 0 1.4rem; padding:.9rem 1.1rem;
  background:var(--teal-soft); border-left:2px solid var(--teal);
  border-radius:0 6px 6px 0; color:var(--text); font-size:.92rem;
}
.article blockquote p{ margin:0; }

.article table{
  width:100%; border-collapse:collapse; margin:0 0 1.6rem;
  font-size:.85rem; background:var(--panel); border:1px solid var(--border);
  border-radius:6px; overflow:hidden;
}
.article th, .article td{
  padding:.6rem .85rem; text-align:left; border-bottom:1px solid var(--border-soft);
}
.article th{
  font-family:var(--font-mono); color:var(--teal); font-weight:600;
  font-size:.72rem; text-transform:uppercase; letter-spacing:.04em;
  background:rgba(88,214,196,.05);
}
.article tr:last-child td{ border-bottom:none; }
.article td:first-child{ color:var(--text); font-weight:500; white-space:nowrap; }

.article pre{
  background:var(--panel); border:1px solid var(--border); border-radius:6px;
  padding:1rem 1.15rem; margin:0 0 1.6rem; overflow-x:auto;
}
.article pre code{
  font-family:var(--font-mono); font-size:.8rem; line-height:1.6;
  color:var(--text-dim); white-space:pre;
}
.article code{
  font-family:var(--font-mono); font-size:.85em; color:var(--teal);
  background:var(--teal-soft); padding:.1rem .35rem; border-radius:3px;
}
.article pre code{ background:none; padding:0; color:var(--text-dim); }
.article pre .diff-add{ color:var(--diff-add); background:var(--diff-add-bg); display:inline-block; width:100%; }
.article pre .diff-del{ color:var(--diff-del); background:var(--diff-del-bg); display:inline-block; width:100%; }

.severity-badge{
  display:inline-block; font-family:var(--font-mono); font-size:.72rem;
  font-weight:700; letter-spacing:.04em; padding:.3rem .65rem; border-radius:4px;
  margin-bottom:1.5rem;
}
.severity-badge.critical{ background:var(--gone-soft); color:var(--gone); border:1px solid rgba(226,100,107,.35); }
.severity-badge.high{ background:var(--high-soft); color:var(--high); border:1px solid rgba(242,169,80,.35); }

/* ---------- mobile ---------- */
@media (max-width:480px){
  .request-line{ flex-direction:column; align-items:flex-start; gap:.3rem; }
  .routes{ gap:.75rem 1rem; }
  .token-row{ align-items:flex-start; }
  .status{ margin-left:0; }
  .endpoint-top{ gap:.5rem; }
  .article table{ font-size:.78rem; }
  .article th, .article td{ padding:.5rem .5rem; }
}
