@font-face{font-family:Inconsolata;font-weight:400 700;font-style:normal;font-display:swap;src:url(/fonts/Inconsolata.woff2) format("woff2")}
:root{--accent:#1b8ae4;--fg:#000;--bg:#fff;--code:#f6f8fa}
*{box-sizing:border-box}
html{font:18.75px/1.6 Inconsolata,Menlo,Consolas,"DejaVu Sans Mono",monospace;color:var(--fg);background:var(--bg)}
body{margin:0}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}

body>nav{display:flex;justify-content:flex-end;align-items:center;gap:1.1rem;height:63px;padding:0 2rem;border-bottom:1px solid rgba(0,0,0,.1)}
body>nav a{color:var(--fg)}
body>nav a[aria-current]{color:var(--accent)}
body>nav .sep{border-left:1px solid rgba(0,0,0,.1);padding-left:1rem;margin-left:-.3rem}

/* front page: same geometry as the original: photo fixed at x=110, text at x=520, text width = 75vw - 390px */
main{display:grid;grid-template-columns:340px minmax(0,calc(75vw - 390px));column-gap:70px;margin:0;padding:1.2rem 0 3rem 110px}
@media(max-width:1000px){main{grid-template-columns:340px minmax(0,1fr);column-gap:2.5rem;padding:1.2rem 2rem 3rem}}
aside{align-self:start}
article{padding-top:2rem}

.photo{display:block;cursor:pointer}
.photo input{position:absolute;opacity:0;pointer-events:none}
.photo img{display:block;width:340px;max-width:100%;height:auto;border-radius:4px;box-shadow:0 2px 5px rgba(0,0,0,.16),0 2px 10px rgba(0,0,0,.12)}
.photo .b,.photo input:checked~.a{display:none}
.photo input:checked~.b{display:block}
.photo input:focus-visible~img{outline:2px solid var(--accent);outline-offset:2px}

h1{font-size:1.5rem;font-weight:400;margin:1.1rem 0 0;line-height:1.3}
h1 b{font-weight:700}
aside p{margin:.2rem 0}
.social{display:flex;justify-content:space-between;align-items:center;margin:1rem 0 !important}
.social a{color:var(--fg);display:block;line-height:0}
.social a:hover{color:var(--accent)}
.social svg{height:32px;width:auto;display:block}
.mail svg.i{height:.9em;width:auto;vertical-align:-.1em;margin-right:.2rem}
.chat{text-align:center;margin-top:1rem !important}

