/* ===========================================================
   m1s0 — Home + Writeups
   Medium-style publication. Light by default, dark via
   [data-theme="dark"] on <html>.
   =========================================================== */

:root {
  --bg:        #0f1115;
  --text:      #e8e8e8;
  --muted:     #a3a3a3;
  --faint:     #6f6f6f;
  --rule:      #26292f;
  --code-bg:   #161920;
  --code-text: #d8dee6;
  --accent:    #3ddc97;
  --chip:      #1b1e25;
  --chip-on:   #e8e8e8;
  --nav:       rgba(15,17,21,.94);
  --shadow:    0 1px 3px rgba(0,0,0,.4);
  --surface:   #12151b;

  --syn-comment: #5f6875;
  --syn-string:  #e5a06a;
  --syn-keyword: #cba6f7;
  --syn-type:    #7cb7ff;
  --syn-number:  #6ee7b7;

  --serif: Charter, Georgia, Cambria, "Times New Roman", Times, serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:  ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html { background: var(--bg); transition: background .2s ease; }

body {
  margin: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background .2s ease, color .2s ease;
}

a { color: inherit; }

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

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: var(--nav);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 1460px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 60px);
  height: 57px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  font-family: var(--mono); font-weight: 700; font-size: 15px;
  letter-spacing: .06em; text-decoration: none;
}
.brand::before { content: "> "; color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-right a { font-size: 14px; color: var(--muted); text-decoration: none; }
.nav-right a:hover, .nav-right a.on { color: var(--text); }


/* ---------- reading progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70;
  pointer-events: none;
}
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .08s linear; }

/* ---------- shared layout ---------- */
.wrap { max-width: 728px; margin: 0 auto; padding: 0 24px; }

/* ---------- section heading ---------- */
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin: 56px 0 8px;
}
.sec-head h2 {
  font-size: 13px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin: 0;
}
.sec-head a { font-size: 14px; color: var(--muted); text-decoration: none; }
.sec-head a:hover { color: var(--text); }

/* ---------- page head ---------- */
.page-head { padding: 64px 0 4px; }
.page-head h1 {
  font-size: clamp(38px, 7vw, 52px); font-weight: 700;
  letter-spacing: -.025em; line-height: 1.08; margin: 0 0 14px;
}
.page-head p { font-size: 18px; color: var(--muted); margin: 0; max-width: 56ch; line-height: 1.5; }

/* ---------- search + tag filter ---------- */
.controls { margin: 36px 0 4px; }
.search {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--rule); border-radius: 999px;
  padding: 9px 16px; background: var(--bg);
}
.search:focus-within { border-color: var(--faint); }
.search svg { flex: 0 0 auto; opacity: .5; }
.search input {
  flex: 1 1 auto; border: 0; outline: 0; background: transparent;
  color: var(--text); font-family: var(--sans); font-size: 15px;
}
.search input::placeholder { color: var(--faint); }

.catbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.catbtn {
  font-family: var(--sans); font-size: 13px; cursor: pointer;
  background: var(--chip); color: var(--muted);
  border: 1px solid transparent; border-radius: 999px; padding: 6px 14px;
}
.catbtn:hover { color: var(--text); }
.catbtn.on { background: var(--chip-on); color: var(--bg); }

.count { font-size: 13px; color: var(--faint); margin: 20px 0 0; }

/* ---------- featured ---------- */
.featured {
  display: block; text-decoration: none;
  padding: 32px 0 36px; border-bottom: 1px solid var(--rule);
}
.featured-badge {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px; display: block;
}
.featured-art {
  height: 180px; border-radius: 4px; margin-bottom: 24px;
  display: grid; place-items: center;
}
.featured-art span {
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.95);
}
.featured h2 {
  font-size: clamp(26px, 4.5vw, 34px); font-weight: 700;
  letter-spacing: -.02em; line-height: 1.2; margin: 0 0 12px;
}
.featured:hover h2 { text-decoration: underline; }
.featured p {
  font-family: var(--serif); font-size: 18px; line-height: 1.5;
  color: var(--muted); margin: 0 0 18px;
}

/* ---------- feed ---------- */
.feed { padding-bottom: 96px; }

.item {
  display: flex; gap: 28px; align-items: flex-start;
  padding: 30px 0; border-bottom: 1px solid var(--rule);
  text-decoration: none;
}
.item:last-child { border-bottom: 0; }
.item-main { flex: 1 1 auto; min-width: 0; }

.byline { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.avatar {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; flex: 0 0 auto;
  font-size: 10px; font-weight: 700; color: #fff; letter-spacing: .02em;
  background: #1a1a1a;
}
html[data-theme="dark"] .avatar { color: #0f1115; background: var(--accent); }
.byline span { font-size: 13px; color: var(--text); }

.item h3 {
  font-size: 20px; font-weight: 700; letter-spacing: -.012em;
  line-height: 1.25; margin: 0 0 6px;
}
.item p {
  font-size: 15px; color: var(--muted); line-height: 1.45; margin: 0 0 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item:hover h3 { text-decoration: underline; }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--faint); }
.chip { background: var(--chip); color: var(--muted); border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.dot { color: var(--faint); }

.thumb {
  flex: 0 0 auto; width: 160px; height: 107px; border-radius: 3px;
  display: grid; place-items: center; overflow: hidden;
}
.thumb span {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.92);
}

.empty {
  padding: 72px 0; text-align: center; color: var(--faint);
  font-family: var(--mono); font-size: 14px;
}

/* ---------- article ---------- */
.article { max-width: 680px; margin: 0 auto; padding: 48px 24px 80px; }

.back { font-size: 14px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--text); }

