:root {
  --bg: #111111;
  --sidebar-bg: #0d0d0d;
  --sidebar-width: 160px;
  --accent: #a0ff00;
  --text: #ffffff;
  --text-muted: #888888;
  --card-bg: #1a1a1a;
}

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

html {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100%;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px 20px;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
}

.sidebar-logo {
  width: 64px;
  height: 64px;
  margin-bottom: 32px;
  flex-shrink: 0;
  display: block;
}

.sidebar-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(160, 255, 0, 0.35), 0 0 24px rgba(160, 255, 0, 0.15);
  transition: box-shadow 0.3s ease;
}

.sidebar-logo:hover img {
  box-shadow: 0 0 16px rgba(160, 255, 0, 0.55), 0 0 32px rgba(160, 255, 0, 0.25);
}

nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}

nav a:hover,
nav a.active {
  color: var(--accent);
}

.sidebar-socials {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 24px;
}

.sidebar-socials a {
  color: var(--text-muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.sidebar-socials a:hover { color: var(--accent); }

.sidebar-socials svg {
  width: 14px;
  height: 14px;
}

.sidebar-copy {
  font-size: 9px;
  color: #444;
  margin-top: 12px;
  line-height: 1.5;
}

/* ── MAIN ── */
main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
}

/* ── HOME ── */
.hero {
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.4) 0%, transparent 60%);
}

/* ── WORK GRID ── */
.work-header {
  padding: 40px 40px 20px;
}

.work-header h1 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.work-intro {
  max-width: 66ch;
  margin: 0 0 22px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 1px solid #333;
  color: var(--text-muted);
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

/* Bento grid */
.masonry-grid {
  padding: 20px 40px 60px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 264px;
  grid-auto-flow: dense;
  gap: 6px;
}

/* ── ARCADE ── */
.arcade-page {
  min-height: 100vh;
  padding: 64px 60px 80px;
}
.arcade-head { margin-bottom: 34px; }
.arcade-head h1 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.arcade-head p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}
.arcade-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 840px;
}
.arcade-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 3 / 4;
  background: #0a0b07;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.3s ease, border-color 0.3s ease;
}
.arcade-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.8);
  transition: transform 0.4s ease, filter 0.3s ease;
}
.arcade-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--accent);
}
.arcade-card:hover img {
  transform: scale(1.05);
  filter: brightness(1);
}
.arcade-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.arcade-card:hover .arcade-card-overlay { opacity: 1; }
.arcade-play {
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}
.arcade-card-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 14px 13px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
}
.arcade-title {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.arcade-tag {
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Sectioned "All" view: a labelled grid per category */
#work-grid.sectioned { display: block; padding: 0; }
.section-grid { padding: 6px 40px 22px; }

.work-cat-header {
  scroll-margin-top: 16px;
  margin: 28px 40px 0;
  padding-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid rgba(160, 255, 0, 0.22);
}

.work-cat-header:first-child { margin-top: 10px; }

.masonry-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 2px;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.35s ease,
              z-index 0s;
  z-index: 1;
  animation: tile-in 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* Subtle fade-and-rise when tiles (re)render — entering an album,
   switching projects, or changing filters. */
@keyframes tile-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .masonry-item { animation: none; }
}

/* Sheen sweep across a tile on hover */
.masonry-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.16) 50%, transparent 65%);
  transform: translateX(-130%);
  pointer-events: none;
  z-index: 4;
}

.masonry-item:hover::after {
  transform: translateX(130%);
  transition: transform 0.75s ease;
}

@media (prefers-reduced-motion: reduce) {
  .masonry-item:hover::after { transition: none; }
}

/* Per-piece caption blurb — top-left, eases in from the left */
.tile-blurb {
  position: absolute;
  top: 0;
  left: 0;
  max-width: 72%;
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.55) 0%, transparent 72%);
  z-index: 3;
  pointer-events: none;
  animation: blurb-in 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* Larger, hero-style blurb on big tiles — matches the homepage look. */
.masonry-item.size-large .tile-blurb,
.masonry-item.size-wide .tile-blurb {
  font-size: 19px;
  line-height: 1.35;
  max-width: 64%;
}

