﻿[hidden] {
  display: none !important;
}

@property --theme-progress {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 0%;
}

:root {
  color-scheme: light;
  --theme-progress: 0%;
  --bg: color-mix(in srgb, #f7f4ed, #101213 var(--theme-progress));
  --surface: color-mix(in srgb, #fffdf8, #171a1d var(--theme-progress));
  --surface-elevated: color-mix(in srgb, #ffffff, #1d2125 var(--theme-progress));
  --surface-muted: color-mix(in srgb, #ebe6da, #252a2f var(--theme-progress));
  --text: color-mix(in srgb, #1f2428, #f4f7f8 var(--theme-progress));
  --muted: color-mix(in srgb, #646a70, #aeb7bd var(--theme-progress));
  --border: color-mix(in srgb, #d8d0c0, #313941 var(--theme-progress));
  --accent: color-mix(in srgb, #19766e, #7cd5c8 var(--theme-progress));
  --accent-strong: color-mix(in srgb, #0e514d, #b0f2e7 var(--theme-progress));
  --accent-soft: color-mix(in srgb, #d8eeeb, #193c39 var(--theme-progress));
  --accent-warm: color-mix(in srgb, #b66a2c, #f0b66d var(--theme-progress));
  --accent-warm-soft: color-mix(in srgb, #f2dfc8, #3f2f1d var(--theme-progress));
  --code-bg: color-mix(in srgb, #111418, #090b0d var(--theme-progress));
  --code-text: color-mix(in srgb, #f5f7fb, #f7f9fb var(--theme-progress));
  --shadow-color: color-mix(in srgb, rgb(39 42 45 / 12%), rgb(0 0 0 / 34%) var(--theme-progress));
  --glow-color: color-mix(in srgb, transparent, rgb(124 213 200 / 12%) var(--theme-progress));
  --shadow: 0 18px 58px var(--shadow-color);
  --glow: 0 0 34px var(--glow-color);
  --max-width: 1080px;
}

:root.theme-ready {
  transition: none;
}

[data-theme="dark"] {
  color-scheme: dark;
  --theme-progress: 100%;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  padding-top: 60px;
  background:
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 24%),
    radial-gradient(circle at 78% 12%, color-mix(in srgb, var(--accent-warm) 16%, transparent), transparent 28%),
    radial-gradient(ellipse at top left, color-mix(in srgb, var(--accent-soft) 42%, transparent), transparent 40%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 96%, var(--surface-muted)), var(--bg));
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, color-mix(in srgb, rgb(25 52 55 / 3%), transparent var(--theme-progress)) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(180deg, color-mix(in srgb, rgb(25 52 55 / 2%), rgb(255 255 255 / 2%) var(--theme-progress)) 0 1px, transparent 1px 12px),
    radial-gradient(circle at 70% 20%, color-mix(in srgb, rgb(255 255 255 / 45%), transparent var(--theme-progress)), transparent 32%);
  opacity: 0.28;
}

.ambient-particle-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  opacity: 1;
  pointer-events: none;
  transform: scale(1);
  filter: blur(0);
  transition: opacity 420ms ease, transform 420ms ease, filter 420ms ease;
}

.site-header,
main,
.site-footer,
.page-controls {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent-strong);
}

.site-header {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(calc(100% - 24px), var(--max-width));
  max-width: var(--max-width);
  margin: 0 auto;
  transform: translateX(-50%);
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand,
.site-nav,
.hero-actions,
.post-meta,
.article-meta,
.filters,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  min-width: 0;
  font-weight: 800;
}

.brand-mark {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--accent) 70%, white 16%);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 28%, transparent);
}

.site-nav {
  gap: 8px;
  color: var(--muted);
  font-size: 15px;
}

.site-nav a,
.icon-button,
.lang-button {
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.site-nav a {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 10px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-color: var(--border);
  background: var(--surface-muted);
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  font-weight: 800;
}

.icon-button,
.lang-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.lang-button {
  min-width: 38px;
  padding: 0 8px;
  font-weight: 850;
}

.icon-button:hover,
.lang-button:hover,
.button:hover,
.topic-list a:hover,
.chip:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 62%, var(--border));
  box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 13%, transparent);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: stretch;
  padding: 76px 0 48px;
}

.hero.hero-simple {
  position: relative;
  grid-template-columns: minmax(0, 900px);
  justify-content: start;
  padding: 96px 0 62px;
}

.hero.hero-simple::before {
  content: "ROOT / INDEX";
  display: inline-flex;
  position: absolute;
  top: 44px;
  left: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
  background: var(--surface);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 800;
}

.hero.hero-simple .hero-copy {
  max-width: 900px;
}

.hero.hero-simple .hero-text {
  max-width: 720px;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(42px, 7.5vw, 82px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero h1 {
  overflow-wrap: normal;
  line-height: 1.12;
  padding: 0.08em 0 0.12em;
  background: linear-gradient(135deg, var(--text), color-mix(in srgb, var(--accent) 62%, var(--text)), var(--accent-warm));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin: 12px 0 8px;
  font-size: 22px;
  line-height: 1.25;
}

.hero-text,
.page-title p,
.article-header p {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
}

.hero-text {
  margin-top: 20px;
  font-size: 20px;
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button.primary {
  border-color: color-mix(in srgb, var(--accent) 82%, white 8%);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 72%, var(--accent-warm)));
  color: #ffffff;
}

.button.secondary {
  background: var(--surface);
}

.hero-panel {
  display: grid;
  gap: 14px;
  align-self: end;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel > div {
  display: grid;
  gap: 2px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.hero-panel > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.metric {
  font-size: 30px;
  font-weight: 900;
  line-height: 1.1;
}

.label,
.post-meta,
.article-meta,
.post-date {
  color: var(--muted);
  font-size: 14px;
}

.section {
  position: relative;
  padding: 46px 0;
  border-top: 1px solid var(--border);
}

.section::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 160px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.section-heading {
  margin-bottom: 20px;
}

.home-post-grid {
  max-width: 720px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.post-card,
.topic-list a,
.post-row {
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.post-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-elevated) 96%, var(--accent-soft)), var(--surface));
  box-shadow: var(--shadow);
}

.post-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 3px solid var(--accent);
  pointer-events: none;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 58%, var(--border));
  box-shadow: var(--shadow), var(--glow);
}

.post-card p,
.post-row p {
  color: var(--muted);
}

.post-meta,
.article-meta {
  gap: 10px;
  flex-wrap: wrap;
}

.post-meta span,
.chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--surface-muted);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 850;
}

.text-link::after {
  content: ">";
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.split {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
}

.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.topic-list a {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgb(0 0 0 / 4%);
  font-weight: 800;
}

.topic-list a:hover {
  background: var(--accent-soft);
}

.page-title {
  padding: 70px 0 32px;
}

.page-title h1,
.article-header h1,
.not-found h1 {
  font-size: clamp(40px, 7vw, 68px);
}

.filters {
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.chip {
  color: var(--muted);
  cursor: pointer;
}

.chip.is-active {
  border-color: color-mix(in srgb, var(--accent) 76%, white 10%);
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--surface) 70%, var(--accent-soft)));
  color: var(--text);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent), var(--glow);
  font-weight: 900;
}

