/* ==========================================================================
   elisadamico.net
   Colors and fonts are set once here and reused everywhere below.
   ========================================================================== */

:root {
  --black: #070707;
  --band: #161616;
  --surface: #2d2b2a;
  --surface-raised: #383533;
  --rule: #4b4745;
  --text: #c4c0bc;
  --text-strong: #ffffff;
  --text-muted: #9a9591;
  --accent: #ff8f8a;
  --font-head: "Jost", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Nunito Sans", "Helvetica Neue", Arial, sans-serif;
  --width: 1080px;
  --width-narrow: 880px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--band);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--text-strong); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
a:focus-visible,
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Links inside page content use the accent color. */
main a { color: var(--accent); }
[id] { scroll-margin-top: 5rem; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--text-strong);
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h2 { font-size: 1.75rem; font-weight: 700; }
h3 { font-size: 1.4rem; font-weight: 600; }
h4 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 1.1em; }
strong { color: #e4e1de; font-weight: 700; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.25rem 0; }

.container {
  width: 100%;
  max-width: var(--width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container.narrow { max-width: var(--width-narrow); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  color: #000;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.masthead {
  background: var(--black);
  text-align: center;
  padding: 3.25rem var(--gutter) 0.75rem;
}

.site-title {
  font-family: var(--font-head);
  font-size: clamp(2.1rem, 5vw, 2.9rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
}
.site-title a { color: var(--text-strong); }
.site-title a:hover { text-decoration: none; }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--black);
  border-bottom: 1px solid #222;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1rem;
}

.nav-list,
.sub-list { list-style: none; margin: 0; padding: 0; }

.nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.5rem;
  padding: 0.6rem var(--gutter) 0.9rem;
}

.nav-list a,
.sub-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  color: #d8d5d2;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  font: inherit;
  cursor: pointer;
}
.nav-list a:hover,
.sub-toggle:hover { color: #fff; text-decoration: none; border-bottom-color: #555; }
.nav-list a[aria-current="page"],
.sub-toggle.is-current { color: #fff; border-bottom-color: var(--accent); }

.caret { transition: transform 0.15s ease; }
.sub-toggle[aria-expanded="true"] .caret { transform: rotate(180deg); }

.has-sub { position: relative; }

.sub-list {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 13rem;
  padding: 0.4rem;
  background: #111;
  border: 1px solid #2c2c2c;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}
.sub-list a { display: flex; border-bottom: 0; padding: 0.55rem 0.8rem; white-space: nowrap; }
.sub-list a:hover { background: #1f1f1f; }
.sub-list a[aria-current="page"] { background: #242424; }

.sub-toggle[aria-expanded="true"] + .sub-list,
.has-sub:hover .sub-list,
html:not(.js) .has-sub:focus-within .sub-list { display: block; }

.nav-toggle { display: none; }

@media (max-width: 760px) {
  .masthead { padding-top: 2rem; padding-bottom: 0.5rem; }

  .js .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.8rem var(--gutter);
    background: none;
    border: 0;
    color: #fff;
    font: inherit;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.9rem;
    cursor: pointer;
  }
  .nav-toggle-bars,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    content: "";
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before { position: absolute; top: -6px; }
  .nav-toggle-bars::after { position: absolute; top: 6px; }

  .js .nav-list { display: none; }
  .js .site-nav.is-open .nav-list { display: flex; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 var(--gutter) 1rem;
    max-height: calc(100vh - 3.5rem);
    overflow-y: auto;
  }
  .nav-list a,
  .sub-toggle {
    width: 100%;
    justify-content: center;
    padding: 0.7rem 0.5rem;
    border-bottom: 1px solid #1d1d1d;
  }
  .nav-list a[aria-current="page"],
  .sub-toggle.is-current { border-bottom-color: #1d1d1d; background: #181818; }

  /* On small screens the group pages are simply listed, no dropdown. */
  .sub-toggle { cursor: default; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
  .sub-toggle .caret { display: none; }
  .sub-list,
  .has-sub:hover .sub-list {
    display: block;
    position: static;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }
  .sub-list a { justify-content: center; white-space: normal; }
}

/* --------------------------------------------------------------------------
   Page sections
   -------------------------------------------------------------------------- */

.page-title {
  background: var(--band);
  text-align: center;
  padding: 1.4rem var(--gutter);
}
.page-title h1,
.page-title h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.section { background: var(--surface); padding: clamp(2rem, 5vw, 3.5rem) 0; }
.section + .page-title { margin-top: 1rem; }
.section + .section { margin-top: 1rem; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.split.center { align-items: center; }
.split.wide-left { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }

@media (max-width: 820px) {
  .split,
  .split.wide-left { grid-template-columns: minmax(0, 1fr); }
}

.prose > :last-child,
.split > div > :last-child { margin-bottom: 0; }

.prose ul { padding-left: 1.15rem; margin: 0 0 1.5rem; }
.prose li { margin-bottom: 0.85rem; }
.prose li::marker { color: var(--text-muted); }
.prose li > p { margin: 0; }
.prose h2 { text-transform: uppercase; margin-top: 0; }
.prose h3 { font-style: italic; margin-top: 2.25rem; }
.prose h2 + ul,
.prose h3 + ul { margin-top: 1rem; }
.prose .plain-heads h3 { font-style: normal; }
.prose h2.no-caps { text-transform: none; }
.section h1 { font-size: 1.75rem; font-weight: 700; }

.prose > :first-child,
.prose .plain-heads > :first-child { margin-top: 0; }

blockquote.twitter-tweet {
  max-width: 560px;
  margin: 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--rule);
  background: var(--surface-raised);
}

.note { font-style: italic; font-weight: 700; color: #e4e1de; }

.bw { filter: grayscale(1); }
.kicker { font-family: var(--font-head); font-weight: 500; color: #e4e1de; line-height: 1.5; margin-top: -0.4rem; }
.prose > img { margin-bottom: 1.75rem; }

.media-center { display: flex; justify-content: center; margin-top: 2.5rem; }
.media-center .twitter-tweet { margin: 0 auto !important; }

/* Buttons ------------------------------------------------------------------ */

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: #fff;
  color: #0a0a0a;
  border: 2px solid #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.3;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: transparent; color: #fff; text-decoration: none; }
main a.btn { color: #0a0a0a; }
main a.btn:hover { color: #fff; }
main a.btn-outline { color: #fff; }
main a.btn-outline:hover { color: #0a0a0a; }

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: #5a5653;
  text-transform: none;
  letter-spacing: 0;
}
.btn-outline:hover { border-color: #fff; background: #fff; color: #0a0a0a; }

/* Teaching ----------------------------------------------------------------- */

.entry { padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--rule); }
.entry:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.entry h3 { font-size: 1.2rem; font-weight: 600; font-style: normal; margin: 0 0 0.9rem; }
.entry p { margin-bottom: 0.9rem; }

.side-heading { font-size: 1.35rem; margin: 0.5rem 0 0.4rem; }
.side-note { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.25rem; }
.prose h3.syllabus-level {
  font-family: var(--font-head);
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 1.5rem 0 0.5rem;
}
.prose .syllabus-list { list-style: none; padding: 0; margin: 0 0 0.5rem; }
.prose .syllabus-list li { margin: 0 0 0.6rem; }
.syllabus-list a {
  display: block;
  padding: 0.8rem 2.6rem 0.8rem 1rem;
  border: 1px solid var(--rule);
  background: var(--surface-raised);
  position: relative;
  line-height: 1.35;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.syllabus-list a::after {
  content: "PDF";
  position: absolute;
  right: 0.8rem;
  top: 0.9rem;
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.syllabus-list a:hover { border-color: var(--accent); background: #403d3a; text-decoration: none; }
.syllabus-title { display: block; font-family: var(--font-head); font-weight: 500; color: #fff; }
.syllabus-meta { display: block; margin-top: 0.25rem; font-size: 0.85rem; color: var(--text-muted); }

.portrait { max-width: 230px; margin: 0 auto 2rem; }

/* Lists with a year column --------------------------------------------------- */

.prose .yearlist { list-style: none; padding: 0; margin: 1rem 0 1.75rem; }
.yearlist li {
  display: grid;
  grid-template-columns: 6.25rem minmax(0, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0.7rem 0;
  border-top: 1px solid var(--rule);
}
.yearlist li:first-child { border-top: 0; }
.yl-label { font-family: var(--font-head); font-weight: 500; color: #e4e1de; font-variant-numeric: tabular-nums; }
.yearlist.no-label li { grid-template-columns: minmax(0, 1fr); }
.yearlist.no-label .yl-label { display: none; }
@media (max-width: 560px) {
  .yearlist li { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
}

.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.25rem;
  font-family: var(--font-head);
  font-size: 0.9rem;
}
.jump a { padding: 0.35rem 0.85rem; border: 1px solid var(--rule); color: #e4e1de; }
.jump a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Cards -------------------------------------------------------------------- */

.post-grid,
.link-cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

.post-card { display: flex; flex-direction: column; background: var(--surface-raised); border: 1px solid var(--rule); }
.post-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #1c1b1a; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-thumb.contain { background: #fff; padding: 0.75rem; }
.post-thumb.contain img { object-fit: contain; }
.post-body { padding: 1.1rem 1.25rem 1.35rem; }
.post-tag {
  margin: 0 0 0.5rem;
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.post-card h2 { font-size: 1.15rem; font-weight: 600; line-height: 1.3; text-transform: none; margin: 0 0 0.6rem; }
.post-card h2 a { color: #fff; }
.post-card .source { color: var(--text-muted); font-size: 0.875rem; line-height: 1.5; margin: 0; }
.post-card .source + .source { margin-top: 0.35rem; }

.link-card {
  display: flex;
  flex-direction: column;
  padding: 1.4rem 1.5rem;
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  color: var(--text);
  transition: border-color 0.15s ease;
}
main a.link-card { color: var(--text); }
a.link-card:hover { border-color: var(--accent); text-decoration: none; }
.link-card h3 { font-size: 1.2rem; font-style: normal; margin: 0 0 0.5rem; }
.link-card p { margin: 0 0 1rem; font-size: 0.975rem; line-height: 1.6; }
.link-card .post-tag { margin-bottom: 0.5rem; }
.link-card .more { margin-top: auto; font-family: var(--font-head); font-weight: 500; color: var(--accent); }
.link-card ul { list-style: none; padding: 0; margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; font-family: var(--font-head); font-weight: 500; }

.template-list { display: grid; gap: 1.5rem; }
.template-card {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  background: var(--surface-raised);
  border: 1px solid var(--rule);
}
.template-shot { display: block; border-right: 1px solid var(--rule); }
.template-card .post-body { padding: 1.5rem 1.75rem; }
.template-card h2 { font-size: 1.4rem; text-transform: none; margin: 0 0 0.75rem; }
.template-card h2 a { color: #fff; }
.template-card p { font-size: 0.975rem; line-height: 1.65; }
@media (max-width: 820px) {
  .template-card { grid-template-columns: minmax(0, 1fr); }
  .template-shot { border-right: 0; border-bottom: 1px solid var(--rule); }
}

.profile-card { display: block; max-width: 300px; margin: 0 auto 0.5rem; text-align: center; }
.profile-card img { border: 1px solid var(--rule); margin-bottom: 1rem; }
.profile-card:hover { text-decoration: none; }

/* Groups ------------------------------------------------------------------- */

.banner { margin-bottom: 2rem; border: 1px solid #222; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.prose > img.logo-mark { width: min(300px, 70%); margin: 0.5rem auto 2.5rem; }
.lede { font-size: 1.15rem; color: #dedad6; }

.prose .schedule { list-style: none; padding: 0; margin: 1rem 0 0; }
.schedule li {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.8rem 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}
.schedule li:first-child { border-top: 0; }
.schedule .when { font-family: var(--font-head); font-weight: 500; color: #e4e1de; }
.schedule .done,
.schedule .done .when,
.schedule .done strong { color: var(--text-muted); }
@media (max-width: 560px) {
  .schedule li { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
}

.prose .strands { counter-reset: strand; list-style: none; padding: 0; margin: 1rem 0 0; }
.strands li {
  counter-increment: strand;
  position: relative;
  padding: 0.9rem 0 0.9rem 3rem;
  margin: 0;
  border-top: 1px solid var(--rule);
}
.strands li:first-child { border-top: 0; }
.prose .team {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem 2rem;
}
.prose .team li { margin: 0; padding: 0.6rem 0; border-top: 1px solid var(--rule); }

.strands li::before {
  content: counter(strand);
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  font-family: var(--font-head);
  font-weight: 600;
  color: #fff;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--band);
  border-top: 1px solid #2a2a2a;
  margin-top: 1rem;
  padding: 2.75rem 0 2.25rem;
  text-align: center;
}

.footer-primary,
.footer-profiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-primary { margin-bottom: 1.25rem; }
.footer-primary .btn { min-width: 9rem; }
.footer-profiles .btn { padding: 0.5rem 1.1rem; font-size: 0.9rem; font-weight: 500; }

.footer-meta { margin: 2rem 0 0; font-size: 0.85rem; color: var(--text-muted); }
.footer-meta .sep { margin: 0 0.6em; }
