/* ===========================================================================
   Petti Group — shared stylesheet for all four pages.
   Thin lines do the structural work. Charter sets the prose; monospace sets
   every label, so the page reads like a drawing rather than a brochure.
   =========================================================================== */

/* Colours are taken from Sam's current site: the pale mint background, the
   sage link colour, and the rule colour used for its <hr>s. The greys are
   pulled toward the same hue so nothing reads as muddy against the mint. */
:root {
  --paper:      #e7f3ef;  /* her body background                             */
  --ink:        #16211e;  /* near-black with a green bias                    */
  --muted:      #4f6a61;  /* secondary text — 5.2:1 on the mint             */
  --line:       #b7c8c2;  /* the rule colour from her current site           */
  --line-soft:  #cfdfd9;  /* quieter divisions inside a block                */
  --accent:     #448d76;  /* her link colour                                 */

  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  max-width: 54rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}

a { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 2px; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
img { max-width: 100%; display: block; }
p { margin: 0 0 1rem; }

/* --- Label type: metadata is set in mono (the nav is Charter small caps) -- */
.pub-year, .tool-name, footer {
  font-family: var(--mono);
  letter-spacing: 0.06em;
}

/* --- Top bar: mark and logotype left, outlined nav flush right ------------ */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--ink);
}

/* The badge's alt text is the accessible name for the home link. */
.brand { display: flex; align-items: center; text-decoration: none; }
/* The logotype is an <h1> on the front page and a plain <a> on the inner
   pages, which carry their own sr-only <h1>. Both must render identically.
   The auto margins centre it in the space between the badge and the nav. */
.logotype {
  margin: 0 auto;
  transform: translateX(-1.25rem);  /* nudged from centre toward the logo */
  font-size: 2.1rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: bold;
}
.logotype, .logotype a { color: var(--ink); text-decoration: none; }
a.logotype:hover, .logotype a:hover { color: var(--accent); }
.brand .mark {
  flex: none;
  width: 112px;
  height: 112px;
  transition: filter 0.18s ease;
}
/* The badge is an <img>, so its insides can't be restyled — but the whole
   thing can be run through a filter. Greyscale on hover. */
.brand:hover .mark { filter: grayscale(1); }

nav { display: flex; gap: 0.5rem; flex-wrap: wrap; }
nav a {
  border: 2px dotted var(--line);
  padding: 0.5rem 0.95rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
nav a:hover {
  background: #d4ded9;          /* grey, but kept in the mint's hue family */
  border-color: #93a8a1;
  color: var(--ink);
}
nav a.here { background: var(--ink); border-color: var(--ink); color: var(--paper); }
nav a.here:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

@media (prefers-reduced-motion: reduce) {
  nav a, .brand .mark { transition: none; }
}

/* Every page still needs one top-level heading so its outline makes sense to a
   screen reader, even where the design doesn't show one. The inner pages carry
   an <h1 class="sr-only"> that is read aloud but never painted. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Section headings: Charter, sentence case, with a hairline running from the
   end of the text out to the right edge. The solid dark rule is reserved for
   the top bar alone, so that one line reads as the masthead boundary rather
   than as decoration repeated down the page. */
h2 {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 2.8rem 0 1.1rem;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.005em;
}
h2::after {
  content: "";
  flex: 1 1 auto;
  min-width: 1.5rem;   /* the rule never disappears entirely when text wraps */
  height: 1px;
  background: var(--line);
}

.prose { max-width: 36rem; }
.intro { margin-top: 2.25rem; }

/* --- Bio: portrait beside the biography, on People ----------------------- */
.bio { display: flex; align-items: flex-start; gap: 1.75rem; margin-top: 2.25rem; }
.bio img { flex: none; width: 170px; border: 1px solid var(--line); }
.bio div > p:last-child { margin-bottom: 0; }

/* --- Cells: outlined boxes in a grid, used for the tools ----------------- */
.cells {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.cells li { border: 1px solid var(--line); padding: 1rem; }

.tools { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.tools li { padding: 1.15rem; }
/* Not uppercased — these are real repository names. */
.tool-name { margin: 0 0 0.5rem; font-size: 0.84rem; font-weight: bold; }
.tool-name a { text-decoration: none; border-bottom: 1px solid var(--line); }
.tools p { margin: 0 0 0.6rem; font-size: 0.94rem; }
.tools .from { margin: 0; font-size: 0.72rem; color: var(--muted); font-family: var(--mono); }

/* --- Alumni -------------------------------------------------------------- */
.alum { list-style: none; margin: 0; padding: 0; }
.alum li { padding: 0.5rem 0; border-bottom: 1px solid var(--line-soft); }
.alum li:last-child { border-bottom: 0; }
.alum span { color: var(--muted); }

/* --- Publications: year in a mono column, rows ruled like a table -------- */
.pubs { list-style: none; margin: 0; padding: 0; }
.pubs li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.pubs li:last-child { border-bottom: 0; }
.pub-year { font-size: 0.72rem; color: var(--muted); padding-top: 0.3rem; font-variant-numeric: tabular-nums; }
.pub-title { margin: 0 0 0.25rem; line-height: 1.4; }
.authors { margin: 0 0 0.25rem; color: var(--muted); font-size: 0.94rem; }
.authors b { color: var(--ink); }
.venue { margin: 0; font-size: 0.72rem; font-family: var(--mono); color: var(--muted); text-transform: uppercase; }
.venue a { margin-left: 0.6rem; }
.note { margin-top: 1rem; font-size: 0.88rem; color: var(--muted); }

/* --- Footer -------------------------------------------------------------- */
/* Three columns: email left, address centred on the page, links hard right.
   The outer columns are equal fractions, which is what actually centres the
   address rather than merely placing it between the other two. */
footer {
  margin-top: 3.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--ink);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  /* Centred, not baseline-aligned: the email and links sit level with the
     middle of the two-line address rather than with its first line. */
  align-items: center;
  gap: 0.6rem 1.5rem;
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--muted);
}
footer .address { text-align: center; }
footer .links { justify-self: end; text-align: right; white-space: nowrap; }
footer a { color: var(--muted); }
footer a:hover { color: var(--accent); }

@media (max-width: 620px) {
  .logotype { font-size: 1.9rem; }
  .brand .mark { width: 72px; height: 72px; }
  nav a { padding: 0.4rem 0.75rem; font-size: 0.72rem; }
  .bio { flex-direction: column; gap: 1.25rem; }
  .bio img { width: 150px; }
  .pubs li { grid-template-columns: 1fr; gap: 0.2rem; }
  .pub-year { padding-top: 0; }
  .cells { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

  /* Three columns won't fit a phone — stack them, all left-aligned. */
  footer { grid-template-columns: 1fr; gap: 0.9rem; }
  footer .address { text-align: left; }
  footer .links { justify-self: start; text-align: left; white-space: normal; }
}
