/* ------------------------------------
 * Everforest Theme for Typecho
 *
 * 基于 Typecho 默认主题改造，采用 Everforest 深色配色。
 * Palette: https://everforest.vercel.app/palette
 *
 * @author  Everforest Theme
 * @link    https://everforest.vercel.app/palette
 * --------------------------------- */

/* ------------------
 * Palette
 * --------------- */
:root {
  /* Everforest Dark — Medium (默认档位) */
  --ef-bg-dim: #232A2E;
  --ef-bg0: #2D353B;
  --ef-bg1: #343F44;
  --ef-bg2: #3D484D;
  --ef-bg3: #475258;
  --ef-bg4: #4F585E;
  --ef-bg5: #56635F;

  --ef-fg: #D3C6AA;
  --ef-red: #E67E80;
  --ef-orange: #E69875;
  --ef-yellow: #DBBC7F;
  --ef-green: #A7C080;
  --ef-aqua: #83C092;
  --ef-blue: #7FBBB3;
  --ef-purple: #D699B6;

  --ef-grey0: #7A8478;
  --ef-grey1: #859289;
  --ef-grey2: #9DA9A0;

  --ef-bg-red: #514045;
  --ef-bg-yellow: #4D4C43;
  --ef-bg-green: #425047;
  --ef-bg-blue: #3A515D;
  --ef-bg-purple: #4A444E;
  --ef-bg-visual: #543A48;

  --ef-radius: 6px;
  --ef-transition: .2s ease;
}

/* Everforest Dark — Hard */
.ef-hard {
  --ef-bg-dim: #1E2326;
  --ef-bg0: #272E33;
  --ef-bg1: #2E383C;
  --ef-bg2: #374145;
  --ef-bg3: #414B50;
  --ef-bg4: #495156;
  --ef-bg5: #4F5B58;
}

/* Everforest Dark — Soft */
.ef-soft {
  --ef-bg-dim: #293136;
  --ef-bg0: #333C43;
  --ef-bg1: #3A464C;
  --ef-bg2: #434F55;
  --ef-bg3: #4D5960;
  --ef-bg4: #555F66;
  --ef-bg5: #5D6B66;
}

/* ------------------
 * Global style
 * --------------- */
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--ef-bg0);
  color: var(--ef-fg);
  /*font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;*/
  font-family: "Droid Serif", Georgia, "Times New Roman", "PingFang SC", "Hiragino Sans GB", "Source Han Sans CN", "WenQuanYi Micro Hei","Microsoft Yahei", serif;
  font-size: 87.5%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--ef-bg-green);
  color: var(--ef-fg);
}

a {
  color: var(--ef-green);
  text-decoration: none;
  transition: color var(--ef-transition);
}
a:hover, a:active {
  color: var(--ef-aqua);
}

pre, code {
  background: var(--ef-bg-dim);
  font-family: Menlo, Monaco, Consolas, "Lucida Console", "Courier New", monospace;
  font-size: .92857em;
}
code {
  padding: 2px 4px;
  color: var(--ef-orange);
  border-radius: 4px;
}
pre {
  padding: 8px;
  overflow: auto;
  max-height: 400px;
  border: 1px solid var(--ef-bg2);
  border-radius: var(--ef-radius);
}
pre code {
  display: block;
  padding: 3px;
  color: var(--ef-fg);
  background: transparent;
  border-radius: 0;
}

blockquote {
  margin: 1em 0;
  padding-left: 1.5em;
  border-left: 4px solid var(--ef-green);
  color: var(--ef-grey2);
}

table {
  border: 1px solid var(--ef-bg3);
  width: 100%;
  border-collapse: collapse;
}
table th,
table td {
  padding: 5px 10px;
  border: 1px solid var(--ef-bg3);
}
table th {
  background: var(--ef-bg2);
  color: var(--ef-fg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "WenQuanYi Micro Hei","Microsoft Yahei", sans-serif;
  color: var(--ef-fg);
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
  padding: 5px;
  border: 1px solid var(--ef-bg3);
  background: var(--ef-bg1);
  color: var(--ef-fg);
  width: 100%;

  border-radius: var(--ef-radius);
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  transition: border-color var(--ef-transition), box-shadow var(--ef-transition);
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--ef-green);
  box-shadow: 0 0 0 2px var(--ef-bg-green);
}
input::placeholder,
textarea::placeholder {
  color: var(--ef-grey1);
}
textarea {
  resize: vertical;
}

