/* ===== RESET (lightweight) ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background: #0f1117;
  color: #e6e6e6;
  padding-top: 72px;
}

/* ===== BASE ===== */
img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== LAYOUT ===== */
/* (Removed duplicate and replaced with unified body block above) */

/* ===== HEADER ===== */

.header {
position:fixed;
top:0;
left: 0;
right: 0;
width: 100%;
z-index: 9999;

display:flex;
justify-content:space-between;
align-items:center;

padding:14px 24px;
background:#161b22;

border-bottom:1px solid rgba(255,255,255,0.06);
z-index:1000;
}

.header-left {
display:flex;
align-items:center;
gap:14px;
}

.profile-pic {
width:44px;
height:44px;
border-radius:50%;
}

.profile-text h1 {
margin:0;
font-size:16px;
}

.title {
font-size:13px;
color:#9da5b4;
margin:2px 0;
}

.exp {
font-size:11px;
color:#6e7681;
margin:0;
}

.header-right a {
margin-left:18px;
text-decoration:none;
font-size:13px;
color:#c9d1d9;
}

.header-right a:hover {
color:#58a6ff;
}

/* ===== HERO ===== */

.hero {
max-width:800px;
margin:80px auto 60px;
text-align:center;
}

.hero h2 {
font-size:28px;
margin-bottom:10px;
}

.hero p {
font-size:15px;
line-height:1.6;
color:#9da5b4;
}

/* ===== FEATURED ===== */

.featured-project {
max-width:1280px;
margin:80px auto;
padding: 0 20px;
}

.section-label {
font-size:11px;
letter-spacing:2px;
color:#8b949e;
margin-bottom:18px;
font-weight: 500;
}

.featured-container {
display:flex;
gap:40px;
align-items:center;
}

.featured-media img,
.featured-media video {
width:100%;
max-width:520px;
border-radius:10px;
display:block;
background:#0b0f18;
}

.featured-media {
width:100%;
max-width:600px;
}

.featured-media {
  overflow: hidden;
  border-radius: 10px;
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-media img,
.featured-media video {
height:100%;
object-fit:cover;
}

.featured-media.ratio-16-9 {
aspect-ratio:16/9;
}

.featured-media.ratio-1-1 {
aspect-ratio:1/1;
}

.featured-media.ratio-9-16 {
aspect-ratio:9/16;
}

.featured-media video {
object-fit:cover;
}

.featured-info {
max-width:720px;
}

.featured-info h3 {
font-size:26px;
margin-bottom:8px;
}

.featured-info p {
font-size:14px;
line-height:1.5;
margin-bottom:8px;
}

.featured-info .meta {
color:#9da5b4;
margin-bottom:16px;
font-weight: 500;
}

.featured-info ul {
  margin: 4px 0 14px;
  padding-left: 18px;
}

/* spacing polish for featured */
.featured-info .description {
  margin-bottom: 16px;
}

.featured-info strong {
  color: #e6e6e6;
  font-weight: 600;
}

/* ===== PROJECTS ===== */

.projects {
max-width:1000px;
margin:80px auto;
}

.projects h2 {
text-align:center;
font-size:26px;
margin-bottom:50px;
}

.project-table {
width:100%;
border-collapse:collapse;
table-layout:fixed;
}

.project-content-col {
width:520px;
}

.project-gap-col {
width:10px;
}

.project-media-col {
width:420px;
}

.project td {
vertical-align:top;
padding:0 0 40px;
border-bottom:1px solid rgba(255,255,255,0.06);
}

.project + .project td {
padding-top:80px;
}

.project:last-child td {
border-bottom:none;
}

.project-gap-cell {
padding-left:0;
padding-right:0;
}

.project-info-cell {
text-align:right;
}

.project-media-cell {
text-align:right;
}

.project-media-cell-left {
text-align:left;
}

/* IMAGE */

.project-media img,
.project-media video {
width:auto;
max-width:100%;
height:clamp(190px, 30vw, 260px);
object-fit:contain;
border-radius:8px;
display:block;
background:#0b0f18;
}

.project-media {
display:inline-block;
width:auto;
max-width:420px;
overflow:visible;
}

/* TEXT */

.project-info {
display:inline-block;
width:100%;
max-width:520px;
text-align:left;
}

.project-info h3 {
font-size:20px;
margin-bottom:6px;
}

.project-info p {
font-size:13px;
line-height:1.4;
margin-bottom:6px;
}

/* spacing polish for selected projects */
.project-info strong {
  font-weight: 600;
}

.project-info ul {
  margin: 6px 0 16px 18px;
  padding: 0;
}

.project-info li {
font-size:13px;
line-height:1.4;
margin-bottom:3px;
}

.meta {
font-size:12px;
color:#9da5b4;
letter-spacing: 0.2px;
margin-bottom:14px;
font-weight: 500;
}

@media (max-width: 980px) {
.header {
padding:14px 20px;
}

.header-right a {
margin-left:12px;
}

.hero,
.featured-project,
.projects {
margin:80px 20px;
}

.featured-container {
flex-direction:column;
gap:24px;
}

.project-table,
.project-table tbody,
.project,
.project td {
display:block;
width:100%;
}

.featured-media,
.landing-project-media,
.project-media,
.featured-info,
.project-info {
max-width:100%;
}

.project td {
padding:0;
border-bottom:none;
text-align:center;
}

.project + .project td:first-child {
padding-top:80px;
}

.project-info-cell,
.project-media-cell,
.project-media-cell-left {
text-align:center;
}

.project-gap-cell {
display:none;
}

.project-info {
text-align:left;
}
}

/* ===== FEATURED CARD UPGRADE ===== */

.featured-container {
  background: #161b22;
  border-radius: 16px;
  padding: 32px 36px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  gap: 40px;
  align-items: stretch;
}

/* Image side */
.featured-media {
  flex: 1.2;
  max-width: 560px;
  min-height: 0;
  aspect-ratio: auto;
  align-self: stretch;
}

/* Content side */
.featured-info {
  flex: 1.5;
  max-width: 720px;
}

/* Meta text */
.featured-info .meta {
  font-size: 12px;
  color: #9da5b4;
  margin-bottom: 8px;
  font-weight: 500;
}

/* Title */
.featured-info h3 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 10px;
}

