:root {
  --hw-ink: #17313b;
  --hw-muted: #657278;
  --hw-paper: #f7f3ea;
  --hw-card: #fffdf8;
  --hw-accent: #df7458;
  --hw-teal: #2b6670;
  --hw-line: rgba(23, 49, 59, 0.12);
}

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(circle at 10% 10%, rgba(223, 116, 88, 0.08), transparent 28rem),
    var(--hw-paper);
  color: var(--hw-ink);
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

::selection { background: rgba(223, 116, 88, 0.28); }

#navbar { transition: background-color .25s ease, box-shadow .25s ease; }
#navbar.top-nav-collapse {
  background: rgba(18, 45, 56, 0.92) !important;
  box-shadow: 0 8px 28px rgba(10, 30, 38, 0.14);
  backdrop-filter: blur(14px);
}

.navbar-brand { font-family: Georgia, "Noto Serif SC", serif; letter-spacing: .06em; }
.navbar .nav-link { letter-spacing: .03em; }

.banner { background-color: #173d4b; }
.banner .mask { background: linear-gradient(110deg, rgba(8, 28, 38, .3), rgba(8, 28, 38, .04)) !important; }
.banner-text h1 {
  font-family: Georgia, "Noto Serif SC", serif;
  font-weight: 700;
  letter-spacing: .06em;
  text-shadow: 0 3px 24px rgba(7, 25, 33, .25);
}
#subtitle { letter-spacing: .08em; }

.container-fluid > .row > .container,
.post-content,
.about-content {
  border: 1px solid var(--hw-line);
  box-shadow: 0 20px 60px rgba(22, 49, 59, .07);
}

.index-card {
  overflow: hidden;
  border: 1px solid var(--hw-line);
  border-radius: 18px;
  background: var(--hw-card);
  box-shadow: 0 16px 44px rgba(22, 49, 59, .07);
  transition: transform .25s ease, box-shadow .25s ease;
}
.index-card:hover { transform: translateY(-4px); box-shadow: 0 22px 54px rgba(22, 49, 59, .12); }
.index-card .index-img img { transition: transform .5s ease; }
.index-card:hover .index-img img { transform: scale(1.035); }
.index-header { font-family: Georgia, "Noto Serif SC", serif; }

.markdown-body { color: var(--hw-ink); line-height: 1.9; }
.markdown-body h2, .markdown-body h3 { color: var(--hw-ink); }
.markdown-body h2 { margin-top: 2.2em; }
.markdown-body a { color: var(--hw-teal); text-decoration-color: rgba(43, 102, 112, .35); text-underline-offset: 3px; }
.markdown-body blockquote { border-left-color: var(--hw-accent); background: rgba(223, 116, 88, .06); }
.markdown-body code:not(.hljs) { color: #b64f39; background: rgba(223, 116, 88, .09); }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.photo-card { margin: 0; overflow: hidden; border-radius: 18px; background: var(--hw-card); border: 1px solid var(--hw-line); box-shadow: 0 14px 36px rgba(23, 49, 59, .09); }
.photo-card img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transform: scale(1.01); transition: transform .4s ease; }
.photo-card:hover img { transform: scale(1.05); }
.photo-card figcaption { display: flex; flex-direction: column; gap: .25rem; padding: 1rem 1.15rem 1.2rem; }
.photo-card figcaption strong { font-family: Georgia, "Noto Serif SC", serif; font-size: 1.08rem; }
.photo-card figcaption span, .gallery-note { color: var(--hw-muted); font-size: .92rem; }
.gallery-intro { max-width: 42rem; font-size: 1.05rem; line-height: 1.9; }

footer { background: #122d38; color: rgba(255,255,255,.72); }
.footer-content a { color: #f1c49a; }

[data-user-color-scheme="dark"] body { background: #111a20; }
[data-user-color-scheme="dark"] .index-card,
[data-user-color-scheme="dark"] .photo-card { background: #202b32; border-color: rgba(255,255,255,.08); }
[data-user-color-scheme="dark"] .markdown-body { color: #d5d9da; }
[data-user-color-scheme="dark"] .markdown-body h2,
[data-user-color-scheme="dark"] .markdown-body h3 { color: #eef0ef; }

@media (max-width: 767px) {
  .banner-text h1 { font-size: 2rem; letter-spacing: .03em; }
  #subtitle { font-size: 1rem; letter-spacing: .04em; }
  .index-card { border-radius: 14px; }
  .photo-grid { grid-template-columns: 1fr; }
}

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