:root {
  --bg: #07090d;
  --bg-soft: #0e1218;
  --surface: #121821;
  --surface-2: #19212c;
  --text: #f3f6fb;
  --text-muted: #9eaac0;
  --accent: #5eb6ff;
  --accent-soft: rgba(94, 182, 255, 0.28);
  --border: #273242;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto;
}

body {
  font-family: "Inter", sans-serif;
  color: var(--text);
  line-height: 1.7;
  background:
    radial-gradient(circle at 80% 10%, rgba(94,182,255,0.10), transparent 40%),
    radial-gradient(circle at 20% 40%, rgba(140,100,255,0.08), transparent 35%),
    radial-gradient(circle at 50% 100%, rgba(94,182,255,0.06), transparent 50%),
    var(--bg);
}

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

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

.container {
  width: min(1380px, 94%);
  margin: 0 auto;
}

.section {
  padding: 6rem 0;
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.7rem);
  margin-bottom: 0.8rem;
}

.section-text {
  color: var(--text-muted);
  max-width: 760px;
  margin-bottom: 2rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(5, 7, 11, 0.96);
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header {
    background: rgba(5, 7, 11, 0.96);
  }
}

.navbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #ffffff;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.93rem;
  position: relative;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: #ffffff;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  width: 100%;
}

.hamburger {
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.hamburger span {
  width: 24px;
  height: 2px;
  border-radius: 10px;
  background: #f6f8fc;
}

.hero {
  min-height: calc(100vh - 74px);
  display: flex;
  align-items: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(94,182,255,0.18), transparent 55%),
    linear-gradient(180deg, rgba(8, 11, 17, 0.55) 0%, rgba(7, 9, 13, 0.92) 90%);
  pointer-events: none;
}

.hero-content {
  max-width: 860px;
  position: relative;
  z-index: 2;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-size: 0.78rem;
  margin-bottom: 0.9rem;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  margin-bottom: 1rem;
  text-shadow:
    0 4px 20px rgba(0,0,0,0.5),
    0 0 25px rgba(94,182,255,0.25);
}

.intro {
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 1.7rem;
}

.btn {
  display: inline-block;
  color: #041120;
  background: linear-gradient(135deg, #73c2ff 0%, #4ea8ff 100%);
  padding: 0.78rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(94, 182, 255, 0.33);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.4rem;
}

.gallery-grid > * {
  grid-column: span 6;
}

.gallery-masonry .gallery-card {
  grid-column: span 6;
  min-height: 500px;
}

.gallery-masonry .card-large {
  grid-column: span 12;
  min-height: 700px;
}

.gallery-masonry .card-tall {
  min-height: 700px;
}

.gallery-masonry .card-wide {
  grid-column: span 12;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  background: #0b0f14;
  contain: layout paint;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.28));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 0px rgba(94,182,255,0);
  transition: all 0.3s ease;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: auto;
  transform-origin: center;
  transition: transform 0.3s ease;
}

.gallery-card:hover img {
  transform: scale(1.05);
}

.gallery-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

#art-2d .gallery-card img {
  border-radius: 16px;
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(120, 60, 255, 0.15);
  transition: all 0.3s ease;
}

#art-2d .gallery-card:hover img {
  transform: scale(1.03);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.55),
    0 0 36px rgba(120, 60, 255, 0.25);
}

#art-2d .gallery-card {
  background: transparent;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.gallery-card:hover::before {
  opacity: 1;
}

.gallery-card:hover::after {
  opacity: 1;
  box-shadow: 0 0 30px rgba(94,182,255,0.25);
}

.card-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem 1.1rem;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(4,6,10,0.75) 80%);
  z-index: 3;
  transform: translateY(10px);
  opacity: 0.92;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.gallery-card:hover .card-overlay {
  transform: translateY(0);
  opacity: 1;
}

.card-overlay h3 {
  font-size: 1rem;
  font-weight: 600;
}

.card-overlay p {
  color: #d8e1ef;
  font-size: 0.85rem;
}

.project-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 880px;
}

