/* ---------- Colors and type: change these to restyle the whole site ---------- */
:root {
  --ink: #1d2733;
  --muted: #5d6b7a;
  --line: #e3e7ec;
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --accent: #1f4e79;       /* links, headings */
  --accent-2: #a3342b;     /* awards, highlights */
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1200px;   /* page width; Google Sites was about this wide */
  --header-bg: rgba(255,255,255,.96);
  --panel: #ffffff;
  --on-accent: #ffffff;
  --accent-hover: #173c5e;
  --hover-soft: #e8edf2;
  --badge-line: #e9c9c5;
  --badge-bg: #fbf3f2;
  --photo-bg: #dfe6ee;
  --net-node: 31, 78, 121;     /* background network: firms and links */
  --net-truck: 163, 52, 43;    /* trucks (material) */
  --net-money: 36, 122, 74;    /* dollar signs (payments) */
  --net-smoke: 120, 132, 145;  /* factory smoke */
  --net-map: 31, 78, 121;      /* world map */
  --net-store: 62, 118, 168;   /* stores: a lighter blue than factories */
  --net-people: 108, 152, 192; /* consumers: the lightest blue */
  color-scheme: light;
}

/* ---------- Dark theme (used when the visitor picks Dark, or picks System and their device is dark) ---------- */
:root[data-theme="dark"] {
  --ink: #e4e9ef;
  --muted: #9aa8b6;
  --line: #2c3742;
  --bg: #12181f;
  --bg-soft: #18212b;
  --accent: #7fb2e5;
  --accent-2: #f08f84;
  --header-bg: rgba(18,24,31,.94);
  --panel: #1c2631;
  --on-accent: #0e1620;
  --accent-hover: #a5c9ee;
  --hover-soft: #24303c;
  --badge-line: #5a2f2b;
  --badge-bg: #2a1c1c;
  --net-node: 127, 178, 229; --net-truck: 240, 143, 132; --net-money: 120, 210, 150; --net-smoke: 160, 172, 185; --net-map: 140, 175, 210; --net-store: 150, 192, 235; --net-people: 175, 208, 240;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e4e9ef;
    --muted: #9aa8b6;
    --line: #2c3742;
    --bg: #12181f;
    --bg-soft: #18212b;
    --accent: #7fb2e5;
    --accent-2: #f08f84;
    --header-bg: rgba(18,24,31,.94);
    --panel: #1c2631;
    --on-accent: #0e1620;
    --accent-hover: #a5c9ee;
    --hover-soft: #24303c;
    --badge-line: #5a2f2b;
    --badge-bg: #2a1c1c;
    --net-node: 127, 178, 229; --net-truck: 240, 143, 132; --net-money: 120, 210, 150; --net-smoke: 160, 172, 185; --net-map: 140, 175, 210; --net-store: 150, 192, 235; --net-people: 175, 208, 240;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16.5px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.site-header .wrap { max-width: var(--max); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.25; color: var(--ink); }
h2 { font-size: 1.75rem; margin: 0 0 1.6rem; padding-bottom: 0; border-bottom: 0; }
h2::after { content: ""; display: block; width: 44px; height: 3px; background: var(--accent); border-radius: 2px; margin-top: .55rem; }
h3 { font-size: 1.12rem; margin: 1.6rem 0 .6rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--header-bg); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.site-nav { display: flex; gap: 1.3rem; }
.site-nav a { color: var(--ink); font-size: .95rem; font-weight: 500; }
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.nav-toggle, .nav-toggle-label { display: none; }
.header-inner { gap: 1.5rem; }
.site-nav { margin-left: auto; align-items: center; }
.theme-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; padding: 0; flex-shrink: 0; }
.theme-btn:hover { color: var(--accent); border-color: var(--accent); }
.theme-btn .ico { width: 16px; height: 16px; }
.header-icons { display: flex; gap: .7rem; }
.header-icons img { width: 24px; height: 24px; object-fit: contain; display: block; }
.header-icons a { color: var(--muted); display: flex; }
.header-icons a:hover { color: var(--accent); }
.header-icons .ico { width: 17px; height: 17px; }

/* Icons (SVG files in assets/icons, colored by the surrounding text color) */
.ico { display: inline-block; width: 1em; height: 1em; background-color: currentColor; vertical-align: -0.125em;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; transition: transform .15s; }
.icon-btn img { width: 30px; height: 30px; object-fit: contain; display: block; }
.icon-btn .ico { width: 28px; height: 28px; }
.icon-btn:hover { transform: translateY(-2px); text-decoration: none; }

