/*
 * site.css — Shared design system for Guohao Lan's website
 * Applied across all pages for visual consistency.
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ================================================================
   DESIGN TOKENS
   ================================================================ */
:root {
  /* Colors */
  --bg:            #f5f7fa;
  --card:          #ffffff;
  --border:        #e4e9f0;
  --text:          #1e2a3a;
  --muted:         #64748b;
  --heading:       #0f172a;
  --primary:       #1a52c5;
  --primary-dark:  #1540a0;
  --primary-soft:  #eff5ff;
  --tag-bg:        #edf3ff;
  --tag-border:    #c5d8f9;
  --tag-text:      #1a52c5;

  /* Elevation */
  --shadow:        0 2px 14px rgba(15, 23, 42, 0.06);
  --shadow-md:     0 4px 22px rgba(15, 23, 42, 0.09);

  /* Shape */
  --radius:        14px;
  --radius-sm:     10px;
  --radius-pill:   999px;
}

/* ================================================================
   RESET & BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  padding-top: 68px;
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.74;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  word-break: break-word;
}

a:hover, a:focus {
  color: var(--primary-dark);
  text-decoration: none;
}

/* ================================================================
   NAVBAR  (overrides Bootstrap defaults on every page)
   ================================================================ */
.navbar {
  background: rgba(255, 255, 255, 0.98) !important;
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: 0 1px 10px rgba(15, 23, 42, 0.05) !important;
  backdrop-filter: blur(6px);
  margin-bottom: 0 !important;
}

.navbar .container-fluid {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.navbar-brand {
  height: auto !important;
  padding-top: 17px !important;
  padding-bottom: 17px !important;
  font-size: 19px !important;
  font-weight: 800 !important;
  letter-spacing: -0.3px !important;
  color: var(--heading) !important;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: color 0.18s ease !important;
}

.navbar-brand:hover,
.navbar-brand:focus {
  color: var(--primary) !important;
  text-decoration: none !important;
}

.navbar-nav > li > a {
  color: #475569 !important;
  font-weight: 600 !important;
  font-size: 14.5px !important;
  padding-top: 17px !important;
  padding-bottom: 17px !important;
  letter-spacing: 0.1px;
  transition: color 0.18s ease !important;
}

.navbar-nav > li > a:hover,
.navbar-nav > li > a:focus {
  color: var(--primary) !important;
  background: transparent !important;
  text-decoration: none !important;
}

.navbar-nav > li.active > a,
.navbar-nav > li.active > a:hover,
.navbar-nav > li.active > a:focus {
  color: var(--primary) !important;
  background: transparent !important;
  font-weight: 700 !important;
}

.navbar-toggle {
  margin-top: 13px !important;
  margin-bottom: 13px !important;
  border-color: #cbd5e1 !important;
}

.navbar-toggle .icon-bar {
  background-color: #64748b !important;
}

/* ================================================================
   LAYOUT
   ================================================================ */
.page-wrap {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 18px 64px;
}

/* ================================================================
   PAGE HEADER CARD  (top-of-page title banner)
   ================================================================ */
.page-header {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px 22px;
  margin-bottom: 18px;
  /* reset Bootstrap's default page-header margins */
  margin-top: 0;
  border-bottom: none;
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.page-header p {
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 760px;
}

/* publications page uses a different class name */
.page-header-custom {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px 22px;
  margin-bottom: 18px;
}

.page-header-custom h1 {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.page-header-custom p {
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 760px;
}

/* ================================================================
   GENERIC SECTION CARDS
   ================================================================ */
.advising-section,
.teaching-section,
.service-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 26px 20px;
  margin-bottom: 16px;
}

/* ================================================================
   SECTION HEADS  (left-accent heading inside a card)
   ================================================================ */
.section-head {
  margin-bottom: 14px;
  padding-left: 13px;
  border-left: 3px solid var(--primary);
}

.section-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

/* teaching: icon next to heading — reset left-border variant */
.teaching-section .section-head {
  padding-left: 0;
  border-left: none;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 11px;
}

/* ================================================================
   SUBSECTIONS
   ================================================================ */
.subsection { margin-top: 18px; }
.subsection:first-of-type { margin-top: 0; }

.subsection-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--heading);
}

