/* =====================================================================
   manojdevkota.com.np
   ---------------------------------------------------------------------
    1 tokens        2 base           3 masthead      4 hero
    5 voltammogram  6 stat band      7 bands/rails   8 cards
    9 timeline     10 awards/skills 11 contact/foot 12 motion
   13 responsive   14 print
   ===================================================================== */

/* ---------- 1. TOKENS ---------- */
:root {
  /* neutrals */
  --paper:    #f8f8f6;
  --paper-2:  #ffffff;
  --tint:     #f1f2ef;
  --ink:      #131d28;
  --ink-2:    #3f4d5a;
  --ink-3:    #6c7a87;
  --rule:     #e3e4de;
  --rule-2:   #cfd2ca;

  /* accents */
  --teal:     #0e8f9c;
  --cyan:     #1179b0;
  --indigo:   #3b5bd0;
  --violet:   #6c5cd6;
  --rose:     #c2467e;
  --amber:    #c07d1e;

  --accent:   var(--teal);
  --accent-2: var(--violet);

  /* voltammogram */
  --cv-1: #0e8f9c;
  --cv-2: #3b5bd0;
  --cv-3: #6c5cd6;
  --cv-grid: #e6e7e1;

  --grad: linear-gradient(100deg, var(--teal), var(--indigo) 55%, var(--violet));

  --shadow-1: 0 1px 2px rgba(19,29,40,.05), 0 3px 10px rgba(19,29,40,.05);
  --shadow-2: 0 2px 6px rgba(19,29,40,.06), 0 14px 34px rgba(19,29,40,.09);
  --shadow-3: 0 10px 24px rgba(19,29,40,.10), 0 30px 70px rgba(19,29,40,.13);

  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --shell: 1180px;
  --rail:  210px;
  --gap:   56px;
  --ease:  cubic-bezier(.4, 0, .2, 1);
  --t:     .25s var(--ease);
}

[data-theme="dark"] {
  --paper:    #080f18;
  --paper-2:  #0e1824;
  --tint:     #0b131d;
  --ink:      #e8edf3;
  --ink-2:    #aebac7;
  --ink-3:    #768595;
  --rule:     #1a2735;
  --rule-2:   #2b3d4f;

  --teal:     #35c9c9;
  --cyan:     #4bb8e8;
  --indigo:   #7b93ff;
  --violet:   #a78bfa;
  --rose:     #f472b6;
  --amber:    #eab355;

  --cv-1: #35c9c9;
  --cv-2: #7b93ff;
  --cv-3: #a78bfa;
  --cv-grid: #172433;

  --shadow-1: 0 1px 3px rgba(0,0,0,.45);
  --shadow-2: 0 4px 16px rgba(0,0,0,.5);
  --shadow-3: 0 18px 54px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* no-JS dark fallback (the head script normally stamps data-theme first) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:#080f18; --paper-2:#0e1824; --tint:#0b131d;
    --ink:#e8edf3; --ink-2:#aebac7; --ink-3:#768595;
    --rule:#1a2735; --rule-2:#2b3d4f;
    --teal:#35c9c9; --cyan:#4bb8e8; --indigo:#7b93ff; --violet:#a78bfa;
    --rose:#f472b6; --amber:#eab355;
    --cv-1:#35c9c9; --cv-2:#7b93ff; --cv-3:#a78bfa; --cv-grid:#172433;
    color-scheme: dark;
  }
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}

img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3 {
  font-family: var(--serif); font-weight: 600; color: var(--ink);
  line-height: 1.24; margin: 0 0 .45em; letter-spacing: -.006em;
}

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--ink); }

sub { font-size: .72em; }

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

.shell { width: min(100% - 3rem, var(--shell)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--ink); color: var(--paper);
  padding: .75rem 1.25rem; font-size: .85rem; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- 3. MASTHEAD ---------- */
.masthead {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t), background-color var(--t);
}
.masthead.stuck { border-bottom-color: var(--rule); }

.masthead-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; height: 66px;
}

.wordmark { display: flex; align-items: center; gap: .6rem; color: var(--ink); }
.wordmark-mark {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border-radius: 9px; background: var(--grad); color: #fff;
  font-family: var(--serif); font-size: .95rem; font-weight: 700;
  box-shadow: var(--shadow-1);
}
.wordmark-text {
  font-family: var(--mono); font-size: .78rem; font-weight: 500;
  letter-spacing: .15em; text-transform: uppercase; white-space: nowrap;
}
.wordmark:hover .wordmark-text { color: var(--accent); }

