/* Cyber Tech Theme — Yubinnzeng's Blog */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --cyber-bg: #060a12;
  --cyber-bg-alt: #0c1220;
  --cyber-surface: rgba(12, 20, 36, 0.72);
  --cyber-surface-solid: #0f1729;
  --cyber-border: rgba(0, 229, 255, 0.18);
  --cyber-border-hover: rgba(0, 229, 255, 0.45);
  --cyber-cyan: #00e5ff;
  --cyber-cyan-dim: #00b8d4;
  --cyber-purple: #a855f7;
  --cyber-pink: #ec4899;
  --cyber-text: #c8d6e5;
  --cyber-text-muted: #7a8ba3;
  --cyber-heading: #e8f4ff;
  --cyber-glow: 0 0 20px rgba(0, 229, 255, 0.25);
  --cyber-glow-strong: 0 0 30px rgba(0, 229, 255, 0.4), 0 0 60px rgba(168, 85, 247, 0.15);
  --cyber-radius: 12px;
  --cyber-font: 'Inter', "PingFang SC", "Microsoft YaHei", sans-serif;
  --cyber-mono: 'JetBrains Mono', 'Source Code Pro', Consolas, monospace;
  --cyber-display: 'Orbitron', 'Inter', sans-serif;
}

/* Animated grid background */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--cyber-font) !important;
  font-size: 15px;
  line-height: 1.75;
  color: var(--cyber-text) !important;
  background: var(--cyber-bg) !important;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 229, 255, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(168, 85, 247, 0.08), transparent);
  background-size: 48px 48px, 48px 48px, 100% 100%, 100% 100%;
  background-attachment: fixed;
}

::selection {
  background: rgba(0, 229, 255, 0.35);
  color: #fff;
}

#wrap {
  background: transparent !important;
}

/* ── Header ── */
#header {
  height: 320px;
  border-bottom: 1px solid var(--cyber-border);
  overflow: hidden;
}

#header:before,
#header:after {
  display: none;
}

#banner {
  background:
    linear-gradient(135deg, rgba(6, 10, 18, 0.3) 0%, rgba(6, 10, 18, 0.7) 100%),
    linear-gradient(160deg, #0a1628 0%, #0d1f3c 40%, #1a0a2e 100%) !important;
  background-size: cover !important;
}

#banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 229, 255, 0.02) 2px,
      rgba(0, 229, 255, 0.02) 4px
    );
  pointer-events: none;
  animation: scanline 8s linear infinite;
}

@keyframes scanline {
  0% { transform: translateY(0); }
  100% { transform: translateY(48px); }
}

#logo {
  font-family: var(--cyber-display) !important;
  font-size: 2.4rem !important;
  font-weight: 700 !important;
  letter-spacing: 4px !important;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--cyber-cyan), #fff, var(--cyber-purple));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 6s ease-in-out infinite;
  text-shadow: none !important;
  filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.5));
}

@keyframes shimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 200% center; }
}

#subtitle {
  font-family: var(--cyber-mono) !important;
  font-size: 0.85rem !important;
  letter-spacing: 3px !important;
  color: var(--cyber-cyan-dim) !important;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.4) !important;
}

.nav-icon,
.main-nav-link {
  font-family: var(--cyber-mono) !important;
  font-size: 0.8rem !important;
  letter-spacing: 2px !important;
  text-transform: uppercase;
  opacity: 0.75 !important;
  transition: all 0.3s ease !important;
}

.nav-icon:hover,
.main-nav-link:hover {
  opacity: 1 !important;
  color: var(--cyber-cyan) !important;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.6) !important;
}

.search-form {
  background: var(--cyber-surface) !important;
  backdrop-filter: blur(12px);
  border: 1px solid var(--cyber-border) !important;
  border-radius: 24px !important;
  box-shadow: var(--cyber-glow) !important;
}

.search-form-input {
  color: var(--cyber-text) !important;
  font-family: var(--cyber-mono) !important;
}

.search-form-submit {
  color: var(--cyber-cyan) !important;
}

/* ── Articles ── */
.article {
  margin: 40px 0;
}

.article-inner,
.archive-article-inner {
  background: var(--cyber-surface) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--cyber-border) !important;
  border-radius: var(--cyber-radius) !important;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  overflow: hidden;
  position: relative;
}

.article-inner::before,
.archive-article-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyber-cyan), var(--cyber-purple), transparent);
  opacity: 0.6;
}

.article-inner:hover,
.archive-article-inner:hover {
  border-color: var(--cyber-border-hover) !important;
  box-shadow: var(--cyber-glow-strong), 0 8px 32px rgba(0, 0, 0, 0.5) !important;
  transform: translateY(-2px);
}

