/* Layout: quiet serif homepage. Light header with a hairline; narrow intro prose with a round photo floated right;
   then white bands separated by hairlines (News, Publications, Experience, Projects, Awards), each with its title on the left and
   cards / a timeline on the right; footer lists contacts. */
:root {
  --bg: #ffffff;
  --bg-alt: #f7f7f8;   /* only for the citation box */
  --card: #ffffff;
  --text: #111111;
  --heading: #222222;
  --brand: #424242;
  --muted: #6b6b6b;
  --line: #e8e8e8;
  --link: #3f66dc;          /* Chip-style blue, slightly deeper for contrast */
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --serif: "Lora", Georgia, "Times New Roman", serif;
  color-scheme: light;
  --mono: var(--serif);   /* one typeface across the site */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--serif); font-size: 1.0625rem; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; color: var(--heading); text-wrap: balance; margin: 0; }
p { margin: 0; }

.container {
  max-width: 1000px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.narrow { max-width: 820px; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 1.5rem; min-height: 58px; }
.brand { font-size: 1.6rem; color: var(--brand); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 1.4rem; flex: 1; justify-content: flex-end; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--text); white-space: nowrap; padding-block: .9rem; font-size: 1rem; }
.nav a[aria-current="page"] { color: var(--link); }

/* Intro */
.intro { padding-block: 3.25rem 3.5rem; }
.intro .container::after { content: ""; display: block; clear: both; }
.avatar { float: right; width: 250px; height: 250px; border-radius: 50%; object-fit: cover; object-position: 50% 50%; margin: .25rem 0 1.25rem 2.25rem; shape-outside: circle(50%); }
.intro p + p { margin-top: 1rem; }
.intro .hello { font-size: 1.15rem; }
.tags { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li { font-size: .88rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .75rem; }

/* Bands */
.band { padding-block: 4rem; background: var(--bg); border-top: 1px solid var(--line); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); gap: 1.5rem 3rem; }
.split > * { min-width: 0; }
.section-title { font-size: 2.1rem; line-height: 1.2; }

/* Cards */
.stack { display: flex; flex-direction: column; gap: 1rem; }
.card { background: var(--card); box-shadow: var(--shadow); border: 1px solid var(--line); border-radius: 6px; padding: 1.1rem 1.35rem; }
.meta { margin-top: .45rem; color: var(--muted); font-size: .86rem; display: flex; flex-wrap: wrap; gap: .2rem .5rem; }
.meta span:not(:last-child)::after { content: "·"; margin-left: .5rem; }

/* News: date column + text */
.news-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .9rem; }
.news-list > li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; }
.news-list time { color: var(--muted); font-size: .92rem; font-variant-numeric: tabular-nums; padding-top: .1rem; }

