/* ---------------------------------------------------------------
   patrickjude.com
   Light is the bare :root default so no colour is defined only
   inside a media query. Dark is applied twice: once for the system
   preference, once for the explicit toggle, so the toggle wins in
   both directions.
   --------------------------------------------------------------- */

:root {
  --bg:        #ffffff;
  --hero-bg:   #faf7f1;   /* hero sits a shade warmer than the page */
  --fg-strong: #1a1c1f;
  --fg:        #33383e;
  --fg-muted:  #5d6268;
  --accent:    #8a6d2f;   /* bronze — the gold is unreadable on light */
  --rule:      #e6e0d4;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --measure: 62ch;
  --rail: 11rem;
  --gutter: clamp(1.5rem, 5vw, 4rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #0b0d10;
    --hero-bg:   #0b0d10;
    --fg-strong: #f4f4f5;
    --fg:        #c8ced6;
    --fg-muted:  #9aa0a8;
    --accent:    #dcbe6b;
    --rule:      #21252b;
  }
}

:root[data-theme="dark"] {
  --bg:        #0b0d10;
  --hero-bg:   #0b0d10;
  --fg-strong: #f4f4f5;
  --fg:        #c8ced6;
  --fg-muted:  #9aa0a8;
  --accent:    #dcbe6b;
  --rule:      #21252b;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); }

/* Underline that draws in from the left rather than simply appearing. */
a.hero__link,
.band__body a {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  padding-bottom: 2px;
  transition: background-size .22s ease;
}
a.hero__link:hover,
.band__body a:hover {
  background-size: 100% 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg);
  color: var(--fg);
  padding: .75rem 1rem;
  z-index: 10;
}
.skip:focus {
  left: 0;
}

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

.hero {
  position: relative;
  background: var(--hero-bg);
  color: var(--fg);
  min-height: clamp(360px, 66vh, 620px);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}

#constellation {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 74rem;
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 6rem) var(--gutter);
}

.hero__name {
  margin: 0;
  font-size: clamp(2.6rem, 7.5vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--fg-strong);
}

.hero__role {
  margin: 1rem 0 0;
  font-size: clamp(1rem, 1.9vw, 1.2rem);
  font-weight: 400;
  color: var(--fg-muted);
  max-width: 46ch;
}

/* Same utility treatment as the section labels — ties the page together. */
.hero__location {
  margin: 1.6rem 0 0;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero__intro {
  margin: 1.6rem 0 0;
  font-size: clamp(1.02rem, 1.7vw, 1.18rem);
  line-height: 1.6;
  color: var(--fg);
  max-width: 40ch;
}

.hero__link {
  display: inline-block;
  margin-top: 2rem;
  color: var(--accent);
  font-weight: 500;
}

/* ------------------------------ bands ------------------------------- */

main {
  max-width: 74rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.band {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: 0 clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(2.75rem, 6vw, 4.25rem) 0;
  border-bottom: 1px solid var(--rule);
}
.band:last-of-type { border-bottom: 0; }

.band__label {
  margin: 0;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: .35rem;
}

.band__body {
  max-width: var(--measure);
}

.prose {
  color: var(--fg);
}

/* ------------------------------ terms ------------------------------- */

.terms { margin: 0; }

.terms dt {
  font-weight: 600;
  color: var(--fg);
  margin-top: 1.5rem;
}
.terms dt:first-child { margin-top: 0; }

.terms dd {
  margin: .3rem 0 0;
  color: var(--fg-muted);
}

/* ------------------------------ roles ------------------------------- */

.role + .role {
  margin-top: 2.25rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--rule);
}

.role__org {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.role__sub {
  font-weight: 400;
  color: var(--fg-muted);
}

.role__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  justify-content: space-between;
  align-items: baseline;
  margin: .3rem 0 .75rem;
  color: var(--fg-muted);
  font-size: .95rem;
}

.role__dates {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.role__summary { margin: 0; }

/* ------------------------- plain lists ------------------------------ */

.plain {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain li {
  margin-top: .7rem;
  color: var(--fg);
}
.plain li:first-child { margin-top: 0; }

.year {
  font-variant-numeric: tabular-nums;
  color: var(--fg-muted);
}

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

.foot {
  max-width: 74rem;
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 3.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  color: var(--fg-muted);
  font-size: .9rem;
}

.foot__copy { margin: 0; }

.foot__toggle {
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: .5rem 1rem;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}
.foot__toggle:hover {
  border-color: var(--accent);
}

/* ---------------------------- narrow ------------------------------- */

@media (max-width: 46rem) {
  .band {
    grid-template-columns: minmax(0, 1fr);
    gap: .9rem;
  }
  .band__label { padding-top: 0; }
  .role__meta { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