@keyframes blurb-in {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .tile-blurb { animation: none; }
}

/* Protected media (inline video / embedded player) tiles */
.masonry-item.pv-media-tile { cursor: default; background: #000; }
.masonry-item video,
.masonry-item .pv-media,
.masonry-item .pv-media iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}
.masonry-item video { object-fit: contain; background: #000; }
.masonry-item .pv-owner {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 8px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.masonry-item .pv-owner img {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  object-fit: contain;
}

.masonry-item .pv-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
  pointer-events: none;
  z-index: 2;
}

/* Size variants */
.masonry-item.size-large {
  grid-column: span 2;
  grid-row: span 2;
}

.masonry-item.size-wide {
  grid-column: span 2;
  grid-row: span 1;
}

.masonry-item.size-tall {
  grid-column: span 1;
  grid-row: span 2;
}

/* small is default — 1×1 */

.masonry-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
  transform: scale(var(--zoom, 1));
  transform-origin: var(--focus, 50% 50%);
  display: block;
  /* Optional gamma (SVG) × base look × per-thumb adjustments (set in admin). */
  filter: var(--lv, ) brightness(calc(0.62 * var(--adj-b, 1))) saturate(calc(0.9 * var(--adj-s, 1))) contrast(var(--adj-c, 1));
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter 0.35s ease;
}

.masonry-item:hover {
  transform: scale(1.04);
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  z-index: 10;
}

.masonry-item:hover img {
  transform: scale(calc(var(--zoom, 1) * 1.06));
  filter: var(--lv, ) brightness(var(--adj-b, 1)) saturate(var(--adj-s, 1)) contrast(var(--adj-c, 1));
}

.masonry-item .item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.masonry-item:hover .item-overlay {
  opacity: 1;
}

.item-overlay .item-title {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: translateY(10px);
  transition: transform 0.3s ease;
}

.item-overlay .item-tag {
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 5px;
  transform: translateY(10px);
  transition: transform 0.3s ease 0.04s;
}

.item-overlay .item-desc {
  color: #c8c8c8;
  font-size: 11px;
  line-height: 1.5;
  margin-top: 6px;
  transform: translateY(10px);
  transition: transform 0.3s ease 0.08s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.masonry-item:hover .item-title,
.masonry-item:hover .item-tag,
.masonry-item:hover .item-desc {
  transform: translateY(0);
}

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 2px;
}

.lightbox .lb-video {
  display: none;
  width: min(90vw, 1280px);
  aspect-ratio: 16 / 9;
  max-height: 88vh;
  border: none;
  border-radius: 2px;
  background: #000;
}

.lightbox .lb-vid {
  display: none;
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 2px;
  background: #000;
}

.masonry-item .play-badge {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 62px; height: 62px;
  border-radius: 50%;
  background: rgba(0,0,0,0.62);
  border: 3px solid rgba(255,255,255,0.92);
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  pointer-events: none;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.masonry-item .play-badge::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-38%, -50%);
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #fff;
}

