/* Custom styles for the site glass layer and personal pages. */

:root {
  --site-bg-image: url("/images/wallhaven-wqery6-light.webp");
  --site-page-scrim: rgba(248, 250, 252, 0.18);
  --site-glass-bg: rgba(255, 255, 255, 0.62);
  --site-glass-bg-strong: rgba(255, 255, 255, 0.82);
  --site-glass-bg-subtle: rgba(255, 255, 255, 0.42);
  --site-glass-border: rgba(255, 255, 255, 0.38);
  --site-glass-shadow: 0 14px 40px rgba(15, 23, 42, 0.14);
  --site-glass-blur: 18px;
  --card-bg: rgba(255, 255, 255, 0.34);
}

.dark {
  --site-bg-image: url("/images/wallhaven-wqery6-dark.webp");
  --site-page-scrim: rgba(10, 12, 18, 0.34);
  --site-glass-bg: rgba(32, 33, 36, 0.58);
  --site-glass-bg-strong: rgba(32, 33, 36, 0.82);
  --site-glass-bg-subtle: rgba(32, 33, 36, 0.42);
  --site-glass-border: rgba(255, 255, 255, 0.12);
  --site-glass-shadow: 0 14px 44px rgba(0, 0, 0, 0.32);
  --card-bg: rgba(32, 33, 36, 0.42);
}

html,
body,
.page-container {
  background: transparent !important;
  background-color: transparent !important;
}