/* Publications */
.pubs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.pub-title { font-size: 1.12rem; line-height: 1.4; color: var(--heading); }
.pub-authors { margin-top: .35rem; font-size: .95rem; color: var(--muted); }
.pub-authors b { color: var(--text); font-weight: 600; }
.pub-venue { margin-top: .1rem; font-size: .95rem; font-style: italic; color: var(--muted); }
.pub-links { margin-top: .7rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.btn { display: inline-block; font: 500 .8rem/1 var(--serif); color: var(--link); border: 1px solid currentColor; border-radius: 4px; padding: .35rem .65rem; background: none; cursor: pointer; }
.btn:hover { background: var(--link); color: var(--card); text-decoration: none; }
details.cite summary { list-style: none; display: inline-block; }
details.cite summary::-webkit-details-marker { display: none; }
details.cite pre { margin: .7rem 0 0; padding: .85rem 1rem; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 4px; font: .78rem/1.55 var(--mono); overflow-x: auto; white-space: pre; color: var(--text); }

/* Experience timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: flex; flex-direction: column; gap: 1.25rem; }
.timeline::before { content: ""; position: absolute; left: 8px; top: .5rem; bottom: .5rem; width: 1px; background: var(--line); }
.timeline > li { display: grid; grid-template-columns: 17px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.dot { width: 17px; height: 17px; border-radius: 50%; border: 2px solid var(--link); background: var(--bg); margin-top: 1.25rem; position: relative; z-index: 1; }
.job-title { font-size: 1.12rem; color: var(--heading); }
.job-org { color: var(--muted); font-size: .97rem; }
.card ul.points { margin: .7rem 0 0; padding-left: 1.15rem; display: flex; flex-direction: column; gap: .3rem; font-size: .97rem; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.project { display: flex; flex-direction: column; background: var(--card); box-shadow: var(--shadow); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; color: var(--text); }
.project:hover { text-decoration: none; border-color: var(--link); }
.project img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-bottom: 1px solid var(--line); }
.project div { padding: .9rem 1.1rem 1.05rem; display: flex; flex-direction: column; gap: .25rem; }
.project h3 { font-size: 1.08rem; color: var(--link); }
.project p { font-size: .92rem; color: var(--muted); line-height: 1.5; }
ul.plain.more { margin-top: 1rem; display: flex; flex-direction: column; gap: .75rem; }
.more li { font-size: .97rem; }
.more b { font-weight: 600; }
ul.plain { list-style: none; margin: 0; padding: 0; }

/* Awards */
.awards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.awards > li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; }
.awards .yr { color: var(--muted); font-size: .92rem; font-variant-numeric: tabular-nums; padding-top: .1rem; }

/* Project article pages */
.article { padding-block: 3rem 4rem; display: flex; flex-direction: column; gap: 1.15rem; }
.article h1 { font-size: 2.3rem; line-height: 1.2; }
.article .lede { color: var(--muted); }
.article .wide img { width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }

/* Footer */
footer { border-top: 1px solid var(--line); background: var(--bg); }
footer .container { padding-block: 2.25rem 2.75rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 1.5rem 3rem; }
.contacts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; font-size: .97rem; }
.contacts li { display: grid; grid-template-columns: 1.2rem minmax(0, 1fr); gap: .5rem; align-items: center; }
.contacts svg { width: 15px; height: 15px; fill: var(--muted); }
.contacts .email { word-break: break-all; }
.foot-note { color: var(--muted); font-size: .95rem; display: flex; flex-direction: column; gap: .75rem; }

@media (max-width: 820px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .band { padding-block: 3rem; }
  .avatar { width: 180px; height: 180px; margin-left: 1.25rem; }
  footer .container { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .avatar { float: none; margin: 0 auto 1.5rem; width: 200px; height: 200px; }
  .brand { font-size: 1.3rem; }
  .projects, .gallery { grid-template-columns: minmax(0, 1fr); }
  .news-list li, .awards li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .site-header .container { gap: 1rem; }
  .nav { gap: 1rem; justify-content: flex-start; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Project folders (glass-folder.js) */
.folders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1.75rem; align-items: start; }
.folder { margin: 0; display: flex; flex-direction: column; gap: .9rem; min-width: 0; }
.gf-mount { min-height: 280px; }
.folder figcaption { font-size: .95rem; color: var(--muted); line-height: 1.5; max-width: 300px; }
.folder-hint { margin-top: 1.25rem; font-family: var(--mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 680px) { .folders { grid-template-columns: minmax(0, 1fr); justify-items: center; } .folder figcaption { text-align: left; } }

/* One typeface everywhere: pull the components onto Lora */
.gf-root, .gf-root .gf-title, .gf-root .gf-meta, .gf-root .gf-sheet-name, .gf-root .gf-sheet-meta, .gf-root .gf-menu-item { font-family: var(--serif); }
.gf-root .gf-meta { font-size: 13px; letter-spacing: .01em; }
.gf-root .gf-sheet-meta { font-size: 11px; letter-spacing: .01em; }
.folder-hint { font-size: .78rem; letter-spacing: .1em; }
details.cite pre { font-family: var(--serif); font-size: .85rem; }
