/* Live website preview system — embedded iframe demos, same-page expand */
.live-work {
  padding: 52px 0 60px;
  background: var(--black);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 3;
}
.live-work-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 48px;
}
.live-work-lede {
  margin-top: 10px;
  max-width: 56ch;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(240, 237, 230, 0.52);
}
.live-work-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(28px, 3.5vw, 40px);
  letter-spacing: 2px;
  line-height: 1.1;
  color: rgba(240, 237, 230, 0.92);
  margin-bottom: 0;
}
/* Full portfolio (/portfolio grid) — category filter pills */
.portfolio-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  margin-bottom: 4px;
  padding: 0;
  border: none;
  list-style: none;
}
.portfolio-filter-bar[hidden] {
  display: none !important;
}
.portfolio-filter-btn {
  appearance: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(240, 237, 230, 0.65);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.portfolio-filter-btn:hover {
  border-color: rgba(255, 77, 28, 0.35);
  color: rgba(240, 237, 230, 0.9);
}
.portfolio-filter-btn.is-active,
.portfolio-filter-btn[aria-selected='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.portfolio-empty {
  grid-column: 1 / -1;
  margin: 24px 0 8px;
  font-size: 15px;
  color: rgba(240, 237, 230, 0.45);
}
.live-work-see-all {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s ease, gap 0.2s ease;
}
.live-work-see-all:hover {
  opacity: 0.9;
  gap: 12px;
}
.live-work-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 22px;
}
.live-work-card {
  background: #0f0f10;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.35s ease, border-color 0.25s ease;
}
.live-work-card--hero {
  border-color: rgba(249, 115, 22, 0.22);
  box-shadow: 0 8px 36px rgba(249, 115, 22, 0.08);
}
@media (hover: hover) and (pointer: fine) {
  .live-work-card:hover {
    transform: scale(1.02);
    z-index: 2;
    border-color: rgba(255, 77, 28, 0.35);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  }
  .live-work-card--hero:hover {
    border-color: rgba(249, 115, 22, 0.45);
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(249, 115, 22, 0.2);
  }
  .live-work-card:hover .live-work-placeholder {
    transform: scale(1.05);
  }
  .live-work--embed .live-work-card:hover .live-work-placeholder {
    transform: none;
  }
}
.live-work-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: #1a1a1e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.live-work-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.live-work-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #444;
}
.live-work-dots span:nth-child(1) {
  background: #ff5f56;
}
.live-work-dots span:nth-child(2) {
  background: #ffbd2e;
}
.live-work-dots span:nth-child(3) {
  background: #27ca40;
}
.live-work-url {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-family: ui-monospace, 'SF Mono', 'Consolas', monospace;
  color: rgba(240, 237, 230, 0.4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-work-expand {
  flex-shrink: 0;
  padding: 7px 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(240, 237, 230, 0.92);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.live-work-expand:hover,
.live-work-expand:focus-visible {
  border-color: var(--accent);
  color: var(--accent2);
  background: rgba(255, 77, 28, 0.08);
}
.live-work-frame-wrap {
  position: relative;
  height: min(300px, 52vw);
  background: #080809;
  overflow: hidden;
}
.live-work-frame-wrap--tall {
  height: min(340px, 56vw);
}
/* Static poster tile — no iframe in grid; modal loads the demo on demand */
.live-work-placeholder {
  width: 100%;
  height: 100%;
  min-height: 240px;
  background-color: #0a0a0c;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 18px 16px;
  transition: transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}
.live-work-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  max-width: 92%;
  text-align: left;
}
.live-work-placeholder-badge {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(249, 115, 22, 0.95);
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(249, 115, 22, 0.35);
}
.live-work-placeholder-title {
  font-size: 17px;
  font-weight: 600;
  color: rgba(248, 246, 242, 0.96);
  letter-spacing: 0.02em;
}
.live-work-placeholder-line {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(240, 237, 230, 0.65);
}
.live-work-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #080809;
  color-scheme: dark;
  opacity: 0;
  visibility: hidden;
}
.live-work-iframe.live-work-iframe--loaded {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.38s ease;
}
.live-work-meta {
  padding: 12px 14px 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.live-work-title {
  font-size: 13px;
  font-weight: 500;
  color: rgba(240, 237, 230, 0.88);
}
.live-work-tag {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
/* /portfolio section — cards use the same DOM as homepage (chrome + iframe + meta); these only tune hero + hover */
.live-work--embed .live-work-card--hero {
  border-color: rgba(249, 115, 22, 0.22);
  box-shadow: 0 8px 36px rgba(249, 115, 22, 0.08);
}
@media (hover: hover) and (pointer: fine) {
  .live-work--embed .live-work-card:hover {
    transform: scale(1.02);
    z-index: 2;
    border-color: rgba(255, 77, 28, 0.35);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  }
  .live-work--embed .live-work-card--hero:hover {
    border-color: rgba(249, 115, 22, 0.45);
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(249, 115, 22, 0.2);
  }
}
.live-work--embed .live-work-placeholder-badge {
  color: rgba(249, 115, 22, 0.95);
  border-color: rgba(249, 115, 22, 0.35);
  background: rgba(0, 0, 0, 0.45);
}
.live-work--embed .live-work-placeholder--embed .live-work-placeholder-title {
  color: rgba(248, 246, 242, 0.92);
}
/*
 * Live preview modal: #livePreviewModal is appended by portfolio-system.js on first expand (not in HTML).
 * ID + !important keeps display locked until `.is-open`.
 */
.live-preview-modal {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  z-index: 10050;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}
#livePreviewModal {
  display: none !important;
}
#livePreviewModal.is-open {
  display: flex !important;
}
/* Children: keep backdrop inert until .is-open (see stacking context above nav). */
.live-preview-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: pointer;
  pointer-events: none;
}
.live-preview-modal.is-open .live-preview-modal-backdrop {
  pointer-events: auto;
}
.live-preview-modal-shell {
  pointer-events: none;
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.live-preview-modal.is-open .live-preview-modal-shell {
  pointer-events: auto;
}
.live-preview-modal-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #1a1a1e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.live-preview-modal-title {
  font-size: 14px;
  font-weight: 500;
  color: rgba(240, 237, 230, 0.9);
  letter-spacing: 0.02em;
  margin: 0;
  font-family: inherit;
}
.live-preview-modal-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.75);
  color: var(--off-white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}