.labels { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; }
.label {
  font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.label-critical { background: #ffe3e3; color: #a11; }
.label-high     { background: #ffedd9; color: #9a4a00; }
.label-medium   { background: #fff6d6; color: #806000; }
.label-low      { background: #dff5ef; color: #056353; }
.label-plain    { background: var(--chip); color: var(--muted); }
html[data-theme="dark"] .label-critical { background: #3a1a1a; color: #ff8f8f; }
html[data-theme="dark"] .label-high     { background: #3a2617; color: #ffb27a; }
html[data-theme="dark"] .label-medium   { background: #37310f; color: #ecd06a; }
html[data-theme="dark"] .label-low      { background: #10322c; color: #62d6bb; }

.title {
  font-size: clamp(32px, 6vw, 44px); font-weight: 700;
  letter-spacing: -.021em; line-height: 1.16; margin: 22px 0 12px;
}
.subtitle {
  font-family: var(--serif); font-size: clamp(19px, 3vw, 22px); font-weight: 400;
  line-height: 1.45; color: var(--muted); margin: 0 0 34px;
}

.author {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 0 22px; border-bottom: 1px solid var(--rule); margin-bottom: 44px;
}
.author .avatar { width: 44px; height: 44px; font-size: 15px; }
.author-name { font-size: 15.5px; font-weight: 500; line-height: 1.4; }

/* body typography */
.body { font-family: var(--serif); font-size: 20px; line-height: 1.65; letter-spacing: -.003em; }
.body > p { margin: 0 0 30px; }
.body > p:first-of-type { margin-top: 0; }

.body h2 {
  font-family: var(--sans); font-size: 28px; font-weight: 700;
  letter-spacing: -.016em; line-height: 1.25; margin: 56px 0 14px;
  scroll-margin-top: 80px; position: relative;
}
.body h3 {
  font-family: var(--sans); font-size: 21px; font-weight: 600;
  letter-spacing: -.01em; margin: 40px 0 8px; scroll-margin-top: 80px;
}

.anchor {
  position: absolute; left: -24px; width: 24px;
  opacity: 0; text-decoration: none; color: var(--faint);
  font-weight: 400; font-size: 22px;
}
.body h2:hover .anchor { opacity: 1; }

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

.body ul, .body ol { margin: 0 0 30px; padding-left: 26px; }
.body li { margin-bottom: 10px; }

.body blockquote {
  margin: 34px 0; padding-left: 23px;
  border-left: 3px solid var(--text);
  font-style: italic; color: var(--muted);
}

.body table {
  width: 100%; border-collapse: collapse; margin: 34px 0;
  font-family: var(--sans); font-size: 15px;
}
.body th, .body td { border-bottom: 1px solid var(--rule); padding: 11px 12px; text-align: left; }
.body th { font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }

.body img { max-width: 100%; height: auto; border-radius: 4px; }
.body hr { border: 0; border-top: 1px solid var(--rule); margin: 48px 0; }

.body p > code, .body li > code, .body td > code {
  font-family: var(--mono); font-size: .8em;
  background: var(--code-bg); border-radius: 3px; padding: 2px 6px;
}

/* ---------- code blocks ---------- */
.codewrap { position: relative; margin: 34px 0; }
.codewrap pre {
  background: var(--code-bg); border: 1px solid var(--rule); border-radius: 6px;
  padding: 18px 20px; margin: 0; overflow-x: auto;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.6;
  color: var(--code-text);
}
.codewrap pre code { font-family: inherit; }
.copy {
  position: absolute; top: 10px; right: 10px;
  font-family: var(--sans); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  background: var(--bg); color: var(--muted);
  border: 1px solid var(--rule); border-radius: 5px;
  padding: 5px 10px; cursor: pointer; opacity: 0; transition: opacity .15s ease;
}
.codewrap:hover .copy { opacity: 1; }
.copy:hover { color: var(--text); border-color: var(--faint); }
.copy.done { color: var(--accent); border-color: var(--accent); }

/* syntax tokens */
.tok-comment { color: var(--syn-comment); font-style: italic; }
.tok-string  { color: var(--syn-string); }
.tok-keyword { color: var(--syn-keyword); font-weight: 600; }
.tok-type    { color: var(--syn-type); }
.tok-number  { color: var(--syn-number); }

/* ---------- table of contents ---------- */
.toc {
  position: fixed; top: 120px; left: 50%; margin-left: -560px;
  width: 200px; max-height: 60vh; overflow-y: auto;
  font-size: 13px; line-height: 1.4;
}
.toc-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 12px;
}
.toc a {
  display: block; padding: 6px 0 6px 12px; color: var(--faint);
  text-decoration: none; border-left: 2px solid var(--rule);
}
.toc a:hover { color: var(--text); }
.toc a.on { color: var(--text); border-left-color: var(--accent); }
@media (max-width: 1180px) { .toc { display: none; } }

/* ---------- article footer ---------- */
.afoot { max-width: 680px; margin: 0 auto; padding: 0 24px 40px; }
.afoot-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 32px 0 24px; border-top: 1px solid var(--rule); }

.share { display: flex; align-items: center; gap: 10px; padding-bottom: 32px; border-bottom: 1px solid var(--rule); }
.share span { font-size: 13px; color: var(--faint); margin-right: 4px; }
.sbtn {
  font-size: 13px; text-decoration: none; color: var(--muted); cursor: pointer;
  border: 1px solid var(--rule); border-radius: 999px; padding: 6px 14px;
  background: none; font-family: var(--sans);
}
.sbtn:hover { color: var(--text); border-color: var(--faint); }
.sbtn.done { color: var(--accent); border-color: var(--accent); }

.prevnext { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; padding: 32px 0; }
.pn {
  display: block; text-decoration: none; padding: 18px;
  border: 1px solid var(--rule); border-radius: 8px;
}
.pn:hover { border-color: var(--faint); }
.pn small { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.pn strong { font-size: 15px; font-weight: 600; line-height: 1.35; display: block; }
.pn.next { text-align: right; }
@media (max-width: 620px) { .prevnext { grid-template-columns: 1fr; } .pn.next { text-align: left; } }

.more h3 {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .12em; color: var(--muted); margin: 28px 0 0;
}

/* ---------- scroll top ---------- */
.totop {
  position: fixed; right: 24px; bottom: 24px; z-index: 55;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--bg); color: var(--muted);
  border: 1px solid var(--rule); box-shadow: var(--shadow);
  cursor: pointer; display: grid; place-items: center; font-size: 16px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.totop.show { opacity: 1; pointer-events: auto; }
.totop:hover { color: var(--text); border-color: var(--faint); }

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--rule); margin-top: 40px;
  padding: 40px 24px 56px; text-align: center;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; margin-bottom: 14px; }
.foot-links a { font-size: 14px; color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); }
.foot small { font-family: var(--mono); font-size: 12px; color: var(--faint); }

@media (max-width: 620px) {
  .thumb { width: 96px; height: 64px; }
  .item { gap: 16px; padding: 24px 0; }
  .body { font-size: 18px; }
  .masthead { padding: 56px 0 40px; }
  .page-head { padding: 40px 0 4px; }
  .featured-art { height: 130px; }
}

/* ===========================================================
   Polish
   =========================================================== */

/* ---------- scrollbar ---------- */
* { scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--rule); border-radius: 999px;
  border: 3px solid var(--bg); background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--faint); background-clip: padding-box; }

/* ---------- focus ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px;
}

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity .55s cubic-bezier(.2,.6,.2,1), transform .55s cubic-bezier(.2,.6,.2,1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- hover micro-interactions ---------- */
.thumb, .featured-art { transition: transform .35s cubic-bezier(.2,.6,.2,1); }
.item:hover .thumb { transform: scale(1.035); }
.featured:hover .featured-art { transform: scale(1.012); }

.mlink, .catbtn, .sbtn, .pn, .chip { transition: border-color .18s ease, background .18s ease, color .18s ease; }

.sec-head a, .foot-links a { position: relative; }
.sec-head a::after, .foot-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -3px;
  height: 1px; background: currentColor; transition: right .25s ease;
}
.sec-head a:hover::after, .foot-links a:hover::after { right: 0; }

/* ---------- footer ---------- */
.foot-note {
  font-family: var(--serif); font-size: 15px; color: var(--muted);
  max-width: 40ch; margin: 0 auto 22px; line-height: 1.55;
}

/* ---------- print ---------- */
@media print {
  .nav, .toc, .totop, .share, .prevnext, .more, .progress, .foot, .back, .copy { display: none !important; }
  body { background: #fff; color: #000; }
  .article, .afoot { max-width: none; padding: 0; }
  .body { font-size: 11.5pt; line-height: 1.55; }
  .title { font-size: 22pt; }
  .subtitle { font-size: 13pt; }
  .codewrap pre { border: 1px solid #ccc; background: #fafafa; color: #000; font-size: 9pt; }
  .tok-comment, .tok-string, .tok-keyword, .tok-type, .tok-number { color: #000 !important; }
  .body a { text-decoration: underline; }
  .body a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  .author { border-bottom: 1px solid #ccc; }
}

/* ===========================================================
   Article detail components
   =========================================================== */

/* ---------- severity badges on feed cards ---------- */
.sev {
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px; color: #fff;
}
.sev-critical { background: #c1121f; }
.sev-high     { background: #d1601a; }
.sev-medium   { background: #a07800; }
.sev-low      { background: #0d7a63; }
.sev-info     { background: #6b7280; }

.chip-cve {
  font-family: var(--mono); font-size: 11px;
  background: transparent; color: var(--accent);
  border: 1px solid currentColor; border-radius: 4px; padding: 3px 7px;
}

/* ---------- callouts ---------- */
.callout {
  margin: 32px 0; padding: 16px 20px;
  border-left: 3px solid var(--rule); border-radius: 0 6px 6px 0;
  background: var(--chip);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
}
.callout > strong {
  display: block; margin-bottom: 6px;
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
}
.callout p { margin: 0; color: var(--muted); }
.callout p + p { margin-top: 10px; }
.callout code { font-family: var(--mono); font-size: .85em; }

.callout-note   { border-left-color: #3b82f6; }
.callout-note > strong { color: #3b82f6; }
.callout-tip    { border-left-color: #0d9488; }
.callout-tip > strong { color: #0d9488; }
.callout-warn   { border-left-color: #d97706; }
.callout-warn > strong { color: #d97706; }
.callout-danger { border-left-color: #dc2626; }
.callout-danger > strong { color: #dc2626; }

html[data-theme="dark"] .callout-note > strong   { color: #7cb7ff; }
html[data-theme="dark"] .callout-tip > strong    { color: #5eead4; }
html[data-theme="dark"] .callout-warn > strong   { color: #fbbf24; }
html[data-theme="dark"] .callout-danger > strong { color: #f87171; }
html[data-theme="dark"] .callout-note   { border-left-color: #7cb7ff; }
html[data-theme="dark"] .callout-tip    { border-left-color: #5eead4; }
html[data-theme="dark"] .callout-warn   { border-left-color: #fbbf24; }
html[data-theme="dark"] .callout-danger { border-left-color: #f87171; }

/* ---------- code block filename bar ---------- */
.codewrap.titled pre { border-top-left-radius: 0; border-top-right-radius: 0; border-top: 0; }
.codehead {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  background: var(--chip); border: 1px solid var(--rule); border-bottom: 0;
  border-radius: 6px 6px 0 0; padding: 9px 16px;
}
.codewrap.titled .copy { top: 5px; }

/* ---------- exploitation steps ---------- */
ol.steps { list-style: none; counter-reset: step; margin: 32px 0; padding: 0; }
ol.steps > li {
  counter-increment: step; position: relative;
  padding: 0 0 4px 52px; margin-bottom: 26px;
}
ol.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 1px;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--accent); border: 1px solid var(--rule);
}
ol.steps > li > h4 {
  font-family: var(--sans); font-size: 17px; font-weight: 600;
  margin: 4px 0 8px; letter-spacing: -.008em;
}
ol.steps > li > p { margin: 0 0 12px; }
ol.steps .codewrap { margin: 14px 0; }

/* ---------- key takeaways ---------- */
.takeaways {
  margin: 48px 0 0; padding: 24px 26px;
  border: 1px solid var(--rule); border-radius: 8px;
}
.takeaways h3 {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 14px;
}
.takeaways ul { list-style: none; margin: 0; padding: 0; font-family: var(--sans); font-size: 16px; }
.takeaways li { position: relative; padding: 6px 0 6px 24px; color: var(--muted); line-height: 1.5; }
.takeaways li::before {
  content: "→"; position: absolute; left: 0; top: 6px; color: var(--accent);
  font-family: var(--mono);
}

/* ---------- references ---------- */
.refs { margin: 44px 0 0; }
.refs h3 {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 12px;
}
.refs ol { margin: 0; padding-left: 20px; font-family: var(--sans); font-size: 15px; }
.refs li { margin-bottom: 8px; color: var(--muted); }
.refs a { color: var(--text); }

/* ---------- figure ---------- */
figure { margin: 34px 0; }
figure img,
figure video { width: 100%; border: 1px solid var(--rule); border-radius: 6px; display: block; }
figure video { background: #000; aspect-ratio: 1920 / 950; }
figcaption {
  font-family: var(--sans); font-size: 13.5px; color: var(--faint);
  margin-top: 10px; text-align: center;
}

/* ---------- series banner ---------- */
.series {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em;
  color: var(--muted); background: var(--chip);
  border-radius: 6px; padding: 10px 16px; margin: 0 0 22px;
}
.series b { color: var(--accent); font-weight: 700; }

/* ---------- author box ---------- */
.authorbox {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 26px 0 32px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  margin-top: 8px;
}
.authorbox .avatar { width: 52px; height: 52px; font-size: 17px; }
.authorbox-main h4 { font-size: 16px; font-weight: 600; margin: 2px 0 6px; }
.authorbox-main p {
  font-family: var(--serif); font-size: 15.5px; line-height: 1.55;
  color: var(--muted); margin: 0 0 10px;
}
.authorbox-links { display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; }
.authorbox-links a { color: var(--muted); text-decoration: none; }
.authorbox-links a:hover { color: var(--text); }

@media print {
  .callout { break-inside: avoid; background: #f5f5f5; }
  .authorbox, .takeaways { break-inside: avoid; }
}

/* ===========================================================
   Writeups index
   =========================================================== */

/* ---------- header meta line ---------- */
.head-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 18px 0 0; font-family: var(--mono); font-size: 13px; color: var(--faint);
}
.head-meta a { color: var(--muted); text-decoration: none; }
.head-meta a:hover { color: var(--accent); }

/* ---------- featured hero ---------- */
.hero-post {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: center;
  text-decoration: none;
  margin: 44px 0 0; padding: 0 0 46px;
  border-bottom: 1px solid var(--rule);
}

/* break out wider than the 728px reading column, but only when
   the viewport can actually take it */
@media (min-width: 1000px) {
  .hero-post { margin-left: -100px; margin-right: -100px; }
}

.hero-art {
  height: 260px; border-radius: 10px; display: grid; place-items: center;
  order: 2; box-shadow: var(--shadow);
}
.hero-art span {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: .24em; text-transform: uppercase; color: rgba(255,255,255,.95);
}
.hero-main { order: 1; }

.hero-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.hero-badge {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  background: var(--accent); color: #fff;
  border-radius: 999px; padding: 5px 12px;
}
html[data-theme="dark"] .hero-badge { color: #0f1115; }
.hero-cat {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint);
}

.hero-post h2 {
  font-size: clamp(27px, 3.8vw, 38px); font-weight: 700;
  letter-spacing: -.024em; line-height: 1.16; margin: 0 0 14px;
}
.hero-post:hover h2 { text-decoration: underline; }
.hero-post > .hero-main > p {
  font-family: var(--serif); font-size: 18.5px; line-height: 1.5;
  color: var(--muted); margin: 0 0 18px;
}

@media (max-width: 760px) {
  .hero-post { grid-template-columns: 1fr; gap: 24px; padding-bottom: 36px; }
  .hero-art { height: 170px; order: 1; }
  .hero-main { order: 2; }
}

/* ---------- sticky control bar ---------- */
.controls {
  position: sticky; top: 57px; z-index: 40;
  margin: 40px 0 0; padding: 16px 0 12px;
  background: var(--bg);
}
.controls::before {
  content: ""; position: absolute; left: -24px; right: -24px; top: 0; bottom: 0;
  background: var(--bg); z-index: -1;
}
.controls.stuck { border-bottom: 1px solid var(--rule); }

.controls-row { display: flex; gap: 10px; align-items: center; }
.search { flex: 1 1 auto; min-width: 0; }

.search-clear {
  background: none; border: 0; cursor: pointer; padding: 0 2px;
  color: var(--faint); font-size: 17px; line-height: 1; display: none;
}
.search-clear.show { display: block; }
.search-clear:hover { color: var(--text); }
.search kbd {
  font-family: var(--mono); font-size: 11px; color: var(--faint);
  border: 1px solid var(--rule); border-radius: 4px; padding: 2px 6px;
}

.sort {
  flex: 0 0 auto; font-family: var(--sans); font-size: 13.5px;
  color: var(--muted); cursor: pointer;
  background: var(--bg); border: 1px solid var(--rule); border-radius: 999px;
  padding: 10px 14px;
}
.sort:hover { border-color: var(--faint); color: var(--text); }

/* ---------- tag bar with counts ---------- */
.catbar { align-items: center; }
.catbtn b {
  font-family: var(--mono); font-weight: 400; font-size: 11px;
  opacity: .6; margin-left: 6px;
}
.filter-clear {
  font-family: var(--sans); font-size: 13px; cursor: pointer;
  background: none; border: 0; color: var(--faint); padding: 6px 4px;
  text-decoration: underline; display: none;
}
.filter-clear.show { display: inline-block; }
.filter-clear:hover { color: var(--text); }

/* ---------- search highlight ---------- */
mark {
  background: rgba(26,137,23,.16); color: inherit;
  border-radius: 2px; padding: 0 1px;
}
html[data-theme="dark"] mark { background: rgba(61,220,151,.2); }

/* ---------- richer feed cards ---------- */
.item-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.item .program {
  font-family: var(--mono); font-size: 12px; color: var(--faint);
  margin-bottom: 6px; display: block;
}

/* ---------- empty state ---------- */
.empty { border: 1px dashed var(--rule); border-radius: 10px; }
.empty b { display: block; color: var(--muted); margin-bottom: 6px; font-weight: 400; }
.empty button {
  margin-top: 14px; font-family: var(--sans); font-size: 13px; cursor: pointer;
  background: none; border: 1px solid var(--rule); border-radius: 999px;
  padding: 8px 16px; color: var(--muted);
}
.empty button:hover { color: var(--text); border-color: var(--faint); }

@media (max-width: 620px) {
  .controls { top: 0; }
  .controls-row { flex-wrap: wrap; }
  .sort { flex: 1 1 auto; }
}

/* ===========================================================
   HOME — blockchain profile
   =========================================================== */

/* fluid: fills a wide screen instead of stranding it at a fixed column */
.wide {
  width: 100%; max-width: 1460px; margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 60px);
}

/* ---------- platform strip ---------- */
.platforms {
  display: grid; gap: 14px; padding: 26px 0 0;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.pcard {
  --tint: var(--accent);
  display: block; text-decoration: none;
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 148px; padding: 22px 22px 20px;
  border: 1px solid var(--rule); border-radius: 13px; background: var(--bg);
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}

/* bloom in the platform's own colour, sitting behind its logo */
.pcard::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    /* follows the cursor; parks off-card until the mouse arrives */
    radial-gradient(44% 62% at var(--mx, 130%) var(--my, 50%),
      color-mix(in srgb, var(--tint) 46%, transparent), transparent 68%),
    radial-gradient(78% 110% at 82% 55%,
      color-mix(in srgb, var(--tint) 34%, transparent), transparent 72%);
  opacity: .5; transition: opacity .25s ease;
}

/* the logo, scaled past the card so it reads as covering rather than
   sitting in it, and bled off the right edge */
.pcard-mark {
  position: absolute; z-index: -1;
  right: 5%; top: 50%; transform: translateY(-50%);
  /* sits fully inside the card: bleeding it off the edge clipped the mark */
  height: 82%; width: auto; max-width: 44%;
  object-fit: contain; pointer-events: none;
  opacity: .17; filter: saturate(1.1);
  transition: opacity .3s ease, transform .3s cubic-bezier(.2,.6,.2,1);
  animation: markdrift 11s ease-in-out infinite;
}
@keyframes markdrift {
  0%, 100% { transform: translateY(-50%) rotate(0deg); }
  50%      { transform: translateY(-54%) rotate(2.5deg); }
}
html[data-theme="dark"] .pcard-mark { opacity: .22; }

/* scrim, so the handle stays legible over the artwork */
.pcard::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(96deg,
              var(--bg) 12%,
              color-mix(in srgb, var(--bg) 72%, transparent) 46%,
              transparent 82%);
  pointer-events: none;
}

.pcard:hover {
  border-color: color-mix(in srgb, var(--tint) 55%, var(--rule));
  transform: translateY(-3px);
  box-shadow: 0 14px 38px -16px color-mix(in srgb, var(--tint) 45%, transparent);
  text-decoration: none;
}
.pcard:hover::before { opacity: .8; }
.pcard:hover .pcard-mark {
  opacity: .42; transform: translateY(-50%) scale(1.06) rotate(-3deg);
  animation-play-state: paused;
}

.pcard-name {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--text); margin-bottom: 12px;
}
.pcard-handle {
  font-family: var(--mono); font-size: 15px; font-weight: 700;
  color: var(--accent); margin-top: 2px;
}
.pcard-note { font-size: 12.5px; color: var(--faint); margin-top: 4px; }

.pcard-out {
  position: absolute; top: 14px; right: 14px;
  font-size: 12px; color: var(--faint); opacity: 0; transition: opacity .2s ease;
}
.pcard:hover .pcard-out { opacity: 1; }


/* ===========================================================
   PROFILE BANNER
   =========================================================== */

.pb-outer { padding-top: 34px; }   /* shorthand here would zero .wide's side padding */

.pb {
  position: relative; overflow: hidden;
  border-radius: 20px;
  padding: clamp(28px, 3.2vw, 46px) clamp(24px, 3.4vw, 52px) clamp(32px, 3.4vw, 50px);
  color: #fff;
  display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center;

  /* near-black base with an emerald bloom top right and a cool one
     bottom left, so it reads as depth rather than a flat wash */
  background:
    radial-gradient(62% 92% at 84% 12%, rgba(61,220,151,.26), transparent 62%),
    radial-gradient(54% 84% at 12% 88%, rgba(56,189,248,.13), transparent 64%),
    radial-gradient(100% 130% at 50% -10%, rgba(255,255,255,.055), transparent 58%),
    #080d12;

  border: 1px solid rgba(61,220,151,.20);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 24px 64px -28px rgba(0,0,0,.85);
}
@media (max-width: 860px) { .pb { grid-template-columns: 1fr; gap: 22px; padding: 24px; } }

.pb::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 20%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 20%, #000 10%, transparent 72%);
}
/* generated hacker panel, pinned to the empty right side */
.pb-art {
  position: absolute; right: 0; top: 0; height: 100%;
  width: min(58%, 640px); z-index: 0;
  pointer-events: none; user-select: none;
}
@media (max-width: 860px) { .pb-art { width: 100%; opacity: .5; } }

.pb > * { position: relative; z-index: 1; }

/* must outrank `.pb > *` above, which would otherwise force this back
   into the grid flow and push the identity block sideways */
.pb > .pb-art { position: absolute; z-index: 0; }

.pb-crumb {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em;
  background: rgba(0,0,0,.34); border-radius: 999px; padding: 7px 14px;
  margin-bottom: 26px; color: rgba(255,255,255,.72);
}
.pb-crumb b { color: #8ef0c4; font-weight: 600; }

.pb-id { display: flex; align-items: center; gap: 22px; }

.pb-avatar {
  width: clamp(96px, 9vw, 148px); height: clamp(96px, 9vw, 148px);
  flex: 0 0 auto; border-radius: 24px; overflow: hidden; padding: 0;
  border: 1px solid rgba(61,220,151,.34);
  box-shadow:
    0 0 0 7px rgba(61,220,151,.06),
    0 16px 44px rgba(0,0,0,.6);
  transition: transform .35s cubic-bezier(.2,.6,.2,1), box-shadow .35s ease;
}
.pb-avatar svg { display: block; width: 100%; height: 100%; }
.pb-avatar:hover {
  transform: translateY(-3px) rotate(-1.5deg);
  box-shadow: 0 0 0 9px rgba(61,220,151,.10), 0 22px 54px rgba(0,0,0,.66);
}
@media (max-width: 520px) { .pb-avatar { width: 84px; height: 84px; border-radius: 18px; } }

.pb-handle {
  font-family: var(--mono); font-size: clamp(32px, 4.6vw, 64px); font-weight: 700;
  letter-spacing: -.02em; line-height: 1.05; margin: 0 0 8px; color: #fff;
  text-shadow: 0 0 34px rgba(61,220,151,.28);
}
.pb-exposure { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 4px; }
.pb-exposure-lbl {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(255,255,255,.45);
}
.pb-exp {
  font-size: 13px; color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.06); border: 1px solid rgba(61,220,151,.22);
  border-radius: 999px; padding: 5px 12px;
}
.pb-exp b {
  font-family: var(--mono); font-weight: 700; color: var(--accent); margin-left: 3px;
}
@media (max-width: 520px) { .pb-exposure-lbl { display: none; } }

/* headline stat cards */
.pb-cards { display: flex; flex-wrap: wrap; gap: 12px; }
.pb-card {
  background: rgba(12,6,26,.5); border: 1px solid rgba(255,255,255,.13);
  border-radius: 13px; padding: 16px 22px; min-width: 158px;
  backdrop-filter: blur(6px);
}
.pb-card span {
  display: block; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.7);
}
.pb-card b {
  display: block; margin-top: 7px;
  font-family: var(--mono); font-size: 26px; font-weight: 700; color: #fff;
  letter-spacing: -.02em;
}

/* tier + links row under the banner */
.pb-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: -18px; padding-left: 26px; position: relative; z-index: 2;
}
.tier {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--rule); border-radius: 999px;
  padding: 9px 16px; font-size: 13.5px; font-weight: 600; color: var(--text);
  box-shadow: var(--shadow);
}
.tier::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 26%, transparent);
}
.pb-link {
  --tint: var(--accent);
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13.5px; font-weight: 600; text-decoration: none; color: var(--text);
  background: var(--bg); border: 1px solid var(--rule); border-radius: 999px;
  padding: 9px 17px 9px 14px; box-shadow: var(--shadow);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease, background .2s ease;
}
/* the mark always carries its brand colour, so the row reads at a glance
   rather than only on hover */
.pb-link svg {
  width: 16px; height: 16px; flex: 0 0 auto;
  fill: var(--tint);
  transition: transform .2s ease;
}
.pb-link:hover {
  color: var(--text); text-decoration: none;
  border-color: color-mix(in srgb, var(--tint) 62%, var(--rule));
  background: color-mix(in srgb, var(--tint) 9%, var(--bg));
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--tint) 75%, transparent),
              var(--shadow);
}
.pb-link:hover svg { transform: scale(1.12); }
.pb-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--tint) 70%, transparent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .pb-link:hover { transform: none; }
  .pb-link:hover svg { transform: none; }
}

/* ---------- bio ---------- */
.bio-row { padding: 46px 0 0; }

.lbl {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 14px;
}
.bio-text {
  font-family: var(--serif); font-size: clamp(17px, 1.35vw, 20px); line-height: 1.6;
  color: var(--muted); margin: 0; max-width: 78ch;
}


/* ---------- panel box ---------- */
.panels { padding: 46px 0 0; }
.panel {
  border: 1px solid var(--rule); border-radius: 14px;
  padding: 26px 28px; background: var(--surface);
}

/* ---------- programs secured ---------- */
/* min-height only sets the floor. Rows wrap and the panel grows on its
   own as more programs are added, so nothing needs touching later. */
.secured {
  display: flex; flex-wrap: wrap; align-items: flex-start; align-content: flex-start;
  gap: 24px; padding-top: 6px;
  min-height: 210px;
}
.secured-item { width: 100px; text-align: center; }
.secured-mark {
  width: 72px; height: 72px; margin: 0 auto 11px; border-radius: 16px;
  display: grid; place-items: center; background: var(--chip); overflow: hidden;
}
.secured-mark img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.secured-mark span { font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--muted); }
.secured-item.is-private .secured-mark { background: transparent; border: 1px dashed var(--rule); }
.secured-name {
  font-size: 11.5px; line-height: 1.3; color: var(--muted);
  /* two lines before clipping, so a long agency name is still readable
     rather than cut to its first word */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word;
}

/* ---------- programs secured: group tabs ---------- */
.secured-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 2px 0 18px;
}
.secured-tabs .catbtn { font-size: 12.5px; padding: 6px 13px; }
.secured-tabs .catbtn b {
  font-family: var(--mono); font-weight: 400; font-size: 10.5px;
  opacity: .6; margin-left: 6px;
}
.secured-tabs .catbtn.on b { opacity: .75; }

/* the active tab's note, swapped in place as tabs change */
.secured-note {
  font-size: 12.5px; color: var(--faint);
  margin: -8px 0 16px;
}
.secured-note:empty { display: none; }

/* verification line under the wall, tying the logos to the profiles
   that can actually corroborate them */
/* deliberately not flex: a flex gap would push the commas away from the
   link they follow */
.secured-verify {
  margin: 20px 0 0; padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: 12.5px; color: var(--faint); line-height: 1.7;
}
.secured-verify:empty { display: none; }
.secured-verify .verify-tick {
  width: 15px; height: 15px; color: var(--accent);
  vertical-align: -3px; margin-right: 8px;
}
.secured-verify a {
  color: var(--muted); text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  transition: color .18s ease, border-color .18s ease;
}
.secured-verify a:hover { color: var(--accent); border-color: var(--accent); }

/* On a phone the 100px tiles only fit two to a row, which turned a 27
   program tab into a very long scroll. Tightening the tile and the panel
   padding fits three, cutting the list height by a third. */
@media (max-width: 520px) {
  .panel { padding: 22px 18px; }
  .secured { gap: 14px; min-height: 0; }
  .secured-item { width: 88px; }
  .secured-mark { width: 64px; height: 64px; border-radius: 14px; margin-bottom: 9px; }
  .secured-name { font-size: 11px; }
}


/* ===========================================================
   Ethereum backdrop
   Fixed field of marks behind everything. z-index -1 keeps it
   above the page background (which lives on <html>) and below
   every bit of content, with no stacking games needed.
   =========================================================== */

.eth-field {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none; overflow: hidden;
}

.ethm {
  position: absolute; color: var(--accent);
  will-change: transform;
  animation: ethdrift linear infinite;
}
html[data-theme="dark"] .ethm { color: var(--accent); }

@keyframes ethdrift {
  0%   { transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg)); }
  50%  { transform: translate3d(0, -26px, 0) rotate(calc(var(--rot, 0deg) + 6deg)); }
  100% { transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg)); }
}

/* each mark gets its own size, corner, tilt and tempo so the field
   never reads as a repeating pattern */
.ethm.m1 { top:  6%;  left:  4%;  width: 190px; opacity: .026; --rot: -12deg; animation-duration: 17s; }
.ethm.m2 { top: 22%;  right: 6%;  width: 300px; opacity: .020; --rot:  14deg; animation-duration: 23s; animation-delay: -4s; }
.ethm.m3 { top: 58%;  left: 12%;  width: 130px; opacity: .030; --rot:  22deg; animation-duration: 14s; animation-delay: -8s; }
.ethm.m4 { bottom: 8%; right: 16%; width: 220px; opacity: .022; --rot: -18deg; animation-duration: 20s; animation-delay: -2s; }
.ethm.m5 { top: 44%;  left: 46%;  width:  92px; opacity: .018; --rot:   8deg; animation-duration: 26s; animation-delay: -11s; }
.ethm.m6 { bottom: 26%; left: 2%;  width: 150px; opacity: .021; --rot: -26deg; animation-duration: 19s; animation-delay: -6s; }
.ethm.m7 { top:  2%;  right: 34%; width: 110px; opacity: .019; --rot:  30deg; animation-duration: 22s; animation-delay: -14s; }

html[data-theme="dark"] .ethm.m1 { opacity: .075; }
html[data-theme="dark"] .ethm.m2 { opacity: .060; }
html[data-theme="dark"] .ethm.m3 { opacity: .085; }
html[data-theme="dark"] .ethm.m4 { opacity: .065; }
html[data-theme="dark"] .ethm.m5 { opacity: .055; }
html[data-theme="dark"] .ethm.m6 { opacity: .062; }
html[data-theme="dark"] .ethm.m7 { opacity: .058; }

@media (prefers-reduced-motion: reduce) { .ethm { animation: none; } }
@media (max-width: 720px) {
  .ethm.m2, .ethm.m5, .ethm.m7 { display: none; }
  .ethm { opacity: .03 !important; }
  html[data-theme="dark"] .ethm { opacity: .05 !important; }
}

/* ---------- ethereum glyph on section headings ---------- */
.hof-head h2::before {
  content: ""; display: inline-block;
  width: .58em; height: .8em; margin-right: .48em; vertical-align: -.05em;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 417'%3E%3Cpath d='M127.96 0 0 212.32l127.96 75.64 127.96-75.64z'/%3E%3Cpath d='M127.96 312.19 0 236.59l127.96 180.32 127.96-180.32z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 417'%3E%3Cpath d='M127.96 0 0 212.32l127.96 75.64 127.96-75.64z'/%3E%3Cpath d='M127.96 312.19 0 236.59l127.96 180.32 127.96-180.32z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.sub-head h3::before, .lbl::before { content: none; }

/* ===========================================================
   Section headings, about strip and the 404 masthead

   These were dropped by an over-broad cleanup while the hero
   and reports table were being removed. Kept together here so
   a section-scoped edit cannot take them again.
   =========================================================== */

/* ---------- hall of fame / platforms section headings ---------- */
.hof-section { padding: 72px 0 0; }

.hof-head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px;
  padding-bottom: 18px; margin-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}
.hof-head h2 {
  font-family: var(--mono); font-size: clamp(19px, 1.7vw, 24px); font-weight: 700;
  letter-spacing: -.01em; margin: 0; line-height: 1.2;
}
.hof-head .note { font-size: 13.5px; color: var(--faint); line-height: 1.4; }

/* pushed to the far right, which only works while this is a flex row */
.hof-head .n {
  margin-left: auto; font-family: var(--mono); font-size: 12px;
  color: var(--faint); text-decoration: none;
}
a.n:hover { color: var(--text); }

@media (max-width: 560px) {
  .hof-head { gap: 8px; }
  .hof-head .n { margin-left: 0; }
}

/* ---------- chips on the hall of fame cards ---------- */
.kind {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--rule); border-radius: 4px; padding: 3px 8px;
}
.block-year { font-family: var(--mono); font-size: 12px; color: var(--faint); }

/* ---------- about strip ---------- */
.hx-about { padding: 76px 0 0; }
.hx-about-grid { display: grid; gap: 44px; grid-template-columns: 1.3fr 1fr; }
@media (max-width: 780px) { .hx-about-grid { grid-template-columns: 1fr; gap: 30px; } }
.hx-about p {
  font-family: var(--serif); font-size: clamp(17px, 1.3vw, 19px); line-height: 1.6;
  color: var(--muted); margin: 0 0 20px;
}
.hx-about strong { color: var(--text); font-weight: 600; }

/* Skills as rows of tags rather than columns of bullets: the groups have
   very different lengths (nine items against two), and columns would
   leave the short ones stranded beside a long one. */
.skills-list { display: grid; gap: 28px; }

.skill-row h4 {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .15em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 13px;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 9px; }
.skill-tags span {
  font-size: 13.5px; line-height: 1.2; color: var(--muted);
  background: var(--chip); border: 1px solid var(--rule);
  border-radius: 999px; padding: 8px 15px;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.skill-tags span:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--rule));
  background: color-mix(in srgb, var(--accent) 7%, var(--chip));
}

@media (max-width: 520px) {
  .skill-tags { gap: 7px; }
  .skill-tags span { font-size: 12.5px; padding: 7px 12px; }
}

.stack h4 {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .15em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 12px;
}
.stack + .stack { margin-top: 26px; }
.stack ul { list-style: none; margin: 0; padding: 0; }
.stack li {
  font-size: 14.5px; color: var(--muted); padding: 5px 0 5px 18px; position: relative;
}
.stack li::before {
  content: ""; position: absolute; left: 0; top: 12px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}

/* ---------- skip link ---------- */
/* off screen until focused, so keyboard users can jump the nav */
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 0 0 10px 10px;
  background: var(--accent); color: #06110c;
  font-size: 13.5px; font-weight: 700; text-decoration: none;
  transition: top .18s ease;
}
.skip:focus { top: 0; }

/* ---------- certifications ---------- */
.hx-certs { padding: 76px 0 0; }
/* scoped so the other sections keep their tighter head spacing */
.hx-certs .hof-head { margin-bottom: 30px; }
/* square tiles. auto-fill lets the row split on its own as the list
   grows, so nothing needs touching when a certificate is added */
.cert-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
}
.cert-card {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 1 / 1;
  display: flex; flex-direction: column;
  padding: 20px 16px 16px; border-radius: 18px;
  border: 1px solid var(--rule); color: inherit;
  text-decoration: none; text-align: center;
  background:
    linear-gradient(168deg,
      color-mix(in srgb, var(--chip) 88%, var(--text) 3%),
      var(--chip) 62%);
}
.cert-card.is-link {
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}

/* accent bloom that follows the cursor, parked off-card until it arrives.
   negative z-index paints it over the card background but under content */
.cert-card::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(48% 58% at var(--mx, 50%) var(--my, -20%),
    color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%);
  opacity: 0; transition: opacity .25s ease;
}
/* hairline of accent along the top edge */
.cert-card::after {
  content: ""; position: absolute; inset: 0 0 auto; height: 1px; z-index: -1;
  background: linear-gradient(90deg, transparent,
    color-mix(in srgb, var(--accent) 55%, transparent), transparent);
  opacity: .3; transition: opacity .25s ease;
}

.cert-card.is-link:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--rule));
  transform: translateY(-4px);
  box-shadow: 0 18px 38px -20px color-mix(in srgb, var(--accent) 65%, transparent);
}
.cert-card.is-link:hover::before { opacity: 1; }
.cert-card.is-link:hover::after  { opacity: .85; }

