:root {
  --bg: #f4efe6;
  --bg-soft: rgba(255, 255, 255, 0.66);
  --surface: rgba(255, 251, 245, 0.84);
  --surface-strong: #fffdf8;
  --card-dark: #12202a;
  --card-dark-soft: #1a2d39;
  --text: #17202a;
  --muted: #5d6873;
  --line: rgba(23, 32, 42, 0.1);
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-warm: #c2410c;
  --shadow: 0 24px 60px rgba(20, 29, 36, 0.12);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --font-body: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --font-title: "Noto Serif CJK SC", "Songti SC", "STSong", serif;
  --font-code: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(194, 65, 12, 0.14), transparent 24%),
    linear-gradient(180deg, #f8f3eb 0%, #f3ede4 44%, #f8f4ed 100%);
  font-family: var(--font-body);
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(23, 32, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 42, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.32), transparent 92%);
}

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

img {
  max-width: 100%;
  display: block;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 48px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.7);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(20, 29, 36, 0.06);
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--card-dark), var(--card-dark-soft));
  color: #dffcf4;
  font-family: var(--font-code);
  font-size: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

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

.brand-copy small {
  color: var(--muted);
  font-size: 0.82rem;
}

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

.site-nav a {
  position: relative;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--accent), transparent);
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.section {
  margin-top: 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: stretch;
  padding-top: 56px;
}

.hero-copy,
.terminal-card,
.signal-card,
.post-card,
.stack-panel,
.about-panel {
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 44px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.84), rgba(255, 249, 242, 0.76));
}

.eyebrow,
.signal-label,
.section-note,
.post-meta,
.about-item span {
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero h1,
.section-heading h2,
.lab-copy h2,
.about-copy h2 {
  margin: 12px 0 18px;
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.9rem);
  max-width: 10ch;
}

.hero-text,
.lab-copy p,
.about-copy p,
.signal-card p,
.post-card p,
.series-copy p {
  color: var(--muted);
  font-size: 1.02rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.button:hover,
.button:focus-visible,
.post-card:hover,
.series-item:hover,
.signal-card:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #f7fffd;
  box-shadow: 0 18px 30px rgba(15, 118, 110, 0.22);
}

.button.secondary {
  border: 1px solid rgba(23, 32, 42, 0.12);
  background: rgba(255, 255, 255, 0.54);
}

.hero-points {
  display: grid;
  gap: 12px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.hero-points li {
  position: relative;
  padding-left: 20px;
  color: var(--text);
}

.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
}

.terminal-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #0d1820, #15242f);
  color: #d7efe7;
}

.terminal-card::before {
  content: "";
  position: absolute;
  inset: auto -10% -35% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.24), transparent 70%);
}

.terminal-header {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.terminal-header span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.terminal-header span:nth-child(1) {
  background: #ff6f61;
}

.terminal-header span:nth-child(2) {
  background: #f4b400;
}

.terminal-header span:nth-child(3) {
  background: #34a853;
}

.terminal-body {
  position: relative;
  display: grid;
  gap: 10px;
  font-family: var(--font-code);
  font-size: 0.96rem;
  line-height: 1.65;
}

.prompt,
.stack-code span,
.series-index {
  color: #66d9c2;
}

.rotating-phrase {
  color: #ffe4b5;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 26px;
}

.signal-card {
  padding: 28px;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.signal-card h2,
.series-copy h3,
.post-card h3 {
  margin: 10px 0 14px;
  font-size: 1.3rem;
  line-height: 1.3;
}

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

.section-heading h2,
.lab-copy h2,
.about-copy h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.section-note {
  max-width: 30ch;
  text-align: right;
}

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

.post-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.88), rgba(255, 248, 240, 0.76));
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.post-card.featured {
  grid-column: span 2;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.9), rgba(255, 246, 236, 0.82));
}

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

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent-strong);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--accent-strong);
  font-weight: 600;
}

.text-link::after {
  content: "->";
  font-family: var(--font-code);
}