.nav ul { display: flex; gap: 1.65rem; }
.nav a {
  position: relative; display: block; padding-block: .35rem;
  font-family: var(--mono); font-size: .73rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  border-radius: 2px; background: var(--grad);
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav a.active { color: var(--ink); }

.masthead-tools { display: flex; align-items: center; gap: .4rem; }

.tool {
  width: 34px; height: 34px; padding: 0; display: grid; place-items: center;
  background: none; border: 1px solid transparent; border-radius: 8px;
  color: var(--ink-3); cursor: pointer;
  transition: color var(--t), border-color var(--t), background-color var(--t);
}
.tool:hover { color: var(--accent); border-color: var(--rule); background: var(--paper-2); }
.tool svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.i-moon { display: none; }
[data-theme="dark"] .i-sun { display: none; }
[data-theme="dark"] .i-moon { display: block; }

.burger { display: none; }
.burger span { display: block; width: 15px; height: 1.6px; margin: 3px auto; background: currentColor; border-radius: 2px; transition: transform var(--t), opacity var(--t); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4.6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-4.6px) rotate(-45deg); }

.readline { height: 2px; width: 0; background: var(--grad); transition: width .1s linear; }

/* ---------- 4. HERO ---------- */
.hero { position: relative; padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 4.5rem); overflow: hidden; }

.aurora { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .40; }
.blob-a { width: 520px; height: 520px; top: -190px; right: -120px;
  background: radial-gradient(circle, var(--teal), transparent 68%); animation: drift 19s var(--ease) infinite; }
.blob-b { width: 430px; height: 430px; bottom: -220px; left: -140px;
  background: radial-gradient(circle, var(--violet), transparent 68%); animation: drift 24s var(--ease) infinite reverse; }
.blob-c { width: 330px; height: 330px; top: 40%; left: 42%;
  background: radial-gradient(circle, var(--indigo), transparent 70%); opacity: .22; animation: drift 30s var(--ease) infinite; }
[data-theme="dark"] .blob { opacity: .24; }
[data-theme="dark"] .blob-c { opacity: .16; }

.mesh {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--rule) 1px, transparent 1px),
                    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(ellipse 72% 62% at 42% 40%, #000 12%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 72% 62% at 42% 40%, #000 12%, transparent 76%);
  opacity: .6;
}
@keyframes drift { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-32px, 30px) scale(1.1); } }

.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.22fr .78fr;
  gap: clamp(2rem, 4.5vw, 4rem); align-items: center;
}

.hero-id { display: flex; align-items: flex-start; gap: clamp(1.4rem, 3vw, 2.4rem); }

/* --- round portrait --- */
.portrait {
  position: relative; margin: .5rem 0 0; flex: none;
  width: clamp(124px, 14.5vw, 176px); aspect-ratio: 1;
  border-radius: 50%;
}
.portrait-ring {
  position: absolute; inset: -11px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--teal), var(--cyan), var(--indigo), var(--violet), var(--rose), var(--amber), var(--teal));
  animation: spin 14s linear infinite; opacity: .95;
}
.portrait-ring::after {
  content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--paper);
}
@keyframes spin { to { transform: rotate(360deg); } }

.portrait img {
  position: relative; z-index: 2;
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; object-position: 50% 40%;
  background: #fff;
  box-shadow: var(--shadow-2);
  transition: transform .5s var(--ease);
}
.portrait:hover img { transform: scale(1.03); }
[data-theme="dark"] .portrait img { filter: brightness(.94) saturate(.95); }

.portrait-chip {
  position: absolute; z-index: 3; right: -6px; bottom: 2px;
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 50%; background: var(--grad); color: #fff;
  box-shadow: var(--shadow-2); border: 3px solid var(--paper);
}
.portrait-chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* --- hero text --- */
.hero-kicker {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--mono); font-size: .71rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: .9rem;
}
.ping { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); flex: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 22%, transparent); animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 22%, transparent); } 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--teal) 4%, transparent); } }

