*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --acid-green: #C6FF00;
  --acid-green-bright: #E4FF5C;
  --mobile-header-h: 66px;
}

:root,
:root[data-theme="dark"]
{
--bg: #0A0C08;
--bg-inner: #141810;
--text: #EEFAD0;
--muted: #708A40;
--rule: #1C2616;
  --accent-r:#88C020;
--link: #88C020;
--link-hover: #EEFAD0;
  --font-head: 'Oswald', sans-serif;
  --font-body: 'Source Serif 4', serif;
  --font-ui: 'Source Sans 3', sans-serif;
  --col: 720px;
}

:root[data-theme="light"]
{
--bg: #F4F8E8;
--bg-inner: #E5EBD6;
--text: #12160B;
--muted: #5C7530;
--rule: #D8E0C4;
  --accent-r:#88C020;
--link: #88C020;
--link-hover: #12160B;
}

html { scroll-behavior: smooth; }
body { transition: background 0.2s, color 0.2s; }

body 
{
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.75;
  cursor: url('images/cursor/acid-green-cursor-32.png') 4 4, auto;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

a, button {
  cursor: url('images/cursor/acid-green-cursor-32.png') 4 4, pointer;
}

/*
  SIDEBAR SHELL
*/
.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 230px;
  flex-shrink: 0;
  padding: 40px 16px;
  border-right: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 61;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-image:
    linear-gradient(rgba(198, 255, 0, 0.72), rgba(198, 255, 0, 0.72)),
    url('images/acid_pattern.png');
  background-repeat: no-repeat, repeat;
  background-size: cover, 230px auto;
  background-position: center, 0 0;
  animation: acid-scroll-x 10s linear infinite;
  --text: #0A0C08;
  --muted: #0A0C08;
  --link: #0A0C08;
  --link-hover: #0A0C08;
  --rule: rgba(10, 12, 8, 0.25);
  --bg: var(--acid-green);
  --bg-inner: var(--acid-green);
}
@keyframes acid-scroll-x {
  from { background-position: center, 0 0; }
  to   { background-position: center, -230px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar, #games-flyout { animation: none; }
}

.sidebar-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  width: 100%;
}
.sidebar-logo .logo-name {
  text-align: center;
  width: 100%;
}

.sidebar-tagline {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 36px;
}
.sidebar-tagline .pipe { color: var(--light); }

.side-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  margin-bottom: auto;
}
.side-nav .nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 90%;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FFFFFF;
  background: #7B1ABF;
  border: 2px solid #3D0A63;
  border-radius: 3px;
  padding: 11px 26px;
  text-decoration: none;
  box-shadow: 3px 3px 0 rgba(10, 12, 8, 0.35);
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
}
.side-nav .nav-item:hover {
  color: #FFFFFF;
  background: #9531D9;
  text-decoration: none;
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 rgba(10, 12, 8, 0.35);
}
.side-nav .nav-item.active {
  color: #FFFFFF;
  background: #9531D9;
  border-color: #2A0748;
}

.side-nav .nav-item.has-flyout {
  gap: 8px;
}
.side-nav .nav-item.has-flyout .flyout-chevron {
  position: static;
  transform: none;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  color: #FFFFFF;
  transition: transform 0.2s;
}
.side-nav .nav-item.has-flyout:hover .flyout-chevron,
.side-nav .nav-item.has-flyout.flyout-active .flyout-chevron {
  color: #FFFFFF;
  transform: translateX(3px);
}