.series-list {
  display: grid;
  gap: 16px;
}

.series-item {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 26px 28px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-md);
  background: rgba(255, 252, 247, 0.72);
  box-shadow: var(--shadow);
  transition: transform 180ms ease;
}

.series-index {
  font-family: var(--font-code);
  font-size: 1.6rem;
}

.lab-section,
.about-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.lab-copy,
.about-copy {
  padding: 34px;
  border-radius: var(--radius-lg);
  background: rgba(255, 252, 247, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow);
}

.stack-panel,
.about-panel {
  padding: 30px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(19, 35, 45, 0.96), rgba(24, 40, 52, 0.94));
  color: #edf6f3;
}

.stack-code {
  font-family: var(--font-code);
  color: #d6efe8;
}

.stack-list {
  display: grid;
  gap: 16px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.stack-list li,
.about-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.stack-list li:first-child,
.about-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.stack-list span {
  color: rgba(214, 239, 232, 0.64);
  font-family: var(--font-code);
  font-size: 0.88rem;
}

.stack-list strong,
.about-item strong {
  font-size: 1rem;
  line-height: 1.6;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #dffcf4;
  font-size: 0.84rem;
}

.site-footer {
  margin-top: 60px;
  padding: 28px 0 12px;
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}

code {
  font-family: var(--font-code);
}

pre {
  font-family: var(--font-code);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 560ms ease,
    transform 560ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-cta {
  margin-top: 26px;
}

.archive-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 340px;
  gap: 24px;
  align-items: stretch;
  padding-top: 48px;
}

.archive-copy,
.archive-panel,
.note-card,
.error-card {
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow);
}

.archive-copy,
.archive-panel,
.note-card {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: rgba(255, 252, 247, 0.78);
}

.archive-copy h1,
.error-card h1 {
  margin: 10px 0 18px;
  font-family: var(--font-title);
  font-size: clamp(2.3rem, 4.8vw, 4.4rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.archive-lead,
.note-card p,
.error-text {
  color: var(--muted);
  font-size: 1.04rem;
}

.archive-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(180deg, #12212a, #1b2d38);
  color: #ecf7f4;
}

.archive-panel .eyebrow,
.note-card.dark .eyebrow {
  color: rgba(236, 247, 244, 0.68);
}

.archive-points {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 18px;
}

.archive-points li {
  color: rgba(236, 247, 244, 0.84);
}

.topic-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.topic-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(23, 32, 42, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--accent-strong);
  font-size: 0.84rem;
}

.archive-grid .post-card.featured {
  min-height: 100%;
}

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

.note-card.dark {
  background: linear-gradient(180deg, #12212a, #1b2d38);
  color: #edf6f3;
}

.note-card.dark p {
  color: rgba(237, 246, 243, 0.78);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--accent-strong);
  font-weight: 600;
}

.article-page .page-shell {
  width: min(1240px, calc(100% - 32px));
}

.article-hero {
  padding-top: 48px;
}

.article-hero-copy {
  padding: 40px 44px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.88), rgba(255, 248, 240, 0.8));
  box-shadow: var(--shadow);
}

.article-hero h1 {
  margin: 10px 0 18px;
  font-family: var(--font-title);
  font-size: clamp(2.4rem, 4.6vw, 4.6rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  max-width: 12ch;
}

.article-lead {
  max-width: 68ch;
  color: var(--muted);
  font-size: 1.08rem;
}

.article-meta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.article-meta-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid rgba(23, 32, 42, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.52);
}

