/* ================================================================
   Md Kamrul Islam — Portfolio  |  css/style.css
   Amber IC Design System
   ================================================================ */

/* ── Design tokens ─────────────────────────────────────────────── */
:root {
  --bg:        #070608;
  --surface:   #100F14;
  --surface-2: #17151D;
  --border:    #221F2E;
  --border-hi: #322D45;
  --amber:     #F5A623;
  --a-dim:     rgba(245,166,35,.10);
  --a-glow:    rgba(245,166,35,.22);
  --teal:      #0ECAB8;
  --t-dim:     rgba(14,202,184,.10);
  --text:      #EDE5D8;
  --muted:     #857E78;  /* bumped from #706660 for WCAG AA contrast (~5:1 on dark bg) */
  --dim:       #2E2820;
  --fd: 'Bebas Neue', Impact, sans-serif;
  --fh: 'Barlow Semi Condensed', sans-serif;
  --fb: 'Barlow', sans-serif;
  --fm: 'Fira Code', 'Courier New', monospace;
  --ease: cubic-bezier(.4,0,.2,1);
  --nav-h: 72px;
  --pad: max(106px, calc((100% - 1280px) / 2));
}

/* ── Light mode — cool slate-blue palette ───────────────────────── */
[data-theme="light"] {
  --bg:        #EDF1F7;   /* cool blue-white canvas          */
  --surface:   #E1E8F2;   /* slightly deeper slate card      */
  --surface-2: #D5DFEE;
  --border:    #BACADA;
  --border-hi: #A4B8CE;
  --amber:     #9A5500;   /* darkened 2026-09-20: #B86600 was 3.75:1 on --bg, below WCAG AA 4.5:1 for small text */
  --a-dim:     rgba(154,85,0,.10);
  --a-glow:    rgba(154,85,0,.25);
  --teal:      #087A6E;   /* deeper teal for contrast        */
  --t-dim:     rgba(8,122,110,.12);
  --text:      #0C1B2E;   /* deep navy                       */
  --muted:     #516480;
  --dim:       #98B0C6;
}
[data-theme="light"] body::before  { opacity: .15; }
[data-theme="light"] body::after   { opacity: .018; }
[data-theme="light"] #nav.on       { background: rgba(237,241,247,.95); }
[data-theme="light"] .sni          { background: rgba(225,232,242,.85); }
[data-theme="light"] section.alt   { background: rgba(208,218,234,.50); }
[data-theme="light"] #hc           { opacity: .18; }
/* Terminal intentionally stays dark — it's a terminal */
[data-theme="light"] .terminal     { background: #141F30; border-color: #2A3D58; }
[data-theme="light"] .terminal-hdr { border-color: #2A3D58; }
/* White pill becomes transparent on light bg — logos show on their own */
[data-theme="light"] .logo-pill,
[data-theme="light"] .logo-pill-sm { background: transparent; padding: 0; border-radius: 0; }

/* ── Skip link (keyboard accessibility) ────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 8px;
  z-index: 10000;
  padding: 8px 18px;
  background: var(--amber);
  color: var(--bg);
  font-family: var(--fm);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  transition: top .15s var(--ease);
}
.skip-link:focus { top: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Global focus ring (keyboard navigation) ────────────────────── */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); overflow-x: hidden; }
body { background: var(--bg); color: var(--text); font-family: var(--fb); font-size: 16px; line-height: 1.7; overflow-x: hidden; }
a   { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--a-dim); color: var(--amber); }
::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-hi); }
::-webkit-scrollbar-thumb:hover { background: var(--amber); }

/* Dot grid */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle, var(--dim) 1px, transparent 1px);
  background-size: 34px 34px; opacity: .45;
}
/* Film grain */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 9990; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ── Scroll progress ─────────────────────────────────────────────── */
#prog { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 6000; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--amber), var(--teal)); transition: transform .04s linear; }

/* ── Navigation ──────────────────────────────────────────────────── */
#nav { position: fixed; top: 0; left: 0; right: 0; z-index: 3000; height: var(--nav-h); padding: 0 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid transparent; transition: background .4s var(--ease), border-color .4s var(--ease); }
#nav.on { background: rgba(7,6,8,.96); backdrop-filter: blur(24px) saturate(1.3); border-bottom-color: var(--border); }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark { font-family: var(--fm); font-size: 14px; color: var(--amber); letter-spacing: .06em; }
.brand-mark .d { color: var(--muted); }
.brand-sep  { width: 1px; height: 28px; background: var(--border-hi); }
.brand-info { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--fh); font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: .04em; }
.brand-sub  { font-family: var(--fm); font-size: 10px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.nav-ul { display: flex; gap: 22px; list-style: none; flex: 1; justify-content: center; }
.nav-ul a { font-family: var(--fm); font-size: 11px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; transition: color .2s; position: relative; padding-bottom: 2px; }
.nav-ul a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px; background: var(--amber); transition: width .22s var(--ease); }
.nav-ul a:hover, .nav-ul a.on { color: var(--amber); }
.nav-ul a:hover::after, .nav-ul a.on::after { width: 100%; }
.nav-acts  { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.theme-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border-hi); color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .2s, transform .35s var(--ease); }
.theme-btn:hover { border-color: var(--amber); color: var(--amber); }
.theme-btn.rotating { transform: rotate(180deg); }
/* ── Side nav ────────────────────────────────────────────────────── */
.side-nav { position: fixed; left: 16px; top: 50%; transform: translateY(-50%); z-index: 2500; display: flex; flex-direction: column; gap: 6px; }
.sni { display: flex; align-items: center; justify-content: center; padding: 9px 14px; min-width: 52px; background: rgba(16,15,20,.8); border: 1px solid var(--border); border-radius: 20px; font-family: var(--fm); font-size: 11px; color: var(--muted); letter-spacing: .06em; backdrop-filter: blur(10px); transition: all .25s; white-space: nowrap; }
.sni:hover, .sni.on { border-color: var(--amber); color: var(--amber); background: rgba(245,166,35,.08); }