.masonry-item:hover .play-badge {
  background: var(--accent, #a0ff00);
  border-color: #fff;
  transform: translate(-50%, -50%) scale(1.08);
}

.masonry-item:hover .play-badge::after {
  border-left-color: #0b0d10;
}

@media (prefers-reduced-motion: reduce) {
  .masonry-item:hover .play-badge { transform: translate(-50%, -50%); }
}

/* 3D-model marker: a small cube + "3D" chip, top-left, so a model preview
   reads as interactive 3D rather than a video. Sits opposite the item-count. */
.masonry-item .model-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  padding: 4px 9px 4px 7px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
  z-index: 2;
  transition: background 0.2s, color 0.2s;
}
.masonry-item .model-tag svg { color: var(--accent, #a0ff00); display: block; }
.masonry-item:hover .model-tag { background: var(--accent, #a0ff00); color: #0b0d10; border-color: transparent; }
.masonry-item:hover .model-tag svg { color: #0b0d10; }

.masonry-item .item-count {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 12px;
  pointer-events: none;
}

.group-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
}

.back-btn {
  background: transparent;
  border: 1px solid #333;
  color: var(--text-muted);
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
}

.back-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.group-bar-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.group-bar-count {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.group-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.group-nav-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #333;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.15s ease, background 0.2s ease,
              color 0.2s ease, border-color 0.2s ease;
}

.group-nav-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  transform: translateY(-1px);
}

.group-nav-btn:active { transform: scale(0.92); }

.group-pos {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  min-width: 52px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.group-pos .cur {
  color: var(--accent);
  font-weight: 700;
}

.lightbox-close {
  position: absolute;
  top: 20px; right: 28px;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 1003;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(90vw, 720px);
  text-align: center;
  font-size: 12px;
  color: #aaa;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.lightbox-caption:empty { display: none; }
.lightbox-caption .lb-cap-tag {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--accent, #a0ff00);
  margin-bottom: 6px;
}
.lightbox-caption .lb-cap-title {
  display: block;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #fff;
}
.lightbox-caption .lb-cap-blurb {
  display: block;
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #d6d9d2;
}
/* Each open rebuilds these nodes, so the slide-up + fade replays every time. */
.lightbox-caption .lb-cap-tag,
.lightbox-caption .lb-cap-title,
.lightbox-caption .lb-cap-blurb {
  opacity: 0;
  transform: translateY(26px);
  animation: lbCapIn 0.55s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}
.lightbox-caption .lb-cap-tag   { animation-delay: 0.10s; }
.lightbox-caption .lb-cap-title { animation-delay: 0.16s; }
.lightbox-caption .lb-cap-blurb { animation-delay: 0.24s; }
@keyframes lbCapIn {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox-caption .lb-cap-tag,
  .lightbox-caption .lb-cap-title,
  .lightbox-caption .lb-cap-blurb {
    animation: none; opacity: 1; transform: none;
  }
}

/* When the shown image is a project cover, clicking it opens the project. */
.lightbox.can-enter .lb-img { cursor: pointer; }

.lightbox-hint {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: #cfcfcf;
  letter-spacing: 0.04em;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 12px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox.can-enter .lightbox-hint { opacity: 1; }

.lightbox-hint kbd {
  font-family: inherit;
  font-weight: 700;
  color: var(--accent);
  background: rgba(160, 255, 0, 0.12);
  border: 1px solid rgba(160, 255, 0, 0.35);
  border-radius: 4px;
  padding: 1px 6px;
  margin: 0 2px;
}

/* Piece blurb, top-left of the lightbox — eases in from the left on open. */
.lb-blurb {
  position: absolute;
  top: 40px;
  left: 48px;
  max-width: 460px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85);
  opacity: 0;
  transform: translateX(-96px);
  z-index: 1002;
  pointer-events: none;
}

.lb-blurb.in {
  animation: lb-blurb-in 0.72s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lb-blurb-in {
  from { opacity: 0; transform: translateX(-96px); }
  to   { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .lb-blurb.in { animation: none; opacity: 1; transform: none; }
}

@media (max-width: 768px) {
  .lb-blurb { top: 18px; left: 20px; font-size: 15px; max-width: 74%; }
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
  padding: 0;
  /* Sit above the media (image / video / iframe) so clicks always register,
     even when a video is open. */
  z-index: 1003;
  transition: opacity 0.2s, background 0.2s, color 0.2s, transform 0.15s;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover, .lightbox-next:hover {
  opacity: 1;
  background: var(--accent);
  color: #000;
}
.lightbox-prev:active, .lightbox-next:active { transform: translateY(-50%) scale(0.92); }

/* ── RESUME ── */
.resume-page {
  padding: 60px 60px 80px;
  max-width: 1000px;
}

.resume-top {
  display: flex;
  gap: 48px;
  margin-bottom: 56px;
  align-items: flex-start;
}

.resume-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: contain;
}

.resume-avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 4px;
  border: 2px solid var(--accent);
  flex-shrink: 0;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resume-identity h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
}

.resume-identity .title {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.resume-identity .meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.resume-identity .meta a {
  color: var(--accent);
  text-decoration: none;
}

.resume-avatar-link { display: inline-block; flex-shrink: 0; }

.resume-bio {
  font-size: 13px;
  line-height: 1.8;
  color: #ccc;
  max-width: 620px;
}

.resume-section {
  margin-bottom: 48px;
}

.resume-section h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid #222;
}

.gameography-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.gameography {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.gameography-preview {
  width: 340px;
  flex-shrink: 0;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 60px;
  align-self: flex-start;
  margin-top: 50px;
}

.gp-stage {
  position: relative;
  width: 220px;
  height: 330px;
  overflow: visible;
}

.gp-card {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 16px 48px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.06);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity   0.5s ease;
  will-change: transform, opacity;
}

.gp-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay always sits centered on stage, above the center card */
.gp-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  border-radius: 10px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gp-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 35%,
    rgba(0,0,0,0.6) 65%,
    rgba(0,0,0,0.97) 100%
  );
}

.gp-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 14px;
}

.gp-meta-role {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.gp-meta-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 5px;
}

.gp-meta-platform {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.05em;
}

.gp-placeholder {
  text-align: center;
  margin-top: 20px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #333;
  transition: opacity 0.3s ease;
}

/* Mentoring card */
.mentoring-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  max-width: 560px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.mentoring-card:hover {
  border-color: var(--accent);
  background: rgba(160, 255, 0, 0.04);
  transform: translateY(-2px);
}

.mentoring-logo {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mentoring-logo img { width: 32px; height: 32px; object-fit: contain; }
.mentoring-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.mentoring-desc { color: var(--text-muted); line-height: 1.6; font-size: 13px; margin-bottom: 8px; }
.mentoring-link { color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }

.gameography li {
  font-size: 13px;
  color: #666;
  padding: 9px 14px;
  position: relative;
  line-height: 1.5;
  cursor: default;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.gameography li::before {
  content: '▸';
  position: absolute;
  left: -2px;
  color: transparent;
  font-size: 10px;
  top: 11px;
  transition: color 0.2s;
}

.gameography li:hover,
.gameography li.active {
  color: #fff;
  border-left-color: var(--accent);
}

.gameography li:hover::before,
.gameography li.active::before {
  color: var(--accent);
}

.skills-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  color: #bbb;
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 2px;
  letter-spacing: 0.04em;
}

.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.software-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1a1a1a;
  border: 1px solid #222;
  padding: 12px 16px;
  border-radius: 2px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.software-item:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.software-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  color: #fff;
}

.software-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.reel-embed {
  width: 100%;
  aspect-ratio: 16/9;
  border: 1px solid var(--accent);
  border-radius: 2px;
}

/* ── CONTACT ── */
.contact-bg {
  position: fixed;
  top: 0;
  bottom: 0;
  left: var(--sidebar-width);
  right: -60px;
  z-index: 0;
  pointer-events: none;
  width: auto;
  height: 100%;
  object-fit: cover;
  object-position: 50% center;
  opacity: 0.3;
  transform: translateX(-60px);
}

.contact-page {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 100vh;
  padding: 60px 60px 12vh;
}

.contact-card {
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.contact-card .m-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 32px;
}

.contact-card .m-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(160, 255, 0, 0.35), 0 0 24px rgba(160, 255, 0, 0.15);
}

.contact-card h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.contact-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
}

.contact-email {
  display: inline-block;
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--accent);
  padding: 14px 32px;
  border-radius: 2px;
  letter-spacing: 0.05em;
  transition: all 0.2s;
  margin-bottom: 40px;
}

