/* =========================================================
   Shinichi — personal blog
   Handwritten HTML · CSS · JavaScript
   ========================================================= */

:root {
  --paper: #fbfbfd;
  --paper-soft: #f5f5f7;
  --white: #ffffff;
  --ink: #1d1d1f;
  --ink-soft: #424245;
  --muted: #6e6e73;
  --muted-light: #86868b;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --green: #34c759;
  --line: rgba(29, 29, 31, 0.1);
  --line-soft: rgba(29, 29, 31, 0.06);
  --dark: #000000;
  --radius-xl: 40px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --header-h: 52px;
  --font: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", "Segoe UI Variable Display", "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "SF Mono", ui-monospace, "Cascadia Code",
    "Roboto Mono", Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

body.nav-open,
body.dialog-open {
  overflow: hidden;
}

::selection {
  background: rgba(0, 113, 227, 0.2);
  color: var(--ink);
}

img {
  max-width: 100%;
  height: auto;
}

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

button {
  margin: 0;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  background: none;
  cursor: pointer;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

ul,
ol,
dl,
dd {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
p,
blockquote,
figure {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.section-dark {
  background: var(--dark);
  color: var(--paper-soft);
}

.eyebrow {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.17em;
  line-height: 1.4;
  text-transform: uppercase;
}

.section-title {
  max-width: 1000px;
  margin-top: 22px;
  font-size: clamp(44px, 5.7vw, 78px);
  font-weight: 650;
  letter-spacing: -0.05em;
  line-height: 1.06;
  text-wrap: balance;
}

.section-sub {
  max-width: 590px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.section-head {
  margin-bottom: 58px;
}

.section-head--dark .eyebrow {
  color: #86868b;
}

.section-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

/* Reveal animations (only when JS is available) */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.js .reveal[data-delay="1"] {
  transition-delay: 0.08s;
}

.js .reveal[data-delay="2"] {
  transition-delay: 0.16s;
}

.js .reveal[data-delay="3"] {
  transition-delay: 0.24s;
}

.js .reveal[data-delay="4"] {
  transition-delay: 0.32s;
}

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

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.12);
}

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(251, 251, 253, 0.72);
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(251, 251, 253, 0.86);
  border-color: var(--line-soft);
  box-shadow: 0 1px 18px rgba(0, 0, 0, 0.03);
}

.nav-shell {
  display: flex;
  width: min(1240px, calc(100% - 40px));
  height: 100%;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.brand-mark {
  width: 21px;
  height: 21px;
  color: var(--ink);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand:hover .brand-mark {
  transform: rotate(90deg);
}

.brand-word {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.035em;
}

.brand-cn {
  padding-left: 9px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-left: auto;
}

.desktop-nav a {
  position: relative;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  content: "";
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="true"] {
  color: var(--ink);
}

.desktop-nav a:hover::after,
.desktop-nav a[aria-current="true"]::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 11px;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.nav-github span {
  font-size: 10px;
  transition: transform 0.25s ease;
}

.nav-github:hover {
  border-color: rgba(29, 29, 31, 0.24);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
}

.nav-github:hover span {
  transform: translate(1px, -1px);
}

.menu-toggle {
  display: none;
  position: relative;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  border-radius: 50%;
}

.menu-toggle span {
  display: block;
  width: 17px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--ink);
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    width 0.35s ease;
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: var(--header-h);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  display: flex;
  padding: 36px max(24px, calc((100vw - 1240px) / 2 + 24px)) 40px;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(251, 251, 253, 0.97);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition:
    opacity 0.35s ease,
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.35s;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
}

.mobile-nav a {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(34px, 7vw, 52px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
}

.mobile-nav a:first-child {
  border-top: 1px solid var(--line);
}

.mobile-nav a span {
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
}

.mobile-menu-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
  color: var(--muted);
  font-size: 12px;
}

.mobile-menu-foot a {
  color: var(--ink);
}

.mobile-menu-foot p {
  text-align: right;
}

/* ---------------------------------------------------------
   Buttons & links
   --------------------------------------------------------- */

.btn {
  display: inline-flex;
  min-height: 44px;
  padding: 13px 24px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.1;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease,
    border-color 0.25s ease;
}

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

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--blue-hover);
}

.btn-glass {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.btn-glass:hover {
  border-color: var(--white);
  background: var(--white);
  color: var(--ink);
}

.btn-dark {
  background: var(--ink);
  color: var(--white);
}

.btn-dark:hover {
  background: #333336;
}

.btn-white {
  background: var(--white);
  color: var(--ink);
}

.btn-white:hover {
  background: #e8e8ed;
}

.btn-outline {
  border: 1px solid rgba(29, 29, 31, 0.24);
  color: var(--ink);
}

.btn-outline:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--blue);
  font-size: 13.5px;
  font-weight: 500;
}

.link-arrow span {
  display: inline-block;
  transition: transform 0.25s ease;
}

.link-arrow:hover span {
  transform: translateY(2px);
}

.link-arrow--light {
  color: #f5f5f7;
}

.link-arrow--light:hover {
  color: var(--white);
}

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  min-height: 100svh;
  padding: 150px 0 100px;
  align-items: center;
  overflow: hidden;
  background: var(--paper);
  isolation: isolate;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    radial-gradient(56% 46% at 50% -8%, rgba(0, 113, 227, 0.11), transparent 70%),
    radial-gradient(32% 30% at 15% 24%, rgba(255, 94, 122, 0.08), transparent 72%),
    radial-gradient(34% 32% at 88% 16%, rgba(255, 174, 72, 0.1), transparent 72%);
}

.hero-ambient {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.62;
  will-change: transform;
}

.orb--blue {
  top: 8%;
  left: 56%;
  width: clamp(220px, 34vw, 520px);
  height: clamp(220px, 34vw, 520px);
  background: radial-gradient(circle at 40% 40%, rgba(0, 113, 227, 0.28), transparent 68%);
  animation: orb-drift-a 18s ease-in-out infinite alternate;
}

.orb--rose {
  top: 40%;
  left: 2%;
  width: clamp(160px, 24vw, 380px);
  height: clamp(160px, 24vw, 380px);
  background: radial-gradient(circle at 50% 50%, rgba(255, 94, 122, 0.18), transparent 70%);
  animation: orb-drift-b 22s ease-in-out infinite alternate;
}

.orb--amber {
  right: 2%;
  bottom: 8%;
  width: clamp(170px, 22vw, 360px);
  height: clamp(170px, 22vw, 360px);
  background: radial-gradient(circle at 50% 50%, rgba(255, 174, 72, 0.17), transparent 70%);
  animation: orb-drift-c 26s ease-in-out infinite alternate;
}

@keyframes orb-drift-a {
  to {
    transform: translate3d(-36px, 28px, 0) scale(1.08);
  }
}

@keyframes orb-drift-b {
  to {
    transform: translate3d(28px, -34px, 0) scale(1.1);
  }
}

