@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Source+Serif+4:wght@500;600;700&display=swap");

/* Optimized academic profile theme.
   Goal: compact academic layout, front-positioned scrolling news, reduced wasted space. */

:root {
  --bg: #f8f5ef;
  --paper: #fffdfa;
  --card: #ffffff;
  --ink: #172033;
  --text: #344155;
  --muted: #687386;
  --subtle: #8b95a3;
  --line: #e3dccf;
  --line-strong: #d2c7b5;
  --accent: #173b63;
  --accent-soft: #edf3f8;
  --gold: #8a6f3e;
  --gold-soft: #f6efe1;
  --green: #2f6f56;
  --purple: #7352a3;
  --shadow: 0 14px 42px rgba(23, 32, 51, 0.07);
  --shadow-soft: 0 7px 22px rgba(23, 32, 51, 0.055);
  --radius: 18px;
  --max: 1120px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(23, 59, 99, 0.07), transparent 30rem),
    radial-gradient(circle at top right, rgba(138, 111, 62, 0.09), transparent 28rem),
    linear-gradient(180deg, #fbfaf7 0%, var(--bg) 52%, #f4efe6 100%);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(23, 32, 51, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 51, 0.022) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 72%);
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

a:hover { border-bottom-color: rgba(23, 59, 99, 0.35); }

#prog {
  position: fixed;
  inset: 0 auto auto 0;
  height: 3px;
  width: 0%;
  z-index: 999;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 66px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(248, 245, 239, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(211, 200, 181, 0.72);
}

.nav-brand {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav-brand span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0;
  margin: 0 auto;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  color: #425168;
  font-size: 0.88rem;
  font-weight: 650;
  border: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-cv,
.hbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border-radius: 999px;
  font-weight: 750;
  font-size: 0.89rem;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.nav-cv {
  padding: 0 15px;
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 8px 20px rgba(23, 59, 99, 0.15);
  border: none;
}

.nav-cv:hover,
.hbtn:hover { transform: translateY(-1px); }

.nav-cv svg,
.hbtn svg { width: 15px; height: 15px; }

.mob-tog {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 1.1rem;
  cursor: pointer;
}

.mob-menu { display: none; }

/* Hero: compact but still academic */
.hero {
  padding: 38px 24px 24px;
}

.hero-inner {
  width: min(var(--max), calc(100vw - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  padding: 34px 38px;
  border: 1px solid rgba(211, 200, 181, 0.85);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.93), rgba(251, 250, 247, 0.84)),
    radial-gradient(circle at top right, rgba(23, 59, 99, 0.09), transparent 22rem);
  box-shadow: var(--shadow);
}

.hero-photo {
  position: relative;
  width: 238px;
  height: 238px;
  padding: 8px;
  border-radius: 26px;
  background: linear-gradient(135deg, #ffffff, #eee4d4);
  box-shadow: var(--shadow-soft);
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 14px -10px -10px 14px;
  z-index: -1;
  border-radius: 26px;
  border: 1px solid var(--line-strong);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  display: block;
}

.hero-tag {
  width: fit-content;
  margin-bottom: 10px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.hero-name {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(2.45rem, 5vw, 4.45rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 16px;
}

.hero-role,
.itag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(23, 59, 99, 0.12);
  font-size: 0.84rem;
  font-weight: 750;
}

.hero-role { padding: 7px 12px; }

.hero-bio-short {
  max-width: 760px;
  margin: 0;
  color: var(--text);
  font-size: 1.01rem;
  line-height: 1.65;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 21px;
}

.hbtn {
  padding: 0 15px;
  border: 1px solid transparent;
}

.hbtn-primary {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 10px 22px rgba(23, 59, 99, 0.16);
}

.hbtn-primary:hover {
  color: #ffffff;
  background: #102f52;
}

.hbtn-outline {
  color: var(--accent);
  background: #ffffff;
  border-color: var(--line);
}

.hbtn-outline:hover { background: var(--accent-soft); }

/* General page */
.page {
  width: min(var(--max), calc(100vw - 36px));
  margin: 0 auto 50px;
}

.sec {
  margin: 24px 0;
  padding: 0;
}

.sec-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
}

.sec-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(237, 243, 248, 0.86);
  border: 1px solid rgba(23, 59, 99, 0.11);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.sec-line {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.bio-card,
.news-list,
.tl-card,
.pub-list,
.misc-card,
.patent-card,
.cc-grid,
.talk-card {
  border: 1px solid rgba(211, 200, 181, 0.84);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.80);
  box-shadow: var(--shadow-soft);
}

/* Front news: moved near top and scrollable */
.news-front {
  margin-top: 8px;
  margin-bottom: 22px;
}

.news-front .sec-header {
  margin-bottom: 10px;
}

.news-front .news-list {
  max-height: 228px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(23, 59, 99, 0.35) transparent;
}

.news-front .news-list::-webkit-scrollbar {
  width: 8px;
}

.news-front .news-list::-webkit-scrollbar-thumb {
  background: rgba(23, 59, 99, 0.25);
  border-radius: 999px;
}

.news-list {
  overflow: hidden;
}

.news-row {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}

.news-row:last-child { border-bottom: none; }

.news-date {
  color: var(--gold);
  font-weight: 850;
  font-size: 0.86rem;
  white-space: nowrap;
}

.news-text {
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.55;
}

.auto-news-scroll {
  max-height: 260px;
  overflow: hidden;
  position: relative;
}

.news-track {
  display: flex;
  flex-direction: column;
  animation: newsScroll 18s linear infinite;
}

.auto-news-scroll:hover .news-track {
  animation-play-state: paused;
}

@keyframes newsScroll {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50%);
  }
}

.nbadge,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 1px 8px;
  margin-left: 5px;
  border-radius: 999px;
  font-size: 0.70rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.nb-g,
.b-pub {
  color: var(--green);
  background: #eef8f1;
  border: 1px solid #cfe8d8;
}

.nb-b,
.nb-a {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(23, 59, 99, 0.12);
}

.b-rev {
  color: var(--purple);
  background: #f5effb;
  border: 1px solid #e5d5f1;
}

.b-pre {
  color: #8a5c13;
  background: #fbf3df;
  border: 1px solid #ecd8a8;
}

/* Biography */
.bio-card {
  padding: 24px 26px;
}

.bio-text {
  margin: 0 0 13px;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.68;
}

.bio-text:last-of-type { margin-bottom: 0; }

.bio-text strong {
  color: var(--ink);
  font-weight: 750;
}

.interests {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 17px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.itag {
  padding: 6px 10px;
  background: #fbfaf7;
  color: #415066;
  border-color: var(--line);
}

/* Patents */
.patent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
}

.patent-box {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(211, 200, 181, 0.84);
  border-radius: 18px;
  padding: 24px 26px;
  box-shadow: var(--shadow-soft);
}

.patent-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.patent-icon {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #fbfaf7;
  border: 1px solid var(--line);
  font-size: 1.25rem;
}

.patent-title {
  font-size: 1.08rem;
  font-weight: 850;
  line-height: 1.38;
  color: var(--ink);
}

.patent-meta {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  color: var(--gold);
  font-weight: 750;
}

.patent-label {
  color: #6f5a32;
  font-weight: 850;
}

.patent-nos {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.patent-no {
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 750;
}

@media (max-width: 820px) {
  .patent-grid {
    grid-template-columns: 1fr;
  }

  .patent-meta {
    flex-direction: column;
    gap: 2px;
  }
}
/* .patent-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 17px 20px;
  background: linear-gradient(135deg, #ffffff, var(--gold-soft));
}

.patent-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
}

.patent-title { font-weight: 850; }
.patent-sub,
.patent-no {
  color: var(--muted);
  font-size: 0.92rem;
} */

/* Timeline / CV */
.tl-card {
  margin-bottom: 14px;
  overflow: hidden;
}

.tl-grp-title {
  padding: 14px 18px;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.16rem;
  font-weight: 700;
  background: linear-gradient(90deg, #ffffff, #fbfaf7);
  border-bottom: 1px solid var(--line);
}

.tl-wrap { padding: 15px 18px 17px; }

.tl {
  position: relative;
  display: grid;
  gap: 14px;
  padding-left: 20px;
}

.tl::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 7px;
  bottom: 7px;
  width: 1px;
  background: var(--line-strong);
}

.tl-item { position: relative; }

.tl-item::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.tl-period,
.ta-period {
  color: var(--gold);
  font-weight: 850;
  font-size: 0.84rem;
}

.tl-title {
  margin-top: 2px;
  font-weight: 850;
}

.tl-org {
  color: var(--muted);
  font-size: 0.94rem;
}

.dlist {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
}

.dlist li { margin: 5px 0; }

.ta-table {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 10px 18px;
}

.ta-course { color: var(--text); }

/* Publications */
.pub-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 13px;
}

.pf {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: #415066;
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.pf:hover,
.pf.on {
  transform: translateY(-1px);
  color: var(--accent);
  background: var(--accent-soft);
}

.pf-n {
  margin-left: 4px;
  color: var(--subtle);
}

/* .pub-list { padding: 6px; } */
.pub-list {
  max-height: 720px;
  overflow-y: auto;
  padding-right: 8px;
  scroll-behavior: smooth;
}

.pub-list::-webkit-scrollbar {
  width: 8px;
}

.pub-list::-webkit-scrollbar-thumb {
  background: #c9bfae;
  border-radius: 20px;
}

.pub-list::-webkit-scrollbar-track {
  background: #f3eee4;
}

.pub {
  display: block;
  padding: 22px 24px;
}

.pub-title {
  display: block;
  width: 100%;
  margin-bottom: 6px;
}

.pub-authors,
.pub-venue,
.pub-links {
  display: block;
  width: 100%;
  margin-top: 5px;
}
/* .pub {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 8px 15px;
  padding: 17px 16px;
  border-radius: 15px;
  border: 1px solid transparent;
  transition: background 160ms ease, border-color 160ms ease;
} */

.pub + .pub {
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.pub:hover {
  background: #fbfaf7;
  border-color: var(--line);
}

.pub-num {
  grid-row: span 4;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 900;
  font-size: 0.80rem;
}

.pub-title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.09rem;
  line-height: 1.35;
  font-weight: 700;
}

.pub-authors,
.pub-venue {
  color: var(--muted);
  font-size: 0.92rem;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}

.pl {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  background: #ffffff;
  font-size: 0.79rem;
  font-weight: 800;
}

.pl:hover { background: var(--accent-soft); }

/* Talks grid */
.talk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.talk-box {
  width: 100%;
}
/* .talk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
} */

/* .talk-grid {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
} */
/* .talk-box {
  border: 1px solid rgba(211, 200, 181, 0.84);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
} */
/* .talk-box {
  flex: 0 0 520px;
  scroll-snap-align: start;
} */

.talk-box .talk-img-wrap {
  width: 100%;
  height: 190px;
  border-radius: 0;
  border: none;
  background: #f4efe6;
}

.talk-box .talk-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.talk-box .talk-body {
  padding: 18px 20px 20px;
}

.talk-title {
  font-size: 1.05rem;
  font-weight: 850;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 8px;
}

.talk-venue {
  color: var(--gold);
  font-weight: 750;
  margin-bottom: 4px;
}

.talk-date,
.talk-desc {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

.contact-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 34px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.contact-icon {
  color: #2a4872;
  font-size: 1.9rem;
  text-decoration: none;
  transition: transform 160ms ease,
              color 160ms ease,
              opacity 160ms ease;
}

.contact-icon:hover {
  color: #1f4e79;
  transform: translateY(-2px);
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.review-box {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(211, 200, 181, 0.84);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: var(--shadow-soft);
}

.review-title {
  font-size: 1rem;
  font-weight: 850;
  color: var(--accent);
  margin-bottom: 10px;
}

.review-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.65;
}

.review-list li {
  margin-bottom: 8px;
}

.volunteer-scroll {
  max-height: 420px;
  overflow-y: auto;
  padding: 20px 22px;
  border: 1px solid rgba(211, 200, 181, 0.84);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
  scrollbar-width: thin;
  scrollbar-color: rgba(23, 59, 99, 0.35) transparent;
}

.volunteer-scroll::-webkit-scrollbar {
  width: 8px;
}

.volunteer-scroll::-webkit-scrollbar-thumb {
  background: rgba(23, 59, 99, 0.25);
  border-radius: 999px;
}

.volunteer-scroll-wrap {
  position: relative;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: 32px;
  height: 22px;
  display: grid;
  place-items: center;
  color: rgba(23, 59, 99, 0.45);
  font-size: 1.6rem;
  pointer-events: none;
  animation: softBounce 1.8s ease-in-out infinite;
}

.volunteer-scroll {
  padding-bottom: 42px;
}

@keyframes softBounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
    opacity: 0.45;
  }
  50% {
    transform: translateX(-50%) translateY(5px);
    opacity: 0.8;
  }
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 900px) {
  .service-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .review-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .contact-icons {
    gap: 20px;
    flex-wrap: wrap;
  }
}

@media (max-width: 820px) {
  .talk-grid {
    grid-template-columns: 1fr;
  }
}

.misc-card {
  padding: 20px 22px;
  margin-bottom: 13px;
}

.misc-card h3 {
  margin: 0 0 8px;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.1rem;
}

.misc-card p {
  margin: 0;
  color: var(--text);
}

.poetry {
  white-space: pre-line;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fbfaf7;
  color: var(--text);
  font-family: "Source Serif 4", Georgia, serif;
  line-height: 1.72;
}

.poem-credit {
  margin-top: 8px;
  color: var(--subtle);
  font-size: 0.88rem;
}

.cc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.cc {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #ffffff;
}

.cc:hover {
  background: var(--accent-soft);
  border-color: rgba(23, 59, 99, 0.15);
}

.cc-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #fbfaf7;
  border: 1px solid var(--line);
}

