.studio-page {
  width: 100%;
  max-width: 1240px;
}

body {
  background:
    radial-gradient(circle at 78% 8%, rgba(196, 0, 20, 0.22), transparent 34%),
    radial-gradient(circle at 18% 24%, rgba(16, 17, 20, 0.62), transparent 32%),
    linear-gradient(135deg, #070910, #101114 48%, #25080d);
  color: #f8f4fb;
}

.site-header {
  border-bottom-color: rgba(196, 0, 20, 0.32);
  background: rgba(10, 8, 15, 0.88);
}

.main-nav,
.back-link,
.github-link {
  color: #ddd8e4;
}

.main-nav a:hover,
.back-link:hover,
.github-link:hover {
  color: #ff6b75;
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
  font-weight: 850;
}

.github-link svg {
  width: 18px;
  height: 18px;
}

.studio-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.64fr);
  gap: 32px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(196, 0, 20, 0.42);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 82% 28%, rgba(196, 0, 20, 0.24), transparent 34%),
    linear-gradient(135deg, rgba(9, 11, 18, 0.98), rgba(39, 8, 13, 0.97)),
    var(--goth);
  color: white;
  padding: 38px;
}

.studio-hero h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(44px, 6vw, 78px);
  line-height: 0.94;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.studio-hero p {
  max-width: 780px;
  margin: 18px 0 0;
  color: #ddd8e4;
  font-size: 18px;
  line-height: 1.65;
}

.studio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.studio-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 900;
}

.studio-button.primary {
  border-color: #d41121;
  background: #d41121;
  color: #fff;
}

.studio-card {
  min-width: 0;
  border: 1px solid rgba(196, 0, 20, 0.32);
  border-radius: var(--radius);
  background: rgba(8, 9, 15, 0.55);
  padding: 18px;
}

.studio-card h2 {
  margin: 0;
  font-size: 20px;
}

.studio-card p {
  margin: 12px 0 0;
  color: #ddd8e4;
  font-size: 14px;
}

.studio-logo-card {
  align-self: stretch;
  display: grid;
  align-content: start;
  gap: 16px;
}

.chaos-studio-art {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #03060b;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.3);
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  min-width: 0;
  margin-top: 28px;
}

.studio-panel {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(12, 10, 18, 0.74);
  padding: 26px;
  color: #f8f4fb;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.22);
}

.studio-panel + .studio-panel {
  margin-top: 18px;
}

.studio-panel h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.studio-panel > p {
  margin: 10px 0 0;
  color: #ddd8e4;
  line-height: 1.65;
}

.panel-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.panel-title-row h2 {
  margin: 0;
}

.panel-title-row p {
  margin: 10px 0 0;
  color: #ddd8e4;
  line-height: 1.6;
}

