/* ==========================================================================
   2026 refresh for hemantkakkar.com
   Loaded after style.css (and after each page's own <style> block), so it
   only overrides. To roll back the whole refresh, remove the one <link> to
   this file from each page.
   ========================================================================== */

:root {
  --ink: #12355b;
  --ink-soft: #2b4a6b;
  --muted: #557089;
  --accent: #477998;
  --line: #e3e9ef;
  --bg-soft: #f6f8fa;
  --header-h: 80px;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: #fff;
}

/* Keyboard focus: style.css removes every outline (* { outline: none }).
   Restore a visible ring for keyboard users only. */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent) !important;
  outline-offset: 3px;
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   Header: white, light rule, stays visible while scrolling
   -------------------------------------------------------------------------- */
body > nav {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  backdrop-filter: saturate(160%) blur(8px);
}
.nav-links li a { transition: color .15s ease; }
.nav-links li a:hover { color: var(--accent); }
@media (max-width: 766px) {
  :root { --header-h: 60px; }
  .nav-links.show { border-top: 1px solid var(--line); }
  .nav-links li.active { background-color: var(--bg-soft); }
}

/* --------------------------------------------------------------------------
   Retire the 2018 stock banner photos (books, newspapers).
   The images stay on the server; delete this rule to bring them back.
   -------------------------------------------------------------------------- */
.bg-img { display: none !important; }

/* Space above page content now that the banner is gone */
.research-content,
.press-content { padding-top: 56px; }
.public-content:first-child { padding-top: 56px; }

/* --------------------------------------------------------------------------
   One comfortable reading column on every inner page
   -------------------------------------------------------------------------- */
.research-content,
.press-content,
.public-content {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

/* Page titles */
.container h2 {
  font-size: 2.3em;
  line-height: 1.15;
  letter-spacing: -0.005em;
  border-bottom-color: var(--line);
  padding-bottom: 12px;
}

/* Research page: limit line length of running text (~75–85 characters) */
.research-content .research-area > p,
.research-content .text-content p.research-lead,
.research-content .all-pubs-link {
  max-width: 42em;
}
.research-content .research-area > p { font-size: 1.0625rem; }
.research-content .research-area h3 { font-size: 1.35rem; }

/* Links inside running text look like links */
.home-description .bio-body a,
.research-content .all-pubs-link a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(18, 53, 91, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color .15s ease;
}
.home-description .bio-body a:hover,
.research-content .all-pubs-link a:hover { text-decoration-color: currentColor; }
.research-content .all-pubs-link a { font-weight: 600; }

/* Anchor jumps land below the sticky header */
.research-content .research-area,
.press-section,
#press-top,
#academic-publications,
#practitioner-publications {
  scroll-margin-top: calc(var(--header-h) + 20px) !important;
}

/* Publications: the tabs already say "Academic Publications", so the
   repeated heading right under them is kept for screen readers only */
#academic-publications {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: 0;
}
.publication-section-nav { margin-bottom: 18px !important; }

/* Abstract pop-ups sit above the sticky header */
.modal { z-index: 100; }
.modal-content { border: 0; border-radius: 6px; overflow: hidden; }

/* --------------------------------------------------------------------------
   Homepage
   -------------------------------------------------------------------------- */
.home-content {
  max-width: 1040px;
  padding-top: 72px;
}
/* "Bio" heading and rule: kept for screen readers, hidden on screen */
.home-content > h1,
.home-content > h2,
.home-content > .h-line {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  margin: 0;
}
.home-content .content { margin-bottom: 96px; }
.home-content .content .profile-img img {
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(18, 53, 91, 0.12);
}
.home-description .bio-lead { font-size: 1.3em; line-height: 1.42; }
.home-description .bio-body p { font-size: 1.0625rem; line-height: 1.7; }

@media (max-width: 700px) {
  .home-content { padding-top: 36px; }
  .home-content .content .profile-img { width: min(220px, 62%); }
  .home-content .content { margin-bottom: 64px; }
  .home-description .bio-lead { font-size: 1.15em; }
}

/* --------------------------------------------------------------------------
   Footer: light, quiet
   -------------------------------------------------------------------------- */
footer {
  background-color: var(--bg-soft);
  border-top: 1px solid var(--line);
  color: var(--muted);
}
footer h5 { font-size: 0.85rem; font-weight: 400; color: var(--muted); }
footer .btn-img img { opacity: .8; transition: opacity .15s ease; }
footer .btn-img a:hover img { opacity: 1; }

/* Secondary section headings a step smaller than page titles */
.research-content > h2:not(:first-child),
.practitioner-journals > h2 {
  font-size: 1.8em;
  margin-top: 8px;
}

/* Skip link: hidden until a keyboard user tabs to it */
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 200;
  padding: 10px 16px; background: var(--ink); color: #fff !important;
  border-radius: 4px; font-weight: 600; transition: top .15s ease;
}
.skip-link:focus { top: 12px; }
#main { scroll-margin-top: var(--header-h); }

/* Small accent labels: a slightly darker blue so they meet the 4.5:1 contrast standard */
.home-description .bio-eyebrow,
.research-content .research-overview-number,
.research-content .key-papers h4,
.press-topic-number,
.press-topic-action,
.press-back-top { color: #3b6987 !important; }

/* Publications tabs: shorter labels on small phones so both fit on one line */
@media (max-width: 420px) {
  .publication-section-nav .tab-long { display: none; }
}
