/* masbash.id — mirrors yadongxie.com (home + lab). Charter, one ink colour, 768px column. */
@font-face{font-family:Charter;src:url("https://cdn.jsdelivr.net/npm/charter-webfont@4.1.0/fonts/charter_regular.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:Charter;src:url("https://cdn.jsdelivr.net/npm/charter-webfont@4.1.0/fonts/charter_italic.woff2") format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:Charter;src:url("https://cdn.jsdelivr.net/npm/charter-webfont@4.1.0/fonts/charter_bold.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}

:root{--ink:#27272a;--bg:#ffffff;--hair:#e4e4e7}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font-family:Charter,Georgia,"Times New Roman",serif;font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
a{color:inherit;text-decoration:none}
h1,h2,p,ol,ul{margin:0;padding:0}
ol,ul{list-style:none}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
img{display:block}
::selection{background:var(--ink);color:#fff}
:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

.page{max-width:768px;margin:0 auto;padding:48px 24px 96px}

/* site bar: name + nav (+ socials) */
.bar{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px 24px}
.site-name{font-size:16px;letter-spacing:-.4px;line-height:24px}
.nav{display:flex;flex-wrap:wrap;align-items:center;gap:4px 16px;font-size:14px;line-height:20px}
.nav a[aria-current="page"]{font-weight:700}
.nav .sep{user-select:none}
.nav .ico{display:inline-flex;align-items:center;transition:opacity .2s}
.nav .ico svg{width:15px;height:15px}

/* ---------- home (profile) ---------- */
.home{display:flex;flex-direction:column;min-height:100vh;min-height:100svh;padding-bottom:48px}
.home .grow{flex:1 0 0}
.home .grow2{flex:2 0 0}
.home .bar-m{margin-bottom:40px}
.bar-m .site-name{font-weight:700}
@media(max-width:767px){.bar{flex-direction:column;align-items:flex-start;gap:8px}}
.home .bar-d{display:none;margin-top:16px}
.prof{font-size:14px;line-height:1.625}
.prof a{font-weight:700}
.prof .bar a{font-weight:400}
.intro{display:grid}
.intro-text{max-width:576px}
.intro-sub{margin-top:16px}
.intro-sub p+p{margin-top:4px}
.intro .avatar{width:92px;height:auto}

.timeline{margin-top:40px}
.timeline>li+li{margin-top:32px}
.era{display:grid;row-gap:8px}
.era .when{font-variant-numeric:tabular-nums}
.era .org{font-weight:700}
.era .org .nm{display:inline-flex;align-items:center;gap:6px}
.era .org .lg{width:16px;height:16px;object-fit:contain}
.era .org .aka{font-weight:400}
.era .desc{margin-top:8px;position:relative}
.era .links{margin-top:4px}
.prof .era .links a{font-weight:400}
.det-btn{position:absolute;right:0;bottom:0;font-size:12px;line-height:inherit;white-space:nowrap;opacity:0;transition:opacity .2s}
.det-btn svg{display:inline-block;width:10px;height:10px;margin-left:3px;vertical-align:0;transition:transform .25s}
.det-btn[aria-expanded="true"] svg{transform:rotate(180deg)}
.era:hover .det-btn,.det-btn:focus-visible,.det-btn[aria-expanded="true"]{opacity:1}
.det{overflow:hidden;height:0;transition:height .35s ease}
.det ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 16px;padding-top:16px}
.det li{opacity:0;transform:translateY(8px);transition:opacity .3s ease,transform .3s ease;transition-delay:calc(var(--i,0) * 50ms)}
.det.open li{opacity:1;transform:none}
.det img{width:100%;height:auto;aspect-ratio:8/5;border-radius:2px;outline:1px solid var(--hair);filter:grayscale(1);transition:filter .3s}
.det p{margin-top:8px;font-size:12px;line-height:1.375;font-weight:700}

/* ---------- project (lab) ---------- */
.top .site-name{font-weight:700}
main.lab{margin-top:40px}
.group+.group{margin-top:64px}
.group h2{font-size:20px;font-weight:700;letter-spacing:-.5px;line-height:28px}
.list{margin-top:24px}
.list>li+li{margin-top:24px}
.row{display:flex;align-items:flex-start;gap:12px}
.thumb{flex:none;width:112px;aspect-ratio:8/5;overflow:hidden;background:#000}
.thumb img{width:100%;height:100%;object-fit:cover;filter:grayscale(1);transition:filter .3s}
.thumb.blank{display:flex;align-items:center;justify-content:center;padding:8px;background:var(--ink);color:#fff;font-size:12px;font-weight:700;line-height:1.2;text-align:center}
.meta{min-width:0}
.t{font-size:14px;font-weight:700;line-height:20px;overflow-wrap:break-word}
.k{font-size:12px;line-height:16px;margin-top:2px}
.d{font-size:12px;line-height:1.625;margin-top:6px;overflow-wrap:break-word}
a.row:focus-visible .thumb img,.list>li[data-active] a.row .thumb img{filter:none}
.row.soon{opacity:.55}

/* project page: categories side by side as columns */
.page.wide{max-width:1440px}
.cols{display:grid;grid-template-columns:minmax(0,1fr);gap:56px;align-items:start}
.cols .group+.group{margin-top:0}

/* ---------- writing ---------- */
.page-title{font-size:20px;font-weight:700;letter-spacing:-.5px;line-height:28px}
.wlist{margin-top:32px;font-size:14px;line-height:1.5}
.wlist>li+li{margin-top:24px}
.wlist a{font-weight:700}
.wlist .date{margin-top:2px;font-size:12px}
time{font-variant-numeric:tabular-nums;white-space:nowrap}
.back{display:inline-flex;align-items:center;gap:8px;min-height:24px;font-size:14px;line-height:20px}
.post-title{margin-top:24px;font-size:20px;font-weight:800;line-height:26px}
.post-meta{margin-top:8px;font-size:14px;line-height:20px;color:#71717a}
.post{margin-top:32px;font-size:14px;line-height:24px;overflow-wrap:break-word}
.post>:first-child{margin-top:0}
.post p{margin:16px 0}
.post h2{font-size:16px;font-weight:700;line-height:1.35;margin:30px 0 14px}
.post h3{font-size:14px;font-weight:700;margin:24px 0 10px}
.post a{font-weight:700}
.post strong{font-weight:700}
.post ul,.post ol{margin:16px 0;padding-left:1.6em}
.post ul{list-style:disc}
.post ol{list-style:decimal}
.post li{margin:6px 0}
.post li::marker{color:#a1a1aa}
.post img,.post video{width:100%;height:auto;margin:28px 0}
.post blockquote{margin:24px 0;padding-left:1em;border-left:2px solid var(--hair);font-style:italic}
.post code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.875em;font-weight:600}
.post code::before,.post code::after{content:"`"}
.post pre{margin:24px 0;padding:.857em 1.143em;background:#121212;color:#dbd7caee;font-size:13px;line-height:22px;overflow-x:auto}
.post pre code{font-size:inherit;font-weight:400}
.post pre code::before,.post pre code::after{content:none}
.post hr{border:0;border-top:1px solid var(--hair);margin:40px 0}
.post table{width:100%;border-collapse:collapse;margin:24px 0;font-size:.9em}
.post th,.post td{text-align:left;padding:6px 8px;border-bottom:1px solid var(--hair)}
.pn{display:flex;justify-content:space-between;gap:24px;margin-top:64px;font-size:14px;line-height:20px}
.pn a{display:flex;gap:6px;min-width:0;max-width:48%}
.pn .ttl{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pn .next{margin-left:auto;text-align:right}

@media(hover:hover){
  .wlist a:hover,.back:hover,.post a:hover,.pn a:hover .ttl{text-decoration:underline;text-underline-offset:3px}
  .nav a:not(.ico):hover,.prof a:hover,a.row:hover .t,.det-btn:hover,.det a:hover p{text-decoration:underline;text-underline-offset:3px}
  .nav .ico:hover{opacity:.6}
  a.row:hover .thumb img,.det a:hover img{filter:none}
}
@media(hover:none){.det-btn,.det{display:none}}
@media(min-width:640px){
  .row{gap:20px}
  .thumb{width:160px}
  .t{font-size:16px;line-height:24px}
  .d{font-size:14px}
  .det ul{grid-template-columns:repeat(3,minmax(0,1fr))}
  .det p,.det-btn{font-size:14px}
  .wlist .date{font-size:14px}
}
@media(min-width:768px){
  .cols{grid-template-columns:repeat(2,minmax(0,1fr));gap:56px 32px}
  .cols .row{gap:12px}
  .cols .thumb{width:112px}
  .cols .t{font-size:14px;line-height:20px}
  .cols .d{font-size:13px;line-height:1.55}
}
@media(min-width:1200px){
  .cols{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(min-width:768px){
  .page{padding:48px 32px 128px}
  .home{padding-bottom:48px}
  .home .bar-m{display:none}
  .home .bar-d{display:flex}
  .prof{font-size:16px;line-height:26px}
  .intro{grid-template-columns:minmax(0,1fr) auto;align-items:end;column-gap:24px;border-bottom:1px solid var(--ink)}
  .intro-text{padding-bottom:6px}
  .intro-sub p+p{margin-top:0}
  .timeline{border-bottom:1px solid var(--ink);padding-bottom:40px}
  .era{grid-template-columns:100px minmax(0,1fr);column-gap:24px}
  .wlist{font-size:16px}
  .post{font-size:16px;line-height:28px}
  .post p{margin:20px 0}
  .post h2{font-size:17px;margin:34px 0 17px}
  .post h3{font-size:16px;margin:28px 0 12px}
  .post img,.post video{margin:32px 0}
  .post pre{font-size:14px;line-height:24px}
}
@media(max-width:767px),(prefers-reduced-motion:reduce){.thumb img,.det img,.det li,.det,.det-btn svg{transition:none}}
