/* Web portfolio carousel (shortcode: [web_portfolio]) */
.tt-web-portfolio,
.tt-web-portfolio * {
  box-sizing: border-box;
}

.tt-web-portfolio {
  --ttwp-bg: #121212;
  --ttwp-border: rgba(255, 255, 255, 0.12);
  --ttwp-accent: #7dd3fc;
  --ttwp-text: rgba(255, 255, 255, 0.92);
  --ttwp-muted: rgba(255, 255, 255, 0.52);
  --ttwp-pill-bg: rgba(255, 255, 255, 0.08);
  --ttwp-pill-border: rgba(255, 255, 255, 0.18);
  --ttwp-radius: 16px;
  /* Same frame for every slide; image fills with cover anchored to top */
  --ttwp-shot-ratio: 16 / 10;
  /* Item name is the size reference; area uses the same (smaller than page titles) */
  --ttwp-name-line-size: clamp(0.875rem, 0.82rem + 0.22vw, 0.98rem);

  width: 100%;
  max-width: min(100%, var(--ttwp-max-width, 72rem));
  min-width: 0;
  margin: 1.25rem 0;
  margin-inline: auto;
  border-radius: calc(var(--ttwp-radius) + 4px);
  padding: 14px;
  overflow-x: clip;
  overflow-y: visible;
  background: var(--ttwp-bg);
  border: 1px solid var(--ttwp-border);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.tt-web-portfolio .ttwp-shell {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: var(--ttwp-radius);
  /* Clip horizontal carousel only — allow vertical overflow so tall cards keep hover lift + rounded border visible */
  overflow-x: clip;
  overflow-y: visible;
  padding-inline: 0;
}

.tt-web-portfolio .ttwp-viewport {
  overflow-x: clip;
  overflow-y: visible;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  position: relative;
  touch-action: pan-x pinch-zoom;
  /* min-height set by JS to match tallest slide so the card isn’t clipped vertically */
  min-height: 0;
}

.tt-web-portfolio .ttwp-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  transition: transform 0.45s cubic-bezier(0.2, 0.85, 0.2, 1);
  will-change: transform;
  transform-style: preserve-3d;
}

.tt-web-portfolio .ttwp-slide {
  flex-shrink: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Desktop: center card forward, neighbors recede (JS adds classes) */
@media (min-width: 1024px) {
  .tt-web-portfolio .ttwp-shell {
    padding-inline: 20px;
  }

  .tt-web-portfolio .ttwp-viewport {
    perspective: 1100px;
    perspective-origin: 50% 45%;
  }

  .tt-web-portfolio .ttwp-slide {
    transition: transform 0.45s cubic-bezier(0.2, 0.85, 0.2, 1), opacity 0.45s ease, filter 0.45s ease;
    transform-style: preserve-3d;
    backface-visibility: hidden;
  }

  .tt-web-portfolio .ttwp-slide.ttwp-slide--active {
    transform: translateZ(44px) scale(1);
    opacity: 1;
    z-index: 4;
  }

  .tt-web-portfolio .ttwp-slide.ttwp-slide--before {
    transform: translateZ(-48px) scale(0.85) rotateY(9deg);
    transform-origin: right center;
    opacity: 0.52;
    filter: brightness(0.8);
    z-index: 1;
  }

  .tt-web-portfolio .ttwp-slide.ttwp-slide--after {
    transform: translateZ(-48px) scale(0.85) rotateY(-9deg);
    transform-origin: left center;
    opacity: 0.52;
    filter: brightness(0.8);
    z-index: 1;
  }

  .tt-web-portfolio .ttwp-slide.ttwp-slide--far {
    transform: translateZ(-90px) scale(0.7);
    opacity: 0.18;
    pointer-events: none;
    z-index: 0;
  }

  /* Instant clone↔real swap: skip slide opacity/transform tween (prevents blink) */
  .tt-web-portfolio.ttwp--jumping .ttwp-slide {
    transition: none !important;
  }
}

@media (max-width: 1023px) {
  .tt-web-portfolio {
    padding: 10px;
  }
}

.tt-web-portfolio .ttwp-card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  text-decoration: none;
  color: inherit;
  border-radius: var(--ttwp-radius);
  /* Clip inner media lives in .ttwp-cardStack so 1px border + shadow aren’t clipped here */
  isolation: isolate;
  outline: none;
  border: 1px solid transparent;
  transition:
    transform 0.28s cubic-bezier(0.2, 0.85, 0.2, 1),
    border-color 0.28s ease,
    box-shadow 0.28s ease;
}

