/* ============================================================
   Reff Pixels — Portfolio styles
   ============================================================ */

:root {
  /* Single accent, used sparingly */
  --accent:      #0e66a4;
  --accent-hover: #1279c2;
  --red:         #ff4d4d;   /* status dot only */
  --tan:         #29323b;   /* baked-in background of padded pieces */

  /* Dark theme */
  --bg:        #0d1015;
  --bg-2:      #12161d;
  --surface:   #171c24;
  --surface-2: #1f2530;
  --border:    #262e3a;
  --text:      #eef2f7;
  --text-dim:  #96a1b0;
  --shadow:    0 10px 30px rgba(0, 0, 0, 0.5);

  --radius: 14px;
  --maxw: 1920px;
  --header-h: 64px;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: var(--font-body);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

/* Blue "embers" particle layer (drawn by JS), sits above the glow, behind content */
#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Subtle dark ambient glow behind everything (low-contrast, slowly drifting) */
body::before {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38% 34% at 12% 8%,  rgba(22, 58, 95, 0.08), transparent 70%),
    radial-gradient(34% 30% at 92% 24%, rgba(22, 58, 95, 0.08), transparent 70%),
    radial-gradient(46% 40% at 70% 96%, rgba(22, 58, 95, 0.08), transparent 72%),
    radial-gradient(40% 36% at 26% 82%, rgba(22, 58, 95, 0.08),  transparent 72%);
  animation: glowDrift 24s ease-in-out infinite alternate;
}
@keyframes glowDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(0, -2.2%, 0) scale(1.05); }
}

.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;
}

