/* Global page and element settings ----------------------------------------------------- */
:root {
  --text: #1f2937;
  --muted: #6b7280;
  --heading: #111827;
  --accent: #1f6feb;
  --border: #e5e7eb;
  --panel: #f8fafc;
}

html {
  font-size: 16px;
}

@media (min-width: 768px) {
  html {
    font-size: 18px;
  }
}

@media (min-width: 1200px) {
  html {
    font-size: 19px;
  }
}

body {
  font-size: 1rem;
  font-family: "Open Sans", Arial, sans-serif;
  background: #FFFFFF;
  color: var(--text);
  line-height: 1.7;
}

/* Colors */
.dark-blue {
  color: #20364c !important;
}

#badge-more {
  background-color: #1585cf;
  color: white;
  cursor: pointer;
}

/* Font style */
.montserrat {
  font-family: "Montserrat", Helvetica, sans-serif !important;
}

/* Degree area -------------------------------------------------------------------- */
#education {
  list-style-type: none;
  padding-left: 0;
}

#education li {
  margin-bottom: 1rem;
}

.university {
  color: gray;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: "Montserrat", Helvetica, sans-serif;
  color: var(--heading);
  font-weight: 600;
  letter-spacing: 0.2px;
}

h1 {
  margin-bottom: 2.75rem;
  font-size: 2.6rem;
  line-height: 1.25;
}

h2, h3 {
  margin: 0 0 1.5rem !important;
  color: var(--muted);
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.65rem;
}

h4 {
  text-transform: uppercase;
  font-size: 1.35rem;
}

h4, h5, h6 {
  color: var(--muted) !important;
}

h5 {
  font-size: 1.2rem;
}

h6 {
  font-size: 1rem;
}

.panel-heading h5 {
  font-style: italic;
  font-weight: 500;
  color: #1585cf !important;
}

#projects .panel-heading h5 {
  font-weight: 500;
  color: darkslategray !important;
}

p, table, tr, td, ul, li, blockquote, nav, a, footer, dl, dt, dd {
  font-size: 1rem;
  font-family: "Montserrat", Helvetica, sans-serif;
  font-weight: 400;
}

dt {
  font-weight: 600;
}

blockquote {
  border-left: 4px solid var(--accent);
  color: var(--text);
  background: var(--panel);
  padding: 1.2rem 1.6rem;
  border-radius: 6px;
}

blockquote blockquote {
  border-left: none;
  margin: 1.5rem;
  font-style: italic;
}

cite {
  font-size: 1rem !important;
  display: block;
  margin-top: 1rem;
  color: var(--muted);
}

.quote-author {
  display: inline !important;
  margin-top: 0 !important;
  margin-left: 0.5rem;
  color: var(--muted);
}

/* Homepage intro: quotes + image responsive layout */
.intro-hero {
  display: block;
}

@media (min-width: 768px) {
  .intro-hero {
    display: flex;
    align-items: flex-start;
  }

  .intro-hero > [class*="col-"] {
    float: none;
  }
}

@media (max-width: 767px) {
  .intro-hero .col-sm-4 {
    margin-top: 1rem;
  }
}

/* School logos row (homepage): keep in one line on narrow screens */
.school-logos {
  margin-top: 20px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.school-logos img {
  flex: 0 1 auto;
  max-height: 90px;
  width: auto;
  height: auto;
  object-fit: contain;
}

@media (max-width: 991px) {
  .school-logos {
    gap: 12px;
  }

  .school-logos img {
    max-height: 64px;
  }
}

@media (max-width: 575px) {
  .school-logos img {
    max-height: 48px;
  }
}

/* About sidebar: slightly more compact to give the main column more room */
.about-sidebar {
  font-size: 0.82rem;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Only force single-line labels on wider screens to avoid overlap on narrow widths */
@media (min-width: 992px) {
  .about-sidebar .nowrap {
    white-space: nowrap;
  }
}

/* Global styles set p/table/ul/li to 1rem; override for the sidebar */
.about-sidebar p,
.about-sidebar table,
.about-sidebar tr,
.about-sidebar td,
.about-sidebar ul,
.about-sidebar li,
.about-sidebar a {
  font-size: 0.78rem !important;
}

.about-sidebar #title {
  font-size: 0.95rem;
  margin-top: 1.4rem;
}

.about-sidebar #program {
  font-size: 0.86rem;
}

.about-sidebar #contact-table {
  font-size: 0.78rem;
}

.about-sidebar h3 {
  font-size: 1.15rem;
}

.about-sidebar #education {
  font-size: 0.78rem;
}

.about-sidebar #education li {
  margin-bottom: 0.7rem;
}

@media (min-width: 768px) {
  .about-sidebar img.img-thumbnail {
    width: 88%;
  }
}

