/* Local atlas typography and the twilight editorial refinement. */
:root {
  --serif: 'MoYu Literary Latin', 'MoYu Literary Han', 'Songti SC', serif;
  --sans: 'MoYu Interface Latin', 'OPPO Sans 4.0', 'PingFang SC', sans-serif;
  --muted: #56657b;
  --line: #53688426;
  --focus: #536f99;
  --radius: 14px;
}
body { font: 16px/1.8 var(--sans); min-height: 100dvh; }
img { height: auto; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: #c8d8ed; color: #20324c; }
html { scrollbar-color: #8295af #e8edf4; scrollbar-width: thin; }
input, textarea { caret-color: var(--accent); }
a, button { -webkit-tap-highlight-color: #a6bad535; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 5px;
}
button, .button, .stat, .social-row a {
  transition: background-color 220ms, color 220ms, transform 220ms cubic-bezier(.16,1,.3,1);
}
button:active, .button:active { transform: translateY(1px); }
.icon-button, .play, .round-arrow { width: 44px; height: 44px; }
.site-header, body[data-page=index] .site-header {
  max-width: 1280px; height: 96px; padding-inline: 40px;
}
.brand { font-size: 17px; font-weight: 600; letter-spacing: .09em; }
.brand b { font-family: var(--serif); font-size: 15px; letter-spacing: .12em; }
.nav { gap: clamp(16px, 2.2vw, 30px); }
.nav a { font-size: 15px; font-weight: 500; }
.nav a:after { bottom: 9px; height: 2px; }
.login-link { padding: 7px 20px; font-size: 14px; }
.button { font-size: 15px; min-height: 48px; font-weight: 500; }
.button:hover { transform: translateY(-2px); }
.filter { min-height: 44px; font-size: 14px; padding: 7px 16px; }
.pill { font-size: 13px; padding: 3px 8px; }
.search-field input { font-size: 15px; min-height: 44px; }
.search-field svg { top: 15px; }
.search-dialog .search-field { display: block; max-width: none; }
.search-dialog .search-field input { padding-left: 14px; }
.eyebrow { font-size: 13px; letter-spacing: .15em; }
.site-main { padding: 44px 44px 48px; background: var(--panel); }
.page-heading { align-items: flex-end; margin-bottom: 34px; }
.page-heading h1 { font-size: clamp(30px, 3.2vw, 42px); letter-spacing: .04em; font-weight: 500; }
.page-heading h1 small { font: 13px/1.6 var(--sans); letter-spacing: .05em; }
.page-heading > p { font-size: 17px; line-height: 1.8; }
.home-main { padding-top: 24px; }
.home-hero { grid-template-columns: minmax(0,1fr) 320px; gap: 72px; min-height: 460px; }
.hero-copy h1 {
  font-size: clamp(36px, 4.5vw, 64px); font-weight: 500;
  line-height: 1.45; letter-spacing: .035em; text-shadow: none;
}
.hero-copy .eyebrow { font-size: 13px; letter-spacing: .19em; margin-top: 20px; line-height: 1.8; }
.hero-copy > p { font-size: 16px; line-height: 1.95; margin-top: 26px; max-width: 36em; }
.hero-actions { margin-top: 28px; }
.hero-material-label { font-size: 13px; letter-spacing: .02em; opacity: 1; color: #edf1f8; margin-top: 20px; }
.glass { background: #273d59a3; border-color: #dce7f247; box-shadow: none; backdrop-filter: blur(20px); }
.profile-card { padding: 30px 25px 24px; }
.identity h2 { font-size: 32px; letter-spacing: .08em; }
.identity p { font-size: 13px; letter-spacing: .02em; line-height: 1.75; }
.profile-card > p { font-size: 19px; margin: 26px 0 22px; }
.social-row a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.social-row a:hover { background: #e9f0fc18; color: white; }
.home-stats { gap: 16px; margin-top: 24px; }
.stat { padding: 22px 20px; gap: 18px; }
.stat:hover { background: #38526ede; transform: translateY(-3px); }
.stat strong { font-family: var(--serif); font-size: 23px; font-weight: 500; }
.stat small { font-size: 13px; letter-spacing: 0; color: #edf1f8; }
.home-bottom { grid-template-columns: .95fr 1.15fr 1.05fr; gap: 16px; margin-top: 20px; }
.home-panel { padding: 24px; background: #f4f6fa; border-radius: var(--radius); box-shadow: none; }
.panel-title { font-family: var(--serif); font-size: 21px; margin-bottom: 20px; }
.panel-title a { font: 13px/1.8 var(--sans); color: var(--muted); }
.mini-row { gap: 14px; margin-top: 16px; min-height: 52px; }
.mini-row img { width: 66px; height: 48px; border-radius: 6px; }
.mini-row > div { flex: 1; min-width: 0; }
.mini-row h3 { font-size: 14px; line-height: 1.65; font-weight: 500; }
.mini-row p, .album p, .player-note { font-size: 13px; color: var(--muted); }
.mini-row:hover h3 { text-decoration: underline; text-underline-offset: .25em; }
.album { gap: 16px; }
.album h3 { font-family: var(--serif); font-size: 18px; }
.album-cover { width: 64px; height: 76px; }
.player-controls { margin-top: 26px; }
.player-note { margin-top: 18px; line-height: 1.7; }
.site-footer { font-size: 13px; letter-spacing: .02em; padding-block: 30px 36px; }
.home-foot { color: #edf1f8 !important; }
.card-text { padding: 22px; }
.card-text h2 { font-family: var(--serif); font-size: 21px; line-height: 1.6; }
.card-text p, .card-meta { font-size: 13px; letter-spacing: 0; }
.article-card { border: 0; box-shadow: none; }
.article-card:hover { box-shadow: none; transform: translateY(-3px); }
.banner-copy p { font-size: 32px; letter-spacing: .035em; line-height: 1.6; }
.banner-copy small { font-size: 13px; letter-spacing: .13em; color: var(--muted); }
.section-footer, .project-disclaimer, .notice { font-size: 14px; letter-spacing: .02em; }
.project-grid { gap: 24px; }
.project-card { padding: 20px; gap: 24px; border: 0; }
.project-card.featured { padding: 24px; }
.project-copy h2 { font-family: var(--serif); font-size: 26px; }
.project-copy p { font-size: 15px; }
.project-copy .status { font-size: 13px; color: #375651; background: #dce7e5; }
.gallery { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 24px 16px; }
.photo-button { background: transparent; border-radius: 0; text-align: left; }
.photo-button img { border-radius: 6px; aspect-ratio: 1.35; }
.photo-caption { display: block; position: static; background: none; padding: 12px 0 0; color: var(--ink); font-size: 15px; }
.photo-caption small { font-size: 13px; color: var(--muted); }
.photo-button:hover img { transform: none; filter: brightness(1.06); }
.photo-button img { transition: filter 300ms; }
.about-paragraphs p, .prose p { font-size: 16px; line-height: 2; }
.prose { max-width: 65ch; margin-inline: auto; }
.detail h1 { font-size: clamp(30px,3vw,42px); letter-spacing: .025em; }
.detail-meta, .breadcrumbs, .about-identity p { font-size: 13px; }
.prose h2 { font-size: 28px; margin-top: 36px; }
.quote-box { font-size: 20px; padding: 18px; }
.interest h3, .timeline h3 { font-size: 17px; }
.interest p, .timeline p, .timeline small { font-size: 14px; }
.music-info p, .music-track h3, .friend-card h2, .subsection p { font-size: 16px; }
.music-track p, .music-track > span, .friend-card p, .link-info span { font-size: 14px; }
.music-track > span { font-variant-numeric: tabular-nums; }
.form-panel label, .form-panel small, .admin-sidebar button, .admin-fields label, .admin-stats span { font-size: 14px; }
.toast { font-size: 14px; }
html[data-theme=dark] { --muted: #b2bfd1; --focus: #bfd3ed; }
html[data-theme=dark] .home-panel { background: #202d40; }
html[data-theme=dark] .mini-row p, html[data-theme=dark] .album p { color: var(--muted); }
html[data-theme=dark] .filter.active { background: #a9bdd8; color: #142236; }
html[data-theme=dark] .project-copy .status { background: #344a49; color: #d6e9e4; }
html[data-theme=dark] ::selection { background: #4e6688; color: #fff; }
@keyframes hero-settle {
  from { transform: translateY(8px); }
  to { transform: translateY(0); }
}
@media(prefers-reduced-motion:no-preference) {
  .hero-copy { animation: hero-settle 900ms cubic-bezier(.16,1,.3,1) both; }
}
@media(max-width:1100px) {
  .site-header, body[data-page=index] .site-header { padding-inline: 30px; gap: 20px; }
  .home-hero { grid-template-columns: minmax(0,1fr) 290px; gap: 40px; }
  .stat { padding: 20px 16px; gap: 12px; }
  .home-panel { padding: 20px; }
  .gallery { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media(max-width:900px) {
  .brand { font-size: 15px; gap: 8px; }
  .brand b { font-size: 13px; }
  .nav { gap: 14px; }
  .nav a { font-size: 14px; }
  .login-link { display: none; }
  .home-hero { gap: 26px; grid-template-columns: minmax(0,1fr) 260px; }
  .hero-copy h1 { font-size: clamp(30px,4.5vw,40px); }
  .profile-card { padding: 24px 18px; }
  .identity { gap: 12px; }
  .identity p { font-size: 13px; }
  .profile-card > p { font-size: 17px; }
  .home-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-bottom { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-bottom .project-panel { grid-column: 1/-1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
  .project-panel .panel-title { grid-column: 1/-1; margin-bottom: 0; }
}
@media(max-width:700px) {
  .site-header, body[data-page=index] .site-header { height: 76px; padding-inline: 20px; gap: 10px; }
  .menu-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; inset: 70px 14px auto; z-index: 10; padding: 14px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
  .nav.open { display: grid; }
  .nav a { text-align: center; padding: 10px 4px; font-size: 15px; }
  .nav a:after { bottom: 2px; }
  .header-actions { margin-left: auto; gap: 0; }
  .home-main { padding: 26px 20px 0; }
  .home-hero { display: flex; flex-direction: column; align-items: stretch; gap: 32px; min-height: 0; }
  .hero-copy h1 { font-size: clamp(27px,8.6vw,44px); letter-spacing: .015em; line-height: 1.5; }
  .hero-copy > p { font-size: 16px; margin-top: 22px; }
  .hero-copy .eyebrow { font-size: 13px; letter-spacing: .12em; margin-top: 16px; }
  .hero-actions { gap: 12px; margin-top: 24px; }
  .hero-actions .button { padding-inline: 23px; }
  .hero-material-label { font-size: 13px; margin-top: 18px; }
  .profile-card { padding: 24px; display: grid; grid-template-columns: 1fr; gap: 20px; }
  .identity .avatar { width: 70px; height: 70px; }
  .identity h2 { font-size: 30px; }
  .identity p { font-size: 13px; }
  .profile-card > p { margin: 0; text-align: left; font-size: 18px; }
  .social-row { justify-content: flex-start; gap: 12px; }
  .home-stats { gap: 12px; margin-top: 22px; }
  .stat { padding: 18px 14px; gap: 12px; align-items: flex-start; }
  .stat .icon { width: 22px; margin-top: 5px; }
  .stat strong { font-size: 21px; }
  .stat small { font-size: 13px; line-height: 1.7; margin-top: 3px; }
  .home-bottom { grid-template-columns: 1fr; gap: 16px; }
  .home-bottom .project-panel { display: block; grid-column: auto; }
  .home-panel { padding: 24px; }
  .mini-row h3 { font-size: 15px; }
  .site-main { margin: 8px 12px 0; padding: 28px 20px 34px; }
  .page-heading { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 28px; }
  .page-heading > p { font-size: 16px; text-align: left; }
  .page-heading h1 small { margin-left: 10px; }
  .cards { grid-template-columns: 1fr; gap: 24px; }
  .card-text { padding: 20px; }
  .card-text h2 { font-size: 22px; }
  .article-card img { aspect-ratio: 1.65; }
  .article-banner { height: 220px; }
  .banner-copy { padding: 28px 20px; }
  .banner-copy p { font-size: 28px; }
  .banner-copy small { font-size: 13px; letter-spacing: .06em; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-field { max-width: none; }
  .filters { gap: 8px; }
  .filter { font-size: 14px; padding: 7px 12px; }
  .project-card, .project-card.featured { flex-direction: column; padding: 20px; gap: 20px; }
  .project-card img, .project-card.featured img { width: 100%; height: 180px; }
  .project-copy h2 { font-size: 25px; }
  .project-copy p { font-size: 15px; }
  .project-copy .status { font-size: 13px; }
  .gallery { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px 12px; }
  .photo-caption { font-size: 14px; padding: 10px 0 0; }
  .photo-caption small { font-size: 13px; }
  .detail h1 { font-size: 30px; }
  .prose p { font-size: 16px; }
  .prose h2 { font-size: 26px; }
  .about-grid { gap: 32px; }
  .about-identity p { font-size: 13px; }
  .music-info p, .music-track h3 { font-size: 15px; }
  .section-footer { font-size: 13px; }
  .site-footer { flex-direction: column; align-items: center; text-align: center; padding-inline: 20px; font-size: 13px; }
  .home-foot { padding-top: 28px !important; }
}
@media(prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media(max-width:360px) {
  .site-header, body[data-page=index] .site-header { padding-inline: 16px; gap: 6px; }
  .brand { font-size: 14px; gap: 6px; letter-spacing: .04em; }
  .brand b { font-size: 12px; letter-spacing: .04em; }
  .plane { width: 24px; }
  .header-actions { gap: 0; }
  .stat { flex-direction: column; gap: 8px; }
  .stat small { margin-top: 5px; }
}
