/* ==========================================================================
   Connecticut KUH Research Training Program (CKRT)
   Custom stylesheet — no framework.
   Palette: deep academic navy + clinical teal accent on warm neutrals.
   ========================================================================== */

:root {
  --navy:      #16314d;
  --navy-deep: #0f2438;
  --teal:      #1f8a82;
  --teal-dark: #166a64;
  --gold:      #c9972b;
  --ink:       #20262e;
  --muted:     #5a6672;
  --line:      #dfe4ea;
  --bg:        #ffffff;
  --bg-soft:   #f5f7f9;
  --bg-tint:   #eef3f4;
  --maxw:      1080px;
  --radius:    10px;
  --shadow:    0 1px 3px rgba(16,36,56,.08), 0 8px 24px rgba(16,36,56,.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Source Sans 3", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  color: var(--navy);
  line-height: 1.2;
  font-weight: 700;
}
h1 { font-size: 2.3rem; margin: 0 0 .5em; }
h2 { font-size: 1.7rem; margin: 2em 0 .6em; }
h3 { font-size: 1.25rem; margin: 1.6em 0 .4em; }
p  { margin: 0 0 1.1em; }
a  { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--navy); }
ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin: .3em 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
strong { font-weight: 700; }
.lead { font-size: 1.2rem; color: var(--muted); }

/* --- Accessibility --- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px;
}
.skip-link:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* --- Header / nav --- */
.site-header {
  background: var(--navy);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: #fff; padding: 14px 0;
}
.brand-mark {
  font-family: "Source Serif 4", serif; font-weight: 700; font-size: 1.35rem;
  letter-spacing: .5px; color: #fff;
  border: 2px solid var(--teal); border-radius: 8px; padding: 4px 10px;
  background: rgba(31,138,130,.18);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-line1 { font-weight: 700; font-size: .95rem; }
.brand-line2 { font-size: .78rem; color: #b9c6d3; text-transform: uppercase; letter-spacing: .06em; }

.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; }
.site-nav a {
  display: block; color: #d4dde6; text-decoration: none;
  padding: 10px 12px; border-radius: 6px; font-size: .92rem; font-weight: 600;
}
.site-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.site-nav a[aria-current="page"] { color: #fff; background: var(--teal-dark); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: #fff; margin: 5px 0; border-radius: 2px; }

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 55%, var(--teal-dark) 140%);
  color: #fff;
  padding: 72px 0;
  border-bottom: 4px solid var(--gold);
}
.hero h1 { color: #fff; font-size: 2.7rem; max-width: 18ch; }
.hero-tagline { font-size: 1.3rem; color: #cdd9e3; max-width: 60ch; margin-top: .5em; }

/* --- Buttons --- */
.btn {
  display: inline-block; background: var(--gold); color: #1c1c1c;
  text-decoration: none; font-weight: 700; padding: 13px 26px;
  border-radius: 8px; margin-top: 10px; transition: transform .08s ease, background .15s ease;
}
.btn:hover { background: #d9a83c; color: #1c1c1c; transform: translateY(-1px); }
.btn-secondary { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.55); }
.btn-secondary:hover { background: rgba(255,255,255,.12); color: #fff; }

/* --- Main page --- */
.page-main { padding: 48px 24px 72px; }
.page-title { border-bottom: 3px solid var(--teal); padding-bottom: .25em; display: inline-block; }

/* --- Cards / grid --- */
.grid { display: grid; gap: 24px; margin: 1.5em 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.card h3 { margin-top: 0; }
.card.feature { border-top: 4px solid var(--teal); }

/* --- Pillars / KUH callout --- */
.pillars { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin: 1.5em 0; }
.pillar { text-align: center; padding: 28px 20px; background: var(--bg-tint); border-radius: var(--radius); }
.pillar .k { font-family: "Source Serif 4", serif; font-size: 2.2rem; color: var(--teal-dark); font-weight: 700; }
.pillar h3 { margin: .2em 0; }

/* --- Section helpers --- */
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-pad { padding: 56px 0; }

/* --- People grid (faculty / trainees) --- */
.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 1.5em 0; }
.person {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; text-align: center;
}
.person .avatar {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 12px;
  background: var(--bg-tint); display: grid; place-items: center;
  font-family: "Source Serif 4", serif; font-size: 1.5rem; color: var(--teal-dark); font-weight: 700;
  border: 2px solid var(--line);
}
.person .name { font-weight: 700; color: var(--navy); display: block; }
.person .role { color: var(--muted); font-size: .9rem; }

/* --- Tables --- */
table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .96rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--navy); color: #fff; font-family: "Source Sans 3", sans-serif; }
tbody tr:nth-child(even) { background: var(--bg-soft); }

/* --- Callout / note boxes --- */
.note {
  background: var(--bg-tint); border-left: 4px solid var(--teal);
  padding: 16px 20px; border-radius: 0 8px 8px 0; margin: 1.5em 0;
}
.note.warn { border-left-color: var(--gold); background: #fdf6e7; }
.placeholder {
  border: 1px dashed var(--gold); background: #fdf6e7; color: #7a5b12;
  padding: 14px 18px; border-radius: 8px; margin: 1.2em 0; font-size: .95rem;
}
.placeholder::before { content: "✎ Placeholder — "; font-weight: 700; }

/* --- News / list items --- */
.news-item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.news-item .date { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.news-item h3 { margin: .2em 0; }

/* --- Publication list --- */
.pub-list { list-style: none; padding: 0; }
.pub-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.pub-list .authors { font-weight: 600; }
.pub-list .venue { color: var(--muted); font-style: italic; }

/* --- Footer --- */
.site-footer { background: var(--navy-deep); color: #c2cedb; margin-top: 64px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding: 48px 24px 28px; }
.footer-brand { font-family: "Source Serif 4", serif; font-weight: 700; color: #fff; font-size: 1.05rem; margin: 0 0 .4em; }
.footer-head { color: #fff; font-weight: 700; margin: 0 0 .5em; }
.footer-muted { color: #9fb0c1; font-size: .92rem; }
.site-footer a { color: #bcd2e6; }
.site-footer a:hover { color: #fff; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: .35em 0; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 24px 28px; }
.footer-legal p { color: #8499ab; font-size: .82rem; margin: 0; }

/* --- Responsive --- */
@media (max-width: 860px) {
  body { font-size: 17px; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none; width: 100%;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--navy-deep); padding: 8px 16px 16px;
  }
  .site-nav.open { display: block; }
  .header-inner { position: relative; flex-wrap: wrap; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,.06); }
  .grid-2, .grid-3, .pillars, .people { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero { padding: 52px 0; }
  .hero h1 { font-size: 2.1rem; }
}

@media (max-width: 560px) {
  .people { grid-template-columns: repeat(2, 1fr); }
  .brand-line2 { display: none; }
}
