/* ============================================================
   Sharif Sule Ndlovu — Creative Portfolio
   Style: creative · one-page · DM Sans grotesque · gold on near-black
   No border-radius. No box-shadow. Hairline rules only.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg:            #0D0D0D;
  --surface:       #141414;
  --primary:       #1C1C1C;
  --accent:        #C9A063;
  --accent-hi:     #DDB87A;
  --text:          #EDE8E0;
  --muted:         #A8A29A;
  --line:          rgba(237,232,224,0.10);
  --line-accent:   rgba(201,160,99,0.30);
  --danger:        #B4452F;

  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono:    'SF Mono', SFMono-Regular, ui-monospace, 'Cascadia Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  --text-display:  clamp(6rem, 14vw, 18rem);
  --text-hero:     clamp(3.5rem, 13vw, 11rem);
  --text-section:  clamp(2.5rem, 7vw, 6rem);
  --text-sub:      clamp(1.6rem, 3.5vw, 2.6rem);

  --tracking-display: -0.01em;
  --tracking-label:   0.18em;

  --section-pad:  clamp(8vh, 15vh, 20vh);
  --margin-outer: clamp(4vw, 6vw, 8vw);

  --ease-primary: cubic-bezier(.19, 1, .22, 1);
  --speed: 0.6s;

  /* node-view canvas (light, inverted) — warm cream for Gold */
  --nv-bg: #F4F1EA;
  --nv-veil-rgb: 20, 17, 12;
}

/* ---------- Themes (rotate --vars) ---------- */
/* 01 Gold (default, same as :root) */
body[data-theme="gold"] {
  --bg:#0D0D0D; --surface:#141414; --primary:#1C1C1C;
  --accent:#C9A063; --accent-hi:#DDB87A; --text:#EDE8E0; --muted:#A8A29A;
  --line:rgba(237,232,224,0.10); --line-accent:rgba(201,160,99,0.30);
}
/* 02 Mono — graduated graphite range: charcoal → mid-grays → silver → off-white */
body[data-theme="mono"] {
  --bg:#121314;        /* deep charcoal base            */
  --surface:#1F2123;   /* raised panels                 */
  --primary:#2C2F32;   /* deepest inset / mid-dark       */
  --accent:#C2C6CB;    /* silver highlight (CTAs, rules) */
  --accent-hi:#E6E9EC; /* near-white hover               */
  --text:#ECEEF0;      /* off-white body                 */
  --muted:#7E838B;     /* mid gray (metadata, captions)  */
  --line:rgba(236,238,240,0.10);
  --line-accent:rgba(194,198,203,0.30);
  /* cool neutral light-gray canvas for Mono */
  --nv-bg:#E7E8EA;
  --nv-veil-rgb: 16, 17, 19;
}
/* 03 Mix — eclectic earthy: cream-neutral scaffolding, decorative accents scatter the palette via JS */
body[data-theme="mix"] {
  --bg:#0D0D0D; --surface:#161412; --primary:#201D1A;
  --accent:#EDE9E6; --accent-hi:#FFFFFF; --text:#E9E4DF; --muted:#948C84;
  --line:rgba(233,228,223,0.10); --line-accent:rgba(237,233,230,0.22);
  --nv-bg:#EDE9E6; --nv-veil-rgb: 24, 20, 16;
}
/* 04 Light — warm cream / dark amber accent */
body[data-theme="light"] {
  --bg:          #F5F1EB;
  --surface:     #EDE8DF;
  --primary:     #E4DDD2;
  --accent:      #9B6B3A;
  --accent-hi:   #C9A063;
  --text:        #1C1814;
  --muted:       #7A7168;
  --line:        rgba(28,24,20,0.12);
  --line-accent: rgba(155,107,58,0.28);
  --nv-bg:       #0D0D0D;
  --nv-veil-rgb: 245, 241, 235;
}
/* Nav overrides — hardcoded #fff values only apply on dark themes */
body[data-theme="light"] .nav__brand { color: var(--text); }
body[data-theme="light"] .nav__link { color: rgba(28,24,20,0.5); }
body[data-theme="light"] .nav__link:hover,
body[data-theme="light"] .nav__link.is-active { color: var(--text); }
/* photo-fullbleed — base bg + gradient overlay use cream values in light mode */
body[data-theme="light"] .photo-fullbleed { background: #F5F1EB; }
body[data-theme="light"] .photo-fullbleed::after {
  background: linear-gradient(to top, rgba(245,241,235,0.95), rgba(245,241,235,0.2) 60%, rgba(245,241,235,0.5));
}
/* Smooth theme cross-fade */
body, .section--dark, .section--accent, .site-nav, .site-footer,
.section, .skill-list li, .project, .aws-cell, .academic__cell, .cert-list li, .edu-entry {
  transition: background-color 0.5s var(--ease-primary), color 0.5s var(--ease-primary), border-color 0.5s var(--ease-primary);
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; border-radius: 0 !important; }
::-webkit-scrollbar { display: none; }
html { scrollbar-width: none; -ms-overflow-style: none; scroll-behavior: auto; }
html, body { background: var(--bg); color: var(--text); }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--bg); }

