/* toscano.ai — site styles. CUA navy + red accents, light and dark themes. */
:root {
  --navy: #14284b;
  --red: #b1102c;
  --bg: #ffffff;
  --surface: #f5f6f8;
  --card: #ffffff;
  --text: #1d2330;
  --muted: #5b6475;
  --line: #e1e4ea;
  --link: #1d4ed8;
  --accent: var(--navy);
  --on-accent: #ffffff;
  --radius: 10px;
  --wrap: 1120px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1420;
    --surface: #161d2c;
    --card: #1a2233;
    --text: #e6e9ef;
    --muted: #a3acbd;
    --line: #2a3448;
    --link: #8db4ff;
    --accent: #2c4a80;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 var(--sans); }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.25; font-weight: 600; }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 .4em; }
h2 { font-size: 1.6rem; margin: 0 0 .6em; }
h3 { font-size: 1.1rem; margin: 0 0 .3em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }
.section { padding-block: 56px; }
.band { background: var(--surface); }
.muted { color: var(--muted); }
.prose p { margin: 0 0 1em; }
.prose ul { padding-left: 1.2em; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--card); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 72px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; margin-right: auto; }
.brand img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.brand strong { display: block; font-family: var(--serif); font-size: 1.15rem; }
.brand small { display: block; color: var(--muted); font-size: .8rem; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 6px; font-size: .95rem; }
.site-nav a:hover { background: var(--surface); }
.site-nav a[aria-current="page"] { color: var(--red); font-weight: 600; }
@media (prefers-color-scheme: dark) { .site-nav a[aria-current="page"] { color: #ff7a8f; } }
.nav-toggle, .nav-button { display: none; }
@media (max-width: 860px) {
  .nav-button { display: block; width: 40px; height: 40px; cursor: pointer; position: relative; }
  .nav-button span, .nav-button span::before, .nav-button span::after {
    position: absolute; left: 9px; width: 22px; height: 2px; background: var(--text); content: ""; }
  .nav-button span { top: 19px; } .nav-button span::before { top: -7px; left: 0; } .nav-button span::after { top: 7px; left: 0; }
  .site-nav { display: none; width: 100%; flex-direction: column; padding-bottom: 12px; }
  .nav-toggle:checked ~ .site-nav { display: flex; }
}

/* Hero */
.hero { background: linear-gradient(135deg, var(--navy), #1f3d6e); color: #fff; }
.hero-grid { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: center; padding-block: 64px; }
.hero h1 { color: #fff; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; margin: 0 0 .8em; opacity: .85; }
.eyebrow a { color: inherit; }
.lede { font-size: 1.2rem; margin: 0; }
.hero .lede { color: #dbe4f5; }
.position-card { color: var(--text); }
.position-card p { margin: 0 0 .3em; }
.position-period { color: var(--red); font-weight: 600; font-size: .9rem; }
.position-title { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; padding-block: 44px; } }

.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: 44px; }
.page-head .lede { color: var(--muted); max-width: 820px; }

/* Layout helpers */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 24px; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card-title { font-size: 1.2rem; }
.button { display: inline-block; background: var(--accent); color: var(--on-accent); border: 0; border-radius: 6px;
  padding: 10px 18px; font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer; }
.button:hover { filter: brightness(1.15); }
.button-light { background: #fff; color: var(--navy); }

/* Publications */
.pub-list { display: grid; gap: 16px; }
.pub { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: var(--radius); padding: 16px 20px; }
.pub h3 { font-size: 1.05rem; }
.pub h3 a { color: inherit; text-decoration: none; }
.pub h3 a:hover { text-decoration: underline; }
.pub p { margin: 0 0 .3em; }
.pub-authors { color: var(--muted); font-size: .95rem; }
.pub-authors strong { color: var(--text); }
.pub-venue { font-style: italic; font-size: .95rem; }
.pub-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .85rem; margin-top: .5em !important; }
.pub-meta a { display: inline-flex; gap: 4px; align-items: center; }
.tag { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; color: var(--muted); text-decoration: none; }
.tag-award { background: #fff4d6; border-color: #f0d78c; color: #6b4e00; }
.year { font-size: 1.3rem; margin: 24px 0 0; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.pub-title { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.bibtex { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; overflow-x: auto; font-size: .85rem; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-top: 12px; }
.filters label { display: grid; gap: 4px; font-size: .8rem; color: var(--muted); flex: 1 1 160px; }
.filters label:first-child { flex: 2 1 260px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 10px; width: 100%; }
.pager { display: flex; justify-content: center; gap: 20px; margin-top: 32px; }

/* Awards */
.highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 28px; }
.highlight-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--surface); color: var(--red); margin-bottom: 12px; }
.highlight p { margin: 0; color: var(--muted); }
.awards { columns: 2 340px; column-gap: 40px; padding-left: 1.2em; }
.awards li { break-inside: avoid; margin-bottom: .5em; }

/* CTA band */
.cta { background: var(--navy); color: #fff; text-align: center; padding-block: 64px; }
.cta h2 { color: #fff; }
.cta p { color: #dbe4f5; max-width: 680px; margin: 0 auto 20px; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 20px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 28px 16px; }
.timeline li::before { content: ""; position: absolute; left: -28px; top: 6px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--red); border: 3px solid var(--bg); }
.timeline-label { font-size: .85rem; font-weight: 600; color: var(--red); }
.timeline p { margin: .2em 0; font-size: .95rem; }

/* People */
.people { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.person { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.person img, .avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar { display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 600; }
.person strong { display: block; line-height: 1.3; }
.person strong a { color: inherit; }
.person div span { color: var(--muted); font-size: .88rem; }
.list-heading { margin-top: 32px; }
.theses { padding-left: 1.2em; }
.theses li { margin-bottom: .6em; }

/* Contact */
.contact-list { list-style: none; padding: 0; }
.contact-list li { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.contact-list .icon { color: var(--red); flex: none; }
.map { margin-top: 16px; border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; }
.map iframe { width: 100%; height: 100%; border: 0; }
.contact-form { display: grid; gap: 14px; }
.contact-form label { display: grid; gap: 4px; }
.contact-form label span { font-size: .9rem; font-weight: 600; }
.error { color: var(--red); }
.notice { background: #e7f6ec; color: #13512b; border-radius: 6px; padding: 10px 14px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding-block: 32px; font-size: .9rem; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }

/* Animated triangle mesh behind headers (homepage/js/particles-init.js) */
.particles { position: relative; isolation: isolate; overflow: hidden; }
.particles-layer { position: absolute; inset: 0; z-index: -1; }
.particles-layer canvas { display: block; width: 100%; height: 100%; }
/* Let the mouse reach the canvas through empty parts of the header; keep text and links usable. */
.particles > .wrap { pointer-events: none; }
.particles > .wrap > * { pointer-events: auto; }

/* Blog lists (blog index and home page) */
.post-list { display: grid; gap: 16px; }
.post-card { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--navy); border-radius: var(--radius); padding: 18px 22px; }
.post-card h3 { font-size: 1.25rem; margin-bottom: .35em; }
.post-card h3 a { color: inherit; text-decoration: none; }
.post-card h3 a:hover { text-decoration: underline; }
.post-card p { margin: 0 0 .4em; }
.post-excerpt { color: var(--muted); }
.post-date { color: var(--muted); font-size: .85rem; margin: 0 0 .3em; }
.tag-filter { margin: 0 0 24px !important; }
.tag-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.feed-link { margin-left: auto; font-size: .85rem; }
@media (prefers-color-scheme: dark) { .post-card { border-left-color: #6d8fd1; } .tag-active { background: var(--accent); } }