/* badge art takes the space the footer does not need. the image is
   absolutely placed so a tall badge resolves its max-height against
   this box instead of overflowing onto the title */
.cert-art {
  position: relative;
  flex: 1 1 auto; min-height: 0; width: 100%;
  margin-bottom: 16px;
}
/* wide certificates are width bound, so a tighter max-width shrinks them
   far more than it does the portrait badges, which are height bound */
.cert-art img {
  position: absolute; inset: 0; margin: auto;
  max-width: 90%; max-height: 100%; width: auto; height: auto;
  object-fit: contain;
  transition: transform .3s cubic-bezier(.2,.6,.2,1);
}
.cert-card.is-link:hover .cert-art img { transform: scale(1.07); }
.cert-initials {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--faint);
}

.cert-foot { flex: 0 0 auto; width: 100%; }
.cert-name {
  font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.35;
  /* three lines, because full course titles run long and a clipped one
     is not much use on a card whose whole job is naming the credential */
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word;
}
.cert-meta { font-size: 11px; color: var(--faint); margin-top: 5px; }
.cert-meta .dot { opacity: .5; margin: 0 2px; }

.cert-badge-go {
  position: absolute; top: 12px; right: 13px;
  font-size: 13px; color: var(--accent);
  opacity: 0; transition: opacity .2s ease;
}
.cert-card.is-link:hover .cert-badge-go { opacity: .9; }

