:root {
  --ink: #111111;
  --paper: #f7f7f2;
  --panel: #ffffff;
  --muted: #686b70;
  --line: #111111;
  --yellow: #ffe43d;
  --blue: #91b7d9;
  --coral: #ff8c6a;
  --mint: #7ec8aa;
  --shadow: 0 18px 40px rgba(17, 17, 17, 0.16);
  --soft-shadow: 0 10px 24px rgba(17, 17, 17, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(17, 17, 17, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 17, 17, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
  line-height: 1.6;
}

body.is-locked {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

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

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  height: 5px;
  background: transparent;
}

.scroll-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--yellow);
  border-right: 2px solid var(--ink);
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 70;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  width: min(1180px, calc(100% - 28px));
  min-height: 58px;
  margin: 14px auto 0;
  padding: 8px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.brand-mark,
.download-link,
.nav-links a,
.button,
.filter-button,
.contact-list button {
  min-height: 42px;
  border-radius: 999px;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 0 8px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-symbol {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  font-weight: 900;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.nav-links a {
  display: inline-grid;
  place-items: center;
  padding: 0 14px;
  color: #202020;
}

.nav-links a:hover,
.brand-mark:hover,
.download-link:hover,
.button:hover,
.filter-button:hover,
.contact-list button:hover {
  transform: translateY(-2px);
}

.download-link {
  display: inline-grid;
  place-items: center;
  padding: 0 18px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 800;
  white-space: nowrap;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1.12fr);
  align-items: center;
  gap: 38px;
  width: min(1180px, calc(100% - 36px));
  min-height: calc(100svh - 94px);
  margin: 0 auto;
  padding: 58px 0 70px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 14px;
  color: #45484d;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.site-footer h2 {
  margin: 0;
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero h1 {
  font-size: 4.85rem;
}

.hero h1 span {
  display: inline-block;
  margin-top: 12px;
  font-size: 2.3rem;
}

.hero-intro {
  max-width: 560px;
  margin: 28px 0 0;
  color: #27292d;
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-grid;
  place-items: center;
  min-width: 132px;
  padding: 0 22px;
  border: 2px solid var(--ink);
  font-weight: 900;
}

.button.primary {
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
}

.button.ghost {
  background: var(--panel);
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 34px 0 0;
}

.quick-facts div {
  min-width: 0;
  padding: 14px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 4px 4px 0 rgba(17, 17, 17, 0.9);
}

.quick-facts dt {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.quick-facts dd {
  margin: 5px 0 0;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.hero-stage {
  position: relative;
  min-height: 610px;
}

.hero-stage::before,
.hero-stage::after {
  position: absolute;
  z-index: 0;
  border: 2px solid var(--ink);
  content: "";
}

.hero-stage::before {
  top: 12px;
  right: 18px;
  width: 108px;
  height: 108px;
  border-radius: 8px 68px 8px 68px;
  background: var(--blue);
  transform: rotate(12deg);
}

.hero-stage::after {
  bottom: 24px;
  left: 10px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--coral);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 56%, 79% 92%, 50% 70%, 21% 92%, 32% 56%, 2% 35%, 39% 35%);
}

.paper-stack {
  position: relative;
  z-index: 1;
  height: 560px;
  transform: perspective(1100px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg));
  transition: transform 220ms ease;
}

.stack-page {
  position: absolute;
  width: min(86%, 640px);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.stack-page-one {
  top: 38px;
  right: 0;
  z-index: 3;
  transform: rotate(2.6deg);
}

.stack-page-two {
  top: 178px;
  left: 0;
  z-index: 2;
  transform: rotate(-5deg);
}

.stack-page-three {
  right: 42px;
  bottom: 8px;
  z-index: 1;
  transform: rotate(6deg);
}

.hero-labels {
  position: absolute;
  right: 20px;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 460px;
}

.hero-labels span {
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 900;
}

main {
  overflow: hidden;
}

section,
.site-footer {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.profile-section,
.showcase-section,
.page-wall-section {
  padding: 74px 0;
}

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

.section-heading h2,
.site-footer h2 {
  font-size: 2.6rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.86fr;
  gap: 16px;
}

.profile-panel,
.project-card,
.page-card {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 5px 5px 0 var(--ink);
}

.profile-panel {
  min-height: 210px;
  padding: 24px;
}

.profile-panel h3,
.project-card h3 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.25;
}

.profile-panel p {
  margin: 16px 0 0;
  color: #303236;
}

.accent-panel {
  background: var(--yellow);
}

.metric-row {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.metric-row span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 2px solid rgba(17, 17, 17, 0.18);
  font-weight: 900;
}

.metric-row strong {
  font-size: 2.1rem;
  line-height: 1;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-button {
  min-width: 94px;
  padding: 0 17px;
  border: 2px solid var(--ink);
  background: var(--panel);
  color: var(--ink);
  font-weight: 900;
}

.filter-button.is-active {
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
}

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

.project-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow: hidden;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 8px 8px 0 var(--ink);
}

.project-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
  background: #eeeeea;
}

.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.project-card:hover .project-cover img {
  transform: scale(1.035);
}

.project-number,
.project-category {
  position: absolute;
  top: 10px;
  display: inline-grid;
  place-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--panel);
  font-size: 0.78rem;
  font-weight: 950;
}

.project-number {
  left: 10px;
}

.project-category {
  right: 10px;
}

.project-body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
  min-height: 310px;
  padding: 18px;
}

