/*
 * Original Template Name: Developer
 * Original Author: Xiaoying Riley
 * Twitter: @3rdwave_themes
 * Website: http://themes.3rdwavemedia.com/
 * Modified by: HTMLy Team
 * Updated: Bootstrap 5.3.8 + Light/Dark mode support
*/

/* ======= CSS Custom Properties (Light Mode Default) ======= */
:root {
  --color-body-bg: #dae3e7;
  --color-body-text: #434343;
  --color-heading: #5f6b77;
  --color-header-bg: #f5f5f5;
  --color-header-border: #778492;
  --color-header-name: #49515a;
  --color-header-desc: #778492;
  --color-section-bg: #fff;
  --color-link: #337ab7;
  --color-link-muted: #778492;
  --color-link-muted-hover: #5f6b77;
  --color-footer-bg: #32383e;
  --color-footer-text: #a1aab4;
  --color-footer-link: #fb866a;
  --color-tag-bg: #fafafa;
  --color-tag-border: #f0f0f0;
  --color-tag-text: #778492;
  --color-breadcrumb-bg: #fff;
  --color-table-border: #ddd;
  --color-table-text: #333333;
  --color-social-bg: #b0b7bf;
  --color-social-hover: #778492;
  --color-active-bg: #eee;
}

/* ======= Dark Mode Overrides ======= */
[data-bs-theme="dark"] {
  --color-body-bg: #1a1d21;
  --color-body-text: #c9d1d9;
  --color-heading: #adbac7;
  --color-header-bg: #22272e;
  --color-header-border: #444c56;
  --color-header-name: #cdd9e5;
  --color-header-desc: #768390;
  --color-section-bg: #2d333b;
  --color-link: #58a6ff;
  --color-link-muted: #8b949e;
  --color-link-muted-hover: #adbac7;
  --color-footer-bg: #161b22;
  --color-footer-text: #768390;
  --color-footer-link: #f78166;
  --color-tag-bg: #2d333b;
  --color-tag-border: #444c56;
  --color-tag-text: #8b949e;
  --color-breadcrumb-bg: #2d333b;
  --color-table-border: #444c56;
  --color-table-text: #adbac7;
  --color-social-bg: #444c56;
  --color-social-hover: #768390;
  --color-active-bg: #373e47;
}

/* ======= Base ======= */
body {
  font-family: 'Lato', arial, sans-serif;
  color: var(--color-body-text);
  background: var(--color-body-bg);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--color-heading);
}
.h1, h1 {
  font-size: 24px;
}
.h2, h2 {
  font-size: 20px;
}
.h3, h3 {
  font-size: 18px;
}
.h4, h4 {
  font-size: 16px;
}
.h5, h5 {
  font-size: 14px;
}
.h6, h6 {
  font-size: 12px;
}
p {
  margin: 1em 0;
}
.aside p, .related p {
  margin: 0 0 10px 0;
}
blockquote {
  margin: 1em 0;
  font-size: 20px;
  font-family: "Source Sans", sans-serif;
}
blockquote p {
  margin: 0;
}
img {
  display: block;
  height: auto;
  max-width: 100%;
}
img:hover {
  opacity: 0.8;
}
a {
  color: var(--color-link);
  transition: all 0.4s ease-in-out;
}
a:hover {
  text-decoration: underline;
}
a:focus {
  text-decoration: none;
}
.btn,
a.btn {
  transition: all 0.4s ease-in-out;
  font-family: 'Montserrat', arial, sans-serif;
  padding: 5px 10px;
  font-size: 12px;
}
.btn .fa,
a.btn .fa {
  margin-right: 5px;
}
.btn:focus,
a.btn:focus {
  color: #fff;
}
a.btn-cta-primary,
.btn-cta-primary {
  background: #54ba4e;
  border: 1px solid #54ba4e;
  color: #fff;
  text-transform: uppercase;
  font-size: 12px;
}
a.btn-cta-primary:hover,
.btn-cta-primary:hover {
  background: #49ac43;
  border: 1px solid #49ac43;
  color: #fff;
}
a.btn-cta-secondary,
.btn-cta-secondary {
  background: #479fc8;
  border: 1px solid #479fc8;
  color: #fff;
  text-transform: uppercase;
  font-size: 12px;
}
a.btn-cta-secondary:hover,
.btn-cta-secondary:hover {
  background: #3893bd;
  border: 1px solid #3893bd;
  color: #fff;
}
.text-highlight {
  color: #32383e;
}
.label-theme {
  background: #3893bd;
  font-size: 12px;
}
a.dotted-link {
  border-bottom: 1px dotted var(--color-link-muted);
  color: var(--color-link-muted);
}
a.dotted-link:hover {
  text-decoration: none;
  color: var(--color-link-muted-hover);
}
pre {
  margin: 1em 0;
}