.cert-empty {
  margin: 0; padding: 18px 17px; border-radius: 14px;
  border: 1px dashed var(--rule); background: transparent;
  font-size: 13.5px; color: var(--faint);
}

@media (prefers-reduced-motion: reduce) {
  .cert-card.is-link:hover { transform: none; }
  .cert-card.is-link:hover .cert-art img { transform: none; }
}
@media (max-width: 520px) {
  .cert-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .cert-card { padding: 16px 12px 13px; border-radius: 15px; }
}

.hx-latest { padding: 76px 0 0; }

/* ---------- masthead, used by 404 ---------- */
.masthead { padding: 84px 0 56px; border-bottom: 1px solid var(--rule); }
.masthead .eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 20px;
}
.masthead h1 {
  font-size: clamp(40px, 8vw, 68px); font-weight: 700;
  letter-spacing: -.035em; line-height: 1.04; margin: 0 0 22px;
}
.masthead .lede {
  font-family: var(--serif); font-size: clamp(18px, 2.4vw, 21px);
  line-height: 1.55; color: var(--muted); margin: 0 0 32px; max-width: 46ch;
}
.masthead-links { display: flex; flex-wrap: wrap; gap: 12px; }
.mlink {
  font-size: 14px; text-decoration: none; color: var(--text);
  border: 1px solid var(--rule); border-radius: 999px; padding: 9px 18px;
}
.mlink:hover { border-color: var(--text); text-decoration: none; }
.mlink-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.mlink-primary:hover { opacity: .88; }