/* ---------- Film grain (FG-01) — hero only ---------- */
.section-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Cursor (split dot + ring) ---------- */
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999; transform: translate(-50%, -50%); }
.cursor-dot {
  width: 6px; height: 6px; background: #1b1b1b;
  transition: background 0.25s ease, opacity 0.3s ease, transform 0.25s var(--ease-primary);
}
.cursor-ring {
  width: 32px; height: 32px; border: 1px solid rgba(27,27,27,0.5);
  z-index: 9998;
  transition: border-color 0.25s ease, background 0.25s ease, opacity 0.3s ease;
}
.cursor-dot.is-light  { background: #fff; }
.cursor-ring.is-light { border-color: rgba(255,255,255,0.7); }
/* interactive hover — ring grows to a filled accent puck, dot hides inside */
.cursor-ring.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.cursor-dot.is-active  { transform: translate(-50%, -50%) scale(0.4); }

/* Force the custom cursor over every interactive element — no OS pointer */
a, button, .text-link, .nav__link, .nav-toggle, .theme-toggle, label, [role="button"], .project, summary { cursor: none; }

/* ---------- Loader (clip-path) ---------- */
#loader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.9s var(--ease-primary);
}
#loader.is-done { clip-path: inset(0 0 100% 0); pointer-events: none; }
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.loader-face { width: clamp(74px, 9vw, 104px); height: auto; animation: loaderSpin 1.5s linear infinite; }
.loader-bar { width: clamp(170px, 22vw, 240px); height: 2px; background: var(--line); overflow: hidden; }
.loader-bar__fill { display: block; width: 100%; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; animation: loaderFill 1.3s var(--ease-primary) forwards; }
.loader-pct { font-family: var(--font-body); font-size: 0.56rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
@keyframes loaderSpin { to { transform: rotate(360deg); } }
@keyframes loaderFill { to { transform: scaleX(1); } }

/* ---------- Scroll progress rail ---------- */
#progress-rail {
  position: fixed; left: 0; top: 0; bottom: 0; width: 1px;
  background: var(--line); z-index: 200; pointer-events: none;
}
#progress-rail::after {
  content: ''; position: absolute; top: 0; left: 0; width: 1px;
  height: var(--p, 0%); background: var(--accent);
}

/* ---------- Nav (edge-pinned, unconventional) ---------- */
.site-nav {
  position: fixed; top: 0; right: 0; z-index: 300;
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 10px; padding: var(--margin-outer) var(--margin-outer);
  color: var(--text);   /* was mix-blend-mode:difference — per-frame re-blend janks Firefox */
}
.nav__brand {
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.02em; color: #fff; margin-bottom: 6px;
}
.nav__brand .dot { color: var(--accent); }
.nav__link {
  font-size: 0.6rem; font-weight: 600; letter-spacing: var(--tracking-label);
  text-transform: uppercase; color: rgba(255,255,255,0.5);
  position: relative; transition: color 0.3s var(--ease-primary);
}
.nav__link::after {
  content: ''; position: absolute; right: 0; bottom: -3px; width: 0; height: 1px;
  background: var(--accent); transition: width 0.35s var(--ease-primary);
}
.nav__link:hover, .nav__link.is-active { color: #fff; }
.nav__link:hover::after, .nav__link.is-active::after { width: 100%; }

.nav-toggle { display: none; }

/* ---------- Sections ---------- */
.section { padding: var(--section-pad) var(--margin-outer); position: relative; }
.section--dark { background: var(--surface); }
.section--accent { background: var(--accent); color: var(--bg); }

.eyebrow {
  font-size: 0.62rem; font-weight: 600; letter-spacing: var(--tracking-label);
  text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: 10px;
}
.section--accent .eyebrow { color: var(--bg); }
.section-num {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.4rem); color: var(--accent);
  letter-spacing: 0; margin-bottom: 1.4rem; display: block;
}
.section--accent .section-num { color: var(--bg); }
.section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--text-section); line-height: 0.92;
  letter-spacing: var(--tracking-display);
}

/* ---------- Hero ---------- */
.section-hero {
  min-height: 101vh; position: relative; overflow: hidden;
  isolation: isolate;            /* contain the grain/faces z-index to the hero — can't paint over other sections */
  contain: paint;               /* hard clip the hero's painting to its box on mobile */
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  padding: calc(var(--margin-outer) + 4vh) var(--margin-outer);
  background: var(--bg);
}
/* hero background — drifting tiled face-echo (theme-tinted, faint, soft) */
.hero-faces { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.hero-faces__tilt { position: absolute; inset: 0; }
.hero-faces__grid {
  position: absolute; top: -20%; left: -20%; width: 140%; height: 140%;
  background: var(--accent);
  -webkit-mask-image: url('../img/hero-portrait.png'); mask-image: url('../img/hero-portrait.png');
  -webkit-mask-repeat: repeat; mask-repeat: repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: 118px auto; mask-size: 118px auto;
  opacity: 0.10; will-change: transform;
  animation: heroFacesDrift 54s linear infinite;
}
@keyframes heroFacesDrift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-118px, 0, 0); } }
/* small framed portrait — placement temporary (to be relocated) */
.hero-frame {
  position: absolute; top: var(--margin-outer); left: var(--margin-outer); z-index: 1;
  width: clamp(120px, 14vw, 190px); aspect-ratio: 4 / 5; overflow: hidden;
  border: 1px solid var(--line-accent); pointer-events: auto; cursor: pointer;
}
.hero-frame .hf-rest, .hero-frame .hf-play {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top center; filter: grayscale(0.15);
}
.hero-frame .hf-play { opacity: 0; transition: opacity 0.3s var(--ease-primary); }
.hero-frame.is-on .hf-rest { opacity: 0; transition: opacity 0.3s var(--ease-primary); }
.hero-frame.is-on .hf-play { opacity: 1; }
.hero-frame:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* discoverability: periodic shine glint (mostly off-screen → reads as an occasional sweep) */
.hero-frame::after {
  content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,0.20) 50%, transparent 62%);
  transform: translateX(-130%);
  animation: frameShine 6.5s ease-in-out infinite;
}
@keyframes frameShine { 0%, 74% { transform: translateX(-130%); } 88%, 100% { transform: translateX(130%); } }
/* discoverability: one-time "Hover" caption (fades on activate / once seen) */
.hero-frame__hint {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; pointer-events: none;
  padding: 18px 6px 7px; text-align: center;
  font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; color: var(--accent-hi);
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.28) 55%, transparent);
  animation: hintPulse 2.2s ease-in-out infinite;
  transition: opacity 0.3s var(--ease-primary);
}
@keyframes hintPulse { 0%, 100% { opacity: 0.72; } 50% { opacity: 1; } }
.hero-frame.is-on::after, .hero-frame.is-on .hero-frame__hint,
.hero-frame.seen .hero-frame__hint { opacity: 0 !important; animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .hero-frame::after, .hero-frame__hint { animation: none; }
  .hero-frame::after { opacity: 0; }
}
.hero-top {
  position: absolute; top: var(--margin-outer); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.hero-meta { font-size: 0.62rem; font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--muted); }
