
/* BASE STATE — always visible */
.reveal,
.heading-fade,
.content-fade {
  opacity: 1;
  transform: none;
}

/* =========================================================
   THEME VARIABLES
========================================================= */

:root {
    --bg-color: #ffffff;
    --card-bg: #f2f2f2;
    --text-main: #111111;
    --text-muted: #666666;
    --accent: #e88aa3;
    --accent-primary: #009688;

    --radius: 5px;
    --gap-lg: 20px;
    --gap-md: 18px;
    --header-height: clamp(68px, 62px + 1.5vw, 80px);
}

.app-header {
  height: var(--header-height);
  z-index: 2500;
}

.header-spacer {
  height: var(--header-height);
  pointer-events: none;
}

/* =========================================================
   PAGE ENTRY FADE-IN (GENERIC)
========================================================= */


.heading-fade {
  opacity: 0;
}

.heading-fade.is-visible {
  opacity: 1;
  transition: opacity 0.8s ease;
}

.content-fade {
  opacity: 0;
  will-change: opacity, transform;
}

.content-fade.is-visible {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

/* Vertical (default for center / stacked content) */
.reveal-up {
  transform: translateY(18px);
}

/* Horizontal – left to right */
.reveal-side {
  transform: translateX(18px);
}

/* Horizontal – left to right */
.reveal-Opp {
  transform: translateX(-18px);
}
/* =========================================================
   BASE
========================================================= */


.project-detail {
    background: var(--bg-color);
    color: var(--text-main);
    padding: clamp(16px, 4vw, 20px) clamp(18px, 4vw, 25px) 0;
    max-width: 1400px;
    margin: 0 auto;
}

/* =========================================================
   BREADCRUMB
========================================================= */

.project-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(1.3rem, 1rem + 0.6vw, 1.4rem);
    color: var(--text-muted);
    margin-bottom: 20px;
}

.project-breadcrumb a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
}

.project-breadcrumb a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
    text-decoration-color: var(--accent-primary);
}

/* Year styling */
.project-detail .project-year {
  font-size: 0.9em;              /* slightly smaller than title */
  font-weight: 400;
  margin-left: -4px;
}

/* =========================================================
   TOP SECTION LAYOUT (VIDEO + INFO)
========================================================= */

  .project-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: stretch; /* 🔑 important */
    transition: grid-template-columns 0.25s ease;
  }

.project-top-media {
  position: relative;
}

.project-top-info {
  display: flex;
  flex-direction: column;
}


/* =========================================================
   HERO VIDEO
========================================================= */

.project-hero {
  position: relative;
  height: 576px;
  width: 100%;
  margin-bottom: 20px;
  
  overflow: hidden;
  border-radius: 7px;
  --overscan: 1;
}

/* MEDIA WRAPPER MUST FILL HERO */
.project-hero-media {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
}


/* VIDEO — LANDSCAPE CROPPING (YOUR INTENT PRESERVED) */
.project-hero video {
  position: absolute;
  top: 0;
  left: 50%;

  height: 100%;
  width: calc(100% * var(--overscan));
  --tx: -50%;
  transform: translateX(var(--tx));
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
  object-fit: cover;

  background: #000;
  border-radius: 7px;
}

/* Desktop & tablet-wide only */
@media (max-width: 1400px) {
  .project-top {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  }
}

@media (max-width: 1210px) {
  .project-top {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  }
}

.project-hero-media:hover video {
  transform: translateX(var(--tx)) scale(1.05);
}

@media (max-width: 900px) {
  .project-hero {
    height: clamp(360px, calc(30vw + 250px), 576px);
  }
}

/*
@media (max-width: 900px) {
  .project-hero {
    height: clamp(360px, 55dvh, 500px);
  }
}

@media (max-width: 600px) {
  .project-hero {
    height: clamp(300px, 48dvh, 450px);
  }
}

@media (max-width: 420px) {
  .project-hero {
    height: clamp(260px, 44dvh, 350px);
  }
}
*/
/* =========================================================
   HERO OVERLAY (WATCH GAMEPLAY)
========================================================= */

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  color: #fff;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 7px;
  font-size: clamp(1rem, 4vw, 1.7rem);
}

.project-hero-media:hover .hero-overlay {
  opacity: 1;
}

.project-hero.youtube-active .hero-overlay {
  opacity: 0 !important;
  pointer-events: none;
}

