:root {
  --bg: #060706;
  --panel: rgba(11, 14, 13, 0.82);
  --ink: #e8e4d9;
  --muted: #8e958f;
  --dim: #5f6761;
  --line: rgba(232, 228, 217, 0.16);
  --line-strong: rgba(232, 228, 217, 0.32);
  --green: #00d58f;
  --mono: "IBM Plex Mono", "Roboto Mono", Consolas, "Courier New", "Microsoft YaHei UI", monospace;
  --sans: "Inter", "Segoe UI", Arial, "Microsoft YaHei UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  background:
    linear-gradient(rgba(232, 228, 217, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 228, 217, 0.032) 1px, transparent 1px),
    radial-gradient(circle at 74% 0%, rgba(0, 213, 143, 0.08), transparent 30rem),
    var(--bg);
  background-size: 32px 32px, 32px 32px, auto, auto;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: min(1360px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 7, 6, 0.9);
  backdrop-filter: blur(12px);
}

.nav {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.brand,
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.brand::before,
.back-link::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 1px solid var(--green);
  box-shadow: 0 0 14px rgba(0, 213, 143, 0.4);
}

.nav-links {
  display: flex;
  gap: 14px;
  color: var(--muted);
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links a:hover,
.back-link:hover {
  color: var(--green);
}

.work-head {
  padding: 18px 0 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
  border-bottom: 1px solid var(--line);
}

.work-head .back-link {
  width: max-content;
}

.label {
  color: var(--green);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.35;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(9px, 1.75vw, 23px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0;
}

.subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.work-layout {
  padding: 18px 0 30px;
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 12px;
}

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
}

.panel-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.info-body {
  padding: 12px;
  color: rgba(232, 228, 217, 0.84);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.info-body p {
  margin: 0 0 10px;
}

.info-body p:last-child {
  margin-bottom: 0;
}

.main-view {
  margin: 0;
  min-height: 60vh;
  border: 1px solid var(--line);
  background: #050605;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.main-view img {
  width: 100%;
  height: 100%;
  max-height: 76vh;
  object-fit: contain;
  display: block;
  filter: grayscale(0.06) contrast(1.04);
}

.thumb-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}

.thumb-button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0;
  background: rgba(11, 14, 13, 0.9);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  grid-template-rows: 72px 22px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 10px;
  text-align: left;
}

.thumb-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.18) contrast(1.02);
}

.thumb-button span {
  padding: 4px 6px;
  border-top: 1px solid var(--line);
}

.thumb-button:hover,
.thumb-button.is-active,
.thumb-button:focus-visible {
  border-color: var(--green);
  color: var(--green);
  outline: none;
}

.work-nav {
  padding: 0 0 42px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.work-nav a {
  min-height: 56px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: rgba(11, 14, 13, 0.64);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.work-nav a:last-child {
  text-align: right;
}

.work-nav a:hover {
  border-color: var(--green);
  color: var(--green);
}

@media (max-width: 900px) {
  .work-head,
  .work-layout {
    grid-template-columns: 1fr;
  }

  .main-view {
    min-height: 42vh;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 12px;
  }

  .wrap {
    width: min(100% - 22px, 1360px);
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0;
  }

  .thumb-grid {
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  }
}

html[lang-mode="zh"] [data-lang="en"],
html[lang-mode="en"] [data-lang="zh"] {
  display: none !important;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(6, 7, 6, 0.55);
}

.lang-button {
  appearance: none;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 4px 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1;
}

.lang-button:last-child {
  border-right: 0;
}

.lang-button.is-active {
  color: var(--green);
  background: rgba(0, 213, 143, 0.08);
}

.meta-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  color: rgba(232, 228, 217, 0.72);
}

.meta-list li {
  margin: 0 0 4px;
}

.muted-line {
  color: var(--muted);
}

@media (max-width: 620px) {
  .nav-right {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }
}

