/* =============================================================
   Rishabh Agrawal — academic site
   "The Quiet Lab": serif prose + monospace scaffolding + garnet
   ============================================================= */

/* ---------- Design tokens ---------- */
:root {
  --paper:    #FBFBFA;
  --paper-2:  #F3F2EF;
  --card:     #FFFFFF;
  --ink:      #1A1B1E;
  --ink-2:    #45474C;
  --muted:    #8A8C92;
  --line:     #E6E4DF;
  --line-2:   #D9D6CF;
  --accent:   #8C1D2B;
  --accent-2: #A8324A;
  --accent-wash: rgba(140, 29, 43, 0.07);
  --shadow:   0 1px 2px rgba(26,27,30,.04), 0 8px 28px rgba(26,27,30,.06);
  --shadow-lift: 0 2px 6px rgba(26,27,30,.06), 0 18px 44px rgba(26,27,30,.10);

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1180px;
  --side: 312px;
  --gut: 64px;
  --r: 10px;
}

html[data-theme="dark"] {
  --paper:    #131419;
  --paper-2:  #1A1C22;
  --card:     #1B1D24;
  --ink:      #ECEAE5;
  --ink-2:    #B7B5AF;
  --muted:    #82848B;
  --line:     #2A2D35;
  --line-2:   #353944;
  --accent:   #E36079;
  --accent-2: #ED7E92;
  --accent-wash: rgba(227, 96, 121, 0.12);
  --shadow:   0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
  --shadow-lift: 0 2px 8px rgba(0,0,0,.35), 0 22px 50px rgba(0,0,0,.5);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .35s ease, color .35s ease;
}
img { max-width: 100%; display: block; }
figure { margin: 0; }
a { color: inherit; }

/* ---------- Skip link & focus ---------- */
.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px;
  border-radius: 0 0 8px 0; font: 500 13px/1 var(--sans);
}
.skip:focus { left: 0; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- Layout shell ---------- */
.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: var(--side) 1fr;
  gap: var(--gut);
  align-items: start;
}

/* ---------- Sidebar ---------- */
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 40px 0 28px;
}
.side__inner { display: flex; flex-direction: column; gap: 22px; }

.brandbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2px;
}
.brandbar__name {
  font: 600 15px/1 var(--mono);
  letter-spacing: .02em;
  text-decoration: none;
  color: var(--ink);
}
.brandbar__name span { color: var(--accent); }

.portrait {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 4.4;
}
.portrait img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: 50% 28%;
  filter: saturate(1.02);
}
.portrait::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  pointer-events: none;
}

.identity .eyebrow {
  font: 500 11px/1 var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.identity h1 {
  font: 380 33px/1.04 var(--serif);
  letter-spacing: -.012em;
  margin: 0 0 10px;
  color: var(--ink);
}
.role {
  font: 400 14.5px/1.45 var(--sans);
  color: var(--ink-2);
  margin: 0;
}
.role a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.role a:hover { border-color: var(--accent); color: var(--accent); }

/* sidebar nav */
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: baseline; gap: 12px;
  text-decoration: none;
  font: 500 14px/1 var(--sans);
  color: var(--ink-2);
  padding: 9px 10px;
  border-radius: 8px;
  transition: background .2s, color .2s;
}
.nav a .idx { font: 500 11px/1 var(--mono); color: var(--muted); width: 18px; }
.nav a:hover { background: var(--accent-wash); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent); }
.nav a[aria-current="page"] .idx { color: var(--accent); }

