:root {
  --bg: #07111f;
  --bg-soft: rgba(15, 26, 46, 0.82);
  --panel: rgba(10, 20, 38, 0.76);
  --panel-strong: rgba(8, 18, 34, 0.94);
  --text: #edf4ff;
  --muted: #9fb5d9;
  --line: rgba(159, 181, 217, 0.18);
  --primary: #67e8f9;
  --secondary: #7c3aed;
  --accent: #f59e0b;
  --glow: linear-gradient(135deg, #67e8f9 0%, #22c55e 35%, #f59e0b 65%, #ec4899 100%);
  --shadow: 0 18px 60px rgba(2, 8, 23, 0.42);
  --radius: 24px;
  --content-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(103, 232, 249, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(236, 72, 153, 0.18), transparent 22%),
    radial-gradient(circle at center, rgba(124, 58, 237, 0.16), transparent 26%),
    linear-gradient(180deg, #06101d 0%, #081321 40%, #091625 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 90%);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.site-header,
.site-footer,
.panel,
.content-page,
.hero-panel .metric-card {
  backdrop-filter: blur(18px);
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(7, 17, 31, 0.62);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand strong,
.section-heading h2,
.page-header h1,
.content-card h3,
.stack-item h3,
.archive-item h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.02em;
}

.brand small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.brand-mark {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #facc15;
  animation: brand-breathe 3.2s ease-in-out infinite;
}

@keyframes brand-breathe {
  0%,
  100% {
    opacity: 0.35;
    filter: brightness(0.7);
  }

  50% {
    opacity: 1;
    filter: brightness(1.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark {
    animation: none;
    opacity: 1;
    filter: none;
  }
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-nav a {
  padding: 10px 14px;
  color: var(--muted);
  border-radius: 999px;
  transition: 180ms ease;
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.site-main {
  display: grid;
  gap: 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 22px;
  align-items: stretch;
}

.hero-copy,
.panel,
.content-page,
.site-footer {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-copy,
.content-page,
.site-footer {
  padding: 32px;
}

.hero-copy::after,
.panel::after,
.content-page::after {
  content: "";
  position: absolute;
  inset: auto -20% -65% auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(103, 232, 249, 0.28), transparent 65%);
  pointer-events: none;
}

.hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(2.7rem, 6vw, 5rem);
  line-height: 0.95;
}

.hero-text,
.page-header p,
.prose,
.archive-item p,
.stack-item p,
.content-card p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  padding: 12px 18px;
  border-radius: 999px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #00101a;
  background: var(--glow);
  box-shadow: 0 12px 28px rgba(103, 232, 249, 0.18);
}

.button-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.hero-panel {
  display: grid;
  gap: 18px;
}

.metric-card,
.panel {
  padding: 24px;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
}

.metric-card-link {
  display: block;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.metric-card-link:hover {
  transform: translateY(-2px);
  border-color: rgba(103, 232, 249, 0.3);
  background: rgba(8, 18, 34, 0.98);
}

.metric-card strong {
  display: block;
  margin: 8px 0 10px;
  font-size: 2rem;
}

.metric-label {
  color: var(--primary);
  font-size: 0.86rem;
}

.metric-card-subtle {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.metric-card-intro strong {
  margin-bottom: 14px;
  font-size: 1.45rem;
}

.metric-card-intro {
  min-height: 220px;
}

.section-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 24px;
}

.panel-wide {
  min-width: 0;
}

.section-heading {
  display: flex;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-heading h2,
.page-header h1 {
  margin: 6px 0 0;
}

.section-heading a {
  color: var(--primary);
}

.card-list,
.stack-list,
.archive-list,
.moment-list {
  display: grid;
  gap: 14px;
}

.content-card,
.stack-item,
.archive-item,
.moment-item {
  display: block;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(159, 181, 217, 0.13);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.content-card:hover,
.stack-item:hover,
.archive-item:hover,
.moment-item:hover {
  transform: translateY(-2px);
  border-color: rgba(103, 232, 249, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

.card-meta {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 0.84rem;
}

.content-card h3,
.stack-item h3,
.archive-item h2,
.moment-item strong {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.moment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.moment-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.page-header {
  margin-bottom: 24px;
}

.summary-box {
  padding: 16px 18px;
  margin-bottom: 24px;
  border-left: 3px solid var(--primary);
  border-radius: 16px;
  background: rgba(103, 232, 249, 0.08);
  color: #dff8ff;
}

.prose h2,
.prose h3,
.prose h4 {
  margin-top: 1.7em;
  font-family: Georgia, "Times New Roman", serif;
}

.prose p,
.prose li {
  margin: 0 0 1em;
}

.prose code {
  padding: 0.12em 0.42em;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.prose pre {
  position: relative;
  overflow: auto;
  padding: 18px 16px 16px;
  border-radius: 16px;
  background: #06101b;
}

.content-page--skills .prose pre {
  padding-top: 50px;
}

.content-page--skills .prose pre::before {
  content: "Skill Content";
  position: absolute;
  top: 12px;
  left: 16px;
  color: var(--primary);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.code-copy-button {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(159, 181, 217, 0.18);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(12, 21, 37, 0.92);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.code-copy-button:hover {
  color: var(--text);
  border-color: rgba(103, 232, 249, 0.32);
  background: rgba(18, 31, 52, 0.96);
  transform: translateY(-1px);
}

.code-copy-button.is-copied {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.38);
}

.code-copy-button svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.prose blockquote {
  margin: 0;
  padding-left: 16px;
  border-left: 3px solid var(--accent);
  color: #d8e4fb;
}

.archive-item {
  display: flex;
  gap: 16px;
  align-items: start;
  justify-content: space-between;
}

.archive-item span {
  flex-shrink: 0;
  color: var(--primary);
  font-size: 0.9rem;
}

.site-footer {
  margin-top: 8px;
  padding: 18px 22px;
  border-radius: 18px;
}

.footer-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.footer-heading strong {
  font-size: 1rem;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.02em;
}

.footer-repo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(159, 181, 217, 0.22);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.footer-repo-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(103, 232, 249, 0.38);
  transform: translateY(-1px);
}

.footer-repo-link svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.footer-copy p,
.copyright {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.footer-copy p {
  max-width: 720px;
}

.copyright {
  margin-top: 10px;
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  html {
    scroll-behavior: auto;
  }

  body::before {
    display: none;
  }

  .hero,
  .section-grid,
  .site-header {
    grid-template-columns: 1fr;
  }

  .site-header,
  .site-footer,
  .panel,
  .content-page,
  .hero-panel .metric-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 10px 28px rgba(2, 8, 23, 0.24);
  }

  .site-header {
    position: static;
    background: rgba(7, 17, 31, 0.84);
  }

  .archive-item {
    flex-direction: column;
  }

  .brand-mark {
    animation: none;
    opacity: 1;
    filter: none;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(calc(100% - 14px), var(--content-width));
    padding-top: 10px;
  }

  .hero-copy,
  .content-page,
  .panel,
  .site-footer {
    padding: 18px;
  }

  .site-footer {
    padding: 14px 16px;
  }

  .hero h1 {
    font-size: 2.2rem;
    line-height: 1;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .hero-text,
  .page-header p,
  .prose,
  .archive-item p,
  .stack-item p,
  .content-card p,
  .site-footer p {
    line-height: 1.65;
  }

  .prose p,
  .prose li {
    font-size: 0.96rem;
  }

  .metric-card,
  .panel {
    padding: 18px;
  }

  .metric-card strong {
    font-size: 1.65rem;
  }

  .brand {
    gap: 10px;
  }

  .brand strong {
    font-size: 1rem;
  }

  .brand small {
    font-size: 0.8rem;
  }

  .site-nav {
    gap: 6px;
  }

  .site-nav a {
    padding: 7px 9px;
    font-size: 0.92rem;
  }
}
