:root {
  --bg: #f5f3ef;
  --panel: #ffffff;
  --panel-strong: #f0ece7;
  --ink: #171717;
  --muted: #5d5a57;
  --border: rgba(23, 23, 23, 0.12);
  --accent: #1d5d6b;
  --accent-soft: #dfeef1;
  --accent-2: #6f4d3b;
  --accent-3: #4e6b4d;
  --shadow: 0 18px 42px rgba(18, 18, 18, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Atkinson Hyperlegible", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

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

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

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.narrow-wrap {
  max-width: 760px;
}

.view-panel[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(245, 243, 239, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.main-nav a {
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--ink);
}

.hero {
  padding: 5rem 0 3rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  align-items: center;
  gap: 2.25rem;
}

.hero-copy {
  max-width: 760px;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.photo-frame {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.primary-photo {
  width: min(100%, 420px);
  border-radius: 30px 30px 0 30px;
}

.primary-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

.secondary-photo {
  width: min(100%, 300px);
  aspect-ratio: 3024 / 3613;
  border-radius: 28px 28px 0 28px;
}

.secondary-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #f3f1ee;
}

.about-photo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--accent);
}

h1,
h2,
h3,
p {
  margin: 0 0 1rem;
}

h1,
h2,
h3 {
  line-height: 1.1;
  letter-spacing: -0.05em;
}

h1 {
  font-size: clamp(2.7rem, 5vw, 5rem);
  max-width: 820px;
}

h2 {
  font-size: clamp(2rem, 3vw, 3rem);
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.lede {
  max-width: 620px;
  margin: 1rem 0 0;
  font-size: 1.15rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.45rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font: inherit;
}

.button:hover,
.button:focus-visible,
.text-button:hover,
.text-button:focus-visible {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  border: 1px solid var(--ink);
}

.button.secondary {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.5);
}

.text-button {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.status {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-copy .eyebrow {
  margin-bottom: 0.35rem;
}

.hero-copy .status {
  margin-top: 0;
}

.section {
  padding: 3.5rem 0;
}

.section.muted {
  background: var(--panel-strong);
}

.section-heading {
  margin-bottom: 1.5rem;
}

.section-heading.narrow {
  max-width: 700px;
}

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

.home-panel {
  padding-top: 1.5rem;
}

.blog-posts,
.illustration-grid {
  display: grid;
  gap: 1.1rem;
}

.project-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 30px 30px 0 30px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 1.2fr);
  gap: 1.5rem;
  align-items: center;
}

.project-copy {
  color: var(--ink);
}

.project-kicker {
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
}

.project-copy p,
.project-copy a,
.project-media p,
.games-intro,
.games-list,
.about-layout p {
  color: var(--muted);
}

.project-copy p a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.16em;
}

.project-copy p a:hover,
.project-copy p a:focus-visible {
  color: var(--accent);
}

.project-media,
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.media-card,
.media-item,
.project-media a {
  display: block;
  width: 100%;
  min-height: 220px;
  border-radius: 18px 18px 0 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f3f3f1;
}

.media-card img,
.media-card video,
.media-item img,
.media-item video,
.media-triple img,
.media-duo img,
.single-media img {
  border-radius: 18px 18px 0 18px;
  border: 1px solid var(--border);
  background: #f3f3f1;
}

.project-media > :only-child {
  grid-column: 1 / -1;
}

.illustration-preview img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.media-triple a {
  min-height: 0;
  aspect-ratio: 4 / 3;
}

.game-card-link {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border);
  border-radius: 28px 28px 0 28px;
  overflow: hidden;
  background: #f3f3f1;
}

.fence-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 28px 28px 0 28px;
}

.media-triple img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.media-duo img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.project-card:nth-of-type(3) .project-media.media-duo {
  grid-template-columns: repeat(2, minmax(0, 1.5fr));
  gap: 1rem;
}

.project-card:nth-of-type(3) .project-media.media-duo a {
  min-height: 340px;
}

.single-media img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
}

.single-media-image {
  width: 100%;
  height: 100%;
  max-height: 440px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 18px 18px 0 18px;
  display: block;
}

.project-media-text {
  min-height: 180px;
  border: 1px solid var(--border);
  background: var(--panel-strong);
  border-radius: 26px 26px 0 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.project-media-text p {
  margin: 0;
  font-size: 1rem;
  color: var(--ink);
}

.feature-spotlight {
  margin-bottom: 1.75rem;
  border-radius: 30px 30px 0 30px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel);
}

.feature-spotlight img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

.illustration-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.video-wrap {
  margin-top: 1rem;
  border-radius: 24px 24px 0 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

.project-video-wrap {
  grid-column: 1 / -1;
  width: min(72%, 760px);
  max-width: 100%;
  margin: 0.75rem auto 0;
  border: 1px solid var(--border);
  border-radius: 24px 24px 0 24px;
  overflow: hidden;
  background: #000;
}

.project-video-wrap video,
.video-wrap video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.project-video-wrap video {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

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

.art-grid-collapsible.is-collapsed {
  overflow: visible;
}

.art-grid-collapsible.is-collapsed .art-item-hidden {
  display: none;
}

.art-grid a {
  display: block;
  border: 1px solid var(--border);
  border-radius: 18px 18px 0 18px;
  overflow: hidden;
  background: var(--panel);
}

.art-grid img,
.art-grid video {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.visual-work-toggle {
  margin-top: 1rem;
  margin-left: auto;
  display: inline-block;
  border: 1px solid var(--border);
  background: var(--panel-strong);
  color: var(--ink);
  border-radius: 18px 18px 0 18px;
  padding: 0.7rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button:focus-visible,
.text-button:focus-visible,
.visual-work-toggle:focus-visible,
.main-nav a:focus-visible,
.contact-links a:focus-visible,
.mini-links a:focus-visible,
.project-media a:focus-visible,
.art-grid a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(23, 23, 23, 0.08);
}

.games-section {
  padding-top: 2rem;
}

.games-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.games-list li {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1fr);
  align-items: center;
  gap: 1.25rem;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 18px 18px 0 18px;
  padding: 0.9rem 1rem;
}

.game-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px 14px 0 14px;
  background: #f3f3f1;
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-title {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.16em;
}

.game-title:hover,
.game-title:focus-visible {
  color: var(--accent);
}

.games-list li p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.games-list a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.mini-links {
  margin-top: 1rem;
}

.mini-links a {
  display: inline-block;
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(200px, 0.7fr) minmax(0, 1.5fr);
  gap: 2rem;
  align-items: center;
}

.contact-section {
  padding-top: 0;
  scroll-margin-top: 90px;
}

.contact-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 3rem 2rem;
  background: var(--ink);
  color: #fff;
  border-radius: 30px 30px 0 30px;
}

.contact-box .eyebrow,
.contact-box h2 {
  color: #fff;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  font-weight: 600;
}

.contact-links a {
  color: #fff;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0 2rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 820px) {
  .hero-inner,
  .home-grid,
  .project-grid,
  .about-layout,
  .contact-box {
    grid-template-columns: 1fr;
    display: grid;
  }

  .main-nav {
    gap: 0.8rem;
    font-size: 0.85rem;
  }

  .hero {
    padding-top: 4rem;
  }

  .hero-visual,
  .about-photo-wrap {
    justify-content: center;
  }

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

  .media-triple img,
  .media-duo img {
    width: 100%;
  }

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

  .games-list li {
    grid-template-columns: 1fr;
  }

  .contact-box {
    padding: 1.5rem;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .footer-inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 0.75rem 0;
  }

  .main-nav {
    justify-content: center;
  }

  .button {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }

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