/* Site-wide styles, matching the original Jon Barron-style homepage (Lato 14px, blue/orange links, 1100px column). */
*{box-sizing:border-box}
body{margin:0;background:#fff;color:#000;font-family:'Lato',Verdana,Helvetica,sans-serif;font-size:14px;line-height:1.4}
main{max-width:1100px;margin:0 auto;padding:20px 16px 40px;min-height:70vh}
p,td,th,li,a,strong,input,select,summary{font-family:'Lato',Verdana,Helvetica,sans-serif;font-size:14px}
a{color:#1772d0;text-decoration:none}
a:focus,a:hover{color:#f09228;text-decoration:none}
heading{display:block;font-family:'Lato',Verdana,Helvetica,sans-serif;font-size:22px;margin:0 0 10px}
papertitle{font-family:'Lato',Verdana,Helvetica,sans-serif;font-size:14px;font-weight:700}
name{font-family:'Lato',Verdana,Helvetica,sans-serif;font-size:32px}
img{max-width:100%;height:auto}
[hidden]{display:none!important}

/* Section blocks used on Scholars / Research / scholar detail pages */
.section{padding:20px}
.intro{margin:0 0 4px}
.muted{color:#666}
.empty{color:#666;padding:0 20px}
.tag{display:inline-block;background:#f3f3f3;border-radius:3px;padding:1px 7px;margin:2px 3px 2px 0;font-size:13px}
input,select{padding:7px 9px;border:1px solid #ccc;border-radius:3px;background:#fff;color:#000;margin:10px 8px 0 0}
input{width:min(100%,420px)}

/* A row with a picture on the left and text on the right, like the paper list on Home */
.row{display:flex;gap:20px;align-items:center;padding:20px}
.row + .row{padding-top:0}
.row .pic{flex:0 0 25%;max-width:160px}
.row .text{flex:1;min-width:0}
.row p{margin:6px 0}
.photo{display:grid;place-items:center;width:120px;height:120px;border-radius:50%;overflow:hidden;background:#eef2f5;color:#567;font-size:44px}
.photo img{width:100%;height:100%;object-fit:cover}
.row ul{margin:4px 0;padding-left:20px}

/* Scholars: two-column card wall */
.card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding:0 20px}
.card{border:1px solid #e5e5e5;border-radius:6px;padding:16px 18px;background:#fff}
.card p{margin:8px 0}
.card__head{display:flex;gap:14px;align-items:center}
.card > a:last-child{display:inline-block;margin-top:10px}
.card__topics{margin-top:7px;display:flex;flex-wrap:wrap;gap:5px}
/* Research-area keywords: blue outlined pills */
.card__topics .tag,.row .tag{display:inline-block;margin:0;padding:1px 10px;border:1px solid #b9cdf7;border-radius:999px;background:#eef4ff;color:#2f5fcf;font-size:12px;line-height:1.6;white-space:nowrap}
.row .tag{margin:0 4px 4px 0}
.photo.small{flex-shrink:0;width:64px;height:64px;font-size:26px}
.card-grid .empty{grid-column:1 / -1;padding:0}

@media(max-width:900px){.card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Research feed entries */
.entry{padding:14px 20px;border-bottom:1px solid #eee}
.entry p{margin:3px 0}
details summary{cursor:pointer;color:#666}
details p{text-align:justify}

/* Top navigation bar, styled after the AcademicPages masthead (alexkael.github.io) */
.masthead{position:sticky;top:0;z-index:20;background:#fff;border-bottom:1px solid #f2f3f3}
.masthead__inner{max-width:1280px;margin:0 auto;padding:.5em 1em;display:flex;align-items:center;gap:2em;flex-wrap:wrap;font-family:"Trebuchet MS",Helvetica,sans-serif;font-size:15px;line-height:1.5}
.masthead__menu a{font-family:"Trebuchet MS",Helvetica,sans-serif;font-size:15px;color:#7a8288}
.masthead__menu{display:flex;gap:1.6em;list-style:none;margin:0;padding:0;flex-wrap:wrap}
.masthead__menu a{display:block;padding:.5em 0;border-bottom:2px solid transparent}
.masthead__menu a:hover{color:#494e52;text-decoration:none}
.masthead__menu a.active{color:#494e52;border-bottom-color:#9ba1a6}

/* Visitor globe (GoatCounter data, drawn by assets/globe.js), every page */
.visitor-globe{width:180px;max-width:calc(100% - 32px);margin:0 16px 16px auto}
/* Scholars and Research: align the globe with the right edge of the text
   column (same box as main) instead of the window edge. */
.globe-row--content{max-width:1100px;margin:0 auto;padding:0 16px}
.globe-row--content .visitor-globe{max-width:100%;margin-right:0}
.visitor-globe a{display:block}
.visitor-globe canvas{display:block;width:100%;aspect-ratio:1;cursor:grab}
.visitor-globe canvas:active{cursor:grabbing}

@media(max-width:600px){
  .masthead__inner{padding:.3em 16px;gap:1em}
  .section,.row,.entry{padding-left:0;padding-right:0}
  .row{gap:14px}
  .photo{width:80px;height:80px;font-size:30px}
  .card-grid{grid-template-columns:minmax(0,1fr);padding:0}
  .photo.small{width:56px;height:56px;font-size:22px}
}

/* Research: pinned "Essential Readings" panel (single column, cover + description) */
.books{margin:20px 20px 0;padding:16px 18px;border:1px solid #e5e5e5;border-left:3px solid #1772d0;border-radius:6px;background:#fafcff}
.books heading{font-size:18px;margin-bottom:2px}
.books__intro{margin:0 0 8px;color:#666}
.books__list{list-style:none;margin:0;padding:0 6px 0 0;max-height:560px;overflow-y:auto}
.book{display:flex;gap:16px;align-items:flex-start;padding:12px 0;border-top:1px solid #e9eef6}
.book:first-child{border-top:0}
.book__cover{flex:0 0 78px}
.book__cover img{display:block;width:78px;height:104px;object-fit:cover;object-position:top;border:1px solid #d9dee6;border-radius:3px;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.08)}
.book__text{flex:1;min-width:0;line-height:1.45}
.book__desc{margin:5px 0 0;color:#333;text-align:justify}
.books .tag{display:inline-block;margin:0 0 0 4px;padding:0 8px;border:1px solid #b9cdf7;border-radius:999px;background:#eef4ff;color:#2f5fcf;font-size:11px;line-height:1.6;vertical-align:1px}
@media(max-width:600px){.books{margin:20px 0 0}.book__cover{flex-basis:60px}.book__cover img{width:60px;height:80px}}
.topic-tag{display:inline-block;padding:0 9px;border:1px solid #b9cdf7;border-radius:999px;background:#eef4ff;color:#2f5fcf;font-size:12px;line-height:1.6;vertical-align:1px}
