html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: #071527;
  color: #e8eefc;
  font-family: MiSans, "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

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

.video-layer {
  opacity: 0;
  will-change: opacity;
}

.scroll-reveal {
  margin: 0;
}

.scroll-reveal-text {
  margin: 0;
}

.word {
  display: inline-block;
}

.liquid-glass,
.liquid-glass-strong {
  background: rgba(255,255,255,0.01);
  background-blend-mode: luminosity;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
}

.liquid-glass::before,
.liquid-glass-strong::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.45) 0%,
    rgba(255,255,255,0.15) 20%,
    rgba(255,255,255,0) 40%,
    rgba(255,255,255,0) 60%,
    rgba(255,255,255,0.15) 80%,
    rgba(255,255,255,0.45) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hide-scrollbar {
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.border-glow-card {
  --edge-proximity: 0;
  --cursor-angle: 45deg;
  --edge-sensitivity: 22;
  --color-sensitivity: calc(var(--edge-sensitivity) + 18);
  --border-radius: 999px;
  --glow-padding: 24px;
  --cone-spread: 25;

  position: relative;
  display: inline-grid;
  border-radius: var(--border-radius);
  isolation: isolate;
  background: var(--card-bg, rgba(7, 21, 39, 0.78));
  border: 1px solid rgb(232 238 252 / 18%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 10%),
    0 18px 50px rgb(0 0 0 / 24%);
  transform: translate3d(0, 0, 0.01px);
}

.border-glow-card::before,
.border-glow-card::after,
.border-glow-card > .edge-light {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  opacity: 1;
  transition: opacity 0.28s ease-out;
}

.border-glow-card:not(:hover)::before,
.border-glow-card:not(:hover)::after,
.border-glow-card:not(:hover) > .edge-light,
.border-glow-card.is-disabled::before,
.border-glow-card.is-disabled::after,
.border-glow-card.is-disabled > .edge-light {
  opacity: 0;
  transition: opacity 0.7s ease-in-out;
}

.border-glow-card::before {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--card-bg, #071527) 0 100%) padding-box,
    linear-gradient(rgb(255 255 255 / 0%) 0 100%) border-box,
    var(--gradient-one) border-box,
    var(--gradient-two) border-box,
    var(--gradient-three) border-box,
    var(--gradient-four) border-box,
    var(--gradient-five) border-box,
    var(--gradient-six) border-box,
    var(--gradient-seven) border-box,
    var(--gradient-base) border-box;
  mask-image:
    conic-gradient(
      from var(--cursor-angle) at center,
      black calc(var(--cone-spread) * 1%),
      transparent calc((var(--cone-spread) + 15) * 1%),
      transparent calc((100 - var(--cone-spread) - 15) * 1%),
      black calc((100 - var(--cone-spread)) * 1%)
    );
  opacity: calc((var(--edge-proximity) - var(--color-sensitivity)) / (100 - var(--color-sensitivity)));
}

.border-glow-card::after {
  background:
    var(--gradient-one) padding-box,
    var(--gradient-two) padding-box,
    var(--gradient-three) padding-box,
    var(--gradient-four) padding-box,
    var(--gradient-five) padding-box,
    var(--gradient-six) padding-box,
    var(--gradient-seven) padding-box,
    var(--gradient-base) padding-box;
  mask-image:
    linear-gradient(to bottom, black, black),
    radial-gradient(ellipse at 50% 50%, black 40%, transparent 65%),
    conic-gradient(from var(--cursor-angle) at center, transparent 5%, black 15%, black 85%, transparent 95%);
  mask-composite: subtract, add;
  mix-blend-mode: soft-light;
  opacity: calc(var(--fill-opacity, 0.36) * (var(--edge-proximity) - var(--color-sensitivity)) / (100 - var(--color-sensitivity)));
}

.border-glow-card > .edge-light {
  inset: calc(var(--glow-padding) * -1);
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: plus-lighter;
  mask-image:
    conic-gradient(
      from var(--cursor-angle) at center,
      black 2.5%,
      transparent 10%,
      transparent 90%,
      black 97.5%
    );
  opacity: calc((var(--edge-proximity) - var(--edge-sensitivity)) / (100 - var(--edge-sensitivity)));
}

.border-glow-card > .edge-light::before {
  content: "";
  position: absolute;
  inset: var(--glow-padding);
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px var(--glow-color),
    inset 0 0 8px 0 var(--glow-color-40),
    inset 0 0 22px 2px var(--glow-color-20),
    0 0 3px 0 var(--glow-color-60),
    0 0 12px 0 var(--glow-color-40),
    0 0 28px 2px var(--glow-color-20),
    0 0 52px 6px var(--glow-color-10);
}

.border-glow-inner {
  position: relative;
  z-index: 2;
  display: inline-flex;
  border-radius: inherit;
  overflow: hidden;
}

.work-action-button {
  min-width: 9.25rem;
  min-height: 3.8rem;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 8%), rgb(255 255 255 / 0%)),
    rgb(7 21 39 / 82%);
  color: rgb(232 238 252 / 92%);
  cursor: pointer;
  font-family: MiSans, "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0 2rem;
  text-transform: uppercase;
  transition:
    color 0.25s ease,
    background 0.25s ease,
    transform 0.25s ease;
}