@media (hover: none) {
  .project-hero-media:hover .hero-overlay {
    opacity: 0;
  }
}

.YTVideo {
  width: 1em;
  height: 1em;
}

/* =========================================================
   HERO META BAR AND HERO META CONTENT
========================================================= */

.project-meta-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3.5px;
  
  padding: 0px 20px; /* ↑ right padding increased */
  border-radius: 0 0 7px 7px;

  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.25s ease;

  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;

  opacity: 1;
  transform: none;
}

.project-overlay-blur {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50px;

  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(0.8px);
  -webkit-backdrop-filter: blur(0.8px);

  opacity: 1;
  transform: translateY(0px);
  transition: opacity 0.25s ease, transform 0.25s ease;

  pointer-events: none;
}

.project-hero:hover .project-overlay-blur {
  opacity: 1;
  transform: translateY(0);
}

.project-hero:hover .project-meta-bar {
  pointer-events: auto;
}

.project-meta-bar * {
  pointer-events: none;
}

.project-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.project-detail .project-title {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  gap: 6px;
  font-size: 1.5rem;
  
  font-weight: 600;
  color: white;
  text-shadow: 0 4px 20px rgba(0,0,0,0.4);
  white-space: nowrap;
  cursor: pointer;
}

.project-detail .project-title .cta-external {
  width: 18px;
  height: auto;
  padding-top: 1.5px;
  opacity: 1;
  filter: invert(1);
}


