/* ============================================================
   MAIN CSS — Academic Portfolio (Bootstrap 3 Based)
   ============================================================ */

/* Global page and element settings */
body {
  font-size: 16px;
  font-family: "Open Sans", Arial, sans-serif;
  background: #FFFFFF;
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: "Montserrat", Helvetica, sans-serif;
  color: #20364c;
  font-weight: 500;
}

h1 {
  margin-bottom: 4rem;
}

h2, h3 {
  margin: 0 0 2rem !important;
  color: slategray;
}

h4 {
  text-transform: uppercase;
}

h4, h5, h6 {
  color: slategray !important;
}

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

dt {
  font-weight: 600;
}

blockquote {
  border-left-color: slategray;
  color: slategray;
}

cite {
  font-size: 1.5rem !important;
  display: block;
  margin-top: 1rem;
}

p {
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

/* Links */
#main-container a {
  color: #1585cf;
  font-weight: 500;
}

#main-container a:hover {
  color: #1585cf;
  border-bottom: 1px dashed #1585cf;
  text-decoration: none;
  padding-bottom: 2px;
}

/* Contact info area, index.html page */
#title {
  color: #20364c;
  margin-top: 2rem;
  font-weight: 600;
  font-size: 1.4rem;
  text-align: center;
}

#program {
  color: gray;
  text-align: center;
}

/* Fix email overflow in contact table */
#contact-table {
  table-layout: fixed;
  width: 100%;
}

#contact-table td {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#contact-table td a {
  word-break: break-all;
}

/* Format the nav */
nav {
  padding-top: 1rem;
  padding-bottom: 2rem;
  background-color: #222 !important;
}

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

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

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

.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 {
  border-radius: 0;
}

.active {
  border-radius: 2px;
}

/* hover effects - Bubble Bottom */
@media only screen and (min-width: 768px) {
  .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;
    transition-duration: 0.3s;
    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 {
    transform: translateY(10px);
  }
}

/* Utility classes */
.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; }

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

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

h3 span {
  background-color: white;
  padding-right: 10px;
}

h3:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0.5em;
  border-top: 2px solid slategray;
  z-index: -1;
}

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

.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;
}

/* 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;
}

/* News container */
.news-container {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  padding: 10px;
  background-color: #f9f9f9;
}

.news-container::-webkit-scrollbar {
  width: 8px;
}

.news-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.news-container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.news-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

#news {
  margin: 0;
  padding-left: 20px;
}

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

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

.university {
  color: gray;
}

/* Container widths */
@media only screen and (min-width: 767px) {
  .container {
    max-width: 730px;
  }
}

@media only screen and (min-width: 768px) {
  .container {
    max-width: 900px;
  }
}

