/* ------------------------------------------------------------------
   George C. Craig — personal homepage
   Fonts are self-hosted (no external requests). Licences in fonts/.
   ------------------------------------------------------------------ */

@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 600; font-display: swap; src: url("fonts/source-serif-4-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }

:root {
  --lmu-green: #00883a;
  --deep: #0c3a29;          /* masthead */
  --deep-2: #0f4a34;
  --paper: #faf8f3;
  --ink: #1b2420;
  --muted: #5a6660;
  --rule: #dcd8cc;
  --accent: #00883a;
  --accent-ink: #006b2d;    /* green for text on paper (AA contrast) */
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 68rem;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 4rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }

.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

/* ---------------- Masthead ---------------- */

.masthead {
  position: relative;
  color: #fff;
  background:
    url("isobars.svg") center / cover no-repeat,
    radial-gradient(120% 140% at 85% 0%, var(--deep-2) 0%, var(--deep) 60%, #082a1e 100%);
  padding: 4.5rem 0 0;
  overflow: visible;
}
.masthead::after {               /* thin LMU-green rule at the foot */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: var(--lmu-green);
}
.masthead__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}
.masthead__text { padding-bottom: 3rem; }

.eyebrow {
  margin: 0 0 1.4rem;
  font: 500 .78rem/1.4 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
}
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: #fff; text-decoration: underline; }
.eyebrow span { margin: 0 .5em; }

h1 {
  margin: 0;
  font: 600 clamp(2.6rem, 6.4vw, 4.6rem)/1.02 var(--serif);
  letter-spacing: -0.015em;
}
.role {
  margin: .7rem 0 2rem;
  font: italic 400 clamp(1.15rem, 2.2vw, 1.45rem)/1.3 var(--serif);
  color: rgba(255,255,255,.88);
}

.quicklinks { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.pill {
  display: inline-block;
  padding: .45rem 1rem;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 999px;
  color: #fff;
  font: 500 .88rem/1 var(--sans);
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.pill:hover { background: #fff; border-color: #fff; color: var(--deep); }
.pill:focus-visible { outline-color: #fff; }

.portrait {
  margin: 0 0 3rem;
}
.portrait img {
  display: block;
  width: clamp(11rem, 20vw, 15.5rem);
  height: auto;
  border-radius: 4px;
  border: 5px solid #faf8f3;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.6);
  transform: rotate(1.2deg);
}

/* ---------------- Section navigation ---------------- */

.sitenav {
  position: sticky; top: 0; z-index: 5;
  background: rgba(250,248,243,.92);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.sitenav .wrap { display: flex; gap: 1.8rem; overflow-x: auto; }
.sitenav a {
  padding: 1rem 0 .9rem;
  font: 500 .9rem/1 var(--sans);
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.sitenav a:hover { color: var(--ink); border-bottom-color: var(--lmu-green); }

/* ---------------- Sections ---------------- */

main { padding-top: 2.5rem; padding-bottom: 3rem; }

.section {
  display: grid;
  grid-template-columns: 13rem 1fr;
  gap: 2.5rem;
  padding: 3.25rem 0;
  border-top: 1px solid var(--rule);
}
.section:first-child { border-top: 0; }

.section__label {
  margin: 0;
  font: 600 1.5rem/1.2 var(--serif);
  letter-spacing: -0.005em;
  align-self: start;
  position: sticky; top: 4.5rem;
}
.section__label span {
  display: block;
  margin-bottom: .55rem;
  font: 500 .75rem/1 var(--sans);
  letter-spacing: .14em;
  color: var(--accent-ink);
}
.section__body { max-width: 44rem; }
.section__body > :first-child { margin-top: 0; }

h3 {
  margin: 2.2rem 0 .8rem;
  font: 600 .78rem/1.3 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.section__body > h3:first-child { margin-top: .3rem; }

.small { font-size: .9rem; }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); gap: 1.6rem 2.5rem; margin: 0; }
.contact div:first-child { grid-row: span 3; }
.contact dt {
  font: 600 .74rem/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: .3rem;
}
.contact dd { margin: 0; }


.button {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.2rem;
  background: var(--deep);
  color: #fff;
  border-radius: 3px;
  font: 500 .95rem/1 var(--sans);
  text-decoration: none;
  transition: background .15s;
}
.button:hover { background: var(--lmu-green); color: #fff; }
.button--quiet { background: transparent; color: var(--accent-ink); border: 1px solid currentColor; }
#cv .button--quiet { margin-top: 1.4rem; }
.button--quiet:hover { background: var(--accent-ink); color: #fff; border-color: var(--accent-ink); }

/* CV timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px dotted var(--rule);
}
.timeline li:last-child { border-bottom: 0; }
.when { font: 500 .88rem/1.65 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }

.roles { margin: 0; padding-left: 1.1rem; }
.roles li { padding: .2rem 0; }
.roles li::marker { color: var(--lmu-green); }

/* Research notes */
.lede { font: 400 1.2rem/1.5 var(--serif); margin: 0 0 1.8rem; color: var(--ink); }

.notes { list-style: none; margin: 0; padding: 0; }
.note {
  position: relative;
  padding: 1.5rem 0 1.5rem 1.4rem;
  border-top: 1px solid var(--rule);
}
.note::before {                   /* a small green tick on the left edge */
  content: ""; position: absolute; left: 0; top: 1.85rem; bottom: 1.85rem; width: 3px;
  background: var(--lmu-green); border-radius: 2px; opacity: .85;
}
.note__meta {
  margin: 0 0 .35rem;
  font: 500 .8rem/1.4 var(--sans);
  letter-spacing: .04em;
  color: var(--muted);
}
.note__title { margin: 0 0 .5rem; font: 600 1.35rem/1.3 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); }
.note__title a { color: var(--ink); text-decoration: none; background-image: linear-gradient(var(--lmu-green), var(--lmu-green)); background-size: 0 2px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .25s; }
.note__title a:hover { background-size: 100% 2px; }
.note__text { margin: 0; color: var(--muted); }
.note__files { margin: .7rem 0 0; font-size: .9rem; color: var(--muted); }
.note__files a { font-weight: 500; }

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

.footer {
  background: var(--deep);
  color: rgba(255,255,255,.75);
  font-size: .88rem;
  padding: 2rem 0;
}
.footer a { color: #fff; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.footer p { margin: 0; }
.footer__links { display: flex; gap: 1.4rem; }

/* ---------------- Small screens ---------------- */

@media (max-width: 760px) {
  .masthead { padding-top: 2.5rem; }
  .masthead__inner { grid-template-columns: 1fr; gap: 0; }
  .masthead__text { padding-bottom: 2rem; order: 2; }
  .portrait { margin: 0 0 1.5rem; order: 1; }
  .portrait img { width: 8.5rem; border-width: 3px; transform: none; }
  .section { grid-template-columns: 1fr; gap: 1.2rem; padding: 2.5rem 0; }
  .section__label { position: static; }
  .contact { grid-template-columns: 1fr; }
  .contact div:first-child { grid-row: auto; }
  .timeline li { grid-template-columns: 1fr; gap: 0; }
  .sitenav .wrap { gap: 1.3rem; }
}

/* ---------------- Dark mode ---------------- */

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111815;
    --ink: #e7ebe8;
    --muted: #a3b0a9;
    --rule: #2a3530;
    --accent-ink: #4cc47e;
  }
  .sitenav { background: rgba(17,24,21,.9); }
  .button { background: var(--lmu-green); }
  .button:hover { background: #4cc47e; color: #0c2a1e; }
  .button--quiet { background: transparent; }
  .button--quiet:hover { color: #0c2a1e; background: var(--accent-ink); }
  .footer { background: #0a110e; }
}

/* ---------------- Print ---------------- */

@media print {
  .sitenav, .skip, .quicklinks { display: none; }
  body { background: #fff; color: #000; font-size: 10.5pt; }
  .masthead { background: none; color: #000; padding: 0 0 1rem; }
  .masthead::after { display: none; }
  .eyebrow, .role { color: #333; }
  .portrait { margin: 0; }
  .portrait img { width: 3cm; box-shadow: none; border: 0; transform: none; }
  .section { break-inside: avoid; padding: 1.2rem 0; }
  .section__label { position: static; }
  .footer { background: none; color: #333; }
  .footer a { color: #333; }
}
