/* Modern light theme styles for the site */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #3b82f6;
  --primary-soft: #bfdbfe;
  --accent: #8b5cf6;
  --border: #e2e8f0;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #eff2f7 100%);
  color: var(--text);
  line-height: 1.7;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 24%),
              radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.08), transparent 28%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: #2563eb;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar .social {
  margin-top: 0;
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  transition: background 150ms ease, transform 150ms ease;
}

.social-link svg {
  width: 16px;
  height: 16px;
  display: block;
}

.social-link:hover {
  background: #ffffff;
  transform: none;
}

.logo {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 180ms ease, transform 180ms ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  transform: translateY(-1px);
}

.nav-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 150ms ease, transform 150ms ease, border-color 150ms ease;
}

.nav-toggle:hover {
  background: var(--surface-soft);
  transform: translateY(-1px);
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease;
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
}

.hamburger::before {
  transform: translateY(-6px);
}

.hamburger::after {
  transform: translateY(6px);
}

.nav-toggle-input:checked + .nav-toggle .hamburger {
  background: transparent;
}

.nav-toggle-input:checked + .nav-toggle .hamburger::before {
  transform: rotate(45deg);
}

.nav-toggle-input:checked + .nav-toggle .hamburger::after {
  transform: rotate(-45deg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 380px);
  gap: 1rem;
  align-items: center;
  width: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Home page profile layout override */
.hero:has(.hero-panel) {
  grid-template-columns: minmax(240px, 300px) 1fr;
  align-items: start;
  padding: 1.25rem 0;
}

.hero-panel {
  display: flex;
  justify-content: flex-start;
}

.profile-card {
  width: 100%;
  max-width: 300px;
  padding: 1.25rem 1.25rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.profile-photo {
  width: 100%;
  max-width: 240px;
  border-radius: 24px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.12);
  display: block;
  margin: 0 auto 1rem;
}

.profile-name,
.profile-role,
.profile-dept,
.profile-school {
  margin: 0;
  font-size: 1rem;
  font-weight: 100;
  color: var(--muted);
  line-height: 1.5;
}

.profile-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.profile-role {
  font-style: italic;
}

/* Home page copy styling */
.hero:has(.hero-panel) .hero-copy {
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  max-width: 44rem;
}

.hero-copy h1 {
  margin: 0.8rem 0 0.4rem;
}

.hero-copy h2 {
  margin: 0 0 1.2rem;
}

.hero-copy h3 {
  margin: 1.8rem 0 1.25rem;
}

.hero-bio {
  max-width: 42rem;
}

.hero-bio h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.hero-details {
  margin-top: 1.75rem;
}

.focus-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.focus-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.focus-button:hover,
.focus-button:focus-visible {
  background: rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

/* Book page styling - keep image visible */
.hero:not(:has(.hero-panel)) .hero-image {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-top: 0rem;
  padding: 3rem 2rem;
}

.hero:not(:has(.hero-panel)) .hero-image img {
  width: 100%;
  max-width: 280px;
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  display: block;
}


.section {
  padding: 3rem 0;
}

.section-title {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 2.5vw, 2.8rem);
  color: var(--text);
}

.about,
.card,
.env-card,
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.about {
  padding: 2.4rem 2rem;
}

.about p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.card-grid,
.env-grid,
.featured-grid {
  display: grid;
  gap: 1.5rem;
}

.card-grid {
  gap: 1.5rem;
}

.card {
  padding: 1.6rem;
}

.card h3,
.env-card-content h3,
.feature-card h3 {
  margin: 0 0 0.75rem;
}

.card p,
.card small,
.about p,
.reference-list,
.reference-list li,
.env-card-content p,
.footer {
  color: var(--muted);
}

.action-link,
.env-card-content a {
  color: var(--primary);
  font-weight: 700;
}

.action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.reference-list {
  margin: 1.5rem 0 0;
  padding-left: 1.5rem;
  list-style: none;
  color: var(--text);
  line-height: 1.8;
}

.reference-list li {
  margin: 0 0 1rem;
  text-indent: -1.5rem;
  padding-left: 1.5rem;
}

.course-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  background: rgba(59, 130, 246, 0.04);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
}