/* GAMES SIDEWAYS FLYOUT */
#games-flyout {
  position: fixed;
  z-index: 600;
  width: 240px;
  background-image:
    linear-gradient(rgba(198, 255, 0, 0.72), rgba(198, 255, 0, 0.72)),
    url('images/acid_pattern.png');
  background-repeat: no-repeat, repeat;
  background-size: cover, 230px auto;
  background-position: center, 0 0;
  animation: acid-scroll-x 10s linear infinite;
  border: 1px solid rgba(10, 12, 8, 0.25);
  box-shadow: 6px 6px 0 rgba(10, 12, 8, 0.18);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  pointer-events: none;
}
#games-flyout.open {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}
#games-flyout::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 22px;
  width: 12px;
  height: 12px;
  background: var(--acid-green);
  border-left: 1px solid rgba(10, 12, 8, 0.25);
  border-bottom: 1px solid rgba(10, 12, 8, 0.25);
  transform: rotate(45deg);
}
.flyout-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px;
  text-decoration: none;
  color: #0A0C08;
  transition: background 0.15s, color 0.15s;
}
.flyout-item:hover,
.flyout-item:focus-visible {
  background: rgba(10, 12, 8, 0.12);
  color: #0A0C08;
  text-decoration: none;
}
.flyout-item img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(10, 12, 8, 0.08);
}
.flyout-item span {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
@media (max-width: 880px) {
  #games-flyout { display: none !important; }
}

.sidebar-socials {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding-top: 14px;
  margin-top: 12px;
}
.sidebar-socials .p1-social-icon svg {
  width: 26px;
  height: 26px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* RETRO ARCADE BUTTONS */
.theme-toggle,
.menu-btn {
  --pxl: 5px;
  clip-path: polygon(
    0 var(--pxl), var(--pxl) var(--pxl), var(--pxl) 0,
    calc(100% - var(--pxl)) 0, calc(100% - var(--pxl)) var(--pxl), 100% var(--pxl),
    100% calc(100% - var(--pxl)), calc(100% - var(--pxl)) calc(100% - var(--pxl)), calc(100% - var(--pxl)) 100%,
    var(--pxl) 100%, var(--pxl) calc(100% - var(--pxl)), 0 calc(100% - var(--pxl))
  );
  border-radius: 0;
  border: none;
  background: var(--acid-green);
  color: #0A0C08;
  box-shadow: 4px 4px 0 rgba(10, 12, 8, 0.85);
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.15s ease;
}
.theme-toggle:hover,
.menu-btn:hover {
  filter: brightness(1.1);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(10, 12, 8, 0.85);
  color: #0A0C08;
  text-decoration: none;
}
.theme-toggle:active,
.menu-btn:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 rgba(10, 12, 8, 0.85);
}
@media (prefers-reduced-motion: reduce) {
  .theme-toggle, .menu-btn,
  .theme-toggle:hover, .menu-btn:hover,
  .theme-toggle:active, .menu-btn:active {
    transition: none;
  }
}

/* PLAY BUTTONS — styled like the navbar buttons */
.proj-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  padding: 9px 18px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FFFFFF;
  background: #7B1ABF;
  border: 2px solid #3D0A63;
  border-radius: 3px;
  box-shadow: 3px 3px 0 rgba(10, 12, 8, 0.35);
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
}
.proj-play-btn:hover {
  color: #FFFFFF;
  background: #9531D9;
  text-decoration: none;
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 rgba(10, 12, 8, 0.35);
}
.proj-play-btn:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 rgba(10, 12, 8, 0.35);
}
@media (prefers-reduced-motion: reduce) {
  .proj-play-btn,
  .proj-play-btn:hover,
  .proj-play-btn:active {
    transition: none;
  }
}


.theme-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  margin: auto auto 0;
  padding: 0;
}
.theme-toggle svg { flex-shrink: 0; }

:root[data-theme="light"] .theme-toggle,
:root[data-theme="light"] .theme-toggle:hover {
  background: #FFFFFF;
  color: #0A0C08;
}
:root[data-theme="dark"] .theme-toggle,
:root[data-theme="dark"] .theme-toggle:hover {
  background: #0A0C08;
  color: #FFFFFF;
}

.top-bar .theme-toggle {
  width: 44px;
  height: 44px;
  margin: 0 10px 0 0;
}

/* MOBILE TOP BAR */
.mobile-header {
  display: none;
}
.top-bar {
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule);
  background-image:
    linear-gradient(rgba(198, 255, 0, 0.72), rgba(198, 255, 0, 0.72)),
    url('images/acid_pattern.png');
  background-repeat: no-repeat, repeat;
  background-size: cover, 230px auto;
  background-position: center, 0 0;
  animation: acid-scroll-x 10s linear infinite;

  --text: #0A0C08;
  --muted: #0A0C08;
  --link: #0A0C08;
  --link-hover: #0A0C08;
  --rule: rgba(10, 12, 8, 0.25);
  --bg: var(--acid-green);
  --bg-inner: var(--acid-green);
}
@media (prefers-reduced-motion: reduce) {
  .top-bar { animation: none; }
}