.post-list {
  display: grid;
  gap: 0;
}

.post-row {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 22px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

.post-row:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
}

.post-row h2 {
  margin-top: 8px;
}

.post-row h2 a:hover {
  color: var(--accent-strong);
}

.article {
  max-width: 820px;
  margin: 0 auto;
  padding: 68px 0 28px;
}

.article-header {
  margin-bottom: 36px;
}

.article-content {
  font-size: 18px;
}

.article-content h2 {
  position: relative;
  margin-top: 42px;
  padding-left: 16px;
}

.article-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  width: 4px;
  height: 1.05em;
  border-radius: 999px;
  background: var(--accent);
}

.article-content a {
  color: var(--accent);
  font-weight: 800;
}

.contact-email {
  color: var(--accent);
  font-weight: 800;
}

pre {
  overflow-x: auto;
  border: 1px solid color-mix(in srgb, var(--border) 66%, transparent);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 4%), transparent),
    var(--code-bg);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 5%);
  color: var(--code-text);
  font-size: 15px;
  line-height: 1.55;
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.site-footer {
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 26px 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
}

.theme-transition-field {
  position: fixed;
  inset: 0;
  z-index: 120;
  width: 100vw;
  height: 100vh;
  display: block;
  pointer-events: none;
  contain: strict;
  transform: translateZ(0);
  backface-visibility: hidden;
}