/* Role highlight (shared across all projects) */
.role {
  color: #3fb950; /* green accent */
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

/* Description */


.featured-info p:not(.description):not(.role) {
  color: #9da5b4;
  font-size: 14px;
  line-height: 1.6;
}

/* make section titles (Contribution / Impact) stand out in featured */
.featured-info strong {
  color: #e6e6e6;
  font-weight: 600;
}

/* ensure description keeps its intended color in featured */
.featured-info .description {
  color: #c9d1d9;
}

/* Bullet list */
.featured-info ul {
  margin: 14px 0;
  padding-left: 18px;
}

.featured-info li {
  font-size: 13px;
  color: #c9d1d9;
  margin-bottom: 6px;
}

/* CTA button (shared across all projects) */
.cta {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 18px;
  background: #2ea043;
  color: white;
  font-size: 13px;
  border-radius: 6px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta:hover {
  background: #3fb950;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(46,160,67,0.25);
}


/* ===== PROJECT CARDS (MATCH FEATURED) ===== */

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.project-card {
  background: #161b22;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.95fr);
  gap: 32px;
  align-items: stretch;
}

/* auto alternate layout (fixed) */
.projects-list > .project-card:nth-of-type(even) .project-row {
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1fr);
}

.projects-list > .project-card:nth-of-type(even) .project-info {
  order: 2;
}

.projects-list > .project-card:nth-of-type(even) .landing-project-media {
  order: 1;
}

.landing-project-media {
  width: 100%;
  min-height: 0;
  max-width: 520px;
  justify-self: center;
  border-radius: 12px;
  overflow: hidden;
  background: #0b0f18;
}

.landing-project-media.ratio-16-9 {
  aspect-ratio: 16 / 9;
}

.landing-project-media.ratio-1-1 {
  aspect-ratio: 1 / 1;
}

.landing-project-media.ratio-9-16 {
  aspect-ratio: 9 / 16;
}

.landing-project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.landing-project-media.fit-contain img {
  object-fit: contain;
}

.project-info {
  max-width: 600px;
}

/* mobile */
@media (max-width: 980px) {
  .project-row {
    grid-template-columns: 1fr;
  }

  .featured-media {
    width: min(100%, 520px);
    max-width: 100%;
    aspect-ratio: 1 / 1;
    align-self: auto;
    margin: 0 auto;
    flex: none;
  }

  .projects-list > .project-card:nth-of-type(even) .project-row {
    grid-template-columns: 1fr;
  }

  .projects-list > .project-card .project-info {
    order: 2;
  }

  .projects-list > .project-card .landing-project-media {
    order: 1;
  }

  .projects-list > .project-card:nth-of-type(even) .project-info {
    order: 2;
  }

  .projects-list > .project-card:nth-of-type(even) .landing-project-media {
    order: 1;
  }

  .landing-project-media {
    max-width: 100%;
  }
}

/* ===== GAME DESCRIPTION ===== */
.description {
  color: #c9d1d9;
  font-size: 14.5px;
  line-height: 1.65;
  margin-bottom: 14px;
  max-width: 520px;
}

/* ===== HOVER IMAGE SWAP (ICON -> SCREENSHOT) ===== */

.media-stack {
  position: relative;
  width: 100%;
  height: 100%;
}

.media-stack img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}