.hero-title { position: relative; z-index: 2; }
.hero-line {
  display: block; font-family: var(--font-display); font-weight: 600;
  font-size: var(--text-hero); line-height: 0.86;
  letter-spacing: var(--tracking-display); color: var(--text);
}
.hero-line.is-accent { color: var(--accent); }
.hero-rule { width: clamp(60px, 12vw, 180px); height: 2px; background: var(--accent); margin: 2rem auto 1.6rem; transform-origin: center; }
.hero-aside { position: relative; z-index: 2; max-width: 540px; margin: 0 auto; }
.hero-body { color: var(--muted); font-size: clamp(0.95rem, 1.4vw, 1.1rem); line-height: 1.7; margin-bottom: 2rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: clamp(14px, 2.2vw, 30px); align-items: center; justify-content: center; }
.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text);
  position: relative; padding: 10px 1px 11px; transition: color 0.3s var(--ease-primary);
}
/* persistent baseline rule */
.text-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--line);
}
/* accent rule that wipes in on hover */
.text-link::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.45s var(--ease-primary); z-index: 1;
}
.text-link:hover { color: var(--accent); }
.text-link:hover::before { transform: scaleX(1); }
.text-link .tl-arrow { color: var(--accent); font-size: 0.92em; line-height: 1; display: inline-block; transition: transform 0.35s var(--ease-primary); }
.text-link:hover .tl-arrow { transform: translate(3px, -3px); }
/* primary CTA — Download CV */
.text-link--primary { color: var(--accent); }
.text-link--primary::after { background: var(--line-accent); }
.text-link--primary:hover { color: var(--accent-hi); }
.text-link--primary:hover .tl-arrow { transform: translateY(3px); }

/* ---------- About (deliberate emptiness) ---------- */
.section-about { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; }
.about-statement {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.8rem, 4.2vw, 3.6rem); line-height: 1.12;
  letter-spacing: -0.02em; max-width: 22ch; margin-top: 2rem;
}
.about-statement em { color: var(--accent); font-style: normal; }
.about-foot { margin-top: clamp(3rem, 8vh, 8rem); display: flex; flex-wrap: wrap; gap: 2.5rem; color: var(--muted); font-size: 0.7rem; letter-spacing: var(--tracking-label); text-transform: uppercase; }

/* ---------- Projects ---------- */
.section-head { margin-bottom: clamp(3rem, 8vh, 7rem); }
.project { display: grid; grid-template-columns: 55fr 45fr; gap: clamp(1.5rem, 4vw, 4rem); padding: clamp(3rem, 7vh, 6rem) 0; border-top: 1px solid var(--line); align-items: start; }
.project:last-of-type { border-bottom: 1px solid var(--line); }
/* zigzag — odd rows (01, 03) put the image on the left */
.project:nth-of-type(odd) { grid-template-columns: 45fr 55fr; }
.project:nth-of-type(odd) .project__media { order: -1; }
.project__cat { color: var(--accent); }
.project__name {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 5vw, 4rem); line-height: 0.95;
  letter-spacing: var(--tracking-display); margin: 1rem 0 1.4rem;
  position: relative; display: inline-block; transition: transform 0.4s var(--ease-primary);
}
.project__name::after {
  content: ''; position: absolute; left: 0; bottom: -6px; width: 100%; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease-primary);
}
.project:hover .project__name { transform: translateX(6px); }
.project:hover .project__name::after { transform: scaleX(1); }
.project__desc { color: var(--muted); max-width: 46ch; margin-bottom: 1.6rem; }
.project__features { list-style: none; margin-bottom: 1.6rem; }
.project__features li { position: relative; padding: 0.55rem 0 0.55rem 1.4rem; border-top: 1px solid var(--line); font-size: 0.92rem; color: var(--text); }
.project__features li::before { content: ''; position: absolute; left: 0; top: 0.95rem; width: 6px; height: 6px; background: var(--accent); }
.project__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 0.58rem; font-weight: 600; letter-spacing: var(--tracking-label);
  text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line); padding: 6px 12px;
}
.project__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--line); }
.project__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter 0.6s var(--ease-primary), transform 0.8s var(--ease-primary); }
.project:hover .project__media img { filter: grayscale(0) contrast(1); transform: scale(1.04); }
.project__media-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 10px; color: var(--text-3, #5C5854);
  background: var(--surface);
}
.project__media-empty span { font-size: 0.6rem; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--muted); }
.project__media-empty .num { font-family: var(--font-display); font-weight: 700; font-size: 3rem; color: var(--line-accent); }