p {
  line-height: 1.7;
  margin-bottom: 1.6rem;
}

blockquote footer {
  margin-top: 1.5rem;
  margin-left: 2rem;
  text-indent: -1.8rem;
}

/* Publications list styling */
.publications {
  list-style-type: none;
  padding-left: 0;
}

.publications li {
  margin-bottom: 0.8rem;
  padding-bottom: 0.2rem;
  border-bottom: none;
  line-height: 1.55;
}

.publications li:last-child {
  border-bottom: none;
}

.publications strong {
  color: #20364c;
}

.publications .btn-xs {
  margin-top: 5px;
  margin-right: 5px;
  font-size: 11px;
  padding: 3px 8px;
}

/* Links */
#main-container a {
  color: var(--accent);
  font-weight: 600;
}

#main-container a:hover {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  text-decoration: none;
  padding-bottom: 2px;
}

/* Contact info area, index.html page ------------------------------------------------- */
#main-container {
  padding-bottom: 1.5rem;
}

#title {
  color: var(--heading);
  margin-top: 2rem;
  font-weight: 600;
  font-size: 1.2rem;
  text-align: center;
}

#program {
  color: var(--muted);
  text-align: center;
}

#contact-table td {
  vertical-align: top;
}

#contact-table i {
  color: var(--muted);
}

iframe {
  padding: 3px;
  border: 1px solid lightgray;
}

.img-thumbnail {
  border-radius: 8px;
  border-color: var(--border);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

/* Format the nav  ---------------------------------------------------------- */
nav {
  padding-top: 1rem;
  padding-bottom: 2rem;
}

.navbar-default .navbar-nav>li>a {
  color: var(--heading);
  font-weight: 500;
}

.nav .montserrat:hover,
.nav .montserrat:focus-within,
.nav .montserrat:focus,
.navbar-inverse .navbar-nav>li>a:hover,
.navbar-inverse .navbar-nav>li>a:focus-within,
.navbar-inverse .navbar-nav>li>a:focus {
  background: white !important;
  border-radius: 1px;
  color: #20364c !important;
}

.navbar-default .navbar-nav>li>a:active {
  background: white !important;
}

@media only screen and (min-width: 768px) {
  .navbar-default .navbar-nav>.open>a {
    background: white !important;
    border-right: 1px solid lightgray;
    border-top: 1px solid lightgray;
    border-left: 1px solid lightgray;
  }

  /* hover effects */
  /* Bubble Bottom */
  .hvr-bubble-bottom {
    display: inline-block;
    vertical-align: bottom;
    -webkit-transform: perspective(1px) translateZ(0);
    transform: perspective(1px) translateZ(0);
    box-shadow: 0 0 1px rgba(0, 0, 0, 0);
    position: relative;
  }

  .hvr-bubble-bottom:before {
    pointer-events: none;
    position: absolute;
    z-index: -1;
    content: '';
    border-style: solid;
    -webkit-transition-duration: 0.3s;
    transition-duration: 0.3s;
    -webkit-transition-property: transform;
    transition-property: transform;
    left: calc(50% - 10px);
    bottom: 0;
    border-width: 10px 10px 0 10px;
    border-color: white transparent transparent transparent;
  }

  .hvr-bubble-bottom:hover:before, .hvr-bubble-bottom:focus:before, .hvr-bubble-bottom:active:before {
    -webkit-transform: translateY(10px);
    transform: translateY(10px);
  }
}

@media (max-width: 767px) {
  .navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover {
    color: darkslategray !important;
  }
}

.navbar-inverse {
  background: #20364c;
}

.navbar-brand {
  font-size: 1.5rem !important;
  font-weight: 500;
  color: white !important;
}

/* Navbar link size */
.navbar-default .navbar-nav>li>a {
  font-size: 1rem !important;
}

.navbar-inverse .navbar-nav>li>a {
  color: white;
}

.navbar {
  border-radius: 0;
}

.active {
  /* background: white; */
  border-radius: 2px;
}

.navbar .dropdown-menu {
  margin-right: -1px;
}

/* Utility classes for positioning content ----------------------------------- */
.padding-left-1 {
  padding-left: 1rem !important;
}

.padding-left-2 {
  padding-left: 2rem !important;
}

.push-down-1 {
  margin-top: 1rem !important;
}

.push-down-2 {
  margin-top: 2rem !important;
}

.push-down-3 {
  margin-top: 3rem !important;
}

.push-down-4 {
  margin-top: 4rem !important;
}

.pull-up-1 {
  margin-top: -1rem !important;
}

.pull-up-2 {
  margin-top: -1rem !important;
}

.pull-up-3 {
  margin-top: -1rem !important;
}

.spacer-div-3 {
  height: 45px !important;
}

#link-to-docs,
#link-to-teaching-philosophy {
  color: #1585cf;
}

