/* Nianlong Li — Academic Layout */
:root {
  color-scheme: light;
  --nl-primary: #2962ff;
  --nl-primary-dark: #0039cb;
  --nl-text: rgba(0, 0, 0, 0.8);
  --nl-muted: rgba(0, 0, 0, 0.54);
  --nl-heading: #313131;
  --nl-bg-odd: #ffffff;
  --nl-bg-even: #f7f7f7;
  --nl-border: #dee2e6;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

html, body.nl-site {
  background: #ffffff !important;
  color: var(--nl-text) !important;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 18px !important;
  line-height: 1.65 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
}

/* Hide parent Flatsome chrome */
body.nl-site .header-wrapper,
body.nl-site #header,
body.nl-site .footer-wrapper,
body.nl-site #footer,
body.nl-site .absolute-footer,
body.nl-site .back-to-top {
  display: none !important;
}

/* Preserve icon fonts against any parent overrides */
body.nl-site .fas,
body.nl-site .fa-solid {
  font-family: "Font Awesome 5 Free" !important;
  font-weight: 900 !important;
}
body.nl-site .far {
  font-family: "Font Awesome 5 Free" !important;
  font-weight: 400 !important;
}
body.nl-site .fab {
  font-family: "Font Awesome 5 Brands" !important;
  font-weight: 400 !important;
}
body.nl-site [class*="ftwp-icon"] {
  font-family: "ftwp-icon" !important;
}

/* Base typography */
body.nl-site h1,
body.nl-site h2,
body.nl-site h3,
body.nl-site h4 {
  font-family: "Montserrat", sans-serif !important;
  font-weight: 400;
  color: var(--nl-heading);
  line-height: 1.25;
}

body.nl-site a {
  color: var(--nl-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
body.nl-site a:hover {
  color: var(--nl-primary-dark);
  text-decoration: underline;
}

body.nl-site p {
  margin: 0 0 1rem 0;
}

.nl-line-break {
  display: block;
}

/* Container & Grid */
.nl-container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 18px;
  box-sizing: border-box;
}

.nl-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.nl-col-4,
.nl-col-8 {
  padding: 0 15px;
  box-sizing: border-box;
  width: 100%;
}

@media (min-width: 992px) {
  .nl-col-4 {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
  }
  .nl-col-8 {
    flex: 0 0 66.6667%;
    max-width: 66.6667%;
  }
}

/* Fixed Navbar (exact Academic 4.8.0: 70px white shadow) */
body.nl-site .nl-header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: #ffffff !important;
  box-shadow: 0 0.125rem 0.25rem 0 rgba(0, 0, 0, 0.11);
  z-index: 1030;
  display: flex;
  align-items: center;
}

body.nl-site.admin-bar .nl-header {
  top: 32px;
}

body.nl-site .nl-nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

body.nl-site .nl-brand {
  font-family: "Montserrat", sans-serif !important;
  font-size: 19.4px;
  font-weight: 700;
  color: #2b2b2b !important;
  white-space: nowrap;
  text-decoration: none !important;
  margin-right: 16px;
}

body.nl-site .nl-nav {
  flex: 1;
}

body.nl-site .nl-nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 6px;
}

body.nl-site .nl-nav-list li {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.nl-site .nl-nav-list a {
  display: block;
  padding: 8px 12px;
  font-size: 16px;
  font-weight: 400;
  color: #34495e !important;
  text-decoration: none !important;
}

body.nl-site .nl-nav-list a:hover {
  color: var(--nl-primary) !important;
}

body.nl-site .nl-nav-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.nl-site .nl-icon-btn,
body.nl-site .nl-burger {
  appearance: none !important;
  -webkit-appearance: none !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #34495e !important;
  cursor: pointer;
  padding: 8px 10px !important;
  margin: 0 !important;
  min-height: 0 !important;
  line-height: 1 !important;
  font-size: 18px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

body.nl-site .nl-icon-btn:hover,
body.nl-site .nl-burger:hover {
  color: var(--nl-primary) !important;
  background: transparent !important;
}

body.nl-site .nl-burger {
  display: none !important;
}

/* Search Modal */
body.nl-site .nl-search-modal {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--nl-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 1029;
  padding: 20px 0;
}
body.nl-site .nl-search-modal[hidden] {
  display: none !important;
}
.nl-search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.nl-search-title {
  font-family: "Montserrat", sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--nl-heading);
}
.nl-search-form {
  display: flex;
  gap: 10px;
}
body.nl-site .nl-search-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 16px;
  margin: 0 !important;
  background: #fff !important;
  color: #212529 !important;
}

