:root {
  --han-meta-color: #666;
  --han-footer-bg: #083f6b;
  --han-focus-color: #ff7242;
}

html {
  scroll-padding-top: 80px;
}

/* Keep section headings visibly distinct from subsection headings. */
#post #article-container > h2 {
  margin: 2.6em 0 1em;
  padding-top: 12px;
  border-top: 1px solid var(--hr-border);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.5;
}

/* The opening heading needs no inter-section gap or separator. */
#post #article-container > h2:first-child,
#post #article-container > #post-outdate-notice[hidden]:first-child + h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

#post #article-container > h3 {
  margin: 1.9em 0 0.8em;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.6;
}

#post-info .post-title {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
  overflow-wrap: anywhere;
}

@media (max-width: 768px) {
  #page-header.post-bg {
    height: auto;
    min-height: 360px;
  }

  #page-header.post-bg #post-info {
    position: relative;
    top: auto;
    bottom: auto;
    padding: 100px 0 30px;
    transform: none;
  }

  #post-info .post-title {
    font-size: 28px;
  }
}

@media (max-width: 600px) {
  #post #article-container > h2 {
    font-size: 26px;
  }

  #post #article-container > h3 {
    font-size: 18px;
  }
}

/* Typeset equations are content, not code panels. Long formulas scroll locally. */
#article-container .han-equation {
  max-width: 100%;
  margin: 1.4em 0;
  padding: 8px 2px;
  overflow-x: auto;
  overflow-y: hidden;
  color: var(--font-color);
}

#article-container .han-equation .katex-display {
  margin: 0;
  width: max-content;
  min-width: 100%;
  text-align: center;
}

#article-container .han-equation .katex-display > .katex {
  text-align: center;
}

#article-container .han-equation .katex {
  font-size: 1.25em;
}

.han-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  padding: 10px 16px;
  border-radius: 8px;
  background: #fff;
  color: #1f2d3d;
  box-shadow: 0 4px 16px rgb(0 0 0 / 20%);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.han-skip-link:focus {
  transform: translateY(0);
}

:where(a, button, input, [role='button']):focus-visible {
  outline: 3px solid var(--han-focus-color);
  outline-offset: 3px;
}

#search-button > .search[role='button'] {
  cursor: pointer;
}

#page-header {
  background-color: #0b4f87 !important;
  background-position: center center !important;
  background-size: cover !important;
}

.article-meta-wrap,
.article-meta-wrap a,
.aside-list-item time {
  color: var(--han-meta-color) !important;
}

#footer {
  background: var(--han-footer-bg);
}

#footer,
#footer a,
#footer .framework-info,
#footer .copyright {
  color: #fff !important;
}

#page-header.full_page {
  min-height: 520px;
}

#page-header #site-title,
#page-header #site-subtitle {
  text-shadow: 0 2px 10px rgb(0 35 75 / 55%);
}

#aside-content .card-info .site-data {
  display: none;
}

#sidebar-menus .site-data {
  display: none;
}

.han-motto {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.9em;
  letter-spacing: 0.08em;
  opacity: 0.78;
}

#page-header.full_page #site_social_icons i {
  color: #fff !important;
}

.han-talks-status {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid rgb(73 177 245 / 25%);
  border-radius: 10px;
  background: rgb(73 177 245 / 8%);
  text-align: center;
}

.han-talk-list {
  display: grid;
  gap: 1rem;
}

.han-talk-item {
  padding: 1rem 1.1rem;
  border: 1px solid rgb(73 177 245 / 20%);
  border-radius: 12px;
  background: var(--card-bg, #fff);
  box-shadow: 0 4px 14px rgb(0 0 0 / 6%);
}

.han-talk-meta,
.han-talk-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--han-meta-color);
  font-size: 0.85rem;
}

.han-talk-content {
  margin: 0.75rem 0;
  line-height: 1.8;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.han-talk-content > :first-child {
  margin-top: 0;
}

.han-talk-content > :last-child {
  margin-bottom: 0;
}

.han-talk-tag {
  color: #49b1f5;
}

@media (max-width: 768px) {
  #page-header.full_page {
    min-height: 480px;
    background-image: url('/img/banner-glacier.jpg') !important;
    background-position: center center !important;
    background-size: cover !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