/* default state */
.media-stack img.primary {
  opacity: 1;
}

/* simple 2-image hover (fallback) */
.project-card:hover .media-stack:not(.three) img.primary {
  animation: none;
  opacity: 0;
}

.project-card:hover .media-stack:not(.three) img.secondary {
  animation: none;
  opacity: 1;
}

/* ===== 3 IMAGE SEQUENCE (NO LOOP) ===== */


/* ===== HOVER IMAGE SWAP FOR FEATURED ===== */

/* featured supports both 2 and 3 image mode */
/* ONLY apply simple swap when NOT using 3-image mode */
.featured-container:hover .media-stack:not(.three) img.primary {
  opacity: 0;
}

.featured-container:hover .media-stack:not(.three) img.secondary {
  opacity: 1;
}


/* smooth reset when hover ends */
.media-stack img.primary {
  transition: opacity 0.8s ease;
}




/* (optional) if you prefer only hovering the image to trigger swap, uncomment below and remove the two rules above) */
/*
.featured-media:hover .media-stack img.primary {
  opacity: 0;
}

.featured-media:hover .media-stack img.secondary {
  opacity: 1;
}
*/

/* ===== FOOTER ===== */

.footer {
  margin-top: 80px;
  padding: 60px 20px 40px;
  background: #0d1117;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
}

.footer-title {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 16px;
}

.footer-links a {
  font-size: 14px;
  color: #c9d1d9;
}

.footer-links a:hover {
  color: #58a6ff;
}

.footer-copy {
  font-size: 12px;
  color: #6e7681;
}

/* mobile */
@media (max-width: 768px) {
  .footer-title {
    font-size: 22px;
  }

  .footer-links {
    flex-direction: column;
    gap: 12px;
  }
}
/* ===== FIX STRONG WRAPPING ISSUE ===== */
strong {
  display: inline;
  word-break: normal;
  overflow-wrap: break-word;
}
/* ===== 3 IMAGE SEQUENCE (TRANSITION-ONLY, NO SNAP) ===== */

/* ensure all images transition */
.media-stack.three img {
  transition: opacity 0.8s ease;
}

/* default state */
.media-stack.three img.primary { opacity: 1; }
.media-stack.three img.secondary { opacity: 0; }
.media-stack.three img.tertiary { opacity: 0; }

/* support both project cards AND featured */
.media-stack.three:hover img.primary,
.featured-container:hover .media-stack.three img.primary {
  opacity: 0;
  transition-delay: 0.25s;
}

.media-stack.three:hover img.secondary,
.featured-container:hover .media-stack.three img.secondary {
  opacity: 1;
  transition-delay: 0.25s;
}


.media-stack.three:hover img.tertiary,
.featured-container:hover .media-stack.three img.tertiary {
  opacity: 1;
  transition-delay: 3s;
}

/* ===== 4 IMAGE SEQUENCE ===== */

.media-stack.four img {
  transition: opacity 0.8s ease;
}

.media-stack.four img.primary { opacity: 1; }
.media-stack.four img.secondary { opacity: 0; }
.media-stack.four img.tertiary { opacity: 0; }
.media-stack.four img.quaternary { opacity: 0; }

.media-stack.four:hover img.primary,
.featured-container:hover .media-stack.four img.primary {
  opacity: 0;
  transition-delay: 0.25s;
}

.media-stack.four:hover img.secondary,
.featured-container:hover .media-stack.four img.secondary {
  opacity: 1;
  transition-delay: 0.25s;
}

.media-stack.four:hover img.tertiary,
.featured-container:hover .media-stack.four img.tertiary {
  opacity: 1;
  transition-delay: 3s;
}