.project-meta-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-meta-icons img{
  height: 20px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.playstore-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

/* TEXT */
.playstore-text {
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;

  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* ICON */
.playstore-icon {
  height: 18px;
  filter: brightness(0) invert(1);
  transition: filter 0.25s ease;
}

/* HOVER */
.project-meta-bar:hover .playstore-text {
  opacity: 1;
  transform: translateX(0);
}

.project-meta-bar:hover .project-meta-icons img {
  opacity: 1;
}

.project-meta-bar:hover .playstore-icon {
  filter: none; /* colored icon on hover */
}

.project-detail .project-meta-bar:hover .project-title {
  color: #1cc4b1;
}

.pipe {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  line-height: 1;
}


/* ========================================
   When YouTube is Active
======================================== */

/* YouTube player wrapper */
.hero-player {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.project-hero.youtube-active .hero-player {
  opacity: 1;
}

/* YouTube iframe */
.hero-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ============================
   Close Button – Base
============================ */

.hero-close-btn {
  position: absolute;
  top: 45px;
  right: 7px;
  z-index: 12;

  height: 33px;
  width: 33px;

  display: flex;
  align-items: center;
  justify-content: flex-end;

  padding-right: 9px;

  border-radius: 999px;
  border: none;
  cursor: pointer;

  background: rgba(152, 150, 150, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  overflow: hidden;

  transition: width 0.32s cubic-bezier(.22, 1, .36, 1);
}

.close-icon {
  font-size: 25px;
  color: white;
  padding-top: 1px;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.close-text {
  position: absolute;
  left: 10px;
  font-size: 0.9rem;
  color: white;
  opacity: 0;
  transform: translateX(-8px);
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.25s ease;
}


@media (hover: hover) and (pointer: fine) {

  .hero-close-btn:hover {
    width: 75px;
  }

  .hero-close-btn:hover .close-text {
    opacity: 1;
    transform: translateX(0);
  }

  .hero-close-btn:hover .close-icon {
    color: hsl(0, 100%, 50%);
  }
}


@media (max-width: 700px) {

  .hero-close-btn {
    right: 9px;
    height: 28px;
    width: 28px;
    padding-right: 8px;
    padding-top: 1px;
  }

  .close-icon {
    font-size: 20px;
  }

  .close-text {
    display: none;
  }
}

@media (hover: none), (pointer: coarse) {

  .hero-close-btn {
    justify-content: center;
    padding-right: 0;
  }

  .hero-close-btn:active {
    transform: scale(0.92);
  }
}


/* Download link cta */

/* Floating container */
.hero-floating-cta {
  position: absolute;
  top: 87px;
  right: 7px;
  z-index: 12;
}

/* Base button */
.mini-playstore {
  height: 33px;
  width: 33px;

  display: flex;
  align-items: center;
  justify-content: flex-end;

  padding-right: 7px;

  border-radius: 999px;

  background: rgba(152, 150, 150, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  text-decoration: none;
  overflow: hidden;
  cursor: pointer;

  transition:
    width 0.32s cubic-bezier(.22, 1, .36, 1),
    background 0.25s ease;
}

/* Icon */
.mini-icon {
  height: 17px;
  flex-shrink: 0;
  padding-left: 4px;
  filter: brightness(0) invert(1); /* white default */
  transition: filter 0.25s ease;
}

/* Hidden text */
.mini-text {
  position: absolute;
  left: 12px;

  font-size: 0.9rem;
  color: white;

  opacity: 0;
  transform: translateX(-8px);

  white-space: nowrap;

  transition:
    opacity 0.2s ease,
    transform 0.25s ease;
}

/* Desktop hover expansion */
@media (hover: hover) and (pointer: fine) {

  .mini-playstore:hover {
    width: 107px; /* expands left */
  }

  .mini-playstore:hover .mini-text {
    opacity: 1;
    transform: translateX(0);
  }

  .mini-playstore:hover .mini-icon {
    filter: none; /* colored icon */
  }

  .mini-playstore:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  }
}


@media (max-width: 700px) {

  .mini-playstore {
    height: 28px;
    width: 28px;
    
  }

  .hero-floating-cta{
  top: 80px;
  right: 9px;
  }

  .mini-icon {
    padding-left: 3px;
    height: 14px;
  }

  .mini-text {
    display: none;
  }
}

@media (hover: none), (pointer: coarse) {

  .mini-playstore {
    justify-content: center;
    padding-right: 0;
  }

  .mini-playstore:active {
    transform: scale(0.92);
  }
}


/* =========================================================
   ABOUT

   .project-about {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px 25px 20px 25px;
  margin-right: 25px;
}

.project-info {
  background: var(--card-bg);
  border-radius: var(--radius);
  margin: 0px 25px 0px 0px;
}

.project-info-inner {
  padding: 8px 0 5px 5px;
}


========================================================= */

.project-about {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: clamp(16px, 3.5vw, 20px) clamp(18px, 4vw, 25px);
}

.project-about h2 {
  margin-bottom: clamp(7px, 2vw, 12px);
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 1.5rem;
  color: var(--text-main);
}

.about-text{
  font-size: 1rem;
}


/* =========================================================
   PROJECT INFO
========================================================= */

.project-info {
  background: var(--card-bg);
  border-radius: var(--radius);
  
}

.project-info-inner {
  padding:
    clamp(8px, 2.1vw, 12px)
    0
    clamp(6px, 1.8vw, 10px)
    clamp(4px, 1.4vw, 8px);
}

.project-info-inner h2 {
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 1.5rem;
  margin-bottom: clamp(18px, 3vw, 20px);
}

.project-info ul {
  list-style: none;
  margin: 0;
  padding: 0;
  margin-left: -10px;
  display: grid;
  grid-template-columns: 1fr;
  column-gap: clamp(20px, 6vw, 40px);
  row-gap: clamp(14px, 3vw, 19px);
  position: relative;
  margin-bottom: 5px;
}

.project-info ul::before {
    content: none;
      
  }

.project-info li {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-main);
}

.project-info li::before {
  content: "";
  color: var(--accent-primary);
  font-size: 1rem;
  line-height: 1.5;
  margin-top: 2px;
}

.project-info strong {
  font-weight: 600;
}

.project-info a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

.project-info a:hover {
  text-decoration: underline;
}

/* =========================================================
   PROJECT INFO ICONS
========================================================= */

.project-info li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-info .info-icon {
  width: 20px;
  height: 20px;
  max-width: 20px;
  max-height: 20px;
  display: inline-block;
  opacity: 0.7;
  filter: grayscale(1);
}

.project-info .info-iconIdea {
  width: 23px;
  height: 23px;
  max-width: 23px;
  max-height: 23px;
  margin-bottom: 5px;
  display: inline-block;
  opacity: 0.7;
  filter: grayscale(1);
}


/* =========================================================
   PROJECT META GRID (INFO + TECH STACK)
========================================================= */

.project-meta-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
}


/* =========================================================
   TECH STACK
========================================================= */

.project-tech {
  width: 100%;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: clamp(16px, 3.5vw, 20px) clamp(18px, 4vw, 25px);
}

.project-tech h2 {
  font-family: "Montserrat", system-ui, sans-serif;
  margin-bottom: clamp(18px, 3vw, 20px);
  font-size: 1.5rem;
}

.tech-stack {
  
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 2vw, 12px);
  margin-bottom: 5px;
}

.tech-chip {
  padding: clamp(8px, 1.6vw, 10px) clamp(13px, 3vw, 15px);
  font-size: 1rem;
  background: #e8e8e8;
  border-radius: 999px;
  color: var(--text-main);
  white-space: nowrap;

  transition:
    background-color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

/* =========================================================
   TECH STACK HOVER POLISH
========================================================= */

.tech-chip:hover {
  background: color-mix(
        in srgb,
        var(--accent-primary) 20%,
        white
    );
  transform: translateY(-2px);
  box-shadow: 0 5px 2px rgba(0,0,0,0.08);
}


/* =========================================================
   ACHIEVEMENTS SECTION
========================================================= */

.project-achievements {
  padding-top: 10px;
}

.project-achievements .section-title {
  margin-bottom: 0px;        /* same as features */
}

.achievement-list {
  list-style: none;
  padding-left: 0;
  padding-top: 15px;         /* same as .feature-list */
  max-width: 840px;          /* match feature width */
}

.achievement-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--text-main);
}

/* Use same bullet logic as feature list */
.achievement-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #deb11e; /* subtle gold tone for distinction */
}