/* Main spacing below fixed header */
.nl-main {
  padding-top: 70px;
  min-height: calc(100vh - 150px);
}

/* Home Sections */
.nl-section {
  padding: 96px 0;
  position: relative;
}
.nl-section-odd {
  background: var(--nl-bg-odd) !important;
  color: var(--nl-text) !important;
}
.nl-section-even {
  background: var(--nl-bg-even) !important;
  color: var(--nl-text) !important;
}

.nl-sec-title {
  font-family: "Montserrat", sans-serif !important;
  font-size: 40px;
  font-weight: 400;
  color: var(--nl-heading);
  margin: 0 0 20px 0;
  line-height: 1.2;
}

/* About / Profile */
.nl-profile {
  text-align: center;
  padding: 20px 10px;
}
.nl-avatar {
  width: 270px;
  height: 270px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
  display: block;
}
.nl-portrait-title {
  margin-top: 20px;
}
.nl-name {
  font-family: "Montserrat", sans-serif;
  font-size: 32px;
  font-weight: 300;
  color: #000000;
  margin: 0 0 10px 0;
  line-height: 1.25;
}
.nl-role {
  font-size: 18px;
  font-weight: 300;
  color: var(--nl-muted);
  margin: 0 0 10px 0;
  line-height: 1.4;
}
.nl-org {
  font-size: 17px;
  font-weight: 300;
  color: var(--nl-muted);
  margin: 0 0 10px 0;
  line-height: 1.4;
}
.nl-org a {
  color: var(--nl-primary);
}

.nl-network {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 24px 0 0 0;
  gap: 14px;
}
.nl-network li {
  margin: 0;
  list-style: none;
}
.nl-network a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--nl-primary) !important;
  text-decoration: none !important;
  transition: transform 0.2s ease, color 0.2s ease;
}
.nl-network a:hover {
  transform: scale(1.18);
  color: var(--nl-primary-dark) !important;
}

.nl-about-bio p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--nl-text);
}

.nl-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0 26px 0;
}
.nl-notice img {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  margin-top: 2px;
}
.nl-notice-text {
  color: #dc2626;
  font-size: 17px;
  line-height: 1.5;
}

.nl-edu-block {
  margin-top: 24px;
}
.nl-sub-heading {
  font-family: "Montserrat", sans-serif !important;
  font-size: 22px;
  font-weight: 600;
  color: var(--nl-heading);
  margin: 0 0 14px 0;
}
.nl-edu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nl-edu-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 14px 0;
  list-style: none;
}
.nl-edu-ico {
  font-size: 20px;
  color: var(--nl-heading);
  margin-top: 2px;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
}
.nl-edu-course {
  font-size: 17px;
  color: var(--nl-text);
  margin: 0 0 2px 0 !important;
  line-height: 1.4;
}
.nl-edu-inst {
  font-size: 15px;
  color: var(--nl-muted);
  margin: 0 !important;
  line-height: 1.4;
}

/* News Table */
body.nl-site .nl-news-table,
body.nl-site .nl-service-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px 0;
  background: transparent;
}
body.nl-site .nl-news-table td {
  border-top: 1px solid #e5e7eb;
  border-bottom: 0;
  border-left: 0;
  border-right: 0;
  padding: 10px 10px;
  vertical-align: top;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--nl-text);
  text-align: left;
}
body.nl-site .nl-news-table tr:first-child td {
  border-top: 0;
}
body.nl-site .nl-news-date {
  white-space: nowrap;
  font-family: "Roboto Mono", monospace;
  font-size: 15px;
  color: #374151;
  width: 105px;
  padding-left: 0 !important;
}