.project-item {
  background: rgba(18, 24, 33, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1.1rem 1.15rem;
  transition: transform 0.25s ease;
}

.project-item-link {
  display: block;
}

.project-item-featured {
  position: relative;
  background: linear-gradient(145deg, rgba(20, 31, 44, 0.94), rgba(17, 24, 33, 0.88));
  border-color: rgba(94, 182, 255, 0.45);
  box-shadow: 0 12px 26px rgba(7, 12, 19, 0.45);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.project-item-featured::after {
  content: "Featured";
  position: absolute;
  top: 0.72rem;
  right: 0.85rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e9f4ff;
  background: rgba(94, 182, 255, 0.2);
  border: 1px solid rgba(94, 182, 255, 0.52);
  border-radius: 999px;
  padding: 0.08rem 0.48rem;
}

.project-item:hover {
  transform: translateY(-3px);
}

.project-item.project-item-featured:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(124, 204, 255, 0.78);
  box-shadow:
    0 18px 38px rgba(7, 12, 19, 0.6),
    0 0 0 1px rgba(124, 204, 255, 0.35),
    0 0 22px rgba(94, 182, 255, 0.2);
}

.project-item p {
  color: var(--text-muted);
  margin-top: 0.45rem;
}

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

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.85rem 0 1.2rem;
}

.tag-list li {
  background: rgba(19, 24, 33, 0.9);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.82rem;
  font-size: 0.88rem;
  color: #dce4f0;
}

/* CONTACT SECTION UPGRADE */

.contact-block {
  text-align: center;
}

.contact-email {
  display: inline-block;
  font-size: 1.4rem;
  font-weight: 600;
  margin: 1.5rem 0 1rem;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-email:hover {
  color: var(--accent);
  text-shadow: 0 0 18px rgba(94,182,255,0.6);
}

.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 1rem;
}

.contact-links a {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(18,24,33,0.6);
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all 0.25s ease;
}

.contact-links a:hover {
  color: #ffffff;
  border-color: var(--accent);
  background: rgba(94,182,255,0.12);
  box-shadow: 0 0 18px rgba(94,182,255,0.2);
}

.site-footer {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

/* project pages */
.project-main {
  padding-top: 2rem;
}

.project-main section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 700px;
}

.project-hero {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin: 1rem 0 60px;
  box-shadow: var(--shadow);
}

.project-hero img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

.project-main .project-hero img,
.project-main .gallery-card img {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-main .project-hero:hover img,
.project-main .gallery-card:hover img {
  transform: scale(1.03);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.35),
    0 0 18px rgba(94, 182, 255, 0.14);
}

.project-hero-cinematic {
  position: relative;
  isolation: isolate;
  background: linear-gradient(180deg, rgba(9, 13, 20, 0.06), rgba(9, 13, 20, 0.2));
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 44px rgba(94, 182, 255, 0.18);
}

.project-hero-cinematic::before {
  content: "";
  position: absolute;
  inset: -28% -12% 18%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    72% 60% at 50% 55%,
    rgba(94, 182, 255, 0.26) 0%,
    rgba(94, 182, 255, 0) 72%
  );
}

.project-hero-cinematic::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(6, 10, 16, 0.3), rgba(6, 10, 16, 0) 22%),
    linear-gradient(0deg, rgba(7, 10, 15, 0.54), rgba(7, 10, 15, 0) 44%),
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.05) 0 1px, rgba(255, 255, 255, 0) 1px);
  background-size: auto, auto, 4px 4px;
  opacity: 0.42;
}

.project-hero-cinematic img {
  position: relative;
  z-index: 1;
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
  filter: contrast(1.06) saturate(1.04);
}

.project-main .project-hero-cinematic:hover img {
  transform: scale(1.015);
}

.fish-project-page .project-hero,
.fish-project-page .fish-breakdown .gallery-card {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 60px;
  border-radius: 10px;
}

.fish-project-page .fish-breakdown {
  display: flex;
  flex-direction: column;
}

.fish-project-page .fish-textures .gallery-card,
.fish-project-page .fish-viewport .gallery-card {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 60px;
  border-radius: 10px;
}

.fish-project-page .fish-breakdown .gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slot-game-art-page .project-hero {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 60px;
  border-radius: 10px;
}

.slot-game-art-page .project-hero-cinematic {
  margin-bottom: 44px;
}

.slot-game-art-page h1 {
  font-size: clamp(2.35rem, 6.2vw, 5rem);
  margin-bottom: 0.45rem;
  color: #f6faff;
  text-shadow:
    0 4px 20px rgba(0, 0, 0, 0.42),
    0 0 18px rgba(94, 182, 255, 0.16);
}

.slot-game-art-page .slot-project-subtitle {
  margin: 0 0 1rem;
  font-size: 0.96rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b8c6dd;
}