::view-transition-group(root) {
  animation-duration: var(--theme-reveal-duration, 760ms);
}

::view-transition-image-pair(root) {
  isolation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 2;
  clip-path: circle(0 at var(--theme-origin-x, 50vw) var(--theme-origin-y, 50vh));
  filter:
    drop-shadow(0 0 7px color-mix(in srgb, var(--accent) 68%, transparent))
    drop-shadow(0 0 18px color-mix(in srgb, var(--accent) 34%, transparent));
  animation: theme-radial-reveal var(--theme-reveal-duration, 760ms) cubic-bezier(0.2, 0.78, 0.18, 1) forwards;
}

@keyframes theme-radial-reveal {
  to {
    clip-path: circle(var(--theme-reveal-radius, 150vmax) at var(--theme-origin-x, 50vw) var(--theme-origin-y, 50vh));
  }
}

main,
.site-footer {
  transform-origin: 50% 18%;
  transition: opacity 220ms ease, transform 220ms cubic-bezier(0.4, 0, 1, 1), filter 220ms ease;
}

body.is-page-entering main,
body.is-page-entering .site-footer {
  animation: page-content-enter 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.is-page-entering .ambient-particle-field {
  opacity: 0;
  transform: scale(0.985);
}

body.is-page-leaving {
  pointer-events: none;
}

body.is-page-leaving main,
body.is-page-leaving .site-footer {
  opacity: 0;
  transform: translateY(-8px) scale(0.992);
  filter: blur(3px);
}

body.is-page-leaving .ambient-particle-field {
  opacity: 0;
  transform: scale(1.018);
  filter: blur(2px);
}

@keyframes page-content-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.992);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

.not-found {
  display: grid;
  min-height: 100vh;
  align-content: center;
  justify-items: start;
  gap: 12px;
}

.article-content blockquote {
  margin: 24px 0;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--muted);
}

.article-content ul,
.article-content ol {
  padding-left: 24px;
}

.article-content li + li {
  margin-top: 8px;
}

.article-content table {
  width: 100%;
  margin: 22px 0;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 16px;
}

.article-content th,
.article-content td {
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.article-content th {
  background: var(--surface-muted);
  color: var(--text);
  font-weight: 900;
}

.article-content tr:last-child td {
  border-bottom: 0;
}

.page-controls {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 30;
  display: flex;
  gap: 10px;
}

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

@media (max-width: 760px) {
  body {
    padding-top: 128px;
  }

  .site-header {
    top: 0;
    left: 0;
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
    max-width: none;
    border-radius: 0;
    transform: none;
    padding: 14px 18px;
  }

  .site-nav {
    width: 100%;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  main {
    padding: 0 18px 44px;
  }

  .hero,
  .hero.hero-simple,
  .split,
  .post-row {
    grid-template-columns: 1fr;
  }

  .hero,
  .hero.hero-simple {
    padding-top: 62px;
  }

  .hero.hero-simple::before {
    top: 24px;
  }

  .hero-panel {
    align-self: auto;
  }

  h1 {
    font-size: clamp(34px, 12vw, 52px);
  }

  .hero-text {
    font-size: 18px;
  }

  .post-date {
    margin-bottom: -12px;
  }

  .home-post-grid {
    max-width: none;
  }
}

@media (max-width: 420px) {
  .hero h1 {
  overflow-wrap: normal;
  line-height: 1.12;
  padding: 0.08em 0 0.12em;
  background: linear-gradient(135deg, var(--text), color-mix(in srgb, var(--accent) 62%, var(--text)), var(--accent-warm));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
}



/* Liquid glass layer */
:root {
  --glass-bg: color-mix(in srgb, var(--surface) 48%, transparent);
  --glass-bg-strong: color-mix(in srgb, var(--surface-elevated) 58%, transparent);
  --glass-border: color-mix(in srgb, var(--accent) 30%, var(--border));
  --glass-highlight: color-mix(in srgb, rgb(255 255 255 / 42%), rgb(255 255 255 / 16%) var(--theme-progress));
  --glass-shadow-color: color-mix(in srgb, rgb(34 38 42 / 11%), rgb(0 0 0 / 32%) var(--theme-progress));
  --glass-inset-color: color-mix(in srgb, rgb(255 255 255 / 48%), rgb(255 255 255 / 13%) var(--theme-progress));
  --glass-shadow: 0 20px 52px var(--glass-shadow-color), inset 0 1px 0 var(--glass-inset-color);
}

.site-header,
.post-card,
.hero-panel,
.topic-list a,
.button,
.chip,
.icon-button,
.lang-button,
.post-meta span {
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

.site-header,
.post-card,
.hero-panel {
  border-color: var(--glass-border);
  background: radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--glass-highlight) 55%, transparent), transparent 34%), linear-gradient(135deg, color-mix(in srgb, var(--glass-highlight) 20%, transparent), transparent 38%), var(--glass-bg);
  box-shadow: var(--glass-shadow), var(--glow);
}

.post-card,
.hero-panel,
.topic-list a,
.button,
.chip,
.icon-button,
.lang-button {
  position: relative;
  overflow: hidden;
}

.post-card::after,
.hero-panel::after,
.topic-list a::after,
.button::after,
.chip::after,
.icon-button::after,
.lang-button::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(145deg, rgb(255 255 255 / 20%), transparent 30%), radial-gradient(circle at 78% 12%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 28%);
  opacity: 0.72;
  mix-blend-mode: screen;
}

