a:hover {
  color: #1d6fd8;
  fill: #1d6fd8;
}

.post .post-content {
  margin-top: 24px;
  line-height: 1.4;
  padding-left: 2rem;
}

.post-content h1 { margin-top: 24px; }
.post-content h2 { margin-top: 20px; }
.post-content h3 { margin-top: 16px; }
.post-content h4 { margin-top: 12px; }

.post .post-header-section {
  margin-bottom: 0;
}

.post .post-header-section h1 {
  font-size: 1.8rem;
}

/* Math boxes */
.math-box {
  border-left: 4px solid;
  border-radius: 0 4px 4px 0;
  margin: 1.2em 0;
  padding: 0.6em 1em 0.6em 1em;
}

.math-box-title {
  font-weight: 700;
  margin-bottom: 0.3em;
}

.math-box-content > p:last-child {
  margin-bottom: 0;
}

.math-definition {
  border-color: #4a7fc1;
  background-color: rgba(74, 127, 193, 0.08);
}

.math-definition .math-box-title {
  color: #4a7fc1;
}

.math-theorem {
  border-color: #c0392b;
  background-color: rgba(192, 57, 43, 0.07);
}

.math-theorem .math-box-title {
  color: #c0392b;
}

.math-proof {
  border-color: #888;
  background-color: rgba(128, 128, 128, 0.06);
}

.math-proof .math-box-title {
  color: #555;
  font-style: italic;
  font-weight: 600;
}

.math-qed {
  float: right;
  font-size: 1.1em;
}

.math-example {
  border-color: #888;
  background-color: transparent;
}

.math-example .math-box-title {
  color: #555;
}

/* Language switcher dropdown */
.lang-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 50px;
  vertical-align: top;
}

.lang-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 0 6px;
  opacity: 0.75;
  line-height: normal;
  transition: opacity 0.2s;
  user-select: none;
}

.lang-dropdown:hover .lang-dropdown-toggle {
  opacity: 1;
}

.lang-dropdown-toggle svg {
  height: 20px;
  width: 20px;
  margin: -3px 0;
  stroke-width: 1;
}

.lang-chevron {
  transition: transform 0.2s;
}

.lang-dropdown:hover .lang-chevron {
  transform: rotate(180deg);
}


/* --dark-primary-color is only defined when dark.css is active;
   when absent, the fallback --light-primary-color takes effect */
.lang-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  margin-top: 6px;
  right: 0;
  list-style: none;
  padding: 4px 0;
  min-width: 80px;
  border-radius: 6px;
  z-index: 200;
  background: rgb(var(--dark-primary-color, var(--light-primary-color)));
  border: 1.5px solid var(--dark-secondary-color, var(--light-secondary-color));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Invisible bridge filling the margin-top gap to keep :hover active */
.lang-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 6px;
}

.lang-dropdown:hover .lang-dropdown-menu {
  display: block;
}

.lang-dropdown-menu li a {
  display: block;
  padding: 6px 16px;
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.lang-dropdown-menu li a:hover {
  opacity: 1;
}

/* Clock widget */
.clock-widget {
  margin-top: 1.2rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.6;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-align: center;
}

.clock-date {
  margin-bottom: 0.2em;
}

.clock-time-row {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.5em;
}

#clock-time {
  font-weight: 600;
}

.clock-tz {
  font-size: 0.78rem;
  opacity: 0.75;
}

/* Weather widget */
.weather-widget {
  margin-top: 0.8rem;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.65;
  letter-spacing: 0.03em;
}

.wc-msg {
  font-size: 0.82rem;
  opacity: 0.8;
}

.wc-main {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
}

.wc-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.wc-info {
  text-align: left;
}

.wc-top {
  display: flex;
  align-items: baseline;
  gap: 0.35em;
}

.wc-temp {
  font-size: 1.35rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.wc-desc {
  font-size: 0.82rem;
}

.wc-sub {
  font-size: 0.76rem;
  opacity: 0.8;
  margin-top: 0.1em;
}

.wc-dot {
  margin: 0 0.05em;
}