/* Nearest-neighbour for all actual pixel art (not the smooth vector logo) */
.art-img, .lb-img, .hero-mascot {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;   /* brand | centered tabs | actions */
  align-items: center;
  gap: 16px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { justify-self: start; }
.tabs  { justify-self: center; }
.header-right { justify-self: end; display: flex; align-items: center; gap: 14px; }

.brand { display: flex; align-items: center; gap: 11px; }
.brand-logo {
  width: 45px; height: 45px;
  background: url("../branding/logo/logo_white_transparent.png") center / contain no-repeat;
  transition: transform .15s;
}
.brand-wordmark {
  height: 34px;
  width: auto;
  transition: opacity .15s;
}
/* Hover-only, so the colour swap doesn't stick after a tap on touchscreens */
@media (hover: hover) {
  .brand:hover .brand-logo {
    background-image: url("../branding/logo/logo_flat_transparent.png");   /* white -> full colour */
    transform: scale(1.05);
  }
  .brand:hover .brand-wordmark { opacity: .85; }
}

/* Primary tabs */
.tabs { display: flex; align-items: center; gap: 4px; }
.tab {
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: #fff; background: var(--accent); }

/* Hamburger (mobile / narrow only) */
.nav-toggle {
  display: none;
  justify-self: end;
  width: 42px; height: 42px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.nav-toggle:hover { border-color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 2px; }

/* Commissions status pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
button.status-pill:hover { color: var(--text); border-color: var(--accent); }
.status-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--red);
}
@media (max-width: 1024px) { .site-header .status-pill { display: none; } }
@media (max-width: 620px) { .brand-wordmark { display: none; } }

/* Compact header: tabs collapse into a right-aligned dropdown menu */
@media (max-width: 860px) {
  .site-header { grid-template-columns: 1fr auto; }   /* brand | hamburger */
  .header-right { display: none; }                     /* socials live in the footer */
  .nav-toggle { display: grid; }
  .tabs {
    position: absolute;
    top: calc(var(--header-h) - 4px);
    right: clamp(12px, 4vw, 40px);
    left: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    min-width: 200px;
    padding: 8px;
    background: color-mix(in srgb, var(--surface) 97%, transparent);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    z-index: 60;
    display: none;
  }
  .tabs.open { display: flex; }
  .tab { width: 100%; text-align: left; padding: 11px 14px; font-size: 0.95rem; }
}

.social-link {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1.05rem;
  transition: background .18s, color .18s, border-color .18s;
}
.social-link:hover {
  color: var(--brand, var(--text));
  background: var(--surface);
  border-color: color-mix(in srgb, var(--brand, var(--border)) 55%, var(--border));
}

/* Per-network brand colours (used by every social link on hover) */
:is(.header-actions, .footer-socials, .contact-socials) a[href*="youtube"]   { --brand: #ff0000; }
:is(.header-actions, .footer-socials, .contact-socials) a[href*="instagram"] { --brand: #e1306c; }
:is(.header-actions, .footer-socials, .contact-socials) a[href*="reddit"]    { --brand: #ff4500; }
:is(.header-actions, .footer-socials, .contact-socials) a[href*="twitch"]    { --brand: #9146ff; }
:is(.header-actions, .footer-socials, .contact-socials) a[href*="bsky"]      { --brand: #1185fe; }
:is(.header-actions, .footer-socials, .contact-socials) a[href*="discord"]   { --brand: #5865f2; }
:is(.header-actions, .footer-socials, .contact-socials) a[href*="threads"]   { --brand: #e6e6e6; }
:is(.header-actions, .footer-socials, .contact-socials) a[href*="linkedin"]  { --brand: #0a66c2; }
:is(.header-actions, .footer-socials, .contact-socials) a[href*="itch.io"]   { --brand: #fa5c5c; }
:is(.header-actions, .footer-socials, .contact-socials) a[href^="mailto"]    { --brand: #2fa4d8; }

/* ============ HERO BANNER ============ */
.hero-banner {
  position: relative;
  width: 100%;
  min-height: clamp(520px, 82vh, 780px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--border);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  z-index: -2;
  /* parallax: js sets --par on .hero-banner, shared by the sidebar glass */
  transform: translate3d(0, var(--par, 0), 0);
  will-change: transform;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 50% 42%, rgba(13,16,21,.5) 0%, rgba(13,16,21,.0) 55%, rgba(13,16,21,.82) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(13,16,21,0) 50%);
}
.hero-glass { display: none; }   /* only used in the ultrawide sidebar layout */
.hero-content {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 8vw, 80px) clamp(16px, 4vw, 40px);
  text-align: center;
}

/* Wordmark with the toucan rising out from behind its top edge */
.hero-logo-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0 26px;   /* also resets the <h1> user-agent margin */
  font-size: inherit;
}
.hero-mascot {
  width: clamp(150px, 21vw, 250px);
  height: auto;
  margin-bottom: clamp(-50px, -4.0vw, -30px);  /* sits almost fully above, just kissing the wordmark */
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,.45));
}
.hero-wordmark {
  display: block;
  z-index: 2;                       /* paints over the mascot's lower half */
  width: clamp(200px, 30vw, 380px);
  height: auto;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,.55));
}

.hero-role {
  margin: 0 0 8px;
  font-size: clamp(1rem, 1.9vw, 1.22rem);
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.85), 0 1px 2px rgba(0,0,0,.9);
}
.hero-cf {
  margin: 0 0 30px;
  font-size: 1rem;
  color: #dde4ec;
  text-shadow: 0 2px 10px rgba(0,0,0,.85), 0 1px 2px rgba(0,0,0,.9);
}
.hero-sep { margin: 0 4px; opacity: .5; }
.cf-link {
  color: #fff;
  font-weight: 600;
  transition: color .15s, border-color .15s;
}
.cf-link:hover { color: #7fc2ec; border-color: #7fc2ec; }
.cf-logo-link { display: inline-block; vertical-align: -0.3em; margin-left: 7px; transition: opacity .15s; }
.cf-logo-link:hover { opacity: .75; }
.cf-logo {
  display: block;
  height: 1.3em;
  filter: brightness(0) invert(1);   /* force pure white */
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s, background .18s, border-color .18s, color .18s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: rgba(255,255,255,.24); color: #fff; background: rgba(255,255,255,.07); }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.14); }

@media (max-width: 720px) {
  .hero-banner { min-height: clamp(440px, 72vh, 600px); }
  .hero-mascot { width: clamp(135px, 36vw, 185px); margin-bottom: clamp(-34px, -8vw, -18px); }
  .hero-role { font-size: 0.9rem; }
  .hero-cf { font-size: 0.82rem; }
}
@media (max-width: 520px) {
  .section-link { display: none; }  /* the Portfolio tab already covers this */
}

/* Ultrawide (> 16:9): move the text into a left panel so the pixel-art banner
   only has to cover the right side instead of being blown up across the width. */
@media (min-aspect-ratio: 18/10) and (min-width: 1000px) {
  .hero-banner { justify-content: flex-start; align-items: center; }
  /* Sharp banner covers the right side, layered ON TOP of the glass with a crisp
     left edge (no fade) meeting the sidebar at the divider line — so it keeps its
     own aspect ratio and shows as much of the artwork as possible. */
  .hero-bg {
    left: auto; right: 0; width: 60%;
    z-index: -2;
  }
  .hero-scrim {
    z-index: -1;
    background:
      /* subtle divider line where the sidebar meets the banner (at 40%) */
      linear-gradient(90deg, transparent calc(40% - 1px), rgba(255,255,255,.12) 40%, transparent calc(40% + 1px)),
      /* short dark gradient down the banner's left edge */
      linear-gradient(90deg, transparent 40%, rgba(13,16,21,.62) 40%, rgba(13,16,21,0) 47%),
      linear-gradient(0deg, var(--bg) 0%, rgba(13,16,21,0) 26%);
  }
  /* Full-width blurred COPY of the banner behind everything; the sharp banner on
     top hides it on the right, leaving just the sidebar showing through. */
  .hero-glass {
    display: block;
    position: absolute;
    inset: 0;
    z-index: -3;
    overflow: hidden;
  }
  .hero-glass::before {                 /* the blurred banner copy (parallaxes too) */
    content: "";
    position: absolute;
    inset: -80px;                       /* overshoot so blurred edges get clipped */
    background: url("../branding/art/main_banner.png") left center / cover;
    filter: blur(12px) brightness(.5) saturate(1.05);
    /* scale up a touch (from the left) so the glass is more zoomed-in and
       anchored to the left of the banner image */
    transform-origin: left center;
    transform: translate3d(0, var(--par, 0), 0) scale(1.2);
  }
  .hero-glass::after {                   /* dark tint for text contrast (left side) */
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(13,16,21,.52), rgba(13,16,21,.3) 40%, transparent 62%);
  }
  .hero-content {
    width: 40%;
    margin: 0;
    text-align: center;
    padding: clamp(40px, 5vw, 80px) clamp(24px, 3vw, 56px);
  }
  .hero-cta { justify-content: center; }
}

/* ============ CONTROLS ============ */
.controls {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  margin: 0;
  padding: 16px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.controls-inner { max-width: var(--maxw); margin: 0 auto; }
.search-wrap { position: relative; margin-bottom: 14px; }
.search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color .18s, box-shadow .18s;
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.search-input::placeholder { color: var(--text-dim); }

/* Category quick-nav (circles) */
.cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 2vw, 22px);
}
.cat-nav[hidden] { display: none; }
.cat-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-dim);
  transition: color .15s;
}
.cat-circle-ico {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  transition: color .18s, border-color .18s, background .18s, transform .18s, box-shadow .18s;
}
.cat-circle-ico svg { width: 24px; height: 24px; }
.cat-circle-label { font-size: 0.78rem; font-weight: 600; }
.cat-circle:hover { color: var(--text); }
.cat-circle:hover .cat-circle-ico {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 45%, transparent);
}

/* Category sections in the portfolio */
.cat-section { padding-top: 8px; scroll-margin-top: calc(var(--header-h) + 132px); }
.cat-section + .cat-section { position: relative; margin-top: 46px; padding-top: 46px; }
.cat-section + .cat-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    color-mix(in srgb, var(--border) 90%, var(--text-dim)) 18%,
    color-mix(in srgb, var(--border) 90%, var(--text-dim)) 82%,
    transparent 100%);
}
.cat-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
}
.cat-section-ico {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  color: #9fd0ef;
  flex: none;
}
.cat-section-ico svg { width: 24px; height: 24px; }
.cat-section-title { margin: 0; font-size: clamp(1.3rem, 2.6vw, 1.7rem); font-weight: 700; letter-spacing: -0.4px; }
.cat-section-count { color: var(--text-dim); font-weight: 500; font-size: 0.95rem; margin-left: 2px; }

