.portfolio-page-gallery {
  position: relative;
  padding: 58px 54px 64px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  background: #0c0e11;
  color: #fff;
}

.portfolio-page-gallery > header {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(340px, 1.28fr);
  align-items: end;
  gap: 54px;
  margin-bottom: 32px;
}

.portfolio-page-gallery > header span {
  display: block;
  margin-bottom: 10px;
  color: var(--project-accent, #cbff36);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.portfolio-page-gallery > header h4 {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
}

.portfolio-page-gallery > header p {
  max-width: 640px;
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  line-height: 1.8;
}

.portfolio-page-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 12px;
}

.portfolio-page-grid > button {
  position: relative;
  grid-column: span 4;
  height: 310px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: #16191e;
  color: #fff;
  cursor: zoom-in;
  text-align: left;
}

.portfolio-page-grid > button.is-lead {
  grid-column: span 6;
}

.portfolio-page-grid > button:nth-child(2),
.portfolio-page-grid > button:nth-child(3) {
  grid-column: span 3;
}

.portfolio-page-grid > button:first-child:nth-last-child(2),
.portfolio-page-grid > button:nth-child(2):last-child {
  grid-column: span 6;
}

.portfolio-page-grid > button:nth-child(4):nth-last-child(2),
.portfolio-page-grid > button:nth-child(5):last-child {
  grid-column: span 6;
}

.portfolio-page-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 520ms cubic-bezier(0.16, 1, 0.3, 1), filter 260ms ease;
}

.portfolio-page-grid > button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 58%, rgba(4, 5, 7, 0.86));
  pointer-events: none;
}

.portfolio-page-grid > button:hover img,
.portfolio-page-grid > button:focus-visible img {
  transform: scale(1.025);
  filter: brightness(1.05);
}