/* social + cv */
.connect { display: flex; flex-direction: column; gap: 14px; margin-top: 2px; }
.socials { display: flex; flex-wrap: wrap; gap: 7px; }
.socials a {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-2);
  background: var(--card);
  transition: all .18s ease;
}
.socials a:hover {
  color: var(--accent); border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.socials svg { width: 16px; height: 16px; }

.btnrow { display: flex; gap: 8px; }
.btn {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  text-decoration: none;
  font: 500 13px/1 var(--sans);
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  transition: all .18s ease;
}
.btn svg { width: 14px; height: 14px; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn--solid { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--solid:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }

.side__foot {
  margin-top: auto;
  padding-top: 22px;
  font: 400 11.5px/1.5 var(--mono);
  color: var(--muted);
  letter-spacing: .01em;
}

/* theme toggle */
.theme {
  appearance: none; border: 1px solid var(--line); background: var(--card);
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer;
  display: grid; place-items: center; color: var(--ink-2);
  transition: all .18s ease;
}
.theme:hover { color: var(--accent); border-color: var(--accent); }
.theme svg { width: 16px; height: 16px; }
.theme .moon { display: none; }
html[data-theme="dark"] .theme .sun { display: none; }
html[data-theme="dark"] .theme .moon { display: block; }

/* ---------- Main content ---------- */
.main { padding: 40px 0 80px; min-width: 0; max-width: 720px; }

.section { padding: 30px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section__head {
  display: flex; align-items: baseline; gap: 14px;
  margin: 0 0 22px;
}
.section__eyebrow {
  font: 500 11px/1 var(--mono);
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent);
}
.section__rule { flex: 1; height: 1px; background: var(--line); }

.lede {
  font: 300 23px/1.5 var(--serif);
  letter-spacing: -.006em;
  color: var(--ink);
  margin: 0 0 26px;
}
.prose p {
  font: 400 17px/1.68 var(--serif);
  color: var(--ink-2);
  margin: 0 0 18px;
}
.prose p:last-child { margin-bottom: 0; }
.prose a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  transition: color .15s, background .15s;
  padding-bottom: 1px;
}
.prose a:hover { color: var(--accent); background: var(--accent-wash); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.tag {
  font: 500 12px/1 var(--mono);
  letter-spacing: .01em;
  color: var(--ink-2);
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--card);
}
.tag::before { content: "›  "; color: var(--accent); }

/* ---------- Selected research cards ---------- */
.pubgrid { display: flex; flex-direction: column; gap: 14px; }
.pub {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  position: relative;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.pub::before {
  content: ""; position: absolute; left: 0; top: 16px; bottom: 16px;
  width: 3px; border-radius: 3px; background: var(--accent);
  opacity: 0; transition: opacity .2s ease;
}
.pub:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: var(--line-2);
}
.pub:hover::before { opacity: 1; }
.pub__media {
  border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-2);
  aspect-ratio: 16/10;
}
.pub__media img, .pub__media video { width: 100%; height: 100%; object-fit: cover; }
.pub__venue {
  font: 500 11px/1 var(--mono);
  letter-spacing: .04em;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.pub__venue .oral {
  color: #fff; background: var(--accent);
  padding: 3px 7px; border-radius: 5px; font-size: 10px; letter-spacing: .06em;
}
.pub__title {
  font: 480 18.5px/1.3 var(--serif);
  letter-spacing: -.01em;
  margin: 0 0 6px;
  color: var(--ink);
}
.pub__authors {
  font: 400 13.5px/1.5 var(--sans);
  color: var(--ink-2);
  margin: 0 0 10px;
}
.pub__authors b { color: var(--ink); font-weight: 600; }
.pub__links { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font: 500 12px/1 var(--mono);
  text-decoration: none;
  color: var(--ink-2);
  border: 1px solid var(--line);
  padding: 6px 9px; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 5px;
  transition: all .15s ease;
}
.chip:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-wash); }
.chip svg { width: 11px; height: 11px; }

details.pub__abs { margin-top: 12px; }
details.pub__abs summary {
  font: 500 12px/1 var(--mono); color: var(--muted);
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px;
  letter-spacing: .04em; text-transform: uppercase;
}
details.pub__abs summary::-webkit-details-marker { display: none; }
details.pub__abs summary::before { content: "+"; color: var(--accent); font-size: 14px; }
details.pub__abs[open] summary::before { content: "–"; }
details.pub__abs[open] summary { margin-bottom: 8px; }
details.pub__abs p {
  font: 400 14.5px/1.6 var(--serif); color: var(--ink-2); margin: 0;
}