body {
  min-height: 100%;
  isolation: isolate;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -2;
  background-image: var(--site-bg-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: blur(7px) saturate(1.08);
  transform: scale(1.04);
}

body::after {
  z-index: -1;
  background: var(--site-page-scrim);
}

.navbar-container,
.home-content-container .home-article-list .home-article-item,
.home-sidebar-container .sidebar-content,
.home-sidebar-container .sidebar-links,
.page-template-container,
.archive-container,
.tag-container,
.post-page-container .article-content-container,
.post-page-container .toc-content-container,
.side-tools-container .right-bottom-tools,
.paginator a.page-number,
.paginator span.page-number,
.paginator a.prev,
.paginator a.next,
footer.footer,
.navbar-container .right .desktop .navbar-list .navbar-item .sub-menu {
  background: var(--site-glass-bg) !important;
  background-color: var(--site-glass-bg) !important;
  border-color: var(--site-glass-border) !important;
  box-shadow: var(--site-glass-shadow) !important;
  -webkit-backdrop-filter: blur(var(--site-glass-blur)) saturate(1.18);
  backdrop-filter: blur(var(--site-glass-blur)) saturate(1.18);
}

.navbar-container {
  border-bottom: 1px solid var(--site-glass-border);
}

.home-sidebar-container .sidebar-links .links:hover,
.navbar-container .right .desktop .navbar-list .navbar-item .sub-menu li a:hover {
  background: var(--site-glass-bg-subtle) !important;
  background-color: var(--site-glass-bg-subtle) !important;
}

.navbar-drawer,
.search-pop-overlay .search-popup,
.code-container,
.markdown-body blockquote:not(.not-markdown) {
  background: var(--site-glass-bg-strong) !important;
  background-color: var(--site-glass-bg-strong) !important;
  border-color: var(--site-glass-border) !important;
  -webkit-backdrop-filter: blur(12px) saturate(1.08);
  backdrop-filter: blur(12px) saturate(1.08);
}

.code-container,
.markdown-body blockquote:not(.not-markdown) {
  box-shadow: var(--redefine-box-shadow-flat);
}

/* ---- Right-side language tool ---- */
.tool-language-toggle {
  position: relative;
  gap: 0;
}

.tool-language-toggle i {
  transform: translate(-2px, -1px);
}

.tool-language-toggle .lang-toggle-mark {
  position: absolute;
  right: 5px;
  bottom: 5px;
  min-width: 16px;
  height: 13px;
  padding: 0 3px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  line-height: 13px;
  text-align: center;
  color: var(--background-color, #fff);
  background: var(--primary-color, #7FAEC2);
}

.tool-language-toggle:hover .lang-toggle-mark {
  color: var(--primary-color, #7FAEC2);
  background: var(--background-color, #fff);
}

.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;
}

/* ---- Generic section blocks on personal pages ---- */
.page-section {
  margin: 2.2rem 0;
}
.page-section > h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-lead {
  opacity: 0.85;
  margin-bottom: 1rem;
}

/* ---- Me: vertical profile ---- */
body:has(.me-page) .page-template-content > h1 {
  display: none;
}

.me-page {
  --me-ink: var(--default-text-color, #1f2933);
  --me-muted: var(--second-text-color, #52616f);
  --me-border: rgba(92, 111, 128, 0.18);
  --me-cyan: #4f9fba;
  --me-amber: #b7791f;
  max-width: 920px;
  margin: 0.25rem auto 0;
  color: var(--me-ink);
}

.me-page *,
.me-page *::before,
.me-page *::after {
  box-sizing: border-box;
}

.me-page h1,
.me-page h2,
.me-page h3,
.me-page p {
  color: inherit;
  overflow-wrap: anywhere;
}

.me-page h1,
.me-page h2,
.me-page h3 {
  padding-bottom: 0 !important;
  border-bottom: 0 !important;
  letter-spacing: 0;
}

.me-page a {
  color: var(--me-cyan) !important;
  text-decoration: none !important;
}

.me-section {
  margin: 0 0 2.4rem;
}

.me-section:not(:last-child) {
  position: relative;
  padding-bottom: 0.1rem;
}

.me-section:not(:last-child)::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 2.35rem;
  background: linear-gradient(90deg, transparent, var(--me-border), transparent);
}

.me-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.25rem !important;
  font-size: clamp(1.45rem, 3.2vw, 2.05rem);
  line-height: 1.18;
  font-weight: 820;
}

.me-section-icon {
  display: inline-flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--me-border);
  border-radius: 8px;
  color: var(--me-cyan);
  background:
    linear-gradient(135deg, rgba(79, 159, 186, 0.18), transparent 58%),
    rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.me-section-icon i {
  font-size: 0.95rem;
  line-height: 1;
}

.me-about-section {
  padding-top: 0.05rem;
}

.me-prose {
  display: grid;
  gap: 0.86rem;
  max-width: 800px;
}

.me-prose p {
  margin: 0;
  color: var(--me-muted);
  font-size: 0.98rem;
  line-height: 1.78;
}

.me-entry-list {
  display: grid;
  gap: 1.35rem;
  margin: 0.2rem 0 0;
}

.me-entry {
  min-width: 0;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--me-border);
}

.me-entry:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.page-template-container .page-template-content .me-page .me-entry > h3:first-child {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.28;
  font-weight: 800;
}

.markdown-body .me-page .me-entry-company {
  margin: 0.12rem 0 0.68rem;
  color: var(--me-ink);
  font-size: 0.98rem;
  font-weight: 780;
  line-height: 1.32;
  opacity: 0.84;
}

.me-detail-list,
.me-research-list,
.me-awards-list {
  margin: 0;
  padding-left: 0;
}

.markdown-body .me-page .me-detail-list,
.markdown-body .me-page .me-research-list,
.markdown-body .me-page .me-awards-list {
  display: grid;
  gap: 0.5rem;
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.me-detail-list li,
.me-research-list li,
.me-awards-list li {
  color: var(--me-muted);
  font-size: 0.94rem;
  line-height: 1.68;
  padding-left: 0.18rem;
}

.markdown-body .me-page .me-detail-list li,
.markdown-body .me-page .me-research-list li,
.markdown-body .me-page .me-awards-list li {
  --me-bullet-top: 0.83em;
  position: relative;
  margin-left: 0;
  padding-left: 1.18rem;
  list-style: none;
  line-height: 1.68;
}

.markdown-body .me-page .me-detail-list li::before,
.markdown-body .me-page .me-research-list li::before,
.markdown-body .me-page .me-awards-list li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: var(--me-bullet-top);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--me-cyan);
  transform: translateY(-50%);
}

.me-detail-list strong {
  color: var(--me-ink);
  font-weight: 760;
}

.me-research-list {
  display: grid;
  gap: 0.8rem;
}

.me-research-list li {
  min-width: 0;
}

.me-paper-title {
  display: block;
  color: var(--me-ink);
  font-weight: 760;
}

.me-paper-venue {
  display: block;
  margin-top: 0.16rem;
  color: var(--me-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.me-link-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.46rem 0 0;
  vertical-align: top;
}

.me-link-row a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.04rem 0.48rem;
  border: 1px solid rgba(79, 159, 186, 0.28);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 760;
  line-height: 1.25;
}

.me-link-row a:hover {
  background: rgba(79, 159, 186, 0.1);
}

.me-awards-list {
  display: grid;
  gap: 0.38rem;
}

.dark .me-page {
  --me-ink: var(--default-text-color, #f2f5f7);
  --me-muted: rgba(226, 232, 240, 0.72);
  --me-border: rgba(226, 232, 240, 0.14);
}

.dark .me-section-icon {
  color: #f0bf5a;
  background:
    linear-gradient(135deg, rgba(240, 191, 90, 0.16), transparent 58%),
    rgba(255, 255, 255, 0.05);
}

@media (max-width: 520px) {
  .me-page {
    margin-top: 0;
  }

  .me-section {
    margin-bottom: 2rem;
  }

  .me-section-title {
    gap: 0.62rem;
    margin-bottom: 1rem !important;
  }

  .me-section-icon {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
    border-radius: 7px;
  }

  .me-section-icon i {
    font-size: 0.84rem;
  }

  .markdown-body .me-page .me-detail-list li,
  .markdown-body .me-page .me-research-list li,
  .markdown-body .me-page .me-awards-list li {
    --me-bullet-top: 0.78em;
  }

  .me-link-row {
    display: flex;
    margin: 0.42rem 0 0;
  }
}

/* ---- Home identity sidebar ---- */
.home-identity-card {
  cursor: default;
  margin-top: 0.8rem;
  padding: 16px !important;
}

.home-identity-card .avatar img:hover {
  box-shadow: var(--redefine-box-shadow-flat);
}

.home-identity-card .author {
  margin: 0.55rem 0 0.1rem !important;
}

.home-identity-school {
  margin: 0 0 0.48rem;
  color: var(--second-text-color);
  font-size: 0.86rem;
  font-weight: 720;
  line-height: 1.12;
  text-align: center;
}

.home-identity-focus {
  width: 100%;
  margin: 0.62rem 0 0.4rem;
  padding: 0.62rem 0 0.54rem;
  border-top: 1px solid rgba(127, 127, 127, 0.15);
  border-bottom: 1px solid rgba(127, 127, 127, 0.15);
}

.home-identity-focus-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.home-identity-focus-item {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.58rem;
  min-height: 50px;
  padding: 0.5rem 0.68rem;
  color: var(--second-text-color);
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(127, 127, 127, 0.16);
  border-radius: var(--redefine-border-radius-large, 14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
}

.home-identity-focus-item i {
  flex: 0 0 26px;
  width: 26px;
  color: var(--third-text-color);
  font-size: 1.3rem;
  text-align: center;
}

.home-identity-focus-item span {
  min-width: 0;
  white-space: nowrap;
}

.static-sidebar-statistics .item,
.home-identity-statistics .item {
  cursor: default;
  text-decoration: none;
}

.home-identity-statistics .statistics {
  margin-top: 0.45rem !important;
  margin-bottom: 0 !important;
}

.dark .home-identity-focus {
  border-top-color: rgba(255, 255, 255, 0.1);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark .home-identity-focus-item {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

@media (min-width: 769px) and (max-height: 825px) {
  .home-identity-focus {
    display: none;
  }
}

@media (min-width: 769px) and (max-height: 519px) {
  .home-identity-card {
    display: none;
  }
}

/* ---- Timeline (Education / Experience) ---- */
.timeline {
  list-style: none;
  margin: 1.2rem 0;
  padding: 0 0 0 1.4rem;
  border-left: 2px solid rgba(127, 174, 194, 0.25);
}
.timeline-item {
  position: relative;
  padding: 0 0 1.6rem 0.6rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: calc(-1.4rem - 6px);
  top: 0.4rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-color, #7FAEC2);
  box-shadow: 0 0 0 4px var(--background-color, #fff);
}
.timeline-body h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}
.timeline-body p {
  margin: 0.3rem 0;
  font-size: 0.92rem;
  opacity: 0.88;
  line-height: 1.6;
}

/* ---- Research (enumerated) ---- */
.research-list {
  margin: 1.2rem 0;
  padding-left: 1.4rem;
}
.research-list > li {
  margin-bottom: 1.4rem;
  padding-left: 0.4rem;
}
.research-list > li::marker {
  color: var(--primary-color, #7FAEC2);
  font-weight: 700;
}
.research-list h3 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
}
.research-list p {
  margin: 0.3rem 0;
  font-size: 0.92rem;
  opacity: 0.88;
  line-height: 1.6;
}
.award-list { line-height: 1.9; }

/* ---- Project case cards ---- */
.projects-page {
  margin-top: 1.05rem;
  color: var(--default-text-color, #1f2933);
}
.project-card {
  padding: 1.15rem 1.25rem 1.2rem;
  margin: 1rem 0;
  border-radius: 10px;
  background: var(--card-bg, rgba(127, 127, 127, 0.05));
  border: 1px solid rgba(127, 127, 127, 0.1);
  color: var(--default-text-color, #1f2933);
}
.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}
.project-title-block {
  min-width: 0;
}
.projects-page .project-title-block h3 {
  margin: 0 !important;
  padding-bottom: 0;
  border-bottom: 0;
  font-size: 1.34rem;
  line-height: 1.22;
}
.project-card .project-meta {
  color: var(--second-text-color, currentColor);
  margin-top: 0.36rem;
  font-size: 0.82rem;
  line-height: 1.45;
  opacity: 0.82;
}
.project-card .project-field {
  margin: 0.6rem 0;
  font-size: 0.94rem;
  line-height: 1.68;
  color: var(--default-text-color, #1f2933);
}
.project-card .project-field > strong {
  display: inline;
  margin: 0 0.35rem 0 0;
  color: inherit;
  font-size: 0.88em;
  font-weight: 700;
}
.project-card .project-field > span {
  display: inline;
  color: inherit;
}
.project-card .project-stack {
  display: inline-flex;
  flex-wrap: wrap;
  vertical-align: middle;
  gap: 0.35rem 0.45rem;
  margin: 0 0 0 0.35rem;
}
.project-card .project-stack span {
  padding: 2px 8px;
  font-size: 0.76rem;
  line-height: 1.55;
  border-radius: 999px;
  color: var(--default-text-color, #1f2933);
  background: rgba(127, 127, 127, 0.06);
  border: 1px solid rgba(127, 127, 127, 0.16);
  opacity: 0.9;
}
.project-links {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.02rem;
}
.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  color: inherit !important;
  background: rgba(127, 127, 127, 0.06);
  border: 1px solid rgba(127, 127, 127, 0.12);
  opacity: 0.48;
  text-decoration: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}
.project-link:hover {
  background: rgba(127, 174, 194, 0.1);
  border-color: rgba(127, 174, 194, 0.28);
  opacity: 0.9;
  transform: translateY(-1px);
}
.project-link i {
  font-size: 1.05rem;
  line-height: 1;
}

/* ---- About: murmur timeline ---- */
.murmur-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid rgba(127, 174, 194, 0.25);
}
.murmur-item {
  position: relative;
  padding: 0.5rem 0 1.1rem 1.3rem;
}
.murmur-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.75rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #7FAEC2;
}
.murmur-text {
  font-size: 0.98rem;
  line-height: 1.6;
  white-space: pre-line;
}
.murmur-meta {
  margin-top: 0.3rem;
  font-size: 0.8rem;
  opacity: 0.65;
}
.murmur-mood {
  display: inline-block;
  padding: 1px 8px;
  margin-left: 0.3rem;
  border-radius: 999px;
  background: rgba(215, 198, 242, 0.22);
  color: #6F9CAF;
  font-size: 0.74rem;
}

/* ---- About: CV ---- */
.cv-frame {
  width: 100%;
  height: 70vh;
  min-height: 480px;
  border: 1px solid rgba(127, 127, 127, 0.2);
  border-radius: 12px;
}
.cv-actions {
  margin: 0.8rem 0;
}
.cv-actions a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--primary-color, #7FAEC2);
  color: #fff !important;
  font-size: 0.9rem;
}
.cv-placeholder {
  padding: 2rem;
  text-align: center;
  border: 1px dashed rgba(127, 127, 127, 0.3);
  border-radius: 12px;
  opacity: 0.7;
}

/* ---- About: globe ---- */
.footprints-page {
  max-width: 920px;
  margin: 0.25rem auto 0;
}

.footprints-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  margin: 0.35rem 0 0.35rem;
  border-bottom: 1px solid rgba(127, 127, 127, 0.16);
}

.footprints-page .section-lead {
  flex: 1 1 360px;
  max-width: 560px;
  margin: 0;
  line-height: 1.65;
}

.footprints-controls {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem 0.8rem;
  min-width: 0;
}

#globe-container {
  width: 100%;
  min-height: 340px;
  display: flex;
  justify-content: center;
  margin: 0.2rem 0 1rem;
}
.footprints-page .globe-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  font-size: 0.85rem;
  opacity: 0.86;
  margin: 0;
}
.footprints-page .globe-legend > span {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.globe-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
  box-shadow: 0 0 0 3px rgba(127, 127, 127, 0.08);
}
.globe-marker {
  display: block;
  position: relative;
  width: var(--marker-size, 9px);
  height: var(--marker-size, 9px);
  left: var(--marker-offset-x, 0px);
  top: var(--marker-offset-y, 0px);
  border-radius: 50%;
  background: var(--marker-color, #5b8cff);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--marker-color, #5b8cff) 22%, transparent),
    0 0 13px color-mix(in srgb, var(--marker-color, #5b8cff) 74%, transparent);
  pointer-events: auto;
}
.globe-marker:hover,
.globe-marker:focus-visible {
  z-index: 2;
}
.globe-marker-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 3;
  display: grid;
  gap: 0.18rem;
  width: max-content;
  max-width: min(230px, 62vw);
  padding: 0.5rem 0.6rem;
  border: 1px solid rgba(127, 127, 127, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: #26323d;
  box-shadow: 0 10px 28px rgba(28, 40, 52, 0.16);
  font-size: 12px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, 4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  white-space: normal;
}
.globe-marker-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 9px;
  height: 9px;
  border-right: 1px solid rgba(127, 127, 127, 0.2);
  border-bottom: 1px solid rgba(127, 127, 127, 0.2);
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}
.globe-marker:hover .globe-marker-tooltip,
.globe-marker:focus-visible .globe-marker-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}
.globe-marker-tooltip strong,
.globe-marker-tooltip span {
  display: block;
}
.globe-marker-type {
  color: var(--marker-color, #5b8cff);
  font-weight: 700;
}
.globe-marker-detail {
  opacity: 0.78;
}
.dark .globe-marker {
  border-color: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--marker-color, #5b8cff) 24%, transparent),
    0 0 16px color-mix(in srgb, var(--marker-color, #5b8cff) 82%, transparent);
}
.dark .globe-marker-tooltip {
  border-color: rgba(226, 232, 240, 0.16);
  background: rgba(23, 30, 38, 0.94);
  color: #eef3f7;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
}
.globe-rotate-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(127, 127, 127, 0.22);
  border-radius: 8px;
  background: rgba(127, 127, 127, 0.06);
  color: var(--default-text-color, #1f2933);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.globe-rotate-toggle:hover {
  border-color: var(--primary-color, #7FAEC2);
  background: rgba(127, 174, 194, 0.13);
  transform: translateY(-1px);
}
.globe-rotate-toggle:focus-visible {
  outline: 2px solid var(--primary-color, #7FAEC2);
  outline-offset: 3px;
}
.dark .globe-rotate-toggle {
  background: rgba(255, 255, 255, 0.06);
  color: var(--default-text-color, #f2f5f7);
}

/* ---- About: friends ---- */
.friends-link-container > div:has(> h2:empty) {
  display: none;
}

.friend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.9rem;
}
.friend-card {
  display: block;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: var(--card-bg, rgba(127, 127, 127, 0.06));
  border: 1px solid rgba(127, 127, 127, 0.12);
  text-decoration: none !important;
}
.friend-card strong { display: block; }
.friend-card span { font-size: 0.84rem; opacity: 0.7; }

@media (min-width: 641px) and (max-width: 768px) {
  body:has(.home-banner-container) .main-content-body {
    padding-right: 19px !important;
  }
}

@media (max-width: 600px) {
  .cv-frame { height: 60vh; }
  .footprints-page {
    margin-top: 0;
  }
  .footprints-intro {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
  }
  .footprints-page .section-lead {
    max-width: none;
    flex-basis: auto;
  }
  .footprints-controls {
    justify-content: space-between;
  }
  .footprints-page .globe-legend {
    flex: 1 1 auto;
  }
  #globe-container {
    min-height: 320px;
    margin-top: 0.1rem;
  }
  .projects-page {
    margin-top: 0.9rem;
  }
  .project-card {
    padding: 1rem;
    margin: 0.9rem 0;
  }
  .project-header {
    gap: 0.75rem;
    margin-bottom: 0.65rem;
  }
  .projects-page .project-title-block h3 {
    font-size: 1.12rem;
  }
  .project-card .project-field {
    margin: 0.64rem 0;
    font-size: 0.94rem;
  }
  .project-card .project-stack {
    display: flex;
    margin: 0.28rem 0 0;
  }
  .project-link {
    width: 1.9rem;
    height: 1.9rem;
  }
}
