:root{
  --bg:#fdfcfa; --fg:#1c1b19; --muted:#6b675e; --fg-soft:#4f4b43; --rule:#e7e4de; --accent:#1a67c2;
  --sel-bg:#eeece7; --mark-fg:#124f97;
  --sans:system-ui,-apple-system,"Segoe UI","Noto Sans TC","PingFang TC","Microsoft JhengHei",sans-serif;
  --serif:"Noto Serif TC","Source Han Serif TC",Georgia,"Songti TC","PMingLiU",serif;
  --measure:720px;

  --nav-fs:.86rem;
}

*{box-sizing:border-box}
html{
  font-size:106.25%;
  -webkit-text-size-adjust:100%; color-scheme:light;
  scrollbar-gutter:stable;
}
@supports not (scrollbar-gutter:stable){ html{overflow-y:scroll} }
body{
  margin:0; background:var(--bg); color:var(--fg);
  font-family:var(--serif); font-size:1rem; font-weight:500; line-height:1.95;
  letter-spacing:.01em; font-feature-settings:"palt" 1;
}
.wrap{max-width:var(--measure); margin:0 auto; padding:0 1.25rem}
a{
  color:inherit; text-decoration:none;
  -webkit-tap-highlight-color:transparent;
}

.post-link:active h2{color:var(--accent)}
.post-link:active .thumb, .post-link:active:hover .thumb{opacity:.85}
.site-head nav a:active, .site-foot a:active, .prose a:active{opacity:.6}
.prose a{color:var(--accent); text-decoration:underline; text-underline-offset:.2em; text-decoration-thickness:.5px}
.skip{position:absolute; left:-9999px}

.site-head nav, .post-list time, .tag, .post-head .meta, .prose figcaption,
.post-nav span, .archive time, .site-foot, .intro p, .prose th{
  font-family:var(--sans);
}
.skip:focus{left:1rem; top:1rem; background:var(--bg); padding:.5rem; z-index:9}

.site-head{
  position:sticky; top:0; z-index:50;
  padding:.72rem 0;

  background:rgba(253,252,250,.88);
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);

  border-bottom:1px solid transparent;
  transition:border-color .22s ease;
}
.scrolled .site-head{border-bottom-color:var(--rule)}

@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  .site-head{background:var(--bg)}
}