.tags {
  margin-right: 5px;
}

.tags a {
  background-color: #f9f2f4;
  border-radius: 4px;
  color: #c7254e;
  padding: 2px 4px;
}

[data-bs-theme="dark"] .tags a {
  background-color: #2d333b;
  color: #f78166;
}

/*-------------------------
        Table
--------------------------*/
table {
  border: none;
  width: 100%;
  color: var(--color-table-text);
  border: 1px solid var(--color-table-border);
  margin: 1em 0;
  white-space: pre-wrap;
  word-wrap: break-word;
}
th, td {
  padding: 5px 10px;
  border: none;
}
th {
  border-bottom: 1px solid var(--color-table-border);
  border-right: 1px solid var(--color-table-border);
  font-size: 16px;
}
td {
  border: 1px solid var(--color-table-border);
  border-top: none;
  border-left: none;
}

/* ======= Header ======= */
.header {
  padding: 30px 0;
  background: var(--color-header-bg);
  border-top: 10px solid var(--color-header-border);
}
.header .btn {
  margin-top: 60px;
  font-weight: bold;
}
.header .logo {
  /* width: 150px;
  height: 150px;
    border-radius: 75px; */
  overflow: hidden;
  margin-right: 20px;

}
.header .logo-image {
  /* width: 150px;
  height: 150px;*/
}
.header .branding .name {
  color: var(--color-header-name);
  font-size: 34px;
  margin-bottom: 5px;
  margin-top: 15px;
}
.header .branding .name a {
  color: var(--color-header-name);
}
.header .branding .desc {
  color: var(--color-header-desc);
  font-family: "Lato", arial, sans-serif;
  font-weight: 400;
  font-size: 20px;
  margin-top: 0;
  margin-bottom: 10px;
}
.header .branding .social a {
  background: var(--color-social-bg);
  width: 36px;
  height: 36px;
  display: inline-block;
  border-radius: 50%;
  color: #fff;
  text-align: center;
}
.header .branding .social a:hover {
  background: var(--color-social-hover);
}
.header .branding .social a .fa {
  font-size: 20px;
  padding-top: 8px;
}
.header .menu .nav a,
.header .main-nav .nav a {
  color: var(--color-link-muted);
}
.header .menu .nav li.active,
.header .main-nav .nav li.active {
  background-color: var(--color-active-bg);
}

/*--------------------
 Menu and search
--------------------*/
.header .navbar-collapse {
  box-shadow: none;
}
/* BS5: navbar-toggler replaces navbar-toggle */
.header .main-nav .navbar-toggler {
  margin-right: 0;
  margin-top: 8px;
  padding: 4px 8px;
  border: 1px solid var(--color-header-border);
  color: var(--color-link-muted);
}
.header .main-nav .navbar-toggler:focus {
  outline: 0 none;
  box-shadow: none;
}
.header .main-nav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28119, 132, 146, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
[data-bs-theme="dark"] .header .main-nav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28173, 186, 199, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.dropdown-menu .active > a,
.dropdown-menu .active > a:focus,
.dropdown-menu .active > a:hover {
  background-color: var(--color-active-bg);
  color: var(--color-body-text);
  outline: 0 none;
  text-decoration: none;
}
.dropdown-menu.searchbox {
  min-width: 280px;
}
.navbar-search {
  padding: 10px;
}
.navbar-search.search .form-control {
  height: 35px;
  background: var(--color-section-bg);
  color: var(--color-body-text);
  font-size: 11px;
}
.navbar-search.search .btn-submit {
  width: 35px;
  height: 35px;
  border: none;
  background: #A8BEE3;
  border-radius: 0 4px 4px 0;
  color: #fff;
}
.navbar-search.search .btn-submit:hover {
  background: #658BCD;
}
.search-wrapper {
  padding-right: 15px;
  padding-left: 15px;
}

