/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

/* =============================================
   CUSTOM PROPERTIES — DARK (DEFAULT)
   ============================================= */
:root {
  --nav-h:        60px;
  --bg:           #1c1c1c;
  --bg-hero:      #181818;
  --bg-surface:   #232323;
  --bg-alt:       #2a2a2a;
  --text-heading: #ffffff;
  --text-body:    #b8b8b8;
  --text-muted:   #666;
  --accent:       #F26B21;
  --accent-hover: #d95e1a;
  --border:       rgba(255, 255, 255, 0.09);
  --nav-bg:       rgba(28, 28, 28, 0.88);
  --shadow:       0 4px 32px rgba(0, 0, 0, 0.45);
  --photo-bg:     #2d2d2d;
  --img-bg:       #252525;
  --img-bg-blue:  #1e1e2e;
  --img-bg-warm:  #261e16;

  --font-head: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  --ease: 240ms ease;
  --ease-theme: color 240ms ease, background-color 240ms ease,
                border-color 240ms ease, box-shadow 240ms ease,
                opacity 240ms ease;
}

[data-theme="light"] {
  --bg:           #f7f7f5;
  --bg-hero:      #d3d3d1;
  --bg-surface:   #ffffff;
  --bg-alt:       #eeeeec;
  --text-heading: #1a1a1a;
  --text-body:    #555;
  --text-muted:   #999;
  --accent:       #F26B21;
  --accent-hover: #d95e1a;
  --border:       rgba(0, 0, 0, 0.09);
  --nav-bg:       rgba(247, 247, 245, 0.88);
  --shadow:       0 4px 32px rgba(0, 0, 0, 0.1);
  --photo-bg:     #ddd;
  --img-bg:       #e8e8e8;
  --img-bg-blue:  #e4e4f0;
  --img-bg-warm:  #f0ebe4;
}

/* =============================================
   BODY & TYPOGRAPHY
   ============================================= */
body {
  background-color: var(--bg);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  transition: var(--ease-theme);
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  color: var(--text-heading);
  line-height: 1.2;
}

h2 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.65rem); font-weight: 600; }
h4 { font-size: 0.85rem; }

p { color: var(--text-body); }

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

img { max-width: 100%; height: auto; display: block; }

/* =============================================
   LAYOUT
   ============================================= */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 2rem;
}

section { padding: 6rem 0; }

.accent { color: var(--accent); }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.65em 1.65em;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 500;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--ease), color var(--ease),
              border-color var(--ease), transform var(--ease),
              box-shadow var(--ease);
}

.btn--filled {
  background-color: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn--filled:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(242, 107, 33, 0.32);
}

.btn--outline {
  background: transparent;
  color: var(--text-heading);
  border-color: var(--border);
}
.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* =============================================
   PHOTO CIRCLE (about section only)
   ============================================= */
.photo-circle {
  border-radius: 50%;
  overflow: hidden;
  background-color: var(--photo-bg);
  aspect-ratio: 1 / 1;
  transition: var(--ease-theme);
  position: relative;
}

.photo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
}

.photo-circle--md { width: 260px; max-width: 100%; }

