/* Brightfield Admissions
   One stylesheet for the whole site.

   Cambridge blue (#A3C1AD, the pale sage the university actually uses) is the
   accent, with a darkened version for links so text stays readable. Amber is
   the light in brightfield microscopy: it carries the hero and the dates. */

:root {
  --ink:    #1F1F1D;
  --muted:  #5C5C57;
  --rule:   #E3E2DC;
  --paper:  #FFFFFF;

  --accent: #A3C1AD;   /* Cambridge blue */
  --wash:   #EDF3EF;   /* the same colour, very pale */
  --link:   #2F5D4B;   /* darkened, for text and links */

  --amber:      #E8A33D;
  --amber-pale: #FBEDD3;
  --amber-text: #96661A;

  --academic: #1B3B6F;  /* dark academic blue, for the university names */

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

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

body {
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
  max-width: 50rem;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* ---------- header ---------- */

header {
  padding: 2.5rem 0 1.25rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}

.site-name {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}

.logo { width: 31px; height: 31px; flex: none; }

.wordmark {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--muted);
}

.wordmark b {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

nav {
  margin-top: 1.25rem;
  font-size: 0.95rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-right: 1.25rem;
  padding-bottom: 0.15rem;
}

nav a:hover { color: var(--ink); }

nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
}

/* ---------- text ---------- */

h1 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.22;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 3rem 0 0.9rem;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 2rem 0 0.4rem;
}

p, ul, ol { margin: 0 0 1.1rem; max-width: 34rem; }
ul, ol { padding-left: 1.2rem; }
li { margin-bottom: 0.35rem; }

a { color: var(--link); }
a:hover { color: var(--ink); }

strong { font-weight: 600; }

.lede {
  font-size: 1.15rem;
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.muted { color: var(--muted); }
.small { font-size: 0.95rem; }

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

blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--accent);
}

blockquote p:last-child { margin-bottom: 0; }

/* ---------- buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--link);
  border-radius: 3px;
  font-size: 0.98rem;
  text-decoration: none;
}

.btn-solid { background: var(--link); color: #FFFFFF; }
.btn-solid:hover { background: #24483A; color: #FFFFFF; }
.btn-line { color: var(--link); }
.btn-line:hover { background: var(--wash); color: var(--link); }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.85fr);
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 3.5rem;
}

.hero h1 { margin-bottom: 0.9rem; }
.hero p { max-width: 28rem; }

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-text);
  margin-bottom: 0.7rem;
}

/* The three universities in the headline. Delete this rule and they go back to
   plain ink like the rest of the line. */
.uni { color: var(--academic); font-style: italic; }

.hero-art { width: 100%; height: auto; max-width: 20rem; justify-self: center; }

.reply { margin: 0.9rem 0 0; }

@media (max-width: 40rem) {
  .hero { grid-template-columns: 1fr; gap: 1.75rem; }
  .hero-art { max-width: 15rem; order: -1; justify-self: start; }
}

/* the illuminated field: a warm light coming up behind the specimen */

.hero-art [class] { transform-box: view-box; }

/* Organelles drift very slowly, the way they do under a slide. The lamp
   behind them brightens and dims. */
.drift      { animation: drift 16s ease-in-out infinite alternate; }
.drift-slow { animation: drift 22s ease-in-out infinite alternate-reverse; }
.glow       { animation: lamp 12s ease-in-out infinite; }

@keyframes drift {
  from { translate: -5px 4px; }
  to   { translate: 6px -5px; }
}

@keyframes lamp {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .drift, .drift-slow, .glow { animation: none; }
}

/* ---------- credentials ---------- */

.who {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

/* The graduation photo is only 124px wide, so it is never shown larger than
   that. Anything bigger would go soft. */
.who-photo { margin: 0; flex: none; width: 112px; }

.who-photo img {
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.who-photo figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 34rem) {
  .who { flex-direction: column; gap: 1.25rem; }
}

.creds {
  list-style: none;
  padding: 0;
  max-width: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem 1.75rem;
  margin: 0;
}

.creds li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.45;
}

.creds svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 0.15rem;
  color: var(--link);
}

/* ---------- timeline ---------- */

.timeline {
  list-style: none;
  max-width: none;
  margin: 0 0 0 1rem;
  padding: 0.25rem 0 0 2.6rem;
  border-left: 2px solid var(--accent);
}

.timeline li {
  position: relative;
  margin: 0 0 1.9rem;
  max-width: 34rem;
}

.timeline li:last-child { margin-bottom: 0; }

.tl-icon {
  position: absolute;
  left: calc(-2.6rem - 17px);
  top: -0.15rem;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--wash);
  border: 1.5px solid var(--accent);
  border-radius: 50%;
}

.tl-icon svg { width: 17px; height: 17px; color: var(--link); }

@media (max-width: 30rem) {
  .timeline { margin-left: 1rem; padding-left: 2.1rem; }
  .tl-icon {
    left: calc(-2.1rem - 14px);
    width: 27px;
    height: 27px;
  }
  .tl-icon svg { width: 15px; height: 15px; }
}

.when {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber-text);
}

.timeline h3 { margin: 0.1rem 0 0.2rem; }
.timeline p { margin: 0; font-size: 0.98rem; }

/* ---------- cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  padding: 1.35rem 1.25rem 1.25rem;
}

.card h3 { margin: 0 0 0.15rem; font-size: 1.1rem; }

.card .sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: none;
}

.card .amount {
  margin: 0.6rem 0 0.9rem;
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  max-width: none;
}

.card ul {
  list-style: none;
  padding: 0.9rem 0 0;
  margin: 0 0 1rem;
  max-width: none;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
}

.card li {
  position: relative;
  padding-left: 0.9rem;
  margin-bottom: 0.5rem;
  line-height: 1.45;
}

.card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.card .foot {
  margin: auto 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: none;
}

/* ---------- rates and notes ---------- */

.rate {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 34rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
}

.rate:first-of-type { border-top: 1px solid var(--rule); }
.rate span:last-child { font-variant-numeric: tabular-nums; }

.note {
  background: var(--wash);
  padding: 1.25rem 1.35rem;
  margin: 2rem 0;
  max-width: 36rem;
}

.note h3 { margin-top: 0; }
.note p:last-child { margin-bottom: 0; }

.note-warm { background: var(--amber-pale); }

.item {
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
  max-width: 36rem;
}

.item:last-of-type { border-bottom: 1px solid var(--rule); }
.item h3 { margin-top: 0; }
.item p:last-child { margin-bottom: 0; }

/* ---------- table ---------- */

table {
  width: 100%;
  max-width: 36rem;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.75rem 0.55rem 0;
  border-bottom: 1px solid var(--rule);
}

th { font-weight: 600; }

/* ---------- footer ---------- */

footer {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
  color: var(--muted);
}

footer a { color: var(--muted); }
footer p { margin-bottom: 0.4rem; }

/* ---------- photo ---------- */

.intro {
  display: grid;
  grid-template-columns: 1fr 13rem;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2.5rem;
}

.intro p:last-child { margin-bottom: 0; }

.intro img {
  width: 100%;
  height: auto;
  border-radius: 3px;
  border: 1px solid var(--rule);
}

@media (max-width: 40rem) {
  .intro { grid-template-columns: 1fr; gap: 1.5rem; }
  .intro img { max-width: 11rem; }
}

/* ---------- social ---------- */

.social {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin-top: 0.9rem;
}

.social a { display: inline-flex; color: var(--muted); }
.social a:hover { color: var(--link); }
.social svg { width: 21px; height: 21px; }