/* ---------- Hero ---------- */
.hero { display: flex; gap: 2.6rem; align-items: center; padding: 4rem 0 1.5rem; }
.hero-photo { background: var(--photo-bg); width: 200px; height: 200px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--line); }
.hero h1 { font-size: 2.3rem; margin: 0 0 .3rem; }
.pronouns { font-family: var(--sans); font-size: .95rem; font-weight: 400; color: var(--muted); }
.hero-title { margin: 0 0 .6rem; font-size: 1.05rem; }
.hero-interests { margin: 0 0 1rem; color: var(--muted); font-size: .95rem; }
.hero-links { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.hero-links .btn-primary { padding: .5rem 1rem; display: inline-flex; align-items: center; gap: .4rem; }
.btn { display: inline-block; padding: .32rem .8rem; border: 1px solid var(--line); border-radius: 999px; font-size: .86rem; color: var(--ink); background: var(--bg); }
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }

/* ---------- Sections ---------- */
.section { padding: 3.2rem 0; }
/* Light background band behind every other home-page section, running the full width of the window */
.band { position: relative; }
.band::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); background: var(--bg-soft); z-index: -1; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
body { overflow-x: hidden; }
main { position: relative; z-index: 0; }
.bio { padding-top: 1.2rem; }
.bio p { margin: 0 0 1.25rem; line-height: 1.8; }
.callout { background: var(--bg-soft); border-left: 3px solid var(--accent); padding: .9rem 1.2rem; border-radius: 6px; margin-top: 1.2rem; }
.callout h3 { margin: 0 0 .4rem; font-size: 1rem; }
.callout ul { margin: 0 0 .4rem; padding-left: 1.1rem; }
.callout p { margin: 0; font-size: .92rem; }

.entries { list-style: none; padding: 0; margin: 0; }
.entry { margin-bottom: 1.3rem; }
.entry-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.entry-head h3 { margin: 0; }
.year { color: var(--muted); font-size: .92rem; white-space: nowrap; }
.committee { font-size: .95rem; margin-top: .15rem; }