/* Services Table */
body.nl-site .nl-service-table th {
  border-top: 0;
  border-bottom: 2px solid #dee2e6;
  padding: 10px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--nl-heading);
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
}
body.nl-site .nl-service-table td {
  border-top: 1px solid #dee2e6;
  border-bottom: 0;
  padding: 12px 0;
  font-size: 17px;
  color: var(--nl-text);
  text-align: left;
}

/* Publication Cards */
.nl-pub-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
}
.nl-pub-body {
  flex: 1;
  min-width: 0;
}
.nl-pub-title {
  font-family: "Montserrat", sans-serif !important;
  font-size: 21px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  margin: 0 0 8px 0 !important;
}
.nl-pub-title a {
  color: #151515 !important;
  text-decoration: none !important;
}
.nl-pub-title a:hover {
  color: var(--nl-primary) !important;
}
.nl-pub-summary-link {
  color: inherit !important;
  text-decoration: none !important;
}
.nl-pub-summary {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--nl-text);
  margin: 0 0 8px 0;
}
.nl-pub-authors {
  font-size: 15px;
  line-height: 1.5;
  color: var(--nl-muted);
  margin: 0 0 10px 0;
}
.nl-pub-authors strong {
  color: #151515;
  font-weight: 700;
}
.nl-pub-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
body.nl-site .nl-btn {
  display: inline-block;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--nl-primary) !important;
  background: transparent !important;
  border: 1px solid var(--nl-primary) !important;
  border-radius: 3px;
  text-decoration: none !important;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
body.nl-site .nl-btn:hover {
  background: var(--nl-primary) !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

.nl-pub-thumb {
  width: 150px;
  flex-shrink: 0;
}
.nl-pub-thumb img {
  width: 150px;
  height: auto;
  display: block;
  border-radius: 2px;
  object-fit: cover;
}

.nl-see-all {
  margin-top: 24px;
  text-transform: uppercase;
  font-size: 15px;
  letter-spacing: 0.04em;
}
.nl-see-all a {
  color: #151515 !important;
  font-weight: 500;
}
.nl-see-all a:hover {
  color: var(--nl-primary) !important;
}

/* Contact */
.nl-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nl-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin: 0 0 22px 0;
  font-size: 18px;
  line-height: 1.6;
  list-style: none;
}
.nl-contact-ico {
  font-size: 26px;
  color: var(--nl-muted);
  width: 32px;
  text-align: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Inner pages & Single publication */
.nl-inner-page {
  padding-top: 118px;
  padding-bottom: 72px;
  background: #ffffff;
}
.nl-article-wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 18px;
  box-sizing: border-box;
}
.nl-page-h1,
.nl-single-h1 {
  font-family: "Montserrat", sans-serif !important;
  font-size: 36px;
  font-weight: 400;
  color: var(--nl-heading);
  margin: 0 0 16px 0;
  line-height: 1.25;
}
.nl-single-meta {
  font-size: 15px;
  color: var(--nl-muted);
  margin: 0 0 22px 0;
}
.nl-single-hero {
  margin: 22px 0 28px 0;
}
.nl-featured-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
}
.nl-entry-content {
  font-size: 18px;
  line-height: 1.7;
  color: var(--nl-text);
  text-align: left;
}
.nl-entry-content h2 {
  font-family: "Montserrat", sans-serif !important;
  font-size: 24px;
  font-weight: 600;
  margin: 28px 0 12px 0;
  color: var(--nl-heading);
}
.nl-pub-meta-authors p {
  font-size: 16.5px;
  color: var(--nl-muted);
  margin-bottom: 14px;
}
.nl-pub-meta-authors strong {
  color: #151515;
}
.nl-pub-actions {
  margin-bottom: 24px;
}
.nl-pub-abstract {
  text-align: left;
}
.nl-pub-details {
  margin-top: 26px;
  border-top: 1px solid var(--nl-border);
}
.nl-pub-row {
  display: flex;
  flex-wrap: wrap;
  padding: 14px 0;
  border-bottom: 1px solid var(--nl-border);
  gap: 12px;
}
.nl-pub-label {
  flex: 0 0 160px;
  font-weight: 700;
  color: var(--nl-heading);
  font-size: 16px;
}
.nl-pub-val {
  flex: 1;
  min-width: 200px;
  font-size: 16px;
  color: var(--nl-text);
}

