:root {
  --mustard: #edbd4f;
  --burgundy: #8b2323;
  --ink: #17140e;
  --paper: #fff8e8;
  --edge: clamp(16px, 3.1vw, 50px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--mustard);
  color: var(--ink);
  font-family: Arial, "Helvetica Neue", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.site-shell {
  min-height: 100vh;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  padding: 9px 12px;
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  min-height: 124px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding: 36px var(--edge) 28px;
}

.brand {
  color: var(--burgundy);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(42px, 4.2vw, 68px);
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.035em;
}

.site-nav {
  display: flex;
  gap: 22px;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 16px;
  line-height: 1;
}

.site-nav a,
.contact-email {
  position: relative;
}

.site-nav a::after,
.contact-email::after {
  position: absolute;
  right: 100%;
  bottom: -5px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transition: right 180ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a.is-active::after,
.contact-email:hover::after,
.contact-email:focus-visible::after {
  right: 0;
}

.contact-site {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.contact-main {
  width: min(100%, 820px);
  flex: 1;
  padding: clamp(76px, 8vw, 132px) var(--edge) 96px;
}

.contact-portrait {
  width: min(100%, 420px);
  height: auto;
  display: block;
}

.contact-bio {
  max-width: 720px;
  margin-top: 52px;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.55;
}

.contact-bio p {
  margin: 0 0 20px;
}

.contact-bio a {
  color: var(--burgundy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-page-footer {
  width: 100%;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 var(--edge) 72px;
}

.work {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #463f31;
}

.work img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 650ms cubic-bezier(0.2, 0.75, 0.2, 1), filter 350ms ease;
}

.work:hover img,
.work:focus-visible img {
  filter: saturate(1.08) contrast(1.03);
  transform: scale(1.025);
}

.work-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.1), transparent 45%, rgb(0 0 0 / 0.7));
  opacity: 0;
  transition: opacity 220ms ease;
}

.work-title,
.work-duration {
  position: absolute;
  z-index: 1;
  color: #fff;
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
}

.work-title {
  right: 14px;
  bottom: 13px;
  left: 14px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateY(5px);
}

.work-duration {
  top: 12px;
  right: 13px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.work:hover .work-shade,
.work:hover .work-title,
.work:hover .work-duration,
.work:focus-visible .work-shade,
.work:focus-visible .work-title,
.work:focus-visible .work-duration {
  opacity: 1;
}

.work:hover .work-title,
.work:focus-visible .work-title {
  transform: translateY(0);
}

.site-footer {
  min-height: 238px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding: 28px var(--edge) 48px;
  color: var(--burgundy);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 15px;
}

.site-footer p {
  margin: 0;
}

.footer-base {
  padding-bottom: 2px;
}

.contact-card {
  width: min(100%, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 38px;
  padding: 0;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.social-links a {
  width: 38px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--burgundy);
  transition: opacity 180ms ease, transform 180ms ease;
}

.social-links a:hover,
.social-links a:focus-visible {
  opacity: 0.68;
  transform: translateY(-2px);
}

.social-links img {
  display: block;
  object-fit: contain;
}

.social-links .xpc-logo {
  position: relative;
  width: 31px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--mustard);
  background: var(--burgundy);
  border-radius: 48% 45% 50% 44%;
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
  transform: rotate(-2deg);
}

.social-links .xpc-logo::after {
  position: absolute;
  right: 1px;
  bottom: -4px;
  width: 9px;
  height: 8px;
  background: var(--burgundy);
  clip-path: polygon(0 0, 100% 100%, 78% 0);
  content: "";
}

.social-links .xpc-logo span {
  position: relative;
  z-index: 1;
}

.social-links .douyin-logo {
  width: 28px;
  height: 28px;
}

.social-links .xiaohongshu-logo {
  width: 38px;
  height: 26px;
}

.contact-email {
  line-height: 1;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

@media (max-width: 900px) {
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 104px;
    align-items: flex-start;
    padding-top: 26px;
  }

  .brand {
    font-size: 48px;
  }

  .site-nav {
    gap: 14px;
    font-size: 14px;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-bottom: 48px;
  }

  .site-footer {
    min-height: 210px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    gap: 24px;
    font-size: 14px;
  }

  .contact-main {
    padding-top: 54px;
    padding-bottom: 72px;
  }

  .contact-bio {
    margin-top: 34px;
    font-size: 16px;
  }

  .contact-card {
    width: 100%;
  }

  .work-shade,
  .work-title,
  .work-duration {
    opacity: 1;
  }

  .work-title {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
