/* noambarda.com: plain CSS, no build step */

:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #1c2127;
  --muted: #5c6670;
  --line: #e3e0d8;
  --accent: #0f5c63;
  --accent-ink: #ffffff;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181c;
    --surface: #1b2025;
    --ink: #e8e6e1;
    --muted: #a0a8b0;
    --line: #2d343b;
    --accent: #6fc3c9;
    --accent-ink: #0d1114;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 0; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 62rem; margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0 0 1rem; }

.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 0.5rem 1rem; z-index: 20; }
.skip:focus { left: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.site-header nav { display: flex; gap: 1.25rem; overflow-x: auto; scrollbar-width: none; }
.site-header nav::-webkit-scrollbar { display: none; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; white-space: nowrap; padding: 0.25rem 0; }
.site-header nav a:hover { color: var(--accent); }

/* Sections */
section.wrap { padding-top: 4.5rem; padding-bottom: 0; }
section > h2 { font-size: 1.9rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.section-intro { color: var(--muted); max-width: 44rem; }

/* Hero */
section.hero { display: grid; grid-template-columns: 1fr 15rem; gap: 3rem; align-items: start; padding-top: 3.5rem; }
.eyebrow { font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 0.75rem; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 0.5rem; }
.subtitle { font-family: var(--serif); font-size: clamp(1.2rem, 2.4vw, 1.5rem); line-height: 1.3; color: var(--muted); margin-bottom: 1.5rem; text-wrap: balance; }
.lede { font-size: 1.15rem; max-width: 40rem; }
.portrait { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }

.roles { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 0.85rem; }
.roles li { padding-left: 1rem; border-left: 2px solid var(--accent); line-height: 1.45; }
.roles span { color: var(--muted); font-size: 0.95rem; }

.links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; margin: 0; }
.links.stacked { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  padding: 0.5rem 1rem; border-radius: 4px; text-decoration: none; font-weight: 600;
}
.btn:hover { filter: brightness(1.1); }

/* Research pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 1.5rem; }
.pillar { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1.4rem 1.5rem; }
.pillar .num { font-family: var(--serif); color: var(--accent); font-size: 0.95rem; letter-spacing: 0.08em; margin-bottom: 0.3rem; }
.pillar h3 { font-size: 1.3rem; margin-bottom: 0.7rem; }
.flag { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 1.1rem 0 0.4rem; }
.flags { list-style: none; padding: 0; margin: 0; font-size: 0.93rem; color: var(--muted); display: grid; gap: 0.5rem; line-height: 1.45; }
.questions { margin: 0 0 1rem; padding-left: 1.25rem; }
.questions li { margin-bottom: 0.25rem; }
.todo { background: #ffe08a; color: #3a2c00; padding: 0.05em 0.3em; border-radius: 3px; font-size: 0.9em; }

/* Systems */
.systems { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem; margin-top: 1.5rem; }
.systems h3 { font-size: 1.3rem; margin-bottom: 0.25rem; }
.where { color: var(--muted); font-size: 0.95rem; }

/* Publications */
.pub-group { font-family: var(--sans); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 2rem 0 0.75rem; }
.pubs { list-style: none; padding: 0; margin: 0; }
.pubs li { padding: 0.8rem 0; border-top: 1px solid var(--line); font-size: 0.98rem; line-height: 1.55; }
.pubs b { font-weight: 700; }
.pubs p { margin: 0; }
.pub-title { font-weight: 600; }
.pub-venue { color: var(--muted); font-size: 0.92rem; }
.pub-authors { font-size: 0.92rem; }
.pillar .example { margin-top: 0.7rem; }
.feat { font-size: 0.93rem; color: var(--muted); line-height: 1.45; margin: 0; }

/* Two columns */
.two-col { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; }
.courses { list-style: none; padding: 0; margin: 0; }
.courses li { padding: 0.6rem 0; border-top: 1px solid var(--line); line-height: 1.4; }
.courses li:first-child { border-top: 0; padding-top: 0; }
.courses span { display: block; color: var(--muted); font-size: 0.93rem; }

.prose { max-width: 44rem; }
.muted { color: var(--muted); }

.site-footer { margin-top: 4rem; padding-top: 1.5rem; padding-bottom: 2.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.site-footer p { margin: 0; }

@media (max-width: 960px) { .pillars { grid-template-columns: 1fr; } }

@media (max-width: 760px) {
  section.wrap.hero { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 2rem; }
  .portrait { order: -1; width: 9rem; }
  .pillars, .systems, .two-col { grid-template-columns: 1fr; gap: 1.25rem; }
  .brand { display: none; }
  section.wrap { padding-top: 3rem; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media print {
  .site-header, .skip { display: none; }
  body { font-size: 11pt; }
  .pillar { break-inside: avoid; }
}

/* Accessibility */
.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; }
.ext { font-size: 0.8em; margin-left: 0.15em; text-decoration: none; display: inline-block; }
main:focus { outline: none; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
.statement h2 { font-size: 1.6rem; margin: 0 0 1rem; }
.statement ul { padding-inline-start: 1.25rem; margin: 0 0 1rem; }
.statement li { margin-bottom: 0.3rem; }
.statement .prose h2, .statement .prose h3 { font-size: 1.2rem; margin: 1.6rem 0 0.6rem; }
.statement h1 { font-size: clamp(2rem, 4.6vw, 2.6rem); margin-bottom: 1.25rem; }

@media (max-width: 760px) {
  /* no sideways-scrolling menu and no sticky bar on small or zoomed screens */
  .site-header { position: static; }
  .site-header nav { flex-wrap: wrap; overflow: visible; gap: 0.15rem 1.1rem; padding: 0.6rem 0; }
  .accessibility-page .brand { display: block; }
}