button.submit {
  padding: 6px 16px;
  border: 1px solid var(--ef-bg-green);
  background: var(--ef-bg-green);
  color: var(--ef-fg);
  border-radius: var(--ef-radius);
  cursor: pointer;
  transition: background var(--ef-transition), border-color var(--ef-transition);
}
button.submit:hover {
  background: var(--ef-bg-blue);
  border-color: var(--ef-bg-blue);
}

/* Special link style */
.post-meta a,
.post-content a,
.widget a,
.comment-content a {
  border-bottom: 1px solid var(--ef-bg3);
}

.post-meta a:hover,
.post-content a:hover,
.widget a:hover,
.comment-content a:hover {
  border-bottom-color: transparent;
}

/* ------------------
 * Header
 * --------------- */

#header {
  padding-top: 35px;
  border-bottom: 1px solid var(--ef-bg2);
}

#logo {
  color: var(--ef-fg);
  font-size: 2.5em;
  transition: color var(--ef-transition);
}
#logo:hover {
  color: var(--ef-green);
}
#logo img {
    max-height: 64px;
}

.description {
  margin: .5em 0 0;
  color: var(--ef-grey1);
  font-style: italic;
}

/* Navigation menu */
#nav-menu {
  margin: 25px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--ef-bg2);
}
#nav-menu a {
  position: relative;
  display: inline-block;
  margin-right: 6px;
  padding: 0 14px 10px;
  border: none;
  height: auto;
  line-height: 1.6;
  color: var(--ef-grey2);
  letter-spacing: .08em;
  transition: color var(--ef-transition);
}
#nav-menu a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  background: var(--ef-green);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--ef-transition);
}
#nav-menu a:hover,
#nav-menu .current {
  color: var(--ef-green);
}
#nav-menu a:hover::after,
#nav-menu .current::after {
  transform: scaleX(1);
}

/* Search */
#search {
  position: relative;
  margin-top: 15px;
}
#search input {
  padding-right: 30px;
}
#search button {
  position: absolute;
  right: 4px;
  top: 2px;
  border: none;
  padding: 0;
  width: 24px;
  height: 24px;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A7C080' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat center center;
  background-size: 18px 18px;
  direction: ltr; /* fix RTL language */
  text-indent: -9999em;
  cursor: pointer;
}

/* ------------------
 * Main
 * --------------- */

.post {
  padding: 15px 0 20px;
  border-bottom: 1px solid var(--ef-bg2);
}
.post-title {
  margin: .83em 0;
  font-size: 1.4em;
}
.post-title a {
  color: var(--ef-fg);
}
.post-title a:hover {
  color: var(--ef-green);
}
.post-meta {
  margin-top: -0.5em;
  padding: 0;
  color: var(--ef-grey1);
  font-size: .92857em;
}
.post-meta li {
  display: inline-block;
  margin: 0 8px 0 0;
  padding-left: 12px;
  border-left: 1px solid var(--ef-bg3);
}
.post-meta li:first-child {
  margin-left: 0;
  padding-left: 0;
  border: none;
}
.post-content {
  line-height: 1.5;
}
.post .tags {
  clear: both;
  color: var(--ef-grey1);
}
.post .tags a {
  color: var(--ef-purple);
}

.post-near {
  list-style: none;
  margin: 30px 0;
  padding: 0;
  color: var(--ef-grey1);
}
.post-near li {
  margin: 10px 0;
}

.archive-title {
  margin: 1em 0 -1em;
  padding-top: 20px;
  color: var(--ef-grey1);
  font-size: 1em;
}
.more {
  text-align: center;
}
.more a {
  border: none;
}
.protected .text {
  width: 50%;
}

/* Page nav */

.page-navigator {
  list-style: none;
  margin: 25px 0;
  padding: 0;
  text-align: center;
}
.page-navigator li {
  display: inline-block;
  margin: 0 4px;
}
.page-navigator a {
  display: inline-block;
  padding: 0 10px;
  height: 30px;
  line-height: 30px;
  color: var(--ef-grey2);
  border-radius: var(--ef-radius);
  transition: background var(--ef-transition), color var(--ef-transition);
}
.page-navigator a:hover {
  background: var(--ef-bg2);
  color: var(--ef-green);
  text-decoration: none;
}

.page-navigator .current a {
  color: var(--ef-green);
  background: var(--ef-bg3);
}