.slot-game-art-page .container > section {
  margin-bottom: 70px;
}

.slot-game-art-page .container > section:last-of-type {
  margin-bottom: 0;
}

.slot-game-art-page .slot-tools-workflow .panel p,
.slot-game-art-page .slot-tools-workflow .panel li {
  line-height: 1.8;
}

.slot-game-art-page .slot-tools-workflow .panel p + p {
  margin-top: 0.8rem;
}

.slot-game-art-page .slot-tools-workflow .panel ul {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.slot-game-art-page .gallery-card {
  background: rgba(11, 16, 24, 0.95);
}

.slot-game-art-page .gallery-card img {
  object-fit: contain;
}

.slot-game-art-page .slot-closeups-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 760px;
  margin: 0 auto;
  gap: 1rem;
}

.slot-game-art-page .slot-closeups-grid .gallery-card {
  min-height: clamp(180px, 20vw, 200px);
  height: clamp(180px, 20vw, 200px);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(12, 18, 28, 0.99), rgba(8, 13, 21, 0.99));
  border: 1px solid rgba(126, 176, 245, 0.28);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.34),
    0 0 20px rgba(90, 165, 255, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 -18px 28px rgba(0, 0, 0, 0.22);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.slot-game-art-page .slot-closeups-grid .gallery-card::before {
  content: "";
  position: absolute;
  inset: 14% 12%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle at 50% 50%, rgba(110, 190, 255, 0.2), rgba(110, 190, 255, 0) 72%);
}

.slot-game-art-page .slot-closeups-grid .gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.2));
}

.slot-game-art-page .slot-closeups-grid .gallery-card img {
  position: relative;
  z-index: 3;
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 280px);
  max-height: calc(100% - 26px);
  margin: 0 auto;
  filter: contrast(1.06) saturate(1.05) drop-shadow(0 6px 12px rgba(78, 146, 220, 0.16));
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
  image-rendering: auto;
}

.slot-game-art-page .slot-closeups-grid .gallery-card:hover {
  border-color: rgba(145, 206, 255, 0.48);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.42),
    0 0 24px rgba(96, 184, 255, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 -18px 28px rgba(0, 0, 0, 0.22);
}

.slot-game-art-page .slot-closeups-grid .closeup-caption {
  position: relative;
  z-index: 3;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-align: center;
  color: var(--text-muted);
}

.slot-game-art-page .slot-closeups-grid .gallery-card:hover img {
  transform: none;
  filter: contrast(1.06) saturate(1.05) drop-shadow(0 10px 18px rgba(88, 170, 255, 0.24));
}

.slot-game-art-page .slot-section-subtitle {
  margin: -0.2rem 0 1.1rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #aebbd0;
}

.slot-game-art-page .slot-ui-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 1040px;
  margin: 0 auto;
  column-gap: 1.5rem;
  row-gap: 2rem;
}

.slot-game-art-page .slot-ui-grid .gallery-card {
  min-height: 240px;
}

.slot-game-art-page .slot-ui-grid .slot-ui-main {
  grid-column: 1 / -1;
  min-height: 340px;
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(124, 201, 255, 0.36);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.38),
    0 0 26px rgba(94, 182, 255, 0.18);
}

.slot-game-art-page .slot-ui-grid .slot-ui-main::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle at 50% 42%, rgba(112, 195, 255, 0.15), rgba(112, 195, 255, 0) 70%);
}

.slot-game-art-page .slot-ui-grid .slot-ui-main img {
  position: relative;
  z-index: 2;
}

.slot-game-art-page .slot-back-link {
  margin-top: 2.8rem;
  gap: 0.45rem;
  color: #78c4ff;
  transition: color 0.28s ease;
}

.slot-game-art-page .slot-back-link .back-link-arrow {
  display: inline-block;
  transition: transform 0.28s ease;
}

.slot-game-art-page .slot-back-link:hover {
  color: #9bd8ff;
}

.slot-game-art-page .slot-back-link:hover .back-link-arrow {
  transform: translateX(-4px);
}

.kitchen-project-page .project-hero,
.arcade-project-page .project-hero,
.space-bubbles-project-page .project-hero {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 60px;
  border-radius: 10px;
}

.kitchen-project-page .project-hero img,
.arcade-project-page .project-hero img,
.space-bubbles-project-page .project-hero img {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  object-fit: contain;
}

.fall-guys-project-page .gallery-grid {
  max-width: 1120px;
  margin: 0 auto;
  gap: 1.8rem;
}