.article-date,
.article-category-link,
.archive-year,
.widget-title {
  font-family: var(--cyber-mono) !important;
  font-size: 0.72rem !important;
  letter-spacing: 3px !important;
  color: var(--cyber-cyan-dim) !important;
  text-shadow: none !important;
}

.article-title {
  font-family: var(--cyber-display) !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: var(--cyber-heading) !important;
  letter-spacing: 1px;
  line-height: 1.35 !important;
}

a.article-title:hover,
.archive-article-title:hover {
  color: var(--cyber-cyan) !important;
  text-shadow: 0 0 16px rgba(0, 229, 255, 0.4);
}

.article-entry {
  color: var(--cyber-text) !important;
  padding: 0 28px 8px !important;
}

.article-header {
  padding: 24px 28px 0 !important;
}

.article-entry h1,
.article-entry h2,
.article-entry h3,
.article-entry h4,
.article-entry h5,
.article-entry h6 {
  font-family: var(--cyber-display) !important;
  color: var(--cyber-heading) !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
  position: relative;
}

.article-entry h2 {
  font-size: 1.35rem !important;
  margin-top: 2em !important;
  padding-bottom: 0.5em;
  border-bottom: 1px solid var(--cyber-border);
}

.article-entry h2::before {
  content: '//';
  color: var(--cyber-cyan);
  margin-right: 0.5em;
  font-weight: 400;
  opacity: 0.7;
}

.article-entry h3 {
  font-size: 1.1rem !important;
  color: var(--cyber-cyan-dim) !important;
}

.article-entry p,
.article-entry li {
  line-height: 1.85 !important;
}

.article-entry a {
  color: var(--cyber-cyan) !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(0, 229, 255, 0.3);
  transition: all 0.2s ease;
}

.article-entry a:hover {
  color: #fff !important;
  border-bottom-color: var(--cyber-cyan);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

.article-entry hr {
  border: none !important;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyber-border-hover), transparent) !important;
  margin: 2.5em 0 !important;
}

.article-entry blockquote {
  font-family: var(--cyber-font) !important;
  font-size: 1.05em !important;
  color: var(--cyber-text-muted) !important;
  border-left: 3px solid var(--cyber-purple) !important;
  background: rgba(168, 85, 247, 0.06);
  padding: 1em 1.5em !important;
  border-radius: 0 var(--cyber-radius) var(--cyber-radius) 0;
  margin: 1.6em 0 !important;
  text-align: left !important;
}

.article-entry strong {
  color: var(--cyber-heading);
}

.article-entry table th {
  border-bottom-color: var(--cyber-border-hover) !important;
  color: var(--cyber-cyan);
  font-family: var(--cyber-mono);
  font-size: 0.85rem;
}

.article-entry table td {
  border-bottom-color: var(--cyber-border) !important;
}

.article-more-link a {
  font-family: var(--cyber-mono) !important;
  font-size: 0.75rem !important;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: rgba(0, 229, 255, 0.08) !important;
  border: 1px solid var(--cyber-border) !important;
  color: var(--cyber-cyan) !important;
  text-shadow: none !important;
  border-radius: 20px !important;
  padding: 8px 20px !important;
  transition: all 0.3s ease;
}

.article-more-link a:hover {
  background: rgba(0, 229, 255, 0.2) !important;
  box-shadow: var(--cyber-glow) !important;
  color: #fff !important;
  text-shadow: none !important;
}

.article-footer {
  border-top: 1px solid var(--cyber-border) !important;
  margin: 0 28px 24px !important;
  padding-top: 1.2em !important;
}

.article-footer a {
  color: var(--cyber-text-muted) !important;
}

.article-footer a:hover {
  color: var(--cyber-cyan) !important;
}

/* ── Code blocks ── */
.article-entry pre,
.article-entry .highlight {
  background: #0d1117 !important;
  border: 1px solid var(--cyber-border) !important;
  border-radius: var(--cyber-radius) !important;
  margin: 1.5em 0 !important;
  padding: 20px !important;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 229, 255, 0.05) !important;
  position: relative;
  overflow-x: auto;
}

.article-entry pre::before,
.article-entry .highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--cyber-border);
  border-radius: var(--cyber-radius) var(--cyber-radius) 0 0;
}

.article-entry pre code,
.article-entry .highlight pre {
  padding-top: 28px !important;
}

.article-entry code {
  font-family: var(--cyber-mono) !important;
  background: rgba(0, 229, 255, 0.08) !important;
  color: var(--cyber-cyan) !important;
  text-shadow: none !important;
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 4px;
  padding: 2px 6px !important;
  font-size: 0.88em;
}