/* ---------- Academic grid ---------- */
.academic { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(2rem, 5vh, 4rem); }
.academic__cell { padding: clamp(1.6rem, 3vw, 2.6rem) clamp(1.2rem, 2vw, 2rem); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.academic__cell:first-child { border-left: none; }
.academic__num { font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; color: color-mix(in srgb, var(--accent) 66%, var(--bg)); line-height: 1; }
.academic__cat { color: var(--accent); margin: 0.8rem 0 0.4rem; }
.academic__name { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; margin-bottom: 0.8rem; }
.academic__desc { color: var(--muted); font-size: 0.85rem; margin-bottom: 1.2rem; }

/* ---------- Full-bleed photo beat ---------- */
.photo-fullbleed { position: relative; min-height: 90vh; display: flex; align-items: flex-end; background: #000; }
.photo-fullbleed__media { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.photo-fullbleed img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; opacity: 0.55; filter: grayscale(1) contrast(1.1); }
/* larger screens: crisp tiled pattern of the face (theme-tinted) instead of one stretched image */
@media (min-width: 769px) {
  .photo-fullbleed__media img { display: none; }
  .photo-fullbleed__media {
    background: var(--accent);
    -webkit-mask-image: url('../img/hero-portrait.png');
            mask-image: url('../img/hero-portrait.png');
    -webkit-mask-repeat: repeat; mask-repeat: repeat;
    -webkit-mask-size: clamp(96px, 9vw, 150px) auto; mask-size: clamp(96px, 9vw, 150px) auto;
    -webkit-mask-position: center; mask-position: center;
    opacity: 0.3;
  }
}
.photo-fullbleed::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(13,13,13,0.95), rgba(13,13,13,0.2) 60%, rgba(13,13,13,0.5)); }
.photo-fullbleed__quote { position: relative; z-index: 2; padding: var(--section-pad) var(--margin-outer); max-width: min(82vw, calc(34ch + 2 * var(--margin-outer))); }
.photo-fullbleed__quote p { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 4vw, 3.2rem); line-height: 1.1; letter-spacing: -0.02em; overflow-wrap: normal; }
.photo-fullbleed__quote em { color: var(--accent); font-style: normal; }

/* ---------- Skills (dark atmospheric) ---------- */
.skills-grid { display: grid; grid-template-columns: 30% 70%; gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.skills-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
.skill-group__label { color: var(--accent); margin-bottom: 1rem; }
.skill-list { list-style: none; }
.skill-list li { padding: 0.6rem 0; border-top: 1px solid var(--line); font-size: 0.92rem; }

/* ---------- AWS toolkit grid ---------- */
.aws-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(2rem, 5vh, 4rem); }
.aws-cell { padding: clamp(1.6rem, 2.6vw, 2.4rem) clamp(1.1rem, 1.8vw, 1.8rem); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.aws-cell:nth-child(4n+1) { border-left: none; }
.aws-cell__title { color: var(--accent); margin-bottom: 0.7rem; }
.aws-cell__desc { color: var(--muted); font-size: 0.82rem; }

/* ---------- Colour-block (learning) ---------- */
.section-learning .section-num,
.section-learning .section-title { color: var(--bg); }
.learning-list { list-style: none; margin-top: clamp(2rem, 5vh, 4rem); }
.learning-list li { display: grid; grid-template-columns: minmax(180px, 28%) 1fr; gap: 1.5rem; padding: 1.1rem 0; border-top: 1px solid color-mix(in srgb, var(--bg) 18%, transparent); align-items: baseline; }
.learning-list li:last-child { border-bottom: 1px solid color-mix(in srgb, var(--bg) 18%, transparent); }
.learning__topic { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 2.4vw, 1.9rem); letter-spacing: -0.01em; color: var(--bg); }
.learning__desc { color: color-mix(in srgb, var(--bg) 72%, transparent); font-size: 0.9rem; }

/* ---------- Education ---------- */
.edu-grid { display: grid; grid-template-columns: 60% 40%; gap: clamp(1.5rem, 4vw, 4rem); align-items: start; margin-top: clamp(2rem, 5vh, 4rem); }
.edu-block__label, .cert-block__label { color: var(--accent); margin-bottom: 1.5rem; }
.edu-entry { padding: 1.4rem 0; border-top: 1px solid var(--line); }
.edu-entry__date { color: var(--muted); font-size: 0.62rem; font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; }
.edu-entry__inst { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; margin: 0.5rem 0; }
.edu-entry__course { color: var(--muted); font-size: 0.86rem; }
.cert-list { list-style: none; }
.cert-list li { padding: 0.9rem 0; border-top: 1px solid var(--line); }
.cert-list .cert-name { font-weight: 600; font-size: 0.95rem; }
.cert-list .cert-sub { color: var(--text); font-size: 0.8rem; font-style: italic; margin-top: 0.15rem; }
.cert-list .cert-org { color: var(--muted); font-size: 0.74rem; letter-spacing: 0.04em; }

