/*
Theme Name: 虎魄小站
Description: 虎魄的个人博客与分享站。
Version: 1.1.1
*/

@font-face {
  font-family: Geist;
  src: url('assets/geist.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f8f4ec;
  --card: #fffcf6;
  --ink: #2b2019;
  --muted: #6c5648;
  --rust: #913b25;
  --line: #e4d7c7;
  --serif: "Noto Serif SC", "Songti SC", SimSun, serif;
  --sans: Geist, system-ui, "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { position: relative; margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--sans); }
a { color: var(--rust); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .15em; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 4px; }
img { max-width: 100%; height: auto; }
.wrap { width: min(68rem, calc(100% - 3rem)); margin-inline: auto; }
.skip { position: absolute; transform: translateY(-150%); padding: .5rem 1rem; background: var(--card); }
.skip:focus { transform: none; z-index: 5; }
.site-head, .site-foot { border-block-end: 1px solid var(--line); }
.bar { min-height: 4.6rem; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; white-space: nowrap; font-weight: 700; }
.brand-icon { border: 1px solid var(--rust); color: var(--rust); border-radius: .35rem; padding: .1rem .4rem; font-family: var(--serif); }
.nav { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.nav a { color: var(--muted); text-decoration: none; font-size: .94rem; }
.nav a:hover, .nav [aria-current="page"] { color: var(--rust); text-decoration: underline; }
.mobile-nav { display: none; }
.site-head--ocean { position: absolute; inset: 0 0 auto; z-index: 3; border-color: #ffffff28; color: #f5f6ef; }
.site-head--ocean .bar { min-height: 5.3rem; }
.site-head--ocean .brand, .site-head--ocean .nav a { color: inherit; }
.site-head--ocean .brand-icon { color: #f1d59c; border-color: #e2bf7da6; }
.site-head--ocean .nav a:hover, .site-head--ocean .nav [aria-current="page"] { color: #f1d59c; }
.site-head--ocean :focus-visible, .hero :focus-visible { outline-color: #f1d59c; }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  padding-block: clamp(10rem, 21vh, 14rem) clamp(7rem, 16vh, 10rem);
  color: #f6f7f0;
  background: #071723 url('assets/ocean-poster.jpg') 67% 48% / cover no-repeat;
}
.hero-video, .hero::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-video { z-index: -2; object-fit: cover; object-position: 67% 48%; }
.hero::after {
  z-index: -1;
  content: '';
  background: linear-gradient(90deg, #06111bea 0%, #06151fc2 30%, #06151f35 75%),
              linear-gradient(0deg, #06111bf5 0%, transparent 42%, #06111b9e 100%);
}
.hero-content > * { animation: hero-rise .65s cubic-bezier(.22,.61,.36,1) both; }
.hero-kicker { display: flex; align-items: center; gap: .65rem; margin: 0 0 1.25rem; color: #f1d59c; font-size: .86rem; font-weight: 600; letter-spacing: .18em; }
.hero-kicker span { width: .44rem; height: .44rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 1rem #f1d59c80; }
.hero h1 { margin: 0; font: 650 clamp(3.5rem, 10vw, 8rem)/1.12 var(--sans); letter-spacing: -.035em; animation-delay: .12s; }
.hero-description { max-width: 26rem; margin: 1.4rem 0 1.7rem; color: #e1ecec; font-size: clamp(1rem, 2.4vw, 1.22rem); animation-delay: .24s; }
.hero-link { display: inline-flex; align-items: center; gap: 1.2rem; border-radius: .35rem; background: #f1d59c; padding: .65rem 1.05rem; color: #182028; text-decoration: none; font-weight: 700; animation-delay: .36s; }
.hero-link:hover { background: #ffe6b2; }
.hero-bottom { position: absolute; inset: auto 0 1.65rem; display: flex; justify-content: space-between; align-items: center; min-height: 2.3rem; gap: 1rem; border-top: 1px solid #ffffff33; padding-top: .8rem; color: #d9e5e6; font: .72rem/1.4 var(--sans); letter-spacing: .16em; }
.hero-motion { border: 1px solid #ffffff45; border-radius: 99rem; padding: .35rem .75rem; background: #071723b0; color: inherit; letter-spacing: .04em; }
.hero-motion:hover { border-color: #f1d59c; }
#latest { scroll-margin-top: 1rem; }
@keyframes hero-rise { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: translateY(0); } }
h1, h2, h3 { line-height: 1.22; }
h1, .section-title { font-family: var(--serif); }
.listing { padding-block: 2.8rem 4rem; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.5rem; }
.section-title { font-size: clamp(1.85rem, 4vw, 2.5rem); margin: 0; }
.search-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.search-form input { width: min(12rem, 52vw); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1.1rem; align-items: start; }
.card { border: 1px solid var(--line); border-radius: .75rem; overflow: hidden; background: var(--card); }
.card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { padding: 1.3rem 1.5rem; }
.card h2 { margin: .35rem 0; font: 700 1.38rem/1.35 var(--serif); }
.card h2 a { color: var(--ink); text-decoration: none; }
.card h2 a:hover { color: var(--rust); text-decoration: underline; }
.card p { color: var(--muted); }
.meta { font-size: .83rem; color: var(--muted); }
.navigation { margin-top: 1.7rem; }
.nav-links { display: flex; gap: .75rem; flex-wrap: wrap; }
.reading { width: min(45rem, 100%); margin-inline: auto; padding-block: 3.5rem 5rem; }
.reading h1 { font-size: clamp(2.35rem, 5vw, 3.4rem); margin: .4em 0 .2em; overflow-wrap: anywhere; }
.content { margin-top: 2rem; overflow-wrap: anywhere; }
.content img { border-radius: .4rem; }
.content pre { overflow: auto; background: var(--card); border: 1px solid var(--line); padding: 1rem; }
.content blockquote { margin-inline: 0; border-inline-start: .18rem solid var(--rust); padding-inline-start: 1rem; color: var(--muted); }
.comments { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1.6rem; }
.comment-list { padding-inline-start: 1.5rem; }
.comment-body { margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.comment-meta { color: var(--muted); font-size: .83rem; }
.comment-form label { display: block; }
.comment-form-cookies-consent label { display: inline; }
.comment-form input:not([type="checkbox"]):not([type="submit"]), textarea { width: 100%; }
input, textarea, button { font: inherit; }
input:not([type="checkbox"]):not([type="submit"]), textarea { color: var(--ink); border: 1px solid #b8a18e; border-radius: .35rem; padding: .45rem .6rem; background: var(--card); }
button, input[type="submit"] { border: 1px solid var(--rust); border-radius: .35rem; background: var(--rust); color: white; padding: .45rem .8rem; cursor: pointer; }
.site-foot { border-block-start: 1px solid var(--line); border-block-end: 0; padding-block: 1.3rem; color: var(--muted); font-size: .88rem; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 38rem) {
  .wrap { width: calc(100% - 2rem); }
  .section-head { align-items: start; flex-direction: column; }
  .reading { padding-block: 2rem 3.5rem; }
}

@media (max-width: 45rem) {
  .site-head { position: relative; z-index: 3; }
  .site-head--ocean { position: absolute; }
  .site-head--ocean .bar { min-height: 4.6rem; }
  .nav--desktop { display: none; }
  .mobile-nav { display: block; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; gap: .6rem; min-height: 2.75rem; border: 1px solid currentColor; border-radius: .35rem; padding: 0 .75rem; color: inherit; cursor: pointer; list-style: none; white-space: nowrap; }
  .nav-toggle::-webkit-details-marker { display: none; }
  .nav-icon { display: grid; place-items: center; }
  .nav-icon span { grid-area: 1 / 1; width: 1.1rem; height: 1px; background: currentColor; transition: transform .25s ease; }
  .nav-icon span:first-child { transform: translateY(-.2rem); }
  .nav-icon span:last-child { transform: translateY(.2rem); }
  .mobile-nav[open] .nav-icon span:first-child { transform: rotate(45deg); }
  .mobile-nav[open] .nav-icon span:last-child { transform: rotate(-45deg); }
  .mobile-nav .nav--mobile { position: absolute; top: 100%; left: 0; right: 0; display: grid; gap: 0; max-height: 70vh; overflow-y: auto; padding: .2rem 1rem; background: var(--card); box-shadow: 0 .7rem 1.5rem #06111b44; }
  .mobile-nav:not([open]) .nav--mobile { display: none; }
  .site-head--ocean .nav--mobile { background: #071723; }
  .nav--mobile a { padding: .8rem .5rem; border-bottom: 1px solid #9c999844; font-size: 1rem; }
  .nav--mobile a:last-child { border-bottom: 0; }
  .hero::after { background: linear-gradient(90deg, #06111be0, #06151f6e), linear-gradient(0deg, #06111bf5, transparent 55%, #06111b80); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-content > * { animation: none; }
  .nav-icon span { transition: none; }
}