/* =============================================
   NAV
   ============================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 2.5rem;
  background-color: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: var(--ease-theme);
}

.nav__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  opacity: 1;
  transition: opacity var(--ease);
}
.nav__logo:hover { opacity: 0.75; }

.nav__logo-img {
  height: 32px !important;
  width: auto;
  display: block;
  object-fit: contain;
}
[data-theme="dark"]  .nav__logo-img { filter: invert(1) brightness(1.4); }
[data-theme="light"] .nav__logo-img { filter: none; }

.nav__links {
  display: flex;
  gap: 2.25rem;
}

.nav__link {
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-body);
  position: relative;
  transition: color var(--ease);
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width var(--ease);
}
.nav__link:hover,
.nav__link.active { color: var(--accent); }
.nav__link:hover::after,
.nav__link.active::after { width: 100%; }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text-heading);
  transition: border-color var(--ease), color var(--ease);
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

[data-theme="dark"]  .icon-moon { display: none; }
[data-theme="dark"]  .icon-sun  { display: block; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 22px; height: 2px;
  background-color: var(--text-heading);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}
.nav__hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav__hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-h);
  background-color: var(--bg-hero);
  overflow: hidden;
}

.hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  width: 100%;
  padding-bottom: 5rem;
}

.hero__text {
  flex: 1 1 0;
  min-width: 0;
}

.hero__photo {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
}

.hero__photo-img {
  width: clamp(220px, 32vw, 480px);
  height: auto;
  display: block;
  filter: grayscale(100%);
  border-radius: 0.75rem;
  object-fit: cover;
}

.hero__greeting {
  font-family: var(--font-head);
  font-size: clamp(0.8rem, 1vw, 0.95rem);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5rem;
}

.hero__name {
  font-size: clamp(3rem, 6.5vw, 7rem);
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 1.25rem;
}

.hero__role {
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 2vw, 1.75rem);
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 2.5rem;
  min-height: 1.8em;
}

.hero__role .typewriter-wrap {
  display: inline;
}

.hero__role .typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background-color: var(--accent);
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: blink 0.75s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero__ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Curved bottom edge */
.hero__curve {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  line-height: 0;
  pointer-events: none;
}

.hero__curve svg {
  display: block;
  width: 100%;
  height: clamp(48px, 6vw, 96px);
}

/* =============================================
   SECTION HEADER
   ============================================= */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-sub {
  font-size: 0.975rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
}

/* =============================================
   PROJECTS
   ============================================= */
.projects { background-color: var(--bg-surface); }

.project-row {
  display: flex;
  align-items: center;
  gap: 5rem;
  margin-bottom: 5.5rem;
}
.project-row:last-child { margin-bottom: 0; }
.project-row--reverse { flex-direction: row-reverse; }

.project-row__media { flex: 1; min-width: 0; }

.project-row__img-wrap {
  border-radius: 1rem;
  overflow: hidden;
  background-color: var(--img-bg);
  aspect-ratio: 3 / 2;
  transition: var(--ease-theme);
}
.project-row__img-wrap--blue  { background-color: var(--img-bg-blue); }
.project-row__img-wrap--warm  { background-color: var(--img-bg-warm); }
.project-row__img-wrap--pink  { background-color: #f2bcbc; }

.project-row__img-wrap .img--contained {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.project-row__img-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 400ms ease;
}
.project-row__img-wrap:hover img { transform: scale(1.04); }

.project-row__body { flex: 1; min-width: 0; }

.project-row__year {
  display: block;
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.project-row__body h3 { margin-bottom: 0.85rem; }
.project-row__body p  { font-size: 0.95rem; margin-bottom: 1.5rem; }

/* Project categories */
.projects-category {
  margin-bottom: 5rem;
}
.projects-category:last-child { margin-bottom: 0; }

.projects-category__label {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* =============================================
   ABOUT
   ============================================= */
.about { background-color: var(--bg-hero); }

.about__inner {
  display: flex;
  align-items: center;
  gap: 5rem;
}

.about__photo { flex-shrink: 0; }

.about__photo-img {
  width: 260px;
  max-width: 100%;
  height: auto;
  display: block;
}

.about__text h2  { margin-bottom: 1.25rem; }
.about__text p   { font-size: 0.95rem; margin-bottom: 1rem; }
.about__text p:last-of-type { margin-bottom: 0; }

.skills { margin-top: 2rem; }
.skills h4 {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.skills__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.skill-chip {
  display: inline-block;
  padding: 0.3em 0.85em;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-heading);
  background-color: var(--bg-alt);
  border: 1px solid var(--border);
  transition: border-color var(--ease), color var(--ease), background-color var(--ease);
  cursor: default;
}
.skill-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* =============================================
   CONTACT & FOOTER
   ============================================= */
.contact {
  background-color: var(--bg-surface);
  padding-bottom: 0;
}

.contact__inner {
  text-align: center;
  padding-bottom: 4rem;
}
.contact__inner h2 { margin-bottom: 2.5rem; }

.contact__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.5rem;
}
.contact__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-body);
  transition: color var(--ease);
}
.contact__link svg { flex-shrink: 0; }
.contact__link:hover { color: var(--accent); }

