/* 2026 visual refresh for 胜天半子.
   Loaded after Stack's compiled styles so this file can modernize the UI
   without forking the upstream theme. */

:root {
  --refresh-border: rgba(34, 48, 74, 0.10);
  --refresh-shadow: 0 14px 40px rgba(28, 39, 60, 0.08);
  --refresh-shadow-hover: 0 20px 54px rgba(28, 39, 60, 0.13);
  --refresh-radius: 22px;
}

[data-scheme="dark"] {
  --refresh-border: rgba(255, 255, 255, 0.08);
  --refresh-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
  --refresh-shadow-hover: 0 22px 58px rgba(0, 0, 0, 0.38);
}

body {
  background-image:
    radial-gradient(circle at 12% 8%, rgba(82, 118, 255, 0.08), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(232, 147, 18, 0.07), transparent 24rem);
  background-attachment: fixed;
}

.main-container {
  gap: 32px !important;
}

/* Home hero */
.welcome {
  position: relative;
  display: block !important;
  width: 100%;
  overflow: hidden;
  padding: 34px 38px;
  border: 1px solid var(--refresh-border);
  border-radius: 28px !important;
  background:
    linear-gradient(135deg, rgba(82, 118, 255, 0.12), rgba(232, 147, 18, 0.08)),
    var(--card-background) !important;
  box-shadow: var(--refresh-shadow) !important;
}

.welcome::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -70px;
  top: -95px;
  border-radius: 50%;
  background: var(--accent-color);
  opacity: 0.08;
  pointer-events: none;
}

.welcome-kicker {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent-color);
}

.welcome-title {
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  line-height: 1.16;
  letter-spacing: -0.035em;
  color: var(--card-text-color-main);
}

.welcome-title strong {
  color: var(--accent-color);
}

.welcome-subtitle {
  margin: 12px 0 0;
  font-size: 1.55rem;
  line-height: 1.7;
  color: var(--card-text-color-secondary);
}

/* Article cards */
.article-list article,
.article-list--compact article,
.main-article {
  border: 1px solid var(--refresh-border);
  box-shadow: var(--refresh-shadow) !important;
}

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

.article-list article:hover {
  transform: translateY(-4px);
  box-shadow: var(--refresh-shadow-hover) !important;
  border-color: rgba(82, 118, 255, 0.18);
}

.article-list article .article-image img {
  width: 100%;
  height: 230px !important;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.article-list article:hover .article-image img {
  transform: scale(1.025);
}

.article-list article .article-details {
  padding-top: 22px;
  padding-bottom: 22px;
}

.article-list article .article-title {
  letter-spacing: -0.015em;
}

/* Search and widgets */
.search-form.widget {
  transform: none !important;
  transition: none !important;
}

.search-form.widget:hover {
  transform: none !important;
}

.search-form.widget input {
  min-height: 54px;
  padding: 14px 18px !important;
  border: 1px solid var(--refresh-border);
  border-radius: 16px;
  box-shadow: 0 8px 26px rgba(28, 39, 60, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form.widget input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(82, 118, 255, 0.10);
}

.widget.archives .widget-archive--list {
  transition: transform 0.2s ease !important;
}

.widget.archives .widget-archive--list:hover {
  transform: translateX(4px) !important;
}

.tagCloud .tagCloud-tags a {
  padding: 6px 10px;
  border: 1px solid var(--refresh-border);
  border-radius: 999px !important;
  transition: transform 0.2s ease, border-color 0.2s ease !important;
}

.tagCloud .tagCloud-tags a:hover {
  transform: translateY(-2px) !important;
  border-color: var(--accent-color);
}

/* Sidebar */
.sidebar header .site-avatar .site-logo {
  border: 4px solid var(--card-background);
  box-shadow: 0 10px 30px rgba(28, 39, 60, 0.14);
}

.menu li a {
  border-radius: 12px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.menu li a:hover {
  transform: translateX(3px);
}

/* Article reading experience */
.article-page .main-article .article-content {
  line-height: 1.86;
}

.article-page .main-article .article-content img {
  max-width: 100% !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 34px rgba(28, 39, 60, 0.10);
}

.article-content blockquote {
  border-left: 4px solid var(--accent-color) !important;
  border-radius: 0 12px 12px 0;
  background: rgba(82, 118, 255, 0.07) !important;
}

.article-content .highlight {
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  border: 1px solid var(--refresh-border);
  border-radius: 16px !important;
  box-shadow: 0 10px 30px rgba(28, 39, 60, 0.08) !important;
}

.article-content .copyCodeButton {
  top: 10px;
  right: 12px;
  padding: 6px 11px;
  border-radius: 9px;
  font-size: 1.25rem;
}

.back-home {
  border: 1px solid var(--refresh-border);
  border-radius: 999px !important;
  box-shadow: var(--refresh-shadow) !important;
}

/* Archives */
@media (min-width: 1024px) {
  .article-list--compact {
    gap: 14px !important;
  }

  .article-list--compact article {
    margin-bottom: 0 !important;
    border-radius: 18px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .article-list--compact article:hover {
    transform: translateY(-2px);
    box-shadow: var(--refresh-shadow-hover) !important;
  }
}

@media (min-width: 768px) {
  .article-list article .article-image img {
    height: 285px !important;
  }
}

@media (min-width: 1200px) {
  .article-list article .article-image img {
    height: 315px !important;
  }
}

@media (max-width: 767px) {
  .main-container {
    gap: 24px !important;
  }

  .welcome {
    padding: 26px 24px;
    border-radius: 22px !important;
  }

  .welcome-title {
    font-size: 3rem;
  }

  .article-list article .article-image img {
    height: 210px !important;
  }
}

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