/* ============================================================
   CONEN.DEV — portfolio.css — PORTFOLIO page only
   Sections: hero / filter chips / specimen plates (live minis)
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- HERO ---------- */
.folio-hero {
  padding-top: clamp(9rem, 22vh, 15rem);
  padding-bottom: clamp(3rem, 7vh, 6rem);
}
.folio-hero__title .si {
  color: var(--ghost);
  text-shadow: 0 0 60px rgba(87, 230, 255, .4);
}
.folio-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .8em;
  margin-top: clamp(1.6rem, 4vh, 2.8rem);
  color: var(--ghost-dim);
}
.folio-hero__sep { color: var(--glow); }

/* ---------- FILTER CHIPS ---------- */
.folio-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  padding-block: 1.4rem clamp(3rem, 7vh, 6rem);
  border-top: 1px solid var(--line);
}
.chip {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ghost-dim);
  padding: .65em 1.3em;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.chip:hover { color: var(--ghost); border-color: var(--ghost-faint); }
.chip.is-active {
  color: var(--glow);
  border-color: var(--glow-soft);
  box-shadow: 0 0 18px rgba(87, 230, 255, .18), inset 0 0 12px rgba(87, 230, 255, .06);
}

/* ---------- SPECIMEN PLATES (asymmetric 12-col field) ---------- */
.specimens { padding-bottom: var(--section-pad); }

.plates {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: clamp(1.5rem, 3vw, 3rem);
  row-gap: clamp(4rem, 10vh, 9rem);
  align-items: start;
}

.plate { position: relative; }
.plate.is-hidden { display: none; }

/* asymmetric placement — auto rows so filtering reflows cleanly */
.plate--1 { grid-column: 1 / 8; }
.plate--2 { grid-column: 8 / 13; padding-top: clamp(4rem, 12vh, 10rem); }
.plate--3 { grid-column: 1 / 6; padding-top: clamp(2rem, 6vh, 5rem); }
.plate--4 { grid-column: 6 / 13; }

.plate__label {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .4em 1.5em;
  color: var(--ghost-faint);
  border-top: 1px solid var(--line);
  position: relative;
  padding-top: .9em;
  margin-bottom: 1.1rem;
}
.plate__label::before {
  content: '';
  position: absolute;
  top: -1px; left: 0;
  width: 32px; height: 1px;
  background: var(--glow);
}
.plate__label-right { color: var(--ghost-faint); }

.plate__media {
  border-radius: 10px;
  transition: box-shadow .5s var(--ease-out);
}
.plate:hover .plate__media {
  box-shadow: 0 0 0 1px var(--glow-soft), 0 30px 80px rgba(0, 0, 0, .55), 0 0 60px rgba(87, 230, 255, .08);
}
.plate__media .media-fallback {
  transition: transform .8s var(--ease-out), filter .8s var(--ease-out);
  will-change: transform;
}
.plate:hover .plate__media .media-fallback {
  transform: scale(1.045);
  filter: saturate(1.25) contrast(1.05) brightness(1.06);
}

/* scaled live preview: the project's real desktop layout, miniaturized.
   Iframe rendered at 400% of the frame, scaled to .25 — a 4x-wide virtual
   viewport shrunk into the plate. Fallback layer always sits beneath. */
.plate__iframe {
  position: absolute;
  top: 0; left: 0;
  width: 400%;
  height: 400%;
  transform: scale(.25);
  transform-origin: 0 0;
  border: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .9s var(--ease-out);
}
.plate__iframe.is-loaded { opacity: 1; }

/* per-specimen designed fallbacks */
.plate__fb--1 {
  background:
    radial-gradient(100% 80% at 20% 15%, rgba(87, 230, 255, .16), transparent 55%),
    linear-gradient(150deg, #0c1526, var(--abyss) 75%);
}
.plate__fb--2 {
  background:
    radial-gradient(90% 90% at 80% 20%, rgba(157, 245, 227, .13), transparent 50%),
    linear-gradient(200deg, #0a1a1e, var(--abyss) 70%);
}
.plate__fb--3 {
  background:
    radial-gradient(110% 70% at 50% 90%, rgba(87, 230, 255, .1), transparent 60%),
    linear-gradient(120deg, #0d1122, var(--abyss) 80%);
}
.plate__fb--4 {
  background:
    radial-gradient(80% 100% at 15% 80%, rgba(120, 160, 255, .1), transparent 55%),
    linear-gradient(170deg, #101226, var(--abyss) 75%);
}

/* title overlaps the media bottom edge — layered specimen look */
.plate__foot {
  position: relative;
  z-index: 2;
  margin-top: -1.4rem;
  padding-left: clamp(1rem, 2vw, 2rem);
}
.plate__title {
  font-size: clamp(2rem, 4.6vw, 4rem);
  letter-spacing: -0.03em;
  line-height: 1;
  text-shadow: 0 8px 30px rgba(4, 7, 13, .9);
  transition: color .35s ease;
}
.plate:hover .plate__title { color: var(--glow); }

.plate__desc {
  margin-top: .9rem;
  max-width: 34em;
  color: var(--ghost-dim);
  line-height: 1.65;
  font-size: .95rem;
}
.plate__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.1rem;
}
.plate__tags li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .5em 1em;
  color: var(--ghost-faint);
}

/* visible live-preview link — the whole plate is the anchor (.plate__open),
   this is its visual affordance */
.plate__live {
  display: inline-block;
  margin-top: 1.3rem;
  color: var(--ghost-dim);
  letter-spacing: .14em;
  border-bottom: 1px solid var(--ghost-faint);
  padding-bottom: .35em;
  transition: color .3s ease, border-color .3s ease;
}
.plate:hover .plate__live {
  color: var(--glow);
  border-color: var(--glow-soft);
}

/* invisible full-plate link (opens live preview in new tab) */
.plate__open {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 10px;
}
.plate__open:focus-visible {
  outline: 1px solid var(--glow);
  outline-offset: 6px;
}

.specimens__empty {
  margin-top: 3rem;
  color: var(--ghost-faint);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .plates { row-gap: clamp(3.5rem, 8vh, 5rem); }
  .plate--1, .plate--2, .plate--3, .plate--4 {
    grid-column: 1 / 13;
    padding-top: 0;
  }
  .plate__foot { margin-top: -1rem; padding-left: .6rem; }
  /* desktop minis are useless at phone width — JS never sets src, CSS backs it up */
  .plate__iframe { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .plate:hover .plate__media .media-fallback { transform: none; filter: none; }
  .plate__iframe { display: none; transition: none; }
}
