:root {
  color-scheme: dark;
  --ink: #151816;             /* Core dark background */
  --ink-soft: #1d211e;        /* Softened dark background for container elements */
  --ink-card: #252a26;        /* High-contrast dark background for interactive cards */
  --paper: #eceee8;           /* Soft off-white paper color for high-contrast headers */
  --paper-muted: #b0b5ac;     /* Muted paper color for readable body text */
  --line: #2e3430;            /* Subtle dark slate-green for borders */
  --line-active: #47514a;     /* Accent borders */
  --avatar-cyan: #8fc0c4;     /* Crisp soft teal/cyan from avatar */
  --avatar-lavender: #9c9aa8; /* Elegant muted slate-lavender from avatar */
  --gargoyle: #b9ef63;        /* Vivid neon-bile lime for Gargoyle Standalone */
  --brick: #d06c54;           /* Warm terracotta brick for the Arcade feature */
  --content: 1120px;          /* Grid constraints */
  
  /* Precision transition curves */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
}

body {
  margin: 0;
  min-width: 280px;
  color: var(--paper-muted);
  background: var(--ink);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  transition: var(--transition-fast);
}

a:focus-visible {
  outline: 2px solid var(--avatar-cyan);
  outline-offset: 4px;
}

/* Container Paddings */
main > section,
footer,
.compact-identity {
  padding-right: max(24px, calc((100% - var(--content)) / 2));
  padding-left: max(24px, calc((100% - var(--content)) / 2));
}

/* Sticky Compact Header */
.compact-header {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  border-bottom: 1px solid var(--line);
  background: var(--ink);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-100%);
  transition: var(--transition-smooth);
}

.compact-header.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.compact-identity {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  text-decoration: none;
}

.compact-identity img {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-active);
  border-radius: 6px;
  object-fit: cover;
}

.compact-identity span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Profile Section (Tighter and more compact) */
.profile {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 48px;
  align-items: center;
  padding-top: 52px;
  padding-bottom: 52px;
  border-bottom: 1px solid var(--line);
}

.profile-intro {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.profile-avatar {
  width: 140px;
  height: 140px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 6px;
  background: var(--ink-soft);
  object-fit: cover;
  transition: var(--transition-smooth);
}

.profile-avatar:hover {
  border-color: var(--avatar-cyan);
  transform: rotate(-2.5deg) scale(1.05);
}

.eyebrow,
.section-label,
.item-meta {
  margin: 0;
  color: var(--avatar-cyan);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile h1 {
  margin: 6px 0 10px;
  color: var(--paper);
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 3.25rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.profile-copy {
  grid-column: 2;
  max-width: 580px;
  margin: 0;
  color: var(--paper-muted);
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 400;
}

.profile-directory {
  padding-left: 36px;
  border-left: 1px solid var(--line);
}

.profile-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.profile-links li {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(29, 33, 30, 0.4); /* Translucent --ink-soft */
  transition: var(--transition-smooth);
}

.profile-links li:hover {
  border-color: var(--avatar-cyan);
  background: var(--ink-soft);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.profile-links a {
  min-height: 48px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  text-decoration: none;
  position: relative;
}

.profile-links span {
  overflow-wrap: anywhere;
  color: var(--paper);
  font-size: 0.82rem;
  font-weight: 600;
  padding-right: 16px;
  transition: var(--transition-fast);
}

.profile-links small {
  overflow-wrap: anywhere;
  color: var(--avatar-lavender);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
}

.profile-links li:hover span {
  color: var(--avatar-cyan);
}

/* Subtle Link Arrow Micro-Animation */
.profile-links a::after {
  content: "→";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  color: var(--avatar-cyan);
  opacity: 0;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.profile-links li:hover a::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Current Game Promoted Section (Crisp and compact) */
.release {
  display: grid;
  grid-template-columns: minmax(180px, 0.38fr) minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
  border-left: 4px solid var(--gargoyle); /* Highlighted product line */
  background: var(--ink-soft);
}

.release-mark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
  padding: 48px 32px 48px 0;
  border-right: 1px solid var(--line);
}

.release-mark img {
  width: min(100%, 130px);
  height: auto;
  border: 2px solid var(--gargoyle);
  border-radius: 12px;
  padding: 4px;
  background: var(--ink);
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(185, 239, 99, 0.15);
  transition: var(--transition-smooth);
}

.release-mark img:hover {
  transform: scale(1.05) rotate(1.5deg);
  box-shadow: 0 12px 32px rgba(185, 239, 99, 0.25);
}

.release .section-label {
  color: var(--gargoyle);
}

.release-mark span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--gargoyle);
  border-radius: 999px;
  color: var(--gargoyle);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Pulsing Dot animation for 'Released' badge */
@keyframes pulse-dot {
  0% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(185, 239, 99, 0.5);
  }
  70% {
    transform: scale(1);
    opacity: 0.8;
    box-shadow: 0 0 0 6px rgba(185, 239, 99, 0);
  }
  100% {
    transform: scale(1);
    opacity: 0;
    box-shadow: 0 0 0 0 rgba(185, 239, 99, 0);
  }
}

.release-mark span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gargoyle);
  display: inline-block;
  animation: pulse-dot 1.8s infinite;
}