.topic-list a,
.button.secondary,
.chip,
.icon-button,
.lang-button,
.post-meta span {
  border-color: color-mix(in srgb, var(--glass-border) 86%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-highlight) 16%, transparent), transparent 38%), var(--glass-bg);
  box-shadow: 0 10px 30px rgb(0 0 0 / 10%), inset 0 1px 0 color-mix(in srgb, var(--glass-highlight) 42%, transparent);
}

.button.primary,
.chip.is-active {
  border-color: color-mix(in srgb, var(--accent) 76%, var(--glass-highlight));
  background: radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--glass-highlight) 34%, transparent), transparent 36%), linear-gradient(135deg, color-mix(in srgb, var(--accent) 88%, transparent), color-mix(in srgb, var(--accent-warm) 48%, var(--accent)));
  box-shadow: 0 16px 42px color-mix(in srgb, var(--accent) 22%, transparent), inset 0 1px 0 rgb(255 255 255 / 30%);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: linear-gradient(145deg, color-mix(in srgb, var(--glass-highlight) 16%, transparent), transparent 42%), var(--glass-bg);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--glass-highlight) 34%, transparent);
}

.post-card:hover,
.topic-list a:hover,
.button:hover,
.chip:hover,
.icon-button:hover,
.lang-button:hover {
  box-shadow: 0 18px 52px color-mix(in srgb, var(--accent) 18%, transparent), inset 0 1px 0 color-mix(in srgb, var(--glass-highlight) 48%, transparent);
}

/* Mobile glass overflow guard */
@media (max-width: 760px) {
  .site-header,
  .post-card,
  .hero-panel,
  .topic-list a,
  .button,
  .chip,
  .icon-button,
  .lang-button {
    box-shadow: 0 10px 28px rgb(0 0 0 / 18%), inset 0 1px 0 color-mix(in srgb, var(--glass-highlight) 34%, transparent);
  }
}

/* Hard horizontal overflow guard */
html,
body {
  max-width: 100%;
  overflow-x: hidden !important;
}

@media (max-width: 760px) {
  .hero h1 {
    font-size: clamp(28px, 7.8vw, 32px);
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: clamp(27px, 7.4vw, 30px);
    overflow-wrap: anywhere;
  }
}

/* iOS-like liquid glass override */
:root {
  --liquid-tint: color-mix(in srgb, rgb(255 255 255 / 38%), rgb(22 28 31 / 42%) var(--theme-progress));
  --liquid-tint-strong: color-mix(in srgb, rgb(255 255 255 / 52%), rgb(35 44 48 / 50%) var(--theme-progress));
  --liquid-edge: color-mix(in srgb, rgb(255 255 255 / 68%), rgb(255 255 255 / 24%) var(--theme-progress));
  --liquid-stroke: color-mix(in srgb, var(--accent) 29%, var(--liquid-edge));
  --liquid-shadow-color: color-mix(in srgb, rgb(35 42 48 / 14%), rgb(0 0 0 / 42%) var(--theme-progress));
  --liquid-inset-top: color-mix(in srgb, rgb(255 255 255 / 36%), rgb(255 255 255 / 13%) var(--theme-progress));
  --liquid-inset-bottom: color-mix(in srgb, rgb(255 255 255 / 14%), rgb(255 255 255 / 5%) var(--theme-progress));
  --liquid-shadow: 0 20px 56px var(--liquid-shadow-color), 0 2px 8px var(--liquid-inset-top) inset, 0 -20px 38px var(--liquid-inset-bottom) inset;
  --liquid-caustic: color-mix(in srgb, var(--accent) 19%, transparent);
}

