/* ---------------------------------------------------------------------------
   Work grid section — drop-in styles.
   Everything is namespaced `ws-` so it cannot collide with the host project.
   Override the tokens on .ws-root to retheme.
   --------------------------------------------------------------------------- */

.ws-root {
  --ws-bg: #0a0a0a;
  --ws-fg: #ffffff;
  --ws-accent: #ff2d20;
  --ws-card: #111111;
  --ws-gutter: clamp(20px, 3.2vw, 40px);
  --ws-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  background: var(--ws-bg);
  color: var(--ws-fg);
}

/* the grid itself: 12 columns, generous vertical rhythm */
.ws-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: clamp(120px, 18vh, 240px);
  padding: clamp(60px, 10vh, 140px) var(--ws-gutter) clamp(140px, 20vh, 260px);
}

.ws-caption {
  font-family: var(--ws-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.6;
}

.ws-dither {
  -webkit-mask-image:
    radial-gradient(circle, #000 var(--dot, -1px), transparent calc(var(--dot, -1px) + 0.7px)),
    radial-gradient(circle at 50% 50%, #000 var(--rad, -40%), transparent calc(var(--rad, -40%) + 38%));
  -webkit-mask-size: 10px 10px, 100% 100%;
  -webkit-mask-repeat: repeat, no-repeat;
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(circle, #000 var(--dot, -1px), transparent calc(var(--dot, -1px) + 0.7px)),
    radial-gradient(circle at 50% 50%, #000 var(--rad, -40%), transparent calc(var(--rad, -40%) + 38%));
  mask-size: 10px 10px, 100% 100%;
  mask-repeat: repeat, no-repeat;
  mask-composite: intersect;
}

.ws-dither.ws-solid {
  -webkit-mask-image: none;
  mask-image: none;
}

.ws-alt {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 8%;
  background: var(--bg, var(--ws-accent));
  color: var(--fg, #000);
  font-family: var(--ws-mono);
  font-size: clamp(12px, 1.15vw, 17px);
  letter-spacing: 0.02em;
  text-align: center;
  pointer-events: none;
}

.ws-tag {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  background: var(--ws-accent);
  color: #000;
  font-family: var(--ws-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  padding: 2px 5px;
  text-transform: uppercase;
}

.ws-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  opacity: 0.8;
}

.ws-caption .right {
  display: flex;
  gap: 18px;
}

.ws-media {
  display: block;
  position: relative;
  aspect-ratio: var(--ratio, 16 / 9);
  background: var(--ws-card);
  overflow: hidden;
}

.ws-media .art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ws-media .art {
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ws-card:hover .ws-media .art {
  transform: scale(1.03);
}

.ws-art-asterisk {
  background: #d6d6d6;
}

.ws-art-asterisk svg {
  width: 26%;
}

.ws-art-pill {
  background: #000;
}

.ws-art-pill .pill {
  width: 78%;
  height: 46%;
  background: var(--ws-accent);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4%;
  font-family: var(--ws-mono);
  font-weight: 500;
  font-size: clamp(16px, 2.6vw, 38px);
  color: #000;
  position: relative;
}

.ws-art-pill .pill b {
  font-weight: 500;
  display: grid;
  place-items: center;
  height: 84%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #0a0a0a;
  color: #fff;
  margin-right: 2%;
}

.ws-art-squircle {
  background: #000;
  gap: 4%;
  grid-auto-flow: column;
}

.ws-art-squircle i {
  width: 22%;
  aspect-ratio: 1;
  border-radius: 28%;
}

.ws-art-squircle i:nth-child(1) {
  border: 1px solid #9a9a9a;
  background:
    radial-gradient(circle at 0 0, #e8e8e8 2px, transparent 3px),
    radial-gradient(circle at 100% 0, #e8e8e8 2px, transparent 3px),
    radial-gradient(circle at 0 100%, #e8e8e8 2px, transparent 3px),
    radial-gradient(circle at 100% 100%, #e8e8e8 2px, transparent 3px);
}

.ws-art-squircle i:nth-child(2) {
  background: linear-gradient(135deg, #ffffff, #b4b4b4 45%, #6e6e6e 70%, var(--ws-accent));
}

.ws-art-squircle i:nth-child(3) {
  background: linear-gradient(#3a3a3a, #222);
  border-radius: 14%;
  background-image:
    linear-gradient(90deg, var(--ws-accent), #ffffff, #8a8a8a, #4a4a4a, var(--ws-accent)),
    linear-gradient(90deg, #444, #444);
  background-size: 70% 6%, 70% 6%;
  background-position: 50% 30%, 50% 60%;
  background-repeat: no-repeat;
  background-color: #2b2b2b;
}

.ws-art-iconsheet {
  background: #ededed;
}

.ws-art-iconsheet svg {
  width: 82%;
  height: 82%;
  color: #222;
}

.ws-art-phone {
  background: #d2d2d2;
  align-items: end;
  justify-items: start;
}

.ws-art-phone .phone {
  width: 72%;
  height: 78%;
  margin: 0 0 -6% 8%;
  background: #0d0d0d;
  border-radius: 18% 18% 0 0 / 22% 22% 0 0;
  position: relative;
  box-shadow: inset 0 0 0 6px #2a2a2a;
}

.ws-art-phone .time {
  position: absolute;
  left: 32%;
  top: 14%;
  color: #fff;
  font-weight: 600;
  font-size: clamp(12px, 1.6vw, 24px);
}

.ws-art-phone .app {
  position: absolute;
  bottom: 12%;
  width: 22%;
  aspect-ratio: 1;
  border-radius: 24%;
}

.ws-art-phone .app.a {
  left: 30%;
  background: linear-gradient(135deg, var(--ws-accent), #9a1a12);
}

.ws-art-phone .app.b {
  left: 60%;
  background: #fff;
}

.ws-art-appicon {
  background: #d2d2d2;
}

.ws-art-appicon i {
  width: 40%;
  aspect-ratio: 1;
  border-radius: 24%;
  background: linear-gradient(145deg, var(--ws-accent), #8f1810);
  position: relative;
  box-shadow: 0 30px 60px rgba(255, 45, 32, 0.28);
}

.ws-art-appicon i::after {
  content: '';
  position: absolute;
  inset: 24%;
  border-radius: 50%;
  border: 12% solid #fff;
  border-width: clamp(6px, 1.2vw, 16px);
  border-right-color: transparent;
}

.ws-art-bluegrid {
  background: var(--ws-accent);
}

.ws-art-bluegrid svg {
  width: 74%;
  height: 74%;
  color: #fff;
}

.ws-art-logo3d {
  background: linear-gradient(160deg, #3a3a3a, #0d0d0d);
}

.ws-art-logo3d svg {
  width: 46%;
}

.ws-art-poster {
  background: var(--ws-accent);
}

.ws-art-poster svg {
  width: 72%;
}

.ws-art-iso {
  background: #c9c9c9;
}

.ws-art-iso svg {
  width: 74%;
}
@media (max-width: 900px) {
  .ws-card {
    grid-column: 1 / 13 !important;
    margin-top: 0 !important;
  }

  .ws-grid {
    row-gap: 80px;
  }
}

/* ===========================================================================
   Portfolio integration — real screenshots + brand theme.
   Kept at the end so the component above stays untouched and updatable.
   =========================================================================== */

/* The component only sizes its generated `.art`; a real <img> gets no styles
   at all and would overflow the media box. Give it the same fitted box. */
.ws-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ws-card:hover .ws-media > img { transform: scale(1.03); }

/* section shell, matching the other dark panels on the page */
.work-section {
  position: relative;
  z-index: 2;
  background: var(--dark);
  color: var(--paper);
  border-radius: 32px;
  padding: 8.5rem 1.8rem 0;
  overflow: hidden;
}
.work-head {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.work-head .label { color: var(--lime); }

/* brand tokens — the grid sits inside the panel, so it draws no background
   of its own and inherits the page gutters rather than adding more */
#work-grid.ws-root {
  --ws-bg: transparent;
  --ws-fg: var(--paper);
  --ws-accent: var(--lime);
  --ws-card: #141414;
  --ws-mono: var(--font-mono);
}
/* The component ships a very airy rhythm (18vh between rows on top of each
   card's own vh offset), which left a dead screen of empty panel between the
   builds. Tighten the gap so the next project is always on its way in. */
#work-grid .ws-grid {
  padding-left: 0;
  padding-right: 0;
  max-width: 1500px;
  margin: 0 auto;
  row-gap: clamp(72px, 8vh, 120px);
}

/* project description under the caption — body face, not the mono caption,
   and held to a readable measure even on the widest cards */
.ws-desc {
  margin-top: 0.9rem;
  max-width: 62ch;
  font-family: var(--font-body);
  font-size: 0.96rem;
  line-height: 1.6;
  color: rgba(241, 240, 234, 0.6);
}

@media (max-width: 760px) {
  .work-section { padding: 5.5rem 1.1rem 0; border-radius: 24px; }
}
