:root {
  --paper: #d8eee9;
  --surface: #ffffff;
  --ink: #273237;
  --soft-ink: #5f7078;
  --line: #c3ddd6;
  --mint: #bfe8d4;
  --sky: #bfddf3;
  --peach: #ffd4c7;
  --lemon: #f4e7a9;
  --lilac: #d8d0f2;
  --xhs-red: #ff3f63;
  --retro-aqua: #71e4e1;
  --retro-lime: #d9f58a;
  --steam: #2a3f5a;
  --blog-blue: #006dcc;
  --markdown-cream: #f6f4ef;
  --focus: #4c7f8f;
  --radius: 22px;
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
}

a {
  color: inherit;
}

.site-shell {
  width: min(100% - 36px, var(--max-width));
  margin: 0 auto;
  padding: 40px 0 64px;
}

.hero {
  padding: 34px 38px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--soft-ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 720px;
  margin-bottom: 14px;
  font-size: clamp(3.4rem, 7vw, 6rem);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-text {
  max-width: 580px;
  margin-bottom: 0;
  color: var(--soft-ink);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.8;
}

.projects {
  padding-top: 42px;
}

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

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.1;
}

.section-note {
  margin: 0 0 5px;
  color: var(--soft-ink);
  font-size: 0.95rem;
  font-weight: 700;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.project-card {
  position: relative;
  z-index: 0;
  display: flex;
  min-height: 328px;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  transform-origin: center;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.project-card:focus-visible {
  outline: 4px solid color-mix(in srgb, var(--focus) 38%, transparent);
  outline-offset: 4px;
  border-color: var(--focus);
}

.icon-wrap {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 28px;
  border: 1px solid var(--ink);
  border-radius: 20px;
  background: var(--mint);
}

.accent-blog .icon-wrap {
  background: var(--blog-blue);
}

.accent-blog .icon-wrap svg {
  stroke: var(--surface);
}

.accent-markdown .icon-wrap {
  background: var(--markdown-cream);
}

.accent-peach .icon-wrap {
  background: var(--peach);
}

.accent-steam .icon-wrap {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.accent-lilac .icon-wrap {
  background: var(--lilac);
}

.accent-xhs .icon-wrap {
  background: var(--xhs-red);
}

.accent-xhs .icon-wrap svg {
  stroke: var(--surface);
}

.xhs-mark text {
  fill: var(--surface);
  stroke: none;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}

.accent-retro-qq .icon-wrap {
  overflow: hidden;
  background: linear-gradient(145deg, #f7ffff 0 18%, var(--retro-aqua) 52%, var(--retro-lime) 100%);
  box-shadow: inset 0 0 0 4px rgb(255 255 255 / 42%), inset 0 -10px 18px rgb(0 109 204 / 13%);
}

.retro-qq-mark .retro-window {
  fill: rgb(255 255 255 / 72%);
  stroke: var(--ink);
}

.retro-qq-mark .retro-titlebar {
  fill: #64bde8;
  stroke: var(--ink);
}

.retro-qq-mark .retro-status {
  fill: var(--retro-lime);
  stroke: var(--ink);
  stroke-width: 1.8;
}

.retro-qq-mark .retro-bubble {
  fill: var(--surface);
  stroke: var(--ink);
}

.retro-qq-mark .retro-spark {
  stroke: var(--surface);
  stroke-width: 3;
}

.accent-lemon .icon-wrap {
  background: var(--lemon);
}

.icon-wrap svg {
  width: 46px;
  height: 46px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.accent-steam .icon-wrap .steam-mark {
  display: block;
  width: 76px;
  height: 76px;
}

.card-meta {
  margin-bottom: 10px;
  color: var(--soft-ink);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.card-title {
  min-height: 2.55em;
  margin-bottom: 12px;
  font-size: 1.28rem;
  font-weight: 850;
  line-height: 1.28;
}

.card-desc {
  margin-bottom: 20px;
  color: var(--soft-ink);
  font-size: 0.96rem;
  line-height: 1.75;
}

.card-action {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-top: auto;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.project-card:hover .card-action {
  background: var(--ink);
  color: var(--surface);
}

@media (hover: hover) and (pointer: fine) {
  .project-card:hover {
    z-index: 3;
    transform: translateY(-4px);
    border-color: var(--ink);
  }
}

.coming-card {
  grid-column: 1 / -1;
  display: grid;
  min-height: 140px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 22px;
  align-items: center;
  color: var(--soft-ink);
}

.coming-card .icon-wrap {
  margin-bottom: 0;
}

.coming-card .card-meta {
  grid-column: 2;
  margin: 0 0 8px;
}

.coming-card .card-title {
  grid-column: 2;
  min-height: 0;
  margin-bottom: 8px;
}

.coming-card .card-desc {
  grid-column: 2;
  margin-bottom: 0;
}

.coming-card .card-action {
  grid-column: 3;
  grid-row: 1 / span 3;
  margin-top: 0;
  border-color: var(--line);
  color: var(--soft-ink);
}

.coming-card:hover {
  transform: none;
  border-color: var(--line);
}

.coming-card:hover .card-action {
  background: transparent;
  color: var(--soft-ink);
}

@media (max-width: 980px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (hover: none), (pointer: coarse) {
  .project-card:hover {
    transform: none;
  }
}

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 24px, var(--max-width));
    padding: 24px 0 42px;
  }

  .hero {
    min-height: auto;
    padding: 26px;
    border-radius: 24px;
  }

  .section-heading {
    display: block;
  }

  .section-note {
    margin-top: 10px;
  }

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

  .coming-card {
    display: flex;
    min-height: 300px;
    flex-direction: column;
    align-items: flex-start;
  }

  .coming-card .icon-wrap {
    margin-bottom: 28px;
  }

  .coming-card .card-action {
    margin-top: auto;
  }

  .project-card {
    min-height: 300px;
    padding: 22px;
  }

  .card-title {
    min-height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
