/* João Sedoc — personal site, third draft.
   Follows the NYU Stern faculty page: violet band, black title band, a three-column
   profile (photo and contact / about / links), square corners, violet links, and
   plus-sign accordions for the record sections.
   Publication rows (year chip, title, authors, venue, link) follow stellar.stern.nyu.edu.
   Type: Montserrat stands in for NYU Perstare, used for everything. */

:root {
  --violet: #57068c;
  --violet-deep: #360755;
  --black: #151515;
  --page: #ffffff;
  --panel: #eeeeee;
  --text: #333333;
  --heading: #151515;
  --muted: #515151;
  --faint: #6f6f6f;
  --rule: #d6d6d6;
  --link: #57068c;
  --link-hover: #360755;
  --chip: #ebe5f1;
  --chip-ink: #360755;
  --hit: #ffe9a8;
  --plate: #ffffff;
  --band-ink: #ffffff;
  --band-soft: #cccccc;

  --sans: "Montserrat", "Gotham", Arial, "Nimbus Sans L", sans-serif;
  --mono: var(--sans);   /* small labels and years use the text face; no monospace on the page */
  --ease: cubic-bezier(0.3, 0.6, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #1b1b1d;
    --panel: #29292c;
    --text: #d9d9d9;
    --heading: #f2f2f2;
    --muted: #b5b5b5;
    --faint: #969696;
    --rule: #444448;
    --link: #cfa6ec;
    --link-hover: #e6cff6;
    --chip: #3a2a47;
    --chip-ink: #e2c9f3;
    --hit: #5b4a10;
    --plate: #f5f5f3;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 12px; }
body { margin: 0; background: var(--page); color: var(--text); font: 400 16px/1.75 var(--sans); }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 0.15em; transition: color 120ms var(--ease), background-color 120ms var(--ease); }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
a:active { color: var(--heading); }
:focus-visible { outline: 3px solid #ffc000; outline-offset: 2px; }
::selection { background: var(--hit); color: var(--black); }

.skip { position: absolute; left: 8px; top: -80px; z-index: 9; background: var(--black); color: #ffc000; padding: 8px 12px; font-weight: 700; }
.skip:focus { top: 8px; color: #ffc000; }

.inner {
  max-width: 1280px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ---------- bands ---------- */

.band-violet { background: var(--violet); color: var(--band-ink); }
.band-violet .inner { display: flex; align-items: stretch; flex-wrap: wrap; }
.wordmark {
  display: flex; align-items: center; padding: 22px 28px 22px 0;
  color: var(--band-ink); text-decoration: none;
  font-weight: 700; font-size: 20px; letter-spacing: 0.02em;
}
.wordmark span { font-weight: 400; margin: 0 8px; opacity: 0.6; }
.wordmark:hover { color: var(--band-ink); text-decoration: underline; }
.band-violet nav { display: flex; flex-wrap: wrap; }
.band-violet nav a {
  display: flex; flex-direction: column; justify-content: center;
  padding: 14px 22px; border-left: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--band-ink); text-decoration: none; font-size: 14px; font-weight: 600; line-height: 1.35;
}
.band-violet nav a:hover { background: var(--violet-deep); color: var(--band-ink); }
.band-violet nav a:active { background: var(--black); }

.band-black { background: var(--black); color: var(--band-ink); padding: 22px 0 20px; }
.band-black h1 { font-size: 28px; line-height: 1.25; font-weight: 700; }
.band-black h1 span { font-weight: 400; color: var(--band-soft); }
.band-black .crumb { margin-top: 26px; font-size: 13px; color: var(--band-soft); }
.band-black .crumb a { color: var(--band-soft); text-decoration: none; }
.band-black .crumb a:hover { color: var(--band-ink); text-decoration: underline; }

/* ---------- profile ---------- */

.profile {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr);
  column-gap: 32px;
  padding-top: 20px;
}
.who-photo { width: 100%; }
.who-card { background: var(--panel); padding: 28px 32px 30px; }
.who-card .name { font-size: 20px; font-weight: 700; color: var(--link); line-height: 1.3; }
.who-card .title { margin-top: 10px; padding-left: 12px; font-size: 14px; line-height: 1.45; color: var(--link); text-indent: -12px; }
.who-card .joined { margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--muted); }
.contact { margin-top: 20px; border: 1px solid var(--heading); padding: 20px; font-size: 15px; line-height: 1.5; }
.contact svg { display: block; width: 46px; height: 30px; margin-bottom: 12px; stroke: var(--link); fill: none; stroke-width: 2; }
.contact .mail { user-select: all; color: var(--link); text-decoration: underline; word-break: break-all; }
.contact .place { margin-top: 8px; font-weight: 700; color: var(--heading); }
.contact .addr { margin-top: 4px; font-size: 14px; color: var(--muted); }

h2 { font-size: 24px; line-height: 1.33; font-weight: 700; color: var(--heading); }
.about p { margin-top: 20px; }
.about strong { font-weight: 700; color: var(--heading); }
.side li { margin-top: 14px; line-height: 1.5; }
.side li a { text-decoration: none; }
.side li a:hover { text-decoration: underline; }
.side .src { display: block; font-size: 13px; color: var(--faint); }

/* ---------- research ---------- */

.block { padding-top: 56px; }
.block > .lead { margin-top: 8px; max-width: 46em; }
.jump { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 15px; }
.jump a { padding-right: 14px; margin-right: 14px; border-right: 1px solid var(--rule); line-height: 1.3; }
.jump a:last-child { border-right: 0; }
.jump .n { font: 400 12px/1 var(--mono); color: var(--faint); margin-left: 4px; }

.topic {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 32px;
  margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--rule);
}
.topic h3 { font-size: 20px; line-height: 1.4; font-weight: 700; color: var(--link); }
.topic .blurb { margin-top: 10px; max-width: 44em; }
.topic-figs { display: flex; flex-direction: column; gap: 20px; }
.fig .plate { background: var(--plate); border: 1px solid var(--rule); padding: 12px; }
.fig .plate img { margin: 0 auto; max-height: 400px; width: auto; }
.fig.shot .plate { padding: 0; }
.fig.shot .plate img { max-height: none; width: 100%; }
.fig figcaption { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.fig figcaption b { font-weight: 700; color: var(--heading); }
.fig-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }

/* publication rows, after the STELLAR site */
.prow { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 14px; padding: 13px 0; border-top: 1px solid var(--rule); }
.plist { margin-top: 18px; }
.plist .prow:last-child { border-bottom: 1px solid var(--rule); }
.yr { align-self: start; margin-top: 3px; background: var(--chip); color: var(--chip-ink); font: 600 12.5px/1 var(--mono); font-variant-numeric: tabular-nums; padding: 5px 0; text-align: center; }
.yr.soft { background: var(--panel); color: var(--muted); font-size: 11.5px; font-weight: 500; }
.prow .t { font-size: 15px; line-height: 1.45; font-weight: 600; color: var(--heading); }
.prow .a { margin-top: 2px; font-size: 13.5px; line-height: 1.5; color: var(--faint); }
.prow .a .me { color: var(--text); font-weight: 600; }
.prow .a .stu { border-bottom: 2px dotted var(--faint); }
.prow .v { margin-top: 1px; font-size: 13.5px; line-height: 1.5; color: var(--link); font-weight: 500; }
.prow .v .honor { color: var(--heading); font-weight: 700; }
.prow .l { margin-top: 1px; font-size: 13px; font-weight: 600; }
.prow .l a { text-decoration: none; }
.prow .l a:hover { text-decoration: underline; }
.prow .note { margin-top: 1px; font-size: 12.5px; line-height: 1.5; color: var(--faint); }
.prow mark { background: var(--hit); color: var(--black); }
.tag { display: inline-block; margin-left: 6px; font: 500 11.5px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.04em; color: var(--faint); }

.btn {
  appearance: none; cursor: pointer; margin-top: 14px;
  border: 1px solid var(--heading); background: transparent; color: var(--heading);
  padding: 10px 18px; font: 500 14px/1.2 var(--sans);
  transition: background-color 120ms var(--ease), color 120ms var(--ease);
}
.btn:hover { background: var(--heading); color: var(--page); }
.btn:active { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn:disabled { border-color: var(--rule); color: var(--faint); cursor: default; background: transparent; }

/* ---------- all publications ---------- */

.tools { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 0; align-items: stretch; border-bottom: 1px solid var(--heading); }
.tab {
  appearance: none; cursor: pointer; border: 0; background: transparent; color: var(--link);
  padding: 10px 16px; font: 600 14px/1.3 var(--sans);
  transition: background-color 120ms var(--ease), color 120ms var(--ease);
}
.tab .ct { margin-left: 6px; font: 400 12px/1 var(--mono); opacity: 0.8; }
.tab:hover { background: var(--panel); }
.tab:active { background: var(--chip); }
.tab[aria-pressed="true"] { background: var(--heading); color: var(--page); }
.tab:disabled { color: var(--faint); cursor: not-allowed; }
.search { position: relative; flex: 1 1 220px; max-width: 300px; margin-left: auto; align-self: center; }
.search input {
  width: 100%; border: 1px solid var(--faint); border-radius: 0; background: var(--page); color: var(--text);
  padding: 7px 30px 7px 10px; font: 400 14px/1.4 var(--sans);
}
.search input::placeholder { color: var(--faint); }
.search input:hover { border-color: var(--heading); }
.search input:focus-visible { outline: 3px solid #ffc000; outline-offset: 0; border-color: var(--heading); }
.search button { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; }
.search button:hover { background: var(--panel); color: var(--heading); }
.search button:active { background: var(--chip); }
.status { margin-top: 10px; font-size: 13.5px; color: var(--muted); min-height: 24px; }
.status .key { border-bottom: 2px dotted var(--faint); }
.linkbtn, .more { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: var(--link); text-decoration: underline; }
.linkbtn:hover, .more:hover { color: var(--link-hover); }
.linkbtn:active, .more:active { color: var(--heading); }
.empty { padding: 20px 0; }

/* ---------- accordions, after the Stern faculty page ---------- */

.acc-tools { margin-top: 14px; font-size: 16px; }
.acc-tools span { margin: 0 14px; color: var(--muted); }
.acc-box { margin-top: 16px; border: 1px solid var(--rule); padding: 8px 20px 20px; }
.acc { border-bottom: 1px solid var(--faint); }
.acc > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 20px;
  padding: 26px 18px;
  font-size: 16px; font-weight: 700; color: var(--link);
  transition: background-color 120ms var(--ease);
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::before {
  content: ""; flex: none; width: 28px; height: 28px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 4px no-repeat,
    linear-gradient(currentColor, currentColor) center / 4px 100% no-repeat;
}
.acc[open] > summary::before { background: linear-gradient(currentColor, currentColor) center / 100% 4px no-repeat; }
.acc > summary:hover { background: var(--panel); }
.acc > summary:active { color: var(--link-hover); }
.acc > summary .ct { font: 400 13px/1 var(--mono); color: var(--faint); }
.acc-body { padding: 4px 18px 30px 66px; }

.group { margin-top: 26px; }
.group:first-child { margin-top: 0; }
.group > h3, .two h3 { font-size: 16px; line-height: 1.5; font-weight: 700; color: var(--heading); }
.group > h3 .ct { font: 400 12.5px/1 var(--mono); color: var(--faint); margin-left: 8px; }
.group > p { margin-top: 4px; font-size: 14.5px; color: var(--muted); max-width: 46em; }

.rows { margin-top: 8px; }
.rows li { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); column-gap: 20px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 15px; line-height: 1.55; }
.rows .who { font-weight: 600; color: var(--heading); }
.rows .what i { color: var(--heading); }
.rows .meta { display: block; font-size: 13px; color: var(--faint); }
.role { display: inline-block; margin-right: 8px; background: var(--chip); color: var(--chip-ink); font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.04em; padding: 4px 6px; vertical-align: 1px; }

.names { margin-top: 8px; columns: 4; column-gap: 24px; font-size: 15px; line-height: 1.5; }
.names li { break-inside: avoid; padding: 2px 0; }
.names .at { font: 400 11.5px/1 var(--mono); color: var(--faint); margin-left: 5px; }
.plink { appearance: none; cursor: pointer; margin-left: 6px; border: 0; background: var(--chip); color: var(--chip-ink); padding: 3px 6px; font: 500 11.5px/1 var(--mono); white-space: nowrap; transition: background-color 120ms var(--ease), color 120ms var(--ease); }
.plink:hover { background: var(--violet); color: #fff; }
.plink:active { background: var(--black); color: #fff; }

.draft { margin-top: 28px; background: var(--panel); padding: 18px 20px 22px; }
.draft .flag { font: 500 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.04em; color: var(--heading); }
.draft .flag + p { margin-top: 4px; font-size: 14px; color: var(--muted); max-width: 56em; }
.draft .group { margin-top: 20px; }

.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 40px; }
.two h3 { margin-top: 18px; }
.two > div > h3:first-child { margin-top: 0; }
.rec { margin-top: 6px; }
.rec li { padding: 8px 0; border-top: 1px solid var(--rule); font-size: 15px; line-height: 1.5; }
.rec .sub { display: block; font-size: 13px; color: var(--faint); }
.rec .yr2 { font: 400 12.5px/1.5 var(--mono); color: var(--faint); }

.teach { width: 100%; border-collapse: collapse; font-size: 15px; }
.teach th { text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); padding: 0 14px 6px 0; }
.teach td { padding: 9px 14px 9px 0; border-top: 1px solid var(--rule); vertical-align: top; line-height: 1.5; }
.teach td:first-child { font-weight: 600; color: var(--heading); }
.teach td:last-child { font: 400 12.5px/1.8 var(--mono); color: var(--muted); padding-right: 0; }
.scroll-x { overflow-x: auto; }

.talks li { display: grid; grid-template-columns: 86px minmax(0, 1fr); column-gap: 12px; padding: 7px 0; border-top: 1px solid var(--rule); font-size: 15px; line-height: 1.5; }
.talks .d { font: 400 12.5px/1.8 var(--mono); color: var(--faint); }
.talks .h { color: var(--muted); }
.plain-note { margin-top: 14px; font-size: 14.5px; }

/* ---------- footer ---------- */

.foot { margin-top: 64px; background: var(--black); color: var(--band-soft); padding: 28px 0 44px; font-size: 14px; }
.foot .links { display: flex; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid #555; }
.foot .links a { color: var(--band-soft); text-decoration: none; padding-right: 20px; margin-right: 20px; border-right: 1px solid #777; line-height: 1.2; margin-bottom: 8px; }
.foot .links a:last-child { border-right: 0; }
.foot .links a:hover { color: #fff; text-decoration: underline; }
.foot p { margin-top: 18px; max-width: 60em; line-height: 1.6; }
.foot .sel { user-select: all; color: #fff; }

/* ---------- small screens ---------- */

@media (max-width: 1000px) {
  .profile { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
  .profile .side { grid-column: 1 / -1; margin-top: 36px; }
}
@media (max-width: 760px) {
  .wordmark { padding: 14px 0; width: 100%; }
  .band-violet nav { width: 100%; border-top: 1px solid rgba(255, 255, 255, 0.22); }
  .band-violet nav a { padding: 10px 14px 10px 0; border-left: 0; margin-right: 6px; }
  .profile, .topic, .two { grid-template-columns: minmax(0, 1fr); }
  .who-photo { max-width: 260px; }
  .who-card { max-width: 260px; }
  .about { margin-top: 32px; }
  .topic-figs { order: 2; margin-top: 22px; }
  .names { columns: 2; }
  .rows li, .talks li { grid-template-columns: minmax(0, 1fr); }
  .acc > summary { padding: 20px 4px; gap: 14px; }
  .acc-body { padding: 0 4px 24px; }
  .acc-box { padding: 4px 12px 12px; }
  .search { max-width: none; flex-basis: 100%; margin: 8px 0; }
  .tab { padding: 9px 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0ms !important; } }
@media print { .band-violet nav, .tools, .skip, .plink, .btn, .acc-tools { display: none; } }