.seemore {
  margin-top: 20px;
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 13px/1 var(--sans); text-decoration: none; color: var(--accent);
}
.seemore:hover { gap: 12px; }
.seemore svg { width: 14px; height: 14px; transition: transform .2s; }

/* ---------- News timeline ---------- */
.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before {
  content: ""; position: absolute; left: 86px; top: 4px; bottom: 4px;
  width: 1px; background: var(--line);
}
.tl {
  position: relative;
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 26px;
  padding: 9px 0;
}
.tl__date {
  font: 500 12px/1.4 var(--mono);
  color: var(--muted);
  text-align: right;
  letter-spacing: .01em;
  padding-top: 2px;
}
.tl__body {
  position: relative;
  font: 400 15px/1.55 var(--sans);
  color: var(--ink-2);
}
.tl__body::before {
  content: ""; position: absolute; left: -25px; top: 7px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--line-2);
  transition: all .2s ease;
}
.tl:hover .tl__body::before { border-color: var(--accent); background: var(--accent); }
.tl__body a {
  color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--accent);
}
.tl__body a:hover { color: var(--accent); }
.tl__body .mark { color: var(--accent); font-weight: 600; }
.tl.is-star .tl__body::before { border-color: var(--accent); background: var(--accent); }

.news-toggle {
  margin-top: 24px;
  appearance: none; cursor: pointer;
  background: var(--card); border: 1px solid var(--line);
  font: 500 13px/1 var(--sans); color: var(--ink-2);
  padding: 11px 16px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .18s ease;
}
.news-toggle:hover { border-color: var(--accent); color: var(--accent); }
.timeline .tl.hidden { display: none; }

/* ---------- Contact ---------- */
.contact-card {
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--card); padding: 22px; box-shadow: var(--shadow);
}
.contact-row { display: flex; align-items: flex-start; gap: 14px; padding: 11px 0; }
.contact-row + .contact-row { border-top: 1px solid var(--line); }
.contact-row .ico {
  width: 32px; height: 32px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: var(--accent-wash); color: var(--accent);
}
.contact-row .ico svg { width: 15px; height: 15px; }
.contact-row .lbl { font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 2px 0 4px; }
.contact-row .val { font: 400 14.5px/1.5 var(--sans); color: var(--ink); }
.contact-row .val a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); }
.contact-row .val a:hover { color: var(--accent); }

/* ---------- Research page header ---------- */
.page-head { padding: 8px 0 4px; }
.page-head h2 {
  font: 360 40px/1.05 var(--serif); letter-spacing: -.015em;
  margin: 6px 0 14px; color: var(--ink);
}
.page-head p { font: 300 19px/1.5 var(--serif); color: var(--ink-2); margin: 0; max-width: 60ch; }

.subhead {
  font: 500 12px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin: 40px 0 18px;
  display: flex; align-items: center; gap: 14px;
}
.subhead::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.subhead .count {
  color: var(--muted); border: 1px solid var(--line); border-radius: 100px;
  padding: 3px 8px; letter-spacing: .02em;
}