.media-stack.four:hover img.quaternary,
.featured-container:hover .media-stack.four img.quaternary {
  opacity: 1;
  transition-delay: 5.5s;
}

/* ===== 5 IMAGE SEQUENCE ===== */

.media-stack.five img {
  transition: opacity 0.8s ease;
}

.media-stack.five img.primary { opacity: 1; }
.media-stack.five img.secondary { opacity: 0; }
.media-stack.five img.tertiary { opacity: 0; }
.media-stack.five img.quaternary { opacity: 0; }
.media-stack.five img.quinary { opacity: 0; }

.media-stack.five:hover img.primary,
.featured-container:hover .media-stack.five img.primary {
  opacity: 0;
  transition-delay: 0.25s;
}

.media-stack.five:hover img.secondary,
.featured-container:hover .media-stack.five img.secondary {
  opacity: 1;
  transition-delay: 0.25s;
}

.media-stack.five:hover img.tertiary,
.featured-container:hover .media-stack.five img.tertiary {
  opacity: 1;
  transition-delay: 3s;
}

.media-stack.five:hover img.quaternary,
.featured-container:hover .media-stack.five img.quaternary {
  opacity: 1;
  transition-delay: 5.5s;
}

.media-stack.five:hover img.quinary,
.featured-container:hover .media-stack.five img.quinary {
  opacity: 1;
  transition-delay: 8s;
}

/* ===== 6 IMAGE SEQUENCE ===== */

.media-stack.six img {
  transition: opacity 0.8s ease;
}

.media-stack.six img.primary { opacity: 1; }
.media-stack.six img.secondary { opacity: 0; }
.media-stack.six img.tertiary { opacity: 0; }
.media-stack.six img.quaternary { opacity: 0; }
.media-stack.six img.quinary { opacity: 0; }
.media-stack.six img.senary { opacity: 0; }

.media-stack.six:hover img.primary,
.featured-container:hover .media-stack.six img.primary {
  opacity: 0;
  transition-delay: 0.25s;
}

.media-stack.six:hover img.secondary,
.featured-container:hover .media-stack.six img.secondary {
  opacity: 1;
  transition-delay: 0.25s;
}

.media-stack.six:hover img.tertiary,
.featured-container:hover .media-stack.six img.tertiary {
  opacity: 1;
  transition-delay: 3s;
}

.media-stack.six:hover img.quaternary,
.featured-container:hover .media-stack.six img.quaternary {
  opacity: 1;
  transition-delay: 5.5s;
}

.media-stack.six:hover img.quinary,
.featured-container:hover .media-stack.six img.quinary {
  opacity: 1;
  transition-delay: 8s;
}

.media-stack.six:hover img.senary,
.featured-container:hover .media-stack.six img.senary {
  opacity: 1;
  transition-delay: 10.5s;
}

/* ===== PROJECT DETAIL PAGE ===== */

.project-detail-page {
  background: #0f1117;
}

.project-detail-page main {
  overflow: hidden;
}

.project-detail-hero {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.project-detail-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(15,17,23,0), #0f1117 82%);
}

.project-detail-hero-bg {
  position: absolute;
  inset: -18px;
  z-index: -2;
  width: calc(100% );
  height: calc(100%);
  max-width: none;
  object-fit: cover;
  filter: blur(2px) brightness(.30);
  transform: scale(0.98);
  animation: hero-soft-zoom 9s ease-out forwards;
}

.project-detail-hero-content {
  width: min(840px, calc(100% - 40px));
  padding: 80px 20px 96px;
}

.project-detail-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.95;
  letter-spacing: 0;
}

.project-detail-kicker {
  margin: 0 auto 16px;
  color: #3fb950;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.project-detail-lede {
  max-width: 720px;
  margin: 0 auto;
  color: #d8dee9;
  font-size: 17px;
  line-height: 1.65;
}

.project-detail-summary,
.case-study-sections,
.project-detail-impact {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.project-detail-summary {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 40px;
  align-items: center;
  padding: 72px 0 56px;
}

.project-detail-summary h2,
.case-copy h2,
.project-detail-impact h2 {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.18;
}

.project-detail-summary p,
.project-detail-impact p {
  color: #c9d1d9;
  font-size: 15px;
  line-height: 1.7;
}

.project-detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.project-detail-stats span {
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  background: rgba(22,27,34,0.72);
  color: #d8dee9;
  font-size: 12px;
  font-weight: 600;
}

.project-detail-montage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  aspect-ratio: 26 / 9;
}