/* ======= Sections======= */
.sections-wrapper {
  padding-top: 60px;
  padding-bottom: 30px;
}
.section {
  margin-bottom: 30px;
}
.comment-wrapper.section {
  margin-bottom: 30px;
}
.section .section-inner {
  background: var(--color-section-bg);
  padding: 30px;
}
.section .heading {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--color-heading);
  font-size: 20px;
}
.section .content .more-link .fa {
  margin-right: 5px;
  font-size: 14px;
}
.breadcrumb {
  background-color: var(--color-breadcrumb-bg);
  border-radius: 0px;
  list-style: outside none none;
  margin-bottom: 20px;
  padding: 10px 30px;
  font-family: "Source Sans", sans-serif;
}

/* About Section */
/* Latest Section */
.post .item {
  margin-bottom: 10px;
}
.post .item .title .label {
  margin-left: 5px;
  font-size: 12px;
}
.post .item .title a {
  color: var(--color-link-muted);
}
.post .item .title a:hover {
  color: var(--color-link-muted-hover);
}
.post .item .project-image:hover {
  opacity: 0.8;
}
.post .item .title {
  margin-bottom: 10px;
  font-size: 24px;
  margin-top: 0;
}
.post .item .meta {
  color: var(--color-link-muted);
  font-family: "Source Sans", sans-serif;
  font-size: 16px;
  font-weight: 400;
  margin: 0;
}
.post .item img {
  margin: 1em 0px;
}
.post .featured-image img {
  margin-top: 0;
}
.post .item .info, .post .item .desc {
  margin-bottom: 1em;
}
.inpost .post .item .desc {
  margin: 0;
}
.post .featured {
  margin-bottom: 1em;
}
.post .featured-image {
  position: relative;
}
.item .quote .fa-quote-left {
  color: var(--color-link);
  margin-right: 15px;
}
.item .quote .fa-quote-right {
  color: var(--color-link);
  margin-left: 15px;
}
.featured-quote blockquote {
  font-size: 26px;
  margin: 0;
  border: none;
}
.featured-link {
  font-size: 26px;
  font-family: "Source Sans", sans-serif;
}
.featured-link .fa {
  margin-right: 5px;
}
.tab {
  margin-bottom: 20px;
}
.pager {
  margin-top: 0px;
  margin-bottom: 30px;
}
.in-profile .pager {
  margin-bottom: 0px;
}

/* share section */
.share {
  padding-top: 0;
}
.in-post .share {
  padding-top: 0;
}
.share a {
  color: #479fc8;
  padding: 4px;
  vertical-align: middle;
  display: inline-block;
  line-height: 1.5;
  margin-bottom: 0;
}

/* BS5: float-end replaces pull-right */
.share.float-end,
span.share.float-end {
  float: right !important;
}

/* recent-posts Section */
.recent-posts .item {
  margin-bottom: 20px;
}
.recent-posts .item .title {
  font-size: 16px;
  line-height: 1.3;
}
.recent-posts .item .title a {
  color: var(--color-link-muted);
}
.recent-posts .item .title a:hover {
  color: var(--color-link-muted-hover);
}
.recent-posts .item:last-child {
  margin-bottom: 0;
}

/* archive Section */
ul.archivegroup {
  margin: 0;
  padding: 0;
}
.archivegroup .expanded ul {
  display: block;
}
.archivegroup .collapsed ul {
  display: none;
}
.archivegroup li.expanded, .archivegroup li.collapsed {
  list-style: outside none none;
}
ul.month {
  list-style: none;
  padding: 0;
  margin: 0.25em 0 0.25em 1.3em;
}

/* Category list section */
.category-list ul {
  padding-left: 20px;
}

/* Tag section */
.tag-cloud a {
  background: var(--color-tag-bg);
  border: 1px solid var(--color-tag-border);
  border-radius: 4px;
  font-size: 14px;
  line-height: 37px;
  padding: 5px 10px;
  margin-right: 5px;
  color: var(--color-tag-text);
}
.tag-cloud a:hover {
  color: var(--color-link-muted-hover);
}

