/* ============================================================
   PROJECT SHOWCASE
   Shared by the three work sub-pages. Wider than .content-section
   so embeds and screenshots get room the 760px prose column
   can't give them.
   ============================================================ */

.showcase {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
}

.showcase__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 880px) {
  .showcase__grid--pair { grid-template-columns: repeat(2, 1fr); }
  .showcase__grid--trio { grid-template-columns: repeat(3, 1fr); }
}

.project {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.project:hover {
  transform: translateY(-4px);
  border-color: rgba(63, 169, 208, 0.58);
  background: rgba(255, 255, 255, 0.08);
}

/* A fixed box the media fills, so mismatched source sizes still
   line the cards up. */
.project__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--abyss);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.project__media iframe,
.project__media img,
.project__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.project__media video {
  object-fit: cover;
  background: var(--abyss);
}

/* Screenshots are crops — anchor to the top so headers survive. */
.project__media img {
  object-fit: cover;
  object-position: top center;
}

/* A document with no natural thumbnail (a PDF, a resume): a plain
   tile carrying an icon and a short label instead of an image. */
.project__media--doc {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.project__media--doc svg {
  width: 40px;
  height: 52px;
  color: var(--star-gold, var(--sand));
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.project:hover .project__media--doc svg {
  opacity: 0.85;
}

.project__media--doc span {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240, 244, 247, 0.5);
}

/* Two related marks shown side by side in one preview, rather than
   only the first surfacing until the deck is opened. */
.project__media--duo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.25rem;
}

.project__media--duo img {
  position: static;
  width: auto;
  height: auto;
  max-height: 100%;
  max-width: 42%;
  object-fit: contain;
}

/* Same idea, three items instead of two. */
.project__media--three {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.25rem;
}

.project__media--three img {
  position: static;
  width: auto;
  height: auto;
  max-height: 100%;
  max-width: 30%;
  object-fit: contain;
}

/* Re-anchors a cropped (object-fit: cover) image to its vertical
   center instead of the top — for a portrait subject where the top
   crop was cutting into the figure rather than framing it. */
.project__media--center-y img {
  object-position: center;
}

/* Phone mockups and print pieces are portrait; letterbox rather
   than crop them. */
.project__media--tall { aspect-ratio: 4 / 5; }

.project__media--tall img,
.project__media--whole img {
  object-fit: contain;
  object-position: center;
  padding: 0.75rem;
}

.project__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.2rem 1.3rem 1.4rem;
}

.project__label {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.7rem;
}

.project__body h3 {
  font-family: var(--font-ui);
  font-size: 1.24rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 0.7rem;
}

/* A native-language annotation on a title, e.g. a katakana rendering
   next to a romanized name. Lighter weight so it reads as a gloss,
   not a second title. */
.project__gloss {
  font-weight: 400;
  color: rgba(240, 244, 247, 0.55);
}

/* Software used, shown as small pills rather than prose so it can be
   scanned without reading the description. */
.project__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0 0 0.9rem;
  padding: 0;
}

.project__tools li {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240, 244, 247, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

.project__body p {
  font-family: var(--font-body);
  font-size: 0.94rem;
  line-height: 1.7;
  color: rgba(240, 244, 247, 0.74);
  margin-bottom: 1rem;
}

/* Scoped to out-specify `.project__body p` above, rather than
   reaching for !important. */
.project__body .project__credit {
  font-family: var(--font-ui);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: rgba(240, 244, 247, 0.5);
}

/* Vector marks are drawn for light stock — give them a ground to
   sit on rather than losing them against the abyss. */
.project__media--light {
  background: rgba(240, 244, 247, 0.92);
}

/* A small supporting deliverable shown at its own scale, rather than
   through the lightbox, where blowing up a 32px source would just
   look pixelated. */
.project__favicon {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.2rem 0 0.9rem;
}

.project__favicon img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 4px;
  image-rendering: pixelated;
}

.project__favicon span {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: rgba(240, 244, 247, 0.55);
}