.top-bar .menu-btn {
  background: #0A0C08;
  color: var(--acid-green);
}
.top-bar .menu-btn:hover {
  background: #0A0C08;
  color: var(--acid-green);
}

.logo-block {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 9px 16px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 6px 20px 18px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
.mobile-nav.open { display: flex; align-items: center; gap: 8px; }
.mobile-nav .nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FFFFFF;
  background: #7B1ABF;
  border: 2px solid #3D0A63;
  border-radius: 3px;
  text-align: center;
  padding: 10px 26px;
  text-decoration: none;
  box-shadow: 3px 3px 0 rgba(10, 12, 8, 0.35);
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
}
.mobile-nav .nav-item:hover {
  color: #FFFFFF;
  background: #9531D9;
  text-decoration: none;
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 rgba(10, 12, 8, 0.35);
}
.mobile-nav .nav-item.active { color: #FFFFFF; background: #9531D9; border-color: #2A0748; }

.mobile-nav-socials {
  display: flex;
  justify-content: center;
  gap: 22px;
  width: 100%;
  padding-top: 14px;
  margin-top: 8px;
  border-top: 1px solid var(--rule);
}
.mobile-nav-socials .p1-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}
.mobile-nav-socials .p1-social-icon svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 880px) {
  .sidebar { display: none; }
  .mobile-header {
    display: block;
    position: sticky;
    top: 0;
    z-index: 550;
  }
  .top-bar { display: flex; }
  body { font-size: 15px; }
}

/* MAIN CONTENT COLUMN */
main {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 48px 56px 90px;
}
@media (max-width: 880px) {
  main { padding: 32px 20px 60px; }
}

.content-section {
  padding: 50px 0 56px;
}
#home.content-section { padding-top: 6px; }

.hl-title {
  display: block;
  width: fit-content;
  margin: 0 auto 18px;
  font-family: var(--font-ui);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  color: #FFFFFF;
  background: #7B1ABF;
  border: 2px solid #3D0A63;
  border-radius: 3px;
  padding: 14px 30px;
  box-shadow: 3px 3px 0 rgba(10, 12, 8, 0.35);
}
#games.content-section { padding-top: 10px; }
@media (max-width: 700px) {
  .hl-title { font-size: 19px; padding: 12px 18px; }
}

.logo-name {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}
.sidebar-logo .logo-name {
  font-size: 19px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.logo-name span { color: var(--text); }

.logo-sep {
  color: var(--text);
  font-size: 18px;
  margin: 0 4px;
  animation: blink-cursor 1.1s step-end infinite;
  line-height: 1;
}
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/*HOME PAGE*/
.home-intro { margin-bottom: 18px; }
.home-intro h1 {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
  text-align: left;
}
.home-intro p { margin-bottom: 12px; font-size: 16px; color: var(--text); }
.home-subtitle { font-family: var(--font-body); font-size: 18px; font-weight: 600; }
/* Thumbnail grid */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 150px));
  justify-content: center;
  gap: 6px;
}
.thumb-grid a {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: #ccc;
}
.thumb-grid a img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.85);
  transition: filter 0.25s, transform 0.25s;
}
.thumb-grid a:hover img { filter: saturate(1.1); transform: scale(1.05); }

/* Games rows */
.games-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.project-row {
  display: flex;
  align-items: stretch;
  gap: 20px;
  padding: 56px 40px;
}

.project-row.reverse {
  flex-direction: row-reverse;
}

@keyframes wave-scroll {
  from { background-position: 0 0; }
  to   { background-position: 1690px 0; }
}

@media (max-width: 700px) {
  .project-row,
  .project-row.reverse {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 32px 16px;
  }
}

.project-row-img {
  display: block;
  flex: 0 0 56%;
  width: 56%;
  aspect-ratio: 800/250;
  overflow: hidden;
  background: #bbb;
  box-shadow: 0 8px 28px rgba(0,0,0,0.28);
}
.project-row-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.9);
  transition: filter 0.3s, transform 0.3s;
}
.project-row-img:hover img { filter: saturate(1.15); transform: scale(1.02); }