/* Filter bar on /publication/ */
.nl-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 22px 0 34px 0;
}
body.nl-site .nl-filter-control {
  width: auto !important;
  max-width: 100% !important;
  padding: 8px 12px !important;
  border: 1px solid #ced4da !important;
  border-radius: 4px !important;
  font-size: 15px !important;
  line-height: 1.4 !important;
  background-color: #ffffff !important;
  background-image: none !important;
  color: #212529 !important;
  margin: 0 !important;
  height: 40px !important;
  box-shadow: none !important;
  appearance: auto !important;
  -webkit-appearance: menulist !important;
}
body.nl-site input.nl-filter-control {
  -webkit-appearance: none !important;
  appearance: none !important;
}
body.nl-site #nl-filter-q {
  flex: 1 1 240px;
  min-width: 180px;
}
body.nl-site select.nl-filter-control {
  flex: 0 0 auto;
  min-width: 140px;
  padding-right: 32px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495057' d='M2 4l4 4 4-4z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 12px 12px !important;
}

/* Tags & Author Card */
.nl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0;
}
.nl-tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 13px;
  background: #f1f5f9;
  color: #334155 !important;
  border-radius: 3px;
  text-decoration: none !important;
}
.nl-tag:hover {
  background: var(--nl-primary);
  color: #ffffff !important;
}

.nl-author-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--nl-border);
}
.nl-author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.nl-author-name {
  font-family: "Montserrat", sans-serif;
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 4px;
}
.nl-author-name a {
  color: var(--nl-heading) !important;
}
.nl-author-role {
  font-size: 14.5px;
  color: var(--nl-muted);
  margin-bottom: 8px;
}
.nl-author-bio {
  font-size: 15px;
  line-height: 1.55;
  color: var(--nl-text);
  margin: 0;
}

.nl-post-nav {
  margin-top: 28px;
}
.nl-back-link {
  font-size: 15px;
  font-weight: 500;
}

/* Footer */
.nl-footer {
  background: #ffffff;
  border-top: 1px solid #f0f0f0;
  padding: 28px 0 36px 0;
  color: var(--nl-muted);
}
.nl-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nl-powered {
  margin: 0 !important;
  font-size: 14px;
  color: var(--nl-muted);
}
.nl-back-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  font-size: 20px;
  color: var(--nl-primary) !important;
  text-decoration: none !important;
}

/* Mobile Responsive (< 992px) */
@media (max-width: 991px) {
  body.nl-site .nl-burger {
    display: inline-flex !important;
  }
  body.nl-site .nl-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--nl-border);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    padding: 10px 18px 16px 18px;
  }
  body.nl-site .nl-nav.is-open {
    display: block;
  }
  body.nl-site .nl-nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  body.nl-site .nl-nav-list a {
    width: 100%;
    padding: 10px 4px;
  }
  .nl-section {
    padding: 58px 0;
  }
  .nl-sec-title {
    font-size: 32px;
    margin-bottom: 24px;
  }
  .nl-avatar {
    width: 200px;
    height: 200px;
  }
  .nl-inner-page {
    padding-top: 98px;
  }
  .nl-page-h1,
  .nl-single-h1 {
    font-size: 28px;
  }
}

@media (max-width: 600px) {
  .nl-pub-item {
    flex-direction: column;
  }
  .nl-pub-thumb,
  .nl-pub-thumb img {
    width: 100%;
    max-width: 280px;
  }
  .nl-news-table td {
    display: block;
    padding: 4px 0 !important;
    border-top: 0 !important;
  }
  .nl-news-table tr {
    display: block;
    padding: 8px 0;
    border-top: 1px solid #e5e7eb;
  }
  .nl-news-table tr:first-child {
    border-top: 0;
  }
  .nl-author-card {
    flex-direction: column;
  }
}