/* =========================================================
   FEATURE & LEARNING SECTIONS
========================================================= */

.project-detail .section-title {
  font-size: 1.5rem;
  margin-bottom: 0px;
  font-family: "Montserrat", system-ui, sans-serif;
  text-align: left;
}

.project-features {
  margin-top: 0;
  padding-top: 10px;
  margin-bottom: 20px;
}

.features-layout {
  display: grid;
  grid-template-columns: 1fr;
}

.feature-list {
  list-style: none;
  padding-left: 0;
  padding-top: 15px;
  max-width: 840px; /* keeps lines readable */
}

.feature-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
  font-size: 1rem;
  line-height: 1.35;
}

/* Subtle professional bullet */
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
}


/* =========================================================
   HIGHLIGHTED SYSTEMS
========================================================= */


.section-divider {
  height: 1.5px;
  background: rgba(0, 0, 0, 0.15);
  margin: 12px 0 30px;
}

.system-line {
  position: relative;
  padding-left: 18px;
}

.system-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  bottom: 0.3em;
  width: 5px;
  background: var(--accent-primary);
  opacity: 0.8;
}

.system-title {
  font-size: 1.4rem;
  font-weight: 600;
}

.system-intro {
  margin: 0;
  padding-top: 5px;
  margin-bottom: 30px;
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 100%;
  line-height: 1.5;
}

.system-media-block {
  clear: both;            /* ← THIS fixes the conflict */  
  overflow: hidden; /* prevents margin + float interaction */
}

.system-media-block figure {
  width: 100%;
  max-width: clamp(280px, 42vw, 380px);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
  background: none;
  position: relative;   /* 🔑 creates stacking context */
  z-index: 2; 
  cursor: zoom-in;
  border-radius: var(--radius);
}

/* =========================
   MEDIA INNER (FRAME)
========================= */

.media-inner {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #f5f5f5;
  position: relative;   /* <-- important */
}


.media-inner img,
.media-inner video {
  width: 100%;
  display: block;
  transition: transform 0.25s ease;
  transform-origin: center;
}

/* Correct media behavior */
.media-inner img {
  height: auto;
  max-height: clamp(220px, 34vw, 300px);
  object-fit: contain;
}

.media-inner video {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.system-media-block figure:hover 
.media-inner > img,
.system-media-block figure:hover 
.media-inner > video {
  transform: scale(1.05);
}

.media-right figure {
  float: right;
  margin-left: 35px;
}

.media-left figure {
  float: left;
  margin-right: 35px;
}

.system-media-block p{
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 12px;   /* space after each paragraph */
  text-align: justify;
  hyphens: auto;
}

.system-media-block figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
  font-style: italic;
  pointer-events: none;
}

/* Clears floats after each system */
.system-block::after {
  content: "";
  display: block;
  clear: both;
}

.system-media-block p:last-child {
  margin-bottom: 30px;
}



/* =====================================
   Portrait Game Video (BASE DESKTOP)
===================================== */

.system-media-block figure.video-portrait .media-inner {
  display: flex;
  align-items: center;
  justify-content: center;

  height: clamp(220px, 34vw, 300px);
  aspect-ratio: auto;
}