.cc-name {
  font-weight: 850;
  color: var(--ink);
}

.cc-sub {
  color: var(--muted);
  font-size: 0.87rem;
}

#btt {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

#btt svg { width: 17px; height: 17px; }

footer {
  width: min(var(--max), calc(100vw - 36px));
  margin: 0 auto;
  padding: 20px 0 34px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.89rem;
}

.rv { opacity: 1; }

/* Responsive */
@media (max-width: 960px) {
  .navbar { padding: 0 18px; }
  .nav-links,
  .nav-cv { display: none; }

  .mob-tog {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .mob-menu {
    position: fixed;
    top: 72px;
    left: 18px;
    right: 18px;
    z-index: 99;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--shadow);
  }

  .mob-menu a {
    display: block;
    padding: 11px 13px;
    border-radius: 13px;
    font-weight: 750;
    color: #415066;
  }

  .mob-menu a:hover {
    background: var(--accent-soft);
    color: var(--accent);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px;
  }

  .hero-photo {
    width: 210px;
    height: 210px;
  }

  .talk-card {
    grid-template-columns: 1fr;
  }

  .talk-img-wrap { height: 200px; }

  .cc-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero {
    padding: 24px 0 18px;
  }

  .hero-inner,
  .page {
    width: min(100% - 22px, var(--max));
  }

  .hero-inner {
    padding: 22px;
    border-radius: 22px;
  }

  .hero-photo {
    width: 170px;
    height: 170px;
  }

  .hero-name { font-size: 2.35rem; }
  .hero-bio-short { font-size: 0.96rem; }

  .news-row,
  .ta-table {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .news-front .news-list { max-height: 270px; }

  .pub {
    grid-template-columns: 1fr;
  }

  .pub-num { grid-row: auto; }

  .bio-card,
  .misc-card { padding: 19px; }

  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