/* Related section */
.related .item {
  margin-bottom: 0px;
}
.related .item .title {
  font-size: 16px;
  margin-top: 0;
}
.related .item .title .label {
  font-size: 12px;
  margin-left: 5px;
}
.related .item .title a {
  color: var(--color-link-muted);
}
.related .item .title a:hover {
  color: var(--color-link-muted-hover);
}
.related .item .project-image:hover {
  opacity: 0.8;
}
.related .divider {
  margin-bottom: 60px;
}

/* List section */
.list ul li {
  margin-bottom: 10px;
}
.list ul li .fa {
  margin-right: 5px;
}
.list ul li a {
  color: var(--color-link-muted);
}
.list ul li a:hover {
  color: var(--color-link-muted-hover);
}

/* ======= Footer ======= */
.footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 10px 0;
  font-size: 14px;
}
.footer .copyright {
  line-height: 1.6;
  color: var(--color-footer-text);
  font-size: 14px;
}
.footer p {
  margin: 0;
  color: var(--color-footer-text);
}
.footer a {
  color: var(--color-footer-link);
}
.footer .fa-heart {
  color: var(--color-footer-link);
}

/* ======= Responsive ======= */
/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
  .header {
    text-align: center;
  }
  .header .logo {
    float: none !important;
    margin: 0 auto;
  }
  .header .branding {
    float: none !important;
    text-align: center;
  }
  .header .btn {
    margin-top: 30px;
    float: none !important;
  }
  .sections-wrapper {
    padding-top: 30px;
    padding-bottom: 0px;
  }
  .project-image {
    margin-bottom: 15px;
  }
  .main-nav .navbar-toggler,
  #navbar {
    float: none !important;
    text-align: center;
  }
}

/* Large devices (large desktops, 1400px and up) */
@media (min-width: 1400px) {
  .container {
    max-width: 1360px;
  }
}

.pagination {
  margin-top: 0;
  margin-bottom: 15px;
}

.feed-link {
  display: inline;
  margin: 0 0 0 10px;
  float: right;
}

#more {
  display: block;
  height: 1rem;
  margin-top: -1rem;
  box-shadow: none;
  border: none;
}

.social-logo a:before {
  padding-top: 6px;
}

/* ======= Lazyload image transition ======= */
/*
 * Flow:
 *   1. img.lazyload src="loading.gif"  → opacity:0 base, overridden by [src$] → spinner visible
 *   2. IntersectionObserver: src="real.jpg" → img.lazyload[src$="loading.gif"] 失效
 *                                           → opacity:0 (invisible while loading)
 *   3. load event → JS adds class lazyloaded, removes lazyload
 *                 → img.lazyloaded opacity:1 with fade-in transition
 */
img.lazyload {
  opacity: 0;    /* hidden while waiting for real image */
  min-height: 1px;
}
/* Show loading.gif spinner while it's the active placeholder src */
img.lazyload[src$="loading.gif"] {
  display: block;
  opacity: 1;    /* override to show spinner */
  width: 40px;
  height: 40px;
  margin: 1em auto;
}
/* Real image loaded: fade in (JS adds this class via load event) */
img.lazyloaded {
  display: block;
  opacity: 1;
  transition: opacity 0.4s ease-in-out;
}

/* ======= Nav tabs dark mode fix ======= */
[data-bs-theme="dark"] .nav-tabs .nav-link {
  color: var(--color-link-muted);
}
[data-bs-theme="dark"] .nav-tabs .nav-link.active {
  color: var(--color-heading);
  background-color: var(--color-section-bg);
  border-color: var(--color-table-border) var(--color-table-border) var(--color-section-bg);
}

/* ======= Dropdown dark mode fix ======= */
[data-bs-theme="dark"] .dropdown-menu {
  background-color: var(--color-section-bg);
  border-color: var(--color-table-border);
}
[data-bs-theme="dark"] .dropdown-item {
  color: var(--color-body-text);
}
[data-bs-theme="dark"] .dropdown-item:hover {
  background-color: var(--color-active-bg);
}

/* ======= Section inner dark mode ======= */
[data-bs-theme="dark"] .section .section-inner {
  background: var(--color-section-bg);
}
[data-bs-theme="dark"] .breadcrumb {
  background-color: var(--color-breadcrumb-bg);
}
[data-bs-theme="dark"] .breadcrumb-item + .breadcrumb-item::before {
  color: var(--color-link-muted);
}
[data-bs-theme="dark"] .breadcrumb-item a {
  color: var(--color-link);
}