.system-media-block figure.video-portrait video {
  width: auto;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}



@media (max-width: 1100px) {


  .media-right figure {
    margin-left: 20px;
  }

  .media-left figure {
    margin-right: 20px;
  }

}


@media (max-width : 1300px ) and (min-width: 1151px)  /* not required in landscape mode */
{
  
  /* Play Store text */
  .playstore-text {
    font-size: clamp(0.7rem, 2vw, 1rem);
    opacity: 1;              /* always visible on mobile */
    transform: none;         /* disable slide animation */
  }

  /* Replace text visually */
  .playstore-text {
    visibility: hidden; 
    position: relative;
  }

  .playstore-text::after {
    content: attr(data-label);
    visibility: visible;
    left: 0;
    top: 0;
  }

  /* Ensure Play Store icon stays colored on mobile */
  .project-meta-icons img.playstore-icon {
    filter: none;
    height: clamp(14px, 3vw, 16px);
  }

  .project-overlay-blur {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 800px) {

.system-media-block p{
  text-align: left;
}

}

/* =====================================
   MOBILE OVERRIDE
===================================== */

@media (max-width: 650px) {

  .system-media-block figure {
    float: none;
    max-width: 100%;
    margin: 0 auto 20px;
  }

  .media-inner img {
    max-height: clamp(240px, 60vw, 400px);
  }

  /* NOW THIS WILL WORK */
  .system-media-block figure.video-portrait .media-inner {
    height: clamp(240px, 60vw, 420px);
  }

  .system-media-block {
    margin-top: 0px;
  }

  .system-media-block p {
    margin-top: 0;
  }
}

.system-media-block.no-media figure {
  display: none;
}

.system-media-block.no-media {
  overflow: visible;
}

.system-media-block.no-media p {
  width: 100%;
}

/* =========================================================
   GALLERY – UNIFIED SYSTEM
   Uses same sizing logic as image/video blocks
========================================================= */

.media-gallery {
  width: 100%;
  height: 100%;
  position: relative;
  touch-action: pan-y;
  overflow: hidden;
}

.media-gallery video,
.media-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Track */
.gallery-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
  will-change: transform;
}

/* Slides */
.gallery-track img {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}

/* =========================
   LANDSCAPE GALLERY
   (matches landscape video logic)
========================= */

.system-media-block figure.gallery-landscape .media-inner {
  aspect-ratio: 16 / 9;
}

/* =========================
   PORTRAIT GALLERY
   (matches portrait video logic exactly)
========================= */

.system-media-block figure.gallery-portrait .media-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(220px, 34vw, 300px);
}

/* Mobile override (same as portrait video) */
@media (max-width: 650px) {

  .system-media-block figure.gallery-portrait .media-inner {
    height: clamp(240px, 60vw, 420px);
  }

}

/* =========================
   CONTROLS
========================= */

.gallery-prev,
.gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 24px;
  padding: 5px 10px;
  cursor: pointer;
  z-index: 3;
  border-radius: 6px;
}

.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

/* Dots */

.gallery-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.gallery-dots span {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
}

.gallery-dots span.active {
  background: white;
}

/* Modal gallery refinement */
/* ===================================
   MODAL – GALLERY FINAL FIX
=================================== */

.media-modal-content .media-gallery {
  position: relative;
  display: inline-block;   /*  important */
  max-width: 90vw;
  max-height: 90vh;

  overflow: hidden;   /*  critical */
  margin: auto;
}

/* Track stays flex but width is controlled */
.media-modal-content .gallery-track {
  display: flex;
  transition: transform 0.4s ease;

  width: 100%;        /*  critical */
}

/* Each slide takes full gallery width */
.media-modal-content .gallery-track img {
  flex: 0 0 100%;     /*  critical */

  max-width: 90vw;
  max-height: 90vh;

  width: auto;
  height: auto;

  object-fit: contain;
}

.gallery-track img {
  transition: transform 0.25s ease;
}

/* Scale only inline galleries, NOT modal */
.media-gallery:not(.is-modal-gallery):hover 
.gallery-track img.is-active {
  transform: scale(1.05);
}

/* Portrait gameplay video inside modal */

/* Portrait gameplay video inside modal */

.media-modal-content {
  overflow: hidden;
}