.footer {
  text-align: center;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-head);
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: var(--ease-theme);
}

/* =============================================
   SCROLL REVEAL
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal--delay  { transition-delay: 160ms; }
.reveal--delay2 { transition-delay: 280ms; }
.reveal.is-visible { opacity: 1; transform: none; }

/* =============================================
   CASE STUDY PAGES
   ============================================= */
.page {
  padding-top: var(--nav-h);
  min-height: 100vh;
  background-color: var(--bg);
}

.breadcrumb {
  padding: 2rem 0 0;
  font-family: var(--font-head);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.breadcrumb a {
  color: var(--text-muted);
  transition: color var(--ease);
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 0.4em; }

.case-hero {
  padding: 3rem 0 4rem;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.case-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
}
.case-hero__date {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.case-section { margin-bottom: 3.5rem; }

.case-section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-heading);
}

.case-section p {
  font-size: 0.975rem;
  margin-bottom: 0.85rem;
}

.case-section ul,
.case-section ol {
  padding-left: 1.4rem;
  margin-top: 0.5rem;
}
.case-section li {
  font-size: 0.975rem;
  color: var(--text-body);
  margin-bottom: 0.4rem;
  line-height: 1.65;
}

.case-img {
  width: 100%;
  border-radius: 0.75rem;
  background-color: var(--img-bg);
  overflow: hidden;
  margin: 1.75rem 0;
  border: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
  transition: var(--ease-theme);
}
.case-img img {
  width: 100%;
  height: auto;
  display: block;
}

.process-step {
  border-left: 2px solid var(--border);
  padding-left: 1.5rem;
  margin-bottom: 2rem;
  transition: border-color var(--ease);
}
.process-step:hover { border-color: var(--accent); }
.process-step h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-heading);
}

.tag {
  display: inline-block;
  padding: 0.25em 0.75em;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  background-color: rgba(242, 107, 33, 0.15);
  color: var(--accent);
  border: 1px solid rgba(242, 107, 33, 0.25);
  margin-bottom: 1rem;
}

.case-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  gap: 1rem;
  flex-wrap: wrap;
}

/* =============================================
   RESPONSIVE — TABLET (≤ 880px)
   ============================================= */
@media (max-width: 880px) {
  /* Nav — smaller bar on tablet/mobile */
  :root { --nav-h: 52px; }
  .nav { padding: 0 1.25rem; }

  /* Overlay — solid background starting below the nav bar */
  .nav__links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0; bottom: 0;
    background-color: var(--bg);
    border-top: 1px solid var(--border);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 999;
  }
  .nav__links.is-open { display: flex; }
  .nav__link {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-heading);
  }
  .nav__link::after { bottom: -6px; }
  .nav__hamburger { display: flex; }

  /* Hero — anchor to top on tablet/mobile so nav never covers content */
  .hero {
    justify-content: flex-start;
  }
  .hero__inner {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    padding-top: 2.5rem;
    padding-bottom: 5rem;
    gap: 2rem;
  }
  .hero__ctas { justify-content: center; }
  .hero__photo-img { width: clamp(180px, 55vw, 300px); }

  .project-row,
  .project-row--reverse { flex-direction: column; gap: 2.5rem; }

  .about__inner { flex-direction: column; text-align: center; gap: 2.5rem; }
  .skills__list { justify-content: center; }
}

/* =============================================
   RESPONSIVE — MOBILE (≤ 540px)
   ============================================= */
@media (max-width: 540px) {
  section { padding: 4rem 0; }
  .container { padding: 0 1.25rem; }

  .hero { min-height: 100svh; }
  .hero__name { font-size: clamp(2.6rem, 11vw, 4rem); }
  .hero__photo-img { width: 70vw; }
  .contact__links { gap: 1.5rem; }
}

