/* Modernized Typecho default theme for lixc.tech. */

:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #1f2933;
  --muted: #697586;
  --subtle: #8a95a3;
  --border: #e5eaf0;
  --accent: #1d4ed8;
  --accent-soft: #eaf1ff;
  --code-bg: #0f172a;
  --code-text: #dbeafe;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  background: linear-gradient(180deg, #fbfcff 0%, var(--bg) 320px);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

a:hover,
a:active {
  color: #123a9c;
}

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

::selection {
  background: rgba(29, 78, 216, .16);
}

.container {
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 28px;
  padding-right: 28px;
}

.row {
  margin-left: 0;
  margin-right: 0;
}

#body .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 64px;
}

.row > [class*="col-"] {
  float: none;
  width: auto;
  min-height: 0;
  padding-left: 0;
  padding-right: 0;
}

.col-offset-1 {
  margin-left: 0;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
  box-shadow: none;
}

input:focus,
textarea:focus {
  border-color: rgba(29, 78, 216, .48);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, .1);
}

textarea {
  resize: vertical;
}

pre,
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

code {
  padding: 2px 6px;
  border-radius: 5px;
  background: #edf2f7;
  color: #9f1239;
  font-size: .92em;
}

pre {
  margin: 22px 0;
  padding: 18px 20px;
  overflow-x: auto;
  border-radius: 10px;
  background: var(--code-bg);
  color: var(--code-text);
  line-height: 1.65;
}

pre code {
  display: block;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: .94em;
}

blockquote {
  margin: 24px 0;
  padding: 14px 18px;
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: #f8fbff;
  color: #4b5563;
}

table {
  width: 100%;
  margin: 22px 0;
  border: 1px solid var(--border);
  border-collapse: collapse;
  background: #fff;
}

table th,
table td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  vertical-align: top;
}

table th {
  background: var(--surface-soft);
  color: #334155;
  font-weight: 650;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 1.8em;
  margin-bottom: .65em;
  color: #111827;
  font-family: inherit;
  line-height: 1.28;
  letter-spacing: 0;
}

#header {
  padding: 44px 0 26px;
  border-bottom: 1px solid rgba(226, 232, 240, .85);
  background: rgba(255, 255, 255, .76);
  backdrop-filter: blur(14px);
}

.site-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}

.site-name {
  min-width: 0;
}

#logo {
  display: inline-flex;
  align-items: center;
  color: #111827;
  font-size: 2.25rem;
  font-weight: 760;
  line-height: 1.1;
  letter-spacing: 0;
}

#logo img {
  max-height: 64px;
}

.description {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .98rem;
  font-style: normal;
}

#nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
}

#nav-menu a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #475569;
  font-weight: 620;
  line-height: 36px;
}

#nav-menu a:hover {
  background: var(--surface-soft);
  color: #1e293b;
}

#nav-menu .current {
  border-color: rgba(29, 78, 216, .16);
  background: var(--accent-soft);
  color: var(--accent);
}

.site-search {
  width: 280px;
  flex: 0 0 280px;
}

#search {
  position: relative;
  margin-top: 2px;
}

#search input {
  height: 42px;
  padding-right: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
}

#search button {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent url(img/icon-search.png) no-repeat center center;
  background-size: 22px 22px;
  cursor: pointer;
  direction: ltr;
  text-indent: -9999em;
}

#search button:hover {
  background-color: var(--surface-soft);
}

#body {
  padding: 48px 0 80px;
}

#main {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  grid-column: 1;
}

.archive-title {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: .98rem;
  font-weight: 650;
}

.post {
  padding: 0 0 34px;
  border-bottom: 1px solid var(--border);
}

.post + .post {
  margin-top: 26px;
}

.post-card {
  width: 100%;
  max-width: 100%;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--shadow);
}

.post-card + .post-card {
  margin-top: 22px;
}

.post-title {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 2vw, 1.95rem);
  font-weight: 760;
}

.post-title a {
  color: #111827;
}

.post-title a:hover {
  color: var(--accent);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 18px;
  padding: 0;
  color: var(--subtle);
  font-size: .9rem;
  list-style: none;
}

.post-meta li {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
}

.post-meta a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
}

.post-meta a:hover {
  color: var(--accent);
  border-bottom-color: rgba(29, 78, 216, .28);
}