.article-meta-card span {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-meta-card strong {
  font-size: 0.98rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.article-sidebar {
  position: sticky;
  top: 108px;
  display: grid;
  gap: 16px;
}

.toc-card,
.mini-panel {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-md);
  background: rgba(255, 252, 247, 0.78);
  box-shadow: var(--shadow);
}

.toc-card nav {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.toc-card a {
  color: var(--muted);
  font-size: 0.96rem;
}

.toc-card a:hover,
.toc-card a:focus-visible {
  color: var(--accent-strong);
}

.mini-panel p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.article-content {
  padding: 36px 40px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-lg);
  background: rgba(255, 252, 247, 0.84);
  box-shadow: var(--shadow);
}

.prose section + section {
  margin-top: 42px;
}

.prose h2,
.article-endcap h3 {
  margin: 0 0 16px;
  font-family: var(--font-title);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.24;
  letter-spacing: -0.03em;
}

.prose p,
.prose li {
  color: var(--text);
  font-size: 1.02rem;
}

.prose ul {
  margin: 18px 0;
  padding-left: 20px;
}

.prose li + li {
  margin-top: 10px;
}

.prose pre {
  overflow-x: auto;
  margin: 22px 0;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, #10202a, #162a35);
  color: #dcf7ef;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.prose code {
  font-family: var(--font-code);
  font-size: 0.94em;
}

.prose :not(pre) > code {
  padding: 0.16em 0.45em;
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent-strong);
}

.callout,
.callout.subtle {
  margin: 22px 0;
  padding: 18px 20px;
  border-radius: 18px;
}

.callout {
  border-left: 4px solid var(--accent);
  background: rgba(15, 118, 110, 0.08);
}

.callout.subtle {
  border-left: 4px solid var(--accent-warm);
  background: rgba(194, 65, 12, 0.08);
}

.check-list {
  padding-left: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 26px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
}

.article-endcap {
  margin-top: 44px;
  padding: 28px;
  border: 1px solid rgba(23, 32, 42, 0.08);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 32%),
    rgba(255, 255, 255, 0.56);
}

.article-endcap .button {
  margin-top: 12px;
}

.error-page {
  min-height: 100vh;
}

.error-shell {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
}

.error-main {
  width: min(760px, 100%);
}

.error-card {
  padding: 44px;
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.9), rgba(255, 247, 239, 0.84));
  text-align: center;
}

.status-code {
  margin: 0;
  color: var(--accent-strong);
  font-family: var(--font-code);
  font-size: clamp(4rem, 12vw, 7rem);
  line-height: 1;
}

.error-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

@media (max-width: 980px) {
  .site-header,
  .section-heading,
  .hero,
  .lab-section,
  .about-section,
  .archive-hero,
  .archive-notes {
    grid-template-columns: 1fr;
  }

  .site-header,
  .section-heading {
    align-items: flex-start;
  }

  .hero {
    padding-top: 34px;
  }

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

  .article-meta-row,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }

  .post-card.featured {
    grid-column: span 2;
  }

  .section-note {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 28px;
  }

  .site-nav {
    gap: 14px;
  }

  .hero-copy,
  .terminal-card,
  .signal-card,
  .post-card,
  .lab-copy,
  .stack-panel,
  .about-copy,
  .about-panel,
  .archive-copy,
  .archive-panel,
  .note-card,
  .article-hero-copy,
  .toc-card,
  .mini-panel,
  .article-content,
  .article-endcap,
  .error-card {
    padding: 24px;
  }

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

  .post-card.featured {
    grid-column: auto;
  }

  .series-item {
    grid-template-columns: 1fr;
  }

  .section {
    margin-top: 46px;
  }

  .hero h1 {
    max-width: none;
  }

  .article-hero h1 {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* Fuwari-inspired home redesign */
.home-redesign {
  --page-bg: #f6f8fb;
  --card-bg: rgba(255, 255, 255, 0.82);
  --card-bg-strong: rgba(255, 255, 255, 0.94);
  --text-main: #172033;
  --text-soft: #5f6f86;
  --text-faint: #8a97aa;
  --line-soft: rgba(49, 70, 101, 0.13);
  --primary: #2563eb;
  --primary-soft: rgba(37, 99, 235, 0.12);
  --green: #0f9f7a;
  --orange: #ea580c;
  --purple: #7c3aed;
  --card-shadow: 0 18px 50px rgba(29, 42, 68, 0.12);
  --card-radius: 22px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 8%, rgba(37, 99, 235, 0.13), transparent 30%),
    linear-gradient(180deg, #f2f6fd 0%, #f7f8fb 45%, #eef3f8 100%);
  color: var(--text-main);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.home-redesign.dark-mode {
  --page-bg: #0f1724;
  --card-bg: rgba(22, 31, 48, 0.78);
  --card-bg-strong: rgba(23, 33, 51, 0.94);
  --text-main: #edf3ff;
  --text-soft: #b2bfd2;
  --text-faint: #75859c;
  --line-soft: rgba(221, 231, 255, 0.12);
  --primary: #8ab4ff;
  --primary-soft: rgba(138, 180, 255, 0.14);
  --card-shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  background:
    radial-gradient(circle at 18% 8%, rgba(75, 117, 255, 0.22), transparent 32%),
    linear-gradient(180deg, #121c2b 0%, #0f1724 45%, #111827 100%);
}

.home-redesign a {
  color: inherit;
}

.banner-layer {
  position: absolute;
  inset: 0 0 auto;
  height: 44vh;
  min-height: 310px;
  overflow: hidden;
  pointer-events: none;
}

.banner-photo {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(25, 41, 75, 0.4), rgba(37, 99, 235, 0.18)),
    url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1800&q=80") center / cover;
  filter: saturate(1.04);
  transform: scale(1.02);
}

.banner-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(246, 248, 251, 0.18), var(--page-bg) 96%);
}