/* ---------- Contact ---------- */
.section-contact { min-height: 92vh; display: flex; flex-direction: column; justify-content: center; }
.contact-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(3.5rem, 11vw, 9rem); line-height: 0.88; letter-spacing: var(--tracking-display); }
.contact-title em { color: var(--accent); font-style: normal; }
.contact-body { color: var(--muted); max-width: 42ch; margin: 2rem 0 3rem; }
.contact-channels { display: flex; flex-wrap: wrap; gap: clamp(18px, 3vw, 44px); }

/* ---------- Footer ---------- */
.site-footer { padding: 2.5rem var(--margin-outer); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer p { font-size: 0.66rem; letter-spacing: 0.05em; color: var(--muted); text-transform: uppercase; }
.site-footer .accent { color: var(--accent); }

/* ---------- Reveal clip (unmask + rise) ---------- */
.reveal-clip { transition: clip-path 0.9s var(--ease-primary), transform 0.9s var(--ease-primary); }
.reveal-clip.will-reveal { clip-path: inset(0% 0% 100%); transform: translateY(36px); }
.reveal-clip.is-visible  { clip-path: inset(0% 0% 0%);   transform: translateY(0); }

/* Stagger children within grids/lists — cascade as each group enters */
.aws-cell:nth-child(2), .academic__cell:nth-child(2), .learning-list li:nth-child(2), .cert-list li:nth-child(2), .project__features li:nth-child(2) { transition-delay: 0.06s; }
.aws-cell:nth-child(3), .academic__cell:nth-child(3), .learning-list li:nth-child(3), .cert-list li:nth-child(3), .project__features li:nth-child(3) { transition-delay: 0.12s; }
.aws-cell:nth-child(4), .learning-list li:nth-child(4), .cert-list li:nth-child(4), .project__features li:nth-child(4) { transition-delay: 0.18s; }
.aws-cell:nth-child(5), .learning-list li:nth-child(5), .cert-list li:nth-child(5) { transition-delay: 0.24s; }
.aws-cell:nth-child(6), .learning-list li:nth-child(6), .cert-list li:nth-child(6) { transition-delay: 0.30s; }
.aws-cell:nth-child(7), .learning-list li:nth-child(7) { transition-delay: 0.36s; }
.aws-cell:nth-child(8), .learning-list li:nth-child(8) { transition-delay: 0.42s; }

/* ---------- Control cluster (fixed, bottom-left) ---------- */
.controls {
  position: fixed; right: var(--margin-outer); bottom: var(--margin-outer); z-index: 300;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}
.ctrl-btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border: 1px solid var(--line-accent); padding: 9px 14px;
  transition: border-color 0.3s var(--ease-primary), background 0.45s var(--ease-primary);
}
.ctrl-btn:hover { border-color: var(--accent); }
.ctrl-btn .swatch { width: 11px; height: 11px; background: var(--accent); display: block; transition: background 0.45s var(--ease-primary); }
.ctrl-btn .ctrl-ico { font-size: 0.82rem; line-height: 1; color: var(--accent); width: 11px; text-align: center; }
.ctrl-btn .tlabel, .ctrl-btn .ctrl-label { font-size: 0.56rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text); }

/* ---------- Dead-simple scrollbar (thin thumb) ---------- */
#sb-thumb {
  position: fixed; right: 0; top: 0; width: 3px; height: 40px;
  background: var(--accent); z-index: 305; pointer-events: none;
  opacity: 0.55; transition: opacity 0.3s ease, background 0.45s var(--ease-primary);
}
#sb-thumb.is-horizontal { right: auto; top: auto; left: 0; bottom: 0; width: 40px; height: 3px; }
#sb-thumb.is-active { opacity: 0.9; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .project, .project:nth-of-type(odd) { grid-template-columns: 1fr; }
  .project:nth-of-type(odd) .project__media { order: 0; }  /* stack uniformly on mobile */
  .skills-grid, .edu-grid { grid-template-columns: 1fr; }
  .aws-grid { grid-template-columns: repeat(2, 1fr); }
  .aws-cell:nth-child(4n+1) { border-left: 1px solid var(--line); }
  .aws-cell:nth-child(2n+1) { border-left: none; }
}
@media (max-width: 768px) {
  .skills-cols { grid-template-columns: 1fr; gap: 1.5rem; }
  .academic { grid-template-columns: 1fr; }
  .academic__cell { border-left: none; }
  .hero-frame { width: clamp(96px, 28vw, 140px); }
  .learning-list li { grid-template-columns: 1fr; gap: 0.3rem; }
  .nav__link { display: none; }
  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px; position: fixed; top: var(--margin-outer); right: var(--margin-outer);
    z-index: 320; width: 38px; height: 38px; align-items: center; justify-content: center;
    background: none; border: none; cursor: pointer; mix-blend-mode: difference;
  }
  .nav-toggle span { width: 22px; height: 2px; background: #fff; display: block; transition: transform 0.3s var(--ease-primary), opacity 0.3s; }
  body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav {
    inset: 0; width: 100%; height: 100vh; background: var(--bg);
    align-items: flex-start; justify-content: center; gap: 1.1rem;
    padding: var(--margin-outer); mix-blend-mode: normal; counter-reset: navnum;
    /* diagonal wipe reveal */
    clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
    transition: clip-path 0.6s var(--ease-primary);
  }
  body.menu-open .site-nav { clip-path: polygon(-30% 0, 100% 0, 100% 100%, 0 100%); }
  .site-nav .nav__link {
    display: flex; align-items: baseline; gap: 14px;
    font-family: var(--font-display); font-weight: 600; font-size: 2rem;
    text-transform: none; letter-spacing: 0; color: var(--text);
    opacity: 0; transform: translateY(16px);
    transition: opacity 0.5s var(--ease-primary), transform 0.5s var(--ease-primary), color 0.3s;
  }
  .site-nav .nav__link::before {
    counter-increment: navnum; content: '0' counter(navnum);
    font-family: var(--font-mono); font-weight: 400; font-size: 0.62rem;
    color: var(--accent); letter-spacing: 0.04em;
  }
  body.menu-open .site-nav .nav__link { opacity: 1; transform: none; }
  .site-nav .nav__link:nth-of-type(1) { transition-delay: 0.14s; }
  .site-nav .nav__link:nth-of-type(2) { transition-delay: 0.19s; }
  .site-nav .nav__link:nth-of-type(3) { transition-delay: 0.24s; }
  .site-nav .nav__link:nth-of-type(4) { transition-delay: 0.29s; }
  .site-nav .nav__link:nth-of-type(5) { transition-delay: 0.34s; }
  .site-nav .nav__link:nth-of-type(6) { transition-delay: 0.39s; }
  .site-nav .nav__link:nth-of-type(7) { transition-delay: 0.44s; }
  .nav__brand { font-size: 1.4rem; }
}
@media (max-width: 480px) {
  .aws-grid { grid-template-columns: 1fr; }
  .aws-cell:nth-child(n) { border-left: none; }
}