/* ── Logo pill (white-bg PNGs on dark background) ────────────────── */
.logo-pill    { display: inline-flex; align-items: center; background: rgba(255,255,255,.92); border-radius: 6px; padding: 4px 10px; line-height: 0; }
.logo-pill img { height: 36px; width: auto; object-fit: contain; display: block; }
.logo-pill-sm { display: inline-flex; align-items: center; background: rgba(255,255,255,.92); border-radius: 5px; padding: 5px 10px; line-height: 0; }
.logo-pill-sm img { height: 44px; width: auto; object-fit: contain; display: block; }
/* For marks that already carry their own solid brand-colour field (UCC), the
   white backing is only there to frame them — drop it. */
.logo-pill.bare { background: transparent; padding: 0; border-radius: 0; }

/* ── Hero ────────────────────────────────────────────────────────── */
#hero { position: relative; min-height: 100vh; overflow: hidden; display: flex; align-items: center; padding: calc(var(--nav-h) + 30px) var(--pad) 56px; }
#hc  { position: absolute; inset: 0; z-index: 0; opacity: .4; }
.g1  { position: absolute; z-index: 0; pointer-events: none; top: -10%; right: -5%; width: 55%; height: 80%; background: radial-gradient(ellipse at 70% 30%, rgba(245,166,35,.07), transparent 60%); }
.g2  { position: absolute; z-index: 0; pointer-events: none; bottom: -5%; left: -5%; width: 50%; height: 60%; background: radial-gradient(ellipse at 30% 70%, rgba(14,202,184,.05), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; width: min(100%, 1360px); margin: 0 auto; position: relative; z-index: 1; }
.hero-copy  { min-width: 0; } /* prevent grid item from overflowing its cell */
.h-eye  { font-family: var(--fm); font-size: 12px; color: var(--amber); letter-spacing: .25em; text-transform: uppercase; display: flex; align-items: center; gap: 12px; margin-bottom: 8px; opacity: 0; animation: up .6s .15s var(--ease) forwards; overflow: hidden; min-width: 0; }
.h-eye .ln { width: 24px; height: 1px; background: var(--amber); }
.h-name { font-family: var(--fd); font-size: clamp(60px, 10vw, 130px); line-height: .88; letter-spacing: .01em; margin-bottom: 20px; display: flex; flex-direction: column; opacity: 0; animation: up .75s .28s var(--ease) forwards; }
.h-name .l1, .h-name .l2 { color: var(--text); }
.h-name .l3 { color: var(--amber); }
.h-sub  { font-family: var(--fh); font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 9px; opacity: 0; animation: up .6s .44s var(--ease) forwards; }
.h-id   { font-size: 15px; color: var(--muted); margin-bottom: 18px; opacity: 0; animation: up .6s .54s var(--ease) forwards; }
.h-id span { color: var(--amber); font-weight: 700; letter-spacing: .06em; font-family: var(--fm); font-size: 13px; }
.h-status { opacity: 0; animation: up .6s .59s var(--ease) forwards; }
.h-desc { font-size: 15px; color: var(--muted); line-height: 1.85; max-width: 480px; margin-bottom: 34px; opacity: 0; animation: up .6s .64s var(--ease) forwards; }
.h-desc strong { color: var(--text); font-weight: 600; }
.h-btns { display: flex; gap: 12px; flex-wrap: wrap; opacity: 0; animation: up .6s .76s var(--ease) forwards; }
.portrait-wrap  { opacity: 0; animation: fadein .9s .5s var(--ease) forwards; display: flex; flex-direction: column; align-items: center; gap: 72px; }
.portrait-stack { position: relative; width: 300px; height: 300px; }
.p-frame  { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; border: 2px solid var(--border-hi); z-index: 2; }
.p-frame img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(12%) contrast(1.05) brightness(.97); }
.p-ring { position: absolute; border-radius: 50%; border: 1px solid; animation: spin linear infinite; }
.p-r1 { inset: -26px; border-color: rgba(245,166,35,.28); animation-duration: 14s; }
.p-r2 { inset: -54px; border-color: rgba(14,202,184,.18); animation-duration: 22s; animation-direction: reverse; }
.p-r1::before, .p-r2::before { content: ''; position: absolute; width: 6px; height: 6px; border-radius: 50%; top: -3px; left: 50%; transform: translateX(-50%); }
.p-r1::before { background: var(--amber); }
.p-r2::before { background: var(--teal); }
.s-chip  { position: absolute; z-index: 3; padding: 8px 14px; background: rgba(16,15,20,.88); border: 1px solid var(--border-hi); backdrop-filter: blur(12px); font-family: var(--fm); font-size: 11px; color: var(--text); white-space: nowrap; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px)); }
.chip-tr { top: 6%; right: -16%; }
.chip-bl { bottom: 6%; left: -16%; }
.terminal     { background: #08101E; border: 1px solid var(--border-hi); border-radius: 6px; overflow: hidden; width: 380px; max-width: 100%; }
.terminal-hdr { display: flex; align-items: center; gap: 6px; padding: 9px 14px; border-bottom: 1px solid var(--border); font-family: var(--fm); font-size: 9.5px; color: var(--teal); letter-spacing: .1em; }
.t-dot   { width: 11px; height: 11px; border-radius: 50%; }
.t-dot.r { background: #FF5F57; }
.t-dot.y { background: #FEBC2E; }
.t-dot.g { background: #28C840; }
.terminal-hdr .hdr-label { margin-left: 8px; }
.terminal-body { padding: 12px 16px; font-family: var(--fm); font-size: 13px; color: #9FCEAA; min-height: 44px; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
.t-prompt { color: #5BC0DE; }
.t-cursor { display: inline-block; width: 8px; height: 14px; background: #9FCEAA; animation: blink .7s step-end infinite; vertical-align: middle; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.clip  { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)); }
.btn-a { display: inline-block; padding: 12px 28px; background: var(--amber); color: var(--bg); font-family: var(--fh); font-weight: 700; font-size: 14px; letter-spacing: .05em; text-transform: uppercase; border: none; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.btn-a:hover { transform: translateY(-2px); box-shadow: 0 8px 28px var(--a-glow); }
.btn-b { display: inline-block; padding: 12px 28px; background: transparent; color: var(--text); font-family: var(--fh); font-weight: 600; font-size: 14px; letter-spacing: .05em; text-transform: uppercase; border: 1px solid var(--border-hi); cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.btn-b:hover { border-color: var(--amber); color: var(--amber); background: var(--a-dim); }

/* ── Waveform divider ────────────────────────────────────────────── */
.wdiv       { height: 44px; overflow: hidden; position: relative; z-index: 1; }
.wave-track { display: flex; width: 200%; animation: wscroll 14s linear infinite; }
.wave-track svg { flex: 1 0 50%; height: 44px; opacity: .24; }

/* ── Stats ───────────────────────────────────────────────────────── */
#stats { padding: 44px var(--pad); position: relative; z-index: 1; }
.stats-wrap { display: grid; grid-template-columns: repeat(6,1fr); gap: 10px; }
.sc { background: var(--surface); border: 1px solid var(--border); padding: 22px 20px; position: relative; overflow: hidden; transition: border-color .25s, transform .25s; }
.sc::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg,transparent,var(--amber),transparent); opacity: 0; transition: opacity .25s; }
.sc:hover::before { opacity: 1; }
.sc:hover { border-color: var(--border-hi); transform: translateY(-3px); }
.sc.t::before { background: linear-gradient(90deg,transparent,var(--teal),transparent); }
.sc-s2 { grid-column: span 2; }
.sn    { font-family: var(--fm); font-size: 38px; font-weight: 500; color: var(--amber); line-height: 1; margin-bottom: 7px; }
.sn.t  { color: var(--teal); }
.sl    { font-family: var(--fh); font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; line-height: 1.4; }
.sc-ico { position: absolute; bottom: 12px; right: 14px; width: 28px; height: 28px; opacity: .09; color: var(--amber); }
.sc.t .sc-ico { color: var(--teal); }

/* ── Shared section ──────────────────────────────────────────────── */
section      { padding: 80px var(--pad); position: relative; z-index: 1; }
section.alt  { background: rgba(16,15,20,.65); }
.eye         { font-family: var(--fm); font-size: 12px; color: var(--amber); letter-spacing: .26em; text-transform: uppercase; display: flex; align-items: center; gap: 14px; margin-bottom: 11px; }
.eye::after  { content: ''; flex: 1; max-width: 72px; height: 1px; background: var(--border-hi); }
.sec-t       { font-family: var(--fh); font-size: clamp(26px,4vw,48px); font-weight: 800; line-height: 1.05; margin-bottom: 48px; }
.sec-t em    { font-style: normal; color: var(--amber); }
.rv          { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.rv.on       { opacity: 1; transform: none; }
.d1 { transition-delay: .1s; } .d2 { transition-delay: .2s; } .d3 { transition-delay: .3s; } .d4 { transition-delay: .4s; }

/* ── About ───────────────────────────────────────────────────────── */
.about-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: start; }
.about-lead   { font-family: var(--fh); font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.3; margin-bottom: 18px; }
.about-lead em { font-style: normal; color: var(--amber); }
.about-p      { font-size: 15px; color: var(--muted); line-height: 1.85; margin-bottom: 14px; }
.arc          { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--amber); padding: 22px 24px; margin-bottom: 12px; }
.arc-lbl      { font-family: var(--fm); font-size: 11px; color: var(--amber); letter-spacing: .2em; text-transform: uppercase; margin-bottom: 10px; }
.arc-role     { font-family: var(--fh); font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 3px; }
.arc-co       { font-family: var(--fm); font-size: 13px; color: var(--muted); }
.mini-grid    { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mc           { background: var(--surface); border: 1px solid var(--border); padding: 18px 20px; transition: border-color .22s; }
.mc:hover     { border-color: var(--border-hi); }
.mc-lbl       { font-family: var(--fm); font-size: 11px; color: var(--teal); letter-spacing: .2em; text-transform: uppercase; margin-bottom: 8px; }
.mc-val       { font-family: var(--fh); font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3; }

/* ── Education ───────────────────────────────────────────────────── */
.edu          { background: var(--surface); border: 1px solid var(--border); padding: 34px 38px; position: relative; }
.edu::before  { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--amber), var(--teal)); }
.edu + .edu   { margin-top: 18px; }
.edu-header   { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 5px; }
.edu-deg      { font-family: var(--fh); font-size: 20px; font-weight: 700; color: var(--text); }
.edu-inst     { font-family: var(--fm); font-size: 13px; color: var(--amber); letter-spacing: .07em; margin-bottom: 20px; }
.chips        { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.chip         { padding: 5px 12px; background: var(--bg); border: 1px solid var(--border); font-family: var(--fm); font-size: 13px; color: var(--muted); }
.chip b       { color: var(--text); }
.thesis-box   { padding: 16px 20px; background: var(--bg); border: 1px solid var(--border); border-left: 2px solid var(--teal); font-size: 14px; color: var(--muted); line-height: 1.75; }
.thesis-lbl   { font-family: var(--fm); font-size: 11px; color: var(--teal); letter-spacing: .2em; text-transform: uppercase; margin-bottom: 7px; }
.thesis-box + .thesis-box { margin-top: 12px; }
.thesis-box a { color: var(--teal); transition: color .2s; }
.thesis-box a:hover { color: var(--amber); }

/* ── Research ────────────────────────────────────────────────────── */
.research-layout  { display: grid; grid-template-columns: 300px 1fr; gap: 50px; align-items: start; }
.research-intro-p { font-size: 15px; color: var(--muted); line-height: 1.8; margin-bottom: 20px; }
.int-col   { display: flex; flex-direction: column; gap: 8px; }
.int       { padding: 9px 18px 9px 28px; background: var(--surface); border: 1px solid var(--border); font-family: var(--fh); font-size: 14px; font-weight: 600; color: var(--muted); position: relative; transition: all .2s; }
.int::before { content: '▸'; position: absolute; left: 10px; color: var(--amber); font-size: 10px; top: 50%; transform: translateY(-50%); }
.int:hover { border-color: var(--amber); color: var(--amber); background: var(--a-dim); }
.pub-stack { display: flex; flex-direction: column; gap: 10px; }
.pub       { background: var(--surface); border: 1px solid var(--border); padding: 18px 22px; display: grid; grid-template-columns: 60px 1fr; gap: 16px; align-items: start; transition: border-color .2s, transform .2s; }
.pub:hover { border-color: var(--border-hi); transform: translateX(4px); }
.pub-yr    { font-family: var(--fm); font-size: 26px; font-weight: 500; color: var(--dim); line-height: 1; padding-top: 2px; }
.pub-t     { font-family: var(--fh); font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 3px; line-height: 1.3; }
.pub-a     { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.pub-row   { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pub-v     { font-family: var(--fm); font-size: 11px; color: var(--teal); letter-spacing: .06em; }
.ieee-text  { font-family: var(--fm); font-size: 11px; font-weight: 700; color: var(--teal); background: var(--t-dim); border: 1px solid rgba(14,202,184,.3); padding: 2px 8px; letter-spacing: .06em; flex-shrink: 0; }
.pl        { padding: 3px 10px; font-family: var(--fm); font-size: 11px; color: var(--amber); border: 1px solid var(--amber); transition: all .2s; }
.pl:hover  { background: var(--amber); color: var(--bg); }

/* ── Projects ────────────────────────────────────────────────────── */
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.fbtn       { padding: 8px 18px; font-family: var(--fm); font-size: 11px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); cursor: pointer; letter-spacing: .1em; text-transform: uppercase; transition: all .2s; }
.fbtn.on, .fbtn:hover { border-color: var(--amber); color: var(--amber); background: var(--a-dim); }
.proj-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.proj       { background: var(--surface); border: 1px solid var(--border); padding: 24px; position: relative; overflow: hidden; transition: border-color .25s, transform .25s, box-shadow .25s; }
.proj::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, var(--a-dim), transparent 65%); opacity: 0; transition: opacity .25s; }
.proj:hover { border-color: var(--amber); transform: translateY(-3px); box-shadow: 0 16px 48px rgba(245,166,35,.07); }
.proj:hover::after { opacity: 1; }
.proj-hdr   { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.proj-date  { font-family: var(--fm); font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.proj-badge { font-family: var(--fm); font-size: 11px; color: var(--teal); letter-spacing: .16em; text-transform: uppercase; }
.proj-name  { font-family: var(--fh); font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 9px; line-height: 1.3; }
.proj-desc  { font-size: 15px; color: var(--muted); line-height: 1.75; margin-bottom: 10px; }
.proj-outs  { list-style: none; margin-bottom: 13px; }
.proj-outs li { font-size: 14px; color: var(--muted); padding-left: 14px; position: relative; margin-bottom: 3px; }
.proj-outs li::before { content: '◆'; position: absolute; left: 0; color: var(--amber); font-size: 7px; top: 5px; }
.proj-tags  { display: flex; flex-wrap: wrap; gap: 5px; }
.ptag       { font-family: var(--fm); font-size: 11px; padding: 2px 8px; background: var(--bg); border: 1px solid var(--border); color: var(--muted); transition: all .18s; letter-spacing: .04em; }
.proj:hover .ptag { border-color: var(--border-hi); color: var(--muted); }

/* ── Experience timeline ─────────────────────────────────────────── */
.tl          { position: relative; padding-left: 40px; }
.tl::before  { content: ''; position: absolute; left: 0; top: 8px; bottom: 0; width: 1px; background: linear-gradient(180deg, var(--amber), var(--teal) 60%, transparent); }
.tli         { position: relative; margin-bottom: 38px; }
.tli:last-child { margin-bottom: 0; }
.tl-dot      { position: absolute; left: -44px; top: 8px; width: 10px; height: 10px; background: var(--amber); border: 2px solid var(--bg); box-shadow: 0 0 0 2px var(--amber); }
.tli.cur .tl-dot { animation: gpulse 2s ease-in-out infinite; }
.tl-card     { background: var(--surface); border: 1px solid var(--border); padding: 22px 26px; transition: border-color .25s; display: grid; grid-template-columns: 1fr auto; column-gap: 24px; }
.tl-logo     { grid-column: 2; grid-row: 2 / 4; align-self: center; }
.tli.cur .tl-card { border-color: var(--border-hi); }
.tl-badge    { grid-column: 1; grid-row: 1; display: inline-block; justify-self: start; padding: 3px 10px; background: var(--a-dim); border: 1px solid var(--amber); color: var(--amber); font-family: var(--fm); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 9px; }
.tl-role     { grid-column: 1; grid-row: 2; font-family: var(--fh); font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.tl-co-row   { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.tl-co       { grid-column: 1; grid-row: 3; font-family: var(--fm); font-size: 14px; color: var(--amber); }
.tl-period   { grid-column: 1 / -1; grid-row: 4; font-family: var(--fm); font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.tl-list     { grid-column: 1 / -1; grid-row: 5; list-style: none; }
.tl-list li  { font-size: 15px; color: var(--muted); padding-left: 18px; position: relative; margin-bottom: 5px; line-height: 1.65; }
.tl-list li::before { content: '◈'; position: absolute; left: 0; color: var(--amber); font-size: 9px; top: 5px; }

/* ── Skills ──────────────────────────────────────────────────────── */
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px,1fr)); gap: 14px; }
.sg      { background: var(--surface); border: 1px solid var(--border); padding: 20px 22px; transition: border-color .25s; }
.sg:hover { border-color: var(--border-hi); }
.sg-n    { font-family: var(--fm); font-size: 11px; color: var(--amber); letter-spacing: .22em; text-transform: uppercase; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.tags    { display: flex; flex-wrap: wrap; gap: 6px; }
.tag     { padding: 5px 11px; font-family: var(--fm); font-size: 13px; color: var(--muted); background: var(--bg); border: 1px solid var(--border); transition: all .18s; }
.tag:hover { border-color: var(--amber); color: var(--amber); background: var(--a-dim); }

/* ── Certifications ──────────────────────────────────────────────── */
.cert-list { display: flex; flex-direction: column; gap: 11px; }
.cert      { background: var(--surface); border: 1px solid var(--border); padding: 16px 22px; display: flex; align-items: flex-start; gap: 16px; transition: all .22s; }
.cert:hover { border-color: var(--border-hi); transform: translateX(4px); }
.cert-ico  { width: 40px; height: 40px; background: var(--a-dim); border: 1px solid rgba(245,166,35,.3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--amber); }
.cert-ico svg { width: 20px; height: 20px; }
.cert-t    { font-family: var(--fh); font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.cert-t a  { transition: color .2s; }
.cert-t a:hover { color: var(--amber); }
.cert-d    { font-size: 14px; color: var(--muted); line-height: 1.6; }
.cert-yr   { font-family: var(--fm); font-size: 11px; color: var(--amber); margin-left: 6px; }

/* ── Contact ─────────────────────────────────────────────────────── */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.c-intro      { font-size: 15px; color: var(--muted); line-height: 1.85; margin-bottom: 26px; }
.c-list       { display: flex; flex-direction: column; gap: 9px; }
.ci           { display: flex; align-items: center; gap: 14px; padding: 15px 18px; background: var(--surface); border: 1px solid var(--border); transition: all .22s; }
.ci:hover     { border-color: var(--amber); background: var(--a-dim); }
.ci-ico       { width: 40px; height: 40px; background: var(--bg); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: border-color .22s; color: var(--amber); }
.ci-ico svg   { width: 18px; height: 18px; }
.ci:hover .ci-ico { border-color: var(--amber); }
.ci-l         { font-family: var(--fm); font-size: 11px; color: var(--muted); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 2px; }
.ci-v         { font-family: var(--fh); font-size: 15px; font-weight: 700; color: var(--text); }

/* ── Contact form ────────────────────────────────────────────────── */
.contact-form   { display: flex; flex-direction: column; gap: 14px; }
.contact-form[hidden] { display: none; }
.cf-field       { display: flex; flex-direction: column; gap: 6px; }
.cf-label       { font-family: var(--fm); font-size: 11px; color: var(--amber); letter-spacing: .2em; text-transform: uppercase; }
.cf-input       { background: var(--surface); border: 1px solid var(--border); color: var(--text); font-family: var(--fb); font-size: 14px; padding: 11px 14px; outline: none; transition: border-color .2s, box-shadow .2s; width: 100%; }
.cf-input::placeholder { color: var(--muted); opacity: .6; }
.cf-input:focus { border-color: var(--amber); box-shadow: 0 0 0 3px var(--a-dim); }
.cf-textarea    { resize: vertical; min-height: 110px; }
.cf-submit      { align-self: flex-start; border: none; cursor: pointer; font-size: 14px; padding: 12px 28px; letter-spacing: .1em; }
.cf-submit:disabled { opacity: .6; cursor: not-allowed; }
.btn-spinner { display: none; width: 13px; height: 13px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; margin-right: 6px; }
.cf-submit.loading .btn-spinner { display: inline-block; }
.cf-status      { font-family: var(--fm); font-size: 12px; letter-spacing: .05em; padding: 10px 14px; border-left: 3px solid transparent; display: none; }
.cf-status.ok   { display: block; border-color: var(--teal); color: var(--teal); background: var(--t-dim); }
.cf-status.err  { display: block; border-color: #e05555; color: #e05555; background: rgba(224,85,85,.08); }
.cf-success     { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 44px 20px; gap: 16px; min-height: 320px; }
.cf-success[hidden] { display: none; }
.cf-success-icon { width: 60px; height: 60px; border-radius: 50%; background: var(--t-dim); border: 1px solid var(--teal); display: flex; align-items: center; justify-content: center; color: var(--teal); }
.cf-success-icon svg { width: 30px; height: 30px; }
.cf-success-title { font-family: var(--fh); font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: -.01em; margin: 0; }
.cf-success-body  { font-family: var(--fm); font-size: 13px; color: var(--muted); line-height: 1.75; max-width: 280px; margin: 0; }

/* ── Copy-to-clipboard button ────────────────────────────────────── */
.ci-copy        { background: var(--surface); border: 1px solid var(--border); text-align: left; cursor: pointer; width: 100%; position: relative; transition: all .22s; }
.ci-copy:hover  { border-color: var(--amber); background: var(--a-dim); }
.copy-hint      { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: none; font-family: var(--fb); }
.copy-toast     { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-family: var(--fm); font-size: 11px; color: var(--teal); letter-spacing: .1em; opacity: 0; transition: opacity .2s; pointer-events: none; }
.ci-copy.copied .copy-toast     { opacity: 1; }
.ci-copy.copied .copy-hint      { opacity: 0; }
.ci-copy.copied                  { border-color: var(--teal); background: var(--t-dim); }

/* ── Footer ──────────────────────────────────────────────────────── */
footer    { padding: 30px var(--pad); border-top: 1px solid var(--border); display: flex; align-items: center; flex-wrap: wrap; gap: 12px; justify-content: space-between; position: relative; z-index: 1; }
.ft       { font-family: var(--fm); font-size: 11px; color: var(--muted); }
.ft span  { color: var(--amber); }
.btt      { width: 38px; height: 38px; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; transition: all .22s; opacity: 0; pointer-events: none; }
.btt svg  { width: 16px; height: 16px; }
.btt:hover { border-color: var(--amber); color: var(--amber); background: var(--a-dim); }
.btt.visible { opacity: 1; pointer-events: auto; }
.share-row  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share-lbl  { font-family: var(--fm); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.share-btn  { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-family: var(--fm); font-size: 11px; text-decoration: none; cursor: pointer; transition: border-color .22s, color .22s, background .22s; }
.share-btn:hover { border-color: var(--amber); color: var(--amber); background: var(--a-dim); }

/* ── Keyframes ───────────────────────────────────────────────────── */
@keyframes spin    { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes up      { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadein  { from { opacity: 0; } to { opacity: 1; } }
@keyframes wscroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes blink   { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes gpulse  { 0%, 100% { box-shadow: 0 0 0 2px var(--amber); } 50% { box-shadow: 0 0 0 8px rgba(245,166,35,.12); } }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .side-nav { display: none; }
  :root { --pad: max(52px, calc((100% - 1280px) / 2)); }
  /* Nine nav items between 901px (where .nav-ul is hidden) and 1024px need
     tighter tracking to fit alongside the brand and the action buttons. */
  .nav-ul { gap: 10px; }
  .nav-ul a { font-size: 10px; letter-spacing: .08em; }
}
@media (max-width: 1200px) {
  .nav-ul { gap: 14px; }
  .hero-grid { grid-template-columns: 1fr; }
  .portrait-wrap { width: 100%; flex-direction: column; align-items: center; gap: 72px; margin-top: 32px; }
  .portrait-stack { width: 240px; height: 240px; }
  /* Chips repositioned so they never exceed portrait bounds */
  .chip-tr { right: 0; top: 3%; font-size: 10px; padding: 6px 11px; }
  .chip-bl { left: 0; bottom: 3%; font-size: 10px; padding: 6px 11px; }
  .stats-wrap { grid-template-columns: repeat(3,1fr); }
  .sc-s2 { grid-column: span 1; }
  .about-grid, .research-layout, .contact-wrap { grid-template-columns: 1fr; }
  .proj-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  #nav { padding: 0 20px; }
  .brand-sep, .brand-info { display: none; }
  .nav-ul { display: none; }
  :root { --pad: 20px; }
  /* All text containers must not overflow the viewport */
  .h-desc, .h-sub, .h-id { max-width: 100%; }
  .stats-wrap { grid-template-columns: 1fr 1fr; }
  .h-name { font-size: clamp(54px,16vw,80px); }
  .edu { padding: 22px; }
  /* Terminal fills available width */
  .terminal { width: 100%; max-width: 100%; }
  /* Experience card: revert grid to block; logo sits above content */
  .tl-card { display: block; padding: 22px; }
  .tl-logo { display: block; margin-bottom: 12px; }
  /* Research two-col: revert to single col */
  .research-layout { grid-template-columns: 1fr; }
}

/* ── Extra-small phones (≤ 480 px) ─────────────────────────────── */
@media (max-width: 480px) {
  /* Hide chips on very small screens — they inevitably overlap at this width */
  .s-chip { display: none; }
  /* Tighten nav brand text */
  .brand-mark { font-size: 12px; }
  /* Stack stat cards to 2-col */
  .stats-wrap { grid-template-columns: 1fr 1fr; }
  /* Slightly smaller h-name */
  .h-name { font-size: clamp(48px,15vw,72px); }
  /* The role line is ~70 uppercase characters; at the default .25em tracking
     it wraps to three lines on a phone and the 24px rule floats away from it. */
  .h-eye { font-size: 10px; letter-spacing: .12em; align-items: flex-start; }
  .h-eye .ln { flex-shrink: 0; margin-top: 9px; }
}

/* ── Hamburger button ────────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color .2s;
}
.hamburger:hover { border-color: var(--amber); }
.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--muted);
  transition: transform .3s var(--ease), opacity .3s var(--ease), background .2s;
  transform-origin: center;
}
.hamburger:hover span { background: var(--amber); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--amber); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--amber); }

/* ── Mobile menu drawer ──────────────────────────────────────────── */
.mob-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 2999;
  background: rgba(7,6,8,.97);
  backdrop-filter: blur(24px) saturate(1.3);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  padding: 8px 0 14px;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.mob-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mob-link {
  display: block;
  padding: 13px 32px;
  font-family: var(--fm);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .18em;
  text-transform: uppercase;
  border-left: 2px solid transparent;
  transition: color .2s, border-color .2s, background .2s;
}
.mob-link:hover, .mob-link.on { color: var(--amber); border-left-color: var(--amber); background: var(--a-dim); }

[data-theme="light"] .mob-menu { background: rgba(237,241,247,.97); }

@media (max-width: 900px) {
  .hamburger { display: flex; }
  .mob-menu  { display: flex; }
}

/* ── Waveform: paused until in-view (JS adds .visible) ─────────────── */
.wave-track { animation-play-state: paused; }
.wdiv.visible .wave-track { animation-play-state: running; }

/* ── Contact form: styled validation feedback ────────────────────── */
.cf-input:user-invalid,
.cf-input:not(:placeholder-shown):invalid {
  border-color: #e05555;
  box-shadow: 0 0 0 3px rgba(224, 85, 85, 0.12);
}

/* ── Print stylesheet ────────────────────────────────────────────── */
@media print {
  /* Reset colors to clean black-on-white */
  :root {
    --bg: #fff; --surface: #f5f5f5; --surface-2: #ebebeb;
    --border: #ccc; --border-hi: #bbb;
    --amber: #b86600; --teal: #087a6e;
    --text: #111; --muted: #555; --dim: #aaa;
  }

  /* Hide non-essential UI */
  #prog, #nav, .side-nav, .mob-menu, .hamburger,
  .theme-btn, .wdiv, #hc, .g1, .g2,
  .h-btns, .filter-row, .btt, .contact-form { display: none !important; }

  /* Remove backgrounds and shadows */
  body { background: #fff; color: #111; font-size: 11pt; }
  body::before, body::after { display: none; }
  section, section.alt { background: none; padding: 18pt 0; border-top: 0.5pt solid #ccc; }
  #stats { padding: 12pt 0; }

  /* Ensure full-width layout */
  :root { --pad: 0; }
  .hero-grid, .about-grid, .research-layout,
  .contact-wrap, .proj-grid { grid-template-columns: 1fr; }
  .stats-wrap { grid-template-columns: repeat(3, 1fr); }
  .portrait-wrap { display: none; }

  /* Clean up cards */
  .proj, .sg, .cert, .tl-card, .edu,
  .arc, .mc, .pub, .sc { box-shadow: none !important; border-color: #ccc; background: #f9f9f9; }

  /* Prevent page breaks inside key blocks */
  .proj, .tli, .pub, .cert { break-inside: avoid; }

  /* Ensure links show their href */
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
  .nav-ul a::after, .btt::after, .ci::after { content: none; }

  /* Hero — minimal print header */
  #hero { min-height: auto; padding: 0 0 12pt; }
  .h-name { font-size: 36pt; }
  .h-eye, .h-sub, .h-id, .h-desc { animation: none; opacity: 1; transform: none; }
  .terminal { display: none; }

  /* Reveal animations — disable for print */
  .rv { opacity: 1 !important; transform: none !important; }

  /* Remove clipping corners — they look odd on paper */
  .clip, .btn-a, .btn-b { clip-path: none; border-radius: 2pt; }
}

/* ── prefers-reduced-motion: disable all non-essential animation ──── */
@media (prefers-reduced-motion: reduce) {
  /* Hero entrance animations */
  .h-eye, .h-name, .h-sub, .h-id, .h-status, .h-desc, .h-btns {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .portrait-wrap { animation: none; opacity: 1; }

  /* Scroll-reveal transitions */
  .rv { opacity: 1; transform: none; transition: none; }
  .d1, .d2, .d3, .d4 { transition-delay: 0s; }

  /* Waveform scroll */
  .wave-track { animation: none; }

  /* Portrait rings */
  .p-r1, .p-r2 { animation: none; }

  /* Current-role dot pulse */
  .tli.cur .tl-dot { animation: none; }

  /* Terminal cursor blink */
  .t-cursor { animation: none; opacity: 1; }

  /* Scroll-progress bar */
  #prog { transition: none; }

  /* Button spinner (only shows when loading) */
  .btn-spinner { animation: none; }
}

/* ── Custom cursor — 6 modes, random per session ────────────────── */
@media (pointer: fine) {
  /* Gated on the attribute main.js sets once the custom cursor is actually
     drawing. Without it (404.html, JS disabled, script blocked) the native
     pointer must stay visible. */
  body[data-cursor-mode] { cursor: none; }
  body[data-cursor-mode] :is(a, button, [role="button"], input, textarea,
  select, label[for], .fbtn, .tag, .proj, .nav-ul a, .brand, .theme-btn,
  .ci, summary) { cursor: none; }

  /* ── Shared base ── */
  #cursor-dot {
    position: fixed;
    top: 0; left: 0;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--amber);
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width .15s var(--ease), height .15s var(--ease),
                background .15s var(--ease), opacity .2s;
    will-change: transform;
  }
  #cursor-ring {
    position: fixed;
    top: 0; left: 0;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 2px solid var(--amber);
    opacity: .55;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    transition: width .35s var(--ease), height .35s var(--ease),
                border-color .25s var(--ease), opacity .25s var(--ease),
                background .25s var(--ease);
    will-change: transform;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #cursor-ring.hovering {
    width: 54px; height: 54px;
    background: var(--a-dim);
    opacity: .85;
  }
  @keyframes cursor-burst {
    0%   { width: 36px; height: 36px; opacity: .9; }
    100% { width: 80px; height: 80px; opacity: 0;  }
  }
  #cursor-ring.clicking { animation: cursor-burst .38s var(--ease) forwards; }
  #cursor-dot.hidden, #cursor-ring.hidden { opacity: 0; }

  /* ── Mode 2: Spotlight ── */
  #cursor-spotlight {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9991;
    mix-blend-mode: screen;
    opacity: 0;
    background: radial-gradient(
      circle 300px at var(--cx, -400px) var(--cy, -400px),
      rgba(245,166,35,.35) 0%,
      transparent 70%
    );
    transition: opacity .5s;
  }
  body[data-cursor-mode="2"] #cursor-spotlight { opacity: 1; }
  body[data-cursor-mode="2"] #cursor-dot { width: 5px; height: 5px; opacity: .85; }
  body[data-cursor-mode="2"] #cursor-ring { display: none; }

  /* ── Mode 3: Blend-mode inversion ── */
  body[data-cursor-mode="3"] #cursor-dot {
    width: 30px; height: 30px;
    background: #fff;
    mix-blend-mode: difference;
    transition: width .18s var(--ease), height .18s var(--ease), opacity .2s;
  }
  body[data-cursor-mode="3"] #cursor-dot.hovering { width: 52px; height: 52px; }
  body[data-cursor-mode="3"] #cursor-ring { display: none; }

  /* ── Mode 4: Click ripples ── */
  .cursor-ripple {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99997;
    width: 0; height: 0;
    opacity: 0;
    transform: translate(-50%, -50%);
    animation: ripple-out .7s cubic-bezier(.08,.69,.35,1) forwards;
  }
  .cursor-ripple.r1 { border: 2px solid var(--amber); }
  .cursor-ripple.r2 { border: 2px solid var(--teal);  animation-delay: .13s; }
  .cursor-ripple.r3 { border: 1px solid var(--amber); animation-delay: .26s; }
  @keyframes ripple-out {
    0%   { width: 0;     height: 0;     opacity: .75; }
    100% { width: 100px; height: 100px; opacity: 0;   }
  }

  /* ── Mode 5: Text label cursor ── */
  #cursor-label {
    font-family: var(--fm);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--amber);
    opacity: 0;
    transition: opacity .15s;
    white-space: nowrap;
    user-select: none;
    pointer-events: none;
  }
  body[data-cursor-mode="5"] #cursor-ring.has-label {
    width: 64px; height: 64px;
    background: var(--a-dim);
    opacity: 1;
    transition: width .22s var(--ease), height .22s var(--ease),
                opacity .18s, background .18s;
  }
  body[data-cursor-mode="5"] #cursor-ring.has-label #cursor-label { opacity: 1; }
  body[data-cursor-mode="5"] #cursor-dot.has-label { opacity: 0; }
}

/* ── Contact-form privacy line + footer privacy link ─────────────── */
.cf-privacy    { font-family: var(--fm); font-size: 11.5px; color: var(--muted); line-height: 1.7; margin-top: -4px; }
.cf-privacy a  { color: var(--teal); transition: color .2s; }
.cf-privacy a:hover { color: var(--amber); }
.ft-link       { color: var(--teal); transition: color .2s; }
.ft-link:hover { color: var(--amber); }