.media-modal-content video.modal-video-portrait {
  display: block;
  height: min(90vh, 680px);
  width: auto;
  max-width: none;
  object-fit: cover;
  transform: none !important;
  margin: 0 auto;
}

/* VERY NARROW SCREENS (Galaxy S8+, etc.) */
/* switch from crop → scale */

@media (max-aspect-ratio: 9/16) {

  .media-modal-content video.modal-video-portrait {

    height: auto;
    width: 270vw;
    object-fit: contain;
  }
}

.modal-video-portrait {
  cursor: default;
}

/* =========================================================
   What i learned
========================================================= */

.learning-content{
  padding-top: 20px;
  font-size: 1rem;
  line-height: 1.7;
  width: 100%;
}

.learning-content p{
  margin-bottom: 12px;
}


/* =========================================================
   Final CTA
========================================================= */

.project-final-cta {
  margin-top: 20px;
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
}

.project-final-cta.empty {
  margin-bottom: 0;
}

.final-cta-card {
  width: 100%;
  padding: clamp(1.5rem, 4vw, 2rem);
  border-radius: 0 0 clamp(10px, 2vw, 15px) clamp(10px, 2vw, 15px);
  text-align: center;
}

.final-cta-text {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 2rem;
}

.final-cta-button {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 0.7rem);

  padding: clamp(0.6rem, 4vw, 0.75rem)
           clamp(1.2rem, 4vw, 1.6rem);

  border-radius: 999px;

  background: rgb(234, 234, 234);
  border: 1px solid rgba(255,255,255,1);

  color: #000;
  font-weight: 600;
  text-decoration: none;

  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}


.final-cta-button img {
  width: clamp(22px, 4vw, 30px);
}

.final-cta-card::before {
  content: "";
  display: block;

  width: clamp(70px, 10vw, 100px);
  height: 1.2px;

  margin: 0 auto 1.5rem;

  background: rgba(0, 0, 0, 0.2);
}

.final-cta-button:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 8px 22px rgba(0,0,0,0.35);
}

.project-final-cta.empty .final-cta-card {
  padding: clamp(2rem, 4vw, 4rem);
}

/* =========================================================
   RESPONSIVE
========================================================= */

/* 951px < Aspect < 1277px 

@media (max-width: 1400px) and (min-width: 1001px)
{

  #outside-anchor {
   display: grid;
  grid-template-columns: 1fr 1fr; 
  }
  

#meta-outside-anchor .project-tech {
  margin-right: 0px;
}

#meta-outside-anchor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-lg);
  margin-bottom: var(--gap-lg);
  align-items: stretch;
}

#outside-anchor > * {
  height: 100%;
}
}
*/


/* 650px < Aspect < 951px */

  @media (max-width: 1150px) {
    
    .project-detail{
    max-width:  1000px; 
    }

    .project-meta-grid {
      gap: 0px;
    }


    .project-info li.mode-only {
    display: flex;
   }

    .project-top {
      grid-template-columns: 1fr;
      gap: 0px;
    }

    .project-meta-grid{
      margin-top: 20px;
    }
    
    
  .project-overview,
  .highlight-system {
    grid-template-columns: 1fr;
  }

  .project-tech {
   margin: 0px;
   width: 100%;
  }

.project-info
{
  margin-right: 20px;
  padding-top: 10px;
}

.project-about {
  margin-right: 0px
}

 .project-info ul {
    grid-template-columns: 1fr;
    position: relative;

    margin-bottom: 5px;

  }
  
   .project-info ul::before {
    content: none; 
  }

  .project-tech {
  background: var(--card-bg);
  border-radius: var(--radius);
  width: 100%;
}

.tech-stack {
  margin-bottom: 5px;
}

#meta-outside-anchor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 20px;
  margin-bottom: var(--gap-lg);
}

.about-text,
.system-intro,
.learning-content p,
.system-media-block p,
.feature-list li,
.final-cta-text,
.final-cta-button span
{
  font-size: clamp(0.9rem, 0.85rem + 0.2vw, 1rem);
}

.project-info li,
.tech-chip 
{
  font-size: clamp(0.92rem, 0.88rem + 0.2vw, 1rem);
}

.project-about h2,
.project-info-inner h2,
.project-tech h2 {
  font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem);
}

.project-detail .section-title
{
  font-size: clamp(1.3rem, 1rem + 0.6vw, 1.5rem);
}