.work-action-button:hover {
  color: #ffffff;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 12%), rgb(255 255 255 / 2%)),
    rgb(9 28 52 / 92%);
  transform: translateY(-1px);
}

.work-action-button:disabled {
  cursor: not-allowed;
  color: rgb(232 238 252 / 36%);
  transform: none;
}

@media (min-width: 768px) {
  .experience-step {
    left: var(--timeline-left);
  }
}

.work-accordion-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgb(232 238 252 / 10%);
  border-radius: 1.4rem;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 3%), rgb(255 255 255 / 0%)),
    rgb(3 7 15 / 28%);
  box-shadow: 0 34px 110px rgb(0 0 0 / 26%);
}

.work-accordion {
  display: flex;
  gap: 0.75rem;
  height: clamp(31rem, 44vw, 40rem);
  padding: 1.1rem;
  perspective: 1400px;
  perspective-origin: center;
}

.work-accordion-panel {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgb(232 238 252 / 12%);
  border-radius: 1.15rem;
  background: rgb(7 21 39 / 78%);
  color: #e8eefc;
  cursor: pointer;
  isolation: isolate;
  outline: none;
  padding: 0;
  text-align: left;
  transform-style: preserve-3d;
  transform-origin: center;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 9%),
    0 24px 70px rgb(0 0 0 / 30%);
  will-change: flex-grow, opacity, transform;
  -webkit-tap-highlight-color: transparent;
}

.work-accordion-panel:focus-visible {
  border-color: rgb(232 238 252 / 58%);
  box-shadow:
    0 0 0 2px rgb(115 215 255 / 68%),
    0 28px 90px rgb(117 166 255 / 24%);
}

.work-accordion-panel[data-active="true"] {
  border-color: rgb(232 238 252 / 46%);
}

.work-accordion-media,
.work-accordion-shade {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
}

.work-accordion-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  will-change: transform, filter;
}

.work-accordion-shade {
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgb(3 7 15 / 0%) 34%, rgb(3 7 15 / 86%) 100%),
    linear-gradient(90deg, rgb(3 7 15 / 48%), rgb(3 7 15 / 6%) 48%, rgb(3 7 15 / 52%));
}

.work-accordion-panel[data-active="true"] .work-accordion-shade {
  opacity: 0;
}

.work-accordion-index {
  position: absolute;
  z-index: 2;
  left: 1.15rem;
  top: 1.1rem;
  color: rgb(232 238 252 / 68%);
  font-family: MiSans, "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.work-accordion-label {
  position: absolute;
  z-index: 2;
  left: 1.2rem;
  right: 1.2rem;
  bottom: 1.15rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1.25rem;
  opacity: 0;
  pointer-events: none;
}

.work-accordion-client,
.work-accordion-actions,
.work-accordion-title,
.work-accordion-desc,
.work-accordion-year {
  display: block;
  font-family: MiSans, "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

.work-accordion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  pointer-events: auto;
}

.work-accordion-panel[data-active="false"] .work-accordion-actions {
  pointer-events: none;
}

.work-card-action {
  display: inline-flex;
  min-width: 5.2rem;
  min-height: 2.35rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(232 238 252 / 22%);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 10%), rgb(255 255 255 / 1%)),
    rgb(7 21 39 / 70%);
  color: rgb(232 238 252 / 92%);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 10%),
    0 12px 32px rgb(0 0 0 / 22%);
  transition:
    border-color 0.22s ease,
    background 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease;
}