.site-head .wrap{display:flex; flex-wrap:nowrap; align-items:center; gap:.75rem 1.25rem}
.brand{flex:0 0 auto; white-space:nowrap}
.site-head nav{
  flex-wrap:nowrap; min-width:0;
  overflow-x:auto; scrollbar-width:none; -ms-overflow-style:none;
  padding-right:1.2rem; margin-right:-1.2rem;
  -webkit-mask-image:linear-gradient(to right, #000 calc(100% - 1.2rem), transparent);
  mask-image:linear-gradient(to right, #000 calc(100% - 1.2rem), transparent);
}
.site-head nav::-webkit-scrollbar{display:none}
.site-head nav a{white-space:nowrap}
.site-head nav .nav-short{display:none}

.brand{padding-block:.25rem; margin-block:-.25rem}
.brand{font-family:var(--serif); font-size:1.34rem; line-height:1.3; font-weight:600; letter-spacing:.04em; margin-right:auto; font-feature-settings:"palt" 0}
.site-head nav{display:flex; gap:1rem; font-size:var(--nav-fs); color:var(--muted)}
.site-head nav a:hover{color:var(--accent)}

.search-open{
  display:inline-flex; align-items:center; justify-content:center;
  flex:0 0 auto;
  width:1.9rem; height:1.9rem; padding:0; margin-left:-.35rem;
  background:none; border:0; cursor:pointer; color:var(--muted);
  align-self:center;
}
.search-open svg{width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round}
.search-open:hover{color:var(--accent)}

.search-panel{
  position:fixed; inset:0; z-index:200; background:rgba(28,27,25,.32);
  display:flex; justify-content:center; padding:8vh 1.25rem 2rem;
  backdrop-filter:blur(2px); -webkit-backdrop-filter:blur(2px);
}

.search-panel[hidden]{display:none !important}
.search-box{
  width:100%; max-width:560px; max-height:80vh; display:flex; flex-direction:column;
  background:var(--bg); border:1px solid var(--rule); border-radius:6px;
  box-shadow:0 18px 50px rgba(28,27,25,.18); overflow:hidden;
}
.search-field{display:flex; align-items:center; border-bottom:1px solid var(--rule)}
.search-field input{
  flex:1; font:inherit; font-family:var(--serif); font-size:1.05rem;
  padding:.95rem 1.1rem; border:0; background:none; color:var(--fg); outline:none;
}
.search-field input::-webkit-search-cancel-button{display:none}
.search-close{
  background:none; border:0; cursor:pointer; color:var(--muted);
  font-size:.9rem; padding:.6rem 1rem; line-height:1;
}
.search-close:hover{color:var(--accent)}
.search-hint{
  margin:0; padding:.55rem 1.1rem; font-family:var(--sans); font-size:.72rem;
  letter-spacing:.05em; color:var(--muted); border-bottom:1px solid var(--rule);
}
.search-results{list-style:none; margin:0; padding:0; overflow-y:auto}
.search-results li{border-bottom:1px solid var(--rule)}
.search-results li:last-child{border-bottom:0}
.search-results a{display:block; padding:.85rem 1.1rem}
.search-results a.is-active{background:var(--sel-bg)}

@media (hover:hover){
  .search-results a:hover{background:var(--sel-bg)}
}
.r-meta{display:block; font-family:var(--sans); font-size:.72rem; letter-spacing:.08em; color:var(--muted)}
.r-title{display:block; font-family:var(--serif); font-size:1rem; font-weight:600; margin:.15rem 0 .25rem}
.r-snip{display:block; font-size:.86rem; line-height:1.75; color:var(--muted)}
.search-results mark{background:rgba(26,103,194,.14); color:var(--mark-fg); padding:0 .1em; border-radius:2px}

@media (max-width:480px){
  .search-panel{padding:0}
  .search-box{max-width:none; max-height:100vh; height:100%; border:0; border-radius:0}
}

.intro{padding:.5rem 0 .75rem}
.intro h1 .tl-seg, .intro h1 .tl-sep{white-space:nowrap}
.intro h1{

  font-family:var(--serif); font-weight:500; color:var(--fg-soft);
  font-size:.86rem;

  line-height:1.3; margin:0; letter-spacing:.02em; text-align:right;
}

.page-head{padding:1.5rem 0 1.6rem}
.page-head h1{font-family:var(--serif); font-size:1.5rem; font-weight:600; line-height:1.5; margin:0 0 .35rem; letter-spacing:.04em}
.page-head p{margin:0; font-family:var(--sans); color:var(--muted); font-size:.78rem; letter-spacing:.05em}

.more-posts{margin:2rem 0 0; font-family:var(--sans); font-size:.86rem; text-align:center}
.more-posts a{color:var(--accent)}

.post-list{list-style:none; margin:0; padding:0}
.post-list li{padding:2.25rem 0; border-bottom:1px solid var(--rule); position:relative}
.post-list li:last-child{border-bottom:0}
.post-list time{display:block; font-size:.78rem; letter-spacing:.08em; color:var(--muted)}
.post-list h2{font-family:var(--serif); font-size:1.3rem; line-height:1.6; font-weight:600; margin:.4rem 0 .5rem}
.post-list p{
  margin:0; color:var(--fg-soft); font-size:1rem; line-height:1.9;
  max-height:calc(3 * 1.9 * 1.02rem);
  overflow:hidden;

  -webkit-mask-image:linear-gradient(to bottom, #000 calc(100% - 1.6em), transparent);
  mask-image:linear-gradient(to bottom, #000 calc(100% - 1.6em), transparent);
}
.post-link:hover h2{color:var(--accent)}
.post-list .thumb{display:block; width:100%; height:auto; margin:1rem 0 1.1rem; background:var(--rule)}
@media (min-width:620px){
  .post-list .thumb{width:86%; margin-left:auto; margin-right:auto; aspect-ratio:16/9; object-fit:cover}
}

@media (hover:hover){
  .post-link:hover .thumb{opacity:.92}
}
.tag{display:inline-block; margin-top:.75rem; font-size:.72rem; letter-spacing:.1em; color:var(--muted); border:1px solid var(--rule); border-radius:999px; padding:.1rem .6rem}

.post-head{padding:2rem 0}
.post-head .meta{margin:0 0 .75rem; font-size:.78rem; letter-spacing:.08em; color:var(--muted)}
.post-head .meta a:hover{color:var(--accent)}
.post-head h1{font-family:var(--serif); font-size:1.85rem; line-height:1.55; font-weight:600; margin:0}
.prose{padding-bottom:3rem; overflow-wrap:break-word}
.prose a{overflow-wrap:anywhere}
.prose h2{font-family:var(--serif); font-size:1.3rem; font-weight:600; line-height:1.6; margin:3rem 0 1rem; padding-top:.5rem; border-top:1px solid var(--rule)}
.prose h3{font-size:1.05rem; font-weight:600; margin:2.25rem 0 .75rem}
.prose p{margin:1.35em 0}

@media (min-width:620px){
  .prose > p, .prose > ul > li, .prose > ol > li{text-align:justify}
}

.prose.dropcap > p:first-of-type::first-letter{
  float:left; font-size:2.4em; line-height:1.625;
  margin:0 .14em 0 0; font-weight:500; color:var(--fg);
}
.prose.dropcap > p:first-of-type{margin-top:0}
.prose img{max-width:100%; height:auto; display:block; margin:2.25rem auto}
.prose figure{margin:2.5rem 0}
@media (min-width:620px){
  .prose figure{width:86%; margin-left:auto; margin-right:auto}
}
.prose figure img{margin:0 auto; border-radius:3px}

.prose figcaption{
  border-top:1px solid var(--rule); border-bottom:1px solid var(--rule);
  margin-top:.55rem; padding:.85rem .25rem;
  font-size:.86rem; line-height:1.75; color:var(--muted); text-align:center;
}
.prose blockquote{margin:2rem 0; padding:.25rem 0 .25rem 1.25rem; border-left:2px solid var(--rule); color:var(--muted)}
.prose ul,.prose ol{padding-left:1.35rem}
.prose li{margin:.5em 0}
.prose hr{border:0; border-top:1px solid var(--rule); margin:3rem 0}

.prose .md-table{overflow-x:auto; margin:2rem 0}
.prose .md-table table{margin:0}
.prose table{width:100%; border-collapse:collapse; font-size:.9rem; margin:2rem 0}
.prose th,.prose td{border-bottom:1px solid var(--rule); padding:.6rem .5rem; text-align:left}
.prose code{font-size:.88em; background:var(--rule); padding:.1em .35em; border-radius:3px}
.prose pre{overflow-x:auto; padding:1rem; background:var(--rule); border-radius:4px}
.prose pre code{background:none; padding:0}

.prose .person-name{
  text-align:center; font-family:var(--serif); font-weight:600;
  margin:0 0 2.5rem; line-height:1.35; border:0; padding:0;
}
.prose .person-name .zh{display:block; font-size:1.85rem; letter-spacing:.06em}
.prose .person-name .en{display:block; font-size:1.05rem; letter-spacing:.12em; color:var(--muted); margin-top:.15rem}

.prose figure.avatar{width:auto; margin:1rem 0 1.2rem}
.prose figure.avatar img{
  width:min(280px, 60vw); aspect-ratio:1/1; height:auto;
  object-fit:cover; border-radius:50%; margin:0 auto;
}

.post-head .meta a, .site-foot a{ padding-block:.3rem }

.post-nav{display:flex; gap:1.5rem; flex-wrap:wrap; border-top:1px solid var(--rule); padding:2rem 0 3rem; font-size:.9rem}
.post-nav a{flex:1 1 12rem; line-height:1.6}

@media (min-width:620px){
  .post-nav{flex-wrap:nowrap}
  .post-nav a{flex:0 1 46%}
  .post-nav .next{margin-left:auto; text-align:right}
}
.post-nav span{display:block; font-size:.78rem; letter-spacing:.1em; color:var(--muted); margin-bottom:.3rem}
.post-nav a:hover{color:var(--accent)}

.archive{list-style:none; padding:0; margin:2rem 0 3rem}
.archive li{display:flex; gap:1rem; padding:.7rem 0; border-bottom:1px solid var(--rule); font-size:.9rem}
.archive li:last-child{border-bottom:0}
.archive time{color:var(--muted); font-size:.78rem; letter-spacing:.05em; flex:0 0 6rem; padding-top:.2rem}
.archive a:hover{color:var(--accent)}

.site-foot{border-top:1px solid var(--rule); padding:1.1rem 0 1.5rem;
  font-size:var(--nav-fs); color:var(--muted)}
.site-foot p{margin:.4em 0}

.foot-nav{display:flex; flex-wrap:wrap; gap:.3rem 1.1rem; margin:0 0 .5rem}
.foot-nav a{color:var(--muted)}
.site-foot .foot-copy{letter-spacing:.02em}
.site-foot a:hover{color:var(--accent)}

@media (max-width:1024px){
  html{font-size:137.5%}
}

@media (hover:none) and (pointer:coarse){
  html{font-size:137.5%}
}

@media (max-width:620px){
  html{font-size:125%}
  :root{--nav-fs:.72rem}
  .site-foot{padding:.9rem 0 .8rem}
  .post-head h1{font-size:1.6rem}

  .intro h1{font-size:.72rem}
  .intro h1 .tl-sep{display:none}
  .intro h1 .tl-seg{display:block}

  .site-head{padding:.72rem 0 .5rem}
  .site-head .wrap{gap:.15rem .7rem; padding-left:1rem; padding-right:1rem}
  .brand{font-size:.98rem; letter-spacing:0}
  .site-head nav{gap:.55rem}

  .site-head nav{padding-right:0; margin-right:0; -webkit-mask-image:none; mask-image:none}

  .search-open{width:2.2rem; height:2.2rem; margin:-.475rem -.475rem -.475rem -.625rem}
}

@media (hover:none) and (pointer:coarse) and (max-height:620px){
  html{font-size:125%}
}

@media (max-width:430px){

  .site-head nav{gap:.45rem}
  .wrap{padding:0 1rem}
  .site-head .wrap{gap:.4rem .6rem}
}

@media (max-width:400px){
  .site-head .wrap{gap:.4rem .5rem; padding-left:.8rem; padding-right:.8rem}
  .brand{font-size:.9rem}
}

@media (max-width:374px){
  .site-head nav .nav-full{position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap}
  .site-head nav .nav-short{display:inline}
  .site-head nav{gap:0}
  .site-head nav a{padding:0 .25rem}
}

:focus-visible{outline:2px solid var(--accent); outline-offset:3px}
.search-field:focus-within{border-bottom-color:var(--accent)}

.dash{letter-spacing:-.1em; margin-right:.1em}

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
    scroll-behavior:auto !important;
  }
}