/* research list (full) */
.rlist { display: flex; flex-direction: column; gap: 16px; }
.rpub {
  display: grid; grid-template-columns: 168px 1fr; gap: 22px;
  padding: 20px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--card); transition: box-shadow .2s, border-color .2s;
}
.rpub:hover { box-shadow: var(--shadow); border-color: var(--line-2); }
.rpub__media {
  border-radius: 8px; overflow: hidden; border: 1px solid var(--line);
  background: var(--paper-2); align-self: start; aspect-ratio: 16/11;
}
.rpub__media img, .rpub__media video { width: 100%; height: 100%; object-fit: cover; }
.rpub__venue { font: 500 11px/1 var(--mono); letter-spacing: .04em; color: var(--accent); margin-bottom: 7px; display: inline-flex; gap: 8px; align-items: center; }
.rpub__venue .oral { color:#fff; background: var(--accent); padding: 3px 7px; border-radius: 5px; font-size: 10px; }
.rpub__title { font: 480 19px/1.3 var(--serif); letter-spacing: -.01em; margin: 0 0 6px; color: var(--ink); }
.rpub__authors { font: 400 13.5px/1.5 var(--sans); color: var(--ink-2); margin: 0 0 10px; }
.rpub__authors b { color: var(--ink); font-weight: 600; }
.rpub__links { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 4px; }
.rpub__abs { margin-top: 12px; }
.rpub__abs summary {
  font: 500 11.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); cursor: pointer; list-style: none; display: inline-flex; gap: 6px; align-items: center;
}
.rpub__abs summary::-webkit-details-marker { display: none; }
.rpub__abs summary::before { content: "+"; color: var(--accent); font-size: 13px; }
.rpub__abs[open] summary::before { content: "–"; }
.rpub__abs p { font: 400 14px/1.62 var(--serif); color: var(--ink-2); margin: 10px 0 0; }

