/* Professional visual polish */

:root {
  --bg: #fafaf9;
  --surface: rgba(255,255,255,0.9);
  --text: #1f2430;
  --muted: #60697a;
  --line: rgba(25, 32, 45, 0.09);
  --accent: #1f3c88;
  --accent-soft: rgba(31,60,136,0.12);
  --shadow-soft: 0 10px 30px rgba(22, 28, 45, 0.05);
  --shadow-card: 0 18px 40px rgba(22, 28, 45, 0.08);
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 16px;
}

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(circle at top left, rgba(53,88,184,0.05), transparent 24%),
    radial-gradient(circle at top right, rgba(31,60,136,0.04), transparent 22%),
    linear-gradient(180deg, #fcfcfb 0%, #f8f8f7 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.72;
  letter-spacing: -0.01em;
}

#title-block-header { display: none; }

main.content {
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 0.8rem;
  padding-bottom: 2.8rem;
}

.site-shell {
  max-width: 1120px;
  margin: 0 auto;
}

h1, h2, h3, h4 {
  color: #171b24;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 1.55rem;
  font-weight: 700;
  margin-top: 2.8rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}

h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
}

a { color: var(--accent); }
a:hover { color: #3558b8; }

.nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.2rem 0 1.8rem 0;
  padding: 0.25rem 0 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255,255,255,0.78);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(18, 24, 39, 0.03);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.nav-pill:hover {
  transform: translateY(-1px);
  border-color: var(--accent-soft);
  box-shadow: 0 10px 18px rgba(18, 24, 39, 0.05);
  background: #fff;
  text-decoration: none;
}

.section-grid,
.funding-grid,
.apps-grid {
  display: grid;
  gap: 1.15rem;
  margin-top: 1.1rem;
}

.section-grid,
.funding-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.teaching-grid {
  display: grid;
  grid-template-columns: 1.28fr 0.92fr;
  gap: 1.15rem;
  margin-top: 1.1rem;
}

.apps-grid {
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}

.panel-card,
.funding-card,
.app-card {
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-soft);
}

.panel-card,
.funding-card {
  position: relative;
  overflow: hidden;
}

.panel-card::before,
.funding-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, rgba(31,60,136,0.9), rgba(53,88,184,0.28), transparent 72%);
}

.funding-card,
.app-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.funding-card:hover,
.app-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  border-color: var(--accent-soft);
}

.funding-card a:first-child,
.app-card h4 a {
  text-decoration: none;
  color: #171b24;
}

.funding-card a:first-child:hover,
.app-card h4 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.deck-link {
  display: block;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  margin-bottom: 0.85rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(250,250,250,0.92) 100%);
  box-shadow: 0 6px 16px rgba(18, 24, 39, 0.03);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.deck-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(18, 24, 39, 0.06);
  border-color: var(--accent-soft);
  text-decoration: none;
}

.app-card p:first-child {
  margin-bottom: 0.9rem;
}

.app-card img {
  width: 100%;
  height: 176px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  background: linear-gradient(180deg, #eceff5 0%, #f7f8fb 100%);
  box-shadow: inset 0 0 0 1px rgba(25, 32, 45, 0.06);
}

.app-card h4 {
  margin: 0.95rem 0 0.45rem 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.app-card p:last-child,
.funding-card p:last-child,
.panel-card p:last-child {
  color: var(--muted);
  margin-bottom: 0;
}

.contact-card a {
  text-decoration: none;
}

@media (max-width: 850px) {
  .teaching-grid {
    grid-template-columns: 1fr;
  }
}