.live-preview-modal-close:hover {
  background: var(--accent);
  color: #fff;
}
.live-preview-modal-body {
  flex: 1;
  min-height: min(72vh, 760px);
  position: relative;
  background: #080809;
}
.live-preview-modal-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  /* Match modal chrome so the iframe’s blank / first paint doesn’t flash white (#fff hurts badly). */
  background: #080809;
  color-scheme: dark;
  opacity: 0;
  transition: opacity 0.22s ease;
  will-change: opacity;
}
.live-preview-modal-iframe.live-preview-modal-iframe--loaded {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .live-preview-modal-iframe {
    transition: none;
  }
}
@media (max-width: 768px) {
  .live-work {
    padding: 36px 0 44px;
  }
  .live-work-inner {
    padding: 0 24px;
  }
  .live-work-frame-wrap {
    height: min(260px, 48vh);
  }
  .live-work-frame-wrap--tall {
    height: min(280px, 50vh);
  }
  .live-preview-modal-body {
    min-height: min(64vh, 560px);
  }
  .live-preview-modal-shell {
    border-radius: 10px;
    max-height: 94vh;
  }
}
@media (prefers-reduced-motion: reduce) {
  .live-work-iframe {
    opacity: 1;
    visibility: visible;
    transition: none;
  }
  .live-work-card {
    transition: none;
  }
  .live-work-placeholder {
    transition: none;
  }
  .live-work-card:hover .live-work-placeholder {
    transform: none;
  }
}