/* ---------- rotating edge on the platform cards ---------- */
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.pcard-edge {
  position: absolute; inset: 0; z-index: 1;
  border-radius: inherit; padding: 1px;
  pointer-events: none; opacity: 0;
  transition: opacity .3s ease;
  background: conic-gradient(from var(--angle),
    transparent 0deg,
    color-mix(in srgb, var(--tint) 92%, #fff) 26deg,
    transparent 74deg,
    transparent 360deg);
  /* keeps only the 1px ring, punching the middle out */
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
}

.pcard:hover .pcard-edge {
  opacity: 1;
  animation: edgespin 2.6s linear infinite;
}
@keyframes edgespin { to { --angle: 360deg; } }

@media (prefers-reduced-motion: reduce) {
  .pcard-mark { animation: none; }
  .pcard:hover .pcard-edge { animation: none; opacity: .6; }
}


/* Real brand logos come in every colour, and many are dark. A light
   tile keeps all of them legible regardless of the page theme. */
.secured-mark.has-logo {
  background: #fff;
  border: 1px solid #e3e6ea;
  box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 4px 10px -6px rgba(15,23,42,.12);
}
html[data-theme="dark"] .secured-mark.has-logo {
  background: #f4f6f8;
  border-color: transparent;
}
.secured-mark.has-logo img { padding: 10px; }