/* Rounded clip for screenshot + body only */
.tt-web-portfolio .ttwp-cardStack {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  gap: 0;
  min-height: 0;
  border-radius: calc(var(--ttwp-radius) - 1px);
  overflow: hidden;
}

.tt-web-portfolio .ttwp-card:hover {
  transform: translateY(-3px);
  border-color: rgba(125, 211, 252, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.38);
}

.tt-web-portfolio .ttwp-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(125, 211, 252, 0.45);
  box-shadow: 0 0 0 2px rgba(125, 211, 252, 0.35), 0 12px 32px rgba(0, 0, 0, 0.28);
}

.tt-web-portfolio .ttwp-card:active {
  transform: translateY(-1px);
  transition-duration: 0.12s;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.26);
}

.tt-web-portfolio .ttwp-shot {
  margin: 0;
  position: relative;
  width: 100%;
  flex-shrink: 0;
  aspect-ratio: var(--ttwp-shot-ratio);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--ttwp-border);
}

/* Intrinsic image size can’t change the frame — always same box, top-aligned crop */
.tt-web-portfolio .ttwp-shotImg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.tt-web-portfolio .ttwp-shotPlaceholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ttwp-muted);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tt-web-portfolio .ttwp-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
}

/* Area + project name: one compact size (name-led); accent only on area */
.tt-web-portfolio .ttwp-areaName {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35em 0.5em;
  min-width: 0;
  font-family: inherit;
  font-size: var(--ttwp-name-line-size);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.tt-web-portfolio .ttwp-areaLabel {
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  color: var(--ttwp-accent);
}

.tt-web-portfolio .ttwp-areaName .ttwp-company {
  margin: 0;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: none;
  color: var(--ttwp-muted);
  min-width: 0;
}

.tt-web-portfolio .ttwp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.tt-web-portfolio .ttwp-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ttwp-text);
  background: var(--ttwp-pill-bg);
  border: 1px solid var(--ttwp-pill-border);
  line-height: 1.2;
}

.tt-web-portfolio .ttwp-progress {
  margin-top: 12px;
  padding: 0 2px;
}

.tt-web-portfolio .ttwp-progress-timer {
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.tt-web-portfolio .ttwp-progress-timer-fill {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: rgba(125, 211, 252, 0.45);
}

.tt-web-portfolio .ttwp-progress-timer-fill--animate {
  animation: ttwp-progress-timer 4s linear forwards;
}

@keyframes ttwp-progress-timer {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

.tt-web-portfolio .ttwp-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 0 2px;
}

.tt-web-portfolio .ttwp-dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.tt-web-portfolio .ttwp-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.tt-web-portfolio .ttwp-dot[aria-current="true"] {
  background: var(--ttwp-accent);
  border-color: rgba(125, 211, 252, 0.65);
  transform: scale(1.08);
}

.tt-web-portfolio .ttwp-dot:focus-visible {
  outline: 2px solid var(--ttwp-accent);
  outline-offset: 2px;
}

.tt-web-portfolio .ttwp-nav {
  display: inline-flex;
  gap: 8px;
  flex-shrink: 0;
}

.tt-web-portfolio .ttwp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ttwp-text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.tt-web-portfolio .ttwp-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
}

.tt-web-portfolio .ttwp-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.tt-web-portfolio .ttwp-btn:focus-visible {
  outline: 2px solid var(--ttwp-accent);
  outline-offset: 2px;
}

.tt-web-portfolio .ttwp-btnIcon {
  font-size: 1.1rem;
  line-height: 1;
}

@media (max-width: 520px) {
  .tt-web-portfolio .ttwp-bar {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .tt-web-portfolio .ttwp-nav {
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tt-web-portfolio .ttwp-track {
    transition: none;
  }

  .tt-web-portfolio .ttwp-slide {
    transition: none;
  }

  .tt-web-portfolio .ttwp-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .tt-web-portfolio .ttwp-card:hover,
  .tt-web-portfolio .ttwp-card:focus-visible,
  .tt-web-portfolio .ttwp-card:active {
    transform: none;
  }

  .tt-web-portfolio .ttwp-progress-timer-fill--animate {
    animation: none;
    transform: scaleX(0.25);
    opacity: 0.5;
  }
}