article p{margin:0 0 1.2rem}
blockquote{margin:1.5rem 0 0 .5rem;padding-left:10px;border-left:2px solid var(--accent)}
blockquote p{margin:0 0 1rem 0}
.py{background:var(--code);border-radius:4px;padding:.15rem .75rem;overflow-x:auto;white-space:nowrap}
.py code{font:inherit}
.fn{color:#900}

h2{font-size:1.33rem;margin:2.2rem 0 .5rem;line-height:1.3}
h2 a{color:inherit}

.rows{border-collapse:collapse;width:100%}
.rows th,.rows td{text-align:left;vertical-align:top;padding:.35rem 0}
.rows th{font-weight:400;white-space:nowrap;padding-right:1.4rem}
.rows code{font:inherit;background:var(--code);padding:0 .25rem;border-radius:3px}

.pub{margin:1.6rem 0 2.2rem}
.pub p{margin:0}
.thumb{position:relative;width:180px;margin-bottom:.9rem}
.thumb img{display:block;width:180px;height:auto;border-radius:4px;box-shadow:0 2px 5px rgba(0,0,0,.16),0 2px 10px rgba(0,0,0,.12)}
.badge{position:absolute;top:0;left:-8px;background:var(--accent);color:#fff;font-size:.8rem;line-height:1.2;padding:.15rem .45rem;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.title{font-weight:700}
.authors u{text-decoration-thickness:1px;text-underline-offset:2px}
.venue{font-style:italic}
.links{display:flex;flex-wrap:wrap;gap:.45rem;margin-top:.6rem;font-size:.7rem;text-transform:uppercase}
.links a,.links label{display:inline-block;color:var(--fg);border:1px solid var(--fg);border-radius:2px;padding:.2rem .8rem;cursor:pointer;line-height:1.5}
.links a:hover,.links label:hover,.links input:checked+label{background:var(--fg);color:var(--bg);text-decoration:none}
.links input{position:absolute;opacity:0;pointer-events:none}
.links input:focus-visible+label{outline:2px solid var(--accent);outline-offset:2px}
.links .abs{display:none;flex-basis:100%;font-size:.8rem;line-height:1.6;text-transform:none;margin:.5rem 0 0}
.links input:checked~.abs{display:block}

@media(min-width:761px) and (min-height:700px){aside{position:sticky;top:5rem}}
body>nav{position:sticky;top:0;background:var(--bg);z-index:1}

@media(max-width:760px){
  body>nav{padding:0 1rem;gap:.8rem}
  main{grid-template-columns:1fr;gap:1rem;padding:1rem 1.2rem 2rem}
  .photo img{width:100%;max-width:340px}
  article{padding-top:0}
}

/* sub-pages */
body>nav .brand{margin-right:auto}
main.page{display:block;max-width:1000px;margin:0 auto;padding:1.5rem 2rem 3rem}
h1.plain{font-size:2rem;font-weight:300;margin:1.2rem 0 .2rem}
.sub{margin:0 0 .5rem}
main.page h2{font-size:1.7rem;font-weight:400;margin:2rem 0 1rem}
.row{display:flex;gap:1.3rem;align-items:flex-start}
.row .thumb{flex:0 0 280px;max-width:45%;margin:.25rem 0 0}
.row .thumb img{width:100%}
.row .info{flex:1;min-width:0}
.pub.row{margin:0 0 1.1rem;padding:1rem 1.2rem;background:#fff;border:1px solid #d4d3cb;transition:box-shadow .12s,border-color .12s}
.pub.row{cursor:pointer}
.pub.row .abs{cursor:text}
.pub.row:hover{border-color:#000}
.pub.row.hl{border-color:#000;box-shadow:3px 3px 0 #000}
.pub.row.hl:hover{box-shadow:4px 4px 0 #000}
.more input{position:absolute;opacity:0;pointer-events:none}
.more label{color:#828282;border-bottom:1px dashed #828282;cursor:pointer}
.more span{display:none}
.more input:checked+label{display:none}
.more input:checked~span{display:inline}
.more input:focus-visible+label{outline:2px solid var(--accent)}
@media(max-width:760px){
  body>nav .brand{display:none}

}

/* blog index */
.cards{list-style:none;margin:1.5rem 0 0;padding:0;display:grid;grid-template-columns:repeat(2,1fr);gap:20px}
.cards li{background:#f5f5f5;border-radius:10px;padding:20px;box-shadow:0 4px 8px rgba(0,0,0,.1);display:flex;flex-direction:column}
.cards li>a{color:inherit;display:block}
.cards li>a:hover{text-decoration:none}
.cards li>a:hover h2{color:var(--accent)}
main.page .cards h2{font-size:1.28rem;font-weight:400;margin:0 0 .5rem;line-height:1.3}
.fig{background:#fff;border-radius:10px;height:200px;overflow:hidden}
.fig img{display:block;width:100%;height:100%;object-fit:contain}
.cards p{margin:.8rem 0 0}
.cards .meta{font-size:.75rem;color:#828282;margin-top:1rem}
.cards .tags{font-size:.75rem;color:#828282;margin:.2rem 0 0}
.cards .tags span{margin-right:.5rem}
@media(max-width:768px){.cards{grid-template-columns:1fr}}

/* ---- post pages ---- */
:root{--divider:rgba(0,0,0,.1);--muted:#828282}
.post-head{border-bottom:1px solid var(--divider);padding:1.2rem 1rem 2.2rem}
.post-head .col{max-width:512px;margin:0 auto}
.post-head h1{font-size:2.67rem;font-weight:700;margin:2rem 0 .8rem;line-height:1.2}
.post-head p{margin:0;font-size:.8rem;line-height:1.7}
.post-wrap{display:grid;grid-template-columns:1fr minmax(0,512px) 1fr;padding:1.5rem 1rem 4rem}
.toc{grid-column:1;justify-self:end;width:165px;margin-right:2.2rem;position:sticky;top:5rem;align-self:start;font-size:.64rem;line-height:1.5}
.toc .btns{margin-bottom:1.1rem;text-align:center}
.toc .btns a{display:inline-block;margin:0 2px;padding:6px 12px;background:#f0f0f0;border-radius:4px;color:#333;font-size:.75rem}
.toc h2{font-size:.8rem;margin:0 0 .6rem}
.toc ul{list-style:none;margin:0;padding:0}
.toc>ul>li{margin:.55rem 0 0;font-weight:700}
.toc ul ul{margin:.3rem 0 0 .8rem;font-weight:400}
.toc li li{margin:.25rem 0}
.toc a{color:#333}
article.post{grid-column:2;font-size:.75rem;line-height:2.06}
article.post p{margin:0 0 1.2rem;font-size:.75rem}
article.post h2{font-size:1.28rem;font-weight:600;line-height:1.3;margin:2rem 0 1.3rem;padding-bottom:.4rem;border-bottom:1px solid var(--divider)}
article.post h3{font-size:.96rem;font-weight:700;margin:2rem 0 1rem;line-height:1.4}
article.post h4{font-size:.75rem;font-weight:700;margin:1.5rem 0 .6rem}
article.post pre{background:rgba(27,138,228,.05);padding:8px 12px;overflow:auto;font-size:.75rem;line-height:1.6}
article.post code{font:inherit}
article.post img,article.post video{max-width:100%}
article.post table{margin:1rem 0}
article.post .ref,article.post div[id^=ref]{font-size:.7rem;line-height:1.7;margin:0 0 .7rem}
article.post sup{line-height:0}
article.post b,article.post strong{font-weight:700}
.intro-gif{text-align:center;margin:20px 0 40px}
.intro-gif video{max-width:100%;height:auto;border-radius:8px}
.content-section{max-width:800px;margin:40px auto;padding:0 20px}
.section-title{font-size:1.1em!important;font-weight:700;text-align:center;margin-bottom:30px;color:#333;line-height:1.3;border:0;padding:0}
.figure-container{width:100%;display:flex;justify-content:center;margin:30px 0}
.main-figure{width:85%;max-width:700px;margin:0;display:flex;flex-direction:column;align-items:center}
.main-figure.half-width .responsive-image{width:42.5%;max-width:350px}
.main-figure.three-quarter-width .responsive-image{width:63.75%;max-width:525px}
.main-figure.smaller-width .responsive-image{width:76.5%;max-width:630px}
.responsive-image{width:100%;height:auto;margin-bottom:15px;background:none;border:0}
.figure-caption{width:100%;text-align:left;line-height:1.5;color:#555;margin-top:15px;padding:0 10px;font-size:.75rem}
.figure-caption b,.figure-caption strong{color:#333}
@media(max-width:1000px){
  .post-wrap{grid-template-columns:minmax(0,512px);justify-content:center}
  .toc{grid-column:1;justify-self:start;width:auto;margin:0 0 2rem;position:static}
  article.post{grid-column:1}
}
@media(max-width:768px){
  .content-section{padding:0 15px;margin:30px auto}
  .main-figure{width:95%}
}
@media(max-width:480px){
  .content-section{margin:20px auto;padding:0 10px}
  .main-figure{width:100%}
}
.post.wide{max-width:1280px;margin:0 auto;padding:1.5rem 2rem 3rem}
.post.wide .post-title{font-size:2.13rem;font-weight:300;margin:1.2rem 0 1.5rem;line-height:1.2}

/* ---- repositories ---- */
.repositories{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:1.5rem}
.repo-card{border:1px solid var(--divider);border-radius:6px}
.repo-card a{display:flex;flex-direction:column;height:100%;padding:16px;color:var(--fg);text-decoration:none}
.repo-card-header{display:flex;gap:.45rem;align-items:flex-start;margin:0 0 8px}
.repo-icon{flex:none;margin-top:.3rem;color:var(--muted)}
.repo-full-name{overflow-wrap:anywhere;line-height:1.6}
.repo-owner{color:var(--muted)}
.repo-name{color:var(--accent);font-weight:600}
.repo-description{margin:0 0 12px;font-size:.867rem;line-height:1.5;color:var(--muted)}
.repo-stats{display:flex;flex-wrap:wrap;gap:12px;margin-top:auto}
.repo-stat{display:inline-flex;align-items:center;gap:.3rem;font-size:.867rem;color:var(--muted)}
.repo-lang-dot{display:inline-block;width:10px;height:10px;border-radius:50%}
@media(max-width:1000px){.repositories{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.repositories{grid-template-columns:1fr}}
@media(max-width:520px){
  .row{flex-direction:column;gap:.6rem}
  .row .thumb{flex:none;width:100%;max-width:280px}
}

/* home page: the selected-publication boxes are 85% of the text column (never narrower than 420px), figure 35% of the box */
article .pub.row{width:85%;min-width:min(100%,420px)}
article .pub.row .thumb{max-width:35%}
