/* CAGEN — Commission on Accreditation of Graduate Education in Neurology
   Static site stylesheet. Hand-written, no build step, no framework.
   Edit this file directly; it is the only stylesheet on the site. */

:root {
  /* Neutrals: cool-grey with a faint blue bias, to sit with the navy */
  --ground:      #f5f5f8;
  --surface:     #ffffff;
  --surface-alt: #eeeef3;
  --line:        #d8d8e1;
  --line-strong: #b6b6c4;

  /* The masthead is a fixed light band in both themes so the logo always reads. */
  --mh-bg:    #ffffff;
  --mh-line:  #d8d8e1;
  --mh-ink:   #2d386f;
  --mh-body:  #3f4763;
  --mh-muted: #6a7089;

  /* Text */
  --ink:    #1a1f33;
  --body:   #3d4358;
  --muted:  #676d84;

  /* Brand — taken from the CAGEN mark */
  --navy:       #2d386f;
  --navy-deep:  #1d2450;
  --navy-soft:  #47538f;
  --brass:      #96712f;
  --brass-soft: #c09a48;

  --focus: #47538f;

  /* Type scale */
  --step--1: clamp(0.82rem, 0.80rem + 0.10vw, 0.88rem);
  --step-0:  clamp(1.02rem, 0.99rem + 0.14vw, 1.10rem);
  --step-1:  clamp(1.21rem, 1.14rem + 0.34vw, 1.42rem);
  --step-2:  clamp(1.45rem, 1.31rem + 0.68vw, 1.86rem);
  --step-3:  clamp(1.74rem, 1.48rem + 1.22vw, 2.44rem);
  --step-4:  clamp(2.08rem, 1.62rem + 2.06vw, 3.20rem);

  --measure: 34rem;
  --wide: 68rem;

  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:      #11131d;
    --surface:     #191d2c;
    --surface-alt: #1f2437;
    --line:        #2d3348;
    --line-strong: #414863;

    --ink:    #eeeff6;
    --body:   #c6cade;
    --muted:  #9096ae;

    --navy:       #a3adde;
    --navy-deep:  #141829;
    --navy-soft:  #8b96cc;
    --brass:      #cea95e;
    --brass-soft: #ddbc78;

    --focus: #a3adde;
  }
}

:root[data-theme="dark"] {
  --ground:      #11131d;
  --surface:     #191d2c;
  --surface-alt: #1f2437;
  --line:        #2d3348;
  --line-strong: #414863;

  --ink:    #eeeff6;
  --body:   #c6cade;
  --muted:  #9096ae;

  --navy:       #a3adde;
  --navy-deep:  #141829;
  --navy-soft:  #8b96cc;
  --brass:      #cea95e;
  --brass-soft: #ddbc78;

  --focus: #a3adde;
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--body);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  font-synthesis-weight: none;
}

img { max-width: 100%; height: auto; }

a {
  color: var(--navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--brass); }

:where(a, button, input, textarea, summary):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--ink);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- Shell ---------- */

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.eyebrow {
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--brass);
  margin: 0;
}

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

.masthead {
  background: var(--mh-bg);
  border-bottom: 1px solid var(--mh-line);
}

.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 1.1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.brand__logo {
  display: block;
  width: 180px;
  height: auto;
  flex: none;
}

@media (max-width: 30rem) {
  .brand__logo { width: 150px; }
}

.brand__name {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink);
  line-height: 1;
}

.brand__full {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--muted);
  font-weight: 400;
  margin-top: 0.28rem;
  max-width: 24ch;
  line-height: 1.3;
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  display: inline-block;
  padding-block: 0.2rem;
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--mh-body);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--mh-ink); border-bottom-color: var(--line-strong); }
.nav a[aria-current="page"] { color: var(--mh-ink); border-bottom-color: var(--brass); }

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