/* ---------- Horizontal layout mode (scroll sideways) ---------- */
html[data-layout="horizontal"] { overflow-x: auto; overflow-y: hidden; height: 100%; }
html[data-layout="horizontal"] body { width: max-content; height: 100vh; overflow: visible; }
html[data-layout="horizontal"] main { display: flex; flex-direction: row; width: max-content; height: 100vh; }
html[data-layout="horizontal"] main > section,
html[data-layout="horizontal"] main > .photo-fullbleed {
  width: 100vw; min-width: 100vw; height: 100vh; flex-shrink: 0;
  overflow-y: auto; overflow-x: hidden;
  padding-top: clamp(7vh, 9vh, 11vh); padding-bottom: clamp(7vh, 9vh, 11vh);
}
html[data-layout="horizontal"] .section-hero { height: 100vh; min-height: 100vh; padding-bottom: clamp(6vh, 10vh, 14vh); }
html[data-layout="horizontal"] .section-about,
html[data-layout="horizontal"] .section-contact { min-height: 100vh; }
html[data-layout="horizontal"] .site-footer { display: none; }
html[data-layout="horizontal"] #progress-rail { display: none; }
/* keep the fixed chrome anchored to the viewport while panels slide */
html[data-layout="horizontal"] .site-nav,
html[data-layout="horizontal"] .controls,
html[data-layout="horizontal"] .nav-toggle { position: fixed; }
@media (max-width: 768px) {
  /* horizontal mode collapses to vertical on small screens for usability */
  html[data-layout="horizontal"] { overflow-x: hidden; overflow-y: auto; height: auto; }
  html[data-layout="horizontal"] body { width: auto; height: auto; }
  html[data-layout="horizontal"] main { display: block; width: auto; height: auto; }
  html[data-layout="horizontal"] main > section,
  html[data-layout="horizontal"] main > .photo-fullbleed { width: auto; min-width: 0; height: auto; min-height: auto; overflow: visible; }
  html[data-layout="horizontal"] .site-footer { display: flex; }
}