.hero-name h1 {
  font-size: clamp(2.4rem, 5.6vw, 3.9rem);
  letter-spacing: -.028em; margin-bottom: .2em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--ink);
}

.hero-role {
  font-family: var(--sans); font-weight: 600; font-size: 1.02rem;
  color: var(--ink); margin-bottom: 1.1rem; line-height: 1.4;
}
.hero-role-org {
  display: block; font-weight: 400; font-size: .9rem; color: var(--ink-3);
}

.tagline {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1rem, 1.9vw, 1.18rem); color: var(--ink-2);
  line-height: 1.6; margin-bottom: 1.35rem; max-width: 46ch;
}

.hero-tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.6rem; }
.hero-tags li {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .03em;
  padding: .3rem .7rem; border-radius: 999px;
  border: 1px solid; background: var(--paper-2);
}
.t-teal   { color: var(--teal);   border-color: color-mix(in srgb, var(--teal) 38%, transparent); }
.t-violet { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 38%, transparent); }
.t-amber  { color: var(--amber);  border-color: color-mix(in srgb, var(--amber) 38%, transparent); }

.hero-cta { display: flex; flex-wrap: wrap; gap: .6rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.05rem; border-radius: 9px;
  font-family: var(--mono); font-size: .76rem; letter-spacing: .02em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform var(--t), box-shadow var(--t), background-color var(--t), color var(--t), border-color var(--t);
}
.btn svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-solid { background: var(--grad); color: #fff; box-shadow: var(--shadow-1); }
.btn-solid:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-2); }
.btn-line { background: var(--paper-2); color: var(--ink-2); border-color: var(--rule-2); }
.btn-line:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

/* ---------- 5. VOLTAMMOGRAM ---------- */
.voltammogram { margin: 0; }
.cv-frame {
  background: var(--paper-2); border: 1px solid var(--rule);
  border-radius: 14px; padding: 1rem .9rem .6rem;
  box-shadow: var(--shadow-1);
}
.voltammogram svg { width: 100%; height: auto; display: block; }
.cv-grid line { stroke: var(--cv-grid); stroke-width: 1; }
.cv-axis { stroke: var(--rule-2); stroke-width: 1.2; }
.cv-zero { stroke: var(--rule-2); stroke-width: 1; stroke-dasharray: 2 4; }
.cv-lab  { font-family: var(--mono); font-size: 9px; fill: var(--ink-3); }
.cv-peak { font-family: var(--mono); font-size: 8px; fill: var(--ink-3); }
.cv-f, .cv-r { fill: none; stroke-width: 2.1; stroke-linecap: round; }
.cv-dot { fill: var(--paper-2); stroke-width: 1.8; }
.cv-dot-a { stroke: var(--cv-2); }
.cv-dot-b { stroke: var(--cv-1); }

.cv-f, .cv-r { stroke-dasharray: 640; stroke-dashoffset: 640; animation: trace 2.2s var(--ease) .3s forwards; }
.cv-r { animation-delay: 1s; }
.cv-area { opacity: 0; animation: fadein .9s var(--ease) 2s forwards; }
.cv-dot  { opacity: 0; animation: fadein .6s var(--ease) 2.4s forwards; }
@keyframes trace  { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }

.voltammogram figcaption {
  font-size: .8rem; line-height: 1.7; color: var(--ink-3); margin-top: .85rem;
}
.voltammogram figcaption strong { color: var(--ink-2); font-weight: 600; }

/* ---------- 6. STAT BAND ---------- */
.stats { border-block: 1px solid var(--rule); background: var(--paper-2); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat {
  padding: 1.5rem .6rem; text-align: center;
  border-left: 1px solid var(--rule);
}
.stat:first-child { border-left: 0; }
.stat strong {
  display: block; font-family: var(--serif); font-size: 2.1rem; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat span {
  display: block; margin-top: .45rem;
  font-family: var(--mono); font-size: .68rem; line-height: 1.6;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
}

/* ---------- 7. BANDS + RAILS ---------- */
.band { padding: clamp(3rem, 6vw, 4.6rem) 0; border-bottom: 1px solid var(--rule); }
.band.tint { background: var(--tint); }

.row { display: grid; grid-template-columns: var(--rail) 1fr; gap: var(--gap); align-items: start; }

.rail {
  display: flex; align-items: baseline; gap: .55rem;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3);
  margin: .45rem 0 0; position: sticky; top: 92px;
}
.rail-num {
  font-size: .66rem; font-weight: 600; letter-spacing: .04em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.col { max-width: 72ch; }
.col.wide { max-width: none; }

.lead { font-size: 1.08rem; color: var(--ink-2); }

/* ---------- 8. INTEREST CARDS ---------- */
.icards { display: grid; grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); gap: 1rem; }

.icard {
  position: relative; overflow: hidden;
  background: var(--paper-2); border: 1px solid var(--rule);
  border-radius: 14px; padding: 1.35rem 1.25rem;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.icard::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--c, var(--teal));
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.icard:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); border-color: var(--rule-2); }
.icard:hover::before { transform: scaleX(1); }