.project-detail-montage img,
.case-media img,
.case-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(var(--media-dim, 1));
}



.project-detail-montage  {
  grid-row: 1 / span 2;
}

.case-study-sections {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 16px 0 64px;
}

.case-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(320px, 1.08fr);
  gap: 28px;
  align-items: stretch;
  min-height: 0;
  padding: 24px;
  background: #161b22;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.36);
}

.case-section-reverse {
  grid-template-columns: minmax(320px, 1.08fr) minmax(280px, 0.92fr);
}

.case-section-reverse .case-media {
  order: 2;
}

.case-media {
  min-height: var(--case-media-height, 0);
  aspect-ratio: auto;
  align-self: stretch;
  overflow: hidden;
  border-radius: 12px;
  background: #0b0f18;
}

.case-copy {
  align-self: start;
  padding: 12px 6px 8px;
}

.case-copy h3 {
  margin: 18px 0 6px;
  color: #e6e6e6;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
}

.case-copy ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.case-copy li {
  margin-bottom: 8px;
  color: #c9d1d9;
  font-size: 14px;
  line-height: 1.55;
}

.project-detail-impact {
  padding: 36px 0 10px;
  text-align: center;
}

.project-detail-impact p {
  max-width: 760px;
  margin: 0 auto;
}

.project-detail-impact .cta {
  margin-top: 28px;
}

.impact-carousel {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 18px;
  align-items: center;
  max-width: 940px;
  margin: 0 auto;
}

.impact-slides {
  position: relative;
  min-height: 146px;
}

.impact-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.99);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.impact-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.impact-arrow {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  background: rgba(22,27,34,0.82);
  color: #d8dee9;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.impact-arrow:hover,
.impact-arrow:focus-visible {
  color: #3fb950;
  border-color: rgba(63,185,80,0.65);
  transform: translateY(-1px);
  outline: none;
}

.impact-arrow.is-hidden {
  display: none;
}

.impact-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-height: 8px;
  margin-top: 18px;
}

.impact-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  transition: width 0.18s ease, background 0.18s ease;
}

.impact-dot.is-active {
  width: 18px;
  background: #3fb950;
}

/* ===== PROJECT EXPERIENCE ===== */

.project-experience {
  width: min(940px, calc(100% - 40px));
  margin: 8px auto 22px;
  padding: 44px 24px;
  text-align: center;
  background: #161b22;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.28);
}

.project-experience h2 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.18;
}

.project-experience p {
  max-width: 720px;
  margin: 0 auto;
  color: #c9d1d9;
  font-size: 15px;
  line-height: 1.7;
}

.platform-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 26px;
}

.platform-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 154px;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: #0f1117;
  color: #e6e6e6;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.platform-link:hover,
.platform-link:focus-visible {
  border-color: rgba(63,185,80,0.65);
  background: #111720;
  transform: translateY(-1px);
  text-decoration: none;
  outline: none;
}

.platform-link img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.footage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), max-content));
  gap: 14px;
  justify-content: center;
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.45s ease, margin-top 0.25s ease, opacity 0.35s ease;
}

.footage-grid.is-loaded {
  max-height: 1200px;
  margin-top: 28px;
  opacity: 1;
}

.footage-grid img {
  width: auto;
  max-width: min(100%, var(--footage-max-width, 520px));
  max-height: var(--footage-max-height, 620px);
  aspect-ratio: var(--footage-ratio, 16 / 9);
  object-fit: cover;
  border-radius: 12px;
  background: #0b0f18;
}

.game-modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(3,6,10,0.78);
  backdrop-filter: blur(8px);
}

.game-modal.is-open {
  display: grid;
}