.system-title {
  font-size: clamp(1.2rem, 1rem + 0.6vw, 1.4rem);
}
  
.project-top-info {
    
  margin-bottom: -20px;
}

}

@media (max-width: 820px)
{
    .about-text{  
      margin-top: 0px;
}

}
/* 523px < Aspect < 650px */

@media (max-width: 640px) {

  #meta-outside-anchor {
  grid-template-columns: 1fr;
  
  }

  .project-about
  {
    margin-top: -2px;
    margin-bottom: -15px;
  }

  .project-info{
    margin: 0px;
  }
  
  .project-info li.mode-only {
    display: none;
  }

  .project-meta-grid
  {
      margin-top: 0px;
  }
    
  .project-info ul {
    grid-template-columns: 1fr 1fr;
    position: relative;

  }

   .project-info ul::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: rgba(0, 0, 0, 0.12);
  }

  .project-meta-grid {
    grid-template-columns: 1fr;
  }

.project-top-info {
    gap:15px;
}

}

@media (max-width: 510px) {

  .project-about
  {
    margin-top: -5px;
    margin-bottom: -11px;
  }

  
  .project-info ul {
    grid-template-columns: 1fr;
    position: relative;

  }
  
  .project-info ul::before {
    display: none;   /* ← KILLS the vertical divider */
    content: none;
  }
  
  .project-meta-grid {
    grid-template-columns: 1fr;
  }

  .project-meta-cta {
  margin-right: 0px;
}

.project-info li.mode-only {
    display: flex;
  }

.project-top-info {
    gap:12px;
}

}

@media (max-width: 400px)
{

  .project-breadcrumb {
    margin-bottom: 10px;
  }
}

/* for project meta black bar elements below 650px */

@media (max-width: 650px) {

  .project-meta-bar 
  {
    bottom: 0px;
    height: clamp(35px, 8vw, 45px);
    padding: 0 clamp(10px, 3vw, 20px);
    align-items: center;
    justify-content: space-between;
  }
  
  .project-detail .project-title,
  .project-meta-icons,
  .playstore-cta {
    line-height: 1;
  }

  .project-detail .project-title {
    font-size: clamp(1rem, 3.2vw, 1.35rem);
    gap: clamp(4px, 1.2vw, 6px);
    color: #1cc4b1;
  }

  .project-detail .project-title .cta-external {
    width: clamp(12px, 3vw, 15px);
    padding-top: 0px;
    opacity: 1;
  }

  .project-meta-cta {
    font-size: clamp(0.75rem, 2.6vw, 0.9rem);
    gap: clamp(5px, 1.6vw, 8px);
  }

  .project-meta-cta img {
    width: clamp(13px, 3vw, 16px);
    height: auto;
  }

  .project-meta-icons {
    gap: clamp(5px, 1.6vw, 8px);
  }

  .project-meta-icons img {
    height: clamp(14px, 3vw, 18px);
  }

  .pipe {
    font-size: clamp(0.7rem, 2.4vw, 0.9rem);
  }

  .playstore-cta {
    gap: clamp(4px, 1.4vw, 6px);
  }

  /* Play Store text */
  .playstore-text {
    font-size: clamp(0.7rem, 2.5vw, 1rem);
    opacity: 1;              /* always visible on mobile */
    transform: none;         /* disable slide animation */
  }

  /* Replace text visually */
  .playstore-text {
    visibility: hidden;
    position: relative;
  }

  .playstore-text::after {
    content: "Download";
    visibility: visible;
    left: 0;
    top: 0;
  }

  /* Ensure Play Store icon stays colored on mobile */
  .project-meta-icons img.playstore-icon {
    filter: none;
    height: clamp(14px, 3vw, 16px);
  }

  .project-overlay-blur {
    height: clamp(35px, 8vw, 45px);
    opacity: 1;
    transform: translateY(0);
  }

}

/* JS-enhanced state only */
/* JS-enhanced base state */
.js .reveal,
.js .heading-fade,
.js .content-fade {
  opacity: 0;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

/* Direction comes ONLY from reveal classes */
.js .reveal-up {
  transform: translateY(18px);
}

.js .reveal-side {
  transform: translateX(18px);
}

.js .reveal-Opp {
  transform: translateX(-18px);
}

/* When revealed */
.js .is-visible {
  opacity: 1;
  transform: none;
}

.section-title {
  letter-spacing: normal;  
}