.panel-title-row > span {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(196, 0, 20, 0.24);
  color: #fff;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.studio-project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.studio-project-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid #d7c6df;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(196, 0, 20, 0.08), transparent 34%),
    rgba(255, 255, 255, 0.07);
  padding: 0;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.studio-project-card:hover {
  transform: translateY(-1px);
  border-color: rgba(196, 0, 20, 0.62);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.studio-project-media {
  position: relative;
  display: block;
  overflow: hidden;
  border-bottom: 1px solid rgba(215, 198, 223, 0.3);
  background: #080a10;
}

.studio-project-media img {
  display: block;
  width: 100%;
  height: 172px;
  object-fit: cover;
  object-position: center;
  opacity: 0.88;
  transition:
    opacity 160ms ease,
    transform 180ms ease;
}

.studio-project-card:hover .studio-project-media img {
  opacity: 1;
  transform: scale(1.025);
}

.project-icon {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #d7c6df;
  border-radius: 6px;
  background: rgba(33, 25, 45, 0.9);
  color: #f6c15f;
  font-size: 15px;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.studio-project-card h3 {
  margin: 0;
  padding: 0 18px;
  font-size: 20px;
}

.studio-project-card p {
  margin: 0;
  color: #ddd8e4;
  padding: 0 18px;
  line-height: 1.55;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding: 0 18px 18px;
}

.project-meta span {
  border-radius: 999px;
  background: #f4e8f3;
  color: #4a3159;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 900;
}

.mood-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.mood-card {
  position: relative;
  display: grid;
  min-height: 250px;
  align-content: end;
  gap: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
}

.mood-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 12%, rgba(255, 255, 255, 0.16), transparent 30%),
    linear-gradient(180deg, transparent 0%, rgba(5, 6, 11, 0.72) 64%);
  pointer-events: none;
}

.mood-card > * {
  position: relative;
  z-index: 1;
}

.mood-burnt {
  background:
    linear-gradient(180deg, rgba(13, 8, 12, 0.18), rgba(5, 6, 11, 0.82)),
    url("../assets/games/burnt-toast/kitchen-lineup.png") center / cover,
    #5b2a3b;
}

.mood-beyond {
  background:
    linear-gradient(180deg, rgba(9, 20, 13, 0.18), rgba(5, 6, 11, 0.84)),
    url("../assets/games/beyond-the-kings-road/dashboard-main-ui.png") center / cover,
    #243d27;
}

.mood-clash {
  background:
    linear-gradient(180deg, rgba(7, 9, 16, 0.1), rgba(5, 6, 11, 0.84)),
    url("../assets/games/clash-protocol/character-select.png") center / cover,
    #182333;
}

.mood-containment {
  background:
    linear-gradient(180deg, rgba(5, 5, 10, 0.16), rgba(5, 6, 11, 0.82)),
    url("../assets/games/containment-circle/gameplay-preview.png") center / cover,
    #171827;
}

.mood-helpdesk {
  background:
    linear-gradient(180deg, rgba(8, 17, 15, 0.14), rgba(5, 6, 11, 0.82)),
    url("../assets/games/help-desk-95/desktop-day1.png") center / cover,
    #162f28;
}

.mood-code {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 14px;
  font-weight: 950;
}

.mood-card h3 {
  margin: 0;
  font-size: 24px;
}

.mood-card p {
  margin: 0;
  color: #f1ecf6;
  line-height: 1.48;
}

.mood-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mood-tags span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 900;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.focus-item {
  border-left: 3px solid #d41121;
  padding-left: 12px;
}

.focus-item strong {
  display: block;
  color: #fff;
}

.focus-item span {
  display: block;
  margin-top: 5px;
  color: #ddd8e4;
  font-size: 13px;
  line-height: 1.45;
}

.studio-side {
  display: grid;
  align-content: start;
  gap: 18px;
}

.quick-links {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.quick-links a {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8f4fb;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 850;
}

.quick-links a:hover {
  border-color: rgba(196, 0, 20, 0.54);
  color: #ff6b75;
}


.site-footer {
  color: #c9c1d2;
}

@media (max-width: 960px) {
  .studio-hero,
  .studio-layout {
    grid-template-columns: 1fr;
  }

  .studio-project-grid,
  .mood-card-grid,
  .focus-grid {
    grid-template-columns: 1fr;
  }

  .studio-hero {
    padding: 28px;
  }
}

@media (max-width: 520px) {
  :root {
    --studio-mobile-content: calc(100vw - 96px);
  }

  .studio-page {
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    padding-top: 28px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .studio-hero {
    display: block;
    max-width: calc(100vw - 40px);
    padding: 28px;
  }

  .studio-hero > div,
  .studio-card,
  .studio-actions {
    width: 100%;
    max-width: var(--studio-mobile-content);
    min-width: 0;
  }

  .studio-hero h1 {
    max-width: var(--studio-mobile-content);
    font-size: 38px;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .studio-hero p,
  .studio-card p {
    max-width: var(--studio-mobile-content);
    overflow-wrap: break-word;
  }

  .studio-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .panel-title-row {
    display: grid;
  }

  .studio-button {
    width: 100%;
  }

  .studio-card {
    margin-top: 28px;
  }

  .chaos-studio-art {
    max-height: 292px;
  }

  .studio-layout,
  .studio-panel,
  .studio-project-card {
    max-width: calc(100vw - 40px);
  }
}