@media (max-width: 700px) {
  .project-row-img { flex: 0 0 auto; width: 100%; }
}

.project-row-text {
  flex: 1 1 44%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.project-row-text .hl-box {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}
.project-row-text p {
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 10px;
}
.project-row-text .hl-box p {
  font-weight: 700;
  font-size: 17px;
}
@media (max-width: 700px) {
  .project-row-text { text-align: center; align-items: center; }
}

/* Play button as its own column, matching banner height */
.project-row > .proj-play-btn {
  flex: 0 0 140px;
  width: 140px;
  margin-top: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 8px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
}
.project-row > .proj-play-btn svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
@media (max-width: 700px) {
  .project-row > .proj-play-btn,
  .project-row.reverse > .proj-play-btn {
    flex: 0 0 auto;
    width: 100%;
    align-self: stretch;
    flex-direction: row;
    padding: 14px 20px;
    font-size: 16px;
  }
}

/* PROJECT DETAIL OVERLAY */
#project-detail {
  display: none;
  position: fixed;
  top: 0; right: 0; bottom: 0;
  left: 230px;
  z-index: 500;
  background: var(--bg);
  overflow-y: auto;
}
#project-detail.active { display: block; }

@media (max-width: 880px) {

  #project-detail { left: 0; top: var(--mobile-header-h); }
}

.pd-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 72px) 60px;
}
@media (max-width: 880px) {
  .pd-inner { padding: 0 20px 60px; }
}
.pd-title-hl {
  display: block;
  width: fit-content;
  margin: 28px auto 28px;
  font-family: var(--font-head);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  color: #0A0C08;
  background: var(--acid-green-bright);
  border: 2px solid #0A0C08;
  border-radius: 3px;
  padding: 16px 40px;
  box-shadow: 3px 3px 0 rgba(10, 12, 8, 0.35);
}
@media (max-width: 700px) {
  .pd-title-hl { font-size: 21px; padding: 12px 20px; margin: 18px auto 22px; }
}

/* When the title image is paired with the stat/meta box (.pd-hero-meta-wrap:
   1fr photo column + 260px meta column + 20px gap), the photo itself only
   occupies the left column — its visual center sits 140px left of the full
   content area's center (half of the 260px + 20px it's sharing the row
   with). Shift the title and the intro pull-quote by that same fixed
   amount so they read as centered against the photo, not the whole row.
   Only applied once the content area is wide enough (~1050px+) that the
   shift can't push either box past the left edge. */
