/* Mark D. McCoy — site stylesheet
   Colours and type in one place. Change a value here and every page follows. */

:root {
  --paper: #F3F4F1;      /* page background */
  --shade: #E9ECE6;      /* shaded band */
  --ink: #1B2228;        /* headings, body */
  --ink-2: #3E4A51;      /* running text */
  --muted: #6E7A80;      /* labels, dates */
  --line: #D8DBD5;       /* rules */
  --lagoon: #0E6B77;     /* links, buttons, accents */
  --lagoon-dark: #0A525B;
  --ochre: #B7791F;      /* eyebrow labels */
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lagoon); text-decoration: none; }
a:hover { color: var(--lagoon-dark); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.2rem; }
li { margin-bottom: 0.35rem; }
strong { font-weight: 600; }

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.wrap.narrow > * { max-width: 72ch; }
.narrow:not(.wrap) { max-width: 72ch; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.eyebrow {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 .5rem;
}
.eyebrow.ochre { color: var(--ochre); }

/* header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; padding: 1.1rem 0; }
.brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .8rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .name { font-family: var(--display); font-weight: 700; font-size: 1.25rem; }
.brand .tag { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.site-header nav { display: flex; flex-wrap: wrap; gap: .25rem 1.6rem; font-weight: 500; font-size: .95rem; }
.site-header nav a { color: var(--ink); padding: .2rem 0; border-bottom: 2px solid transparent; }
.site-header nav a:hover { text-decoration: none; color: var(--lagoon); }
.site-header nav a.current { color: var(--lagoon); border-bottom-color: var(--lagoon); }

/* page title band */
.band { border-bottom: 1px solid var(--line); padding: 3rem 0 2.25rem; }
.band .sub { color: var(--ink-2); font-size: 1.1rem; margin: .6rem 0 0; }

/* hero (home) */
.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem 3rem; align-items: center; padding: 4rem 0 3rem; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 4.4rem); letter-spacing: -0.02em; margin-bottom: 1.25rem; }
.hero .lede { max-width: 40rem; }
.hero-photo { margin: 0; position: relative; justify-self: end; width: min(100%, 420px); }
.hero-photo::after { content: ""; position: absolute; inset: 16px -16px -16px 16px; border: 1.5px solid var(--ochre); border-radius: 4px; z-index: -1; }
.hero-photo img { border-radius: 4px; aspect-ratio: 3 / 4; object-fit: cover; }
.lede { font-size: 1.2rem; line-height: 1.55; color: var(--ink-2); }
.fine { font-size: .92rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 1rem; }
.btn {
  display: inline-flex; align-items: center; height: 48px; padding: 0 1.4rem; border-radius: 4px;
  background: var(--lagoon); color: #fff; font-weight: 600; font-size: .95rem; border: 1.5px solid var(--lagoon);
}
.btn:hover { background: var(--lagoon-dark); border-color: var(--lagoon-dark); color: #fff; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }

/* sections */
.section { padding: 3rem 0; }
.section + .section { border-top: 1px solid var(--line); }
.section.shaded { background: var(--shade); border-top: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1.5rem; }
.section-head a { font-weight: 500; font-size: .95rem; }

/* research tiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.tile { display: block; color: var(--ink); padding-top: 1.4rem; border-top: 3px solid var(--lagoon); }
.tile:hover { text-decoration: none; }
.tile:hover h3 { color: var(--lagoon); }
.tile h3 { margin: .25rem 0 .6rem; }
.tile p:last-child { color: var(--ink-2); margin: 0; }

/* news list */
.news { list-style: none; padding: 0; margin: 0; }
.news li { display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; gap: .35rem 1.5rem; align-items: baseline; padding: 1rem 0; border-top: 1px solid var(--line); margin: 0; }
.news li:last-child { border-bottom: 1px solid var(--line); }
.news .date { font-family: var(--mono); font-size: .82rem; color: var(--muted); white-space: nowrap; }
.news a { color: var(--ink); font-weight: 500; font-size: 1.05rem; }
.news a:hover { color: var(--lagoon); }
.news .outlet { font-size: .88rem; color: var(--muted); }

/* two-column layouts (about, projects) */
.two-col { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 2rem 5rem; align-items: start; }
.prose p { color: var(--ink-2); }
.prose p.lede { color: var(--ink-2); }
.prose h2 { margin: 2.5rem 0 1rem; }
.prose h3 { margin: 1.75rem 0 .4rem; }
.prose h2:first-child { margin-top: 0; }
.facts { display: flex; flex-direction: column; gap: 1.75rem; font-size: .95rem; }
.facts figure { margin: 0; }
.facts figure img { border-radius: 4px; }
.fact { border-top: 3px solid var(--lagoon); padding-top: .9rem; }
.fact.ochre { border-top-color: var(--ochre); }
.fact ul { list-style: none; padding: 0; margin: 0; }
.fact li { margin-bottom: .45rem; color: var(--ink-2); }
ul.plain { list-style: none; padding: 0; }
ul.plain li { padding: .6rem 0; border-top: 1px solid var(--line); color: var(--ink-2); margin: 0; }
ul.plain li:last-child { border-bottom: 1px solid var(--line); }

/* projects */
.project h2 { margin: .25rem 0 1.5rem; max-width: 30ch; }
.project + .project { border-top: 1px solid var(--line); }

/* people */
.person { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.5rem; margin: 1.5rem 0 2rem; }
.person img { width: 120px; border-radius: 4px; }
.person h3 { margin: 0 0 .25rem; }
.person .role { font-weight: 500; color: var(--ink); margin-bottom: .5rem; }

/* publications */
.pubs p { font-size: .97rem; padding: .55rem 0; border-top: 1px solid var(--line); margin: 0; }
.pubs h2 { margin: 2.5rem 0 .75rem; }
.pubs h2:first-child { margin-top: 0; }
.pubs a { word-break: break-word; }
.profiles { font-weight: 500; }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 2.5rem 0 3rem; font-size: .92rem; color: var(--ink-2); }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.site-footer p { margin: 0; line-height: 1.7; }
.site-footer .eyebrow { margin-bottom: .35rem; }

/* responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .hero-photo { justify-self: start; width: min(100%, 360px); order: -1; }
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .tiles { grid-template-columns: 1fr; gap: 1.5rem; }
  .cols-3 { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .news li { grid-template-columns: 1fr; gap: .2rem; }
  .news .outlet::before { content: ""; }
  .person { grid-template-columns: 1fr; }
  .site-header nav { gap: .25rem 1.1rem; font-size: .9rem; }
  .band { padding: 2.25rem 0 1.75rem; }
}
@media (prefers-reduced-motion: no-preference) {
  a, .btn { transition: color .15s, background-color .15s; }
}
@media print {
  .site-header nav, .btn, .skip { display: none; }
  body { background: #fff; }
  a { color: inherit; }
}