.game-modal-panel {
  position: relative;
  width: min(var(--playable-max-width, 1100px), 100%);
  aspect-ratio: var(--playable-ratio, 16 / 9);
  max-height: calc(100vh - 96px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  background: #0b0f18;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

.game-modal-panel iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 14px;
}

.game-modal-close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 50%;
  background: #161b22;
  color: #e6e6e6;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.game-modal-close:hover,
.game-modal-close:focus-visible {
  color: #3fb950;
  outline: none;
}

.game-modal-link {
  position: absolute;
  left: 0;
  bottom: -34px;
  color: #c9d1d9;
  font-size: 13px;
}

.game-modal-link:hover {
  color: #58a6ff;
}

body.has-game-modal {
  overflow: hidden;
}

.reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.58s ease, transform 0.58s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes hero-soft-zoom {
  from {
    transform: scale(1.02);
  }

  to {
    transform: scale(1.07);
  }
}

@media (max-width: 980px) {
  .project-detail-summary,
  .case-section,
  .case-section-reverse {
    grid-template-columns: 1fr;
  }

  .case-section-reverse .case-media {
    order: 0;
  }

  .project-detail-summary {
    padding-top: 52px;
  }

  .case-media {
    min-height: 220px;
  }
}

@media (max-width: 640px) {
  .project-detail-hero {
    min-height: 360px;
  }

  .project-detail-hero-content {
    padding: 64px 0 84px;
  }

  .project-detail-lede {
    font-size: 15px;
  }

  .project-detail-summary,
  .case-study-sections,
  .project-detail-impact,
  .project-experience {
    width: min(100% - 28px, 1120px);
  }

  .project-detail-montage {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    aspect-ratio: auto;
  }

  .project-detail-montage img {
    aspect-ratio: 16 / 10;
  }

  .project-detail-montage img:first-child {
    grid-row: auto;
  }

  .case-section {
    padding: 18px;
  }

  .case-copy {
    padding: 4px 0 2px;
  }

  .impact-carousel {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .impact-arrow {
    width: 36px;
    height: 36px;
    font-size: 24px;
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
  }

  .impact-slides {
    min-height: 0;
    padding: 0 44px;
  }

  .impact-slide {
    position: static;
    display: none;
    transform: none;
  }

  .impact-slide.is-active {
    display: flex;
  }

  .impact-arrow-prev {
    left: 0;
  }

  .impact-arrow-next {
    right: 0;
  }

  .project-detail-impact h2 {
    font-size: clamp(30px, 8vw, 42px);
  }

  .project-detail-impact p {
    font-size: 20px;
    line-height: 1.7;
  }

  .project-experience {
    padding: 34px 18px;
  }

  .platform-link {
    width: 100%;
    justify-content: center;
  }

  .game-modal {
    padding: 16px;
  }

  .game-modal-panel {
    max-height: calc(100vh - 120px);
  }

  .game-modal-close {
    top: -14px;
    right: -10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-detail-hero-bg {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ===== CAPABILITIES ===== */

.capabilities-section {
  max-width: 1200px;
  margin: 100px auto 40px;
  padding: 0 24px;
}

.capabilities-inner {
  text-align: center;
}

.capability-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 260px));
  gap: 34px 54px;
  align-items: start;
  justify-content: center;
  margin-top: 52px;
}

.capability-node {
  width: 100%;
  max-width: 260px;
  padding: 26px 22px;
  border-radius: 18px;
  background: rgba(22,27,34,0.72);
  border: 1px solid rgba(255,255,255,0.05);
  backdrop-filter: blur(6px);

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
}

.capability-node:hover {
  transform: translateY(-4px);
  border-color: rgba(63,185,80,0.24);
  background: rgba(22,27,34,0.92);
}

.capability-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 999px;

  display: grid;
  place-items: center;

  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);

  font-size: 30px;
}

.capability-node h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: #f0f6fc;
}

.capability-node p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #9da5b4;
}

.capability-offset-top {
  transform: translateY(10px);
}

.capability-offset-mid {
  transform: translateY(12px);
}

.capability-offset-low {
  transform: translateY(12px);
}


@media (max-width: 980px) {
  .capability-layout {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 28px;
  }

  .capability-offset-top,
  .capability-offset-mid,
  .capability-offset-low {
    transform: none;
  }

  .capability-offset-top:hover,
  .capability-offset-mid:hover,
  .capability-offset-low:hover {
    transform: translateY(-4px);
  }
}

@media (max-width: 640px) {
  .capabilities-section {
    margin-top: 80px;
  }

  .capability-layout {
    grid-template-columns: 1fr;
  }

  .capability-node {
    max-width: 100%;
  }
}

.project-detail-video-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.project-detail-video h2 {
  margin: 0;
  text-align: center;
  font-size: 34px;
  line-height: 1.15;
}

.project-video-frame {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0b0f18;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.32);
}

.project-video-frame::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}

.project-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.project-detail-video {
  padding: 26px 0 34px;
}