.icard-ico {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 11px; margin-bottom: .85rem;
  color: var(--c, var(--teal));
  background: color-mix(in srgb, var(--c, var(--teal)) 12%, transparent);
}
.icard-ico svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icard h3 { font-size: 1.02rem; margin: 0; line-height: 1.35; }

.c-teal   { --c: var(--teal); }
.c-cyan   { --c: var(--cyan); }
.c-indigo { --c: var(--indigo); }
.c-violet { --c: var(--violet); }
.c-rose   { --c: var(--rose); }
.c-amber  { --c: var(--amber); }

/* ---------- publication ---------- */
.citation {
  position: relative;
  background: var(--paper-2); border: 1px solid var(--rule);
  border-radius: 14px; padding: 1.6rem 1.7rem;
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--t), transform var(--t);
}
.citation::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  border-radius: 14px 0 0 14px; background: var(--grad);
}
.citation:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }

.cite-badge {
  display: inline-block; margin-bottom: .85rem;
  font-family: var(--mono); font-size: .67rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--violet); background: color-mix(in srgb, var(--violet) 11%, transparent);
  padding: .3rem .7rem; border-radius: 999px;
}
.cite-title { font-family: var(--serif); font-size: 1.16rem; font-weight: 600; color: var(--ink); line-height: 1.4; margin-bottom: .5em; }
.cite-meta { font-size: .9rem; color: var(--ink-3); margin-bottom: 1em; }
.cite-meta strong { color: var(--ink-2); }

.doi, .links a {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--mono); font-size: .75rem;
  padding: .4rem .75rem; border-radius: 8px;
  border: 1px solid var(--rule-2); color: var(--accent);
  transition: all var(--t);
}
.doi svg, .links svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.doi:hover, .links a:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent); }

/* ---------- 9. TIMELINE ---------- */
.track { position: relative; padding-left: 1.9rem; }
.track::before {
  content: ""; position: absolute; left: 5px; top: .7rem; bottom: .7rem; width: 2px;
  background: linear-gradient(var(--teal), var(--indigo) 45%, var(--violet) 75%, transparent);
  opacity: .35;
}

.tnode { position: relative; padding-bottom: 2.1rem; }
.tnode:last-child { padding-bottom: 0; }
.tnode::before {
  content: ""; position: absolute; left: -1.9rem; top: .55rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--paper); border: 2.5px solid var(--rule-2);
  transition: border-color var(--t), box-shadow var(--t);
}
.band.tint .tnode::before { background: var(--tint); }
.tnode.in::before { border-color: var(--teal); }
.tnode.is-current::before {
  border-color: var(--teal);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--teal) 16%, transparent);
}

.when {
  font-family: var(--mono); font-size: .74rem; color: var(--ink-3);
  margin: 0 0 .35rem; display: flex; align-items: center; gap: .5rem;
}
.now {
  font-size: .62rem; letter-spacing: .09em; text-transform: uppercase; font-weight: 600;
  color: #fff; background: var(--grad); padding: .12rem .5rem; border-radius: 999px;
}

.what h3 { font-size: 1.12rem; margin-bottom: .28em; }
.org  { color: var(--ink-2); font-size: .95rem; margin-bottom: .35em; }
.note { margin-bottom: .55em; }
.grade {
  display: inline-block; font-family: var(--mono); font-size: .7rem;
  color: var(--amber); background: color-mix(in srgb, var(--amber) 13%, transparent);
  padding: .15rem .55rem; border-radius: 5px; margin-right: .5rem;
}
.note { font-size: .78rem; color: var(--ink-3); font-family: var(--mono); }

