@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/BarlowCondensed-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root { color-scheme: dark; --ground: #111925; --raised: #1c2b3b; --line: #435367; --text: #f4f5ed; --muted: #bfcbcf; --blue: #586ef4; --amber: #ffc247; --body: "Barlow", Arial, sans-serif; --display: "Barlow Condensed", "Arial Narrow", sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }
body { margin: 0; background: var(--ground); color: var(--text); font: 400 16px/1.5 var(--body); }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--amber); color: var(--ground); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-track { background: var(--ground); }
::-webkit-scrollbar-thumb { background: #66788c; border: 2px solid var(--ground); }

.page-shell { min-height: 100vh; }
.top-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 78px; padding: 12px max(24px, calc((100vw - 1380px)/2)); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -.025em; white-space: nowrap; }
.brand::before { content: "CK"; display: grid; place-items: center; width: 39px; height: 39px; background: var(--amber); color: var(--ground); font: 700 22px/1 var(--display); }
.brand small { display: none; }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 2vw, 34px); }
.nav-link { position: relative; display: inline-flex; align-items: center; align-self: stretch; min-height: 53px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--text); }
.nav-link[aria-current="page"]::after { content: ""; position: absolute; inset: auto 0 0; height: 4px; background: var(--amber); }

main { width: min(100%, 1428px); margin: 0 auto; padding: 0 24px 100px; }
.page-section { margin-top: 72px; }
.hero-simple { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr); align-items: end; min-height: 450px; margin-top: 24px; background: var(--raised); }
.hero-copy { padding: clamp(28px, 5vw, 62px); }
.section-title { margin: 0 0 16px; font: 700 clamp(42px, 5.7vw, 76px)/.9 var(--display); letter-spacing: -.012em; text-transform: uppercase; }
.hero-simple .section-title { font-size: clamp(64px, 7vw, 96px); }
.lead { max-width: 55ch; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.hero-visual { height: 100%; min-height: 450px; background: #070c15; overflow: hidden; }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.legacy-page--art .hero-visual img { object-position: center 25%; }
.legacy-page--projects .hero-visual img { object-fit: cover; }
.link-row, .card-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn, .card-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; padding: 10px 15px; border: 1px solid var(--amber); background: var(--amber); color: var(--ground); font-size: 13px; font-weight: 600; line-height: 1.1; text-decoration: none; }
.btn:hover, .card-links a:hover { background: #f4b526; }
.btn.outline { border-color: var(--line); background: transparent; color: var(--text); }
.btn.outline:hover { border-color: var(--amber); color: var(--amber); }
.portfolio-grid, .game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 25px; }
.portfolio-card { display: flex; flex-direction: column; min-width: 0; min-height: 265px; padding: clamp(22px, 3vw, 35px); background: var(--raised); }
.portfolio-card:nth-child(3n + 1) { background: #2a3d55; }
.portfolio-card:nth-child(3n + 1) p, .portfolio-card:nth-child(3n + 1) .tech-tag { color: var(--text); }
.portfolio-card__header { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.portfolio-card h3 { margin: 0; font: 700 37px/.95 var(--display); text-transform: uppercase; }
.portfolio-card p { max-width: 63ch; margin: 16px 0; color: var(--muted); font-size: 14px; }
.pill { color: var(--amber); font-size: 11px; font-weight: 600; white-space: nowrap; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; }
.tech-tag { padding: 3px 8px; border: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.portfolio-card .card-links { margin-top: auto; padding-top: 22px; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 12px; margin-top: 25px; }
.gallery-card { min-width: 0; min-height: 220px; margin: 0; overflow: hidden; background: var(--raised); }
.gallery-card:first-child { grid-column: span 2; grid-row: span 2; }
.gallery-card:nth-child(5n + 3) { grid-column: span 2; }
.gallery-card img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; }
.gallery-card:first-child img { min-height: 450px; }
.demo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 25px; }
.demo { min-width: 0; margin: 0; }
.demo video { width: 100%; aspect-ratio: 16/9; background: #070c15; }
.demo figcaption { display: flex; justify-content: space-between; gap: 15px; padding-top: 12px; font: 700 28px/1 var(--display); text-transform: uppercase; }
.demo figcaption span { color: var(--amber); font: 600 11px/1.5 var(--body); text-transform: none; }
.video-slideshow-container { max-width: 850px; margin-top: 25px; background: #070c15; aspect-ratio: 16/9; }
.slideshow-video { width: 100%; height: 100%; object-fit: contain; }
.site-footer { display: flex; justify-content: space-between; padding: 25px max(24px, calc((100vw - 1380px)/2)); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

@media (max-width: 800px) {
  .top-bar { display: block; padding: 12px 18px 0; }
  .brand { margin-bottom: 10px; font-size: 17px; }
  .brand::before { width: 30px; height: 30px; font-size: 18px; }
  .nav-links { gap: 22px; overflow-x: auto; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-link { flex: 0 0 auto; min-height: 43px; font-size: 13px; }
  main { padding: 0 16px 65px; }
  .page-section { margin-top: 50px; }
  .hero-simple { display: flex; flex-direction: column-reverse; min-height: 0; margin-top: 16px; }
  .hero-visual { width: 100%; height: auto; min-height: 0; aspect-ratio: 16/9; }
  .hero-copy { width: 100%; padding: 23px 20px 28px; }
  .hero-simple .section-title { font-size: clamp(54px, 10vw, 76px); }
  .portfolio-grid, .game-grid, .demo-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .gallery-card:nth-child(5n + 3) { grid-column: span 1; }
  .gallery-card:first-child { grid-column: span 2; grid-row: auto; }
  .gallery-card:first-child img { min-height: 350px; }
  .gallery-card img { min-height: 190px; }
  .site-footer { padding: 20px 16px; }
}

@media (max-width: 420px) {
  .hero-simple .section-title { font-size: 55px; }
  .portfolio-card h3 { font-size: 30px; }
  .gallery-card:first-child img { min-height: 280px; }
  .gallery-card img { min-height: 160px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
