@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

@font-face {
  font-family: 'Changa One';
  src: url('assets/fonts/ChangaOne-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Continuum';
  src: url('assets/fonts/Continuum-Bold.ttf') format('truetype');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Continuum';
  src: url('assets/fonts/Continuum-Medium.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Jacquard 24';
  src: url('assets/fonts/Jacquard24-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* Every page surface follows the active game's palette. */
:root {
  color-scheme: dark;
  --paper: #171719;
  --ink: #f4f0e9;
  --muted: #a9a7a4;
  --line: #333335;
  --accent: #cbb596;
  --surface: #222225;
  --header-height: 96px;
  --gutter: clamp(22px, 4vw, 76px);
  --page-width: 1920px;
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--paper);
  transition: background-color 550ms ease, color 550ms ease;
}
:root[data-theme='quickchess'] {
  color-scheme: light;
  --paper: #e9f1fb;
  --ink: #203b59;
  --muted: #52677e;
  --line: #cad9eb;
  --accent: #345f90;
  --surface: #dae7f7;
}
:root[data-theme='cattennis'] {
  color-scheme: light;
  --paper: #f5f8f4;
  --ink: #26342c;
  --muted: #59695f;
  --line: #d9e2d6;
  --accent: #456d34;
  --surface: #e7eee2;
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-height) + 24px); }
body { margin: 0; background: var(--paper); transition: background-color 550ms ease; }
body:has(dialog[open]) { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}
button, a, summary { transition: color 200ms, background-color 250ms, box-shadow 250ms, transform 250ms; }
button:active, a:active { transform: translateY(1px); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Fixed identity and navigation; the header stays visible in the About section. */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px max(var(--gutter), calc((100vw - 1768px) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  transition: background-color 550ms, border-color 550ms, color 550ms;
}
.identity { display: flex; align-items: center; gap: 16px; font: 700 17px/1.3 'Manrope', sans-serif; letter-spacing: -.35px; white-space: nowrap; }
.identity { min-width: 0; }
.identity > span { min-width: 0; }
.brand-logo { display: block; width: 84px; height: auto; object-fit: contain; flex-shrink: 0; }
.identity-sub { display: block; white-space: normal; max-width: 300px; font: 400 12px/1.5 'DM Sans', sans-serif; color: var(--muted); margin-top: 4px; letter-spacing: .15px; }
.navigation { display: flex; align-items: center; gap: 34px; }
.nav-link { padding: 10px 0; background: none; color: var(--muted); font-size: 14px; white-space: nowrap; position: relative; }
.nav-link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 240ms ease; }
.nav-link.active, .nav-link:hover { color: var(--ink); }
.nav-link.active::after, .nav-link:hover::after { transform: scaleX(1); }

.portfolio {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: var(--header-height) var(--gutter) 0;
  max-width: var(--page-width);
  margin: auto;
  overflow: hidden;
}

/* Editorial achievement lockup: large figures, quiet labels, a single dividing rule. */
.achievements { padding: 24px 0 27px; }
.achievements-window { position: relative; overflow: hidden; perspective: 700px; padding: 4px 0; margin: -4px 0; }
.achievements-row { display: flex; align-items: center; gap: 26px; width: max-content; max-width: 100%; transform-origin: center; backface-visibility: hidden; }
.release-status { display: flex; align-items: center; height: calc(clamp(30px, 3.4vw, 52px) * .95); font: 500 clamp(28px, 3vw, 42px)/1.1 'Manrope', sans-serif; letter-spacing: -1px; }
.achievements-copy { position: absolute; top: 4px; left: 0; pointer-events: none; }
.stat { display: flex; align-items: center; gap: 12px; }
.stat + .stat { padding-left: 26px; border-left: 1px solid var(--line); transition: border-color 550ms; }
.stat-value { font: 500 clamp(30px, 3.4vw, 52px)/.95 'Manrope', sans-serif; letter-spacing: -2px; display: flex; align-items: baseline; }
.million { font-size: .74em; margin-left: 3px; letter-spacing: -2px; }
.stat-label { color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: 1.8px; line-height: 1.7; }

/* One continuous artwork surface. Captions sit over it, never in a separate panel. */
.showcase { min-height: 0; overflow: hidden; border-radius: 28px; position: relative; isolation: isolate; }
.track { display: flex; width: 100%; height: 100%; transition: transform 560ms cubic-bezier(.22,.8,.25,1); will-change: transform; touch-action: pan-y; }
.slide { flex: 0 0 100%; min-width: 0; height: 100%; position: relative; overflow: hidden; background: #101114; color: #f6f0e5; --slide-ink: #f6f0e5; --slide-muted: #d1cac0; }
.slide[data-theme='quickchess'] { background: #548fd4; color: #fff; --slide-ink: #203b59; --slide-muted: #f3f7ff; }
.slide[data-theme='quickchess'] .visual img { position: absolute; right: 0; width: 62%; object-fit: contain; }
.slide[data-theme='quickchess'] .visual-label, .slide[data-theme='quickchess'] .visual-index { display: none; }
.slide[data-theme='quickchess'] .game-caption { flex-direction: column; align-items: flex-start; }
.slide[data-theme='quickchess'] h1 { font-family: 'Changa One', sans-serif; font-weight: 400; letter-spacing: 0; font-size: clamp(40px, 5.2vw, 76px); }
.slide[data-theme='cattennis'] { background: #fff; color: #26342c; --slide-ink: #26342c; --slide-muted: #536158; }
.slide[data-theme='cattennis'] .visual img { position: absolute; right: 0; width: 55%; object-fit: contain; }
.slide[data-theme='cattennis'] .visual-label, .slide[data-theme='cattennis'] .visual-index { display: none; }
.slide[data-theme='cattennis'] .game-caption { flex-direction: column; align-items: flex-start; max-width: 60%; }
.slide[data-theme='cattennis'] h1 { font-family: 'Continuum', sans-serif; font-weight: 700; letter-spacing: -1px; }
.slide[data-theme='cattennis'] .game-description { max-width: 390px; }
.visual { position: absolute; inset: 0; overflow: hidden; display: grid; place-items: center; }
.visual img, .visual video { width: 100%; height: 100%; object-fit: contain; }
.has-gallery .visual::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, #09090b08 25%, #09090b18 45%, #09090ba8 78%, #09090bea 100%), linear-gradient(90deg, #09090b28, transparent 55%);
}
.screenshot-gallery { position: absolute; inset: 0; overflow: hidden; }
.screenshot-gallery .game-screenshot { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0; transition: opacity 900ms ease-in-out; pointer-events: none; }
.screenshot-gallery .game-screenshot.is-current { opacity: 1; }
.game-caption { position: absolute; inset: auto 0 0; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: clamp(28px, 3.7vw, 64px); }
.game-caption > div { min-width: 0; }
.game-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; font-size: 12px; letter-spacing: 2.8px; color: var(--slide-muted); }
.meta-line { width: 22px; height: 1px; background: currentColor; }
h1 { font: 700 clamp(40px, 6vw, 86px)/1.05 'Manrope', sans-serif; letter-spacing: -2.5px; margin: 0; }
.slide[data-theme='knightbound'] h1 { font-family: 'Jacquard 24', Georgia, serif; font-size: clamp(68px, 8vw, 126px); line-height: .95; font-weight: 400; letter-spacing: 0; text-shadow: 0 3px 0 #0b0b0ee0, 0 6px 28px #0008; }
.game-description { font-size: 16px; line-height: 1.55; margin: 16px 0 0; color: var(--slide-muted); }
.view-game, .visit-link { display: inline-flex; align-items: center; justify-content: center; gap: 30px; flex-shrink: 0; border-radius: 4px; padding: 17px 23px; font-size: 14px; font-weight: 500; line-height: 1.4; white-space: nowrap; background: var(--slide-ink, var(--ink)); color: #171719; border: 1px solid transparent; }
.slide:not([data-theme='knightbound']) .view-game { background: var(--slide-ink); color: #fff; }
.game-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.social-link { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 54px; flex-shrink: 0; color: #f2ece2; border: 1px solid #f2ece238; border-radius: 4px; background: #17171945; }
.social-link:hover { background: #f2ece219; border-color: #f2ece280; transform: translateY(-2px); }
.slide[data-theme='cattennis'] .social-link { color: #26342c; border-color: #26342c40; background: #fff; }
.slide[data-theme='cattennis'] .social-link:hover { background: #edf2e9; border-color: #26342c80; }
.slide[data-theme='cattennis'] .social-link:focus-visible { outline-color: #456d34; }
.social-link:focus-visible { outline-color: #f1c6a6; }
.view-game span { font-size: 20px; line-height: 1; }
.slide[data-theme='knightbound'] .view-game { background: #f2ece2; color: #241b1b; box-shadow: 0 0 28px 5px #ce383533, 0 8px 34px #ca252524; border-color: #ffe5dc; }
.slide[data-theme='knightbound'] .view-game:hover { background: #fff5ed; box-shadow: 0 0 35px 8px #ce38354d, 0 8px 34px #ca252538; transform: translateY(-2px); }
.slide[data-theme='knightbound'] .view-game:focus-visible { outline-color: #f1c6a6; }
.slide:not([data-theme='knightbound']) .view-game:hover { transform: translateY(-2px); filter: brightness(1.15); }
.game-caption > div, .game-caption > .view-game { opacity: 0; transform: translateY(16px); transition: opacity 360ms ease, transform 500ms cubic-bezier(.22,.8,.25,1); }
.slide.is-active .game-caption > div, .slide.is-active .game-caption > .view-game { opacity: 1; transform: translateY(0); transition-delay: 120ms; }
.slide.is-active .game-caption > .view-game { transition-delay: 180ms; }
.slide.is-active .game-caption > .view-game:hover { transform: translateY(-2px); }

.visual-label, .visual-index { position: absolute; top: 28px; font-size: 11px; letter-spacing: 1.5px; color: var(--slide-muted); }
.visual-label { left: 32px; }
.visual-index { right: 32px; }
.has-gallery .visual-label, .has-gallery .visual-index { display: none; }
.scroll-footer { text-align: center; padding: 23px 0 25px; font-size: 12px; letter-spacing: 1px; color: var(--muted); }

/* The lower page shares the active game's theme and uses open editorial columns. */
.profile-content { max-width: var(--page-width); margin: 0 auto; padding: 0 var(--gutter); }
.about-section { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 8vw, 120px); padding: 110px 0; border-top: 1px solid var(--line); }
.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: 2px; color: var(--accent); }
.about-section h2 { font: 500 clamp(65px, 8vw, 118px)/.97 'Manrope', sans-serif; letter-spacing: -5px; margin: 28px 0 0; }
.developer-location { margin: 18px 0 0; font-size: 17px; line-height: 1.5; color: var(--muted); }
.developer-photo { display: block; width: 100%; max-width: 430px; height: auto; margin-top: 36px; border-radius: 28px; }
.name-period { color: var(--accent); }
.about-copy { max-width: 600px; padding-top: 37px; }
.about-copy p { font-size: 17px; line-height: 1.8; color: var(--muted); margin: 0 0 24px; }
.about-copy .about-intro { font: 500 clamp(25px, 2.4vw, 34px)/1.35 'Manrope', sans-serif; letter-spacing: -.8px; color: var(--ink); margin-bottom: 26px; }
.project-facts { display: flex; flex-wrap: wrap; gap: 22px 38px; padding: 25px 0; margin: 32px 0 14px; border-top: 1px solid var(--line); }
.project-facts dt { font-size: 11px; letter-spacing: 1px; color: var(--muted); margin-bottom: 9px; }
.project-facts dd { margin: 0; font-size: 14px; color: var(--ink); }
.contact-links { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
.contact-action { display: inline-flex; align-items: center; gap: 45px; padding: 14px 0; background: none; border-bottom: 1px solid var(--accent); font-size: 15px; color: var(--ink); }
.contact-action:hover { color: var(--accent); }
.information-section { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 8vw, 120px); padding: 55px 0 70px; border-top: 1px solid var(--line); }
.information-section h2 { font: 500 22px/1.4 'Manrope', sans-serif; letter-spacing: -.5px; margin: 0; }
.information-list details { border-bottom: 1px solid var(--line); }
.information-list summary { padding: 20px 0; cursor: pointer; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.information-list summary::-webkit-details-marker { display: none; }
.information-list summary::after { content: '+'; font-size: 22px; font-weight: 400; color: var(--muted); }
.information-list details[open] summary::after { content: '−'; }
.information-list details:first-child summary { padding-top: 0; }
.information-list p { color: var(--muted); font-size: 16px; line-height: 1.7; margin: 0; padding: 0 30px 20px 0; }
.site-footer { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding: 26px 0 35px; font-size: 12px; color: var(--muted); }

/* Native dialogs keep their contrast in every game theme. */
dialog { border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink); padding: 42px; width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 32px); box-shadow: 0 25px 100px #0005; }
dialog::backdrop { background: #08090c99; backdrop-filter: blur(8px); }
.close { position: absolute; right: 12px; top: 10px; background: transparent; width: 44px; height: 44px; font-size: 27px; }
dialog h2 { font: 600 34px/1.15 'Manrope', sans-serif; letter-spacing: -1px; margin: 18px 0; }
dialog p { font-size: 16px; line-height: 1.7; color: var(--muted); margin: 0; }
.visit-link { margin-top: 25px; background: var(--ink); color: var(--paper); }

@media (max-width: 1050px) {
  .achievements-window { min-height: 90px; }
  .achievements-row { width: 100%; min-height: 82px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; align-content: center; }
  .stat + .stat { padding-left: 0; border-left: 0; }
  .stat:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
  .stat-value { font-size: 30px; }
  .stat-label { font-size: 9px; letter-spacing: 1px; }
  .release-status { grid-column: 1 / -1; }
}
@media (max-width: 850px) {
  .game-caption { flex-direction: column; align-items: flex-start; gap: 25px; }
  .game-description { margin-top: 12px; }
  .about-section, .information-section { gap: 40px; }
}
@media (max-width: 850px) {
  .slide[data-theme='quickchess'] .visual img { width: 100%; }
  .slide[data-theme='cattennis'] .visual img { width: 100%; height: 72%; top: 0; }
  .slide[data-theme='cattennis'] .game-caption { max-width: 100%; }
  .slide[data-theme='cattennis'] .visual::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 45%, #fff 76%); pointer-events: none; }
  .slide[data-theme='quickchess'] .visual::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 45%, #173958c9 100%); pointer-events: none; }
}
@media (max-width: 600px) {
  .release-status { height: calc(39px * .95); font-size: 28px; }
  :root { --header-height: 70px; --gutter: 18px; }
  .header { padding: 17px 18px; gap: 12px; }
  .brand-logo { width: 55px; }
  .identity { font-size: 14px; gap: 8px; }
  .identity-sub { display: none; }
  .navigation { gap: 15px; }
  .nav-link { font-size: 12px; }
  .achievements { padding: 20px 0 22px; }
  .achievements-window { min-height: 132px; }
  .achievements-row { min-height: 124px; gap: 12px 20px; }
  .stat { flex-direction: column; align-items: flex-start; gap: 5px; }
  .stat:nth-child(even) { padding-left: 14px; }
  .stat-value { font-size: 27px; letter-spacing: -1.5px; }
  .stat-label { font-size: 9px; line-height: 1.65; letter-spacing: 1px; }
  .million { margin-left: 2px; letter-spacing: -1px; }
  .game-caption { padding: 25px; gap: 23px; }
  .game-meta { font-size: 11px; margin-bottom: 9px; }
  h1 { font-size: 43px; letter-spacing: -1.5px; }
  .slide[data-theme='knightbound'] h1 { font-size: clamp(42px, 14.4vw, 68px); }
  .game-description { font-size: 14px; line-height: 1.5; margin-top: 12px; }
  .view-game { padding: 14px 18px; gap: 26px; font-size: 13px; }
  .has-gallery .visual::after { background: linear-gradient(180deg, transparent 25%, #10111420 48%, #10111499 70%, #101114f2 100%); }
  .visual-label, .visual-index { top: 20px; font-size: 10px; }
  .visual-label { left: 24px; }
  .visual-index { right: 24px; }
  .scroll-footer { padding: 19px 0; font-size: 11px; }
  .about-section { grid-template-columns: 1fr; gap: 30px; padding: 60px 0; }
  .about-section h2 { font-size: 76px; letter-spacing: -3.5px; margin-top: 24px; }
  .about-copy { padding-top: 0; }
  .about-copy p { font-size: 16px; }
  .about-copy .about-intro { font-size: 26px; }
  .project-facts { gap: 22px; }
  .information-section { grid-template-columns: 1fr; gap: 35px; padding: 40px 0 50px; }
  dialog { padding: 36px 27px; }
}
@media (max-width: 360px) {
  .brand-logo { width: 42px; }
  .identity { font-size: 13px; gap: 6px; }
  .navigation { gap: 9px; }
  .nav-link { font-size: 11px; }
  .header { gap: 8px; }
  .achievements-row { gap: 13px; }
  .stat { gap: 7px; }
  .stat:nth-child(even) { padding-left: 10px; }
  .stat-label { font-size: 8px; letter-spacing: .4px; }
  .game-caption { padding: 21px; }
}
@media (max-height: 550px) and (min-width: 601px) {
  .release-status { height: calc(32px * .95); font-size: 28px; }
  .header { padding-top: 9px; padding-bottom: 9px; }
  .identity-sub { display: none; }
  .brand-logo { width: 58px; }
  .achievements { padding: 12px 0; }
  .stat-value { font-size: 28px; }
  .stat-label { font-size: 9px; }
  .game-caption { padding: 20px 25px; flex-direction: row; gap: 20px; align-items: flex-end; }
  .game-meta { margin-bottom: 5px; font-size: 10px; }
  .slide[data-theme='knightbound'] h1 { font-size: 58px; }
  h1 { font-size: 35px; }
  .game-description { font-size: 13px; margin-top: 7px; }
  .view-game { padding: 12px 16px; font-size: 12px; gap: 20px; }
  .scroll-footer { padding: 12px 0; }
  .visual-label, .visual-index { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Readable standalone website policies and company disclosures. */
.company-details { max-width: 580px; font-size: 12px; line-height: 1.7; margin: 12px 0 0; }
.site-footer { gap: 30px; flex-wrap: wrap; }
.footer-legal-links { display: flex; flex-wrap: wrap; gap: 20px; }
.information-list p a, .footer-legal-links a, .legal-page a { text-decoration: underline; text-underline-offset: 4px; }
.legal-page { max-width: 860px; margin: 0 auto; padding: 145px 28px 70px; }
.legal-page h1 { font-size: clamp(34px, 5vw, 58px); letter-spacing: -1.5px; margin: 22px 0 30px; }
.legal-page h2 { font: 600 22px/1.4 'Manrope', sans-serif; margin: 34px 0 14px; }
.legal-page p { color: var(--muted); font-size: 16px; line-height: 1.85; margin: 0 0 18px; overflow-wrap: anywhere; }
.legal-page .legal-notice { border-left: 2px solid var(--accent); padding: 15px 20px; background: var(--surface); color: var(--ink); }
.legal-related { margin-top: 45px !important; }
.legal-footer { max-width: 804px; margin: 0 auto; padding: 28px 28px 45px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.8; }