.pagehead {
  background: var(--navy-deep);
  color: #dce6ee;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.pagehead h1 { color: #ffffff; font-size: var(--step-3); }
.pagehead .eyebrow { color: var(--brass-soft); }
.pagehead p {
  max-width: var(--measure);
  margin-top: 1rem;
  color: #c3d2de;
}
.pagehead__inner { display: grid; gap: 0.65rem; }

/* Home hero — the duotone plate sits behind the type, darkest on the text side */
.hero {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  background-color: #0b0f28;
  background-image:
    linear-gradient(to right,
      rgba(9, 12, 36, 0.94) 0%,
      rgba(9, 12, 36, 0.82) 30%,
      rgba(9, 12, 36, 0.52) 62%,
      rgba(9, 12, 36, 0.26) 100%),
    url("hero.jpg");
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
}

@media (max-width: 52rem) {
  .hero {
    background-position: 62% center;
    background-image:
      linear-gradient(to bottom,
        rgba(9, 12, 36, 0.90) 0%,
        rgba(9, 12, 36, 0.80) 55%,
        rgba(9, 12, 36, 0.88) 100%),
      url("hero.jpg");
  }
}
.hero h1 { font-size: var(--step-4); }
.hero .lede {
  font-family: var(--serif);
  font-size: var(--step-1);
  line-height: 1.5;
  color: #cfdce6;
  max-width: 44ch;
  margin-top: 1.25rem;
}

/* ---------- Main ---------- */

main { display: block; }

.section { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.section + .section { border-top: 1px solid var(--line); }

.prose { max-width: var(--measure); display: grid; gap: 1.15rem; }
.prose h2 { font-size: var(--step-2); margin-top: 0.5rem; }
.prose h3 { font-size: var(--step-1); }
.prose ul { margin: 0; padding-left: 1.15rem; display: grid; gap: 0.4rem; }

/* ---------- Directory list (the three homepage destinations) ---------- */

.directory { display: grid; gap: 0; border-top: 1px solid var(--line); }

.directory__item {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 0.6rem 3rem;
  padding-block: 2rem;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.directory__item h2 {
  font-size: var(--step-2);
  margin: 0;
}

.directory__body { display: grid; gap: 1rem; max-width: 46ch; }

.more {
  font-family: var(--sans);
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  text-decoration: none;
  color: var(--navy);
  justify-self: start;
  border-bottom: 2px solid var(--brass);
  padding-bottom: 0.15rem;
}
.more:hover { color: var(--brass); border-bottom-color: currentColor; }

@media (max-width: 40rem) {
  .directory__item { grid-template-columns: 1fr; gap: 0.75rem; }
}

/* ---------- Roster (board members) ---------- */

.roster { display: grid; gap: 0; border-top: 1px solid var(--line); }

.member {
  display: grid;
  grid-template-columns: minmax(0, 16rem) minmax(0, 1fr);
  gap: 0.5rem 3rem;
  padding-block: 2.25rem;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.member__id { display: grid; gap: 0.3rem; }
.member__name { font-size: var(--step-1); margin: 0; }
.member__role {
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--brass);
}
.member__facts {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
  max-width: 48ch;
}
.member__where {
  font-size: var(--step--1);
  color: var(--muted);
  margin-top: 0.4rem;
}

@media (max-width: 42rem) {
  .member { grid-template-columns: 1fr; gap: 0.9rem; }
}

/* ---------- Institution entries ---------- */

.institution {
  display: grid;
  gap: 0.4rem;
  padding: 1.6rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brass);
  max-width: 34rem;
}
.institution h3 { font-size: var(--step-1); }
.institution a { font-size: var(--step--1); }

/* ---------- Document links ---------- */

.doclist { display: grid; gap: 0.75rem; list-style: none; margin: 0; padding: 0; }

.doc {
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  max-width: 34rem;
}
.doc:hover { border-color: var(--line-strong); color: var(--navy); }
.doc__label { font-family: var(--serif); font-size: var(--step-0); font-weight: 600; }
.doc__meta {
  margin-left: auto;
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 3rem;
  align-items: start;
}
@media (max-width: 48rem) {
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

.detail { display: grid; gap: 0.35rem; margin-bottom: 1.75rem; }
.detail dt {
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--brass);
}
.detail dd { margin: 0; color: var(--body); }

.form { display: grid; gap: 1.1rem; max-width: 30rem; }
.field { display: grid; gap: 0.35rem; }
.field label {
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
}
.field input,
.field textarea {
  font: inherit;
  font-size: var(--step-0);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0.6rem 0.75rem;
  width: 100%;
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--navy-soft); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: inline-block;
  text-decoration: none;
  font-family: var(--sans);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: #ffffff;
  background: var(--navy);
  border: 1px solid var(--navy);
  padding: 0.75rem 1.6rem;
  cursor: pointer;
  justify-self: start;
}
.btn:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: #ffffff; text-decoration: none; }
:root[data-theme="dark"] .btn,
:root:not([data-theme="light"]) .btn { color: #0f151b; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .btn { color: #ffffff; }
}

.formnote { font-size: var(--step--1); color: var(--muted); }
.formstatus { font-size: var(--step--1); }
.formstatus[data-state="ok"] { color: var(--navy); }
.formstatus[data-state="error"] { color: #a3392f; }
:root[data-theme="dark"] .formstatus[data-state="error"] { color: #e78b80; }

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

.foot {
  background: var(--navy-deep);
  color: #b9c9d6;
  padding-block: 3rem 2rem;
  margin-top: 0;
  font-size: var(--step--1);
}
.foot a { color: #dbe7f0; }
.foot a:hover { color: var(--brass-soft); }

.foot__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.foot h2 {
  font-family: var(--sans);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-soft);
  margin-bottom: 0.7rem;
}
.foot p { max-width: 34ch; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }

.foot__base {
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  color: #93a6b5;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
