:root { --skills-ease: cubic-bezier(.22,1,.36,1); }

.skills-section {
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,.08);
  background: #000;
  padding: 118px max(40px, calc((100vw - 1360px) / 2)) 126px;
  color: #fff;
}
.skills-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 46px;
}
.skills-header > div { max-width: 920px; }
.skills-header .skills-eyebrow {
  max-width: 900px;
  margin: 0 0 14px;
  color: #fff;
  font: 750 clamp(52px, 5.2vw, 76px)/.98 Manrope, "Noto Sans TC", "PingFang SC", Arial, sans-serif;
  font-size: clamp(52px, 5.2vw, 76px) !important;
  letter-spacing: -.055em;
  text-transform: none;
  text-wrap: balance;
}
.skills-header .skills-supporting {
  max-width: 680px;
  margin: 0;
  color: #a99786;
  font: 650 clamp(22px, 2vw, 30px)/1.2 Manrope, "Noto Sans TC", "PingFang SC", Arial, sans-serif;
  font-family: Manrope, "Noto Sans TC", "PingFang SC", Arial, sans-serif !important;
  font-size: clamp(22px, 2vw, 30px) !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.skills-header > a {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
  color: #f3ede5;
  font: 800 14px/1.4 Manrope, "Noto Sans TC", "PingFang SC", Arial, sans-serif;
  white-space: nowrap;
}
.skills-header > a span:last-child { color: #d2a365; transition: transform .3s var(--skills-ease); }
.skills-header > a:hover span:last-child { transform: translate(3px, 3px); }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.skill-card {
  position: relative;
  min-width: 0;
  aspect-ratio: .74;
  overflow: hidden;
  isolation: isolate;
  border-radius: 22px;
  background: #17120f;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
  transition: transform .55s var(--skills-ease), box-shadow .55s var(--skills-ease);
}
.skill-card::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(0,0,0,.94) 0%, rgba(0,0,0,.36) 43%, rgba(0,0,0,.03) 73%),
    linear-gradient(90deg, rgba(0,0,0,.15), transparent 44%);
  content: "";
  pointer-events: none;
}
.skill-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.78) contrast(1.06) brightness(.9);
  transition: transform .9s var(--skills-ease), filter .55s var(--skills-ease);
}
.skill-card:nth-child(1) img { object-position: 60% center; }
.skill-card:nth-child(2) img { object-position: 44% center; }
.skill-card:nth-child(3) img { object-position: center 58%; }
.skill-card:nth-child(4) img { object-position: 53% center; }
.skill-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 30px 80px rgba(0,0,0,.42), inset 0 0 0 1px rgba(255,255,255,.18);
}
.skill-card:hover img { transform: scale(1.045); filter: saturate(.9) contrast(1.06) brightness(.95); }
.skill-number {
  position: absolute;
  z-index: 3;
  top: 24px;
  left: 24px;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: #b91f3b;
  color: #fff;
  box-shadow: 0 8px 28px rgba(82,0,18,.28);
  font: 700 17px/1 Manrope, Arial, sans-serif;
}
.skill-media-note {
  position: absolute;
  z-index: 3;
  top: 27px;
  right: 20px;
  max-width: 158px;
  color: rgba(255,255,255,.72);
  font: 700 10px/1.35 Manrope, "Noto Sans TC", Arial, sans-serif;
  letter-spacing: .04em;
  text-align: right;
  text-transform: uppercase;
}
.skill-card-copy {
  position: absolute;
  z-index: 3;
  right: 24px;
  bottom: 25px;
  left: 24px;
  text-align: center;
}
.skill-card-copy h3 {
  margin: 0;
  color: #fff;
  font: 780 clamp(19px, 1.55vw, 25px)/1.2 Manrope, "Noto Sans TC", "PingFang SC", Arial, sans-serif;
  font-family: Manrope, "Noto Sans TC", "PingFang SC", Arial, sans-serif !important;
  font-size: clamp(19px, 1.55vw, 25px) !important;
  font-weight: 780 !important;
  line-height: 1.2 !important;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.skill-card-copy p {
  max-width: 280px;
  margin: 11px auto 0;
  color: #c8beb4;
  font: 500 11px/1.55 Manrope, "Noto Sans TC", "PingFang SC", Arial, sans-serif;
}

html.skills-motion-ready [data-reveal][data-motion="cards"] .skill-card {
  opacity: 0;
  translate: 0 28px;
  scale: .992;
}
html.skills-motion-ready [data-reveal][data-motion="cards"].is-visible .skill-card {
  animation: skills-column-reveal .92s var(--skills-ease) forwards;
}
html.skills-motion-ready [data-reveal][data-motion="cards"] .skills-eyebrow {
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity .62s var(--skills-ease), transform .62s var(--skills-ease);
}
html.skills-motion-ready [data-reveal][data-motion="cards"] h2 {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .78s .08s var(--skills-ease), transform .78s .08s var(--skills-ease);
}
html.skills-motion-ready [data-reveal][data-motion="cards"].is-visible .skills-eyebrow,
html.skills-motion-ready [data-reveal][data-motion="cards"].is-visible h2 { opacity: 1; transform: none; }
html.skills-motion-ready [data-reveal][data-motion="cards"].is-visible .skill-card:nth-child(1) { animation-delay: .06s; }
html.skills-motion-ready [data-reveal][data-motion="cards"].is-visible .skill-card:nth-child(2) { animation-delay: .12s; }
html.skills-motion-ready [data-reveal][data-motion="cards"].is-visible .skill-card:nth-child(3) { animation-delay: .18s; }
html.skills-motion-ready [data-reveal][data-motion="cards"].is-visible .skill-card:nth-child(4) { animation-delay: .24s; }
@keyframes skills-column-reveal { to { opacity: 1; translate: 0 0; scale: 1; } }

@media (max-width: 980px) {
  .skills-section { padding: 84px 20px 92px; }
  .skills-header { align-items: flex-start; margin-bottom: 36px; }
  .skills-header .skills-eyebrow { font-size: clamp(46px, 7vw, 64px) !important; }
  .skills-header .skills-supporting { font-size: clamp(22px, 3vw, 28px) !important; }
  .skills-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .skill-card { aspect-ratio: .78; }
  .skill-card-copy h3 { font-size: 24px !important; }
}

@media (max-width: 560px) {
  .skills-section { padding: 72px 0 78px; }
  .skills-header { display: block; margin-bottom: 32px; padding: 0 16px; }
  .skills-header .skills-eyebrow { margin-bottom: 13px; font-size: clamp(38px, 11vw, 46px) !important; line-height: 1 !important; }
  .skills-header .skills-supporting { font-size: 22px !important; line-height: 1.2 !important; }
  .skills-header > a { width: max-content; margin-top: 19px; font-size: 13px; }
  .skills-grid {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 0 16px 14px;
    scroll-padding-inline: 16px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .skills-grid::-webkit-scrollbar { display: none; }
  .skill-card { flex: 0 0 min(78vw, 310px); aspect-ratio: .72; border-radius: 20px; scroll-snap-align: start; }
  .skill-number { top: 18px; left: 18px; width: 46px; height: 46px; font-size: 15px; }
  .skill-media-note { top: 21px; right: 17px; max-width: 145px; font-size: 9px; }
  .skill-card-copy { right: 20px; bottom: 22px; left: 20px; }
  .skill-card-copy h3 { font-size: 23px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .skill-card, .skill-card img, .skills-header > a span { animation: none !important; transition: none !important; }
  html.skills-motion-ready [data-reveal][data-motion="cards"] .skill-card { opacity: 1; translate: 0 0; scale: 1; }
  html.skills-motion-ready [data-reveal][data-motion="cards"] .skills-eyebrow,
  html.skills-motion-ready [data-reveal][data-motion="cards"] h2 { opacity: 1; transform: none; }
}