.contact-email:hover {
  background: var(--accent);
  color: #000;
}

.contact-socials {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.contact-socials a {
  color: var(--text-muted);
  transition: color 0.2s;
  display: flex;
}

.contact-socials a:hover { color: var(--accent); }
.contact-socials svg { width: 20px; height: 20px; }

/* ── PROTECTED ── */
.matrix-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #000;
}

.protected-page {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 60px;
  text-align: center;
}

.protected-inner {
  max-width: 380px;
  padding: 40px 36px;
  background: rgba(10, 12, 10, 0.72);
  border: 1px solid rgba(160, 255, 0, 0.18);
  border-radius: 8px;
  backdrop-filter: blur(6px);
}

/* NDA / usage disclaimer under the unlocked "Protected Work" heading */
.protected-disclaimer {
  max-width: 640px;
  margin: 8px auto 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-muted, #9aa2ad);
}

.protected-inner h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

.protected-inner p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.7;
}

.protected-form {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.protected-form input {
  background: #1a1a1a;
  border: 1px solid #333;
  color: #fff;
  padding: 10px 16px;
  font-size: 13px;
  border-radius: 2px;
  outline: none;
  width: 200px;
}

.protected-form input:focus {
  border-color: var(--accent);
}

.btn-accent {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 10px 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: opacity 0.2s;
}

.btn-accent:hover { opacity: 0.85; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }

  .sidebar {
    width: 100%;
    min-height: auto;
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 16px 20px;
    gap: 16px;
  }

  .sidebar-logo { width: 40px; height: 40px; margin-bottom: 0; }

  nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px 20px;
    flex: 1 1 100%;
    min-width: 0;
  }

  .sidebar-socials { padding-top: 0; }
  .sidebar-copy { display: none; }

  body { flex-direction: column; }
  main { margin-left: 0; }

  /* Work grid — one big single column on mobile, images shown in full */
  .masonry-grid { display: block; padding: 12px; }
  .section-grid { display: block; padding: 4px 12px 16px; }
  .work-cat-header { margin: 22px 12px 8px; }
  .masonry-item {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 8px;
  }
  /* Show the whole image (natural aspect), full brightness, no crop/zoom */
  .masonry-item img {
    position: static;
    width: 100%;
    height: auto;
    object-fit: contain;
    transform: none;
    filter: var(--lv, ) brightness(var(--adj-b, 1)) saturate(var(--adj-s, 1)) contrast(var(--adj-c, 1));
  }
  /* Video / embed tiles have no static child, so give them a height */
  .masonry-item.pv-media-tile { aspect-ratio: 16 / 9; }

  /* Protected page: the flex-centered container shrink-wraps the grid on
     mobile, leaving the images tiny. Switch to block so the grid (and its
     images) fill the screen width; keep the password card centered. */
  .protected-page { display: block; padding: 0 0 48px; }
  .protected-inner { margin: 52px auto; max-width: min(380px, calc(100vw - 28px)); }
  #protected-content { width: 100%; }
  #protected-grid { padding: 8px; }
  .protected-disclaimer { padding: 0 14px; font-size: 12px; }

  /* Arcade */
  .arcade-page { padding: 28px 16px 64px; }
  .arcade-head h1 { font-size: 26px; }
  .arcade-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .work-header { padding: 24px 16px 16px; }

  /* Resume / About */
  .resume-page { padding: 28px 20px 60px; }
  .resume-top { flex-direction: column; gap: 20px; }
  .resume-avatar { width: 80px; height: 80px; }

  /* Gameography: stack list then carousel */
  .gameography-layout {
    flex-direction: column;
    gap: 24px;
  }

  .gameography-preview {
    width: 100%;
    justify-content: center;
    order: -1; /* carousel above list on mobile */
  }

  .gp-stage {
    width: 120px;
    height: 180px;
  }

  .gp-card {
    width: 100%;
    height: 100%;
  }

  /* Skills */
  .skills-cloud { gap: 6px; }
  .skill-tag { font-size: 10px; padding: 4px 10px; }

  /* Software grid */
  .software-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .software-item { font-size: 11px; padding: 10px 12px; gap: 8px; }
  .software-icon { width: 28px; height: 28px; }

  /* Contact — fit within the visible viewport (no scroll to reach the email) */
  .contact-page {
    min-height: calc(100dvh - 118px);
    justify-content: center;
    padding: 24px;
  }
  .contact-bg {
    left: 50%;
    right: auto;
    top: 50%;
    bottom: auto;
    width: 250%;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: fill;
  }

  /* Home slideshow arrows */
  .slide-prev { left: 8px; font-size: 28px; }
  .slide-next { right: 8px; font-size: 28px; }
  .slide-caption { bottom: 48px; right: 16px; }
}
