:root {
  --canvas: #f2f3f5;
  --paper: #ffffff;
  --ink: #18191c;
  --muted: #686b73;
  --line: #d9dbe0;
  --line-strong: #b9bcc3;
  --red: #b42820;
  --red-dark: #8f1d17;
  --charcoal: #26282d;
  --shadow: 0 18px 42px rgba(20, 22, 27, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--canvas);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--canvas);
  background-size: 48px 48px;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  letter-spacing: 0;
}

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

.shell {
  width: min(1180px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: rgba(242, 243, 245, 0.92);
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 4vw, 48px);
  border-bottom: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.88);
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-logo {
  width: 92px;
  height: 46px;
  display: block;
  flex: none;
  object-fit: contain;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.brand-title {
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
}

.brand-owner {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 650;
}

.back-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--paper);
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 700;
}

.back-link:hover,
.back-link:focus-visible {
  border-color: var(--red);
  color: var(--red-dark);
  outline: 2px solid rgba(180, 40, 32, 0.18);
  outline-offset: 2px;
}

.content {
  display: grid;
  align-content: center;
  gap: 34px;
  padding: clamp(44px, 8vh, 86px) clamp(20px, 4vw, 48px);
}

.heading {
  max-width: 780px;
  display: grid;
  gap: 14px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--red-dark);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 800;
}

.eyebrow::before {
  width: 22px;
  height: 3px;
  content: "";
  background: var(--red);
}

h1 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.08;
  font-weight: 850;
}

.subtitle {
  max-width: 670px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 520;
}

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

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

.entry-card {
  min-width: 0;
  min-height: 214px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-top: 4px solid var(--charcoal);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: var(--shadow);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.entry-card:hover,
.entry-card:focus-visible {
  border-color: var(--red);
  border-top-color: var(--red);
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(20, 22, 27, 0.12);
  outline: 2px solid rgba(180, 40, 32, 0.18);
  outline-offset: 3px;
}

.entry-index {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 750;
  text-transform: uppercase;
}

.entry-index strong {
  color: var(--red);
  font-size: 13px;
}

.entry-title {
  margin: 0 0 9px;
  overflow-wrap: anywhere;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 820;
}

.entry-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.entry-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--red-dark);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 800;
}

.entry-action::after {
  content: "\2197";
  font-size: 20px;
  line-height: 1;
}

.category-card .entry-action::after {
  content: "\2192";
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(20px, 4vw, 48px) 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  font-weight: 650;
}

.footer-mark {
  color: var(--red-dark);
  font-weight: 800;
}

@media (max-width: 900px) {
  .entry-grid.projects {
    grid-template-columns: 1fr;
  }

  .entry-grid.projects .entry-card {
    min-height: 178px;
  }
}

@media (max-width: 680px) {
  body {
    background: var(--canvas);
  }

  .shell {
    width: 100%;
    border: 0;
  }

  .topbar {
    min-height: 72px;
    gap: 12px;
    padding: 12px 16px;
  }

  .brand {
    gap: 9px;
  }

  .brand-logo {
    width: 66px;
    height: 36px;
  }

  .brand-title {
    font-size: 15px;
  }

  .brand-owner {
    font-size: 10px;
  }

  .back-link {
    width: 36px;
    padding: 0;
    justify-content: center;
    overflow: hidden;
    color: transparent;
    font-size: 0;
  }

  .back-link::before {
    content: "\2190";
    color: var(--charcoal);
    font-size: 18px;
  }

  .content {
    align-content: start;
    gap: 26px;
    padding: 42px 16px 36px;
  }

  h1 {
    font-size: 38px;
  }

  .subtitle {
    font-size: 14px;
  }

  .entry-grid,
  .entry-grid.projects {
    grid-template-columns: 1fr;
  }

  .entry-card,
  .entry-grid.projects .entry-card {
    min-height: 174px;
    gap: 18px;
    padding: 20px;
  }

  .entry-card:hover,
  .entry-card:focus-visible {
    transform: none;
  }

  .entry-title {
    font-size: 21px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entry-card {
    transition: none;
  }
}