.release-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0 48px clamp(24px, 4vw, 48px);
}

.release-copy h2,
.section-heading h2 {
  margin: 6px 0 12px;
  color: var(--paper);
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 3.25rem;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.release-copy > p:not(.section-label) {
  max-width: 650px;
  margin: 0;
  color: var(--paper-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.release-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* Highly Interactive Buttons (Tightened heights) */
.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--line-active);
  border-radius: 6px;
  color: var(--paper);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  background: rgba(29, 33, 30, 0.2);
  transition: var(--transition-smooth);
}

.button:hover,
.button:focus-visible {
  border-color: var(--gargoyle);
  color: var(--gargoyle);
  background: rgba(185, 239, 99, 0.05);
  transform: translateY(-1px);
}

.button.primary {
  border-color: var(--gargoyle);
  color: var(--ink);
  background: var(--gargoyle);
  box-shadow: 0 4px 12px rgba(185, 239, 99, 0.15);
}

.button.primary:hover,
.button.primary:focus-visible {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 6px 20px rgba(236, 238, 232, 0.2);
  transform: translateY(-1px);
}

/* Catalog section (Denser display) */
.catalog {
  padding-top: 64px;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 28px;
}

.catalog-list {
  border-top: 1px solid var(--line);
}

/* Row-to-Card Highlight Transition on Hover (Tightened vertical height) */
.catalog-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  padding: 22px 20px;
  margin-left: -20px;
  margin-right: -20px;
  border-bottom: 1px solid var(--line);
  border-radius: 12px;
  transition: var(--transition-smooth);
}

.catalog-item:hover {
  background: var(--ink-soft);
  border-bottom-color: var(--line-active);
  transform: translateX(4px);
}

.catalog-item h3 {
  margin: 4px 0 6px;
  color: var(--paper);
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: var(--transition-fast);
}

.catalog-item:hover h3 {
  color: var(--avatar-cyan);
}

.catalog-item p:not(.item-meta) {
  max-width: 680px;
  margin: 0;
  color: var(--paper-muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.catalog-item > a {
  min-width: 140px;
  color: var(--avatar-cyan);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  transition: var(--transition-fast);
}

.catalog-item > a::after {
  content: "→";
  font-size: 1.1rem;
  transition: var(--transition-fast);
}

.catalog-item:hover > a {
  color: var(--paper);
}

.catalog-item:hover > a::after {
  transform: translateX(4px);
}

/* Featured Arcade Showcase Badge & border */
.arcade-item {
  border-left: 4px solid var(--brick);
  padding-left: 16px;
}

.arcade-item:hover {
  border-left-color: var(--brick);
}

.badge-featured {
  background: rgba(208, 108, 84, 0.15);
  color: var(--brick);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 8px;
  display: inline-block;
}

/* Footer & Fine Print */
footer {
  padding-top: 30px;
  padding-bottom: max(30px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.fine-print {
  margin: 0;
  color: #656d66;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
}

footer a {
  color: var(--avatar-cyan);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  border-bottom: 1px solid transparent;
}

footer a:hover {
  color: var(--paper);
  border-bottom-color: var(--paper);
}

/* Media Queries */
@media (max-width: 960px) {
  .profile {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .profile-directory {
    padding-top: 32px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .release-copy h2,
  .section-heading h2 {
    font-size: 2.85rem;
  }
  
  .catalog-item {
    padding-left: 10px;
    padding-right: 10px;
    margin-left: -10px;
    margin-right: -10px;
  }
}

@media (max-width: 720px) {
  main > section,
  footer,
  .compact-identity {
    padding-right: 20px;
    padding-left: 20px;
  }

  .profile-intro {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 20px;
  }

  .profile-avatar {
    width: 112px;
    height: 112px;
    border-radius: 12px;
  }

  .profile h1 {
    font-size: 2.85rem;
  }

  .release {
    grid-template-columns: 1fr;
  }

  .release-mark {
    flex-direction: row;
    align-items: center;
    padding: 32px 0 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .release-mark img {
    width: 96px;
  }

  .release-copy {
    padding: 32px 0 44px;
  }

  .release-copy h2,
  .section-heading h2 {
    font-size: 2.5rem;
  }

  .catalog {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .catalog-item {
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
    padding: 18px 12px;
  }

  .catalog-item > a {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .profile h1 {
    font-size: 2.5rem;
  }
  
  footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .profile {
    gap: 28px;
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .profile-intro {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
  }

  .profile-avatar {
    width: 96px;
    height: 96px;
  }

  .profile-copy {
    grid-column: 1 / -1;
    font-size: 0.95rem;
  }

  .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .compact-header,
  .profile-avatar,
  .profile-links li,
  .release-mark img,
  .button,
  .catalog-item,
  .catalog-item > a,
  .catalog-item > a::after {
    transition: none !important;
  }
  
  .release-mark span::before {
    animation: none;
  }
}