/* ---------- mobile top brand (hidden on desktop) ---------- */
.mobilebar { display: none; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .shell { grid-template-columns: 1fr; gap: 0; padding: 0 22px; }
  .side {
    position: static; height: auto; padding: 26px 0 8px;
    border-bottom: 1px solid var(--line);
  }
  .side__inner {
    display: grid;
    grid-template-columns: 116px 1fr;
    grid-template-areas:
      "brand brand"
      "portrait identity"
      "nav nav"
      "connect connect"
      "foot foot";
    gap: 18px 20px; align-items: center;
  }
  .brandbar { grid-area: brand; }
  .portrait { grid-area: portrait; aspect-ratio: 1/1; }
  .identity { grid-area: identity; }
  .identity h1 { font-size: 28px; }
  .nav { grid-area: nav; flex-direction: row; flex-wrap: wrap; gap: 4px;
         border-top: 1px solid var(--line); padding-top: 14px; }
  .nav a { padding: 8px 12px; }
  .connect { grid-area: connect; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .btnrow { flex: 1; max-width: 280px; }
  .side__foot { grid-area: foot; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
  .main { padding: 26px 0 64px; max-width: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .side__inner { grid-template-columns: 92px 1fr; }
  .identity h1 { font-size: 25px; }
  .lede { font-size: 20px; }
  .prose p { font-size: 16.5px; }
  .pub, .rpub { grid-template-columns: 1fr; }
  .pub__media, .rpub__media { aspect-ratio: 16/8; }
  .timeline::before { left: 66px; }
  .tl { grid-template-columns: 58px 1fr; gap: 22px; }
  .page-head h2 { font-size: 31px; }
  .btnrow { max-width: none; }
}

/* =============================================================
   v2 additions — text cards, scrollable news, footer counter,
   email copy/compose, NEW badge
   ============================================================= */

/* "NEW" badge reuses the oral pill but in a quieter tone */
.pub__venue .oral,
.rpub__venue .oral { white-space: nowrap; }

/* ---- Text-only publication cards (no media column) ---- */
.pub.is-text { grid-template-columns: 1fr; }
.rpub.is-text { grid-template-columns: 1fr; }
.pub.is-text::before { top: 18px; bottom: 18px; }

/* ---- Selected-research: keep author/title rhythm on text cards ---- */
.pub.is-text .pub__title { margin-top: 2px; }

/* ---- Scrollable news ---- */
.scroll-hint {
  font: 500 10px/1 var(--mono);
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px;
}
.scroll-hint::after {
  content: ""; width: 12px; height: 12px;
  background: currentColor;
  -webkit-mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M6 13l6 6 6-6'/%3E%3C/svg%3E");
  mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M6 13l6 6 6-6'/%3E%3C/svg%3E");
  animation: nudge 1.8s ease-in-out infinite;
}
@keyframes nudge { 0%,100%{ transform: translateY(-1px);} 50%{ transform: translateY(2px);} }
@media (prefers-reduced-motion: reduce) { .scroll-hint::after { animation: none; } }
.news-wrap.at-end .scroll-hint { opacity: 0; transition: opacity .25s; }

.news-wrap { position: relative; }
.news-scroll {
  max-height: 540px;
  overflow-y: auto;
  padding: 2px 16px 2px 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.news-scroll:focus-visible { outline-offset: -2px; }
.news-scroll::-webkit-scrollbar { width: 9px; }
.news-scroll::-webkit-scrollbar-track { background: transparent; }
.news-scroll::-webkit-scrollbar-thumb {
  background: var(--line-2); border-radius: 100px;
  border: 2px solid var(--paper); background-clip: padding-box;
}
.news-scroll::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: padding-box; }
.news-wrap::after {
  content: ""; position: absolute; left: 0; right: 16px; bottom: 0;
  height: 52px; pointer-events: none;
  background: linear-gradient(to top, var(--paper) 12%, transparent);
  transition: opacity .25s ease;
}
.news-wrap.at-end::after { opacity: 0; }

/* ---- Site footer + visitor counter ---- */
.sitefoot {
  margin-top: 44px; padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  font: 400 12px/1.5 var(--mono);
  letter-spacing: .01em; color: var(--muted);
}
.visits {
  display: none; align-items: center; gap: 8px;
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 100px;
  background: var(--card); color: var(--ink-2);
}
.visits.is-ready { display: inline-flex; }
.visits svg { width: 14px; height: 14px; color: var(--accent); }
.visits b { font-weight: 500; color: var(--ink); }

/* ---- Contact: email copy + compose ---- */
.emails { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 12px; }
.email-copy {
  appearance: none; cursor: pointer; text-align: left;
  background: transparent; border: 0; padding: 0;
  display: inline-flex; align-items: center; gap: 9px;
  font: 400 14.5px/1.4 var(--sans); color: var(--ink);
}
.email-copy .addr { border-bottom: 1px solid var(--accent); padding-bottom: 1px; }
.email-copy .copy-hint {
  font: 500 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 5px;
  padding: 3px 6px; transition: all .15s ease;
}
.email-copy:hover .copy-hint { color: var(--accent); border-color: var(--accent); }
.email-copy.copied .copy-hint { color: #fff; background: var(--accent); border-color: var(--accent); }

.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cbtn {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  font: 500 12.5px/1 var(--sans); color: var(--ink);
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); transition: all .18s ease;
}
.cbtn svg { width: 14px; height: 14px; color: var(--accent); }
.cbtn:hover { border-color: var(--accent); color: var(--accent); }
.cbtn:hover svg { color: var(--accent); }

@media (max-width: 560px) {
  .news-scroll { max-height: 440px; }
  .sitefoot { font-size: 11px; }
}

/* ---- Diagram/figure thumbnails (SVG): show whole figure, no crop ---- */
.pub__media.fig, .rpub__media.fig { background: #FBFAF7; }
.pub__media.fig img, .rpub__media.fig img { object-fit: contain; }
html[data-theme="dark"] .pub__media.fig, html[data-theme="dark"] .rpub__media.fig { background: #f3f1ec; }

/* ---- Visitor map (MapMyVisitors / ClustrMaps widget) ---- */
.vmap { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.vmap__label { font: 500 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.vmap__box { min-height: 76px; display: block; }
.vmap__box img { border-radius: 8px; border: 1px solid var(--line); display: block; }
@media (max-width: 560px) { .vmap { align-items: flex-start; } }