/* ---------- Papers ---------- */
.papers { padding-left: 1.3rem; margin: 0; }
.paper { margin-bottom: 1.7rem; padding-left: .2rem; }
.paper-title { font-weight: 600; }
.paper-authors, .paper-venue, .paper-status { font-size: .95rem; }
.paper-status { color: var(--muted); font-style: italic; }
.badges { margin-top: .3rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.badge { font-size: .78rem; color: var(--accent-2); border: 1px solid var(--badge-line); background: var(--badge-bg); padding: .08rem .55rem; border-radius: 999px; }
.paper-links { margin-top: .35rem; font-size: .9rem; display: flex; flex-wrap: wrap; gap: .9rem; align-items: baseline; }
.paper-links details { flex-basis: 100%; }
.paper-links summary { cursor: pointer; color: var(--accent); width: max-content; }
.paper-links details p { margin: .4rem 0 0; color: var(--ink); background: var(--bg-soft); padding: .7rem .9rem; border-radius: 6px; font-size: .92rem; }
.paper-links details[open] { margin-top: -.2rem; }

/* ---------- Tools ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1rem 0; }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.card:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 4px 14px rgba(31,78,121,.08); }
.card h3 { margin: 0 0 .4rem; font-size: 1.02rem; }
.card p { margin: 0 0 .6rem; font-size: .9rem; color: var(--muted); flex-grow: 1; }
.card-more { font-size: .88rem; color: var(--accent); }

/* ---------- Talks ---------- */
.talks { columns: 3; column-gap: 2.5rem; }
@media (max-width: 1000px) { .talks { columns: 2; } }
.talk-year { break-inside: avoid; margin-bottom: .8rem; }
.talk-year h3 { margin: 0 0 .3rem; }
.talk-year ul { margin: 0; padding-left: 1.1rem; font-size: .93rem; }

/* ---------- Teaching ---------- */
.inst { margin-bottom: 2rem; }
.inst h3 { font-size: 1.05rem; }
.role { margin: .5rem 0 .2rem; font-weight: 600; font-size: .92rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.courses { list-style: none; padding: 0; margin: 0; }
.courses li { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.terms { color: var(--muted); white-space: nowrap; font-size: .9rem; }

/* ---------- Honors / service ---------- */
.honors { list-style: none; padding: 0; margin: 0; }
.honors li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: .25rem 0; align-items: baseline; }
.service { display: grid; grid-template-columns: 10.5rem 1fr; gap: .5rem 1rem; margin: 0; }
.service dt { font-weight: 600; }
.service dd { margin: 0; }

/* ---------- Inner pages ---------- */
.page-head { padding-top: 2.5rem; }
.page-head h1 { font-size: 2rem; margin: 0 0 .8rem; }
.prose { max-width: 720px; }
.embed { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 1rem; }
.embed iframe { width: 100%; border: 0; display: block; }
.embed-app iframe { height: 85vh; min-height: 640px; }
.embed-pdf iframe { height: 90vh; }
.embed-tableau { display: flex; justify-content: center; margin-bottom: 2rem; overflow-x: auto; }
.resources { padding-left: 1.1rem; margin: 0; }
.resources li { margin: .2rem 0; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 0; border-top: 1px solid var(--line); background: var(--bg-soft); }
.footer-inner { padding: 1.4rem 20px; text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.1rem; font-size: .9rem; }
.footer-icon { color: var(--muted); }
.footer-icon:hover { color: var(--accent); }
.footer-icon .ico { width: 20px; height: 20px; }
.footer-icon img { width: 22px; height: 22px; object-fit: contain; display: block; }
.footer-icon { display: inline-flex; }
.footer-links + .footer-links { margin-top: .6rem; }
.footer-meta { color: var(--muted); font-size: .85rem; margin: .7rem 0 0; }

/* ---------- Phones and small tablets ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .header-icons { display: none; }
  .theme-btn { order: 2; margin-left: auto; }
  .nav-toggle-label { order: 3; }
  .nav-toggle-label { display: block; width: 28px; height: 22px; position: relative; cursor: pointer; }
  .nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after { position: absolute; left: 0; width: 100%; height: 2px; background: var(--ink); content: ""; }
  .nav-toggle-label span { top: 10px; }
  .nav-toggle-label span::before { top: -8px; }
  .nav-toggle-label span::after { top: 8px; }
  .site-nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); }
  .site-nav a { padding: .75rem 20px; border-top: 1px solid var(--line); }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .hero { flex-direction: column; text-align: center; padding-top: 2rem; }
  .hero-photo { width: 150px; height: 150px; }
  .hero h1 { font-size: 1.9rem; }
  .hero-links { justify-content: center; gap: .35rem; }
  .icon-btn { width: 32px; height: 32px; }
  .icon-btn img { width: 27px; height: 27px; }
  .icon-btn .ico { width: 25px; height: 25px; }
  .hero-links .btn-primary { padding: .4rem .8rem; }
  .cards { grid-template-columns: 1fr; }
  .talks { columns: 1; }
  .courses li, .entry-head { flex-direction: column; gap: 0; }
  .honors li { grid-template-columns: 1fr; gap: 0; }
  .honors .year { font-size: .85rem; }
  .service { grid-template-columns: 1fr; }
  .service dd { margin-bottom: .6rem; }
}

/* ---------- Full-page tools (Upstreamness, Value Chain, SC Explorer) ---------- */
.tool-main { height: calc(100vh - 61px); height: calc(100dvh - 61px); }
.tool-stage { position: relative; width: 100%; height: 100%; overflow: hidden; }
.tool-stage iframe { border: 0; display: block; width: 100%; height: 100%; }
.tool-stage iframe.fitted { position: absolute; top: 0; transform-origin: 0 0; }
.tool-stage.scroll { overflow-y: auto; }
.tool-stage.scroll::after { content: ""; display: block; height: var(--fit-h); }

/* ---------- Tools menu in the header ---------- */
.nav-drop { position: relative; }
.nav-drop-btn .caret { font-size: .7em; margin-left: .1rem; }
/* The page the visitor is on is shown as a filled box in the menu */
.site-nav > a.active, .nav-drop.active > .nav-drop-btn { background: var(--accent); color: var(--on-accent); border-radius: 6px; padding: .3rem .7rem; margin: 0 -.35rem; }
.site-nav > a.active:hover, .nav-drop.active > .nav-drop-btn:hover { color: var(--on-accent); }
.nav-drop-menu { display: none; position: absolute; right: 0; top: 100%; padding-top: 12px; min-width: 260px; z-index: 20; }
.nav-drop-menu a { display: block; padding: .55rem 1rem; background: var(--panel); border: 1px solid var(--line); border-top: 0; font-size: .92rem; }
.nav-drop-menu a:first-child { border-top: 1px solid var(--line); border-radius: 8px 8px 0 0; }
.nav-drop-menu a:last-child { border-radius: 0 0 8px 8px; }
.nav-drop-menu a:hover { background: var(--hover-soft); text-decoration: none; }
.nav-drop-menu a.current { color: var(--accent); font-weight: 600; }
.nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu { display: block; }

@media (max-width: 760px) {
  .nav-drop .caret { display: none; }
  .site-nav > a.active, .nav-drop.active > .nav-drop-btn { border-radius: 0; margin: 0; padding: .75rem 20px; }
  .nav-drop-menu { display: block; position: static; padding: 0; min-width: 0; }
  .nav-drop-menu a, .nav-drop-menu a:first-child, .nav-drop-menu a:last-child { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: .65rem 20px .65rem 36px; background: var(--bg-soft); font-size: .9rem; }
  .site-nav .nav-drop > a { display: block; }
}

/* Full-window pages such as the CV */
.frame-fallback { display: none; }
@media (max-width: 760px) {
  .tool-main:has(.frame-fallback) { display: flex; flex-direction: column; }
  .tool-main:has(.frame-fallback) .tool-stage { flex: 1; min-height: 0; height: auto; }
  .frame-fallback { display: block; text-align: center; padding: .6rem; font-size: .9rem; border-bottom: 1px solid var(--line); background: var(--bg-soft); order: -1; }
}

/* Earlier degrees: one compact line each */
.entries-minor { list-style: none; padding: 0; margin: .4rem 0 0; font-size: .92rem; color: var(--muted); }
.entries-minor li { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border-top: 1px dashed var(--line); }

/* Earlier teaching, folded */
.earlier { margin: .5rem 0 1rem; }
.earlier > summary { cursor: pointer; color: var(--accent); font-weight: 500; padding: .5rem 0; width: max-content; }
.earlier[open] > summary { margin-bottom: 1rem; }

/* Contact */
.contact > div { display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; padding: .4rem 0; }
.contact .label { font-weight: 600; color: var(--muted); }
.contact p { margin-top: .8rem; }

@media (max-width: 760px) {
  .section { padding: 2.4rem 0; }
  .entries-minor li { flex-direction: column; gap: 0; }
  .contact > div { grid-template-columns: 1fr; gap: 0; }
}

/* Teaching-assistant lists, folded into one line */
.role-fold { margin: .5rem 0 .2rem; }
.role-fold > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: .4rem; padding: .2rem 0; }
.role-fold > summary::-webkit-details-marker { display: none; }
.role-fold > summary::before { content: "▸"; color: var(--accent); font-size: .85rem; }
.role-fold[open] > summary::before { content: "▾"; }
.role-fold > summary .role { margin: 0; }
.role-fold > summary .muted { font-size: .88rem; }
.talks + .earlier { margin-top: .2rem; }

/* Teaching: one line per institution; click to show its courses */
details.inst { margin: 0; border-top: 1px solid var(--line); }
details.inst:last-of-type { border-bottom: 1px solid var(--line); }
details.inst > summary { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .85rem 0; cursor: pointer; list-style: none; }
details.inst > summary::-webkit-details-marker { display: none; }
details.inst > summary .inst-name { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; color: var(--ink); }
details.inst > summary .inst-name::before { content: "▸"; display: inline-block; width: 1.1rem; color: var(--accent); font-family: var(--sans); font-size: .85rem; transition: transform .15s; }
details.inst[open] > summary .inst-name::before { transform: rotate(90deg); }
details.inst > summary:hover .inst-name { color: var(--accent); }
details.inst .inst-body { padding: 0 0 1rem 1.1rem; }
details.inst .inst-body .role:first-child { margin-top: 0; }
@media (max-width: 760px) { details.inst > summary { flex-direction: column; gap: 0; } }

/* Medium screens: tighten the menu so it fits on one line */
@media (min-width: 941px) and (max-width: 1100px) {
  .site-nav { gap: .85rem; }
  .site-nav a { font-size: .88rem; }
  .header-inner { gap: 1rem; }
}

/* Narrow laptops and tablets: use the phone-style menu so the header never wraps */
@media (min-width: 761px) and (max-width: 940px) {
  .header-icons { display: none; }
  .theme-btn { order: 2; margin-left: auto; }
  .nav-toggle-label { order: 3; }
  .nav-toggle-label { display: block; width: 28px; height: 22px; position: relative; cursor: pointer; }
  .nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after { position: absolute; left: 0; width: 100%; height: 2px; background: var(--ink); content: ""; }
  .nav-toggle-label span { top: 10px; }
  .nav-toggle-label span::before { top: -8px; }
  .nav-toggle-label span::after { top: 8px; }
  .site-nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); }
  .site-nav a { padding: .75rem 20px; border-top: 1px solid var(--line); }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .nav-drop .caret { display: none; }
  .site-nav > a.active, .nav-drop.active > .nav-drop-btn { border-radius: 0; margin: 0; padding: .75rem 20px; }
  .nav-drop-menu { display: block; position: static; padding: 0; min-width: 0; }
  .nav-drop-menu a, .nav-drop-menu a:first-child, .nav-drop-menu a:last-child { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: .65rem 20px .65rem 36px; background: var(--bg-soft); font-size: .9rem; }
  .site-nav .nav-drop > a { display: block; }
}
@media (max-width: 940px) {
  .site-nav { align-items: stretch; margin-left: 0; }
  .site-nav > a, .nav-drop > a { text-align: left; }
}