.portfolio-page-grid > button:focus-visible {
  border-color: var(--project-accent, #cbff36);
  outline: 2px solid var(--project-accent, #cbff36);
  outline-offset: 3px;
}

.portfolio-page-grid > button > span {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 760;
}

.portfolio-page-grid > button > span i {
  color: var(--project-accent, #cbff36);
  font-size: 9px;
  font-style: normal;
}

.portfolio-page-open-all {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 4px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.portfolio-page-open-all:hover,
.portfolio-page-open-all:focus-visible {
  border-color: var(--project-accent, #cbff36);
  background: var(--project-accent, #cbff36);
  color: #0c0d0f;
  outline: none;
}

.portfolio-page-open-all span {
  font-size: 20px;
}

.portfolio-page-gallery.is-compact {
  grid-column: 1 / -1;
  padding: 30px;
}

.portfolio-page-gallery.is-compact > header {
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 22px;
}

.portfolio-page-gallery.is-compact > header h4 {
  font-size: 25px;
}

.portfolio-page-gallery.is-compact .portfolio-page-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portfolio-page-gallery.is-compact .portfolio-page-grid > button,
.portfolio-page-gallery.is-compact .portfolio-page-grid > button.is-lead,
.portfolio-page-gallery.is-compact .portfolio-page-grid > button:nth-child(2),
.portfolio-page-gallery.is-compact .portfolio-page-grid > button:nth-child(3) {
  grid-column: auto;
  height: 220px;
}

.portfolio-gallery-modal.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 32px;
}

.portfolio-gallery-modal .lightbox-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(5, 6, 7, 0.92);
  cursor: zoom-out;
  backdrop-filter: blur(12px);
}

.portfolio-page-lightbox {
  position: relative;
  z-index: 1;
  width: min(1180px, 94vw);
  height: min(920px, 92vh);
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 5px;
  background: #090a0b;
  color: #fff;
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.55);
}

.portfolio-gallery-header {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 12px 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(11, 12, 14, 0.96);
}

.portfolio-gallery-header > div {
  display: flex;
  align-items: baseline;
  gap: 18px;
}

.portfolio-gallery-header span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 9px;
  font-weight: 750;
}

.portfolio-gallery-header strong {
  font-size: 13px;
}

.portfolio-gallery-header nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.portfolio-gallery-header button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.portfolio-gallery-header button:hover,
.portfolio-gallery-header button:focus-visible {
  border-color: var(--acid, #cbff36);
  color: var(--acid, #cbff36);
  outline: none;
}

.portfolio-page-lightbox-stage {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: #090a0b;
}

.portfolio-page-lightbox-stage img {
  width: 100%;
  height: auto;
  display: block;
  background: #090a0b;
}

/* Autumn recruitment edit: remove repeated image stages and calm narrow desktop windows. */
.project-spread .project-playground {
  display: none;
}

.cover-controls .cover-case-cta {
  border-color: var(--cover-accent, #cbff36);
  background: var(--cover-accent, #cbff36);
  color: #0c0d0f;
}

.cover-controls .cover-resume-cta {
  border-color: rgba(255, 255, 255, 0.34);
}

@media (max-width: 1100px) {
  .reading-compass {
    display: none;
  }

  .project-reading-guide {
    grid-template-columns: 1fr minmax(220px, auto);
    padding-right: 38px;
    padding-left: 38px;
  }

  .project-reading-guide > p {
    display: none;
  }
}

@media (max-width: 960px) {
  .site-nav {
    top: 12px;
    width: calc(100% - 24px);
    min-height: 56px;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    padding-left: 14px;
  }

  .site-nav nav {
    display: none;
  }

  .site-nav nav.is-open {
    position: fixed;
    top: 64px;
    right: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    background: rgba(12, 13, 15, 0.96);
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
  }

  .site-nav nav.is-open a {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .site-nav nav.is-open .mobile-nav-resume {
    display: flex;
    background: var(--acid, #cbff36);
    color: #0c0d0f;
  }

  .mobile-menu-toggle {
    width: 40px;
    height: 40px;
    display: grid;
    place-content: center;
    gap: 6px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 4px;
    background: transparent;
    color: #fff;
  }

  .mobile-menu-toggle span {
    width: 16px;
    height: 1px;
    background: currentColor;
  }

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

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

  .brand-mark span {
    display: none;
  }

  .brand-mark {
    font-size: 18px;
  }

  .nav-contact {
    min-height: 40px;
    padding: 0 14px;
    font-size: 11px;
  }

  .project-quick-nav {
    position: relative;
    top: auto;
    width: 100%;
    min-height: 56px;
    margin-bottom: 72px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
  }

  .project-quick-nav a {
    min-width: 0;
    justify-content: center;
    gap: 8px;
    padding: 0 8px;
    font-size: 10px;
    text-align: center;
  }

  .project-quick-nav a i {
    display: none;
  }

  .project-reading-guide {
    grid-template-columns: 1fr auto;
    min-height: 54px;
    padding: 0 22px;
    font-size: 10px;
  }

  .project-reading-guide strong {
    font-size: 10px;
  }

  .cover-title-system h1,
  .cover-mode-1 .cover-title-system h1,
  .cover-mode-2 .cover-title-system h1 {
    font-size: 64px;
  }

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

  .portfolio-page-gallery.is-compact .portfolio-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-page-grid > button,
  .portfolio-page-grid > button:nth-child(2),
  .portfolio-page-grid > button:nth-child(3),
  .portfolio-page-grid > button:first-child:nth-last-child(2),
  .portfolio-page-grid > button:nth-child(2):last-child {
    grid-column: auto;
    height: 240px;
  }

  .portfolio-page-grid > button.is-lead:not(:only-child) {
    grid-column: auto;
    height: 240px;
  }

  .portfolio-page-gallery.is-compact .portfolio-page-grid > button.is-lead {
    grid-column: auto;
    height: 220px;
  }
}

@media (max-width: 800px) {
  .cover-title-system h1,
  .cover-mode-1 .cover-title-system h1,
  .cover-mode-2 .cover-title-system h1 {
    font-size: 50px;
  }

  .cover-title-system h1 span:last-child {
    margin-left: 36px;
  }

  .profile-intro {
    order: 1;
  }

  .portrait-panel {
    order: 2;
  }

  .experience-list {
    order: 3;
  }

  .recruiter-case-row {
    grid-template-columns: 56px minmax(0, 1fr) 36px;
    grid-template-rows: auto auto;
    align-items: start;
    gap: 10px 14px;
    min-height: 0;
    padding: 24px 16px 24px 22px;
  }

  .recruiter-case-number {
    grid-column: 1;
    grid-row: 1 / 3;
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
  }

  .recruiter-case-title,
  .recruiter-case-proof {
    grid-column: 2;
  }

  .recruiter-case-number > span {
    font-size: 40px;
  }

  .recruiter-case-number small {
    max-width: 54px;
    font-size: 8px;
  }

  .recruiter-case-title h3 {
    margin-bottom: 5px;
    font-size: 23px;
  }

  .recruiter-case-proof {
    padding-top: 10px;
  }

  .recruiter-case-proof span {
    display: none;
  }

  .recruiter-case-proof strong {
    margin-bottom: 6px;
    font-size: 12px;
    line-height: 1.5;
  }

  .recruiter-case-proof p {
    font-size: 11px;
    line-height: 1.5;
  }

  .recruiter-case-row > i {
    grid-column: 3;
    grid-row: 1 / 3;
    width: 36px;
    height: 36px;
  }

  .portfolio-page-gallery,
  .portfolio-page-gallery.is-compact {
    padding: 38px 16px 42px;
  }

  .portfolio-page-gallery > header {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 24px;
  }

  .portfolio-page-gallery > header h4,
  .portfolio-page-gallery.is-compact > header h4 {
    font-size: 27px;
  }

  .portfolio-page-grid,
  .portfolio-page-gallery.is-compact .portfolio-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .portfolio-page-grid > button,
  .portfolio-page-grid > button:nth-child(2),
  .portfolio-page-grid > button:nth-child(3),
  .portfolio-page-gallery.is-compact .portfolio-page-grid > button,
  .portfolio-page-gallery.is-compact .portfolio-page-grid > button.is-lead {
    grid-column: auto;
    height: 190px;
  }

  .portfolio-page-grid > button.is-lead {
    grid-column: 1 / -1;
    height: 250px;
  }

  .portfolio-page-grid > button > span {
    right: 10px;
    bottom: 10px;
    left: 10px;
    font-size: 10px;
  }

  .portfolio-gallery-modal.image-lightbox {
    padding: 8px;
  }

  .portfolio-page-lightbox {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
    height: calc(100svh - 16px);
    grid-template-rows: 58px minmax(0, 1fr);
  }

  .portfolio-gallery-header {
    min-height: 58px;
    padding-left: 14px;
  }

  .portfolio-gallery-header > div {
    display: grid;
    gap: 3px;
  }

  .portfolio-gallery-header nav {
    gap: 4px;
  }

  .portfolio-gallery-header button {
    width: 34px;
    height: 34px;
  }
}


/* Big-tech recruiter narrative: evidence first, compact profile, clear case logic */
.portrait-panel {
  display: none;
}

.about-layout {
  min-height: 580px;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
}

.profile-intro {
  padding: 48px 42px;
}

.experience-list {
  padding: 42px;
}

.directory-evaluation-strip {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) repeat(4, minmax(0, 1fr));
  margin-bottom: 30px;
  overflow: hidden;
  border: 1px solid rgba(12, 13, 15, 0.36);
  border-radius: 5px;
  background: #e4e6e1;
}

.directory-evaluation-strip header,
.directory-evaluation-strip > div {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px 24px;
}

.directory-evaluation-strip header {
  background: #0c0d0f;
  color: #fff;
}

.directory-evaluation-strip header span,
.directory-evaluation-strip > div span {
  margin-bottom: 10px;
  color: var(--acid, #cbff36);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.directory-evaluation-strip header strong,
.directory-evaluation-strip > div strong {
  font-size: 13px;
  line-height: 1.45;
}

.directory-evaluation-strip > div {
  border-left: 1px solid rgba(12, 13, 15, 0.24);
}

.directory-evaluation-strip > div p {
  margin: 8px 0 0;
  color: rgba(12, 13, 15, 0.58);
  font-size: 10px;
  line-height: 1.55;
}

.case-executive-summary {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: #111316;
  color: #fff;
}

.case-executive-summary header,
.case-executive-summary article {
  min-height: 178px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 32px;
}

.case-executive-summary header {
  background: var(--project-accent, var(--acid, #cbff36));
  color: #0c0d0f;
}

.case-executive-summary header span,
.case-executive-summary article span {
  margin-bottom: 13px;
  color: var(--project-accent, var(--acid, #cbff36));
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.case-executive-summary header span {
  color: #0c0d0f;
}

.case-executive-summary header h4 {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
}

.case-executive-summary article {
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.case-executive-summary article strong {
  font-size: 14px;
  line-height: 1.65;
}

.project-spread:nth-child(even) .case-executive-summary {
  border-color: rgba(12, 13, 15, 0.24);
  background: #ecece8;
  color: #0c0d0f;
}

.project-spread:nth-child(even) .case-executive-summary article {
  border-color: rgba(12, 13, 15, 0.22);
}

.is-life-summary {
  --project-accent: #efff43;
  border-color: rgba(255, 255, 255, 0.18);
  background: #17191e;
}

@media (max-width: 1100px) {
  .about-layout {
    grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  }

  .directory-evaluation-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .directory-evaluation-strip header {
    grid-column: 1 / -1;
    min-height: 88px;
  }

  .directory-evaluation-strip > div {
    min-height: 110px;
  }

  .case-executive-summary {
    grid-template-columns: minmax(180px, 0.62fr) repeat(3, minmax(0, 1fr));
  }

  .case-executive-summary header,
  .case-executive-summary article {
    min-height: 168px;
    padding: 26px 22px;
  }
}

@media (max-width: 800px) {
  .about-layout {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .profile-intro {
    padding: 38px 24px;
  }

  .experience-list {
    padding: 36px 24px;
  }

  .directory-evaluation-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 22px;
  }

  .directory-evaluation-strip header {
    grid-column: 1 / -1;
    min-height: 86px;
    padding: 20px;
  }

  .directory-evaluation-strip > div {
    min-height: 128px;
    padding: 18px;
    border-top: 1px solid rgba(12, 13, 15, 0.24);
  }

  .directory-evaluation-strip > div:nth-of-type(odd) {
    border-left: 0;
  }

  .case-executive-summary {
    grid-template-columns: 1fr;
  }

  .case-executive-summary header,
  .case-executive-summary article {
    min-height: 0;
    padding: 24px 22px;
  }

  .case-executive-summary header h4 br {
    display: none;
  }

  .case-executive-summary article {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-left: 0;
  }

  .project-spread:nth-child(even) .case-executive-summary article {
    border-color: rgba(12, 13, 15, 0.22);
  }
}

.mobile-experience-toggle {
  display: none;
}

@media (max-width: 800px) {
  .about-board:not(.is-experience-open) .experience-list {
    display: none;
  }

  .about-board.is-experience-open .experience-list {
    display: flex;
  }

  .mobile-experience-toggle {
    width: 100%;
    min-height: 74px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 6px 16px;
    padding: 14px 22px;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    background: #0c0d0f;
    color: #fff;
    text-align: left;
  }

  .mobile-experience-toggle span {
    color: var(--acid, #cbff36);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.08em;
  }

  .mobile-experience-toggle strong {
    grid-column: 1;
    font-size: 14px;
  }

  .mobile-experience-toggle i {
    grid-column: 2;
    grid-row: 1 / 3;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--acid, #cbff36);
    border-radius: 50%;
    color: var(--acid, #cbff36);
    font-size: 18px;
    font-style: normal;
  }
}

/* Recruiter reading rhythm: move from the index to evidence with fewer repeated layers. */
.projects .section-shell {
  padding-top: 96px;
}

.projects .section-label {
  margin-bottom: 34px;
}

.projects-heading {
  display: none;
}

.projects .project-quick-nav {
  margin-bottom: 44px;
}

#zhihu-projects {
  margin-top: 44px;
}

#zhihu-projects > .family-header {
  display: none;
}

#zhihu-projects > .project-list {
  gap: 54px;
}

.featured-operations-family {
  margin-top: 72px !important;
  padding-top: 40px !important;
}

.featured-operations-family > .family-header {
  margin-bottom: 36px;
}

@media (max-width: 1100px) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 800px) {
  .projects .section-shell {
    padding-top: 72px;
  }

  .projects .section-label {
    margin-bottom: 24px;
  }

  .projects .project-quick-nav {
    margin-bottom: 40px;
  }

  #zhihu-projects {
    margin-top: 36px;
  }

  #zhihu-projects > .project-list {
    gap: 34px;
  }

  .featured-operations-family {
    margin-top: 64px !important;
    padding-top: 34px !important;
  }
}
