
/* -------- Google Fonts via CSS Fallback -------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Poppins:wght@500;700&display=swap');

:root{
  --bg: #f7f7f8;
  --card: #ffffff;
  --ink: #1f2937;
  --ink-muted: #4b5563;
  --brand: #1e3a8a;
  --brand-contrast: #ffffff;
  --ring: rgba(30,58,138,0.15);
  --shadow: 0 10px 25px rgba(0,0,0,0.06);
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
}

/* -------- Navigation -------- */
nav {
  background: linear-gradient(90deg, #0f172a, #1e3a8a);
  color: var(--brand-contrast);
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

nav a {
  color: var(--brand-contrast);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background-color 160ms ease, opacity 160ms ease;
}

nav a:hover {
  background-color: rgba(255,255,255,0.12);
}

/* -------- Layout -------- */
.container {
  max-width: 900px;
  margin: 28px auto;
  padding: 28px;
  background-color: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* -------- Headings -------- */
h1, h2, h3 {
  color: var(--ink);
  margin-top: 0;
}

h1 {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(1.75rem, 2.4vw, 2.25rem);
  letter-spacing: 0.2px;
  margin-bottom: 0.6rem;
}

h2 {
  font-weight: 700;
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 6px;
}

/* -------- Text -------- */
p { color: var(--ink-muted); }
ul { color: var(--ink-muted); }
strong { color: var(--ink); }

/* -------- Headshot (Rounded Square, Smaller) -------- */
.headshot {
  width: 160px;            /* smaller fixed width */
  max-width: 40%;          /* cap size on larger screens */
  aspect-ratio: 1 / 1;     /* force square */
  object-fit: cover;       /* crop to square */
  border-radius: 16px;     /* rounded corners */
  float: right;
  margin: 0 0 20px 24px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.container::after {
  content: "";
  display: table;
  clear: both;
}

/* -------- Links in content -------- */
.container a {
  color: var(--brand);
  text-underline-offset: 3px;
}
.container a:hover {
  text-decoration: underline;
}

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

/* -------- Responsive Tweaks -------- */
@media (max-width: 640px) {
  .headshot {
    float: none;
    margin: 0 auto 16px auto;
    display: block;
    width: 140px;
    max-width: 60%;
  }
  .container {
    padding: 20px;
  }
}


/* --- Strong guard so generic img rules don't override headshot sizing --- */
img.headshot { max-width: none; }

/* -------- Button Styles -------- */
.btn {
  display: inline-block;
  padding: 10px 18px;
  background: var(--brand);
  color: var(--brand-contrast);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn:hover {
  background: #0f172a;
  transform: translateY(-2px);
}

/* -------- Card Grid for Links -------- */
.link-cards {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 20px;
}

.card {
  background: #f9fafb;
  border-radius: 12px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
.card h3 {
  margin: 0 0 8px 0;
  font-family: 'Poppins', sans-serif;
}
.card p {
  margin: 0;
  color: var(--ink-muted);
}

/* -------- Funding List -------- */
.funding-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0 0;
  display: grid;
  gap: 12px;
}

.funding-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: start;
  background: #f9fafb;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.funding-list .year {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.funding-list .details {
  color: var(--ink-muted);
}

@media (max-width: 640px) {
  .funding-list li {
    grid-template-columns: 1fr;
  }
  .funding-list .year {
    margin-bottom: 6px;
  }
}

/* -------- Document List (Syllabi) -------- */
.doc-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
  display: grid;
  gap: 12px;
}
.doc-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f9fafb;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.doc-title {
  color: var(--ink);
  font-weight: 600;
}
@media (max-width: 640px) {
  .doc-list li {
    flex-direction: column;
    align-items: stretch;
  }
  .doc-list .btn {
    width: 100%;
    text-align: center;
  }
}