/* ---------- Top of home page: profile card on the left, introduction on the right ---------- */
.intro { display: grid; grid-template-columns: 270px 1fr; gap: 3.5rem; align-items: start; padding: 3rem 0 2.8rem; }
.profile-card { text-align: center; position: sticky; top: 84px; }
.profile-card .hero-photo { width: 180px; height: 180px; margin: 0 auto 1rem; display: block; }
.profile-card h1 { font-size: 1.75rem; margin: 0; }
.profile-card .pronouns { margin: .1rem 0 .6rem; font-size: .9rem; }
.profile-card .hero-title { font-size: .95rem; line-height: 1.5; margin: 0 0 1rem; }
.profile-card .hero-links { justify-content: center; gap: .35rem; margin-bottom: 1rem; }
.profile-card .cv-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem 1.4rem; margin: 0 0 .8rem; }
.profile-card .icon-btn { width: 30px; height: 30px; }
.profile-card .icon-btn img { width: 26px; height: 26px; }
.profile-card .icon-btn .ico { width: 24px; height: 24px; }
.profile-card .hero-interests { font-size: .85rem; line-height: 1.55; margin: 0; padding-top: .9rem; border-top: 1px solid var(--line); }
.intro-text { padding-top: .2rem; }
.intro-text p:first-child { margin-top: 0; }
.intro-text p { font-size: 1.02rem; }
@media (max-width: 760px) {
  .intro { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 2rem; }
  .profile-card { position: static; }
  .profile-card .hero-photo { width: 140px; height: 140px; }
}
.paper-links details p { max-width: 920px; }   /* keep abstracts at a comfortable reading width */