/* ================================================================
   PERSON LIST  (advising / alumni)
   ================================================================ */
.person-list {
  margin: 0;
  padding-left: 18px;
}

.person-list li {
  margin-bottom: 9px;
  color: #374151;
  font-size: 15px;
  line-height: 1.75;
}

.person-list li:last-child { margin-bottom: 0; }

.now-text { color: var(--muted); }

.note-inline {
  margin: 6px 0 10px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  font-style: italic;
}

/* ================================================================
   PROSPECTIVE HIGHLIGHT CARD
   ================================================================ */
.prospective-highlight {
  background: #f0f6ff;
  border: 1px solid #d8e7f9;
  border-left: 4px solid var(--primary);
}

.prospective-highlight .section-head {
  border-left: none;
  padding-left: 0;
}

.prospective-highlight .section-head h2 {
  color: var(--primary);
  font-size: 21px;
}

.prospective-highlight .section-note {
  color: var(--text);
  margin-bottom: 0;
}

/* ================================================================
   QUICK-LINKS / PILL BUTTONS
   ================================================================ */
.quick-links,
.header-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 12px;
}

.quick-link,
.header-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: #f8fafc;
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  line-height: 1.2;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.quick-link:hover, .quick-link:focus,
.header-link:hover, .header-link:focus {
  background: var(--primary-soft);
  border-color: var(--tag-border);
  color: var(--primary);
}

/* ================================================================
   SECTION NOTE
   ================================================================ */
.section-note {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.72;
  color: var(--muted);
}

/* ================================================================
   TAGS / BADGES
   ================================================================ */
.course-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: var(--tag-bg);
  color: var(--tag-text);
  border: 1px solid var(--tag-border);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ================================================================
   AWARDS PAGE
   ================================================================ */
.awards-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.awards-list li {
  position: relative;
  padding: 8px 0 10px 22px;
  border-bottom: 1px solid #f1f5f9;
}

.awards-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.awards-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.award-title {
  display: inline;
  font-size: 16px;
  font-weight: 700;
  color: #374151;
}

.award-meta {
  display: inline;
  font-size: 15.5px;
  color: var(--muted);
}

.award-note {
  margin-top: 2px;
  font-size: 14px;
  color: #7c5dc7;
}

.award-link {
  margin-left: 6px;
  font-size: 14.5px;
  white-space: nowrap;
}

/* ================================================================
   SERVICE PAGE
   ================================================================ */
.service-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-list > li {
  padding: 6px 0 8px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 15px;
  line-height: 1.7;
  color: #374151;
}

.service-list > li:last-child { border-bottom: none; }

/* ================================================================
   FOOTER
   ================================================================ */
footer {
  margin-top: 32px;
  padding: 22px 0 28px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

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

footer a:hover { color: var(--primary); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
  body {
    padding-top: 58px;
    font-size: 15px;
    line-height: 1.68;
  }

  .page-wrap {
    padding: 14px 14px 44px;
  }

  .page-header,
  .page-header-custom {
    padding: 20px 16px 18px;
    border-radius: 12px;
  }

  .page-header h1,
  .page-header-custom h1 {
    font-size: 26px;
  }

  .advising-section,
  .teaching-section,
  .service-section {
    padding: 18px 16px 16px;
    border-radius: 12px;
  }

  .section-head h2  { font-size: 17px; }
  .subsection-title { font-size: 15px; }
  .section-note     { font-size: 14.5px; }
  .person-list li   { font-size: 14.5px; }

  .navbar-brand {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }

  .navbar-nav > li > a {
    padding-top: 11px !important;
    padding-bottom: 11px !important;
  }

  .award-title,
  .award-meta {
    display: block;
  }

  .award-link {
    display: inline-block;
    margin-left: 0;
    margin-top: 4px;
  }
}

@media (max-width: 480px) {
  .page-wrap {
    padding-left: 12px;
    padding-right: 12px;
  }

  .page-header h1,
  .page-header-custom h1 {
    font-size: 23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .quick-link,
  .header-link,
  .navbar-brand,
  .navbar-nav > li > a { transition: none !important; }
}