.site-header,
.post-card,
.hero-panel,
.topic-list a,
.button,
.chip,
.icon-button,
.lang-button,
.post-meta span {
  border-color: var(--liquid-stroke);
  background:
    radial-gradient(circle at 22% 4%, var(--liquid-edge), transparent 28%),
    radial-gradient(circle at 82% 14%, var(--liquid-caustic), transparent 34%),
    linear-gradient(145deg, var(--liquid-tint-strong), rgb(255 255 255 / 8%) 42%, var(--liquid-tint));
  box-shadow: var(--liquid-shadow);
  backdrop-filter: blur(30px) saturate(1.9) contrast(1.06);
  -webkit-backdrop-filter: blur(30px) saturate(1.9) contrast(1.06);
}

.site-header {
  border-radius: 20px;
  padding: 12px 14px;
}

.post-card,
.hero-panel {
  border-radius: 24px;
}

.button,
.icon-button,
.lang-button,
.topic-list a {
  border-radius: 18px;
}

.chip,
.post-meta span {
  border-radius: 999px;
}

.post-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 32%), transparent 26%),
    radial-gradient(circle at 14% 8%, rgb(255 255 255 / 24%), transparent 18%),
    radial-gradient(circle at 96% 100%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 28%);
  opacity: 0.9;
  pointer-events: none;
}

.post-card::after,
.hero-panel::after,
.topic-list a::after,
.button::after,
.chip::after,
.icon-button::after,
.lang-button::after {
  inset: 0;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: inherit;
  background:
    linear-gradient(120deg, transparent 0%, rgb(255 255 255 / 30%) 18%, transparent 34%),
    radial-gradient(circle at 30% 0%, rgb(255 255 255 / 28%), transparent 22%),
    radial-gradient(circle at 80% 92%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 26%);
  opacity: 0.66;
  mix-blend-mode: screen;
}

.button.primary,
.chip.is-active {
  background:
    radial-gradient(circle at 22% 0%, rgb(255 255 255 / 48%), transparent 30%),
    radial-gradient(circle at 84% 88%, color-mix(in srgb, var(--accent-warm) 34%, transparent), transparent 28%),
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 82%, rgb(255 255 255 / 26%)), color-mix(in srgb, var(--accent) 46%, transparent));
  box-shadow: 0 18px 44px color-mix(in srgb, var(--accent) 28%, transparent), 0 2px 10px rgb(255 255 255 / 24%) inset, 0 -18px 28px rgb(0 0 0 / 10%) inset;
}

.button.secondary:hover,
.topic-list a:hover,
.icon-button:hover,
.lang-button:hover,
.chip:hover,
.post-card:hover {
  transform: translateY(-2px) scale(1.01);
  border-color: color-mix(in srgb, var(--accent) 48%, var(--liquid-edge));
  box-shadow: 0 24px 70px color-mix(in srgb, var(--accent) 20%, transparent), 0 2px 12px rgb(255 255 255 / 18%) inset, 0 -20px 36px rgb(255 255 255 / 6%) inset;
}

.topic-list a {
  min-height: 70px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 22px;
}

.home-post-grid .post-card {
  background:
    radial-gradient(circle at 14% 0%, var(--liquid-edge), transparent 30%),
    radial-gradient(circle at 80% 100%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 32%),
    linear-gradient(135deg, var(--liquid-tint-strong), var(--liquid-tint));
}

@media (max-width: 760px) {
  .site-header {
    border-radius: 0 0 20px 20px;
  }

  .post-card,
  .hero-panel {
    border-radius: 20px;
  }

  .topic-list a {
    min-height: 54px;
  }
}
