/* annajxli.github.io — one stylesheet, all pages, print rules at bottom. */

:root {
  --paper: #F5F6F4;
  --ink: #15181B;
  --graphite: #6B7075;
  --rule: #D5D8D4;
  --drafting: #2C4A6E;

  --fs-utility: 0.78rem;
  --fs-body: 1.0625rem;
  --fs-h3: 1.25rem;
  --fs-h2: 1.5625rem;
  --fs-h1: clamp(2rem, 1.6rem + 1.8vw, 2.75rem);

  --measure: 68ch;
  --margin-col: 120px;
  --content-col: 720px;
  --col-gap: 32px;

  color-scheme: light;
}

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

html {
  font-size: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", sans-serif;
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 500;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
}

p {
  margin: 0;
  max-width: var(--measure);
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--drafting);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: color 120ms ease, opacity 120ms ease;
}

a:hover {
  opacity: 0.7;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--drafting);
  outline-offset: 3px;
}

.mono,
.section-label,
.entry-date,
.entry-venue {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--fs-utility);
  letter-spacing: 0.08em;
  color: var(--graphite);
}

.section-label {
  text-transform: uppercase;
  color: var(--ink);
}

/* ---- page frame ---- */

.site-nav {
  max-width: calc(var(--margin-col) + var(--col-gap) + var(--content-col));
  margin: 0 auto;
  padding: 1.5rem 2rem 0;
}

main {
  display: block;
  max-width: calc(var(--margin-col) + var(--col-gap) + var(--content-col));
  margin: 0 auto;
  padding: 0 2rem;
}

.pubs-page main {
  padding-top: 3rem;
}

.pubs-header {
  padding-bottom: 2.5rem;
}

/* ---- drafting margin: the signature layout ---- */

.sheet {
  position: relative;
}

.sheet::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--margin-col);
  width: 1px;
  background: var(--drafting);
}

.sheet-section {
  display: grid;
  grid-template-columns: var(--margin-col) 1fr;
  column-gap: var(--col-gap);
}

.sheet-section + .sheet-section {
  margin-top: 3.5rem;
}

.sheet-section > h2 {
  grid-column: 1;
  margin-top: 0.15rem;
  margin-bottom: 0.75rem;
  align-self: start;
  text-align: right;
  padding-right: var(--col-gap);
  font-family: "Archivo", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
}

/* Spans the full section width, then re-declares the same column
   template so entry dates land back in the true margin column,
   in line with the label above them. */
.sheet-section > .section-content {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: var(--margin-col) 1fr;
  column-gap: var(--col-gap);
  row-gap: 1.75rem;
}

.entry {
  display: contents;
}

.entry-date {
  grid-column: 1;
  align-self: baseline;
}

.entry-body {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.entry-title {
  font-size: var(--fs-body);
  font-weight: 600;
}

.entry-title a {
  text-decoration: none;
}

.entry-title a:hover {
  text-decoration: underline;
}

.entry-authors {
  color: var(--ink);
  font-size: 0.95rem;
}

.entry-venue {
  font-style: normal;
}

.entry-meta {
  color: var(--graphite);
}

/* ---- publications page ---- */

.back-link {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--fs-utility);
  letter-spacing: 0.08em;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* ---- landing page ---- */

.hero {
  padding-top: 4rem;
  padding-bottom: 3rem;
}

.bio {
  margin-top: 1.75rem;
}

.links-list {
  line-height: 1.3;
}

.links-list li {
  display: inline;
}

.links-list li:not(:last-child)::after {
  content: " · ";
  color: var(--rule);
}

.pubs-link {
  margin-top: 1.5rem;
}

.sheet-section > .section-content.plain {
  grid-column: 2;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.work-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.work-item p,
.work-item h3,
.work-item li {
  line-height: 1.3;
}

.work-org {
  font-weight: 400;
  font-style: italic;
}

.work-role {
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: normal;
}

.work-meta {
  color: var(--graphite);
}

.work-bullets {
  margin: 0;
  padding-left: 1.1em;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  color: var(--graphite);
  list-style: disc;
}

.work-item h3 a {
  text-decoration: none;
}

.work-item h3 a:hover {
  text-decoration: underline;
}

/* ---- responsive: margin collapses below 720px ---- */

@media (max-width: 720px) {
  .sheet::before {
    display: none;
  }

  .sheet-section,
  .section-content {
    display: block;
    margin-left: 0;
  }

  .sheet-section > h2 {
    text-align: left;
    margin-bottom: 1rem;
  }

  .entry {
    display: block;
    margin-bottom: 1.75rem;
  }

  .entry-date {
    display: block;
    margin-bottom: 0.35rem;
  }

  main {
    padding: 0 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ---- print: CV only, but scoped generally ---- */

@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 10.5pt;
  }

  @page {
    margin: 0.75in;
  }

  .site-nav,
  .back-link,
  .sheet::before {
    display: none !important;
  }

  .sheet-section,
  .section-content {
    display: block;
    margin-left: 0;
  }

  .sheet-section > h2 {
    margin-bottom: 0.5rem;
  }

  .entry {
    display: block;
    break-inside: avoid;
    margin-bottom: 1rem;
  }

  .entry-date {
    display: block;
    margin-bottom: 0.15rem;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  .mono, .section-label, .entry-date, .entry-venue {
    color: #000;
  }
}
