:root {
  --bg: #f3ede2;
  --bg-soft: #fbf7f1;
  --paper: rgba(255, 252, 247, 0.84);
  --paper-strong: rgba(255, 251, 244, 0.96);
  --ink: #1e1f25;
  --muted: #625f5a;
  --line: rgba(30, 31, 37, 0.12);
  --accent: #c95d3f;
  --accent-strong: #9a311d;
  --accent-soft: rgba(201, 93, 63, 0.12);
  --shadow: 0 24px 60px rgba(42, 31, 15, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --display-font: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --body-font: "Trebuchet MS", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--body-font);
  background:
    radial-gradient(circle at top left, rgba(201, 93, 63, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(45, 101, 123, 0.2), transparent 26%),
    linear-gradient(180deg, #f7f1e6 0%, var(--bg) 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.28;
  pointer-events: none;
  z-index: -2;
}

body::before {
  top: -8rem;
  right: -8rem;
  background: rgba(45, 101, 123, 0.32);
}

body::after {
  left: -10rem;
  bottom: -12rem;
  background: rgba(201, 93, 63, 0.28);
}

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

button,
.button-link {
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fffaf4;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

button:hover,
.button-link:hover,
button:focus-visible,
.button-link:focus-visible {
  transform: translateY(-2px);
  background: var(--accent-strong);
  box-shadow: 0 12px 24px rgba(154, 49, 29, 0.22);
}

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

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.2rem 0 4rem;
}

body[data-page="home"],
body[data-page="product-design"],
body[data-page="feature-suggestions"],
body[data-page="generative-ai"],
body[data-page="gamification"],
body[data-page="game-design-analysis"],
body[data-page="mda-framework"],
body[data-page="web-games"],
body[data-page="books"],
body[data-page="invoxel"],
body[data-page="appsoleut-coders"],
body[data-page="xalt-labs"],
body[data-page="pintobeans"] {
  background: #ffffff;
}

body[data-page="home"]::before,
body[data-page="home"]::after,
body[data-page="product-design"]::before,
body[data-page="product-design"]::after,
body[data-page="feature-suggestions"]::before,
body[data-page="feature-suggestions"]::after,
body[data-page="generative-ai"]::before,
body[data-page="generative-ai"]::after,
body[data-page="gamification"]::before,
body[data-page="gamification"]::after,
body[data-page="game-design-analysis"]::before,
body[data-page="game-design-analysis"]::after,
body[data-page="mda-framework"]::before,
body[data-page="mda-framework"]::after,
body[data-page="web-games"]::before,
body[data-page="web-games"]::after,
body[data-page="books"]::before,
body[data-page="books"]::after,
body[data-page="invoxel"]::before,
body[data-page="invoxel"]::after,
body[data-page="appsoleut-coders"]::before,
body[data-page="appsoleut-coders"]::after,
body[data-page="xalt-labs"]::before,
body[data-page="xalt-labs"]::after,
body[data-page="pintobeans"]::before,
body[data-page="pintobeans"]::after {
  display: none;
}

body[data-page="home"] .page-shell,
body[data-page="product-design"] .page-shell,
body[data-page="feature-suggestions"] .page-shell,
body[data-page="generative-ai"] .page-shell,
body[data-page="gamification"] .page-shell,
body[data-page="game-design-analysis"] .page-shell,
body[data-page="mda-framework"] .page-shell,
body[data-page="web-games"] .page-shell,
body[data-page="books"] .page-shell,
body[data-page="invoxel"] .page-shell,
body[data-page="appsoleut-coders"] .page-shell,
body[data-page="xalt-labs"] .page-shell,
body[data-page="pintobeans"] .page-shell {
  width: min(1152px, calc(100% - 2rem));
  padding-top: 0;
}

.home-shell {
  padding: 2rem 0 4.5rem;
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.home-wordmark {
  font-size: clamp(2.3rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.home-nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.home-nav a {
  position: relative;
}

.home-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.home-nav a:hover::after,
.home-nav a:focus-visible::after {
  transform: scaleX(1);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(360px, 1fr);
  gap: 3rem;
  align-items: center;
  margin-bottom: 4.2rem;
}

.home-copy h1 {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(3.2rem, 7vw, 5.4rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.home-copy p {
  margin: 1.8rem 0 0;
  max-width: 22ch;
  color: #707070;
  font-size: clamp(1.18rem, 2.1vw, 1.45rem);
  line-height: 1.42;
}

.home-art {
  display: flex;
  justify-content: flex-end;
}

.home-art img {
  width: min(100%, 720px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.home-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 1.9rem;
}

.home-card {
  min-height: 100%;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid #e7e7e7;
  box-shadow: 0 10px 24px rgba(17, 20, 26, 0.08);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.home-card:hover,
.home-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 18px 30px rgba(17, 20, 26, 0.12);
  border-color: #d5d5d5;
}

.home-card-anchor {
  display: block;
  height: 100%;
}

.home-card-media {
  aspect-ratio: 1.26 / 1;
  overflow: hidden;
  background: #eef2df;
}

.home-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  padding: 1.25rem 1.5rem 1.45rem;
}

.home-card-body h3 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 1.95rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.home-card-body p {
  margin: 0;
  color: #6d6d6d;
  font-size: 1.02rem;
  line-height: 1.45;
}

.home-card-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding-top: 0.35rem;
  font-size: 1.02rem;
  font-weight: 600;
}

.home-footer-note {
  margin: 1.8rem 0 0;
  color: #6d6d6d;
  font-size: 0.98rem;
  line-height: 1.6;
}

.portfolio-shell {
  padding: 2rem 0 5rem;
}

.portfolio-divider {
  height: 1px;
  margin: 1.6rem 0 3rem;
  background: #e4e4e4;
}

.portfolio-intro {
  margin-bottom: 8rem;
  max-width: 72rem;
}

.portfolio-intro h1 {
  margin: 0 0 1.8rem;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.portfolio-intro p {
  margin: 0;
  max-width: 58ch;
  color: #767676;
  font-size: clamp(1.08rem, 1.7vw, 1.35rem);
  line-height: 1.55;
}

.portfolio-list {
  display: grid;
  gap: 8.5rem;
}

.portfolio-row {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(320px, 1fr);
  gap: 3rem;
  align-items: center;
}

.portfolio-copy h2 {
  margin: 0;
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.portfolio-copy p {
  margin: 1.2rem 0 0;
  max-width: 24ch;
  color: #7a7a7a;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  line-height: 1.45;
}

.portfolio-button {
  margin-top: 1.6rem;
  padding: 0.95rem 1.25rem;
  border-radius: 14px;
  background: #0f1114;
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 700;
  box-shadow: none;
}

.portfolio-art {
  display: flex;
  justify-content: flex-end;
}

.portfolio-art img {
  width: min(100%, 540px);
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.analysis-shell {
  padding: 2rem 0 4rem;
}

.analysis-divider {
  height: 1px;
  margin: 1.6rem 0 2.8rem;
  background: #e5e5e5;
}

.analysis-intro {
  max-width: 64rem;
  margin-bottom: 4.4rem;
}

.analysis-intro h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.4rem, 2vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.analysis-intro p {
  margin: 0;
  max-width: 60rem;
  color: #777777;
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.5;
}

.analysis-gallery h1 {
  margin: 0 0 1.9rem;
  font-size: clamp(3rem, 5vw, 4.6rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 1.6rem;
}

.analysis-card {
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #ebebeb;
  box-shadow: 0 10px 24px rgba(17, 20, 26, 0.06);
  overflow: hidden;
}

.analysis-card-media {
  overflow: hidden;
  background: #eef2e6;
}

.analysis-card-media img {
  width: 100%;
  aspect-ratio: 1.38 / 1;
  object-fit: cover;
  transition: transform 180ms ease;
}

.analysis-card:hover .analysis-card-media img,
.analysis-card:focus-within .analysis-card-media img {
  transform: scale(1.02);
}

.analysis-card-body {
  display: grid;
  gap: 0.65rem;
  padding: 1rem 1rem 1.15rem;
}

.analysis-card-body h3,
.analysis-card-body p {
  margin: 0;
}

.analysis-card-body h3 {
  font-size: clamp(1.05rem, 1.45vw, 1.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.analysis-card-body p {
  color: #7a7a7a;
  font-size: 0.95rem;
  line-height: 1.45;
}

.analysis-card-cta {
  margin-top: 0.35rem;
  align-self: start;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #111111;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: none;
}

.analysis-card-cta:hover,
.analysis-card-cta:focus-visible {
  background: transparent;
  color: #111111;
  transform: none;
  box-shadow: none;
}

.webgames-shell {
  padding: 2rem 0 4rem;
}

.webgames-intro {
  margin: 1.8rem 0 4.2rem;
  max-width: 64rem;
}

.webgames-intro h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.4rem, 2vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.webgames-intro p {
  margin: 0;
  max-width: 60rem;
  color: #777777;
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.5;
}

.webgames-gallery h1 {
  margin: 0 0 1.8rem;
  font-size: clamp(3rem, 5vw, 4.6rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.webgames-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1.8rem;
}

.webgame-card {
  display: block;
}

.webgame-card-media {
  border-radius: 18px;
  overflow: hidden;
  background: #eef2ea;
}

.webgame-card-media img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 180ms ease;
}

.webgame-card:hover .webgame-card-media img,
.webgame-card:focus-visible .webgame-card-media img {
  transform: scale(1.02);
}

.webgame-card-meta {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.7rem;
}

.webgame-card-meta h3,
.webgame-card-meta p {
  margin: 0;
}

.webgame-card-meta h3 {
  font-size: clamp(1.2rem, 1.75vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.webgame-card-meta p {
  color: #7a7a7a;
  font-size: 0.98rem;
  line-height: 1.45;
}

.books-shell {
  padding: 2rem 0 4rem;
}

.books-intro {
  margin: 1.8rem 0 4rem;
  max-width: 64rem;
}

.books-intro h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.4rem, 2vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.books-intro p {
  margin: 0;
  max-width: 60rem;
  color: #777777;
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.5;
}

.books-library h1 {
  margin: 0 0 1.8rem;
  font-size: clamp(3rem, 5vw, 4.6rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.books-wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem 1.5rem;
}

.book-card {
  display: grid;
  gap: 0.8rem;
}

.book-card-cover {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(28, 23, 18, 0.12);
}

.book-card-cover img {
  width: 100%;
  aspect-ratio: 0.72 / 1;
  object-fit: cover;
  transition: transform 180ms ease;
}

.book-card:hover .book-card-cover img,
.book-card:focus-within .book-card-cover img {
  transform: scale(1.02);
}

.book-card-copy {
  display: grid;
  gap: 0.35rem;
}

.book-status {
  display: inline-flex;
  justify-self: start;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #f3efe7;
  color: #5f5b55;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.book-card-copy h3,
.book-card-copy p {
  margin: 0;
}

.book-card-copy h3 {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.book-card-copy p:first-of-type {
  color: #5c5953;
  font-size: 1rem;
  font-weight: 600;
}

.book-card-copy p:last-of-type {
  color: #7a7a7a;
  font-size: 0.98rem;
  line-height: 1.5;
}

.work-shell {
  padding: 3rem 0 5rem;
}

.work-head {
  margin-bottom: 5.4rem;
}

.work-title {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.work-subline {
  max-width: 44rem;
  margin: 0;
  color: #6f6f6f;
  font-size: clamp(1rem, 1.45vw, 1.24rem);
  line-height: 1.5;
}

.work-section + .work-section {
  margin-top: 6rem;
}

.work-section h2 {
  margin: 0 0 2.8rem;
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.work-grid {
  display: grid;
  gap: 2.8rem;
}

.work-experience-row,
.work-project-row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 3.4rem;
  align-items: start;
}

.work-year {
  color: #727272;
  font-size: 1rem;
  font-weight: 500;
}

.work-entry h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.work-entry p {
  margin: 0.55rem 0 0;
  max-width: 34rem;
  color: #7b7b7b;
  font-size: clamp(1rem, 1.55vw, 1.32rem);
  line-height: 1.45;
}

.work-project-media {
  margin-top: 1.1rem;
  max-width: 30rem;
  border-radius: 18px;
  overflow: hidden;
}

.work-project-media img {
  width: 100%;
  height: auto;
  display: block;
}

.pinto-shell {
  padding: 0 0 4rem;
}

.pinto-hero {
  background: #f7fbef;
  padding: 2.6rem 0 3rem;
}

.pinto-hero-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(220px, 0.85fr);
  gap: 3rem;
  align-items: center;
}

.pinto-hero-main h1 {
  margin: 0 0 1.6rem;
  font-size: clamp(3rem, 5vw, 4.6rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.pinto-hero-card {
  max-width: 34rem;
  border-radius: 18px;
  overflow: hidden;
}

.pinto-hero-card img {
  width: 100%;
  aspect-ratio: 1.6 / 1;
  object-fit: cover;
}

.pinto-intro-copy h2 {
  margin: 0;
  font-size: clamp(1.8rem, 2.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.pinto-intro-copy p {
  margin: 0.9rem 0 0;
  max-width: 24rem;
  color: #777777;
  font-size: clamp(1rem, 1.45vw, 1.2rem);
  line-height: 1.55;
}

.pinto-gallery-section {
  padding: 2.4rem 0 0;
}

.pinto-gallery-section h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -0.06em;
}

.pinto-gallery-section > p {
  margin: 1rem 0 2rem;
  max-width: 60rem;
  color: #7a7a7a;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.55;
}

.pinto-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.pinto-tile {
  border-radius: 16px;
  overflow: hidden;
}

.pinto-tile img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0 1.4rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(201, 93, 63, 0.18), rgba(45, 101, 123, 0.22));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  font-family: var(--display-font);
  font-size: 1.2rem;
  font-weight: 700;
}

.brand-copy h1,
.brand-copy p {
  margin: 0;
}

.brand-copy h1 {
  font-family: var(--display-font);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
}

.brand-copy p {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.home-link {
  padding: 0.85rem 1.2rem;
}

.landing-grid,
.page-hero,
.project-card,
.game-card,
.note-banner,
.gallery-card,
.book-tile {
  animation: rise 520ms ease both;
}

.landing-grid {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 42%);
  pointer-events: none;
}

.portrait-card {
  padding: 1.2rem;
}

.portrait-frame {
  position: relative;
  border-radius: calc(var(--radius-xl) - 8px);
  overflow: hidden;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 248, 240, 0.22), rgba(255, 248, 240, 0.02)),
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.42), transparent 30%),
    linear-gradient(180deg, #1f3b44 0%, #274f5c 30%, #f0d2bd 30%, #ecc4ad 100%);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  min-height: 540px;
  object-fit: cover;
}

.portrait-caption {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(22, 27, 34, 0.68);
  color: #fff8ef;
  box-shadow: 0 12px 32px rgba(10, 13, 19, 0.22);
}

.portrait-caption strong {
  display: block;
  font-size: 1rem;
}

.portrait-caption span {
  display: block;
  color: rgba(255, 248, 239, 0.72);
  font-size: 0.92rem;
  margin-top: 0.2rem;
}

.intro-card {
  padding: 1.7rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.48rem 0.9rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-title {
  margin: 1rem 0 0.8rem;
  font-family: var(--display-font);
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 0.94;
  letter-spacing: -0.03em;
}

.hero-title span {
  display: block;
  color: var(--accent-strong);
}

.intro-lead {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 60ch;
}

.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.25rem 0 1.5rem;
}

.signal-chip {
  padding: 0.8rem 1rem;
  min-width: 10rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(30, 31, 37, 0.08);
}

.signal-chip strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 1rem;
}

.signal-chip span {
  color: var(--muted);
  font-size: 0.92rem;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0 1rem;
}

.section-title h2,
.page-hero h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.section-title p,
.page-hero p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.gateway-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.nav-tile {
  position: relative;
  padding: 1.2rem;
  min-height: 12.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.7);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.42)),
    var(--tile-gradient, linear-gradient(135deg, rgba(201, 93, 63, 0.16), rgba(45, 101, 123, 0.18)));
  box-shadow: 0 18px 44px rgba(36, 24, 10, 0.1);
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.nav-tile:hover,
.nav-tile:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 26px 48px rgba(36, 24, 10, 0.16);
  border-color: rgba(201, 93, 63, 0.25);
}

.nav-tile::after {
  content: "";
  position: absolute;
  inset: auto -2rem -2rem auto;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.nav-icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(30, 31, 37, 0.82);
  color: #fff8ef;
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-tile h3 {
  margin: 1rem 0 0.45rem;
  font-size: 1.15rem;
}

.nav-tile p {
  margin: 0;
  max-width: 28ch;
  line-height: 1.6;
  color: var(--muted);
}

.page-hero {
  padding: 1.7rem;
  margin-bottom: 1.4rem;
}

.meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.meta-chip {
  padding: 0.75rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(30, 31, 37, 0.08);
  color: var(--muted);
}

.project-grid,
.game-grid,
.books-grid,
.gallery-grid {
  display: grid;
  gap: 1rem;
}

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

.project-card,
.game-card {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 1.2rem;
  padding: 1rem;
}

.visual-frame {
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 4px);
  min-height: 220px;
  background: linear-gradient(135deg, rgba(201, 93, 63, 0.14), rgba(45, 101, 123, 0.18));
}

.visual-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0.25rem 0.25rem 0.25rem 0;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.card-header h3 {
  margin: 0;
  font-size: 1.4rem;
}

.card-header p {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.year-badge {
  padding: 0.48rem 0.75rem;
  border-radius: 999px;
  background: rgba(30, 31, 37, 0.08);
  font-size: 0.86rem;
  font-weight: 700;
}

.card-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.pill-row,
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pill,
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(30, 31, 37, 0.08);
  color: var(--ink);
  font-size: 0.9rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: auto;
}

.button-link,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.1rem;
}

.ghost-button {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(30, 31, 37, 0.14);
}

.ghost-button:hover,
.ghost-button:focus-visible {
  background: rgba(30, 31, 37, 0.08);
}

.note-banner {
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(201, 93, 63, 0.18);
  background: rgba(255, 249, 244, 0.92);
  color: var(--muted);
}

.game-card .visual-frame {
  display: flex;
  flex-direction: column;
}

.slider-shell {
  position: relative;
  flex: 1;
  min-height: 220px;
}

.slider-shell img,
.slider-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-controls {
  display: flex;
  gap: 0.7rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.88);
  border-top: 1px solid rgba(30, 31, 37, 0.08);
}

.slider-button {
  flex: 1;
  padding: 0.7rem 0.9rem;
}

.books-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.book-tile {
  padding: 0.9rem;
  border-radius: 24px;
  min-height: 24rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 44px rgba(30, 25, 16, 0.12);
  color: #fff9f2;
  overflow: hidden;
  position: relative;
}

.book-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 15%, rgba(10, 11, 15, 0.84) 100%);
}

.book-copy {
  position: relative;
  z-index: 1;
}

.book-copy h3,
.gallery-copy h3 {
  margin: 0;
}

.book-copy p,
.gallery-copy p {
  margin: 0.45rem 0 0;
  line-height: 1.5;
}

.status-pill {
  display: inline-flex;
  margin-bottom: 0.7rem;
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-card {
  padding: 0.8rem;
}

.gallery-media {
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  margin-bottom: 0.9rem;
}

.gallery-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-copy {
  padding: 0 0.4rem 0.4rem;
}

.viewer-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(14, 16, 21, 0.66);
  backdrop-filter: blur(8px);
  z-index: 20;
}

.viewer-modal.is-open {
  display: flex;
}

.viewer-dialog {
  width: min(1080px, 100%);
  max-height: calc(100vh - 2rem);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border-radius: 28px;
  background: var(--paper-strong);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

.viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}

.viewer-head h3,
.viewer-head p {
  margin: 0;
}

.viewer-head p {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.viewer-close {
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border-radius: 50%;
}

.viewer-body {
  min-height: 58vh;
}

.viewer-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #f8f5ef;
}

.viewer-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 2rem;
}

.viewer-empty .empty-card {
  width: min(640px, 100%);
  padding: 1.6rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(30, 31, 37, 0.08);
}

.viewer-empty h4 {
  margin: 0 0 0.6rem;
  font-family: var(--display-font);
  font-size: 1.7rem;
}

.viewer-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.footer-note {
  margin-top: 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .portfolio-intro {
    margin-bottom: 4rem;
  }

  .analysis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .books-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-list {
    gap: 4rem;
  }

  .portfolio-row {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .work-title {
    margin-bottom: 4rem;
  }

  .pinto-hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .pinto-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-experience-row,
  .work-project-row {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .portfolio-art {
    justify-content: flex-start;
  }

  .home-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .home-art {
    justify-content: flex-start;
  }

  .home-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-grid,
  .project-card,
  .game-card {
    grid-template-columns: 1fr;
  }

  .gateway-grid,
  .books-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 1rem, 1180px);
    padding-bottom: 3rem;
  }

  body[data-page="home"] .page-shell {
    width: min(100% - 1rem, 1152px);
  }

  body[data-page="product-design"] .page-shell,
  body[data-page="feature-suggestions"] .page-shell,
  body[data-page="generative-ai"] .page-shell,
  body[data-page="gamification"] .page-shell,
  body[data-page="game-design-analysis"] .page-shell,
  body[data-page="mda-framework"] .page-shell,
  body[data-page="web-games"] .page-shell,
  body[data-page="books"] .page-shell,
  body[data-page="invoxel"] .page-shell,
  body[data-page="appsoleut-coders"] .page-shell,
  body[data-page="xalt-labs"] .page-shell,
  body[data-page="pintobeans"] .page-shell {
    width: min(100% - 1rem, 1152px);
  }

  .home-shell {
    padding-top: 1.25rem;
  }

  .portfolio-shell {
    padding-top: 1.25rem;
  }

  .work-shell {
    padding-top: 1.5rem;
  }

  .pinto-hero {
    padding-top: 1.5rem;
  }

  .home-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
  }

  .home-nav {
    gap: 1.4rem;
    flex-wrap: wrap;
  }

  .home-card-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .home-copy p {
    max-width: 100%;
  }

  .portfolio-intro p,
  .portfolio-copy p {
    max-width: 100%;
  }

  .work-entry p,
  .work-project-media {
    max-width: 100%;
  }

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

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

  .books-wall {
    grid-template-columns: 1fr;
  }

  .analysis-intro,
  .pinto-intro-copy p,
  .pinto-gallery-section > p,
  .pinto-hero-card,
  .book-card {
    max-width: 100%;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-lockup {
    justify-content: center;
  }

  .home-link {
    width: 100%;
  }

  .intro-card,
  .page-hero {
    padding: 1.3rem;
  }

  .gateway-grid,
  .books-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: clamp(2.3rem, 14vw, 3.4rem);
  }

  .card-header {
    flex-direction: column;
  }
}