.blog-shell {
  position: relative;
  z-index: 1;
  width: min(100% - 32px, 1200px);
  margin: 0 auto;
  padding: 20px 0 34px;
}

.glass-card {
  border: 1px solid var(--line-soft);
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: var(--card-radius);
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 70px;
  padding: 12px 16px;
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.home-icon {
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 22px;
  font-weight: 800;
}

.topbar-brand strong,
.topbar-brand small {
  display: block;
}

.topbar-brand small {
  color: var(--text-soft);
  font-size: 12px;
  margin-top: 2px;
}

.topbar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.topbar-nav a,
.theme-button {
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text-soft);
  min-height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.theme-button {
  width: 42px;
  padding: 0;
  font-size: 20px;
}

.topbar-nav a:hover,
.theme-button:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.topbar-nav a:active,
.theme-button:active {
  transform: scale(0.96);
}

.fuwari-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  margin-top: calc(34vh - 90px);
  align-items: start;
}

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

.profile-card,
.side-widget,
.hero-panel,
.notice-card,
.article-card,
.project-card,
.resume-main,
.mini-card,
.home-footer {
  padding: 22px;
}

.avatar-wrap {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 20px;
  background: var(--primary-soft);
  margin-bottom: 18px;
}

.avatar-wrap::after {
  content: "GitHub";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  font-size: 28px;
  font-weight: 800;
  opacity: 0;
  background: rgba(20, 33, 55, 0.45);
  transition: opacity 0.2s ease;
}

.avatar-wrap:hover::after {
  opacity: 1;
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-copy h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  text-align: center;
}

.profile-handle {
  margin: 6px 0 10px;
  color: var(--text-faint);
  text-align: center;
}

.profile-bio {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.8;
  text-align: center;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0;
}

.profile-stats div {
  border-radius: 14px;
  padding: 10px 6px;
  background: rgba(124, 144, 170, 0.1);
  text-align: center;
}

.profile-stats strong,
.profile-stats span {
  display: block;
}

.profile-stats span {
  color: var(--text-faint);
  font-size: 12px;
  margin-top: 3px;
}

.profile-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-links a,
.tag-cloud span,
.skill-list span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  padding: 0 11px;
  background: rgba(124, 144, 170, 0.12);
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
}

.side-widget h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  color: var(--text-soft);
  text-decoration: none;
}

.category-row:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.category-row strong {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 26px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
}