/* ---------- Supply-network background ---------- */
/* Only behind the first section of the home page, running the full width of the window */
.intro { position: relative; }
#net-bg { position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw); width: 100vw; height: 100%; z-index: -1; pointer-events: none; display: block; }
/* a soft veil behind the introduction so the network never competes with the words */
.intro-text { background: color-mix(in srgb, var(--bg) 35%, transparent); border-radius: 14px; box-shadow: 0 0 30px 16px color-mix(in srgb, var(--bg) 35%, transparent); }

/* Phones: a compact profile card (photo beside the name) so the introduction appears sooner */
@media (max-width: 760px) {
  .profile-card { display: grid; grid-template-columns: 96px 1fr; column-gap: 1rem; row-gap: .15rem; text-align: left; align-items: center; }
  .profile-card .hero-photo { grid-row: 1 / span 3; width: 96px; height: 96px; margin: 0; }
  .profile-card h1 { font-size: 1.4rem; align-self: end; }
  .profile-card .pronouns { margin: 0; }
  .profile-card .hero-title { font-size: .86rem; margin: 0; align-self: start; }
  .profile-card .cv-btn { margin: .8rem 0 0; justify-self: start; }
  .profile-card .hero-links { justify-content: flex-start; margin: .8rem 0 0; }
  .profile-card .hero-interests { grid-column: 1 / -1; margin-top: .8rem; text-align: left; }
  #net-bg { bottom: auto; }
}

/* Keep the name and menu items on one line each. */
.brand, .site-nav, .theme-btn, .header-icons { flex-shrink: 0; }
.brand, .site-nav a { white-space: nowrap; }
