/* Personal works page — ocean glass portfolio */

:root {
  --works-blue: #237de8;
  --works-blue-dark: #0d3a66;
  --works-blue-soft: #b9ddfb;
  --works-fog: #f4f9fe;
  --works-ink: #102f4c;
  --works-muted: #58748c;
  --works-border: rgba(255, 255, 255, 0.82);
  --works-glass: rgba(247, 252, 255, 0.68);
  --works-glass-soft: rgba(245, 251, 255, 0.48);
  --works-shadow: rgba(32, 106, 166, 0.16);
  --works-radius: 24px;
  /* 作品页内容区拉满视口宽度，仅保留左右安全边距，不再用 1200px 居中窄栏。 */
  --works-max: 100%;
  --works-pad-x: clamp(16px, 2.5vw, 40px);
  --works-card-min: 240px;
  --works-ease: cubic-bezier(0.32, 0.72, 0, 1);
}

html.hs-works-page,
html:has(body .hs-works) {
  min-height: 100%;
  background: #cde8fb url("/img/works/ocean-lighthouse.png") center top / cover fixed no-repeat !important;
}

html.hs-works-page body,
body:has(.hs-works) {
  min-height: 100%;
  background: transparent !important;
}

/* 主题页尾位于作品容器之外，必须透出根节点的灯塔背景而不是重新铺纯色。 */
html.hs-works-page footer.footer,
body:has(.hs-works) footer.footer {
  background: transparent !important;
  background-color: transparent !important;
}

/*
 * Volantis 默认 .body-wrapper max-width ≈ 1080px、#safearea 有 gap 外边距，
 * 作品页必须整链拉满视口，否则两侧会露出背景图缝隙。
 */
html.hs-works-page #safearea,
body:has(.hs-works) #safearea {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
}

html.hs-works-page .body-wrapper,
body:has(.hs-works) .body-wrapper {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
}

/* 作品页保留 Volantis 顶部导航，只去掉文章标题、封面和侧栏等博客阅读组件。 */
html.hs-works-page #l_body,
html.hs-works-page #l_main,
html.hs-works-page #l_main.no_sidebar,
body:has(.hs-works) #l_body,
body:has(.hs-works) #l_main,
body:has(.hs-works) #l_main.no_sidebar {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

/* 覆盖主题在 2K+ 下对 no_sidebar 的 55vw 限宽。 */
html.hs-works-page #l_main.no_sidebar,
body:has(.hs-works) #l_main.no_sidebar {
  max-width: none !important;
}

html.hs-works-page #l_main article#page,
html.hs-works-page #l_main article.post,
html.hs-works-page #l_main .article,
body:has(.hs-works) #l_main article#page,
body:has(.hs-works) #l_main article.post,
body:has(.hs-works) #l_main .article {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html.hs-works-page #l_main .article-meta,
html.hs-works-page #l_main .headimg-div,
html.hs-works-page #l_main #comments,
html.hs-works-page #l_side,
html.hs-works-page #l_cover,
html.hs-works-page .cover-wrapper,
body:has(.hs-works) #l_main .article-meta,
body:has(.hs-works) #l_main .headimg-div,
body:has(.hs-works) #l_main #comments,
body:has(.hs-works) #l_side,
body:has(.hs-works) #l_cover,
body:has(.hs-works) .cover-wrapper {
  display: none !important;
}

html.hs-works-page #post-body,
body:has(.hs-works) #post-body {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body:has(.hs-works) #post-body .hs-works h1,
body:has(.hs-works) #post-body .hs-works h2,
body:has(.hs-works) #post-body .hs-works h3,
body:has(.hs-works) #post-body .hs-works p {
  margin: 0;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body:has(.hs-works) #post-body .hs-works h1::before,
body:has(.hs-works) #post-body .hs-works h1::after,
body:has(.hs-works) #post-body .hs-works h2::before,
body:has(.hs-works) #post-body .hs-works h2::after,
body:has(.hs-works) #post-body .hs-works h3::before,
body:has(.hs-works) #post-body .hs-works h3::after {
  display: none !important;
  content: none !important;
}

.hs-works,
.hs-works * {
  box-sizing: border-box;
}

.hs-works {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  overflow: hidden;
  color: var(--works-ink);
  font-family: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.hs-works__main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 112px var(--works-pad-x) 72px;
}

/* 首屏是整页海景场景：文案在左，角色透明立绘站右下，禁止出现第二块矩形图层。 */
.hs-works__hero {
  position: relative;
  display: block;
  min-height: clamp(420px, 58vh, 600px);
  padding: 88px 12px 48px;
  overflow: visible;
}

.hs-works__hero-copy {
  position: relative;
  z-index: 2;
  max-width: min(560px, 48vw);
}

/*
 * 角色站位：透明 PNG 直接叠在页面 ocean 背景上。
 * 尺寸故意偏小，像场景里的人，而不是半屏海报。
 */