.article-entry pre code {
  background: none !important;
  border: none;
  color: #abb2bf !important;
  padding: 0 !important;
}

/* Syntax highlighting — neon palette */
pre .comment, pre .title { color: #5c6370 !important; }
pre .variable, pre .attribute, pre .tag { color: #f2777a !important; }
pre .number, pre .literal { color: #f99157 !important; }
pre .string, pre .value { color: #7fdb8a !important; }
pre .function, pre .title.function_ { color: #69c !important; }
pre .keyword { color: #c678dd !important; }

/* ── Sidebar ── */
.widget-wrap {
  margin: 36px 0;
}

.widget-title {
  font-family: var(--cyber-display) !important;
  font-size: 0.75rem !important;
  color: var(--cyber-cyan) !important;
  margin-bottom: 0.8em !important;
  padding-left: 12px;
  border-left: 2px solid var(--cyber-cyan);
}

.widget {
  background: var(--cyber-surface) !important;
  backdrop-filter: blur(12px);
  border: 1px solid var(--cyber-border) !important;
  border-radius: var(--cyber-radius) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
  color: var(--cyber-text) !important;
  text-shadow: none !important;
  padding: 18px !important;
}

.widget a {
  color: var(--cyber-text) !important;
  transition: color 0.2s ease;
}

.widget a:hover {
  color: var(--cyber-cyan) !important;
  text-decoration: none !important;
}

.tagcloud a {
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid var(--cyber-border);
  border-radius: 16px;
  padding: 2px 10px;
  margin: 4px 4px 4px 0;
  transition: all 0.2s ease;
}

.tagcloud a:hover {
  background: rgba(0, 229, 255, 0.15) !important;
  border-color: var(--cyber-cyan) !important;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

/* ── Pagination & Archives ── */
#page-nav {
  background: var(--cyber-surface) !important;
  border: 1px solid var(--cyber-border) !important;
  border-radius: var(--cyber-radius) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

#page-nav a:hover {
  background: rgba(0, 229, 255, 0.15) !important;
  color: var(--cyber-cyan) !important;
}

#page-nav .current {
  color: var(--cyber-cyan) !important;
}

.archive-article-title {
  font-family: var(--cyber-font) !important;
  color: var(--cyber-heading) !important;
}

/* ── Article navigation ── */
#article-nav:before {
  background: var(--cyber-cyan) !important;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.6) !important;
}

.article-nav-link-wrap {
  text-shadow: none !important;
  color: var(--cyber-text-muted) !important;
}

.article-nav-link-wrap:hover {
  color: var(--cyber-cyan) !important;
}

.article-nav-caption {
  color: var(--cyber-border-hover) !important;
  font-family: var(--cyber-mono) !important;
}

/* ── Footer ── */
#footer {
  background: linear-gradient(180deg, var(--cyber-bg-alt), #040608) !important;
  border-top: 1px solid var(--cyber-border) !important;
  padding: 40px 0 !important;
  position: relative;
}

#footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyber-cyan), var(--cyber-purple), transparent);
}

#footer-info {
  font-family: var(--cyber-mono) !important;
  font-size: 0.8rem !important;
  letter-spacing: 1px;
  color: var(--cyber-text-muted) !important;
  text-align: center;
}

#footer a {
  color: var(--cyber-cyan) !important;
}

#footer a:hover {
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

/* ── Mobile nav ── */
#mobile-nav {
  background: var(--cyber-bg-alt) !important;
  border-right: 1px solid var(--cyber-border) !important;
}

.mobile-nav-link {
  font-family: var(--cyber-mono) !important;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.8rem !important;
  border-bottom: 1px solid rgba(0, 229, 255, 0.06);
}

.mobile-nav-link:hover {
  color: var(--cyber-cyan) !important;
  background: rgba(0, 229, 255, 0.05);
}

/* ── Comments ── */
#comments {
  background: var(--cyber-surface) !important;
  border: 1px solid var(--cyber-border) !important;
  border-radius: var(--cyber-radius) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

/* ── Images ── */
.article-entry img {
  border-radius: 8px;
  border: 1px solid var(--cyber-border);
  transition: box-shadow 0.3s ease;
}

.article-entry img:hover {
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--cyber-bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 229, 255, 0.4);
}

/* ── Responsive tweaks ── */
@media screen and (max-width: 767px) {
  #logo {
    font-size: 1.6rem !important;
    letter-spacing: 2px !important;
  }

  #header {
    height: 240px;
  }

  .article-title {
    font-size: 1.25rem !important;
  }

  .article-entry {
    padding: 0 18px 8px !important;
  }

  .article-header {
    padding: 18px 18px 0 !important;
  }
}