/* ---------- Node view (Obsidian-style graph) ---------- */
#node-view { display: none; }
html[data-layout="node"] { overflow: hidden; height: 100%; }
html[data-layout="node"] body { overflow: hidden; height: 100vh; }
html[data-layout="node"] main,
html[data-layout="node"] .site-footer,
html[data-layout="node"] #progress-rail,
html[data-layout="node"] .site-nav,
html[data-layout="node"] .nav-toggle,
html[data-layout="node"] #sb-thumb { display: none !important; }
html[data-layout="node"] #node-view {
  display: block; position: fixed; inset: 0; z-index: 150;
  background: var(--nv-bg); overflow: hidden; touch-action: none;
  transition: background 0.5s var(--ease-primary);
}
#nv-texture { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
#nv-veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 70% 70% at 50% 48%, rgba(var(--nv-veil-rgb),0.30) 0%, rgba(var(--nv-veil-rgb),0.55) 100%);
  opacity: 0; transition: opacity 0.6s var(--ease-primary);
}
#node-view.is-focusing #nv-veil { opacity: 1; }
#nv-pan { position: absolute; inset: 0; z-index: 2; will-change: transform; transform-origin: 0 0; }
#nv-edges { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.nv-edge { stroke: rgba(20,20,20,0.22); stroke-width: 1.2; fill: none; transition: stroke 0.3s, opacity 0.5s var(--ease-primary); }
.nv-edge.is-dim { opacity: 0.06; }
.nv-node {
  position: absolute; top: 0; left: 0; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; background: #fff; border: 1px solid rgba(20,20,20,0.18);
  font-family: var(--font-body); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: #1a1a1a;
  cursor: none; white-space: nowrap; user-select: none; touch-action: none;
  transition: border-color 0.3s, background 0.3s, color 0.3s, opacity 0.5s var(--ease-primary), filter 0.5s var(--ease-primary);
}
.nv-node:hover { border-color: var(--accent); }
.nv-node.is-dim { opacity: 0.18; filter: grayscale(0.55); }
.nv-node.is-dim:hover { opacity: 0.5; }
.nv-node--root {
  background: #1a1a1a; color: #fff; font-family: var(--font-display);
  font-weight: 700; font-size: 1.2rem; text-transform: none; letter-spacing: -0.01em; padding: 15px 26px;
}
.nv-node--leaf { background: color-mix(in srgb, var(--accent) 12%, #fff); }
.nv-node.is-open { border-color: var(--accent); background: var(--accent); color: #fff; }
.nv-node.is-open .nv-dot { background: #fff; }
.nv-node .nv-dot { width: 7px; height: 7px; background: var(--accent); flex-shrink: 0; }
.nv-hint {
  position: fixed; top: var(--margin-outer); left: var(--margin-outer); z-index: 160;
  font-family: var(--font-body); font-size: 0.6rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(20,20,20,0.45); max-width: 60vw;
}
/* floating detail card */
#nv-detail { position: absolute; z-index: 20; display: none; }
#nv-detail.is-open { display: block; }
.nv-card {
  width: min(420px, 84vw); background: #fff; border: 1px solid rgba(20,20,20,0.18);
  box-shadow: 0 26px 70px -24px rgba(0,0,0,0.4); padding: 28px 30px; position: relative;
}
.nv-card__cat { font-size: 0.58rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.nv-card__title { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; letter-spacing: -0.01em; color: #1a1a1a; margin: 8px 0 12px; line-height: 1; }
.nv-card__desc { font-size: 0.88rem; color: #4a4a4a; line-height: 1.62; margin-bottom: 14px; }
.nv-card__list { list-style: none; margin-bottom: 14px; }
.nv-card__list li { font-size: 0.8rem; color: #333; padding: 5px 0 5px 15px; position: relative; }
.nv-card__list li::before { content: ''; position: absolute; left: 0; top: 12px; width: 5px; height: 5px; background: var(--accent); }
.nv-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.nv-card__tags span { font-size: 0.55rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #555; border: 1px solid rgba(20,20,20,0.16); padding: 4px 9px; }
.nv-card__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 0.64rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.nv-card__close { position: absolute; top: 10px; right: 12px; font-size: 1.3rem; color: #999; background: none; border: none; line-height: 1; cursor: none; padding: 4px; }
.nv-card__close:hover { color: var(--accent); }

/* ============================================================
   DEMO EXTRAS — isolated; remove this block + extras.js to revert
   ============================================================ */
/* 1. Command palette */
#cmdk { position: fixed; inset: 0; z-index: 9500; display: none; align-items: flex-start; justify-content: center; padding-top: 14vh; background: rgba(0,0,0,0.55); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
#cmdk.is-open { display: flex; }
.cmdk-box { width: min(560px, 92vw); background: var(--surface); border: 1px solid var(--line-accent); height: max-content; }
.cmdk-input { width: 100%; padding: 18px 20px; background: none; border: none; border-bottom: 1px solid var(--line); color: var(--text); font-family: var(--font-body); font-size: 1rem; outline: none; }
.cmdk-input::placeholder { color: var(--muted); }
.cmdk-list { max-height: 52vh; overflow-y: auto; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; font-size: 0.85rem; color: var(--muted); cursor: none; }
.cmdk-item .cmdk-kind { font-size: 0.54rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-left: auto; }
.cmdk-item.is-active, .cmdk-item:hover { background: var(--accent-dim); color: var(--text); }
.cmdk-hint { position: fixed; bottom: var(--margin-outer); left: 50%; transform: translateX(-50%); z-index: 250; font-family: var(--font-body); font-size: 0.54rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); opacity: 0.55; pointer-events: none; }
@media (hover: none) { .cmdk-hint { display: none; } }

/* 8. Node keyboard selection */
.nv-node.is-selected { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ---------- Terminal / CLI view ---------- */
#terminal-view { display: none; }
html[data-layout="terminal"] { overflow: hidden; height: 100%; }
html[data-layout="terminal"] body { overflow: hidden; height: 100vh; }
html[data-layout="terminal"] main,
html[data-layout="terminal"] .site-footer,
html[data-layout="terminal"] #progress-rail,
html[data-layout="terminal"] .site-nav,
html[data-layout="terminal"] .nav-toggle,
html[data-layout="terminal"] #sb-thumb { display: none !important; }
html[data-layout="terminal"] #terminal-view {
  display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 150;
  background: var(--bg); padding: clamp(16px, 3vw, 40px);
}
.term-win { display: flex; flex-direction: column; width: 100%; height: 100%; max-width: 1100px; margin: 0 auto; border: 1px solid var(--line-accent); background: color-mix(in srgb, var(--bg) 88%, #000); }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.term-bar .dot { width: 11px; height: 11px; background: var(--line); display: block; }
.term-bar .dot:nth-child(1) { background: color-mix(in srgb, var(--accent) 80%, transparent); }
.term-bar .title { margin-left: 12px; font-family: var(--font-mono, monospace); font-size: 0.7rem; letter-spacing: 0.04em; color: var(--muted); }
.term-body { flex: 1; overflow-y: auto; padding: 18px clamp(14px, 2vw, 26px); font-family: var(--font-mono, monospace); font-size: clamp(0.78rem, 1.1vw, 0.9rem); line-height: 1.7; color: var(--text); }
.term-line { white-space: pre-wrap; overflow-wrap: anywhere; }
.term-prompt { color: var(--accent); }
.term-muted { color: var(--muted); }
.term-accent { color: var(--accent); }
.term-head { color: var(--accent); font-weight: 700; }
.term-link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: none; }
.term-row { display: flex; align-items: baseline; gap: 10px; padding: 4px clamp(14px, 2vw, 26px) 20px; border-top: 1px solid var(--line); flex-shrink: 0; font-family: var(--font-mono, monospace); font-size: clamp(0.78rem, 1.1vw, 0.9rem); }
.term-input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-family: inherit; font-size: inherit; caret-color: var(--accent); padding: 0; }
.term-input::placeholder { color: var(--muted); }

/* ---------- Mobile performance sweep ---------- */
@media (max-width: 1000px) {
  /* backdrop-filter recomputes a blur every scroll frame — a major jank source on mobile */
  .ctrl-btn { -webkit-backdrop-filter: none; backdrop-filter: none; background: color-mix(in srgb, var(--bg) 92%, transparent); }
  /* terminal input >=16px stops iOS Safari from auto-zooming on focus (ID = wins specificity) */
  #term-input { font-size: 16px !important; }
}
html { -webkit-text-size-adjust: 100%; }

/* ---------- Motion / a11y guards ---------- */
@media (hover: none) {
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal-clip.will-reveal { clip-path: inset(0 0 0 0); }
  #loader { display: none; }
}

/* ============================================================
   ENHANCEMENTS — a11y · discoverability · delights · print
   ============================================================ */

/* "Open to opportunities" availability badge (contact) */
.avail-badge {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 9px; margin: 1rem 0 0.4rem;
  padding: 7px 15px 7px 13px; border: 1px solid var(--line-accent);
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text); font-weight: 600;
}
.avail-dot {
  width: 8px; height: 8px; border-radius: 50% !important; background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent);
  animation: availPulse 2.4s var(--ease-primary) infinite;
}
@keyframes availPulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 65%, transparent); }
  70%  { box-shadow: 0 0 0 9px color-mix(in srgb, var(--accent) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); }
}

/* Skip link (keyboard) */
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 11000;
  background: var(--accent); color: var(--bg); padding: 10px 16px;
  font: 600 0.85rem var(--font-body); letter-spacing: 0.04em;
  transform: translateY(-160%); transition: transform 0.25s var(--ease-primary);
}
.skip-link:focus { transform: translateY(0); outline: none; }

/* Visible keyboard focus — essential because cursor:none hides the pointer */
a:focus-visible, button:focus-visible, .ctrl-btn:focus-visible, .text-link:focus-visible,
.nav__link:focus-visible, .tag:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}

/* Scroll-to-top */
.scroll-top {
  position: fixed; right: var(--margin-outer); bottom: calc(var(--margin-outer) + 104px); z-index: 305;
  width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border: 1px solid var(--line-accent); color: var(--text); cursor: pointer; font-size: 1.1rem;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 0.35s var(--ease-primary), transform 0.35s var(--ease-primary), border-color 0.3s, color 0.3s;
}
.scroll-top.is-shown { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scroll-top:hover { color: var(--accent); border-color: var(--accent); }

/* First-visit hint pointing at the view switcher */
.views-hint {
  position: fixed; right: var(--margin-outer); bottom: calc(var(--margin-outer) + 168px); z-index: 306;
  max-width: 232px; background: var(--surface); border: 1px solid var(--line-accent);
  padding: 14px 30px 13px 16px; color: var(--text); font-size: 0.8rem; line-height: 1.5;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity 0.4s var(--ease-primary), transform 0.4s var(--ease-primary);
}
.views-hint.is-shown { opacity: 1; transform: translateY(0); pointer-events: auto; }
.views-hint b { color: var(--accent); font-weight: 600; }
.views-hint__close {
  position: absolute; top: 6px; right: 9px; background: none; border: none;
  color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1;
}
.views-hint__close:hover { color: var(--text); }

/* Copied-to-clipboard toast */
.copied-toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 14px); z-index: 11000;
  background: var(--accent); color: var(--bg); padding: 9px 18px;
  font: 600 0.8rem var(--font-body); letter-spacing: 0.04em;
  opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s;
}
.copied-toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* Print — clean one-page CV (Ctrl+P) */
@media print {
  .controls, .nav-toggle, .scroll-top, .views-hint, #progress-rail, #scrollbar,
  .cursor-dot, .cursor-ring, #loader, .hero-faces, .hero-frame, #cmdk, .cmdk-hint,
  .photo-fullbleed { display: none !important; }
  html, body { background: #fff !important; color: #111 !important; cursor: auto !important; }
  * { color: #111 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-nav { position: static !important; flex-direction: row; gap: 12px; }
  .section, .section-hero, .section-about { min-height: 0 !important; padding: 14px 0 !important; page-break-inside: avoid; }
  .reveal-clip { clip-path: none !important; transform: none !important; opacity: 1 !important; }
  .hero-line.is-accent, .contact-title em, .section-num, .project__cat { color: #333 !important; }
  a { text-decoration: underline; }
}