.hs-works__hero-visual {
  position: absolute;
  right: clamp(12px, 4vw, 64px);
  bottom: -12px;
  z-index: 1;
  width: min(280px, 28vw);
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  pointer-events: none;
  opacity: 1;
}

.hs-works__hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: bottom right;
  user-select: none;
  /* 只给角色脚底一点环境光，不要整图滤镜/遮罩，否则会现矩形 */
  filter: drop-shadow(0 18px 28px rgba(18, 70, 120, 0.22));
}

.hs-works__section-index {
  display: block;
  margin-bottom: 16px;
  color: var(--works-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.hs-works__title {
  max-width: 9em;
  color: var(--works-blue-dark);
  font-family: "Noto Serif SC", "Source Han Serif SC", STSong, serif;
  font-size: clamp(42px, 6vw, 74px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hs-works__subtitle {
  max-width: 34em;
  margin-top: 22px !important;
  color: var(--works-muted);
  font-size: 16px;
  line-height: 1.8;
}

.hs-works__hero-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  margin-top: 28px;
  padding: 0 20px;
  border-radius: 999px;
  color: #fff !important;
  background: linear-gradient(180deg, #3d93f2, var(--works-blue));
  box-shadow: 0 12px 28px rgba(35, 125, 232, 0.28);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  transition: transform 0.3s var(--works-ease), box-shadow 0.3s var(--works-ease);
}

.hs-works__hero-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(35, 125, 232, 0.34);
}

/* 项目区改为不透明浅底，去掉毛玻璃 blur，避免遮住灯塔背景时出现磨砂层。 */
.hs-works__projects {
  margin-top: 28px;
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background: #f4f9fe;
  box-shadow: 0 20px 48px rgba(35, 103, 157, 0.1);
}

.hs-works__section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.hs-works__section-head h2 {
  color: var(--works-blue-dark);
  font-family: "Noto Serif SC", "Source Han Serif SC", STSong, serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
}

.hs-works__section-head p {
  margin-top: 8px !important;
  color: var(--works-muted);
  font-size: 14px;
}

.hs-works__filters {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: #dff1fd;
}

.hs-works__filters button {
  min-height: 40px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  color: var(--works-muted);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.hs-works__filters button span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 11px;
}

.hs-works__filters button.is-active {
  color: var(--works-blue-dark);
  background: #fff;
  box-shadow: 0 6px 18px rgba(36, 103, 155, 0.14);
}

/* 按卡片最小宽度自动填满一行，宽屏可排 4～5 张，避免固定 2 列留白。 */
.hs-works__project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--works-card-min)), 1fr));
  gap: 16px;
}

.hs-work-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(220, 234, 246, 0.95);
  border-radius: var(--works-radius);
  background: #fafdff;
  box-shadow: 0 14px 30px rgba(36, 103, 155, 0.09);
  transition: transform 0.4s var(--works-ease), box-shadow 0.4s var(--works-ease);
}

.hs-work-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 42px rgba(36, 103, 155, 0.14);
}

.hs-work-card.is-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

.hs-work-card__visual {
  position: relative;
  min-height: 200px;
  overflow: hidden;
  background: #ddecf7;
}

.hs-work-card.is-featured .hs-work-card__visual {
  min-height: 320px;
}

.hs-work-card__visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  transition: transform 0.7s var(--works-ease);
}

.hs-work-card:hover .hs-work-card__visual img {
  transform: scale(1.035);
}

.hs-work-card__chrome {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 10px;
  background: #f5fbff;
  box-shadow: 0 8px 22px rgba(18, 63, 99, 0.12);
}

.hs-work-card__chrome.is-browser {
  gap: 5px;
}

.hs-work-card__chrome.is-browser i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8bbfe7;
}

.hs-work-card__chrome.is-browser span {
  min-width: 0;
  margin-left: 8px;
  overflow: hidden;
  color: #54748d;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hs-work-card__chrome.is-app {
  justify-content: space-between;
}

.hs-work-card__chrome.is-app span {
  color: #5b5ca8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.hs-work-card__chrome.is-app i {
  width: 34px;
  height: 7px;
  border-radius: 999px;
  background: #c4c7ee;
}

.hs-work-card__type {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  color: #16466c;
  background: #f7fcff;
  box-shadow: 0 7px 20px rgba(18, 63, 99, 0.12);
  font-size: 12px;
  font-weight: 700;
}

.hs-work-card.is-software .hs-work-card__type {
  color: #4d4f9a;
  background: #f5f5ff;
}