.fall-guys-project-page .project-subtitle {
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b8c6dd;
}

.fall-guys-project-page .gallery-grid > .gallery-card {
  min-height: clamp(260px, 24vw, 330px);
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(128, 178, 245, 0.26);
  background: linear-gradient(180deg, rgba(13, 18, 27, 0.97), rgba(10, 14, 22, 0.97));
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.fall-guys-project-page .gallery-grid > .gallery-card img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
}

.fall-guys-project-page .gallery-grid > .gallery-card:hover {
  border-color: rgba(152, 212, 255, 0.48);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.42),
    0 0 20px rgba(94, 182, 255, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.fall-guys-project-page .gallery-grid > .gallery-card:hover img {
  transform: scale(1.025);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
}

/* Strategy game hero: spacing and focal balance */
.strategy-game-project-page .project-hero.project-hero-cinematic,
.math-puzzle-project-page .project-hero.project-hero-cinematic {
  margin: 1rem auto 72px;
  max-width: 1140px;
}

/* Math puzzle page: keep content centered and aligned with strategy layout */
.math-puzzle-project-page > .container {
  width: min(1120px, 94%);
  margin-left: auto;
  margin-right: auto;
}

.math-puzzle-project-page .project-section {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.strategy-game-project-page .project-hero.project-hero-cinematic img,
.math-puzzle-project-page .project-hero.project-hero-cinematic img {
  width: 100%;
  object-fit: contain;
  object-position: center center;
  filter: contrast(1.07) saturate(1.05);
}

.strategy-game-project-page .project-hero.project-hero-cinematic:hover img,
.math-puzzle-project-page .project-hero.project-hero-cinematic:hover img {
  transform: scale(1.008);
}

/* Strategy game gameplay mockups: emphasize UI readability without changing layout */
.strategy-game-project-page .gallery-grid,
.math-puzzle-project-page .gallery-grid {
  max-width: 1120px;
  margin: 0 auto;
  gap: 2.1rem;
}

.strategy-game-project-page .gallery-grid > .gallery-card,
.math-puzzle-project-page .gallery-grid > .gallery-card {
  min-height: clamp(260px, 24vw, 340px);
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(121, 179, 255, 0.3);
  background: linear-gradient(180deg, rgba(10, 15, 24, 0.98), rgba(8, 12, 20, 0.98));
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.strategy-game-project-page .gallery-grid > .gallery-card img,
.math-puzzle-project-page .gallery-grid > .gallery-card img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: contain;
  object-position: center;
  background: #070d18;
  filter: contrast(1.06) saturate(1.02);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.44);
}

.strategy-game-project-page .gallery-grid > .gallery-card:hover,
.math-puzzle-project-page .gallery-grid > .gallery-card:hover {
  border-color: rgba(153, 208, 255, 0.5);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.42),
    0 0 18px rgba(94, 182, 255, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.strategy-game-project-page .gallery-grid > .gallery-card:hover img,
.math-puzzle-project-page .gallery-grid > .gallery-card:hover img {
  transform: scale(1.01);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

/* Math puzzle gameplay: minimal, readable presentation */
.math-puzzle-project-page .gallery-grid {
  margin-top: 1.15rem;
  gap: clamp(1.9rem, 2.3vw, 2.8rem);
}

.math-puzzle-project-page .gallery-grid > .gallery-card {
  padding: 14px;
  border-color: rgba(129, 165, 210, 0.24);
  background: linear-gradient(180deg, rgba(9, 13, 21, 0.98), rgba(7, 11, 18, 0.98));
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.math-puzzle-project-page .gallery-grid > .gallery-card img {
  background: #060b14;
  filter: contrast(1.1) brightness(1.03);
  image-rendering: auto;
}

.math-puzzle-project-page .gallery-grid > .gallery-card:hover {
  border-color: rgba(152, 190, 235, 0.26);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.math-puzzle-project-page .gallery-grid > .gallery-card:hover img {
  transform: scale(1.003);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.38);
}

.math-puzzle-project-page .project-hero.project-hero-cinematic:hover img {
  transform: scale(1.003);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
}

/* Space Bubbles image presentation (scoped by asset path) */
.space-bubbles-project-page .project-hero:has(img[src*="space-bubbles"]) {
  margin-left: auto;
  margin-right: auto;
}

.space-bubbles-project-page .project-hero:has(img[src*="space-bubbles"]) {
  max-width: 900px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.space-bubbles-project-page .project-hero img[src*="space-bubbles"] {
  display: block;
  width: 100%;
  max-width: 860px;
  height: auto;
  margin: 0 auto;
  padding: 0;
  border-radius: 22px;
  background: transparent;
  object-fit: contain;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.space-bubbles-project-page .project-hero:hover img[src*="space-bubbles"] {
  transform: scale(1.02);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.48), 0 0 18px rgba(116, 138, 255, 0.18);
}

.space-bubbles-project-page section:has(img[src*="space-bubbles/gameplay"]) .gallery-card:has(img[src*="space-bubbles"]) {
  position: relative;
  isolation: isolate;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(145, 120, 255, 0.22);
  background: linear-gradient(180deg, #1a0f2e, #0f0a1a);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 18px rgba(126, 110, 255, 0.18);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.space-bubbles-project-page section:has(img[src*="space-bubbles/gameplay"]) .gallery-card:has(img[src*="space-bubbles"])::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle at 20% 18%, rgba(112, 146, 255, 0.2), transparent 56%),
    radial-gradient(circle at 84% 82%, rgba(184, 126, 255, 0.16), transparent 58%);
}

.space-bubbles-project-page section:has(img[src*="space-bubbles/gameplay"]) .gallery-card img[src*="space-bubbles"] {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  margin: 0 auto;
  padding: 0;
  border-radius: 16px;
  background: transparent;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(120, 60, 255, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.space-bubbles-project-page section:has(img[src*="space-bubbles/gameplay"]) .gallery-card:has(img[src*="space-bubbles"]):hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.44), 0 0 24px rgba(124, 110, 255, 0.24);
}

.space-bubbles-project-page section:has(img[src*="space-bubbles/gameplay"]) .gallery-card:has(img[src*="space-bubbles"]):hover img {
  transform: scale(1.02);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(120, 60, 255, 0.25);
}

.space-bubbles-case-study img[src*="space-bubbles"] {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.space-bubbles-case-study .project-hero:hover img[src*="space-bubbles"],
.space-bubbles-case-study section:has(img[src*="space-bubbles/gameplay"]) .gallery-card:hover img[src*="space-bubbles"] {
  transform: scale(1.02);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.55),
    0 0 46px rgba(120, 60, 255, 0.28);
}

.space-bubbles-project-page section:has(img[src*="space-bubbles/gameplay"]) .gallery-grid > .gallery-card {
  grid-column: span 6;
}

@media (max-width: 640px) {
  .space-bubbles-project-page section:has(img[src*="space-bubbles/gameplay"]) .gallery-grid > .gallery-card {
    grid-column: span 12;
  }
}

/* Space Bubbles: force dark card background (no light/white card fill) */
.space-bubbles-project-page section:has(img[src*="space-bubbles/gameplay"]) .gallery-card:has(img[src*="space-bubbles"]) {
  background: linear-gradient(180deg, #1a0f2e, #0f0a1a);
  padding: 20px;
  border-radius: 20px;
}

.space-bubbles-project-page section:not(:has(img[src*="space-bubbles/gameplay"])) .gallery-card {
  background: transparent;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.space-bubbles-project-page section:not(:has(img[src*="space-bubbles/gameplay"])) .gallery-card::after {
  display: none;
}

.space-bubbles-project-page section:not(:has(img[src*="space-bubbles/gameplay"])) .project-hero {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.space-bubbles-project-page section:not(:has(img[src*="space-bubbles/gameplay"])) .project-hero img[src*="space-bubbles"] {
  background: transparent;
}

@media (max-width: 640px) {
  .slot-game-art-page .slot-closeups-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .slot-game-art-page .slot-ui-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
}

.space-bubbles-case-study .project-hero-intro {
  text-align: center;
  margin-bottom: 80px;
}

.space-bubbles-case-study .project-hero-intro h1 {
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: 0.02em;
  margin-bottom: 0.85rem;
}

.space-bubbles-case-study .hero-subtitle {
  margin: 0 auto 1.8rem;
  max-width: 760px;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.space-bubbles-case-study .project-hero-intro .project-hero {
  max-width: 980px;
  margin: 0 auto;
}

.space-bubbles-case-study .project-hero-intro .project-hero img[src*="space-bubbles/hero.jpg"] {
  max-width: 920px;
  margin: 0 auto;
  box-shadow:
    0 20px 42px rgba(0, 0, 0, 0.5),
    0 0 28px rgba(124, 110, 255, 0.26);
}

.space-bubbles-case-study .container > section {
  margin-bottom: 80px;
}

.space-bubbles-case-study .container > section:last-of-type {
  margin-bottom: 0;
}

.space-bubbles-case-study section h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin-bottom: 1.4rem;
}

.space-bubbles-case-study section:has(img[src*="space-bubbles/gameplay"]) .gallery-grid {
  gap: 2rem;
}

.space-bubbles-case-study section:has(img[src*="space-bubbles/gameplay"]) .gallery-grid > .gallery-card {
  grid-column: span 6;
}

@media (max-width: 640px) {
  .space-bubbles-case-study section:has(img[src*="space-bubbles/gameplay"]) .gallery-grid > .gallery-card {
    grid-column: span 12;
  }
}

.space-bubbles-case-study section:has(img[src*="space-bubbles/ui-elements"]) {
  margin-bottom: 100px;
}

.space-bubbles-case-study section:has(img[src*="space-bubbles/ui-elements"]) .project-hero {
  max-width: 1060px;
  margin-left: auto;
  margin-right: auto;
}

.space-bubbles-case-study .project-hero img[src*="space-bubbles/ui-elements.jpg"] {
  display: block;
  max-width: 980px;
  margin: 0 auto;
}

.icon-set-project-page .individual-icons {
  margin-top: 40px;
}

.icon-set-project-page .individual-icons .gallery-grid {
  gap: 2rem;
}

.icon-set-project-page .individual-icons .gallery-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 500px;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, #1a0f2e, #0f0a1a);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(120, 60, 255, 0.2);
}

.icon-set-project-page .individual-icons .gallery-card img {
  display: block;
  width: min(100%, 620px);
  height: auto;
  margin: 0 auto;
  border-radius: 14px;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.42),
    0 0 20px rgba(120, 60, 255, 0.16);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.icon-set-project-page .individual-icons .gallery-card:hover img {
  transform: scale(1.03);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.48),
    0 0 26px rgba(120, 60, 255, 0.24);
}

.icon-set-project-page .individual-icons .icon-caption {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

.project-meta {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.panel {
  background: linear-gradient(180deg, rgba(24, 32, 43, 0.95), rgba(18, 24, 33, 0.95));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem;
}

.panel p,
.panel li {
  color: var(--text-muted);
}

.panel ul {
  padding-left: 1rem;
}

.subsection-title {
  margin-bottom: 0.8rem;
}

.back-link {
  display: inline-flex;
  margin-top: 2rem;
  color: var(--accent);
  font-weight: 700;
}

.js .fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.72s ease, transform 0.72s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.js :where(.fade-in) :where(.project-hero, .gallery-card) {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.72s ease, transform 0.72s ease;
  transition-delay: calc(var(--reveal-delay, 0ms) + 80ms);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

:where(.fade-in).visible :where(.project-hero, .gallery-card) {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 980px) {
  .gallery-grid > * {
    grid-column: span 6;
  }

  .gallery-masonry .gallery-card,
  .gallery-masonry .card-large,
  .gallery-masonry .card-wide,
  .gallery-masonry .card-tall {
    grid-column: span 6;
    min-height: 420px;
  }

  .project-list {
    grid-template-columns: 1fr;
  }

  .about-grid,
  .project-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  .nav-links {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(8, 10, 15, 0.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 0.9rem 4%;
  }

  .nav-links.open {
    max-height: min(70vh, 460px);
    overflow-y: auto;
  }

  .hamburger {
    display: flex;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(1380px, 92%);
  }

  .section {
    padding: 4.6rem 0;
  }

  .gallery-grid > * {
    grid-column: span 12;
  }

  .gallery-masonry .gallery-card,
  .gallery-masonry .card-large,
  .gallery-masonry .card-wide {
    grid-column: span 12;
    min-height: 320px;
  }

  .gallery-masonry .card-tall {
    min-height: 360px;
  }
}

@media (hover: none), (pointer: coarse) {
  .gallery-card::before {
    display: none;
  }

  .gallery-card img,
  .project-hero img,
  .card-overlay,
  .btn,
  .project-item {
    transition: none;
  }

  .project-main .project-hero:hover img,
  .gallery-card:hover img,
  .gallery-card:hover .card-overlay,
  .btn:hover,
  .project-item:hover {
    transform: none;
  }
}