@media (min-width: 1050px) {
  .pd-inner:has(> #pd-content > .pd-hero-meta-wrap:first-child) > .pd-title-hl,
  .pd-inner:has(> #pd-content > .pd-hero-meta-wrap:first-child) #pd-content > .pd-quote {
    transform: translateX(-140px);
  }
}

/* Back / Play buttons live in the navbar (sidebar + mobile menu) and only
   appear while the project detail overlay is open. Selectors below are
   scoped to .side-nav / .mobile-nav so they out-specificity the base
   ".side-nav .nav-item" / ".mobile-nav .nav-item" display rules and
   actually stay hidden when the detail overlay is closed. */
.side-nav .nav-item.pd-nav-item,
.mobile-nav .nav-item.pd-nav-item {
  display: none;
  gap: 8px;
  width: 190px;
  max-width: none;
  box-sizing: border-box;
}
body.pd-open .side-nav .nav-item.pd-nav-item,
body.pd-open .mobile-nav .nav-item.pd-nav-item {
  display: inline-flex;
}
/* Space instead of a divider line: a bit of extra room below "Back to
   Page", which is now the last of the two added buttons, sitting right
   above "Home". */
.side-nav .nav-item.pd-nav-item.pd-nav-last,
.mobile-nav .nav-item.pd-nav-item.pd-nav-last {
  margin-bottom: 10px;
}
.mobile-nav .nav-item.pd-nav-item { width: 100%; }
.pd-image {
  width: 100%;
  overflow: hidden;
  background: var(--bg-inner);
  margin-bottom: 16px;
}
.pd-image img { width: 100%; height: auto; max-height: 420px; display: block; object-fit: cover; }
.pd-image-placeholder { width: 100%; aspect-ratio: 16/7; background: linear-gradient(135deg, #1B2A3B, #243547); }

/* Two standalone images side by side (auto-paired), shorter overall page */
.pd-image-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.pd-image-cell {
  overflow: hidden;
  background: var(--bg-inner);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-image-cell img {
  width: 100%;
  height: 260px;
  display: block;
  object-fit: cover;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Freeform content */
.pd-content { }

.pd-block-hero {
  width: 100%;
  margin-bottom: 20px;
}
.pd-block-hero img {
  width: 100%;
  height: auto;
  max-height: 440px;
  display: block;
  object-fit: cover;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.pd-block-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 22px;
}

.pd-block-row-duo {
  display: grid;
  grid-template-columns: 1fr 1fr 0.8fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 22px;
}

.pd-block-img {
  width: 100%;
  height: 260px;
  overflow: hidden;
  background: var(--bg-inner);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-block-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.pd-block-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.pd-block-text p {
  font-size: 17px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 10px;
}
.pd-block-text p:last-child { margin-bottom: 0; }
.pd-block-text p strong { color: var(--accent-r); }

/* Legacy fallback*/
.pd-content > p {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.78;
  margin-bottom: 20px;
}
.pd-content > p strong { color: var(--text); }

/* Long-form passages */
.pd-block-longtext {
  max-width: var(--col);
  margin: 0 auto 22px;
}
.pd-block-longtext p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 14px;
}
.pd-block-longtext p:last-child { margin-bottom: 0; }
.pd-block-longtext p strong { color: var(--accent-r); }
.pd-block-longtext p em { color: var(--text); }

/* Stat / meta info grid (Role, Tools, Team, Duration, etc.) — yellow highlight box */
.pd-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 14px 20px;
  max-width: 480px;
  margin: 0 auto 24px;
  background: var(--acid-green-bright);
  color: #0A0C08;
  border: 2px solid #0A0C08;
  border-radius: 3px;
  padding: 18px 20px;
  box-shadow: 3px 3px 0 rgba(10, 12, 8, 0.35);
}
.pd-meta-item { min-width: 0; text-align: center; }
.pd-meta-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #3D4A22;
  margin-bottom: 5px;
}
.pd-meta-value {
  display: block;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: #0A0C08;
  line-height: 1.45;
  white-space: pre-line;
}

/* Hero/first image paired with the meta box, side by side — image left, stat box right */
.pd-hero-meta-wrap {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 24px;
}
.pd-hero-meta-wrap .pd-block-hero,
.pd-hero-meta-wrap .pd-image { margin-bottom: 0; }
.pd-hero-meta-wrap .pd-meta {
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
@media (max-width: 700px) {
  .pd-hero-meta-wrap { grid-template-columns: 1fr; }
}

/* Section headings that break the page into named chunks */
.pd-heading {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-r);
  margin: 34px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.pd-heading:first-child { margin-top: 0; }

/* Heading-delimited sections (Level Design, World & Lore, etc.) laid out
   two per row instead of stacking each one full-width down the page.
   This uses two independent flex columns (instead of a CSS grid with
   shared row tracks) so a tall section in one column — e.g. a "Catch &
   Battle" section with several stacked images — doesn't stretch the row
   height for its shorter neighbour and leave a gap before the next
   section in that neighbour's column. Each column simply stacks its own
   sections top to bottom at their natural height. */
.pd-sections-grid {
  display: flex;
  align-items: flex-start;
  gap: 30px;
}
.pd-sections-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pd-section { min-width: 0; }
/* Half-width columns are tight, so keep each section's own image+text
   rows stacked (image above text) instead of side by side. */
.pd-section .pd-block-row,
.pd-section .pd-block-row-duo {
  grid-template-columns: 1fr;
}
@media (max-width: 700px) {
  .pd-sections-grid { flex-direction: column; gap: 0; }
  .pd-sections-col { gap: 0; }
}

/* Pull-quote style intro/summary passage — yellow highlight box */
.pd-quote {
  max-width: var(--col);
  margin: 0 auto 22px;
  background: var(--acid-green-bright);
  color: #0A0C08;
  border: 2px solid #0A0C08;
  border-radius: 2px;
  padding: 16px 20px;
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.7;
}

/* Bulleted lists (key learnings, contributions, details) */
.pd-bullets {
  max-width: var(--col);
  margin: 0 auto 22px;
  list-style: none;
}
.pd-bullets li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}
.pd-bullets li:last-child { margin-bottom: 0; }
.pd-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 7px;
  height: 7px;
  background: var(--accent-r);
}
.pd-bullets li strong { color: var(--accent-r); }

/* Screenshot / image gallery grid */
.pd-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.pd-gallery .pd-block-img { margin: 0; height: 180px; }

@media (max-width: 600px) {
  .pd-block-row,
  .pd-block-row-duo,
  .pd-image-row { grid-template-columns: 1fr; }
  .pd-block-text p { font-size: 16px; }
  .pd-block-img { height: 220px; }
  .pd-image-cell img { height: 220px; }
  .pd-meta { grid-template-columns: repeat(2, 1fr); gap: 14px 18px; padding: 16px; }
  .pd-heading { font-size: 11px; margin: 28px 0 12px; }
  .pd-quote { font-size: 15px; padding: 14px 16px; }
  .pd-gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .pd-gallery .pd-block-img { height: 140px; }
}

.p1-social-icon {
  color: var(--muted);
  text-decoration: none;
  display: flex;
  transition: color 0.3s;
}
.p1-social-icon:hover { color: var(--text); }

/* HOME PAGE LAYOUT */
#home.content-section { padding-top: 6px; }

.home-hero-bg {
  margin: 0 -56px 18px;
  width: calc(100% + 112px);
  padding: 24px 56px;
  background-repeat: repeat;
  background-position: 0 0;
  animation: star-scroll 60s linear infinite;
}
:root[data-theme="dark"] .home-hero-bg {
  background-image: url('images/patterns/bigbackground_black.png');
}
:root[data-theme="light"] .home-hero-bg {
  background-image: url('images/patterns/bigbackground_white.png');
}
@keyframes star-scroll {
  from { background-position: 0 0; }
  to   { background-position: 1920px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .home-hero-bg { animation: none; }
}
@media (max-width: 880px) {
  .home-hero-bg {
    margin: 0 -20px 18px;
    width: calc(100% + 40px);
    padding: 24px 20px;
  }
}

/* DESIGNS PAGE */
.designs-hero-bg {
  margin: 0 -56px 18px;
  width: calc(100% + 112px);
  padding: 24px 56px;
  background-repeat: repeat;
  background-position: 0 0;
  animation: star-scroll 60s linear infinite;
}
:root[data-theme="dark"] .designs-hero-bg {
  background-image: url('images/patterns/bigbackground_black.png');
}
:root[data-theme="light"] .designs-hero-bg {
  background-image: url('images/patterns/bigbackground_white.png');
}
@media (prefers-reduced-motion: reduce) {
  .designs-hero-bg { animation: none; }
}
@media (max-width: 880px) {
  .designs-hero-bg {
    margin: 0 -20px 18px;
    width: calc(100% + 40px);
    padding: 24px 20px;
  }
}

.home-layout {
  display: flex;
  gap: 40px;
  align-items: center;
  justify-content: center;
  max-width: calc(var(--col) + 320px);
  margin: 0 auto;
}

/* Highlighter-marker effect, usable on any running text across the page */
.home-intro {
  padding: 8px 0;
}
.hl {
  background: var(--acid-green-bright);
  color: #0A0C08;
  padding: 3px 8px;
  border: 2px solid #0A0C08;
  border-radius: 2px;
  display: inline-block;
  line-height: 1.6;
}
.hl a { color: #0A0C08; text-decoration: underline; }
.hl a:hover { color: var(--muted); }
/* Header: per-line highlighter blocks with gaps between lines */
.home-intro h1 .hl {
  display: inline;
  line-height: 2;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Highlighter-marker box wrapping a whole passage of writing (not per sentence) */
.hl-box {
  background: var(--acid-green-bright);
  color: #0A0C08;
  border: 2px solid #0A0C08;
  border-radius: 2px;
  padding: 16px 18px;
}
.hl-box p { color: #0A0C08; }
.hl-box p:last-child { margin-bottom: 0; }
.hl-box a { color: #0A0C08; text-decoration: underline; }
.hl-box a:hover { color: #2B3820; }
.hl-box strong { color: #0A0C08; }
@media (max-width: 700px) {
  .home-intro { padding: 8px 0; }
}
.about-photo-wrap {
  flex-shrink: 0;
  position: relative;
  width: 280px;
  max-width: 100%;
  height: 280px;
}
.about-photo-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 260px;
  height: 260px;
}
.about-photo-circle img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
:root[data-theme="dark"] .about-photo-circle .photo-light { display: none; }
:root[data-theme="light"] .about-photo-circle .photo-dark { display: none; }
@media (max-width: 600px) {
  .home-layout { flex-direction: column-reverse; align-items: center; }
}

/* ABOUT PAGE */
.about-wave-bg {
  background-image: url('images/patterns/background_wavey_purple.png');
  background-repeat: repeat;
  background-position: 0 0;
  border-radius: 4px;
  animation: wave-scroll 22s linear infinite;
  padding: 28px;
  max-width: 1400px;
  margin: 0 auto;
}
@media (prefers-reduced-motion: reduce) {
  .about-wave-bg { animation: none; }
}
@media (max-width: 700px) {
  .about-wave-bg { padding: 22px 20px; }
}

.about-layout {
  display: flex;
  align-items: stretch;
  gap: 32px;
}
.about-right { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.about-right .hl-box {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  padding: 28px 32px;
}

.about-layout .resume-text-block {
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  box-sizing: border-box;
}
.about-layout .resume-note-box {
  box-sizing: border-box;
  padding: 18px 20px;
}
.about-layout .resume-note-box p {
  font-size: 16px;
  line-height: 1.8;
  font-weight: 600;
  margin-bottom: 0;
}

.about-layout .resume-img {
  flex: 0 0 480px;
  display: block;
  width: 480px;
  height: auto;
  border: 1px solid var(--rule);
  background: #ccc;
  overflow: hidden;
  box-sizing: border-box;
}
.about-layout .resume-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 900px) {
  .about-layout { flex-direction: column; align-items: center; }
  .about-right { width: 100%; }
  .about-layout .resume-text-block { width: 100%; max-width: 400px; flex: 0 0 auto; }
  .about-layout .resume-img { width: 260px; max-width: 100%; height: 340px; flex: 0 0 auto; align-self: center; }
}

/* PACMAN STRIP */

.pacman-strip {
  margin: 32px -56px 0;
  width: calc(100% + 112px);
  overflow: hidden;
  height: 32px;
  background: var(--bg);
}
@media (max-width: 880px) {
  .pacman-strip { margin: 32px -20px 0; width: calc(100% + 40px); }
}
.pacman-strip canvas {
  display: block;
  width: 100%;
  height: 32px;
}

.about-right p { font-size: 16px; color: var(--text); margin-bottom: 12px; line-height: 1.8; }
.about-right .hl-box p { color: #0A0C08; font-weight: 600; }
.about-photo {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--rule);
  overflow: hidden;
  background: #bbb;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* FOOTER */
footer {
  margin-top: 30px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--light);
}
.footer-row { text-align: center; }

@media (max-width: 600px) {
  .thumb-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 100px)); }
}

.lb-trigger {
  cursor: zoom-in;
}

/* Lightbox */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(5, 10, 18, 0.96);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0;
}
#lightbox.active {
  display: flex;
}

.lb-img-wrap {
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-img-wrap img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  border: 1px solid var(--rule);
}

.lb-close {
  position: fixed;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  padding: 10px;
  transition: color 0.2s;
  z-index: 901;
}
.lb-close:hover { color: var(--text); }

.lb-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  font-size: 32px;
  padding: 16px 20px;
  transition: color 0.2s;
  z-index: 901;
  user-select: none;
}
.lb-arrow:hover { color: var(--text); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }

.lb-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

@media (max-width: 600px) {
  .lb-arrow { font-size: 24px; padding: 10px 12px; }
}
