/* robertszafron.com
   Palette follows the event display on the home page:
   amber for collinear radiation, blue for soft radiation, navy for the detector. */
@import url("fonts.css");

:root {
  --ink: #0c1b2e;
  --ink-2: #16283f;
  --paper: #f7f9fb;
  --white: #ffffff;
  --line: #d8e0e8;
  --muted: #55657a;
  --blue: #1f4fd8;
  --sky: #86b4ff;
  --amber: #f0a92b;
  --amber-deep: #a86a00;
  --teal: #12897d;
  --serif: "STIX Two Text", "STIX Two", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  --measure: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, canvas { max-width: 100%; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
sup, sub { line-height: 0; }

.wrap { width: 100%; max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); color: var(--ink); padding: 10px 14px; z-index: 20; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.masthead { background: var(--ink); color: var(--white); position: relative; overflow: hidden; isolation: isolate; }
.masthead canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.bar { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding-top: 26px; padding-bottom: 8px; }
.name { font-family: var(--serif); font-size: 22px; color: var(--white); text-decoration: none; letter-spacing: 0; white-space: nowrap; }
.nav { display: flex; gap: clamp(16px, 3vw, 36px); flex-wrap: wrap; }
.nav a { color: #dbe5f1; text-decoration: none; font-size: 16px; padding: 6px 0; border-bottom: 2px solid transparent; text-shadow: 0 0 6px var(--ink), 0 0 12px var(--ink), 0 0 2px var(--ink); }
.nav a:hover { color: var(--white); border-bottom-color: #5b6f8a; }
.nav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--amber); }

/* home hero */
.hero { min-height: min(86vh, 760px); display: flex; flex-direction: column; }
.hero-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: 48px; padding-bottom: 96px; }
.hero h1 { font-size: clamp(52px, 8.2vw, 112px); font-weight: 400; letter-spacing: -0.025em; line-height: 0.98; max-width: 9ch; }
.hero .lede { font-family: var(--serif); font-size: clamp(20px, 2.1vw, 26px); line-height: 1.4; max-width: 30ch; margin: 28px 0 0; color: #e4ebf4; }
.hero .where { margin: 22px 0 0; color: #a9bad0; font-size: 16px; max-width: 34ch; }
.hero-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn { display: inline-block; padding: 11px 20px; border-radius: 999px; font-size: 16px; font-weight: 600; text-decoration: none; border: 1.5px solid transparent; }
.btn-solid { background: var(--amber); color: var(--ink); }
.btn-solid:hover { background: #ffc04d; }
.btn-line { color: var(--white); border-color: #5b6f8a; }
.btn-line:hover { border-color: var(--white); }
.key { position: absolute; right: var(--gutter); bottom: 22px; margin: 0; display: flex; gap: 22px; flex-wrap: wrap; font-size: 14px; color: #a9bad0; list-style: none; padding: 0; }
.key li { display: flex; align-items: center; gap: 8px; }
.key i { display: inline-block; width: 22px; height: 2px; border-radius: 2px; }
.key .k-hard i { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.key .k-coll i { background: var(--amber); }
.key .k-soft i { background: var(--sky); }

/* inner page header */
.pagehead { padding-top: 56px; padding-bottom: 60px; }
.pagehead h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 400; letter-spacing: -0.02em; }
.pagehead p { font-family: var(--serif); font-size: clamp(18px, 1.8vw, 21px); color: #d5deea; max-width: 46ch; margin: 16px 0 0; line-height: 1.45; }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section.tint { background: var(--white); }
.section h2 { font-size: clamp(30px, 3.6vw, 44px); margin-bottom: 22px; }
.head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 26px; }
.head-row h2 { margin: 0; }
.more { font-weight: 600; white-space: nowrap; }
.prose { font-family: var(--serif); font-size: 20px; line-height: 1.6; max-width: 64ch; }
.prose p { margin-bottom: 1.05em; }
.sub { color: var(--muted); max-width: 60ch; }

.about { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(240px, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.facts { margin: 6px 0 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.facts li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts .yr { display: block; color: var(--muted); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.facts strong { font-weight: 600; }
.profiles { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; font-weight: 600; }

/* ---------- energy scale ---------- */
.scale-scroll { overflow-x: auto; margin: 30px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter) 8px; }
.scale { display: block; width: 100%; min-width: 900px; height: auto; font-family: var(--sans); }
.scale .band rect { fill: #e9eef7; stroke: var(--ink); stroke-width: 1.2; transition: fill .15s; }
.scale .band text { fill: var(--ink); font-size: 17px; font-weight: 600; }
.scale a.band:hover rect, .scale a.band:focus-visible rect { fill: #ffd98a; }
.scale a.band.on rect { fill: var(--amber); }
.scale .hit { fill: transparent; }
.scale a.eft { cursor: pointer; }
.scale a.eft:hover path, .scale a.eft.on path { stroke-width: 3; }
.scale a.eft.on text { font-weight: 700; }
.scale a:focus { outline: none; }
.scale a:focus-visible rect { stroke: var(--amber-deep); stroke-width: 3; }
.scale a.band { cursor: pointer; }
.scale .axis { stroke: var(--ink); stroke-width: 1.5; }
.scale .tick { stroke: var(--ink); stroke-width: 1; }
.scale .unit { font-size: 15.5px; fill: var(--ink); font-variant-numeric: tabular-nums; }
.scale .mark line { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }
.scale .mark circle { fill: var(--ink); }
.scale .mark text { font-size: 15px; fill: var(--muted); }
.scale .mark .v { fill: var(--ink); font-weight: 600; }
.scale .eft path { fill: none; stroke: var(--amber-deep); stroke-width: 1.5; }
.scale .eft text { fill: var(--amber-deep); font-family: var(--serif); font-style: italic; font-size: 19px; }

.scroll-hint { display: none; font-size: 14.5px; color: var(--muted); margin: 14px 0 0; }

.areas { margin-top: 26px; }
.area { margin-top: 34px; scroll-margin-top: 20px; }
.area h3 { font-size: 28px; }
.area .head-row { margin-bottom: 16px; }

/* ---------- lists of papers ---------- */
.pubs { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.pub { padding: 18px 0 17px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 20px; }
.pub .y { color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 3px; font-size: 15.5px; }
.pub h3 { font-size: 20.5px; line-height: 1.3; letter-spacing: 0; }
.pub h3 a { color: var(--ink); text-decoration: none; }
.pub h3 a:hover { color: var(--blue); text-decoration: underline; }
.pub .au { margin: 5px 0 0; color: var(--muted); font-size: 15.5px; }
.pub .au b { color: var(--ink); font-weight: 600; }
.pub .ref { margin: 4px 0 0; font-size: 15px; display: flex; flex-wrap: wrap; gap: 2px 16px; color: var(--ink); }
.pub .ref a { white-space: nowrap; }
.yearhead { font-family: var(--serif); font-size: 28px; margin: 0 0 12px; }
[data-group] + [data-group] { margin-top: 52px; }
.pub.flat { grid-template-columns: minmax(0, 1fr); }

.tools { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-bottom: 34px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab { font: inherit; font-size: 15.5px; font-weight: 600; padding: 8px 15px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer; }
.tab:hover { border-color: var(--ink); }
.tab[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.tab span { font-weight: 400; opacity: .7; margin-left: 4px; font-variant-numeric: tabular-nums; }
.search { flex: 1 1 240px; max-width: 380px; font: inherit; font-size: 16px; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink); }
.search:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(240, 169, 43, .45); }
.empty { color: var(--muted); padding: 24px 0; }
[hidden] { display: none !important; }

/* ---------- talks ---------- */
.deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px 24px; list-style: none; margin: 0; padding: 0; }
.deck a { color: var(--ink); text-decoration: none; display: block; }
.deck .slide, .talk .slide { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: 6px; }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.deck a:hover .slide, .talk a:hover .slide { border-color: var(--ink); }
.deck h3 { font-size: 19px; line-height: 1.3; margin-top: 13px; letter-spacing: 0; }
.deck a:hover h3 { color: var(--blue); }
.deck p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

.talks { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.talk { display: grid; grid-template-columns: 64px 168px minmax(0, 1fr); gap: 4px 22px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
.talk .y { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 15.5px; padding-top: 3px; }
.talk .noslide { display: block; }
.talk h3 { font-size: 20.5px; line-height: 1.3; letter-spacing: 0; }
.talk .ev { margin: 5px 0 0; color: var(--muted); font-size: 15.5px; }
.talk .ev b { color: var(--ink); font-weight: 600; }
.talk .ref { margin: 5px 0 0; font-size: 15px; display: flex; flex-wrap: wrap; gap: 2px 16px; }
.pill { font-size: 13px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: #e9eef7; color: var(--ink-2); margin-left: 8px; white-space: nowrap; vertical-align: 2px; }

/* ---------- research ---------- */
.topic { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.topic h2 { font-size: clamp(28px, 3.2vw, 38px); margin-bottom: 18px; }
.figs { position: sticky; top: 24px; display: grid; gap: 26px; }
.fig { margin: 0; }
.fig svg { display: block; width: 100%; height: auto; background: var(--white); border: 1px solid var(--line); border-radius: 8px; }
.tint .fig svg { background: var(--paper); }
.fig figcaption { font-size: 14.5px; color: var(--muted); margin-top: 10px; line-height: 1.45; }
.keypapers { margin-top: 26px; }
.keypapers h3 { font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-bottom: 4px; }
.keypapers ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.keypapers li { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.4; }
.keypapers a { color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 18px; }
.keypapers a:hover { color: var(--blue); text-decoration: underline; }
.keypapers span { color: var(--muted); display: block; font-size: 14.5px; margin-top: 2px; }
.d-ink { stroke: #0c1b2e; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.d-soft { stroke: #1f4fd8; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.d-coll { stroke: #c98200; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.d-thin { stroke: #55657a; fill: none; stroke-width: 1; }
.d-fill { fill: #0c1b2e; }
.d-t { font-family: var(--serif); font-style: italic; font-size: 17px; fill: #0c1b2e; }
.d-s { font-family: var(--sans); font-size: 12.5px; fill: #55657a; }
.d-ts { fill: #1f4fd8; } .d-tc { fill: #a86a00; }

/* ---------- CV ---------- */
.cv-row { display: grid; grid-template-columns: minmax(150px, 250px) minmax(0, 1fr); gap: 12px clamp(24px, 5vw, 72px); padding: 44px 0; border-top: 1px solid var(--line); }
.cv-row:first-child { border-top: 0; padding-top: 0; }
.cv-row h2 { font-size: 28px; }
.cv-row h3 { font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin: 26px 0 6px; }
.cv-row h3:first-child { margin-top: 4px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 2px 20px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rows li:last-child { border-bottom: 0; }
.rows .when { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 15.5px; padding-top: 1px; }
.rows strong { font-weight: 600; }
.rows .note { color: var(--muted); display: block; font-size: 15.5px; }
.plain { margin: 0; padding-left: 20px; }
.plain li { margin-bottom: 5px; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #c9d6e6; padding: 64px 0 36px; }
.foot a { color: var(--white); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px clamp(24px, 5vw, 72px); }
.foot h2 { font-size: 30px; color: var(--white); margin-bottom: 12px; }
.foot h3 { font-family: var(--sans); font-size: 15px; font-weight: 600; color: #8ea2bb; letter-spacing: 0; margin-bottom: 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 7px; }
.foot address { font-style: normal; line-height: 1.6; }
.legal { margin-top: 48px; padding-top: 20px; border-top: 1px solid #2a3d57; font-size: 14.5px; color: #8ea2bb; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .about, .topic, .foot-grid { grid-template-columns: 1fr; }
  .figs { position: static; max-width: 420px; }
  .cv-row { grid-template-columns: 1fr; padding: 34px 0; }
  .talk { grid-template-columns: 52px minmax(0, 1fr); }
  .talk .shot { grid-column: 2; grid-row: 2; max-width: 240px; margin-top: 8px; }
  .talk .noslide { display: none; }
  .hero { min-height: 0; }
  .hero-body { padding-top: 40px; padding-bottom: 420px; }
  .masthead:not(.hero) canvas { opacity: .5; }
  .scroll-hint { display: block; }
  .key { left: var(--gutter); right: auto; gap: 14px; font-size: 13px; }
}
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .bar { flex-direction: column; gap: 6px; }
  .pub { grid-template-columns: 1fr; }
  .pub .y { padding: 0; font-size: 14.5px; }
  .rows li { grid-template-columns: 1fr; }
  .prose { font-size: 18.5px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .masthead canvas, .key, .tools, .nav { display: none; }
  .masthead, .foot { background: none; color: #000; }
  .name, .pagehead p, .foot a, .foot h2 { color: #000; }
}
