/* Personal site: monochrome, content-led, with feedback on real interactions. */
:root {
  --bg: #101010;
  --surface: #161616;
  --surface2: #1d1d1d;
  --ink: #ededed;
  --text: #aaaaaa;
  --muted: #777777;
  --line: #303030;
  --accent: #e6e6e6;
  --sage: #262626;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(16, 16, 16, .9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: #2b2b2b;
}

nav a { padding: 9px 0; transition: color .18s ease; }
nav a::after,
nav a.active::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 1px;
  left: 0;
  width: auto;
  height: 1px;
  background: #dddddd;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
nav a:hover::after,
nav a:focus-visible::after,
nav a.active::after { transform: scaleX(1); }

.home-shell { padding-top: 0; }
.identity-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.16fr);
  align-items: center;
  gap: 72px;
  min-height: 490px;
  padding: 48px 0 45px;
}
.identity-copy { padding-bottom: 20px; }
.identity-copy .eyebrow {
  font: 10px/1.7 var(--mono);
  letter-spacing: 1.1px;
  color: #929292;
}
.identity-copy h1 {
  color: #eeeeee;
  font: 500 64px/1.15 var(--sans);
  letter-spacing: -1.5px;
  margin: 20px 0 24px;
}
.identity-copy h1 span {
  display: block;
  color: #9c9c9c;
  font: 400 14px/1.6 var(--mono);
  letter-spacing: 1.1px;
  margin-top: 15px;
}
.identity-copy > p {
  color: #a5a5a5;
  font-size: 13px;
  line-height: 2;
  margin: 0;
  max-width: 360px;
}
.hero-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 27px;
  margin-top: 30px;
}
.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: #d1d1d1;
  font-size: 11px;
  padding: 5px 0;
  border-bottom: 1px solid #626262;
  transition: color .18s ease, border-color .18s ease;
}
.hero-links a + a { color: #929292; border-color: #3d3d3d; }
.hero-links a:hover { color: #ffffff; border-color: #d9d9d9; }
.hero-links a span { display: inline-block; transition: transform .18s ease; }
.hero-links a:hover span { transform: translate(2px, -2px); }

#featured-project { min-width: 0; }
.featured-project { position: relative; min-width: 0; }
.featured-frame {
  display: block;
  position: relative;
  height: 350px;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #303030;
  background: #171717;
  transition: border-color .24s ease, background-color .24s ease;
}
.featured-frame img {
  position: absolute;
  top: 50%;
  width: 155px;
  height: 290px;
  display: block;
  object-fit: contain;
  object-position: center;
  filter: grayscale(1);
  box-shadow: 0 13px 35px rgba(0, 0, 0, .35);
  transition: transform .4s cubic-bezier(.2, .65, .3, 1), opacity .25s ease;
  animation: featured-arrive .35s ease both;
}
.featured-frame img:first-of-type {
  left: 35%;
  z-index: 2;
  transform: translate(-50%, -50%) rotate(-7deg);
}
.featured-frame img:nth-of-type(2) {
  left: 66%;
  z-index: 1;
  transform: translate(-50%, -50%) rotate(6deg);
}
.featured-frame:hover,
.featured-frame:focus-visible { border-color: #7b7b7b; background: #1b1b1b; }
.featured-frame:hover img:first-of-type,
.featured-frame:focus-visible img:first-of-type { transform: translate(-52%, -51%) rotate(-9deg); }
.featured-frame:hover img:nth-of-type(2),
.featured-frame:focus-visible img:nth-of-type(2) { transform: translate(-47%, -49%) rotate(8deg); }
.featured-number {
  position: absolute;
  top: 17px;
  left: 19px;
  z-index: 4;
  color: #9b9b9b;
  font: 9px/1.5 var(--mono);
  letter-spacing: .5px;
  pointer-events: none;
}
.featured-open {
  position: absolute;
  bottom: 17px;
  right: 17px;
  z-index: 5;
  background: #e1e1e1;
  color: #161616;
  padding: 8px 13px;
  font: 10px/1.5 var(--sans);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s ease, transform .2s ease;
}
.featured-frame:hover .featured-open,
.featured-frame:focus-visible .featured-open { opacity: 1; transform: translateY(0); }
.featured-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 0 14px;
}
.featured-meta h2 {
  font: 400 15px/1.7 var(--sans);
  color: #dddddd;
  margin: 0;
}
.featured-meta > span,
.featured-meta small,
.featured-meta .type,
.featured-meta .featured-type {
  color: #818181;
  font: 9px/1.6 var(--mono);
  letter-spacing: .2px;
}
.featured-meta p { margin: 0; font-size: 10px; color: #838383; }
.featured-switch {
  display: flex;
  gap: 23px;
  align-items: center;
  border-top: 1px solid #2e2e2e;
}
.featured-switch button {
  position: relative;
  background: none;
  border: 0;
  padding: 13px 0 10px;
  font: 10px/1.5 var(--sans);
  color: #7f7f7f;
  transition: color .18s ease;
  text-align: left;
}
.featured-switch button::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #bdbdbd;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.featured-switch button.active,
.featured-switch button[aria-selected="true"],
.featured-switch button[aria-pressed="true"],
.featured-switch button:hover { color: #e1e1e1; }
.featured-switch button.active::after,
.featured-switch button[aria-selected="true"]::after,
.featured-switch button[aria-pressed="true"]::after,
.featured-switch button:hover::after { transform: scaleX(1); }

.showcase-grid { gap: 22px; }
.game-card { border-color: #333333; background: #151515; transition: border-color .22s ease; }
.game-card:hover,
.game-card:focus-visible { border-color: #8c8c8c; }
.game-cover { background: #1a1a1a; }
.game-cover > img { filter: grayscale(1); transition: transform .35s ease; }
.game-card:hover .game-cover > img,
.game-card:focus-visible .game-cover > img { filter: grayscale(1); transform: scale(1.035); }
.game-cover::after {
  content: '查看项目 ↗';
  position: absolute;
  right: 13px;
  bottom: 13px;
  z-index: 3;
  padding: 7px 11px;
  color: #151515;
  background: #dedede;
  font: 10px/1.5 var(--sans);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.game-card:hover .game-cover::after,
.game-card:focus-visible .game-cover::after { opacity: 1; transform: translateY(0); }
.game-name > img,
.detail-title > img { filter: grayscale(1); }

.work-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 26px;
  margin: 0 0 27px;
  border-bottom: 1px solid #2d2d2d;
}
.work-filter {
  position: relative;
  border: 0;
  background: none;
  color: #878787;
  padding: 10px 0 13px;
  font: 11px/1.6 var(--sans);
  transition: color .18s ease;
}
.work-filter::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: #d6d6d6;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s ease;
}
.work-filter.active,
.work-filter:hover,
.work-filter[aria-pressed="true"] { color: #e0e0e0; }
.work-filter.active::after,
.work-filter[aria-pressed="true"]::after { transform: scaleX(1); }
.work-filter small { font: 8px var(--mono); color: #727272; margin-left: 6px; }

.reveal-section {
  opacity: 1;
  transform: none;
  transition: opacity .38s ease, transform .38s ease;
}
.reveal-section.is-visible,
.reveal-section.visible,
.reveal-section.revealed { opacity: 1; transform: translateY(0); }
.toc { top: 125px; }
#back-top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
body.scrolled #back-top { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
@keyframes featured-arrive { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 1000px) {
  .identity-hero { gap: 36px; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .featured-frame { height: 330px; }
  .featured-frame img { width: 140px; height: 270px; }
  .featured-switch { gap: 16px; }
  .featured-switch button { font-size: 9px; }
}

@media (max-width: 700px) {
  .identity-hero { grid-template-columns: 1fr; gap: 28px; min-height: 0; padding: 33px 0 32px; }
  .identity-copy { padding-bottom: 0; }
  .identity-copy .eyebrow { font-size: 9px; letter-spacing: .7px; }
  .identity-copy h1 { font-size: 48px; margin: 15px 0 18px; letter-spacing: -1px; }
  .identity-copy h1 span { font-size: 12px; margin-top: 11px; letter-spacing: .8px; }
  .identity-copy > p { font-size: 12px; line-height: 1.95; max-width: 340px; }
  .hero-links { margin-top: 21px; gap: 25px; }
  .hero-links a { font-size: 10px; gap: 13px; }
  .featured-frame { height: 330px; }
  .featured-frame img { width: 125px; height: 270px; }
  .featured-frame img:first-of-type { left: 35%; }
  .featured-frame img:nth-of-type(2) { left: 65%; }
  .featured-number { font-size: 8px; top: 15px; left: 15px; }
  .featured-meta { padding: 13px 0 11px; gap: 12px; }
  .featured-meta h2 { font-size: 13px; }
  .featured-meta > span, .featured-meta small, .featured-meta .type, .featured-meta .featured-type { font-size: 8px; }
  .featured-switch { gap: 24px; }
  .featured-switch button { font-size: 9px; padding-top: 11px; }
  .featured-open { font-size: 9px; padding: 7px 10px; right: 13px; bottom: 13px; }
  .work-filters { gap: 23px; margin-bottom: 22px; }
  .work-filter { font-size: 10px; padding-top: 7px; padding-bottom: 11px; }
  .showcase-grid { gap: 17px; }
  .game-cover::after { right: 6px; bottom: 8px; padding: 5px 7px; font-size: 8px; }
  nav a.active::after { width: auto; height: 1px; bottom: 1px; }
}

@media (hover: none) {
  .featured-open { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-section { opacity: 1; transform: none; }
  .featured-frame img { animation: none; }
  .game-card:hover .game-cover > img,
  .game-card:focus-visible .game-cover > img { transform: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.reveal-section.will-reveal:not(.is-visible){opacity:0;transform:translateY(6px)}
.identity-eyebrow{font:9px/1.7 var(--mono);color:#8b8b8b;letter-spacing:1px}.identity-footnote{font:9px/1.7 var(--mono);color:#6f6f6f;margin-top:39px;letter-spacing:.2px}.featured-meta>div>span{font:8px/1.8 var(--mono);color:#888;letter-spacing:.3px}.featured-switch small{font:7px var(--mono);color:#666;margin-right:7px}.work-filter>span{font:8px var(--mono);color:#777;margin-left:6px}@media(max-width:700px){.identity-footnote{font-size:8px;margin-top:23px}.identity-eyebrow{font-size:8px}.featured-meta>div>span{font-size:7px}.featured-switch{gap:21px}}@media(prefers-reduced-motion:reduce){.reveal-section.will-reveal:not(.is-visible){opacity:1;transform:none}}