.project-type {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 850;
}

.project-card p {
  margin: 0;
  color: #34363a;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-self: end;
}

.tag-list span {
  padding: 5px 8px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: #f5f5f0;
  font-size: 0.78rem;
  font-weight: 800;
}

.project-open {
  width: 100%;
  min-height: 42px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 950;
}

.page-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 520px);
  min-height: 52px;
  padding: 7px 8px 7px 17px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 900;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: 0;
}

.page-count {
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 950;
  white-space: nowrap;
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.page-card {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  text-align: left;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.page-card:hover {
  transform: translateY(-4px);
  box-shadow: 7px 7px 0 var(--ink);
}

.page-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 2px solid var(--ink);
  background: #ecece8;
}

.page-card span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 9px 11px;
  font-size: 0.86rem;
  font-weight: 900;
}

.page-card small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  margin-bottom: 36px;
  padding: 36px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 7px 7px 0 var(--ink);
}

.footer-copy p:last-child {
  margin: 14px 0 0;
  color: #303236;
}

.contact-list {
  display: grid;
  gap: 10px;
  font-style: normal;
}

.contact-list a,
.contact-list button {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.contact-list button {
  appearance: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 28px;
  background: rgba(10, 10, 10, 0.88);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close,
.lightbox-arrow {
  border: 2px solid var(--ink);
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  font-weight: 950;
}

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 3;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-arrow {
  align-self: center;
  width: 54px;
  height: 68px;
  border-radius: var(--radius);
  font-size: 3rem;
  line-height: 1;
}

.lightbox-prev {
  grid-column: 1;
}

.lightbox-next {
  grid-column: 3;
}

.lightbox-frame {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  width: min(100%, 1280px);
  margin: 0;
}

.lightbox-frame img {
  width: 100%;
  max-height: calc(100svh - 180px);
  object-fit: contain;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.lightbox-frame figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: #ffffff;
  font-weight: 850;
}

.lightbox-strip {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  gap: 8px;
  min-height: 72px;
  overflow-x: auto;
  padding: 8px 2px 2px;
}

.strip-button {
  flex: 0 0 112px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  background: transparent;
  opacity: 0.72;
}

.strip-button.is-active {
  border-color: var(--yellow);
  opacity: 1;
}

.strip-button img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  max-width: min(360px, calc(100% - 40px));
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 900;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1040px) {
  .topbar {
    grid-template-columns: auto auto;
  }

  .nav-links {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 48px;
  }

  .hero-stage {
    min-height: 560px;
  }

  .hero h1 {
    font-size: 4.1rem;
  }

  .profile-grid,
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-grid .accent-panel {
    grid-column: 1 / -1;
  }

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

@media (max-width: 740px) {
  body {
    font-size: 15px;
  }

  .topbar {
    top: 8px;
    width: calc(100% - 16px);
    gap: 8px;
  }

  .brand-mark span:last-child {
    display: none;
  }

  .download-link {
    padding: 0 13px;
  }

  .hero,
  section,
  .site-footer {
    width: calc(100% - 22px);
  }

  .hero {
    gap: 24px;
    padding: 34px 0 50px;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero h1 span {
    font-size: 1.55rem;
  }

  .hero-intro {
    font-size: 1rem;
  }

  .quick-facts,
  .profile-grid,
  .project-grid,
  .page-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .quick-facts div {
    box-shadow: 3px 3px 0 var(--ink);
  }

  .hero-stage {
    min-height: 430px;
  }

  .paper-stack {
    height: 390px;
  }

  .stack-page {
    width: 86%;
  }

  .stack-page-two {
    top: 134px;
  }

  .stack-page-three {
    right: 28px;
  }

  .hero-labels {
    position: relative;
    right: auto;
    bottom: auto;
    justify-content: flex-start;
    margin-top: 10px;
  }

  .profile-section,
  .showcase-section,
  .page-wall-section {
    padding: 48px 0;
  }

  .section-heading {
    display: block;
  }

  .section-heading h2,
  .site-footer h2 {
    font-size: 2rem;
  }

  .project-body {
    min-height: auto;
  }

  .page-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .page-count {
    align-self: flex-start;
  }

  .site-footer {
    padding: 24px;
  }

  .contact-list a,
  .contact-list button {
    width: 100%;
  }

  .lightbox {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    gap: 8px;
    padding: 16px 10px 12px;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
  }

  .lightbox-arrow {
    width: 42px;
    height: 58px;
    font-size: 2.3rem;
  }

  .lightbox-frame img {
    max-height: calc(100svh - 170px);
  }

  .strip-button {
    flex-basis: 92px;
  }
}

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