#link-to-docs:hover,
#link-to-docs:active,
#link-to-docs:visited,
#link-to-docs:focus {
  border: 1px solid #1585cf !important;
  padding-bottom: 6px !important;
  background: transparent !important;
}

/* Setting Lines after headers */
h3 {
  position: relative;
}

/* Format the footer ---------------------------------------------------------- */
footer {
  padding-bottom: 2rem;
}

.copyright-text {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  font-weight: 400;
  letter-spacing: 0.3px;
}

.copyright-text i {
  margin-right: 0.25rem;
  font-size: 0.85rem;
}

/* Format the social-professional network icons ------------------------------ */
.social-icons {
  list-style-type: none;
}

.social-icons li {
  padding-left: 2rem;
  display: inline-block;
}

.social-icons li a {
  color: #1585cf;
}

.social-icons li a:hover {
  opacity: .8;
  text-decoration: none !important;
}

/* Projects page --------------------------------------------------------- */
#projects .panel {
  margin-left: 2rem;
}

.panel {
  border-color: var(--border);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

#links .panel {
  box-shadow: none;
}

#projects .panel-default {
  border-radius: 3px;
}

#projects .panel-default {
  border-radius: 3px;
}

#projects .panel-heading {
  border-bottom: none;
}

#projects .panel-heading,
#projects .panel-footer {
  text-align: center;
  background: var(--panel);
  padding: 2rem;
}

#projects .panel-footer {
  border-top: none;
}

#projects .panel-heading h5 {
  color: black;
  font-style: normal;
  font-weight: 500;
  font-size: 1.2rem;
}

/* All Links panels ---------------------------------------------- */
#links .panel-default {
  border-radius: 0;
  padding: 0;
  border: none;
  box-shadow: none;
}

#links .panel-heading {
  border-bottom: none;
}

#links img {
  margin-right: 3rem;
  margin-bottom: 2rem;
  width: 100px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* Lists ------------------------------------------------------------- */
/* Add bottom margin to the description lists */
dd {
  margin-bottom: 1rem;
}

/* Set the anchor element to display block */
.list-group li a {
  display: block;
}

/* Narrow the viewport ----------------------------------------------- */
/* Customize container */
@media only screen and (min-width: 767px) {
  .container {
    max-width: 780px;
  }
}

/* Responsive: Portrait tablets and up */
@media only screen and (min-width: 768px) {

  /* Remove the padding we set earlier */
  .container {
    max-width: 1120px;
  }
}

/* Accordion panels ----------------------------------------------------- */
/* plus glyph for showing collapsible panels */
.panel-heading .accordion-plus-toggle:before {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  content: "\f068";
  float: right;
  color: silver;
}

.panel-heading .accordion-plus-toggle.collapsed:before {
  content: "\f067";
  color: silver;
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}

/* arrow glyph for showing collapsible panels */
.panel-heading .accordion-arrow-toggle:before {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  content: "\f078";
  float: right;
  color: silver;
}

.panel-heading .accordion-arrow-toggle.collapsed:before {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  content: "\f054";
  color: silver;
}

/* sets the link to the width of the entire panel title */
.panel-title>a {
  display: block;
}

/* Back to top button */

/* Back to top button ----------------------------------------------------- */
#topper {
  display: none;
  position: fixed;
  bottom: 300px;
  right: 0px;
  z-index: 99;
  border: none;
  outline: none;
  background-color: #1585cf;
  color: white;
  padding: 12px 6px 12px 6px;
  border-radius: 4px 0 0 4px;
  cursor: pointer;
  font-size: 1.6rem;
}

#topper:hover {
  background-color: #1585cf;
  opacity: .8;
}

/* Make the website width responsive to larger screens */
@media (min-width: 1200px) {
  .container {
    width: 90%;
    max-width: 1280px;
  }
}

/* Mobile adaptive adjustments */
@media (max-width: 767px) {
  /* Reduce base font size for better readability on small screens */
  p, table, tr, td, ul, li, blockquote, nav, a, footer, dl, dt, dd {
      font-size: 1rem; 
  }

  /* Reduce header margins and size */
  h1 {
      margin-bottom: 2rem;
      font-size: 2.1rem;
  }

  h3 {
      margin-top: 1.5rem !important;
  }

  /* Reduce spacer height */
  .spacer-div-3 {
      height: 25px !important;
  }

  /* Adjust navbar brand size to fit better */
  .navbar-brand {
      font-size: 1.35rem !important;
  }

  /* Remove left margin on project panels for mobile */
  #projects .panel {
      margin-left: 0;
  }

  /* Adjust back-to-top button position */
  #topper {
      bottom: 60px;
      right: 10px;
  }
  
  /* Make embedded iframes (like CV) more accessible */
  iframe {
      max-height: 500px;
  }
}
