/* ============================================
   Portfolio — light poster hero, black stage below.
   Ref: inspo/ (warped PORTFOLIO + card wheel; HI, I'M hero; stacked project cards)
   ============================================ */

:root {
  --paper:  #dcdcda;
  --paper-2:#e8e8e6;
  --ink:    #0c0c0c;
  --ink-2:  #3d3d3b;
  --red:    #e8363a;
  --black:  #050505;
  --panel:  #0e0e0e;
  --line:   rgba(255,255,255,.55);
  --line-2: rgba(255,255,255,.14);
  --white:  #f2f2f0;
  --grey:   #a3a3a0;
  --hot-1:  #ff2e7e;
  --hot-2:  #b44cff;
  --hot-3:  #ff8a2a;

  --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --max: 1280px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); font-stretch: 100%;
  font-size: 1rem; line-height: 1.6;
  color: var(--white); background: var(--black);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Heavy, wide display voice */
.display { font-weight: 900; font-stretch: 125%; text-transform: uppercase; line-height: .9; letter-spacing: -.01em; }
.label { font-size: .72rem; font-weight: 700; font-stretch: 125%; letter-spacing: .08em; text-transform: uppercase; }

/* ——— NAV: inverts itself over light and dark ——— */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; mix-blend-mode: difference; color: #fff; pointer-events: none; }
.nav-inner { max-width: var(--max); margin: 0 auto; padding: 1.1rem var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav-inner > * { pointer-events: auto; }
.nav-logo { display: flex; align-items: center; gap: .6rem; }
.nav-logo svg { width: 30px; height: 30px; }
.nav-logo span { font-weight: 800; font-stretch: 125%; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { font-size: .72rem; font-weight: 700; font-stretch: 125%; letter-spacing: .1em; text-transform: uppercase; position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1px; background: currentColor; transition: right .4s var(--ease); }
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }
.nav-toggle { display: none; }

/* ============================================
   1. HERO STAGE: RASHAAD flipping across a red bar
   ============================================ */
.stage { position: relative; max-width: var(--max); margin: 0 auto; width: calc(100% - var(--gutter) * 2); height: clamp(300px, 46vh, 460px); color: var(--white); }
.cross { position: absolute; width: 11px; height: 11px; opacity: .45; }
.cross::before, .cross::after { content: ""; position: absolute; background: currentColor; }
.cross::before { left: 5px; top: 0; width: 1px; height: 11px; }
.cross::after { top: 5px; left: 0; height: 1px; width: 11px; }
.tri { position: absolute; top: 50%; margin-top: -7px; width: 0; height: 0; border: 7px solid transparent; }
.tri-l { left: -2px; border-left: 9px solid var(--white); }
.tri-r { right: -2px; border-right: 9px solid var(--white); }
.stage-tl { position: absolute; top: 1.4rem; left: 4%; }
.stage-br { position: absolute; bottom: 1.4rem; right: 4%; }
.stage-mark { position: absolute; top: 1.2rem; right: 4%; width: 30px; height: 30px; --mark-eye: var(--black); }
.redbar { position: absolute; z-index: 0; left: 50%; top: 0; bottom: 0; width: clamp(100px, 14vw, 200px); transform: translateX(-50%); background: var(--red); }
.word { position: absolute; left: 0; right: 0; top: 42%; transform: translateY(-50%); display: flex; justify-content: center; perspective: 900px; z-index: 3; }
.word h1 { display: flex; font-size: clamp(3.2rem, 13vw, 12rem); color: #e6e6e3; }
.ltr { position: relative; display: inline-block; transform-style: preserve-3d; }
.ltr .f, .ltr .b { display: block; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.ltr .b { position: absolute; inset: 0; transform: rotateX(180deg); color: transparent; -webkit-text-stroke: 1.5px #e6e6e3; }
.word-echo { position: absolute; left: 0; right: 0; display: flex; justify-content: center; pointer-events: none; font-size: clamp(3.2rem, 13vw, 12rem); color: transparent; -webkit-text-stroke: 1px rgba(230,230,227,.16); z-index: 3; }
.word-echo.up { top: calc(42% - .62em); transform: translateY(-50%) scaleY(.32); }
.word-echo.down { top: calc(42% + .62em); transform: translateY(-50%) scaleY(-.32); }

/* ============================================
   2. HI, I'M (black)
   ============================================ */
.hi { position: relative; min-height: 100svh; padding: 6.5rem 0 3rem; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.hi-figure { position: absolute; left: 50%; bottom: 0; transform: translateX(-39%); width: min(540px, 48vw); z-index: 4; pointer-events: none; }
.hi-figure img { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(0,0,0,.6)); }
.hi-figure .alt { display: none; }
.hi.show-avatar .hi-figure { transform: translateX(-41%); }
.hi.show-avatar .hi-figure .main { display: none; }
.hi.show-avatar .hi-figure .alt { display: block; }
.hi > .wrap { width: 100%; }
.hi-row { position: relative; z-index: 3; margin-top: 2.5rem; align-items: flex-end; display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; margin-top: clamp(1.5rem, 4vh, 3rem); }
.hi-bio { max-width: 34ch; font-size: 1rem; font-weight: 400; line-height: 1.55; color: #cfcfcc; }
.hi-line { position: relative; display: block; min-height: 1.6em; margin-top: .7rem; color: var(--white); font-weight: 600; }
.hi-line span { display: block; }
html.js .hi-line span { position: absolute; inset: 0; transition: opacity .8s var(--ease), transform .8s var(--ease); }
html.js .hi-line span:not(.on) { opacity: 0; transform: translateY(8px); }
.pill-hot {
  display: inline-flex; align-items: center; gap: .5rem; padding: .95rem 1.6rem; border-radius: 999px;
  font-size: .75rem; font-weight: 800; font-stretch: 125%; letter-spacing: .08em; text-transform: uppercase; color: #fff;
  background: var(--red);
  box-shadow: 0 12px 30px -12px rgba(232,54,58,.6);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.pill-hot:hover { transform: translateY(-2px); background: #f04a4e; }
.pill { display: inline-flex; align-items: center; gap: .45rem; padding: .65rem 1.2rem; border-radius: 999px; border: 1.5px solid var(--line); font-size: .68rem; font-weight: 800; font-stretch: 125%; letter-spacing: .08em; text-transform: uppercase; transition: background .3s, color .3s, border-color .3s; white-space: nowrap; }
.pill:hover { background: var(--white); color: var(--black); border-color: var(--white); }
.hi-actions { display: flex; flex-direction: column; align-items: flex-end; gap: .7rem; }

/* hero picker, only while choosing */
.picker { position: absolute; z-index: 6; right: 1rem; bottom: 1rem; display: flex; gap: .4rem; padding: .35rem; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid var(--line-2); }
.picker button { padding: .45rem .9rem; border-radius: 999px; font-size: .68rem; font-weight: 800; font-stretch: 125%; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); }
.picker button[aria-pressed="true"] { background: var(--white); color: var(--black); }

/* marquee of real names */
.names { border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); overflow: hidden; padding: 1.3rem 0; }
.names-track { display: flex; gap: 4rem; width: max-content; animation: marquee 32s linear infinite; }
.names-track span { font-weight: 900; font-stretch: 125%; font-size: clamp(1rem, 2vw, 1.4rem); text-transform: uppercase; color: #8a8a87; white-space: nowrap; display: flex; align-items: center; gap: 4rem; }
.names-track span::after { content: ""; width: 8px; height: 8px; background: var(--red); border-radius: 50%; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================================
   3. SECTIONS on black
   ============================================ */
.sec { padding: clamp(5rem, 12vh, 8rem) 0; }
.sec-title { font-size: clamp(3rem, 10vw, 8rem); color: #d9d9d6; text-align: center; margin-bottom: clamp(2.5rem, 6vh, 4rem); }
.sec-title .o { color: transparent; -webkit-text-stroke: 1.5px #d9d9d6; }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); }
.about-lead { font-size: clamp(1.25rem, 2.2vw, 1.75rem); line-height: 1.35; font-weight: 500; color: var(--white); }
.about-lead + p { margin-top: 1.2rem; color: var(--grey); max-width: 55ch; }
.about-cta { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
.xp-title { color: var(--grey); margin-bottom: 1rem; }
.xp { border-top: 1px solid var(--line-2); }
.xp-item { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 1.2rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line-2); }
.xp-n { font-weight: 900; font-stretch: 125%; font-size: 2.2rem; line-height: 1; color: #d9d9d6; }
.xp-item h3 { font-weight: 800; font-stretch: 125%; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .02em; }
.xp-meta { font-size: .78rem; color: var(--grey); margin: .2rem 0 .6rem; letter-spacing: .03em; }
.xp-item p { color: #c9c9c6; font-size: .95rem; max-width: 62ch; }
.pubs { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.5rem; }
.pub { display: block; border: 1.5px solid var(--line-2); border-radius: 18px; padding: 1.3rem 1.4rem; transition: border-color .3s; }
a.pub:hover { border-color: var(--white); }
.pub .label { color: var(--red); }
.pub h4 { font-weight: 700; font-size: 1.02rem; line-height: 1.35; margin-top: .5rem; }

/* ——— STACKED CARDS (projects + timeline) ——— */
.stack { position: relative; }
.scard {
  position: sticky; top: calc(5.5rem + var(--i) * 3.4rem);
  border: 1.5px solid var(--line); border-radius: 28px; background: var(--panel);
  padding: 1.4rem 1.6rem 1.6rem; margin-bottom: 2.5rem; transform-origin: 50% 0;
  box-shadow: 0 -20px 40px -20px rgba(0,0,0,.9);
}
.scard-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.6rem; }
.scard-id { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.scard-n { font-weight: 900; font-stretch: 125%; font-size: 2.3rem; line-height: 1; }
.scard-t { min-width: 0; }
.scard-t .label { display: block; }
.scard-t strong { display: block; font-size: .82rem; font-weight: 600; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard-body { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1rem; margin-top: 1.2rem; }
.shot { border-radius: 18px; overflow: hidden; background: #1a1a1a; aspect-ratio: 16 / 9; position: relative; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot.svg { background: #f4f1ea; }
.shot.svg img { object-fit: contain; padding: 1rem; }
.shot.text { padding: 1.4rem; display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: auto; min-height: 100%; background: #161616; }
.shot.text p { color: #cfcfcc; font-size: .95rem; line-height: 1.6; }
.shot.text p a { text-decoration: underline; text-underline-offset: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.chips li { font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: .35rem .7rem; border-radius: 999px; background: rgba(255,255,255,.08); color: #d0d0cd; }
.shot.big-type { display: grid; place-items: center; background: linear-gradient(135deg, #1c1c1c, #0f0f0f); }
.shot.big-type span { font-weight: 900; font-stretch: 125%; font-size: clamp(2rem, 5vw, 4rem); line-height: .9; text-transform: uppercase; color: transparent; -webkit-text-stroke: 1.5px #5a5a57; text-align: center; padding: 1rem; }

/* timeline cards are light, like the poster */
.stack.years .scard { background: var(--paper); color: var(--ink); border-color: rgba(0,0,0,.2); }
.stack.years .scard:nth-child(even) { background: var(--paper-2); }
.stack.years .scard-t strong { color: var(--ink-2); white-space: normal; }
.year-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; margin-top: 1.2rem; }
.year-body h3 { font-weight: 900; font-stretch: 125%; font-size: clamp(1.4rem, 3.2vw, 2.4rem); line-height: 1; text-transform: uppercase; max-width: 22ch; }
.year-body p { margin-top: .8rem; color: var(--ink-2); max-width: 64ch; }
.year-big { font-weight: 900; font-stretch: 125%; font-size: clamp(4rem, 12vw, 9rem); line-height: .8; color: var(--red); }
.stack.years .chips li { background: rgba(0,0,0,.07); color: var(--ink); }

/* ——— WRITING ——— */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.post-card { border: 1.5px solid var(--line-2); border-radius: 22px; overflow: hidden; background: var(--panel); display: flex; flex-direction: column; transition: border-color .3s, transform .5s var(--ease); }
.post-card:hover { border-color: var(--white); transform: translateY(-4px); }
.post-card-img { aspect-ratio: 16 / 10; overflow: hidden; background: #1a1a1a; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.post-card:hover .post-card-img img { transform: scale(1.04); }
.post-card-body { padding: 1.1rem 1.2rem 1.4rem; }
.post-card-body .label { color: var(--grey); }
.post-card h3 { font-weight: 800; font-size: 1.1rem; line-height: 1.25; margin-top: .5rem; }
.center { text-align: center; margin-top: 2.5rem; }

/* ——— CONTACT ——— */
.contact { background: var(--paper); color: var(--ink); border-radius: 36px 36px 0 0; padding: clamp(4rem, 10vh, 7rem) 0 clamp(3rem, 8vh, 5rem); position: relative; overflow: hidden; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: end; }
.contact h2 { font-size: clamp(3rem, 9vw, 7.5rem); }
.contact-mail { display: inline-block; margin-top: 1.4rem; font-weight: 800; font-stretch: 125%; font-size: clamp(1rem, 2vw, 1.5rem); border-bottom: 2px solid var(--red); padding-bottom: .2rem; word-break: break-all; }
.contact-links { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; }
.contact .pill { border-color: rgba(0,0,0,.45); }
.contact .pill:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.shapes { display: flex; justify-content: space-between; align-items: end; gap: .5rem; margin-top: clamp(3rem, 8vh, 5rem); }
.shapes svg { flex: 1; height: auto; max-width: 14%; }

/* ============================================
   BLOG
   ============================================ */
.page-header { padding: 8rem 0 2.5rem; }
.page-header-inner, .blog-list-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.page-title { font-weight: 900; font-stretch: 125%; text-transform: uppercase; font-size: clamp(3.5rem, 12vw, 9rem); line-height: .9; color: #d9d9d6; }
.page-subtitle { color: var(--grey); max-width: 55ch; margin-top: 1rem; }
.page-label { display: none; }
.blog-list { padding-bottom: 6rem; }
.year-marker { font-weight: 900; font-stretch: 125%; font-size: 1.4rem; color: var(--red); margin: 2.5rem 0 1rem; }
.blog-list-item { margin-bottom: 1rem; }
.blog-list-link { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.5rem; padding: 1rem; border: 1.5px solid var(--line-2); border-radius: 22px; background: var(--panel); transition: border-color .3s; align-items: center; }
.blog-list-link:hover { border-color: var(--white); }
.blog-list-thumb { aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: #1a1a1a; }
.blog-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-list-thumb.empty { display: grid; place-items: center; font-weight: 900; font-stretch: 125%; font-size: 2rem; color: #333; }
.blog-list-date { font-size: .72rem; font-weight: 700; font-stretch: 125%; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); }
.blog-list-title { font-weight: 800; font-size: clamp(1.15rem, 2.2vw, 1.5rem); line-height: 1.2; margin: .35rem 0 .4rem; }
.blog-list-desc { color: #bdbdba; font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-list-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem; }
.tag { font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 999px; background: rgba(255,255,255,.08); color: #cfcfcc; }
.blog-list-views { display: inline-block; margin-top: .5rem; font-size: .75rem; color: var(--grey); }

/* post: light reading sheet on black */
.post-article { max-width: 880px; margin: 6.5rem auto 5rem; padding: 0 var(--gutter); }
.sheet { background: var(--paper-2); color: var(--ink); border-radius: 28px; padding: clamp(1.5rem, 5vw, 3.5rem); }
.post-back { display: inline-block; font-size: .72rem; font-weight: 800; font-stretch: 125%; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1.5rem; }
.post-back:hover { color: var(--red); }
.post-header-meta { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); line-height: 1.9; }
.post-header-meta .meta-sep { margin: 0 .4em; opacity: .6; }
.post-title { font-weight: 900; font-stretch: 125%; text-transform: uppercase; font-size: clamp(2rem, 5.5vw, 3.6rem); line-height: .95; letter-spacing: -.01em; margin: .8rem 0 1rem; }
.post-description { font-size: 1.1rem; line-height: 1.6; color: var(--ink-2); max-width: 65ch; }
.post-byline { font-size: .85rem; color: var(--ink-2); margin-top: 1rem; }
.post-byline a { border-bottom: 1px solid currentColor; }
.post-header-rule { height: 3px; width: 64px; background: var(--red); margin-top: 1.8rem; }
.post-poster { margin: 1.8rem 0 0; border-radius: 18px; overflow: hidden; }
.post-poster img { width: 100%; height: auto; }
.post-body { padding-top: 2.5rem; }
.post-content { max-width: 68ch; font-size: 1.08rem; line-height: 1.8; }
.post-content p { margin-bottom: 1.4em; }
.post-content p:last-child { margin-bottom: 0; }
.post-content h2 { font-weight: 900; font-stretch: 125%; text-transform: uppercase; font-size: clamp(1.35rem, 3vw, 1.8rem); line-height: 1.05; margin: 2.2em 0 .7em; }
.post-content h3 { font-weight: 800; font-size: 1.2rem; margin: 1.8em 0 .5em; }
.post-content a { color: #b8262a; text-decoration: underline; text-underline-offset: 3px; }
.post-content a:hover { text-decoration-color: transparent; }
.post-content strong { font-weight: 700; }
.post-content blockquote { margin: 2em 0; padding: .2em 0 .2em 1.3em; border-left: 3px solid var(--red); font-size: 1.2rem; font-weight: 500; }
.post-content code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .86em; background: rgba(0,0,0,.07); padding: .12em .38em; border-radius: 4px; }
.post-content pre { background: var(--black); color: #e8e8e6; padding: 1.4rem; border-radius: 16px; overflow-x: auto; margin: 1.6em 0; font-size: .86rem; line-height: 1.6; }
.post-content pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.post-content pre .z-comment { color: #8a8a87; font-style: italic; }
.post-content pre .z-string { color: #ffb86b; }
.post-content pre .z-constant.z-numeric, .post-content pre .z-constant.z-language { color: #ff7a7e; }
.post-content pre .z-keyword, .post-content pre .z-storage { color: #ff5fa2; }
.post-content pre .z-support.z-function, .post-content pre .z-entity.z-name.z-function { color: #c9a0ff; }
.post-content pre .z-entity.z-name.z-class, .post-content pre .z-entity.z-name.z-type { color: #ffd479; }
.post-content pre .z-punctuation { color: #9c9c99; }
.post-content ul, .post-content ol { margin: 1em 0 1.5em 1.4em; }
.post-content li { margin-bottom: .4em; list-style: disc; }
.post-content ol li { list-style: decimal; }
.post-content hr { border: 0; border-top: 1px solid rgba(0,0,0,.15); margin: 2.5em 0; }
.post-content img, .post-content video { width: 100%; height: auto; border-radius: 14px; margin: 1.6em 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .95rem; }
.post-content th, .post-content td { text-align: left; padding: .5em .6em; border-bottom: 1px solid rgba(0,0,0,.15); }
.related-posts { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(0,0,0,.15); }
.related-posts-title { font-weight: 900; font-stretch: 125%; text-transform: uppercase; font-size: 1.1rem; margin-bottom: .8rem; }
.related-posts-list li { padding: .35rem 0; }
.related-posts-list a { border-bottom: 1.5px solid var(--red); }
.post-footer { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(0,0,0,.15); }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2rem; }
.post-nav-link { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.2rem; border: 1.5px solid rgba(0,0,0,.2); border-radius: 18px; transition: border-color .3s; }
.post-nav-link:hover { border-color: var(--ink); }
.post-nav-next { text-align: right; }
.post-nav-label { font-size: .68rem; font-weight: 800; font-stretch: 125%; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.post-nav-title { font-weight: 700; line-height: 1.3; }
.post-share { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.post-share-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.3rem; border: 1.5px solid var(--ink); border-radius: 999px; font-size: .72rem; font-weight: 800; font-stretch: 125%; letter-spacing: .08em; text-transform: uppercase; transition: background .3s, color .3s; }
.post-share-btn svg { width: 14px; height: 14px; }
.post-share-btn:hover, .post-share-btn.is-copied { background: var(--ink); color: var(--paper-2); }
.post-footer-cta { text-align: center; color: var(--ink-2); }
.post-footer-cta a { color: #b8262a; border-bottom: 1px solid currentColor; }

html.read-mode .site-header, html.read-mode .site-footer, html.read-mode .post-back, html.read-mode .post-footer-cta { display: none !important; }

/* ——— FOOTER ——— */
.site-footer { background: var(--black); color: var(--grey); border-top: 1px solid var(--line-2); padding: 2rem 0; }
body.home .site-footer { background: var(--paper); color: var(--ink); border-top: 0; padding-top: 0; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-name { font-weight: 900; font-stretch: 125%; text-transform: uppercase; font-size: .9rem; }
.footer-social { display: flex; gap: 1.4rem; }
.footer-social a { font-size: .72rem; font-weight: 800; font-stretch: 125%; letter-spacing: .08em; text-transform: uppercase; }
.footer-social a:hover { color: var(--red); }
.footer-copy { font-size: .75rem; width: 100%; opacity: .7; }

/* ——— EASTER EGGS ——— */
.secret-toast { position: fixed; left: 50%; bottom: 2rem; z-index: 90; transform: translate(-50%, 20px); background: var(--white); color: var(--black); padding: 1rem 1.4rem; border-radius: 18px; font-weight: 800; font-stretch: 125%; text-transform: uppercase; font-size: .85rem; white-space: pre-line; text-align: center; opacity: 0; transition: opacity .4s var(--ease), transform .6s var(--ease); }
.secret-toast.show { opacity: 1; transform: translate(-50%, 0); }
.confetti-piece { position: fixed; top: -12px; width: 8px; height: 14px; z-index: 95; pointer-events: none; animation: fall 2s linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: .2; } }

/* ——— RESPONSIVE ——— */
@media (max-width: 900px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .contact-links { justify-content: flex-start; }
  .posts { grid-template-columns: 1fr 1fr; }
  .pubs { grid-template-columns: 1fr; }
  .scard-body { grid-template-columns: 1fr; }
  .scard-body .shot.side { display: none; }
}
@media (max-width: 720px) {
  .nav-links { display: none; position: absolute; top: 100%; right: var(--gutter); flex-direction: column; align-items: flex-end; gap: 1rem; padding: 1rem 0; }
  .nav-inner.open .nav-links { display: flex; }
  .nav-toggle { display: grid; place-items: center; width: 40px; height: 40px; }
  .nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; margin: 3px 0; transition: transform .3s; }
  .nav-inner.open .nav-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-inner.open .nav-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .word h1, .word-echo { font-size: 12.2vw; font-stretch: 112%; }
  .stage { height: 240px; }
  .tri { display: none; }
    .hi-figure { position: relative; left: auto; transform: none; width: 86%; margin: 1.5rem auto 0; }
  .hi-row { flex-direction: column; }
  .hi-actions { align-items: flex-start; }
  .posts { grid-template-columns: 1fr; }
  .scard { padding: 1.1rem 1.1rem 1.2rem; border-radius: 22px; top: calc(4.8rem + var(--i) * 2.6rem); }
  .scard-n { font-size: 1.8rem; }
  .scard-head .pill { padding: .5rem .8rem; }
  .year-body { grid-template-columns: 1fr; gap: 1rem; }
  .year-big { order: -1; }
  .blog-list-link { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-next { text-align: left; }
  .shapes svg { max-width: 18%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}

/* ——— ABOUT: card wheel left, story right ——— */
.about-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.about-wheel { margin-top: clamp(3.5rem, 8vh, 5.5rem); }
.about-main .pubs { margin-bottom: 2.5rem; }
.xp-wrap { margin-top: .5rem; }

.fan { --cw: clamp(180px, 15vw, 220px); --ch: calc(var(--cw) * 1.36); --r: calc(var(--ch) * 3.2);
  position: relative; height: calc(var(--ch) * 1.6); overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.wc {
  position: absolute; left: calc(50% - var(--cw) / 2); top: 22px; width: var(--cw); height: var(--ch);
  display: flex; flex-direction: column; padding: 1.1rem 1.1rem 1.2rem; border-radius: 20px;
  background: var(--c); color: var(--ink);
  box-shadow: 0 24px 40px -18px rgba(0,0,0,.8), inset 0 0 0 1px rgba(255,255,255,.12);
  transform-origin: 50% calc(var(--ch) / 2 + var(--r));
  transform: rotate(calc(var(--a, 0) * 1deg));
  transition: transform .75s var(--ease), opacity .5s var(--ease), box-shadow .4s;
  -webkit-user-drag: none;
}
.fan.dragging .wc { transition: opacity .5s var(--ease); }
.wc.is-front { box-shadow: 0 30px 50px -16px rgba(0,0,0,.9), 0 0 0 2px var(--white); }
.wc.is-far { opacity: 0; pointer-events: none; }
.wc-top { display: flex; justify-content: space-between; align-items: center; }
.wc-n { font-weight: 900; font-stretch: 125%; font-size: .85rem; letter-spacing: .04em; opacity: .75; }
.wc-icon { width: 30px; height: 30px; }
.wc-title { margin-top: auto; font-weight: 900; font-stretch: 112%; font-size: clamp(1.15rem, 1.5vw, 1.4rem); line-height: 1.05; text-transform: uppercase; letter-spacing: -.005em; }
.wc-teaser { margin-top: .5rem; font-size: .88rem; line-height: 1.4; font-weight: 500; opacity: .9; }
.wc-open { margin-top: .9rem; font-size: .7rem; font-weight: 800; font-stretch: 125%; letter-spacing: .08em; text-transform: uppercase; }
.fan-dial { display: none; position: absolute; left: 50%; top: calc(22px + var(--ch) / 2 + var(--r)); width: calc((var(--r) - var(--ch) / 2 - 18px) * 2); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 1px dashed rgba(255,255,255,.25); display: flex; justify-content: center; pointer-events: none; }
.fan-dial span { margin-top: 14px; font-weight: 900; font-stretch: 125%; font-size: .9rem; letter-spacing: .2em; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.fan-dial span::before { content: ""; border: 6px solid transparent; border-bottom: 9px solid var(--white); border-top: 0; }
.fan-controls { display: flex; justify-content: center; align-items: center; gap: 1.2rem; margin-top: .6rem; }
.fan-btn { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; transition: background .3s, color .3s; }
.fan-btn:hover { background: var(--white); color: var(--black); }
.fan-btn svg { width: 16px; height: 16px; }
.fan-count { min-width: 4.5em; text-align: center; color: var(--grey); }
.fan-hint { text-align: center; color: #6f6f6c; margin-top: .6rem; }

/* small screens: a swipeable row instead of a fan */
@media (max-width: 900px) {
  .about-split { grid-template-columns: minmax(0, 1fr); }
  .about-wheel { position: static; }
  .fan { height: auto; display: flex; gap: .9rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .5rem var(--gutter) 1.2rem; margin: 0 calc(var(--gutter) * -1); scrollbar-width: none; }
  .fan::-webkit-scrollbar { display: none; }
  .wc { position: relative; left: auto; top: auto; flex: 0 0 68%; max-width: 260px; height: auto; min-height: 250px; transform: none !important; opacity: 1 !important; pointer-events: auto !important; scroll-snap-align: center; }
  .wc.is-front { box-shadow: 0 24px 40px -18px rgba(0,0,0,.8), inset 0 0 0 1px rgba(255,255,255,.12); }
  .fan-dial, .fan-hint { display: none; }
}

/* ——— CARD PAGES ——— */
.cp-head { background: var(--c); color: var(--ink); padding: 7rem 0 3.5rem; border-radius: 0 0 36px 36px; }
.cp-back { display: inline-block; margin-bottom: 2rem; opacity: .85; }
.cp-back:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.cp-title-row { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.cp-title-row .wc-icon { width: 34px; height: 34px; }
.cp-head h1 { font-size: clamp(2.6rem, 8vw, 6.5rem); max-width: 14ch; }
.cp-teaser { margin-top: 1.2rem; font-size: clamp(1.05rem, 1.8vw, 1.3rem); font-weight: 500; max-width: 48ch; }
.cp-body { max-width: 880px; padding: clamp(2.5rem, 6vh, 4rem) 0 2rem; }
.cp-note { color: var(--grey); margin-bottom: 1.8rem; }
.cp-body h2 { font-weight: 900; font-stretch: 125%; text-transform: uppercase; font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin: 2.4rem 0 1rem; color: var(--c); }
.cp-body h2:first-of-type { margin-top: 0; }
.cp-body ol { list-style: none; counter-reset: n; border-top: 1px solid var(--line-2); }
.cp-body ol li { counter-increment: n; position: relative; padding: 1.3rem 0 1.3rem 5rem; border-bottom: 1px solid var(--line-2); font-size: clamp(1.05rem, 1.7vw, 1.3rem); line-height: 1.45; color: #dcdcd9; }
.cp-body ol li::before { position: absolute; left: 0; top: 1.35rem; content: counter(n, decimal-leading-zero); font-weight: 900; font-stretch: 125%; font-size: 1.6rem; line-height: 1; color: var(--c); }
.cp-body strong { color: var(--white); font-weight: 700; }
.cp-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.cp-photos figure { border-radius: 20px; overflow: hidden; background: #111; position: relative; aspect-ratio: 3 / 4; }
.cp-photos img { width: 100%; height: 100%; object-fit: cover; }
.cp-photos figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem .9rem .8rem; font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.cp-nav { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1rem 0 5rem; }

/* card pages: plain nav in the page's ink colour instead of the inverting blend */
body.cardpage .site-header { mix-blend-mode: normal; color: var(--page-ink); }
body.cardpage .nav-toggle span { background: var(--page-ink); }

/* ——— GLASS: blog list + homepage writing cards ——— */
.glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.glow span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; }
.glow .g1 { width: 46vw; height: 46vw; left: -10vw; top: -8vw; background: #2d4bff; animation: drift 22s ease-in-out infinite alternate; }
.glow .g2 { width: 38vw; height: 38vw; right: -8vw; top: 20vh; background: #e8363a; animation: drift 26s ease-in-out infinite alternate-reverse; }
.glow .g3 { width: 34vw; height: 34vw; left: 30vw; bottom: -14vw; background: #8b5cf6; animation: drift 30s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(6vw, 4vh) scale(1.1); } }
.page-header, .blog-list { position: relative; z-index: 1; }
.blog-list-link, .post-card {
  background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 20px 40px -24px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.18);
}
.blog-list-link:hover, .post-card:hover { border-color: rgba(255,255,255,.45); background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.05)); }
.tag { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.14); }
.year-marker { color: #fff; }
#writing { position: relative; overflow: hidden; }
#writing::before, #writing::after { content: ""; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45; pointer-events: none; }
#writing::before { width: 40vw; height: 40vw; left: -8vw; top: 10%; background: #2d4bff; }
#writing::after { width: 34vw; height: 34vw; right: -6vw; bottom: 0; background: #e8363a; }
#writing .wrap { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .glow span { animation: none; } }

.blog-list-tags { grid-column: 2; }
@media (max-width: 720px) { .blog-list-tags { grid-column: 1; } .cp-body ol li { padding-left: 3.6rem; } }

.hi .stage, .hi > .wrap { position: relative; z-index: 2; }
/* rotating line: old line leaves quickly, new one arrives after it */
html.js .hi-line span { transition: opacity .35s ease, transform .35s ease; }
html.js .hi-line span.on { transition: opacity .8s var(--ease) .35s, transform .8s var(--ease) .35s; }
.hi-line { min-height: 3.2em; }

/* ——— site-wide node network ——— */
.nodes { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
main, .site-footer { position: relative; z-index: 1; }
/* long card titles (e.g. CERTIFICATIONS) stay inside the card */
.wc { overflow: hidden; }
.wc-title { font-size: clamp(1rem, 1.25vw, 1.25rem); overflow-wrap: anywhere; hyphens: auto; }

/* view counts: readable on glass and on the paper sheet */
.blog-list-views { color: #e6e6e3; font-weight: 600; }
.post-header-meta .post-views { color: var(--ink); font-weight: 700; }

/* long single words in big titles break instead of pushing the page sideways */
.post-title, .cp-head h1, .page-title, .year-body h3 { overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 720px) {
  .post-title { font-size: clamp(1.7rem, 8.4vw, 2.4rem); }
  /* timeline: tags drop under the chapter label instead of colliding with it */
  .stack.years .scard-head { flex-direction: column; align-items: flex-start; gap: .7rem; }
}

/* phones: same composition as the laptop, name, then photo in front of the red bar, then text */
@media (max-width: 720px) {
  .hi { padding-top: 5.2rem; }
  .hi .stage { order: 1; height: 250px; margin-top: .6rem; }
  .hi .hi-figure { order: 2; position: relative; left: auto; bottom: auto; transform: none;
    width: 82%; margin: -150px auto 0; z-index: 4; }
  .hi.show-avatar .hi-figure { transform: none; }
  .hi-figure img { -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }
  .hi > .wrap { order: 3; margin-top: -1rem; }
  .hi-row { margin-top: 0; }
  .stage-tl, .stage-mark { top: .9rem; }
  .stage-br { bottom: .9rem; }
  .picker { position: relative; right: auto; bottom: auto; order: 4; align-self: center; margin-top: 2rem; }
}
@media (max-width: 720px) {
  .hi .hi-figure { width: 76%; margin-top: -100px; }
  .stage-mark { display: none; }
  .stage-br { top: .9rem; bottom: auto; right: 4%; }
}
/* phones: let the finger scroll the card row sideways */
@media (max-width: 900px) { .fan { touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; } }