.post-content {
  color: #263241;
  font-size: 1rem;
  line-height: 1.85;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.post-content > :first-child {
  margin-top: 0;
}

.post-content > :last-child {
  margin-bottom: 0;
}

.post-content h2 {
  margin-top: 2.1em;
  padding-top: .25em;
  font-size: 1.42rem;
}

.post-content h3 {
  font-size: 1.18rem;
}

.post-content p {
  margin: 1em 0;
}

.post-content a {
  border-bottom: 1px solid rgba(29, 78, 216, .25);
}

.post-content a:hover {
  border-bottom-color: rgba(29, 78, 216, .5);
}

.post-excerpt {
  color: #4b5563;
}

.read-more {
  display: inline-flex;
  align-items: center;
  margin-top: 20px;
  color: var(--accent);
  font-weight: 650;
}

.read-more::after {
  content: "→";
  margin-left: 6px;
}

.post .tags {
  margin-top: 28px;
  color: var(--muted);
}

.post-near {
  display: grid;
  gap: 12px;
  margin: 34px 0 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.post-near li {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.page-navigator {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.page-navigator li {
  margin: 0;
}

.page-navigator a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
}

.page-navigator a:hover,
.page-navigator .current a {
  border-color: rgba(29, 78, 216, .24);
  background: var(--accent-soft);
  color: var(--accent);
}

#comments {
  display: none;
}

#secondary {
  width: 100%;
  max-width: 100%;
  align-self: start;
  grid-column: 2;
  padding-top: 2px;
  word-wrap: break-word;
}

.widget {
  width: 100%;
  max-width: 100%;
  margin-bottom: 24px;
  padding: 20px 20px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
}

.widget-title {
  margin: 0 0 14px;
  color: #1f2937;
  font-size: .96rem;
  font-weight: 760;
}

.widget-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.widget-list li {
  margin: 0;
  line-height: 1.65;
}

.widget-list li + li {
  margin-top: 9px;
}

.widget-list li ul {
  margin: 8px 0 0 14px;
}

.widget a {
  color: #475569;
  border-bottom: 1px solid transparent;
}

.widget a:hover {
  color: var(--accent);
  border-bottom-color: rgba(29, 78, 216, .24);
}

.widget-muted {
  background: transparent;
  box-shadow: none;
}

#footer {
  padding: 30px 0 42px;
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-size: .92rem;
  line-height: 1.7;
  text-align: center;
}

#footer .container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}

#footer a {
  color: var(--muted);
}

#footer a:hover {
  color: var(--accent);
}

.error-page {
  margin: 80px 0;
}

.protected .text {
  width: min(100%, 420px);
}

.aligncenter,
div.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignleft {
  float: left;
}

.alignright {
  float: right;
}

img.alignleft {
  margin: 0 18px 12px 0;
}

img.alignright {
  margin: 0 0 12px 18px;
}

.hidden {
  display: none !important;
  visibility: hidden;
}

.clearfix::before,
.clearfix::after,
.row::before,
.row::after {
  display: table;
  content: " ";
}

.clearfix::after,
.row::after {
  clear: both;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
}

.sr-only.focusable:active,
.sr-only.focusable:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
}

.invisible {
  visibility: hidden;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  #search button {
    background-image: url(img/icon-search@2x.png);
  }
}

@media (max-width: 991px) {
  .container {
    padding-left: 22px;
    padding-right: 22px;
  }

  #body .row {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  #main,
  #secondary {
    grid-column: 1;
  }

  #secondary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .widget {
    margin-bottom: 0;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15px;
  }

  #header {
    padding: 30px 0 20px;
  }

  .site-topbar {
    display: grid;
    gap: 22px;
  }

  .site-search {
    width: 100%;
    flex-basis: auto;
  }

  #logo {
    font-size: 2rem;
  }

  #nav-menu {
    gap: 8px;
    margin-top: 22px;
  }

  #nav-menu a {
    height: 34px;
    padding: 0 13px;
    line-height: 34px;
  }

  #body {
    padding: 30px 0 56px;
  }

  .post-card {
    padding: 22px;
  }

  .post-title {
    font-size: 1.48rem;
  }

  .post-meta {
    display: grid;
    gap: 4px;
  }

  #secondary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .post-card {
    padding: 20px 18px;
  }

  pre {
    margin-left: -2px;
    margin-right: -2px;
    padding: 16px;
  }
}