.thesis {
  font-family: var(--serif); font-style: italic; font-size: .96rem; color: var(--ink-2);
  border-left: 2px solid color-mix(in srgb, var(--violet) 45%, transparent);
  padding: .1rem 0 .1rem .9rem; margin-top: .7em;
}

.duties { margin-top: .55em; }
.duties li { position: relative; padding-left: 1.05rem; font-size: .95rem; margin-bottom: .35em; }
.duties li::before {
  content: ""; position: absolute; left: 0; top: .66em;
  width: 5px; height: 5px; border-radius: 50%;
  background: color-mix(in srgb, var(--teal) 55%, transparent);
}

/* ---------- 10. AWARDS + SKILLS ---------- */
.awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.award {
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 14px;
  padding: 1.5rem 1.35rem; transition: transform var(--t), box-shadow var(--t);
}
.award:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.award-ico {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px;
  margin-bottom: .9rem; color: var(--amber);
  background: color-mix(in srgb, var(--amber) 13%, transparent);
}
.award-ico svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.award-year { font-family: var(--mono); font-size: .72rem; color: var(--ink-3); margin-bottom: .4rem; }
.award h3 { font-size: 1.02rem; line-height: 1.35; margin-bottom: .25em; }
.award-org { font-size: .87rem; color: var(--ink-3); margin: 0; }

.skill-set { padding-bottom: 1.9rem; }
.skill-set:last-child { padding-bottom: 0; }
.skill-set h3 {
  display: flex; align-items: center; gap: .55rem;
  font-family: var(--mono); font-weight: 500; font-size: .73rem;
  letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .8em;
}
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.d-teal { background: var(--teal); } .d-indigo { background: var(--indigo); }
.d-amber { background: var(--amber); } .d-violet { background: var(--violet); }
.d-cyan { background: var(--cyan); }

.pills { display: flex; flex-wrap: wrap; gap: .45rem; }
.pills li {
  font-size: .84rem; padding: .35rem .8rem; border-radius: 999px;
  background: var(--paper-2); border: 1px solid var(--rule); color: var(--ink-2);
  transition: border-color var(--t), color var(--t), transform var(--t);
}
.pills li:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem; }
.two-up .skill-set { padding-bottom: 0; }

.plain li { padding: .62rem 0; border-bottom: 1px solid var(--rule); font-size: .95rem; color: var(--ink-2); }
.plain li:last-child { border-bottom: 0; }

/* ---------- 11. CONTACT + FOOTER ---------- */
.contact-band { border-bottom: 0; }
.cta {
  position: relative; overflow: hidden;
  background: var(--paper-2); border: 1px solid var(--rule);
  border-radius: 20px; padding: clamp(2rem, 5vw, 3.4rem);
  box-shadow: var(--shadow-2); text-align: center;
}
.cta-glow {
  position: absolute; width: 560px; height: 560px; top: -320px; left: 50%;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--teal) 32%, transparent), transparent 66%);
  filter: blur(50px);
}
.cta > *:not(.cta-glow) { position: relative; z-index: 1; }
.cta-kicker {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 1rem;
}
.cta-mail { margin-bottom: .8rem; }
.cta-mail a {
  font-family: var(--serif); font-size: clamp(1.35rem, 3.6vw, 2.15rem); font-weight: 600;
  letter-spacing: -.02em; color: var(--ink);
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cta-mail a:hover { opacity: .82; }
.cta-text { max-width: 52ch; margin: 0 auto 1.7rem; color: var(--ink-2); }
.links { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }

.foot { padding: 2rem 0; border-top: 1px solid var(--rule); }
.foot-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: var(--mono); font-size: .72rem; color: var(--ink-3);
}
.foot p { margin: 0; }
.linky {
  font: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--ink-3); border-bottom: 1px solid var(--rule-2);
  transition: color var(--t), border-color var(--t);
}
.linky:hover { color: var(--accent); border-bottom-color: var(--accent); }