/* ============ PAGES ============ */
main { display: block; }
.page[hidden] { display: none; }
.gallery-wrap { max-width: var(--maxw); margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 60px; }

/* ============ SHOWCASE (home) ============ */
.showcase {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(38px, 6vw, 68px) clamp(16px, 4vw, 40px) clamp(50px, 7vw, 80px);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.section-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.5px;
}
.section-icon {
  color: var(--accent);
  flex: none;
}
.section-link {
  border: none;
  background: none;
  color: var(--accent);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s;
}
.section-link:hover { color: #7fc2ec; }

/* Justified rows: JS sizes each card to the image's aspect ratio so pieces are
   shown in full (never cropped) yet every row is flush left-to-right (no gaps). */
.showcase-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.scard {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
  transition: transform .18s ease, border-color .18s, box-shadow .18s;
}
/* both selectors so the hover growth also wins over .scard.reveal.in (showcase) */
.scard:hover,
.scard.reveal.in:hover {
  transform: translateY(-4px) scale(1.035);
  z-index: 3;                       /* grow above neighbours */
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent),
              0 0 16px color-mix(in srgb, var(--accent) 45%, transparent),
              var(--shadow);
}
.scard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Scroll-in reveal (JS adds .reveal, then .in when the card enters the viewport) */
.scard.reveal { opacity: 0; transform: translateY(20px); }
.scard.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1);
}
.scard .art-fill {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* card is sized to the image aspect, so this never crops */
  display: block;
}
.scard-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px 14px 11px;
  background: linear-gradient(transparent, rgba(6,8,11,.82));
  opacity: 0;
  transition: opacity .18s;
}
.scard:hover .scard-cap, .scard:focus-visible .scard-cap { opacity: 1; }
.scard-title { display: block; color: #fff; font-weight: 600; font-size: 1rem; }
.scard-cat { display: block; color: #c2ccd8; font-size: 0.8rem; margin-top: 2px; }

/* "GIF" badge on animated pieces */
.scard-anim {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  background: rgba(6, 8, 11, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

/* ============ HOME SEARCH ============ */
.home-search {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px) clamp(56px, 8vw, 96px);
  text-align: center;
}
.home-search-title {
  margin: 0 0 6px;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.4px;
}
.home-search-sub { margin: 0 0 20px; color: var(--text-dim); }
.home-search .search-wrap { margin: 0; }

/* ============ GALLERY ============ */
.empty {
  text-align: center;
  color: var(--text-dim);
  padding: 60px 20px;
  font-size: 1.05rem;
}

/* ============ FOOTER ============ */
.site-footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 44px 20px 56px;
  background: var(--bg-2);
}
.footer-logo { width: 40px; height: 40px; margin: 0 auto 10px; opacity: .9; }
.footer-name {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 600; margin: 0 0 8px;
}
.footer-socials {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 16px;
}
.footer-socials a {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 10px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: color .15s, border-color .15s, transform .15s;
}
.footer-socials a:hover { color: var(--brand, var(--accent)); border-color: var(--brand, var(--accent)); transform: translateY(-2px); }
.footer-email { margin: 0 0 10px; font-size: 0.95rem; }
.footer-email a { color: var(--text-dim); transition: color .15s; }
.footer-email a:hover { color: var(--accent); }
.footer-fine { margin: 0; color: var(--text-dim); font-size: 0.8rem; opacity: .8; }

/* ============ ABOUT ============ */
.about-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 80px) clamp(16px, 4vw, 40px) clamp(64px, 9vw, 120px);
}