/* Publication card styles */
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub-entry { display: flex; gap: 20px; margin-bottom: 24px; border: 1px solid #e0e6ef; border-radius: 8px; padding: 16px; background: #fff; align-items: flex-start; }
.pub-thumb { flex-shrink: 0; width: 160px; }
.pub-thumb-img { width: 160px; height: 118px; object-fit: cover; border-radius: 5px; display: block; background: #eaf2fb; }
.pub-thumb-placeholder { width: 160px; height: 118px; background: #eaf2fb; border-radius: 5px; display: flex; align-items: center; justify-content: center; color: #a0aab4; font-size: 2.2rem; }
.pub-venue-badge { display: inline-block; font-family: "Montserrat", sans-serif; font-size: 1.05rem; font-weight: 700; padding: 3px 11px; border-radius: 4px; margin-bottom: 9px; letter-spacing: .02em; }
.badge-conf { background: #1a5276; color: #fff; }
.badge-preprint { background: #7d3c98; color: #fff; }
.badge-journal { background: #1a7a4a; color: #fff; }
.badge-workshop { background: #b7600a; color: #fff; }
.pub-body { flex: 1; min-width: 0; }
.pub-title { font-family: "Montserrat", sans-serif; font-size: 1.42rem; font-weight: 600; color: #20364c; margin: 0 0 6px; line-height: 1.45; }
.pub-title a { color: #20364c; text-decoration: none; }
.pub-title a:hover { color: #1585cf; }
.pub-authors { font-size: 1.3rem; color: #444; margin-bottom: 3px; line-height: 1.5; }
.pub-venue { font-size: 1.25rem; color: #666; font-style: italic; margin-bottom: 11px; }
.pub-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pub-btn { display: inline-block; padding: 3px 13px; border: 1.5px solid #20364c; border-radius: 4px; font-family: "Montserrat", sans-serif; font-size: 1.1rem; font-weight: 600; color: #20364c; text-decoration: none; background: #fff; transition: all .18s; letter-spacing: .04em; }
.pub-btn:hover { background: #20364c; color: #fff; text-decoration: none; }

/* Project page styles */
.project-item {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid #e0e0e0;
}

.project-item:last-child {
  border-bottom: none;
}

.project-image {
  flex-shrink: 0;
  width: 250px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  background-color: #ffffff;
}

.project-image img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
  border-radius: 8px;
}

.project-image a:hover img {
  transform: scale(1.05);
}

.project-content {
  flex-grow: 1;
}

.project-title {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.6rem;
  font-weight: 600;
  color: #20364c;
}

.project-title a {
  color: #20364c;
  text-decoration: none;
  transition: color 0.2s;
}

.project-title a:hover {
  color: #1585cf;
  text-decoration: none;
}

.project-summary {
  font-size: 1.5rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.project-link {
  font-weight: 500;
  color: #1585cf;
  text-decoration: none;
  font-size: 1.5rem;
  transition: all 0.2s;
}

.project-link:hover {
  color: #1585cf;
  border-bottom: 1px dashed #1585cf;
  text-decoration: none;
  padding-bottom: 2px;
}

.project-tags {
  margin-top: 0.5rem;
}

.project-tag {
  display: inline-block;
  background: #f0f0f0;
  color: #666;
  padding: 0.2rem 0.8rem;
  border-radius: 15px;
  font-size: 1.2rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Achievement styles */
.achievement-item {
  margin-bottom: 1.5rem;
  padding-left: 0.5rem;
}

.achievement-item strong {
  color: #20364c;
}

/* Contact page */
.contact-info-table {
  margin-top: 2rem;
}

.contact-info-table td {
  padding: 0.5rem 1rem 0.5rem 0;
  vertical-align: top;
}

.contact-form {
  margin-top: 2rem;
}

.contact-form .form-control {
  border-radius: 4px;
  border: 1px solid #ccc;
  padding: 10px 15px;
  font-size: 1.4rem;
}

.contact-form .form-control:focus {
  border-color: #1585cf;
  box-shadow: 0 0 0 2px rgba(21, 133, 207, 0.1);
}

.contact-form .btn-primary {
  background-color: #1585cf;
  border-color: #1585cf;
  padding: 10px 30px;
  font-size: 1.4rem;
  font-weight: 500;
}

.contact-form .btn-primary:hover {
  background-color: #20364c;
  border-color: #20364c;
}

/* Article page styles - override h3 line-through for project articles */
.article-body h3 {
  font-family: "Montserrat", Helvetica, sans-serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: #3d5166;
  margin-top: 30px;
  margin-bottom: 10px !important;
}

.article-body h3::after {
  display: none !important;
  content: none !important;
}

.article-body h3 span {
  background: transparent;
  padding-right: 0;
}

/* Mobile Responsive */
@media (max-width: 767px) {
  p, ul, li, dl, dt, dd, blockquote, table, tr, td, th {
    font-size: 1.35rem;
  }

  h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  h2, h3 {
    font-size: 1.7rem;
  }

  .navbar-brand {
    font-size: 1.45rem !important;
    max-width: 210px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #main-container .col-sm-4 {
    text-align: center;
  }

  #main-container .col-sm-4 .img-thumbnail {
    margin: 0 auto 1.5rem auto;
  }

  #contact-table {
    max-width: 300px;
    margin: 0 auto;
  }

  .news-container {
    max-height: 180px;
  }

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

  footer .col-sm-6 {
    text-align: center;
  }

  .social-icons.pull-right,
  .social-icons {
    float: none !important;
    text-align: center;
    padding-left: 0;
    margin-top: 0.8rem;
  }

  .social-icons li {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  #topper {
    bottom: 20px;
    right: 0;
  }

  .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .pub-entry { flex-direction: column; }
  .pub-thumb, .pub-thumb-img, .pub-thumb-placeholder { width: 100%; }
  .pub-thumb-img, .pub-thumb-placeholder { height: 150px; }

  .project-item {
    flex-direction: column;
    gap: 1.5rem;
  }

  .project-image {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .project-image img {
    height: 200px;
  }

  .project-title {
    font-size: 1.4rem;
    text-align: center;
  }

  .project-summary {
    font-size: 1.35rem;
    text-align: center;
  }

  .project-link {
    font-size: 1.35rem;
    display: block;
    text-align: center;
  }

  .project-tags {
    text-align: center;
  }
}

@media (max-width: 480px) {
  p, ul, li, td, th {
    font-size: 1.25rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2, h3 {
    font-size: 1.55rem;
  }

  .navbar-brand {
    font-size: 1.25rem !important;
    max-width: 175px;
  }

  #title {
    font-size: 1.2rem;
  }

  #contact-table {
    max-width: 260px;
    font-size: 1.2rem;
  }

  img {
    max-width: 100%;
    height: auto;
  }
}