/* Groups a card's trailing links/buttons so the whole set is pushed
   to the bottom together, with one fixed gap between them.

   This used to be done with :first-of-type + adjacent-sibling
   margins directly on .project__link, but :first-of-type matches
   per tag name — an <a> and a <button> each independently counted
   as "first of their type", so both picked up margin-top: auto and
   split the leftover space between them instead of using the fixed
   gap. A wrapper sidesteps that entirely. */
.project__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: auto;
}

.project__link {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  border-bottom: 1px solid rgba(63, 169, 208, 0.4);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.project__link:hover {
  color: var(--white);
  border-color: var(--white);
}

/* Same affordance as a link, but it opens the deck rather than
   navigating — used where the card's media is already a player. */
button.project__link {
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(63, 169, 208, 0.4);
  padding: 0 0 2px;
  cursor: pointer;
  text-align: left;
}

button.project__link:hover { border-color: var(--white); }

.showcase__note {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  line-height: 1.8;
  color: rgba(240, 244, 247, 0.5);
}

.showcase__note a {
  color: var(--blue);
  border-bottom: 1px solid rgba(63, 169, 208, 0.4);
}

@media (max-width: 760px),
       (orientation: portrait) and (max-aspect-ratio: 0.95),
       (orientation: landscape) and (max-height: 500px) {
  .showcase,
  .showcase__note {
    padding-left: 1.75rem;
    padding-right: 1.75rem;
  }

  /* The `min-width: 880px` breakpoint above and "is this mobile"
     here are two unrelated conditions — a wide-but-portrait device
     (most tablets, some phones) can satisfy both at once: nav goes
     mobile, but the grid was still just checking raw width and never
     found out. This comes later in the file, so on an equal-specificity
     tie it wins and forces the single column back regardless of what
     the width-only rule decided. */
  .showcase__grid--pair,
  .showcase__grid--trio {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   LIGHTBOX
   ============================================================ */

/* Anything that opens a preview reads as pressable. */
[data-lightbox] {
  cursor: zoom-in;
}

[data-lightbox]::after {
  content: attr(data-hint);
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  z-index: 2;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  background: rgba(6, 28, 46, 0.82);
  border: 1px solid rgba(126, 200, 227, 0.35);
  font-family: var(--font-ui);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240, 244, 247, 0.85);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.project:hover [data-lightbox]::after,
[data-lightbox]:focus-visible::after {
  opacity: 1;
}

html.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
}

.lightbox.is-open { display: flex; }

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 10, 18, 0.88);
  backdrop-filter: blur(6px);
}

.lightbox__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(1100px, 100%);
  max-height: 100%;
}

.lightbox__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  flex: 1;
}

.lightbox__image {
  max-width: 100%;
  max-height: calc(100vh - 10rem);
  width: auto;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

/* Prototypes need a real box rather than shrink-to-fit. */
.lightbox__frame {
  width: 100%;
  height: min(70vh, 640px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: var(--abyss);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.lightbox__close {
  position: absolute;
  top: -2.6rem;
  right: 0;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--blue);
}

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.lightbox__nav {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--blue);
}

/* A single image or an embed has nothing to page through. */
.lightbox__bar.is-solo .lightbox__nav { display: none; }

.lightbox__meta {
  min-width: 0;
  text-align: center;
}

.lightbox__caption {
  min-height: 1.2em;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: rgba(240, 244, 247, 0.68);
}

.lightbox__count {
  margin-top: 0.3rem;
  font-family: var(--font-ui);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: rgba(240, 244, 247, 0.4);
}

.lightbox__caption a {
  color: var(--blue);
  border-bottom: 1px solid rgba(63, 169, 208, 0.45);
  padding-bottom: 2px;
}

.lightbox__caption a:hover { color: var(--white); border-color: var(--white); }

@media (max-width: 760px),
       (orientation: landscape) and (max-height: 500px) {
  .lightbox__frame { height: 60vh; }
  .lightbox__close { top: -2.4rem; }
}
