:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-2: #ffffff;
  --text: #171b27;
  --muted: #667085;
  --line: rgba(34, 45, 68, 0.12);
  --green: #12b981;
  --blue: #2563eb;
  --orange: #f59e0b;
  --rose: #f43f5e;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 8%, rgba(37, 99, 235, 0.12), transparent 26rem),
    radial-gradient(circle at 86% 16%, rgba(18, 185, 129, 0.12), transparent 24rem),
    linear-gradient(135deg, #ffffff 0%, #f7f9fc 46%, #eef4ff 100%);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 185, 129, 0.045) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
  pointer-events: none;
}

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

button {
  font: inherit;
}

#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.55;
}

.page-shell,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-inline: max(16px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
}

.brand,
.site-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.brand-avatar {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  object-fit: cover;
}

.site-nav {
  gap: 4px;
}

.site-nav a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.site-nav a:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(37, 99, 235, 0.06);
}

.hero-lab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: stretch;
  padding-top: 58px;
}

.hero-copy {
  position: relative;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 58px;
  overflow: hidden;
  background:
    linear-gradient(rgba(18, 185, 129, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.065) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.94));
  background-size: 30px 30px, 30px 30px, auto;
}

.hero-copy::after {
  position: absolute;
  right: -90px;
  bottom: -120px;
  width: 360px;
  height: 360px;
  content: "";
  border: 1px solid rgba(18, 185, 129, 0.18);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(18, 185, 129, 0.1), transparent 60%);
}

.hero-copy > * {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--green);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(48px, 7vw, 90px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
  font-weight: 850;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.hero-copy p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-actions a,
.profile-card a,
.read-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(124, 247, 200, 0.72);
  border-radius: 999px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--green);
  font-size: 14px;
  font-weight: 900;
}

.hero-actions a + a {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.hero-widgets {
  display: grid;
  gap: 16px;
}

.terminal-card,
.music-card,
.skill-panel,
.topic-strip,
.profile-card,
.side-card,
.post-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  backdrop-filter: blur(16px);
}

.terminal-card {
  padding: 16px;
}

.terminal-bar {
  display: flex;
  gap: 7px;
  margin-bottom: 14px;
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rose);
}

.terminal-bar span:nth-child(2) {
  background: var(--orange);
}

.terminal-bar span:nth-child(3) {
  background: var(--green);
}

.terminal-card pre {
  margin: 0;
  color: #2a3142;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.music-card {
  display: grid;
  padding: 16px;
}

.music-cover {
  position: relative;
  display: grid;
  min-height: 104px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.72), rgba(18, 185, 129, 0.62)),
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: auto, 20px 20px, 20px 20px;
}

.disc {
  position: relative;
  width: 60px;
  height: 60px;
  border: 11px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.26);
}

.disc::after {
  position: absolute;
  inset: 16px;
  content: "";
  border-radius: 50%;
  background: #fff;
}

.wave {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2px solid rgba(255, 255, 255, 0.54);
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 30px 0 0;
}

.wave-a {
  right: 70px;
  top: 36px;
}

.wave-b {
  left: 70px;
  bottom: 36px;
  transform: rotate(180deg);
}

.music-info {
  padding-top: 16px;
}

.music-info h2 {
  margin-bottom: 6px;
}

.music-info p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.music-progress {
  height: 5px;
  margin: 16px 0;
  border-radius: 999px;
  background: rgba(34, 45, 68, 0.1);
  overflow: hidden;
}

.music-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.music-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.music-controls button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.music-controls button:hover:not(:disabled) {
  border-color: var(--green);
}

.music-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.skill-panel {
  margin-top: 22px;
  padding: 20px;
}

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

.skill-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.skill-grid article {
  display: grid;
  min-height: 150px;
  grid-template-rows: 52px auto 1fr;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.skill-grid img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.skill-grid strong {
  font-size: 16px;
}

.skill-grid span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.topic-strip {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 22px;
  padding: 10px;
  overflow-x: auto;
}

.topic-pill {
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.topic-pill:hover {
  color: var(--text);
  border-color: var(--line);
}

.topic-pill.is-active {
  color: #ffffff;
  border-color: var(--green);
  background: var(--green);
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
  margin-top: 42px;
}

.section-title span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

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

.post-card {
  overflow: hidden;
}

.post-cover {
  min-height: 156px;
  border-bottom: 1px solid var(--line);
  padding: 20px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(8, 10, 18, 0.14), rgba(8, 10, 18, 0.48)),
    var(--cover);
}

.post-cover span {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.24);
  font-size: 12px;
  font-weight: 800;
}

.post-body {
  padding: 20px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.post-body p {
  margin-bottom: 16px;
  color: var(--muted);
  line-height: 1.75;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: #384154;
  background: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 700;
}

.read-link {
  min-height: 34px;
  margin-top: 16px;
  font-size: 13px;
}

.empty-state {
  display: grid;
  gap: 8px;
  padding: 34px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--text);
}

.sidebar {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 92px;
}

.profile-card,
.side-card {
  padding: 20px;
}

.profile-card {
  display: grid;
  justify-items: start;
  text-align: left;
}

.avatar {
  width: 76px;
  height: 76px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  object-fit: cover;
}

.profile-card h2 {
  margin-bottom: 10px;
}

.profile-card p,
.side-card p {
  color: var(--muted);
  line-height: 1.78;
}

.profile-card a {
  min-height: 36px;
  margin-top: 2px;
}

.side-card h2 {
  margin-bottom: 12px;
  font-size: 18px;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 56px;
  padding: 28px 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1040px) {
  .hero-lab,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .skill-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 0;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
  }

  .hero-lab {
    padding-top: 34px;
  }

  .hero-copy {
    min-height: auto;
    padding: 32px 24px;
  }

  h1 {
    font-size: 42px;
  }

  .hero-actions a {
    width: 100%;
  }

  .skill-grid,
  .post-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .page-shell,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .site-header {
    width: 100%;
    padding-inline: 12px;
  }

  h1 {
    font-size: 36px;
  }

  .music-controls {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }
}