/* ------------------
 * Comment list
 * --------------- */
#comments {
  padding-top: 15px;
}
.comment-list, .comment-list ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.comment-list li {
  padding: 14px;
  margin-top: 10px;
  border: 1px solid var(--ef-bg2);
  border-radius: var(--ef-radius);
}
.comment-list li.comment-level-odd {
  background: var(--ef-bg1);
}
.comment-list li.comment-level-even {
  background: var(--ef-bg0);
}
.comment-list li.comment-by-author {
  background: var(--ef-bg-yellow);
}
.comment-list li .comment-reply {
  text-align: right;
  font-size: .92857em;
}
.comment-meta a {
  color: var(--ef-grey0);
  font-size: .92857em;
}
.comment-author {
  display: block;
  margin-bottom: 3px;
  color: var(--ef-fg);
}
.comment-author .avatar {
  float: left;
  margin-right: 10px;
  border-radius: var(--ef-radius);
}
.comment-author cite {
  font-weight: bold;
  font-style: normal;
}

/* Comment reply */
.comment-list .respond {
  margin-top: 15px;
  border-top: 1px solid var(--ef-bg2);
}
.respond .cancel-comment-reply {
  float: right;
  margin-top: 15px;
  font-size: .92857em;
}
#comment-form label {
  display: block;
  margin-bottom: .5em;
  font-weight: bold;
}
#comment-form .required:after {
  content: " *";
  color: var(--ef-red);
}

/* ------------------
 * secondary
 * --------------- */
#secondary {
  padding-top: 15px;
  word-wrap: break-word;
}
.widget {
  margin-bottom: 30px;
}
.widget-title {
  color: var(--ef-green);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ef-bg2);
}
.widget-list {
  list-style: none;
  padding: 0;
}
.widget-list li {
  margin: 5px 0;
  line-height: 1.6;
}

.widget-list li ul {
  margin-left: 15px;
}


/* ------------------
 * Footer
 * --------------- */
#footer {
  padding: 3em 0;
  line-height: 1.5;
  text-align: center;
  color: var(--ef-grey1);
}


/* -----------------
 * Error page
 * -------------- */
.error-page {
  margin-top: 100px;
  margin-bottom: 100px;
}


/* -----------------
 * Content format
 *--------------- */
.post-content, .comment-content {
  line-height: 1.5;
  word-wrap: break-word;
}
.post-content h2, .comment-content h2 {
  font-size: 1.28571em;
}
.post-content img, .comment-content img,
.post-content video, .comment-content video {
  max-width: 100%;
}
.post-content a img,
.comment-content a img {
  background: var(--ef-bg0);
  position: relative;
  bottom: -4px;  /* hidden img parent link border  */
}
.post-content hr, .comment-content hr {
  margin: 2em auto;
  width: 100px;
  border: 1px solid var(--ef-bg3);
  border-width: 2px 0 0 0;
}


/* -----------------
 * Misc
 *--------------- */
.aligncenter, div.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.alignleft {
  float: left;
}
.alignright {
  float: right;
}
img.alignleft {
  margin: 0 15px 0 0;
}
img.alignright {
  margin: 0 0 0 15px;
}

/* Keyboard focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ef-green);
  outline-offset: 2px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--ef-bg1);
}
::-webkit-scrollbar-thumb {
  background: var(--ef-bg4);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--ef-bg5);
}


/* -----------------
 * Responsive
 *--------------- */
@media (max-width: 767px) {
  body {
    font-size: 81.25%;
  }
  #nav-menu a {
    display: inline-block;
    margin: 0 2px;
  }
}

@media (max-width: 768px) {
  #header,
  .post-title,
  .post-meta {
    text-align: center;
  }
}

@media (min-width: 992px) {

}

@media (min-width: 1200px) {
  .container {
    max-width: 952px;
  }
}


/*
* Hide from both screenreaders and browsers: h5bp.com/u
*/
.hidden {
  display: none !important;
  visibility: hidden; }

/*
* Hide only visually, but have it available for screenreaders: h5bp.com/v
*/
.sr-only {
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px; }

/*
* Extends the .sr-only class to allow the element to be focusable
* when navigated to via the keyboard: h5bp.com/p
*/
.sr-only.focusable:active,
.sr-only.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  width: auto; }

/*
* Hide visually and from screenreaders, but maintain layout
*/
.invisible {
  visibility: hidden; }