/* =============================================
   CASE STUDY — GALLERY & PHONE SCREENS
   ============================================= */

/* Full-bleed image with caption */
.case-img figcaption {
  margin-top: 0.6rem;
  font-family: var(--font-head);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* Side-by-side image pair */
.img-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1.75rem 0;
}
.img-pair .case-img { margin: 0; }

/* Three-column grid */
.img-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 1.75rem 0;
}
.img-trio .case-img { margin: 0; }

/* Phone screenshot strip — natural height, no crop */
.phone-strip {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin: 1.75rem 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.phone-strip::-webkit-scrollbar { height: 4px; }
.phone-strip::-webkit-scrollbar-track { background: var(--border); }
.phone-strip::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

.phone-frame {
  flex: 0 0 auto;
  width: 220px;
  scroll-snap-align: start;
  background: var(--bg-alt);
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--ease-theme);
}
.phone-frame img {
  width: 100%;
  height: auto;
  display: block;
}
.phone-frame figcaption {
  padding: 0.5rem 0.75rem;
  font-family: var(--font-head);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
}

/* Game asset showcase */
.game-showcase {
  margin-bottom: 3.5rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--border);
}
.game-showcase:last-of-type { border-bottom: none; margin-bottom: 0; }

.game-showcase h3 {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  color: var(--text-heading);
}

.game-showcase__caption {
  font-family: var(--font-head);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-align: center;
}

.game-showcase__format-label {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.4rem;
}

.game-showcase__wide {
  width: 100%;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 1rem;
  background: var(--img-bg);
}
.game-showcase__wide img {
  width: 100%;
  height: auto;
  display: block;
}

.game-showcase__formats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.game-showcase__poster {
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--img-bg);
}
.game-showcase__poster img { width: 100%; height: auto; display: block; }

.game-showcase__square {
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--img-bg);
  aspect-ratio: 1 / 1;
}
.game-showcase__square img { width: 100%; height: 100%; object-fit: cover; }

/* Animated SVG embed */
.anim-embed {
  width: 100%;
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--img-bg);
  margin: 1rem 0;
}
.anim-embed object,
.anim-embed img {
  width: 100%;
  height: auto;
  display: block;
}

/* Dashboard screenshot (white bg, needs padding in dark mode) */
.case-img--doc {
  background: #ffffff;
  padding: 1.5rem;
}
[data-theme="dark"] .case-img--doc { background: #f0f0f0; }

/* Stat callout row */
.stat-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}
.stat-box {
  flex: 1;
  min-width: 130px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  transition: var(--ease-theme);
}
.stat-box__value {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.stat-box__label {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

/* Side-by-side video grids */
.video-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 1.75rem 0;
}

.video-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 1.75rem 0;
}

@media (max-width: 600px) {
  .video-pair, .video-trio { grid-template-columns: 1fr; }
}

/* In-page project section divider */
.project-section {
  margin: 4rem 0 2rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.project-section__label {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.project-section__title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0;
}

/* Image carousel */
.img-carousel {
  margin: 1.75rem 0;
  position: relative;
}

.img-carousel__track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.75rem;
  cursor: grab;
}
.img-carousel__track:active { cursor: grabbing; }
.img-carousel__track::-webkit-scrollbar { height: 4px; }
.img-carousel__track::-webkit-scrollbar-track { background: var(--border); border-radius: 4px; }
.img-carousel__track::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

.img-carousel__item {
  flex: 0 0 85%;
  scroll-snap-align: start;
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--img-bg);
  transition: var(--ease-theme);
}
.img-carousel__item img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 600px) {
  .img-pair  { grid-template-columns: 1fr; }
  .img-trio  { grid-template-columns: 1fr 1fr; }
  .phone-frame { width: 180px; }
  .game-showcase__formats { grid-template-columns: 1fr; }
  .img-carousel__item { flex: 0 0 92%; }
}
