/* Design credits: Jon Barron, Abhishek Kar, Saurabh Gupta, Youngjae Min */

a {
  color: #1772d0;
  text-decoration: none;
}
a:focus,
a:hover {
  color: #f09228;
  text-decoration: none;
}

body,
td,
th {
  font-family: 'Titillium Web', Verdana, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 400;
}
body {
  margin: 8px;
  background-color: #ffffff;
  color: #000000;
}

/* Paper title */
heading {
  font-family: 'Titillium Web', Verdana, Helvetica, sans-serif;
  font-size: 17px;
  font-weight: 600;
}
strong,
b {
  font-family: 'Titillium Web', Verdana, Helvetica, sans-serif;
  font-weight: 600;
}
/* Section title, e.g. "Research" */
sectionheading {
  font-family: 'Titillium Web', Verdana, Helvetica, sans-serif;
  font-size: 22px;
  font-weight: 600;
}
/* Name at the top of the page */
pageheading {
  font-family: 'Titillium Web', Verdana, Helvetica, sans-serif;
  font-size: 38px;
  font-weight: 400;
}

/* Profile picture */
.profile-pic {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* ---------- Tab navigation ---------- */
#navbar_outer {
  padding: 7px;
  border: 1px solid #e7e7e7;
  border-left: none;
  border-right: none;
  background-color: white;
  overflow: hidden;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 999999;
}
#navbar_tab {
  display: table;
  margin: 0 auto;
}
#navbar {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
#navbar li {
  float: left;
}
#navbar li a {
  display: block;
  color: black;
  text-align: center;
  padding: 5px;
  margin: 0 0 0 10px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}
#navbar li a:hover {
  color: #f09228;
}
#navbar li a.active {
  border-bottom: 2px solid #f09228;
}

/* Tab panels: only the active one is shown (handled by js/tabs.js) */
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

/* ---------- Research entries ---------- */
.paper-thumb {
  width: 90%;
  padding: 2px;
  border-radius: 15px;
}
.abstract {
  display: none;
}
.abstract.open {
  display: block;
}

/* ---------- Coursework ---------- */
.course-note {
  color: #555;
}
button.order-btn {
  background-color: white;
  border: 1px solid #1772d0;
  border-radius: 8px;
  color: #1772d0;
  padding: 6px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-family: 'Titillium Web', Verdana, Helvetica, sans-serif;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
}
button.order-btn:hover,
button.order-btn:focus,
button.order-btn.selected {
  border: 1px solid #f09228;
  color: #f09228;
  outline: none;
}
button.order-btn:hover {
  box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.24), 0 8px 10px 0 rgba(0, 0, 0, 0.19);
}
table.course-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}
table.course-table caption {
  font-weight: 700;
  font-size: 130%;
  text-align: left;
  padding: 6px 0;
}
table.course-table th {
  font-weight: 700;
  padding: 8px;
  text-align: left;
  border-bottom: 2px solid #ddd;
}
table.course-table td {
  padding: 7px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}
table.course-table tr.course_row:hover {
  background-color: #f5f5f5;
}

/* ---------- Footer ---------- */
.footer {
  font-size: 12px;
  color: #666;
  text-align: right;
}

/* ---------- Narrow screens ---------- */
@media only screen and (max-width: 799px) {
  table.stack td {
    display: block;
    width: auto !important;
  }
  table.stack td.pic-cell {
    width: 60% !important;
    max-width: 300px;
    margin: 0 auto;
  }
  .paper-thumb {
    width: 70%;
    max-width: 320px;
  }
  table.course-table th:nth-child(1),
  table.course-table td:nth-child(1) {
    display: none;
  }
}

/* ---------- Project pages ---------- */
.page {
  max-width: 840px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}
.project-title {
  font-family: 'Titillium Web', Verdana, Helvetica, sans-serif;
  font-size: 26px;
  font-weight: 600;
  margin: 10px 0 4px 0;
}
.project-meta {
  color: #555;
  margin: 0 0 14px 0;
}
.project-links {
  margin: 0 0 20px 0;
}
.project-h {
  font-family: 'Titillium Web', Verdana, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 600;
  margin: 28px 0 6px 0;
}
.project-body p {
  text-align: justify;
  margin: 0 0 12px 0;
}
.project-body ol,
.project-body ul {
  margin: 0 0 12px 0;
}
.project-body li {
  margin-bottom: 4px;
}
figure.project-fig {
  margin: 18px auto;
  text-align: center;
}
figure.project-fig img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}
figure.project-fig figcaption {
  font-size: 14px;
  color: #555;
  margin-top: 6px;
  text-align: center;
}
.fig-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: flex-start;
}
.fig-row figure.project-fig {
  flex: 1 1 300px;
  min-width: 0;
  max-width: 420px;
  margin: 10px 0;
}

/* KaTeX inline math: scale down to sit with Titillium Web body text */
/* 'body' prefix beats KaTeX's own .katex rule, which loads later */
body .katex {
  font-size: 0.9em;
}
/* Display equations keep their normal size */
body .katex-display .katex {
  font-size: 1.1em;
}