.hs-work-card__body {
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.hs-work-card.is-featured .hs-work-card__body {
  justify-content: center;
  padding: 28px;
}

.hs-work-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--works-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hs-work-card__meta span:last-child {
  color: var(--works-blue);
}

.hs-work-card h3 {
  color: var(--works-blue-dark);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.hs-work-card.is-featured h3 {
  font-size: 26px;
}

.hs-work-card__body > p {
  margin-top: 12px !important;
  color: var(--works-muted);
  font-size: 14px;
  line-height: 1.75;
}

.hs-work-card__platforms,
.hs-work-card__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.hs-work-card__platforms {
  margin-top: 18px;
}

.hs-work-card__stack {
  margin-top: 9px;
}

.hs-work-card__platforms span,
.hs-work-card__stack span {
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}

.hs-work-card__platforms span {
  color: #1767aa;
  background: #e2f2ff;
}

.hs-work-card.is-software .hs-work-card__platforms span {
  color: #55579f;
  background: #e9e9fb;
}

.hs-work-card__stack span {
  color: #667b8d;
  background: #edf3f7;
}

.hs-work-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.hs-work-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #c7ddeb;
  border-radius: 999px;
  color: var(--works-ink) !important;
  background: #f5fbff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
}

.hs-work-card__link.is-primary {
  border-color: transparent;
  color: #fff !important;
  background: var(--works-blue);
}

.hs-work-card.is-software .hs-work-card__link.is-primary {
  background: #6265b7;
}

.hs-work-card__link:hover span {
  transform: translate(2px, -2px);
}

.hs-works__empty {
  padding: 48px 20px !important;
  color: var(--works-muted);
  text-align: center;
}

.hs-works__closing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
  padding: 24px 28px;
  border: 1px solid var(--works-border);
  border-radius: var(--works-radius);
  background: #f6fcff;
  box-shadow: 0 14px 34px rgba(35, 103, 157, 0.09);
}

.hs-works__closing span {
  display: block;
  margin-bottom: 5px;
  color: var(--works-blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.hs-works__closing strong {
  color: var(--works-blue-dark);
  font-size: 16px;
}

.hs-works__closing > a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--works-blue-dark) !important;
  background: #fff;
  box-shadow: 0 8px 22px rgba(35, 103, 157, 0.12);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
}

.hs-works__reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--works-ease), transform 0.7s var(--works-ease);
}

.hs-works__reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

.hs-works__reveal[data-delay="1"] { transition-delay: 0.06s; }
.hs-works__reveal[data-delay="2"] { transition-delay: 0.11s; }
.hs-works__reveal[data-delay="3"] { transition-delay: 0.16s; }
.hs-works__reveal[data-delay="4"] { transition-delay: 0.21s; }

.hs-works a:focus-visible,
.hs-works button:focus-visible {
  outline: 3px solid rgba(35, 125, 232, 0.45);
  outline-offset: 3px;
}

/* 中宽屏：卡片略宽一点；首屏角色继续贴右，文案区略收。 */
@media (max-width: 1100px) {
  :root {
    --works-card-min: 260px;
  }

  .hs-work-card.is-featured {
    grid-template-columns: 1fr;
  }

  .hs-work-card.is-featured .hs-work-card__visual {
    min-height: 280px;
  }

  .hs-works__hero-copy {
    max-width: min(480px, 54vw);
  }

  .hs-works__hero-visual {
    width: min(240px, 30vw);
    right: clamp(8px, 3vw, 36px);
  }
}

@media (max-width: 900px) {
  .hs-works__main {
    padding-top: 96px;
  }

  .hs-works__hero {
    min-height: 380px;
    padding: 56px 12px 36px;
  }

  .hs-works__hero-copy {
    max-width: min(420px, 60vw);
  }

  .hs-works__hero-visual {
    width: min(200px, 32vw);
    right: 8px;
    bottom: -4px;
  }

  .hs-works__section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  :root {
    --works-card-min: 240px;
  }
}

@media (max-width: 680px) {
  .hs-works__main {
    padding: 82px 14px 48px;
  }

  .hs-works__hero {
    min-height: 340px;
    padding: 40px 8px 88px;
  }

  /* 手机端文案优先，角色缩到右下角小点缀。 */
  .hs-works__hero-copy {
    max-width: 100%;
  }

  .hs-works__hero-visual {
    width: 140px;
    right: 4px;
    bottom: 0;
    opacity: 0.92;
  }

  .hs-works__title {
    font-size: clamp(38px, 13vw, 54px);
  }

  .hs-works__projects {
    padding: 24px 14px;
    border-radius: 22px;
  }

  .hs-works__filters {
    width: 100%;
  }

  .hs-works__filters button {
    flex: 1;
    padding: 0 8px;
  }

  .hs-works__project-grid {
    grid-template-columns: 1fr;
  }

  .hs-work-card.is-featured {
    grid-column: auto;
    display: block;
  }

  .hs-work-card__visual,
  .hs-work-card.is-featured .hs-work-card__visual {
    min-height: 220px;
  }

  .hs-work-card.is-featured .hs-work-card__body {
    padding: 20px;
  }

  .hs-works__closing {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hs-works__reveal,
  .hs-work-card,
  .hs-work-card__visual img,
  .hs-works__hero-action {
    opacity: 1;
    transform: none;
    transition: none !important;
  }
}