.totop {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 90;
  width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--paper-2); color: var(--ink-3);
  border: 1px solid var(--rule); border-radius: 50%;
  cursor: pointer; box-shadow: var(--shadow-1);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all var(--t);
}
.totop.show { opacity: 1; visibility: visible; transform: none; }
.totop:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }
.totop svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.toast {
  position: fixed; left: 50%; bottom: 1.8rem; z-index: 200;
  transform: translate(-50%, 18px);
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: .74rem;
  padding: .55rem 1.1rem; border-radius: 7px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t), transform var(--t);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 12. MOTION ---------- */
.js .reveal { opacity: 0; transform: translateY(15px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.col .reveal:nth-child(2), .icards .reveal:nth-child(2), .awards .reveal:nth-child(2), .stat-grid .reveal:nth-child(2) { transition-delay: .06s; }
.col .reveal:nth-child(3), .icards .reveal:nth-child(3), .awards .reveal:nth-child(3), .stat-grid .reveal:nth-child(3) { transition-delay: .12s; }
.col .reveal:nth-child(4), .icards .reveal:nth-child(4), .stat-grid .reveal:nth-child(4) { transition-delay: .18s; }
.icards .reveal:nth-child(5) { transition-delay: .24s; }
.icards .reveal:nth-child(6) { transition-delay: .30s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .cv-f, .cv-r { stroke-dashoffset: 0; }
  .cv-area, .cv-dot { opacity: 1; }
}

/* ---------- 13. RESPONSIVE ---------- */
@media (max-width: 1040px) {
  :root { --rail: 160px; --gap: 34px; }
  .hero-grid { grid-template-columns: 1fr; }
  .voltammogram { max-width: 460px; }
}

@media (max-width: 880px) {
  .nav {
    position: absolute; left: 0; right: 0; top: 66px;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    max-height: 0; overflow: hidden; transition: max-height .34s var(--ease);
  }
  .nav.open { max-height: 340px; }
  .nav ul { flex-direction: column; gap: 0; padding: .5rem 1.5rem 1.2rem; }
  .nav a { display: block; padding: .72rem 0; font-size: .8rem; border-bottom: 1px solid var(--rule); }
  .nav li:last-child a { border-bottom: 0; }
  .nav a::after { display: none; }
  .burger { display: grid; }

  .row { grid-template-columns: 1fr; gap: 1.3rem; }
  .rail { position: static; padding-bottom: .65rem; border-bottom: 1px solid var(--rule-2); }
  .col { max-width: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--rule); }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .shell { width: calc(100% - 2.2rem); }
  .wordmark-text { display: none; }
  .hero-id { flex-direction: column; align-items: flex-start; gap: 1.3rem; }
  .portrait { width: 128px; }
  .tagline { max-width: none; }
  .two-up { grid-template-columns: 1fr; gap: 1.7rem; }
  .foot-inner { flex-direction: column; align-items: flex-start; }
  .btn { font-size: .72rem; padding: .55rem .85rem; }
  .cta { border-radius: 16px; }
}

/* ---------- 14. PRINT ---------- */
@media print {
  :root {
    --paper:#fff; --paper-2:#fff; --tint:#fff;
    --ink:#000; --ink-2:#1a1a1a; --ink-3:#555;
    --rule:#ccc; --rule-2:#999;
    --teal:#000; --indigo:#000; --violet:#000; --amber:#333; --accent:#000;
    --grad: none;
  }
  .masthead, .totop, .toast, .aurora, .voltammogram, .hero-cta, .foot .linky, .portrait-ring, .portrait-chip { display: none !important; }
  body { font-size: 10.5pt; line-height: 1.45; background: #fff; }
  .hero { padding: 0 0 .7rem; }
  .hero-name h1 { font-size: 22pt; -webkit-text-fill-color: #000; color: #000; background: none; }
  .stat strong, .rail-num, .cta-mail a { -webkit-text-fill-color: #000; color: #000; background: none; }
  .band { padding: .5rem 0; border-bottom: 0; page-break-inside: avoid; }
  .stats { border: 0; }
  .stat-grid { grid-template-columns: repeat(4,1fr); }
  .shell { width: 100%; }
  .row { grid-template-columns: 128px 1fr; gap: 1.1rem; }
  .rail { position: static; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .portrait { width: 88px; }
  .tnode, .icard, .award, .citation { page-break-inside: avoid; }
  .icard, .award, .citation, .cta { box-shadow: none; border: 1px solid #ccc; }
  .cta-glow { display: none; }
  a { color: #000; }
  .doi::after, .links a::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
}