@keyframes orb-drift-c {
  to {
    transform: translate3d(-22px, -24px, 0) scale(1.06);
  }
}

.hero-grid-lines {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(29, 29, 31, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 29, 31, 0.035) 1px, transparent 1px);
  background-size: 82px 82px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 10%, transparent 75%);
  opacity: 0.65;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--muted);
}

.hero-eyebrow .status-dot {
  width: 6px;
  height: 6px;
  flex-basis: 6px;
  box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.1);
}

.hero-title {
  max-width: 1100px;
  margin: 28px auto 0;
  font-size: clamp(58px, 10.6vw, 148px);
  font-weight: 700;
  letter-spacing: -0.075em;
  line-height: 1.02;
}

.gradient-text {
  color: #5b5bff;
  background: linear-gradient(100deg, #0071e3 2%, #7366ff 44%, #ff5e7a 83%, #ff9f6b 100%);
  background-size: 170% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-drift 12s ease-in-out infinite alternate;
}

@keyframes gradient-drift {
  to {
    background-position: 100% 50%;
  }
}

.hero-lead {
  max-width: 650px;
  margin: 32px auto 0;
  color: var(--muted);
  font-size: clamp(16.5px, 1.5vw, 20px);
  letter-spacing: -0.012em;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  margin-top: 34px;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.hero-meta {
  display: flex;
  margin-top: clamp(62px, 9vh, 104px);
  padding-top: 18px;
  align-items: center;
  justify-content: center;
  gap: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-meta > span:not(.hero-meta-note) {
  position: relative;
}

.hero-meta > span:not(.hero-meta-note)::before {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-right: 28px;
  border-radius: 50%;
  background: rgba(29, 29, 31, 0.22);
  content: "";
  vertical-align: middle;
}

.hero-meta > span:first-child::before {
  display: none;
}

.hero-meta-note {
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: #a1a1a6;
  letter-spacing: 0.04em;
  text-transform: none;
}

.hero-scroll {
  position: absolute;
  right: 32px;
  bottom: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #a1a1a6;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  writing-mode: vertical-rl;
}

.hero-scroll i {
  display: block;
  width: 1px;
  height: 52px;
  background: linear-gradient(var(--muted-light), transparent);
  animation: scroll-pulse 2.4s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scaleY(0.65);
    transform-origin: top;
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
    transform-origin: top;
  }
}

/* ---------------------------------------------------------
   About
   --------------------------------------------------------- */

.about {
  position: relative;
  padding: 142px 0 120px;
  overflow: hidden;
}

.about > .container {
  position: relative;
  z-index: 2;
}

.about-glow {
  position: absolute;
  top: -180px;
  right: -180px;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(93, 63, 211, 0.2), transparent 64%);
  filter: blur(90px);
  pointer-events: none;
}

.about-copy {
  max-width: 720px;
  color: #a1a1a6;
  font-size: 16px;
  line-height: 1.85;
}

.about-copy p + p {
  margin-top: 20px;
}

.about-lead {
  margin-bottom: 30px;
  color: #f5f5f7;
  font-size: clamp(21px, 2.1vw, 26px);
  letter-spacing: -0.025em;
  line-height: 1.55;
}

.about-copy strong {
  color: #f5f5f7;
  font-weight: 500;
}

.about-facts {
  display: grid;
  margin: 30px 0 34px;
  padding: 20px 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.about-fact {
  display: flex;
  padding-left: 18px;
  flex-direction: column;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.about-fact:first-child {
  padding-left: 0;
  border-left: 0;
}

.fact-label {
  color: #6e6e73;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.about-fact strong {
  margin-top: 8px;
  color: #f5f5f7;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.fact-detail {
  margin-top: 5px;
  color: #86868b;
  font-size: 11.5px;
  line-height: 1.6;
}

.about-grid {
  display: grid;
  margin-top: 78px;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 80px;
  align-items: start;
}

.principles {
  margin-top: 50px;
}

.principles li {
  display: grid;
  padding: 22px 0;
  grid-template-columns: 48px minmax(0, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.principles li:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.principle-index {
  color: #6e6e73;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.principles strong {
  display: block;
  color: #f5f5f7;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.principles p {
  margin-top: 5px;
  color: #86868b;
  font-size: 13px;
  line-height: 1.7;
}

.profile-card {
  position: relative;
  padding: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 32px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025) 58%),
    rgba(255, 255, 255, 0.02);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.profile-card::after {
  position: absolute;
  top: -70px;
  right: -70px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle, rgba(0, 113, 227, 0.22), transparent 68%);
  filter: blur(30px);
  pointer-events: none;
}

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

.avatar-ring {
  width: 88px;
  height: 88px;
  padding: 2px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, #0071e3, #8a5cff, #ff5e7a, #ff9f6b, #0071e3);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.36);
}

.avatar-ring img {
  display: block;
  width: 100%;
  height: 100%;
  border: 2px solid #0b0b0d;
  border-radius: 50%;
  object-fit: cover;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: #a1a1a6;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  line-height: 1;
}

.live-pill .status-dot {
  width: 5px;
  height: 5px;
  flex-basis: 5px;
}

.live-pill--green {
  border-color: rgba(52, 199, 89, 0.22);
  background: rgba(52, 199, 89, 0.08);
  color: #2f9e4f;
}

.profile-card h3 {
  margin-top: 24px;
  color: #f5f5f7;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.profile-cn {
  margin-top: 4px;
  color: #a1a1a6;
  font-size: 12.5px;
}

.profile-role {
  margin-top: 16px;
  color: #86868b;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-tags {
  display: flex;
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 7px;
}

.profile-tags span {
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: #a1a1a6;
  font-size: 10.5px;
}

.profile-now {
  display: flex;
  margin-top: 22px;
  padding-top: 18px;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #d2d2d7;
  font-size: 11.5px;
}

.now-label {
  color: #6e6e73;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.writing {
  display: grid;
  margin-top: 86px;
  padding-top: 36px;
  grid-template-columns: minmax(0, 0.76fr) minmax(0, 1.24fr);
  align-items: start;
  gap: 64px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.writing-head h3 {
  max-width: 360px;
  margin-top: 14px;
  color: #f5f5f7;
  font-size: clamp(30px, 3.2vw, 42px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.16;
}

.writing-head > p:last-child {
  max-width: 340px;
  margin-top: 16px;
  color: #86868b;
  font-size: 13px;
  line-height: 1.8;
}

.writing-list {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.writing-item {
  display: grid;
  padding: 18px 10px;
  margin-inline: -10px;
  grid-template-columns: 28px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.25s ease;
}

.writing-item:hover {
  background: rgba(255, 255, 255, 0.045);
}

.writing-index {
  color: #6e6e73;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.writing-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.writing-title {
  color: #f5f5f7;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.45;
  text-wrap: balance;
}



.writing-meta {
  color: #6e6e73;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.05em;
}

.writing-arrow {
  color: #86868b;
  font-size: 13px;
  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

.writing-item:hover .writing-arrow {
  color: #f5f5f7;
  transform: translate(2px, -2px);
}

.stats {
  display: grid;
  margin-top: 96px;
  padding-top: 34px;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  gap: 28px;
}

.stat-num {
  display: block;
  color: #f5f5f7;
  font-size: clamp(38px, 4vw, 56px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.055em;
  line-height: 1;
}

.stat-label {
  display: block;
  margin-top: 12px;
  color: #86868b;
  font-size: 11.5px;
  line-height: 1.6;
}

.stats-note {
  margin-left: auto;
  color: #6e6e73;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.07em;
  line-height: 1.8;
  text-align: right;
}

/* ---------------------------------------------------------
   Work
   --------------------------------------------------------- */

.work {
  padding: 142px 0 136px;
  background: var(--paper);
}

.project {
  position: relative;
  display: grid;
  min-height: 680px;
  padding: 62px;
  margin-top: 28px;
  overflow: hidden;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: 38px;
  border-radius: var(--radius-xl);
  isolation: isolate;
}

.project:first-of-type {
  margin-top: 0;
}

.project--spell {
  background: #110b1f;
  box-shadow: 0 36px 90px rgba(17, 11, 31, 0.16);
  color: var(--white);
}

.project-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("assets/spellcard-banner.webp");
  background-position: center 42%;
  background-size: cover;
  opacity: 0.58;
  transform: scale(1.035);
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project--spell:hover .project-media {
  transform: scale(1.075);
}

.project-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(7, 4, 18, 0.96) 0%, rgba(7, 4, 18, 0.8) 38%, rgba(7, 4, 18, 0.17) 74%, rgba(7, 4, 18, 0.38) 100%),
    linear-gradient(0deg, rgba(7, 4, 18, 0.8) 0%, transparent 48%);
}

.project-content,
.project-visual {
  position: relative;
  z-index: 2;
}

.project-content {
  max-width: 510px;
}

.project-kicker {
  color: rgba(255, 255, 255, 0.56);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-title {
  margin-top: 18px;
  font-size: clamp(46px, 5.2vw, 76px);
  font-weight: 650;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.project-title a {
  transition: opacity 0.2s ease;
}

.project-title a:hover {
  opacity: 0.76;
}

.project-subtitle {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1.45;
}

.project-desc {
  max-width: 470px;
  margin-top: 19px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 14.5px;
  line-height: 1.8;
}

.tags {
  display: flex;
  margin-top: 24px;
  flex-wrap: wrap;
  gap: 7px;
}

.tags li {
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.68);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.03em;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.project-stats {
  display: flex;
  margin-top: 28px;
  flex-wrap: wrap;
  gap: 34px;
}

.project-stats dt {
  color: rgba(255, 255, 255, 0.42);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.project-stats dd {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.project .btn {
  margin-top: 32px;
}

.project-actions {
  display: flex;
  margin-top: 32px;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
}

.project-actions .btn {
  margin-top: 0;
}

.project-store-link {
  color: var(--blue);
  font-size: 12.5px;
  font-weight: 500;
}

.project-store-link span {
  display: inline-block;
  transition: transform 0.25s ease;
}

.project-store-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-store-link:hover span {
  transform: translate(2px, -2px);
}

/* SpellCard visual */
.project-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-window {
  position: relative;
  width: min(100%, 760px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  background: #100b19;
  box-shadow:
    0 65px 130px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(0, 0, 0, 0.32);
  transform: perspective(1500px) rotateY(-7deg) rotateX(2deg);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.project--spell:hover .app-window {
  transform: perspective(1500px) rotateY(-3deg) rotateX(1deg) translateY(-4px);
}

.window-bar {
  display: flex;
  height: 39px;
  padding: 0 14px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: #1a1426;
}

.window-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.window-dots i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5a4a66;
}

.window-dots i:first-child {
  background: #ff5f57;
  opacity: 0.78;
}

.window-dots i:nth-child(2) {
  background: #febc2e;
  opacity: 0.78;
}

.window-dots i:nth-child(3) {
  background: #28c840;
  opacity: 0.78;
}

.window-title {
  color: rgba(255, 255, 255, 0.36);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
}

.window-live {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 5px;
  color: #6da779;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
}

.window-live .status-dot {
  width: 4px;
  height: 4px;
  flex-basis: 4px;
  box-shadow: none;
}

.app-window > img {
  display: block;
  width: 100%;
  height: auto;
}

.floating-chip {
  position: absolute;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(20, 12, 34, 0.62);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  animation: float-soft 7s ease-in-out infinite;
}

.floating-chip--ai {
  top: -18px;
  right: 8px;
}

@keyframes float-soft {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Minesweeper */
.project--mine {
  margin-top: 28px;
  background: #e8f1ff;
  color: #07162d;
}

.mine-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(50% 65% at 82% 38%, rgba(0, 113, 227, 0.2), transparent 70%),
    radial-gradient(34% 48% at 93% 92%, rgba(61, 214, 198, 0.26), transparent 72%),
    radial-gradient(32% 40% at 9% 94%, rgba(113, 85, 255, 0.12), transparent 74%);
  pointer-events: none;
}

.mine-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(rgba(7, 22, 45, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 22, 45, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(90deg, transparent 16%, #000 68%);
  mask-image: linear-gradient(90deg, transparent 16%, #000 68%);
}

.project--mine .project-kicker {
  color: #60718a;
}

.project--mine .project-subtitle {
  color: #263d5b;
}

.project--mine .project-desc {
  color: #53657f;
}

.project--mine .tags li {
  border-color: rgba(18, 72, 142, 0.16);
  background: rgba(255, 255, 255, 0.54);
  color: #38557a;
}

.project--mine .project-stats dt {
  color: #7e8fa6;
}

.project--mine .project-stats dd {
  color: #102b4f;
}

.mine-app {
  position: relative;
  width: min(100%, 468px);
  overflow: hidden;
  border: 1px solid rgba(99, 131, 174, 0.34);
  border-radius: 20px;
  background: #f8fbff;
  box-shadow:
    0 35px 80px rgba(28, 73, 130, 0.23),
    0 2px 0 rgba(255, 255, 255, 0.7) inset;
}

.mine-titlebar {
  display: flex;
  height: 42px;
  padding: 0 14px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #dfe8f4;
  background: #f3f8fe;
}

.mine-app-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: #344861;
  font-size: 10.5px;
  font-weight: 500;
}

.mine-app-name img {
  width: 18px;
  height: 18px;
  border-radius: 5px;
}

.mine-version {
  padding: 2px 6px;
  border-radius: 999px;
  background: #e4eefb;
  color: #70839c;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.02em;
}

.window-dots--light i {
  background: #c6d3e4;
}

.window-dots--light i:first-child,
.window-dots--light i:nth-child(2),
.window-dots--light i:nth-child(3) {
  background: #c6d3e4;
  opacity: 1;
}

.mine-toolbar {
  display: grid;
  padding: 12px 14px 7px;
  grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.mine-reset,
.mine-flag-toggle {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d6e2f1;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #edf4fc);
  box-shadow: 0 1px 2px rgba(32, 69, 110, 0.09);
  font-size: 16px;
  line-height: 1;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.mine-counter {
  grid-column: 1;
  justify-self: start;
}

.mine-reset {
  grid-column: 2;
}

.mine-flag-toggle {
  grid-column: 3;
}

.mine-timer {
  grid-column: 4;
  justify-self: end;
}

.mine-reset:hover,
.mine-flag-toggle:hover {
  border-color: #a9c2df;
  transform: translateY(-1px);
}

.mine-reset:active,
.mine-flag-toggle:active {
  transform: scale(0.94);
}

.mine-flag-toggle[aria-pressed="true"] {
  border-color: #66a1e8;
  background: #dfeeff;
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.13);
}

.mine-counter,
.mine-timer {
  min-width: 46px;
  padding: 5px 7px;
  border: 1px solid rgba(8, 22, 38, 0.1);
  border-radius: 7px;
  background: #0e1c2c;
  color: #ff6b62;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: center;
  text-shadow: 0 0 9px rgba(255, 84, 75, 0.4);
}

.mine-board {
  display: grid;
  padding: 7px 14px 11px;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 4px;
  background: #e4eefb;
  border-top: 1px solid #d5e3f4;
  border-bottom: 1px solid #d5e3f4;
  touch-action: manipulation;
}

.mine-cell {
  position: relative;
  display: flex;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 5px;
  background: linear-gradient(145deg, #ffffff 0%, #dfeafa 100%);
  box-shadow:
    0 1px 2px rgba(27, 56, 94, 0.19),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
  color: #2f6fce;
  font-family: var(--mono);
  font-size: clamp(10px, 1.1vw, 14px);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    filter 0.12s ease,
    background 0.2s ease;
  user-select: none;
}

.mine-cell:hover {
  filter: brightness(1.035);
  transform: translateY(-1px);
}

.mine-cell:active {
  transform: scale(0.94);
}

.mine-cell.is-open {
  background: rgba(248, 252, 255, 0.84);
  box-shadow: inset 0 0 0 1px rgba(127, 159, 197, 0.2);
  cursor: default;
  filter: none;
  transform: none;
}

.mine-cell.is-flag {
  background: #fff3dc;
}

.mine-cell.is-flag::after {
  content: "🚩";
  font-size: clamp(9px, 1vw, 12px);
}

.mine-cell.is-mine {
  background: #ffe1de;
}

.mine-cell.n1 { color: #1d64c8; }
.mine-cell.n2 { color: #1e8a4c; }
.mine-cell.n3 { color: #d1453f; }
.mine-cell.n4 { color: #6646b8; }
.mine-cell.n5 { color: #a33c2c; }
.mine-cell.n6 { color: #137f8a; }
.mine-cell.n7 { color: #1d1d1f; }
.mine-cell.n8 { color: #6e6e73; }

.mine-cell.is-exploded {
  background: #ffc9c2;
  animation: cell-shake 0.4s ease;
}

@keyframes cell-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  50% { transform: translateX(2px); }
  75% { transform: translateX(-1px); }
}

.mine-status {
  display: flex;
  padding: 10px 16px 12px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #8796aa;
  font-size: 8px;
  letter-spacing: 0.02em;
}

.float-badge {
  position: absolute;
  z-index: 4;
  border: 1px solid rgba(102, 135, 176, 0.2);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 44px rgba(35, 83, 145, 0.2);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.float-badge--tests {
  top: 6px;
  right: -8px;
  display: flex;
  padding: 12px 14px;
  align-items: center;
  gap: 8px;
  border-radius: 14px;
  transform: rotate(3deg);
}

.float-badge--tests strong {
  color: #102b4f;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.05em;
  line-height: 1;
}

.float-badge--tests span:last-child {
  max-width: 42px;
  color: #71839a;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.05em;
  line-height: 1.4;
  text-transform: uppercase;
}

.test-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2dbb65;
  box-shadow: 0 0 0 4px rgba(45, 187, 101, 0.11);
}

.float-badge--store {
  bottom: -22px;
  left: -6px;
  display: flex;
  padding: 10px 14px;
  align-items: center;
  gap: 9px;
  border-radius: 12px;
  color: #0071e3;
  font-size: 13px;
  transform: rotate(-2deg);
}

.float-badge--store p {
  display: flex;
  flex-direction: column;
}

.float-badge--store strong {
  color: #193352;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.3;
}

.float-badge--store small {
  color: #8394aa;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.03em;
}

/* ---------------------------------------------------------
   Quote
   --------------------------------------------------------- */

.quote-band {
  padding: 150px 0 148px;
  background: var(--white);
  text-align: center;
}

.quote-mark {
  display: block;
  color: #c7c7cc;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 84px;
  line-height: 0.5;
}

.quote-band blockquote {
  max-width: 1000px;
  margin: 30px auto 0;
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.12;
  text-wrap: balance;
}

.quote-band cite {
  display: block;
  margin-top: 28px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------
   Notes
   --------------------------------------------------------- */

.notes {
  padding: 140px 0;
  background: var(--paper-soft);
}

.notes .section-head--row .link-arrow {
  margin-bottom: 8px;
  flex-shrink: 0;
}

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

.note-card {
  display: flex;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid rgba(29, 29, 31, 0.045);
  border-radius: 26px;
  background: var(--white);
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.025);
  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.5s ease;
}

.note-card:hover {
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.09);
  transform: translateY(-8px);
}

.note-visual {
  position: relative;
  display: block;
  height: 222px;
  padding: 20px;
  overflow: hidden;
}

.note-visual::before,
.note-visual::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.note-category {
  position: relative;
  z-index: 2;
  display: inline-flex;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.note-glyph {
  position: absolute;
  bottom: 13px;
  left: 20px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.92);
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.07em;
  line-height: 1;
}

.note-glyph--serif {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.08em;
}

.note-visual-caption {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.56);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.06em;
  line-height: 1.55;
  text-align: right;
  text-transform: uppercase;
}

.note-visual--spell {
  background:
    radial-gradient(70% 100% at 15% 100%, rgba(255, 158, 117, 0.66), transparent 60%),
    linear-gradient(135deg, #251338 0%, #6e2c58 52%, #ff9070 100%);
}

.note-visual--spell::before {
  top: -42px;
  right: -30px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 212, 185, 0.3);
  filter: blur(4px);
}

.note-visual--spell::after {
  right: 28px;
  bottom: -42px;
  width: 170px;
  height: 100px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.note-visual--mine {
  background-color: #0c141d;
  background-image:
    linear-gradient(rgba(92, 182, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 182, 255, 0.09) 1px, transparent 1px);
  background-size: 24px 24px;
}

.note-visual--mine::before {
  top: 24px;
  right: 22px;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(126, 231, 135, 0.24);
  border-radius: 50%;
  box-shadow:
    0 0 0 14px rgba(126, 231, 135, 0.035),
    0 0 0 28px rgba(126, 231, 135, 0.025);
}

.note-visual--mine .note-category {
  border-color: rgba(126, 231, 135, 0.25);
  background: rgba(126, 231, 135, 0.08);
  color: #7ee787;
}

.note-visual--mine .note-glyph {
  color: #7ee787;
  text-shadow: 0 0 28px rgba(126, 231, 135, 0.32);
}

.note-visual--design {
  background: #f0ede6;
}

.note-visual--design::before {
  top: 50%;
  left: 50%;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(29, 29, 31, 0.12);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.note-visual--design::after {
  top: 50%;
  left: 50%;
  width: 158px;
  height: 158px;
  border: 1px solid rgba(29, 29, 31, 0.11);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.note-visual--design .note-category {
  border-color: rgba(29, 29, 31, 0.15);
  background: rgba(255, 255, 255, 0.35);
  color: #55555a;
}

.note-visual--design .note-glyph {
  color: #1d1d1f;
}

.note-visual--design .note-visual-caption {
  color: rgba(29, 29, 31, 0.42);
}

.note-body {
  display: flex;
  padding: 25px 24px 23px;
  flex: 1;
  flex-direction: column;
}

.note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.note-meta span + span {
  position: relative;
}

.note-meta span + span::before {
  display: inline-block;
  width: 2px;
  height: 2px;
  margin-right: 14px;
  border-radius: 50%;
  background: #a1a1a6;
  content: "";
  vertical-align: middle;
}

.note-body h3 {
  margin-top: 14px;
  font-size: clamp(19px, 1.65vw, 22px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.38;
  text-wrap: balance;
}

.note-body p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.72;
}

.note-more {
  display: inline-flex;
  margin-top: auto;
  padding-top: 22px;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-size: 11.5px;
  font-weight: 500;
}

.note-more span {
  transition: transform 0.25s ease;
}

.note-card:hover .note-more span {
  transform: translate(2px, -2px);
}

/* ---------------------------------------------------------
   WeChat
   --------------------------------------------------------- */

.wechat {
  position: relative;
  padding: 150px 0;
  overflow: hidden;
}

.wechat > .container {
  position: relative;
  z-index: 2;
}

.wechat-glow {
  position: absolute;
  top: -140px;
  right: -120px;
  width: 760px;
  height: 760px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 42%, rgba(0, 113, 227, 0.34), transparent 48%),
    radial-gradient(circle at 66% 62%, rgba(180, 76, 255, 0.19), transparent 56%);
  filter: blur(95px);
  pointer-events: none;
}

.wechat-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  align-items: center;
  gap: 100px;
}

.wechat .section-title {
  font-size: clamp(50px, 6.3vw, 88px);
}

.wechat-lead {
  max-width: 560px;
  margin-top: 28px;
  color: #a1a1a6;
  font-size: 16px;
  line-height: 1.85;
}

.wechat-actions {
  display: flex;
  margin-top: 32px;
  align-items: center;
  gap: 28px;
}

.wechat-handle {
  display: flex;
  margin-top: 52px;
  align-items: center;
  gap: 10px;
  color: #a1a1a6;
  font-size: 12.5px;
}

.wechat-icon {
  display: inline-flex;
  width: 25px;
  height: 25px;
  padding: 5px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #07c160;
  color: var(--white);
}

.wechat-icon svg {
  width: 100%;
  height: 100%;
}

.qr-wrap {
  justify-self: end;
  width: 100%;
  max-width: 340px;
}

.qr-card {
  display: block;
  width: 100%;
  padding: 18px;
  border-radius: 28px;
  background: var(--white);
  color: var(--ink);
  text-align: left;
  box-shadow:
    0 35px 100px rgba(0, 20, 60, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s ease;
}

.qr-card:hover {
  box-shadow:
    0 45px 120px rgba(0, 20, 60, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.12);
  transform: translateY(-5px);
}

.qr-card-top {
  display: flex;
  padding: 2px 4px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11.5px;
}

.qr-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}

.qr-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.scan-line {
  position: absolute;
  top: 0;
  right: 9%;
  left: 9%;
  z-index: 2;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 113, 227, 0.9), transparent);
  box-shadow: 0 0 16px rgba(0, 113, 227, 0.7);
  opacity: 0.7;
  animation: scan 4.6s ease-in-out infinite;
}

@keyframes scan {
  0%,
  100% {
    top: 8%;
    opacity: 0;
  }
  12% {
    opacity: 0.75;
  }
  50% {
    top: 90%;
    opacity: 0.75;
  }
  88% {
    opacity: 0;
  }
}

.qr-corner {
  position: absolute;
  z-index: 3;
  width: 18px;
  height: 18px;
  border-color: rgba(0, 113, 227, 0.55);
  border-style: solid;
  pointer-events: none;
}

.qr-corner--tl {
  top: 9px;
  left: 9px;
  border-width: 1px 0 0 1px;
  border-radius: 5px 0 0;
}

.qr-corner--tr {
  top: 9px;
  right: 9px;
  border-width: 1px 1px 0 0;
  border-radius: 0 5px 0 0;
}

.qr-corner--bl {
  bottom: 9px;
  left: 9px;
  border-width: 0 0 1px 1px;
  border-radius: 0 0 0 5px;
}

.qr-corner--br {
  right: 9px;
  bottom: 9px;
  border-width: 0 1px 1px 0;
  border-radius: 0 0 5px;
}

.qr-caption {
  display: block;
  padding: 14px 4px 4px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.01em;
  text-align: center;
}

.qr-hint {
  margin-top: 15px;
  color: #6e6e73;
  font-size: 10.5px;
  text-align: center;
}

.qr-hint a {
  color: #d2d2d7;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.25);
  text-underline-offset: 3px;
}

.qr-hint a:hover {
  color: var(--white);
}

/* QR dialog */
.qr-dialog {
  width: min(92vw, 540px);
  max-height: 92vh;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 30px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 50px 150px rgba(0, 0, 0, 0.5);
}

.qr-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.qr-dialog[open] {
  animation: dialog-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.qr-dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--paper-soft);
  color: var(--muted);
  font-size: 12px;
}

.qr-dialog-close:hover {
  background: #e8e8ed;
  color: var(--ink);
}

.qr-dialog-close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.22);
}

.qr-dialog-body {
  padding: 34px 34px 30px;
  text-align: center;
}

.qr-dialog-body .eyebrow {
  color: var(--muted-light);
}

.qr-dialog-body h2 {
  margin-top: 10px;
  font-size: 32px;
  font-weight: 650;
  letter-spacing: -0.045em;
}

.qr-dialog-image {
  width: min(100%, 360px);
  margin: 24px auto 0;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px var(--line-soft);
}

.qr-dialog-image img {
  display: block;
  width: 100%;
}

.qr-dialog-caption {
  margin-top: 18px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.qr-dialog-save {
  margin-top: 20px;
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

.site-footer {
  padding: 96px 0 28px;
  background: var(--paper-soft);
  color: var(--ink);
}

.footer-top {
  display: flex;
  padding-bottom: 56px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  border-bottom: 1px solid var(--line);
}

.footer-eyebrow {
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
}

.footer-wordmark {
  margin-top: 13px;
  font-size: clamp(44px, 5vw, 68px);
  font-weight: 650;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.footer-wordmark span {
  color: var(--blue);
}

.footer-line {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12.5px;
}

.footer-top > .btn {
  margin-bottom: 6px;
  flex-shrink: 0;
}

.footer-grid {
  display: grid;
  padding: 54px 0 46px;
  grid-template-columns: 0.8fr 1fr 0.9fr 1.5fr;
  gap: 40px;
}

.footer-col {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

.footer-col h2 {
  margin-bottom: 16px;
  color: var(--muted-light);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-col a,
.footer-text-btn {
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.5;
  text-align: left;
  transition: color 0.2s ease;
}

.footer-col a:hover,
.footer-text-btn:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-col--about p {
  max-width: 300px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.75;
}

.footer-col--about .footer-stack {
  margin-top: 14px;
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
}

.footer-bottom {
  display: flex;
  padding-top: 20px;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted-light);
  font-size: 10px;
}

.footer-made {
  margin-left: auto;
  color: #a1a1a6;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 10px;
}

.back-to-top:hover {
  color: var(--ink);
}

.back-to-top span {
  transition: transform 0.25s ease;
}

.back-to-top:hover span {
  transform: translateY(-2px);
}

/* ---------------------------------------------------------
   Article pages & notes index
   --------------------------------------------------------- */

.reading-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 200;
  height: 2px;
  background: var(--blue);
  box-shadow: 0 0 12px rgba(0, 113, 227, 0.45);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

.article-page {
  background: var(--white);
}

.article-hero {
  padding: 152px 0 54px;
}

.article-hero-inner {
  width: min(980px, calc(100% - 48px));
  margin-inline: auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--ink);
}

.article-kicker {
  display: flex;
  margin-top: 42px;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-kicker .article-category {
  color: var(--blue);
}

.article-hero h1 {
  max-width: 960px;
  margin-top: 18px;
  font-size: clamp(42px, 6.2vw, 82px);
  font-weight: 650;
  letter-spacing: -0.06em;
  line-height: 1.04;
  text-wrap: balance;
}

.article-dek {
  max-width: 740px;
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(16px, 1.55vw, 19px);
  letter-spacing: -0.012em;
  line-height: 1.75;
}

.article-byline {
  display: flex;
  margin-top: 34px;
  padding-top: 24px;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
}

.article-byline img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.article-byline strong {
  display: block;
  font-size: 11.5px;
  font-weight: 550;
}

.article-byline span {
  display: block;
  margin-top: 2px;
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.05em;
}

.article-byline time {
  margin-left: auto;
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

.article-cover {
  position: relative;
  width: min(1120px, calc(100% - 48px));
  height: clamp(230px, 34vw, 430px);
  margin: 28px auto 72px;
  overflow: hidden;
  border-radius: 30px;
  isolation: isolate;
}

.article-cover--spell {
  background:
    radial-gradient(58% 120% at 8% 88%, rgba(255, 170, 120, 0.72), transparent 62%),
    linear-gradient(120deg, #241235, #6f2d58 48%, #f58e71);
}

.article-cover--spell::before {
  position: absolute;
  top: -88px;
  right: 12%;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  content: "";
  box-shadow:
    0 0 0 42px rgba(255, 255, 255, 0.035),
    0 0 0 84px rgba(255, 255, 255, 0.02);
}

.article-cover--mine {
  background-color: #0b121a;
  background-image:
    linear-gradient(rgba(117, 187, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 187, 255, 0.09) 1px, transparent 1px);
  background-size: 34px 34px;
}

.article-cover--mine::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(126, 231, 135, 0.36);
  border-radius: 50%;
  content: "";
  box-shadow:
    0 0 0 48px rgba(126, 231, 135, 0.05),
    0 0 0 96px rgba(126, 231, 135, 0.028);
  transform: translate(-50%, -50%);
}

.article-cover--design {
  background: #f0ede6;
}

.article-cover--design::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 400px;
  border: 1px solid rgba(29, 29, 31, 0.14);
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
}

.article-cover--design::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(29, 29, 31, 0.12);
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
}

.cover-glyph {
  position: absolute;
  bottom: 28px;
  left: 34px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(54px, 8vw, 100px);
  font-weight: 600;
  letter-spacing: -0.075em;
  line-height: 1;
}

.article-cover--mine .cover-glyph {
  color: #7ee787;
  text-shadow: 0 0 42px rgba(126, 231, 135, 0.28);
}

.article-cover--design .cover-glyph {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
}

.cover-caption {
  position: absolute;
  right: 30px;
  bottom: 32px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  line-height: 1.6;
  text-align: right;
  text-transform: uppercase;
}

.article-cover--design .cover-caption {
  color: rgba(29, 29, 31, 0.4);
}

.article-layout {
  padding-bottom: 120px;
}

.prose {
  width: min(720px, calc(100% - 48px));
  margin-inline: auto;
  color: #333336;
  font-size: 17.5px;
  letter-spacing: -0.005em;
  line-height: 1.95;
}

.prose > p:first-of-type {
  color: var(--ink);
  font-size: 20px;
  letter-spacing: -0.018em;
  line-height: 1.8;
}

.prose p {
  margin-bottom: 26px;
}

.prose h2 {
  margin: 66px 0 22px;
  color: var(--ink);
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.25;
}

.prose h3 {
  margin: 44px 0 16px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.4;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: rgba(0, 113, 227, 0.3);
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-color: var(--blue);
}

.prose ul,
.prose ol {
  margin: 0 0 30px;
  padding-left: 24px;
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  margin-bottom: 9px;
  padding-left: 3px;
}

.prose li::marker {
  color: #a1a1a6;
}

.prose blockquote {
  margin: 48px 0;
  padding: 6px 0 6px 26px;
  border-left: 2px solid var(--blue);
  color: var(--ink);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.55;
}

.prose blockquote p {
  margin: 0;
}

.prose hr {
  width: 100%;
  margin: 56px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--paper-soft);
  color: #c53b6b;
  font-family: var(--mono);
  font-size: 0.86em;
}

.prose pre {
  margin: 30px 0;
  padding: 22px 24px;
  overflow-x: auto;
  border-radius: 16px;
  background: #131316;
  color: #e8e8ed;
  font-size: 12.5px;
  line-height: 1.8;
}

.prose pre code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

.article-end {
  display: flex;
  width: min(720px, calc(100% - 48px));
  margin: 72px auto 0;
  padding-top: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
}

.article-end p {
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-related {
  padding: 92px 0 120px;
  background: var(--paper-soft);
}

.article-related .section-head {
  margin-bottom: 40px;
}

.article-related .section-title {
  margin-top: 14px;
  font-size: clamp(32px, 4vw, 48px);
}

.article-related .notes-grid {
  margin-top: 0;
}

.article-related .note-visual {
  height: 180px;
}

.article-related .note-body h3 {
  font-size: 18px;
}

/* Notes index */
.notes-index-hero {
  padding: 170px 0 70px;
  background: var(--paper);
}

.notes-index-hero .section-title {
  max-width: 900px;
  font-size: clamp(64px, 9vw, 132px);
  letter-spacing: -0.075em;
  line-height: 1.02;
}

.notes-index-hero .article-dek {
  max-width: 580px;
}

.notes-index {
  padding: 20px 0 140px;
  background: var(--paper);
}

.notes-index .notes-grid {
  margin-top: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.notes-index .note-visual {
  height: 260px;
}

.notes-index .note-body h3 {
  font-size: clamp(21px, 2vw, 26px);
}

.notes-index .note-body p {
  font-size: 13.5px;
}

.notes-index-foot {
  display: flex;
  margin-top: 72px;
  padding-top: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
}

.notes-index-foot p {
  color: var(--muted);
  font-size: 13px;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 1120px) {
  .about-grid {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 52px;
  }

  .project {
    padding: 50px;
  }

  .project--spell {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  }

  .wechat-grid {
    gap: 64px;
  }

  .app-window {
    transform: perspective(1500px) rotateY(-4deg) rotateX(1deg);
  }
}

@media (max-width: 960px) {
  .desktop-nav {
    display: none;
  }

  .nav-github {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-shell {
    width: calc(100% - 34px);
  }

  .hero {
    min-height: 94svh;
  }

  .hero-title {
    font-size: clamp(58px, 12vw, 112px);
  }

  .hero-meta {
    flex-wrap: wrap;
    gap: 16px 24px;
  }

  .hero-meta-note {
    width: 100%;
    margin-left: 0;
    padding-top: 4px;
    padding-left: 0;
    border-left: 0;
  }

  .hero-meta > span:not(.hero-meta-note)::before {
    margin-right: 24px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .profile-card {
    width: min(100%, 420px);
  }

  .writing {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .writing-head h3,
  .writing-head > p:last-child {
    max-width: 560px;
  }

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

  .stats-note {
    grid-column: 1 / -1;
    margin-left: 0;
    text-align: left;
  }

  .project {
    min-height: 0;
    padding: 48px;
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .project-content {
    max-width: 620px;
  }

  .project-visual {
    justify-content: flex-start;
    padding: 0 4% 14px;
  }

  .project--spell .project-shade {
    background:
      linear-gradient(180deg, rgba(7, 4, 18, 0.94) 0%, rgba(7, 4, 18, 0.78) 42%, rgba(7, 4, 18, 0.35) 100%),
      linear-gradient(0deg, rgba(7, 4, 18, 0.75) 0%, transparent 50%);
  }

  .app-window {
    transform: none;
  }

  .project--spell:hover .app-window {
    transform: translateY(-4px);
  }

  .floating-chip--ai {
    top: -14px;
    right: 16px;
  }

  .mine-app {
    width: min(100%, 500px);
  }

  .float-badge--tests {
    top: -4px;
    right: 3%;
  }

  .float-badge--store {
    bottom: -2px;
    left: 3%;
  }

  .wechat-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .qr-wrap {
    justify-self: start;
    max-width: 360px;
  }

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

  .notes-grid .note-card:last-child {
    grid-column: 1 / -1;
  }

  .notes-grid .note-card:last-child .note-visual {
    height: 200px;
  }

  .notes-grid .note-card:last-child .note-body {
    padding-bottom: 28px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 42px;
  }

  .footer-col--about {
    grid-column: 1 / -1;
  }

  .footer-col--about p {
    max-width: 440px;
  }

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

  .notes-index .notes-grid .note-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .container {
    width: calc(100% - 40px);
  }

  :root {
    --radius-xl: 30px;
    --radius-lg: 24px;
    --header-h: 52px;
  }

  .brand-cn {
    display: none;
  }

  .hero {
    min-height: 90svh;
    padding: 118px 0 74px;
  }

  .hero-title {
    margin-top: 22px;
    font-size: clamp(52px, 14.5vw, 78px);
    letter-spacing: -0.07em;
    line-height: 1.02;
  }

  .hero-lead {
    margin-top: 24px;
    font-size: 15.5px;
  }

  .desktop-only {
    display: none;
  }

  .hero-actions {
    margin-top: 28px;
    gap: 22px;
  }

  .btn {
    min-height: 42px;
    padding: 12px 20px;
    font-size: 12.5px;
  }

  .hero-meta {
    margin-top: 58px;
    gap: 13px 20px;
    font-size: 8px;
  }

  .hero-meta > span:not(.hero-meta-note)::before {
    margin-right: 20px;
  }

  .hero-scroll {
    display: none;
  }

  .section-title {
    margin-top: 16px;
    font-size: clamp(38px, 10.5vw, 52px);
    line-height: 1.08;
  }

  .about .section-title {
    font-size: clamp(29px, 8.2vw, 44px);
  }

  .section-sub {
    margin-top: 17px;
    font-size: 14.5px;
  }

  .section-head {
    margin-bottom: 38px;
  }

  .section-head--row {
    display: block;
  }

  .section-head--row > .link-arrow {
    margin-top: 22px;
  }

  .about {
    padding: 96px 0 88px;
  }

  .about-grid {
    margin-top: 52px;
  }

  .about-copy {
    font-size: 15px;
  }

  .about-lead {
    margin-bottom: 24px;
    font-size: 21px;
  }

  .about-facts {
    margin: 24px 0 30px;
    padding: 0;
    grid-template-columns: 1fr;
    gap: 0;
    border-bottom: 0;
  }

  .about-fact {
    padding: 13px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 0;
  }

  .about-fact:last-child {
    border-bottom: 0;
  }

  .fact-label {
    font-size: 7.5px;
  }

  .about-fact strong {
    margin-top: 4px;
    font-size: 14px;
  }

  .fact-detail {
    margin-top: 3px;
    font-size: 11px;
  }

  .principles {
    margin-top: 38px;
  }

  .principles li {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .profile-card {
    padding: 22px;
    border-radius: 26px;
  }

  .avatar-ring {
    width: 78px;
    height: 78px;
  }

  .writing {
    margin-top: 58px;
    padding-top: 28px;
    gap: 30px;
  }

  .writing-head h3 {
    margin-top: 12px;
    font-size: clamp(28px, 8.5vw, 36px);
  }

  .writing-head > p:last-child {
    margin-top: 12px;
    font-size: 12.5px;
  }

  .writing-item {
    padding: 16px 0;
    margin-inline: 0;
    grid-template-columns: 24px minmax(0, 1fr) 16px;
    gap: 10px;
  }

  .writing-title {
    font-size: 14px;
  }

  .writing-title > span {
    display: block;
  }


  .writing-meta {
    font-size: 8px;
  }

  .stats {
    margin-top: 64px;
    padding-top: 26px;
    gap: 18px;
  }

  .stat-num {
    font-size: 38px;
  }

  .stat-label {
    margin-top: 8px;
    font-size: 10px;
  }

  .work {
    padding: 94px 0 90px;
  }

  .project {
    padding: 28px;
    border-radius: 28px;
    gap: 34px;
  }

  .project-title {
    margin-top: 14px;
    font-size: clamp(42px, 12vw, 56px);
  }

  .project-subtitle {
    margin-top: 12px;
    font-size: 17px;
  }

  .project-desc {
    margin-top: 15px;
    font-size: 13.5px;
  }

  .project-stats {
    margin-top: 23px;
    gap: 20px;
  }

  .project-stats dd {
    font-size: 15px;
  }

  .project .btn {
    margin-top: 25px;
  }

  .project-visual {
    padding: 0 0 8px;
  }

  .app-window {
    border-radius: 12px;
  }

  .window-bar {
    height: 31px;
    padding: 0 10px;
  }

  .window-title {
    font-size: 7px;
  }

  .window-live {
    font-size: 6px;
  }

  .floating-chip {
    display: none;
  }

  .mine-titlebar {
    height: 36px;
    padding: 0 11px;
  }

  .mine-toolbar {
    padding: 9px 10px 6px;
    gap: 6px;
  }

  .mine-reset,
  .mine-flag-toggle {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 14px;
  }

  .mine-counter,
  .mine-timer {
    min-width: 41px;
    font-size: 12px;
  }

  .mine-board {
    padding: 6px 10px 9px;
    gap: 3px;
  }

  .mine-cell {
    border-radius: 4px;
    font-size: clamp(9px, 2.7vw, 12px);
  }

  .mine-status {
    padding: 8px 11px 10px;
    font-size: 7px;
  }

  .float-badge--tests {
    top: -10px;
    right: -6px;
    padding: 9px 11px;
  }

  .float-badge--tests strong {
    font-size: 18px;
  }

  .float-badge--store {
    display: none;
  }

  .quote-band {
    padding: 104px 0;
  }

  .quote-mark {
    font-size: 64px;
  }

  .quote-band blockquote {
    margin-top: 22px;
    font-size: clamp(28px, 7.7vw, 40px);
  }

  .quote-band cite {
    margin-top: 22px;
  }

  .notes {
    padding: 94px 0;
  }

  .notes-grid,
  .notes-index .notes-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .notes-grid .note-card:last-child,
  .notes-index .notes-grid .note-card:last-child {
    grid-column: auto;
  }

  .note-visual,
  .notes-grid .note-card:last-child .note-visual,
  .notes-index .note-visual {
    height: 210px;
  }

  .note-body {
    padding: 23px 22px 22px;
  }

  .note-body h3,
  .notes-index .note-body h3 {
    font-size: 21px;
  }

  .wechat {
    padding: 96px 0;
  }

  .wechat .section-title {
    font-size: clamp(44px, 13vw, 62px);
  }

  .wechat-lead {
    margin-top: 22px;
    font-size: 14.5px;
  }

  .wechat-actions {
    margin-top: 26px;
    gap: 22px;
  }

  .wechat-handle {
    margin-top: 38px;
    font-size: 11.5px;
  }

  .qr-wrap {
    max-width: 330px;
  }

  .qr-card {
    padding: 14px;
    border-radius: 24px;
  }

  .qr-dialog-body {
    padding: 30px 20px 24px;
  }

  .qr-dialog-body h2 {
    font-size: 27px;
  }

  .qr-dialog-image {
    margin-top: 20px;
  }

  .site-footer {
    padding: 72px 0 24px;
  }

  .footer-top {
    display: block;
    padding-bottom: 40px;
  }

  .footer-top > .btn {
    margin-top: 26px;
  }

  .footer-grid {
    padding: 40px 0 34px;
    gap: 32px;
  }

  .footer-col--about {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-wrap: wrap;
    gap: 10px 18px;
  }

  .footer-made {
    width: 100%;
    margin-left: 0;
    order: 3;
  }

  .article-hero {
    padding: 116px 0 40px;
  }

  .article-hero-inner,
  .prose,
  .article-end {
    width: calc(100% - 40px);
  }

  .article-hero h1 {
    margin-top: 15px;
    font-size: clamp(34px, 9.8vw, 52px);
  }

  .article-dek {
    margin-top: 19px;
    font-size: 15.5px;
  }

  .article-kicker {
    margin-top: 34px;
  }

  .article-byline {
    flex-wrap: wrap;
  }

  .article-byline time {
    display: none;
  }

  .article-cover {
    width: calc(100% - 40px);
    height: 220px;
    margin: 16px auto 48px;
    border-radius: 22px;
  }

  .cover-glyph {
    bottom: 20px;
    left: 22px;
  }

  .cover-caption {
    right: 22px;
    bottom: 22px;
  }

  .prose {
    font-size: 16.5px;
    line-height: 1.9;
  }

  .prose > p:first-of-type {
    font-size: 18px;
  }

  .prose h2 {
    margin-top: 52px;
  }

  .prose blockquote {
    margin: 38px 0;
    padding-left: 18px;
    font-size: 22px;
  }

  .article-layout {
    padding-bottom: 80px;
  }

  .article-end {
    margin-top: 52px;
  }

  .article-related {
    padding: 72px 0 90px;
  }

  .notes-index-hero {
    padding: 130px 0 50px;
  }

  .notes-index-hero .section-title {
    font-size: clamp(58px, 18vw, 88px);
  }

  .notes-index {
    padding-bottom: 90px;
  }

  .notes-index-foot {
    display: block;
    margin-top: 52px;
  }

  .notes-index-foot .btn {
    margin-top: 20px;
  }
}

@media (max-width: 430px) {
  .hero-actions {
    flex-wrap: wrap;
  }

  .hero-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-meta-note {
    grid-column: 1 / -1;
  }

  .hero-meta > span:not(.hero-meta-note)::before {
    display: none;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .stats-note {
    grid-column: auto;
  }

  .stat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .stat-label {
    margin-top: 0;
    text-align: right;
  }

  .project {
    padding: 24px;
  }

  .project-stats {
    gap: 16px 22px;
  }

  .float-badge--tests {
    display: none;
  }

  .wechat-actions {
    flex-wrap: wrap;
  }

  .qr-wrap {
    max-width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-col--about {
    grid-column: auto;
  }

  .article-byline time {
    margin-left: 0;
  }
}

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

.article-related .note-card:last-child {
  grid-column: auto;
}

@media (max-width: 720px) {
  .article-related .notes-grid {
    grid-template-columns: 1fr;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