.course-table th,
.course-table td {
  border: 1px solid var(--border);
  padding: 1rem 1rem;
  text-align: left;
}

.course-table thead th {
  /* background: rgba(15, 23, 42, 0.08);
  color: var(--text); */
  background: rgba(59, 130, 246, 0.08);
  color: var(--text);
  font-weight: 700;
}

.course-table tbody tr:nth-of-type(odd) {
  background: rgba(59, 130, 246, 0.03);
}

.course-table tbody tr:nth-of-type(even) {
  background: rgba(15, 23, 42, 0.02);
}

.course-table .section-heading td {
  background: rgba(59, 130, 246, 0.08);
  color: var(--text);
  font-weight: 700;
  padding-top: 1rem;
  padding-bottom: 0.9rem;
}

.course-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.12);
}

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

.env-card {
  overflow: hidden;
}

.env-card img {
  width: 100%;
  display: block;
}

.env-card-content {
  padding: 1.25rem;
}

.env-card-content a:hover,
.action-link:hover,
.feature-card:hover {
  color: #2563eb;
}

.hero-list,
.highlight-list {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.hero-list li,
.highlight-list li {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1.15rem;
  color: var(--text);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.lede {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn.primary {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(59, 130, 246, 0.2);
}

.btn.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px rgba(59, 130, 246, 0.24);
}

.hero-ctas {
  margin-top: 1.9rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.social {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin-top: 1.75rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--border);
  transition: background 150ms ease, transform 150ms ease;
}

.social-link svg {
  width: 16px;
  height: 16px;
}

.social-link:hover {
  background: #ffffff;
  color: var(--muted);
  transform: none;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 1.75rem 0 0;
}

.feature-card {
  display: block;
  padding: 1.35rem;
  color: var(--text);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(59, 130, 246, 0.12);
}

.feature-card h3 { margin: 0 0 0.5rem; }

.footer {
  padding: 2rem 0;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
}

p.title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  color: black;
}

p.subtitle {
  font-size: 1.25rem;
  font-weight: 500;
  color: black;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-panel,
  .hero-copy {
    width: 100%;
  }

  .hero-panel {
    justify-content: center;
  }

  .profile-card {
    max-width: 320px;
    margin: 0 auto;
  }

  .hero:has(.hero-panel) .hero-copy {
    max-width: none;
    padding: 0 0.5rem;
  }

  .hero-bio {
    max-width: 100%;
  }

  .hero-copy {
    margin-top: 1rem;
  }

  .focus-buttons {
    justify-content: center;
  }

  .focus-button {
    flex: 1 1 calc(50% - 0.75rem);
    min-width: 140px;
  }
}

@media (max-width: 560px) {
  .navbar {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
  }

  .main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
    width: auto;
  }

  .nav-toggle {
    display: inline-flex !important;
    margin: 0;
  }

  .header-actions {
    margin-left: 1rem;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0.9rem;
    width: 100%;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
  }

  .nav-toggle-input:checked + .nav-toggle + .nav-links {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    width: 100%;
    display: inline-flex;
    justify-content: left;
    padding: 0.65rem 0;
    background: var(--surface);
    border-radius: 14px;
  }

  .hero {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    gap: 1.25rem;
  }

  .hero:has(.hero-panel) .hero-copy {
    padding: 0 0.5rem;
    max-width: none;
  }

  .hero-copy {
    margin-top: 0;
  }

  .hero-details {
    margin-top: 1rem;
  }

  .focus-buttons {
    gap: 0.5rem;
  }

  .focus-button {
    flex: 1 1 100%;
  }

  .hero-image {
    padding-top: 0.5rem;
  }
}
