:root {
  --ld-accent: #e84d63;
  --ld-accent-2: #ff8a65;
  --ld-surface: rgba(255, 255, 255, 0.86);
  --ld-border: rgba(232, 77, 99, 0.16);
  --ld-shadow: 0 14px 40px rgba(45, 35, 50, 0.09);
  --ld-code: #1d2433;
}

[data-theme="dark"] {
  --ld-surface: rgba(31, 34, 43, 0.9);
  --ld-border: rgba(255, 138, 101, 0.22);
  --ld-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
  --ld-code: #151922;
}

body {
  background-image:
    radial-gradient(circle at 12% 8%, rgba(232, 77, 99, 0.08), transparent 27rem),
    radial-gradient(circle at 88% 18%, rgba(255, 138, 101, 0.07), transparent 25rem);
  background-attachment: fixed;
}

.post-cover { display: none !important; }
.post-info { width: 100% !important; }

.post-article,
.sidebar-widget,
.archive,
.article-inner {
  border: 1px solid var(--ld-border);
  box-shadow: var(--ld-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.post-article {
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.post-article:hover {
  transform: translateY(-4px);
  border-color: rgba(232, 77, 99, .32);
  box-shadow: 0 18px 46px rgba(45, 35, 50, .14);
}

.post-title,
.post-header h1,
h1[data-aos] {
  text-align: center !important;
  white-space: normal !important;
  text-wrap: balance;
}

.post-title a {
  text-decoration: none;
  background: linear-gradient(90deg, var(--color-default), var(--ld-accent));
  -webkit-background-clip: text;
  background-clip: text;
}

.article-entry {
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: .015em;
}

.article-entry h2 {
  margin-top: 2.4em;
  padding: .55em .75em;
  border-left: 5px solid var(--ld-accent);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(90deg, rgba(232, 77, 99, .11), transparent 75%);
}

.article-entry h3 {
  margin-top: 2em;
  padding-bottom: .35em;
  border-bottom: 1px dashed var(--ld-border);
}

.article-entry a:not(.fancybox) {
  text-decoration-thickness: .08em;
  text-underline-offset: .2em;
}

.article-entry img {
  display: block;
  opacity: 1 !important;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
  border-radius: 12px;
  border: 1px solid var(--ld-border);
  box-shadow: 0 10px 30px rgba(20, 20, 30, .13);
}

.article-entry pre,
.article-entry pre[tabindex="0"] {
  position: relative !important;
  margin: 1.4rem 0 !important;
  padding: 2.6rem 1.25rem 1.2rem !important;
  overflow-x: auto !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 13px !important;
  background: var(--ld-code) !important;
  box-shadow: 0 12px 30px rgba(15, 20, 30, .18) !important;
}

.article-entry pre::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 17px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 19px 0 #febc2e, 38px 0 #28c840;
}

.article-entry pre code,
.article-entry pre[tabindex="0"] code {
  padding: 0 !important;
  color: #e8edf7 !important;
  background: none !important;
  font-family: "Cascadia Code", "JetBrains Mono", Consolas, monospace !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
  tab-size: 4;
}

.article-entry :not(pre) > code {
  padding: .18em .45em;
  border: 1px solid rgba(232, 77, 99, .16);
  border-radius: 6px;
  color: var(--ld-accent);
  background: rgba(232, 77, 99, .08);
  font-size: .9em;
}

.article-entry blockquote {
  border-left: 4px solid var(--ld-accent);
  border-radius: 0 10px 10px 0;
  background: rgba(232, 77, 99, .07);
}

.article-entry table {
  display: table;
  width: 100%;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--ld-border);
  border-radius: 10px;
}

.article-entry th {
  background: rgba(232, 77, 99, .1);
}

.article-entry tr:nth-child(even) td {
  background: rgba(127, 127, 127, .045);
}

.article-category-link,
.article-tag-list-link {
  border-radius: 999px;
  transition: transform .2s ease, background-color .2s ease;
}

.article-category-link:hover,
.article-tag-list-link:hover { transform: translateY(-1px); }

.widget-title::after {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  margin-top: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--ld-accent), var(--ld-accent-2));
}

*:focus-visible {
  outline: 3px solid rgba(232, 77, 99, .45);
  outline-offset: 3px;
}

@media (max-width: 768px) {
  #main { padding: 0 10px; }
  .article-entry { font-size: 15px; line-height: 1.82; }
  .article-entry pre,
  .article-entry pre[tabindex="0"] {
    margin-left: -8px !important;
    margin-right: -8px !important;
    padding: 2.5rem 1rem 1rem !important;
    border-radius: 10px !important;
  }
  .article-entry table { display: block; overflow-x: auto; }
  .post-article:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