/* Intro: photo + bio */
.about-intro {
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}
.about-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  object-fit: cover;
  object-position: center 30%;   /* bias the crop toward the head for good headroom */
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.about-name {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -1px;
}
.about-lead {
  margin: 0 0 14px;
  font-size: clamp(1.08rem, 2.2vw, 1.3rem);
  font-weight: 600;
  color: var(--text);
}
.about-text { margin: 0 0 14px; color: var(--text-dim); font-size: 1.02rem; line-height: 1.65; }
.about-text:last-child { margin-bottom: 0; }

/* Sub-sections (Games / Other work / Commissions) */
.about-section { margin-top: clamp(44px, 6vw, 68px); }
.about-heading {
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* Credits as a vertical timeline (games + other work) */
.cred-grid {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-left: 44px;
}
.cred-grid::before {                 /* the timeline spine */
  content: "";
  position: absolute;
  left: 15px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: var(--border);
}
.cred-card {
  --cred: var(--accent);
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.cred-card::before {                 /* node on the spine, in the project's colour */
  content: "";
  position: absolute;
  left: -35px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--cred);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--border);
}
.cred-card:hover {
  border-color: var(--cred);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--cred), var(--shadow);
}
.cred-thumb {
  flex: none;
  width: 84px; height: 84px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-2);
  overflow: hidden;
}
.cred-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cred-thumb-logo { padding: 9px; }
.cred-body { min-width: 0; padding-right: 78px; }   /* room for the period label */
.cred-title { margin: 0; font-size: 1.12rem; font-weight: 700; }
.cred-role { margin: 3px 0 0; color: var(--cred); font-size: 0.9rem; font-weight: 600; }
.cred-desc { margin: 6px 0 0; color: var(--text-dim); font-size: 0.95rem; line-height: 1.5; }
.cred-period {
  position: absolute;
  top: 16px; right: 18px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* Representative project colours (timeline node, studio label, hover) */
.cred-card.c-purple { --cred: #a855f7; }
.cred-card.c-red    { --cred: #ef4444; }
.cred-card.c-blue   { --cred: #3b82f6; }
.cred-card.c-orange { --cred: #f59e0b; }
.cred-card.c-green  { --cred: #22c55e; }

@media (max-width: 560px) {
  .cred-grid { padding-left: 30px; }
  .cred-card { gap: 14px; padding: 14px 16px; }
  .cred-card::before { left: -27px; }
  .cred-thumb { width: 60px; height: 60px; }
  .cred-body { padding-right: 66px; }
}

/* Commissions block */
.about-commissions {
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.commission-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
}
.about-commissions .about-text { margin-bottom: 20px; }

@media (max-width: 640px) {
  .about-intro { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .about-photo { max-width: 260px; }
}

/* ============ ASSET PACKS ============ */
.assets-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 80px) clamp(16px, 4vw, 40px) clamp(64px, 9vw, 120px);
}
.assets-head { margin-bottom: clamp(24px, 4vw, 40px); }
.assets-title {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -1px;
}
.assets-lead { margin: 0; color: var(--text-dim); font-size: 1.05rem; }
.assets-link { color: var(--accent); font-weight: 600; }
.assets-link:hover { color: #7fc2ec; }

.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.pack-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  color: var(--text);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.pack-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow);
}
.pack-thumb {
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  overflow: hidden;
}
.pack-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  transition: transform .25s;
}
.pack-card:hover .pack-thumb img { transform: scale(1.04); }
.pack-body {
  position: relative;
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.pack-title { margin: 0; font-size: 1.1rem; font-weight: 700; }
.pack-desc { margin: 0; color: var(--text-dim); font-size: 0.9rem; line-height: 1.45; flex: 1; }
.pack-price {
  align-self: flex-start;
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pack-price.pack-free { background: color-mix(in srgb, #22c55e 22%, var(--surface-2)); color: #7ee2a4; }

/* ============ CONTACT ============ */
.contact-inner {
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(48px, 9vw, 110px) clamp(16px, 4vw, 40px) clamp(60px, 10vw, 120px);
  text-align: center;
}
.contact-mascot {
  width: 96px; height: 96px;
  border-radius: 22px;
  margin: 0 auto 22px;
  box-shadow: var(--shadow);
}
.contact-title {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -1px;
}
.contact-lead {
  margin: 0 auto 26px;
  max-width: 42ch;
  color: var(--text-dim);
  font-size: 1.06rem;
}
.contact-email { font-size: 1.05rem; margin-bottom: 34px; }
.contact-socials {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.contact-socials a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  font-size: 1rem;
  transition: color .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.contact-socials a svg { flex: none; color: var(--text-dim); transition: color .15s; }
.contact-socials a:hover {
  border-color: var(--brand, var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 0 16px color-mix(in srgb, var(--brand, var(--accent)) 32%, transparent);
}
.contact-socials a:hover svg { color: var(--brand, var(--accent)); }
@media (max-width: 480px) { .contact-socials { grid-template-columns: 1fr; } }

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, #05070a 88%, transparent);
  backdrop-filter: blur(8px);
  padding: 20px;
  animation: fade .2s ease;
}
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.lb-figure {
  margin: 0;
  max-width: min(92vw, 1100px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}
.lb-stage {
  display: grid;
  place-items: center;
  max-width: min(1100px, 84vw);
  max-height: 72vh;
  overflow: hidden;
  border-radius: 6px;
}
.lb-stage.zoomed { overflow: auto; scrollbar-width: none; }
.lb-stage.zoomed::-webkit-scrollbar { display: none; }
.lb-img {
  max-width: none;   /* override global img{max-width:100%} so zoom keeps aspect ratio */
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  user-select: none;
  -webkit-user-drag: none;
}
.lb-stage.zoomed .lb-img { border-radius: 0; }

/* Zoom bar */
.lb-zoom {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
}
.lb-zoom[hidden] { display: none; }
.lb-zoom-btn {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 1.1rem; line-height: 1;
  cursor: pointer;
  transition: background .15s;
}
.lb-zoom-btn:hover { background: var(--accent); }
.lb-zoom-slider {
  -webkit-appearance: none; appearance: none;
  width: clamp(140px, 30vw, 260px);
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.2);
  cursor: pointer;
}
.lb-zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fff; cursor: pointer;
}
.lb-zoom-slider::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fff; cursor: pointer;
}
.lb-zoom-val { color: #cdd6e0; font-size: 0.82rem; font-variant-numeric: tabular-nums; min-width: 28px; }

.lb-desc {
  margin: 8px 0 0;
  max-width: 60ch;
  color: #c2ccd8;
  font-size: 0.92rem;
  line-height: 1.5;
}
.lb-desc[hidden] { display: none; }
.lb-img.on-checker {
  background-color: #20272f;
  background-image:
    linear-gradient(45deg, #2a323c 25%, transparent 25%),
    linear-gradient(-45deg, #2a323c 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2a323c 75%),
    linear-gradient(-45deg, transparent 75%, #2a323c 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.lb-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  width: 100%;
  color: #eef2f7;
}
.lb-title { margin: 0; font-size: 1.35rem; font-weight: 700; }
.lb-cat { margin: 2px 0 0; color: #9aa7b6; font-size: 0.9rem; }
.lb-detail { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.lb-dims {
  font-size: 0.82rem; color: #9aa7b6;
  font-variant-numeric: tabular-nums;
}
.lb-hint { font-size: 0.72rem; color: #6f7b8a; }
.lb-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.lb-tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  font-size: 0.76rem;
  color: #cdd6e0;
  cursor: pointer;
  transition: background .15s;
}
.lb-tag:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.lb-close, .lb-nav {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
  display: grid;
  place-items: center;
  transition: background .15s, transform .15s;
}
.lb-close:hover, .lb-nav:hover { background: var(--accent); }
.lb-close {
  position: fixed;
  top: 18px; right: 20px;
  width: 44px; height: 44px;
  font-size: 1.1rem;
  z-index: 2;
}
/* Nav arrows anchored to the screen edges, but never further out than a centred
   16:9 box (so they stay reachable on ultrawide displays). */
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 64px; height: 64px;
  flex: none;
}
.lb-nav svg { width: 34px; height: 34px; }
.lb-prev { left:  max(14px, calc(50vw - min(47vw, 100vh * 8 / 9))); }
.lb-next { right: max(14px, calc(50vw - min(47vw, 100vh * 8 / 9))); }
.lb-nav:active { transform: translateY(-50%) scale(.92); }

/* ============ RESPONSIVE ============ */
@media (max-width: 780px) {
  .lb-nav { width: 44px; height: 44px; }
  .lb-nav svg { width: 24px; height: 24px; }
  .lb-caption { flex-direction: column; align-items: flex-start; }
  .lb-detail { align-items: flex-start; }
  .lb-tags { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .scard:hover { transform: none; }
}