.tag-cloud,
.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.content-flow {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.hero-panel {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hero-panel h2 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(32px, 4.35vw, 56px);
  line-height: 1.12;
}

.hero-panel p {
  max-width: 760px;
  color: var(--text-soft);
  line-height: 1.9;
  font-size: 17px;
  margin: 18px 0 0;
}

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

.home-redesign .button {
  min-height: 44px;
  border-radius: 14px;
  padding: 0 18px;
  text-decoration: none;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}

.home-redesign .button.primary {
  background: var(--primary);
  color: white;
}

.home-redesign .button.secondary {
  border: 1px solid var(--line-soft);
  background: rgba(124, 144, 170, 0.1);
  color: var(--text-main);
}

.notice-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: center;
}

.notice-card div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notice-dot {
  width: 10px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(15, 159, 122, 0.14);
}

.notice-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.75;
}

.section-block {
  display: grid;
  gap: 16px;
}

.block-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 4px 0;
}

.block-heading h2 {
  margin: 0;
  font-size: 28px;
}

.text-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 800;
}

.article-list,
.project-grid {
  display: grid;
  gap: 14px;
}

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

.article-card,
.project-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.article-card:hover,
.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.3);
}

.article-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-faint);
  font-size: 13px;
  margin-bottom: 10px;
}

.article-meta span {
  color: var(--primary);
  font-weight: 900;
}

.article-card h3,
.project-card h3,
.resume-main h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.35;
}

.featured-article h3 {
  font-size: 26px;
}

.article-card p,
.project-card p,
.resume-main p,
.mini-card li {
  margin: 0 0 14px;
  color: var(--text-soft);
  line-height: 1.78;
}

.project-card {
  position: relative;
  min-height: 210px;
}

.project-card a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 800;
}

.repo-lang {
  display: inline-block;
  width: 10px;
  aspect-ratio: 1;
  border-radius: 50%;
  margin-bottom: 12px;
}

.repo-lang.html {
  background: #e34c26;
}

.repo-lang.c {
  background: #555;
}

.repo-lang.python {
  background: #3572a5;
}

.resume-layout {
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
  align-items: start;
}

.resume-timeline {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.resume-timeline article {
  position: relative;
  padding-left: 18px;
  border-left: 3px solid var(--primary-soft);
}

.resume-timeline article::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 11px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--primary);
}

.resume-timeline span {
  color: var(--primary);
  font-weight: 900;
  font-size: 13px;
}

.resume-timeline h3 {
  margin: 6px 0;
  font-size: 18px;
}

.resume-side {
  display: grid;
  gap: 14px;
}

.mini-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: 18px;
}

.mini-card ul {
  margin: 0;
  padding-left: 18px;
}

.home-footer {
  margin-top: 18px;
  text-align: center;
  color: var(--text-soft);
}

.home-footer p {
  margin: 0;
}

.home-redesign [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.home-redesign [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .topbar {
    position: relative;
    top: 0;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .topbar-nav {
    justify-content: flex-start;
    order: 3;
    width: 100%;
  }

  .fuwari-grid {
    grid-template-columns: 1fr;
    margin-top: 180px;
  }

  .sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-card {
    grid-column: 1 / -1;
  }

  .avatar-wrap {
    max-width: 240px;
    margin: 0 auto 18px;
  }
}

@media (max-width: 720px) {
  .blog-shell {
    width: min(100% - 20px, 1200px);
    padding-top: 10px;
  }

  .banner-layer {
    min-height: 260px;
  }

  .fuwari-grid {
    margin-top: 120px;
  }

  .sidebar,
  .project-grid,
  .resume-layout {
    grid-template-columns: 1fr;
  }

  .notice-card,
  .block-heading {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero-panel h2 {
    font-size: 34px;
  }

  .hero-panel,
  .profile-card,
  .side-widget,
  .notice-card,
  .article-card,
  .project-card,
  .resume-main,
  .mini-card {
    padding: 20px;
  }

  .topbar-nav a {
    padding: 0 10px;
  }
}