.work-card-action:hover,
.work-card-action:focus-visible {
  border-color: rgb(232 238 252 / 54%);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 15%), rgb(255 255 255 / 3%)),
    rgb(11 34 61 / 84%);
  color: #ffffff;
  outline: none;
  transform: translateY(-1px);
}

.work-card-action.is-disabled {
  cursor: not-allowed;
  color: rgb(232 238 252 / 34%);
}

.work-accordion-client {
  color: rgb(232 238 252 / 58%);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.work-accordion-title {
  margin-top: 0.55rem;
  color: #e8eefc;
  font-size: clamp(2rem, 3.5vw, 4.25rem);
  font-weight: 700;
  line-height: 0.92;
}

.work-accordion-desc {
  max-width: 36rem;
  margin-top: 0.9rem;
  color: rgb(232 238 252 / 66%);
  font-size: 0.94rem;
  font-weight: 300;
  line-height: 1.75;
}

.work-accordion-year {
  color: rgb(232 238 252 / 46%);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

@media (max-width: 900px) {
  .work-accordion {
    flex-direction: column;
    height: 45rem;
  }

  .work-accordion-panel {
    min-height: 3.25rem;
    transform: none !important;
  }

  .work-accordion-title {
    font-size: clamp(1.8rem, 8vw, 3rem);
  }

  .work-accordion-desc {
    display: none;
  }

  .work-card-action {
    min-width: 4.8rem;
    min-height: 2.2rem;
  }
}

@media (max-width: 560px) {
  .work-accordion {
    height: 40rem;
    gap: 0.55rem;
    padding: 0.7rem;
  }

  .work-accordion-label {
    left: 0.9rem;
    right: 0.9rem;
    bottom: 0.9rem;
  }

  .work-accordion-index {
    left: 0.9rem;
    top: 0.85rem;
  }
}

/* StarBorder preview actions */
.star-border {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.875rem 1.5rem;
  border: 0;
  border-radius: var(--star-border-radius);
  background: var(--star-border-surface);
  color: var(--star-border-text);
  font: inherit;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.star-border::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  box-shadow: inset 0 0 0 var(--star-border-thickness) var(--star-border-track);
  pointer-events: none;
}

.star-border__light {
  position: absolute;
  top: -48px;
  left: -48px;
  z-index: -1;
  width: calc(100% + 96px);
  height: calc(100% + 96px);
  pointer-events: none;
}

button.star-border,
a.star-border {
  cursor: pointer;
}

.star-border:focus-visible {
  outline: 2px solid var(--star-border-track);
  outline-offset: 3px;
}

.star-border:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.work-card-action.star-border {
  min-width: 6rem;
  min-height: 2.8rem;
  padding: 0.65rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 800;
  background: rgb(7 21 39 / 82%);
  color: #ffffff;
  border: 0;
}
@media (max-width: 900px) {
  .work-card-action.star-border { min-width: 5.5rem; min-height: 2.6rem; font-size: 0.85rem; }
}

.work-gallery-pages { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.work-gallery-pages button { padding: 0.7rem 1.2rem; border: 1px solid rgb(232 238 252 / 22%); border-radius: 999px; background: rgb(7 21 39 / 70%); color: #e8eefc; font: inherit; cursor: pointer; }
.work-gallery-pages button[aria-pressed='true'] { background: rgb(42 79 105 / 85%); border-color: #8cdbff; }
.work-gallery-pages button:focus-visible { outline: 2px solid #8cdbff; outline-offset: 3px; }

/* Compact expertise grid within the personal profile. */
.profile-skills {
  margin-top: 28px;
  margin-bottom: 4px;
}
.profile-skills > div > .grid {
  margin-top: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.profile-skills .grid > div {
  padding: 12px;
  border-radius: 14px;
  min-width: 0;
}
.profile-skills .grid > div > .flex {
  gap: 9px;
}
.profile-skills .grid > div > .flex > span {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 10px;
}
.profile-skills .grid > div > .flex > p {
  font-size: 14px;
  line-height: 1.15;
}
.profile-skills .grid > div > .mt-5 {
  margin-top: 10px;
}
.profile-skills .mb-2 {
  font-size: 9px;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.profile-skills .h-1\.5 {
  height: 4px;
}
@media (min-width: 1280px) {
  .profile-skills > div > .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
