/* =============================
   WORKS – page + carousel
   (keeps existing works-* carousel styles)
   ============================= */

/* Page root (match About/Contact rhythm) */
.works-page{
  max-width: 1100px;
  margin: 0 auto;
  padding: 120px 24px 160px; /* identical rhythm to About */
}

/* Page header */
.works-lead{
  max-width: 520px;
  font-size: 18px;
  line-height: 1.6;
  opacity: 0.85;
  margin: 6px 0 0; /* same feel as About */
}

/* Section headings above each carousel */
.works-block{
  margin-top: 56px;
  margin-bottom: 56px;

  /* soft “panel” like the other pages */
  padding: 44px 0; /* keep vertical rhythm, align text with page left edge */
  border-radius: 24px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.62);
  border-bottom-color: rgba(17,17,17,0.10);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 18px 46px rgba(17,17,17,0.08);
}

.works-block-head{
  display: grid;
  gap: 6px;
  margin-bottom: 28px;
}

.works-kicker,
.works-note{
  margin: 0;
}

.works-kicker{
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(17,17,17,0.72);
}

.works-note{
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(17,17,17,0.70);
}

.works-block-huge{
  font-size: clamp(36px, 4.8vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
/* Thin divider (same feel as About) */
.works-divider{
  width: 100%;
  max-width: 980px;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  margin: 88px auto;
}

/* =============================
   Carousel – spacing + cards
   ============================= */

.works-carousel{
  margin-top: 12px;
}

/* Carousel frame */
.works-frame{
  position: relative;
  padding: 0 24px 18px; /* matches .works-page horizontal rhythm */
}

.works-viewport{
  overflow: hidden;
  border-radius: 18px;
  padding: 6px 2px;
}

@media (max-width: 600px){
  .works-viewport{ padding: 8px 4px; }
}

/* Slides row (JS can translate this) */
.works-slides{
  display: flex;
  gap: 14px;
  will-change: transform;
}

/* Each slide: keep it responsive; JS can set widths */
.works-slide{
  flex: 0 0 auto;
  min-width: 320px;
}

/* ART carousel: big cards, but not awkwardly wide */
.works-carousel[data-carousel="art"] .works-slide{
  min-width: 420px;
}

.works-carousel[data-carousel="art"] .works-thumb{
  height: 280px;
}

@media (max-width: 1024px){
  .works-carousel[data-carousel="art"] .works-slide{ min-width: 340px; }
  .works-carousel[data-carousel="art"] .works-thumb{ height: 240px; }
}

@media (max-width: 600px){
  .works-carousel[data-carousel="art"] .works-slide{ min-width: 280px; }
  .works-carousel[data-carousel="art"] .works-thumb{ height: 200px; }
  .works-thumb{ height: 220px; }
}

.works-carousel[data-carousel="code"] .works-slide{
  min-width: 320px;
}

@media (max-width: 600px){
  .works-carousel[data-carousel="code"] .works-slide{ min-width: 260px; }
}

/* =============================
   Card
   ============================= */

.works-card{
  display: flex;
  flex-direction: column !important;
  gap: 12px;
  justify-content: flex-start;
  align-items: stretch;
  text-decoration: none;
  color: inherit;

  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.62);
  border-bottom-color: rgba(17,17,17,0.10);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  overflow: hidden;

  transform-origin: center;
  transition: transform 220ms ease, border-color 220ms ease, border-bottom-color 220ms ease;
}

.works-card:hover{
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(255,255,255,0.82);
  border-bottom-color: rgba(17,17,17,0.16);
}

.works-thumb{
  width: 100%;
  height: 300px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;

  /* fallback background (if no image is set) */
  background-color: rgba(255,255,255,0.14);
  background-image:
    radial-gradient(120px 80px at 30% 30%, rgba(107,78,255,0.18), transparent 60%),
    radial-gradient(110px 70px at 70% 80%, rgba(255,120,120,0.16), transparent 55%);

  /* IMPORTANT: make background-image (URL) fill the thumb */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  border: 1px solid rgba(255,255,255,0.55);
  transition: transform 220ms ease;
}

.works-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.works-card:hover .works-thumb{
  transform: scale(1.06);
}

.works-meta{
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  padding: 10px 2px 2px;
}

.works-carousel[data-carousel="art"] .works-meta{
  padding-top: 10px;
}

.works-type{
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(17,17,17,0.55);
}

.works-name{
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.1px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.works-desc{
  font-size: 13.5px;
  color: rgba(17,17,17,0.68);
  line-height: 1.4;
}

/* =============================
   Nav + dots
   ============================= */

.works-nav{
  display: none;
}

.works-prev,
.works-next{
  display: none !important;
}

.works-dots{
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 22px;
}

.works-dots button{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(17,17,17,0.18);
  cursor: pointer;
}

.works-dots button[aria-current="true"]{
  background: rgba(17,17,17,0.42);
}

/* =============================
   Responsive
   ============================= */

@media (max-width: 1024px){
}

@media (max-width: 860px){
  .works-card{ padding: 13px; }
  .works-page{ padding: 120px 20px 140px; }
}

@media (max-width: 600px){
  .works-prev{ left: 10px; }
  .works-next{ right: 10px; }
  .works-thumb{ height: 220px; }
  .works-page{ padding: 120px 16px 120px; }
  .works-title{ margin-bottom: 20px; }
  .works-lead{ font-size: 16px; }
}

@media (max-width: 600px){
  .works-block{ padding: 32px 0; border-radius: 20px; }
  .works-frame{ padding: 0 16px 18px; }
  .works-block-head{ margin-bottom: 16px; }
}

/* =============================
   Lightbox (full-screen image)
   ============================= */

.works-lightbox{
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.72);
  display: grid;
  place-items: center;
  padding: 28px;
}

.works-lightbox img{
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(0,0,0,0.35);
}

.works-lightbox-close{
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}