/* ==========================================================================
   style.css — shared stylesheet for preskill.caltech.edu
   Every page links to this one file. To restyle the whole site, edit here.
   You should rarely need to touch this file when updating page content.
   ========================================================================== */

/* ---- Design tokens ---- */
:root {
  --paper:  #ffffff;   /* page background */
  --ink:    #1c1b19;   /* body text */
  --muted:  #6b675f;   /* secondary text */
  --accent: #c85200;   /* Caltech orange, deepened for readable links */
  --mark:   #ff6c0c;   /* Caltech orange, full strength, decorative */
  --rule:   #e7e3db;   /* hairlines */
  --serif:  "STIX Two Text", "Times New Roman", Georgia, serif;
  --sans:   "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
  max-width: 46rem;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

/* ---- Links ---- */
a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-underline-offset: 2px;
}
a:hover { text-decoration-color: var(--accent); }
a:focus-visible {
  outline: 2px solid var(--mark);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- Masthead ---- */
header { margin-bottom: 2.75rem; }

header::after { content: ""; display: block; clear: both; }

.portrait {
  float: right;
  width: 150px;
  height: auto;
  margin: 0.3rem 0 1rem 1.5rem;
  border: 1px solid var(--rule);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.75rem;
}
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--accent); }

h1 {
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0 0 0.4rem;
}

.role {
  font-style: italic;
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

/* Quick links under the name: CV · publications · talks · bio */
.quicklinks {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
}
.quicklinks a { text-decoration: none; }
.quicklinks a:hover { text-decoration: underline; }
.quicklinks span { color: var(--rule); margin: 0 0.5rem; }

/* ---- Sections ----
   Each <h2> automatically gets the double hairline "groove" above it —
   a nod to the groove.gif rules on the original 1990s page. */
h2 {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 3rem 0 1rem;
  padding-top: 1.4rem;
  border-top: 4px double var(--rule);
}
h2::before {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  background: var(--mark);
  margin-right: 0.6em;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
}

p { margin: 0 0 1rem; }

/* ---- Lists ---- */
ul { padding-left: 1.2rem; margin: 0 0 1rem; }
ul, ol { line-height: 1.5; }
li { margin-bottom: 0.3rem; }
li::marker { color: var(--mark); }

/* The parenthetical venue/year at the end of a talk entry */
.venue { color: var(--muted); font-size: 0.92em; }

/* ---- Contact block ---- */
address {
  font-style: normal;
  line-height: 1.7;
  padding-left: 1rem;
  border-left: 3px solid var(--rule);
}

/* ---- Footer ---- */
footer {
  margin-top: 3.5rem;
  padding-top: 1.4rem;
  border-top: 4px double var(--rule);
  text-align: center;
}
footer img {
  max-width: 320px;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
}
footer p {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.6rem;
}

/* ---- Interior pages ---- */
/* "← Home" link above the page title */
.backlink {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  margin: 0 0 1.5rem;
}
.backlink a { text-decoration: none; }
.backlink a:hover { text-decoration: underline; }
.backlink a::before { content: "\2190\00a0"; }  /* ← */

/* A list without bullets, e.g. CV entries: <ul class="plain"> */
ul.plain { list-style: none; padding-left: 0; }
ul.plain li { margin-bottom: 0.1rem; }

/* ---- Small screens ---- */
@media (max-width: 540px) {
  html { font-size: 16px; }
  h1 { font-size: 2rem; }
  .portrait {
    float: none;
    display: block;
    margin: 0 0 1.25rem;
  }
}

/* ---- Printing ---- */
@media print {
  body { max-width: none; }
  a { color: var(--ink); }
}
