/* Game-dev portfolio — Space Grotesk headings, Share Tech Mono terminal. */

/* ─── Light mode (default) ────────────────────────── */
:root {
  --bg: #f5f5f7;
  --bg-card: #ffffff;
  --bg-surface: #edeef2;
  --fg: #0e0f11;
  --fg-dim: #4a4d5a;
  --muted: #8a8d9a;
  --accent: #0e0f11;
  --accent-dim: #3a3d4a;
  --border: rgba(0, 0, 0, .09);
  --border-strong: rgba(0, 0, 0, .13);
  --shadow: 0 6px 24px rgba(0, 0, 0, .09);
  --radius: 16px;
  --max: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-ui: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'Share Tech Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --reel-fade-width: 28%;
  --reel-fade-color: 245, 245, 247;
  --header-bg: rgba(245, 245, 247, .88);
}

/* Dark mode SCRAPPED by user request — keeping it light and AAA. */

* {
  box-sizing: border-box
}

html {
  color-scheme: light;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block
}

a {
  color: inherit;
  text-decoration: none
}

a:hover {
  text-decoration: underline
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth
  }

  .card {
    will-change: transform
  }

  .hero h1 {
    animation: fadeUp .7s ease both;
  }

  .hero p,
  .pill-row,
  .toolbar,
  .section {
    animation: fadeUp .7s ease both;
    animation-delay: .08s;
  }

  .hero-who {
    animation: fadeUp .7s ease both;
    animation-delay: .16s;
  }

  .pill-row {
    animation-delay: .14s
  }

  .toolbar {
    animation-delay: .18s
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: var(--gutter);
  top: var(--gutter);
  width: auto;
  height: auto;
  background: var(--bg);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  z-index: 9999;
  text-decoration: none;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

header.site-header {
  position: sticky;
  top: 0;
  background: var(--header-bg);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  gap: 18px;
}

.brand {
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: .5px;
  color: var(--fg);
}

.nav-links {
  display: flex;
  gap: 14px;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 14px;
  letter-spacing: .3px;
  font-weight: 500;
}

.nav-links a {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--fg-dim);
  transition: color .15s;
}

.nav-links a:hover {
  color: var(--fg);
  text-decoration: none;
}

.nav-links a[aria-current="page"] {
  color: var(--fg);
  background: rgba(255, 255, 255, .06);
  text-decoration: none;
}

@media (max-width: 480px) {
  .nav {
    gap: 8px;
  }

  .nav-links {
    gap: 2px;
  }

  .nav-links a {
    padding: 8px 6px;
    font-size: 13px;
    white-space: nowrap;
  }

  .brand {
    font-size: 13px;
    white-space: nowrap;
  }
}

.hero {
  padding: clamp(12px, 3vw, 24px) 0 16px;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
}

@media (min-width: 960px) {
  .hero-layout {
    display: grid;
    grid-template-columns: 530px 1fr;
    gap: 32px;
    align-items: stretch;
    min-height: 180px;
    overflow: hidden;
    margin-right: 0;
  }

  .hero-layout>div:first-child {
    max-width: 530px;
    /* Exact 'pink line' width */
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* ─── Terminal hero block (Light mode polish) ─────── */
.term-block {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .02), inset 0 1px 0 rgba(255, 255, 255, .8);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: rgba(0, 0, 0, .01);
  border-bottom: 1px solid var(--border);
}

.term-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: 0 0 11px;
}

.term-dot--r {
  background: #ff5f56;
}

.term-dot--y {
  background: #ffbd2c;
}

.term-dot--g {
  background: #27c840;
}

.term-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-left: 4px;
  letter-spacing: .5px;
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 6px 14px 8px;
  font-family: var(--font-mono);
  font-size: clamp(16px, 2.2vw, 24px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: .5px;
}

.term-line {
  display: flex;
  align-items: baseline;
  gap: 0;
}

.term-prompt {
  color: var(--accent);
  user-select: none;
  flex: 0 0 auto;
}

.term-line {
  color: var(--fg);
}

.term-accent {
  color: var(--accent);
}

.term-cursor-line {
  opacity: .7;
}

.term-cursor {
  display: inline-block;
  width: .55em;
  height: 1.1em;
  background: var(--accent);
  vertical-align: text-bottom;
  border-radius: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .term-cursor {
    animation: blink 1.1s step-end infinite;
  }
}

@keyframes blink {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0
  }
}

#main>.hero p {
  margin: 0 0 12px;
  font-size: clamp(15px, 1.35vw, 17px);
  line-height: 1.6;
  max-width: 640px;
}

.hero h1 {
  margin: 0 0 4px;
  font-size: clamp(22px, 3vw, 36px);
  letter-spacing: -.3px;
  line-height: 1;
}

.hero p {
  margin: 0;
  color: var(--fg-dim);
  max-width: 55ch;
  font-size: clamp(15px, 1.35vw, 17px);
  font-family: var(--font-ui);
  line-height: 1.6;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-dim);
  background: var(--bg-card);
  transition: transform 0.15s ease, border-color .15s, color .15s;
}

.pill:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--fg);
  text-decoration: none;
}

.pill strong {
  color: var(--fg);
  font-weight: 600;
}

.pill-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 6px;
  object-fit: cover;
}

.pill-icon--unreal {
  object-fit: contain;
  background: #111;
  padding: 2px;
}

.pill-icon--svg {
  border-radius: 0;
}

.hero-reel {
  position: relative;
  width: 100%;
  min-height: 320px;
  max-height: 520px;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  isolation: isolate;
}

@media (min-width: 960px) {
  .hero-reel {
    min-height: 0;
    max-height: none;
    height: 100%;
  }
}

.reel-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #111;
  aspect-ratio: 16/9;
}

.hero-text-block {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

/* Small "here's who I am" strip under the hero intro line */
.hero-who {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.hero-who__photos {
  display: flex;
  flex-shrink: 0;
}

.hero-who__avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--bg);
  box-shadow: 0 3px 12px rgba(0, 0, 0, .18);
  display: block;
  flex-shrink: 0;
}

.hero-who__avatar+.hero-who__avatar {
  margin-left: -22px;
}

.hero-who__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-who__avatar--banner img {
  /* Moderate crop: fills the circle but doesn't zoom in so tight it loses context */
  object-fit: cover;
  transform: scale(1.6);
  transform-origin: 60% 22%;
}

/* He's in the right third of this photo, mid-height, not top-center - use background-position
   instead of transform so the crop point is exact rather than compounded with object-fit:cover. */
.hero-who__avatar--speaker {
  background-image: url('Marwan/optimized/Pro_Speaker_Pose_Pic.jpg');
  background-size: 320%;
  background-position: 90% 44%;
  background-repeat: no-repeat;
}

.hero-who__text {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.45;
  color: var(--fg-dim);
}

.hero-who__text strong {
  color: var(--fg);
}

.hero-who__text a {
  color: var(--fg);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.hero-reel::before,
.hero-reel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(var(--reel-fade-width, 28%), 46%);
  pointer-events: none;
  z-index: 2;
}

.hero-reel::before {
  left: 0;
  background: linear-gradient(90deg,
      rgba(var(--reel-fade-color), 1) 0%,
      rgba(var(--reel-fade-color), .55) 45%,
      rgba(var(--reel-fade-color), 0) 100%);
}

.hero-reel::after {
  right: 0;
  background: linear-gradient(270deg,
      rgba(var(--reel-fade-color), 1) 0%,
      rgba(var(--reel-fade-color), .55) 45%,
      rgba(var(--reel-fade-color), 0) 100%);
}

.reel-fade {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 35%;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(270deg, var(--bg) 0%, transparent 100%);
}

.layout-tuner {
  position: fixed;
  right: 14px;
  top: 84px;
  z-index: 1200;
  width: min(320px, calc(100vw - 24px));
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px;
  font-family: var(--font-ui);
}

.layout-tuner h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.layout-tuner label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 4px;
}

.layout-tuner input[type="range"] {
  width: 100%;
}

.layout-tuner__row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.layout-tuner__row button {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
}

.layout-tuner__drag {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 3;
  padding: 5px 8px;
  border-radius: 8px;
  font: 600 11px/1 var(--font-ui);
  color: #111;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(11, 11, 12, .15);
  cursor: grab;
  user-select: none;
}

.layout-tuner__drag:active {
  cursor: grabbing;
}

@media (max-width: 420px) {
  .pill {
    padding: 9px 10px;
    gap: 8px
  }

  .pill-icon {
    width: 16px;
    height: 16px;
    flex-basis: 16px
  }
}

/* (floaty/binaryShift removed — replaced by terminal block cursor) */

.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 12px 0;
}

.section {
  padding: 8px 0 32px;
}

.section h2 {
  margin: 0 0 14px;
  font-size: clamp(22px, 2.5vw, 28px);
  letter-spacing: -.2px;
  font-weight: 600;
}

.section .sub {
  margin: 0 0 18px;
  color: var(--fg-dim);
  font-family: var(--font-ui);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.card {
  grid-column: span 12;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .4), 0 0 0 1px var(--accent-dim);
  border-color: var(--accent-dim);
  text-decoration: none;
}

.card-media {
  position: relative;
  aspect-ratio: 16/9;
  background: rgba(255, 255, 255, .03);
  overflow: hidden;
}

.card-media img,
.card-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: opacity 0.3s ease;
}

.card-video {
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}

.card:hover .card-video {
  opacity: 1;
}

.card-body {
  padding: 14px 14px 16px;
}

.card-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.1px;
  color: var(--fg);
}

.card-meta {
  margin: 0 0 8px;
  color: var(--fg-dim);
  font-family: var(--font-ui);
  font-size: 13px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.card-desc {
  margin: 8px 0 0;
  color: var(--fg-dim);
  font-size: 14.5px;
  line-height: 1.55;
}

.card-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--fg-dim);
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 600;
  font-family: var(--font-mono);
}

@media (min-width: 760px) {
  .card {
    grid-column: span 4;
  }

  .card--wide {
    grid-column: span 12;
  }
}

/* Homepage category banners: slimmer on desktop to avoid oversized blocks. */
.featured-grid {
  align-items: start;
}

.featured-card {
  grid-column: span 12;
}

.category-card .card-media {
  aspect-ratio: 16/6;
  min-height: 160px;
  max-height: 220px;
  position: relative;
  overflow: hidden;
}

.category-card .card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

/* Ensure index category capsule banners stay truly centered. */
.featured-grid .category-card .card-media img {
  object-position: 50% 50% !important;
}

@media (min-width: 980px) {
  .featured-card {
    grid-column: span 4;
  }

  .category-card .card-media {
    aspect-ratio: 16/6;
    min-height: 175px;
    max-height: 210px;
  }
}

.scroll-toggle {
  position: fixed;
  right: 16px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 90;
  box-shadow: var(--shadow);
  font-family: var(--font-mono);
}

.scroll-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 16px;
}

.toolbar--stacked {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.toolbar__row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 900px) {
  .toolbar__row {
    flex-wrap: nowrap;
  }
}

.toolbar__row .filters {
  flex: 1 1 auto;
}

.toolbar__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  width: 100%;
  margin: 0 0 2px;
  font-family: var(--font-mono);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--fg-dim);
  padding: 9px 14px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.btn:hover {
  color: var(--fg);
  border-color: var(--accent);
  text-decoration: none;
}

.btn[aria-pressed="true"] {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
  text-decoration: none;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--bg-card);
  min-width: min(200px, 100%);
  flex: 1 1 200px;
}

.search input {
  border: 0;
  outline: 0;
  width: 100%;
  font-family: var(--font-ui);
  font-size: 14px;
  background: transparent;
  color: var(--fg);
}

.search input::placeholder {
  color: var(--muted);
}

.search .hint {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 12px;
  white-space: nowrap;
}

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 16px 0;
  margin-top: 30px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 13px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.footer-links a {
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--fg-dim);
  transition: color .15s, border-color .15s;
}

.footer-links a:hover {
  text-decoration: none;
  color: var(--fg);
  border-color: var(--accent);
}

.prose {
  font-family: var(--font-ui);
  color: var(--fg);
  max-width: 75ch;
}

.prose p {
  color: var(--fg-dim)
}

.prose h3 {
  margin: 20px 0 8px;
  color: var(--fg)
}

.prose a {
  color: var(--accent)
}

.about-onepage {
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.about-onepage .site-footer {
  margin-top: auto;
  padding: 12px 0;
}

.about-stage {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 43%);
  gap: 26px;
  align-items: start;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 8px;
}

.about-copy {
  font-family: var(--font-ui);
  max-width: 68ch;
}

.about-copy h1 {
  margin: 0 0 8px;
  font-family: var(--font);
  font-size: clamp(32px, 4vw, 50px);
  letter-spacing: -.2px;
  font-weight: 700;
}

.about-copy p {
  margin: 0 0 10px;
  color: var(--fg-dim);
  font-size: 17px;
  line-height: 1.65;
}

.about-lead {
  color: var(--fg) !important;
  font-size: 19px !important;
}

.about-tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.about-tags span {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--bg-surface);
  color: var(--fg-dim);
  font-size: 12px;
  font-weight: 500;
}

.about-collage {
  position: relative;
  min-height: clamp(360px, 60vh, 560px);
}

.about-polaroid {
  position: absolute;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-surface);
  box-shadow: 0 16px 35px rgba(0, 0, 0, .5);
}

.about-polaroid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-polaroid picture {
  display: block;
  width: 100%;
  height: 100%;
}

.about-polaroid.a1 {
  inset: 7% auto auto 7%;
  width: 40%;
  height: 58%;
  transform: rotate(-5deg);
  z-index: 2;
}

.about-polaroid.a2 {
  inset: 8% 8% auto auto;
  width: 47%;
  height: 34%;
  transform: rotate(6deg);
  z-index: 4;
}

.about-polaroid.a3 {
  inset: 44% 16% auto auto;
  width: 39%;
  height: 30%;
  transform: rotate(-7deg);
  z-index: 5;
}

.about-polaroid.a4 {
  inset: auto auto 6% 10%;
  width: 45%;
  height: 34%;
  transform: rotate(7deg);
  z-index: 3;
}

.about-polaroid.a5 {
  inset: auto 4% 4% auto;
  width: 46%;
  height: 24%;
  transform: rotate(-3deg);
  z-index: 6;
}

@media (max-width: 980px) {
  .about-onepage {
    overflow: auto;
  }

  .about-stage {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 18px;
    padding-bottom: 30px;
  }

  .about-collage {
    min-height: 520px;
  }
}

.about-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.about-shot {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(11, 11, 12, .03);
  min-height: 220px;
}

.about-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: transform .25s ease;
}

.about-shot:hover img {
  transform: scale(1.02);
}

@media (min-width: 760px) {
  .about-gallery {
    grid-template-columns: repeat(12, 1fr);
    gap: 14px;
  }

  .about-shot {
    grid-column: span 4;
    min-height: 240px;
  }

  .about-shot--tall {
    grid-column: span 5;
    grid-row: span 2;
    min-height: 100%;
  }

  .about-shot--wide {
    grid-column: span 7;
  }
}

.project-hero {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 900px) {
  .project-hero {
    grid-template-columns: 1.2fr .8fr;
  }
}

.project-cover {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(11, 11, 12, .04);
  aspect-ratio: 16/9;
  max-height: 420px;
}

.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.project-cover video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

.project-meta {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--bg);
}

.project-meta dt {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted);
}

.project-meta dd {
  margin: 0 0 10px;
  font-family: var(--font-ui);
  font-size: 14px;
}

/* Compact, modern treatment for AVS project detail. */
body.project-page--compact .hero {
  padding: 10px 0 4px;
}

body.project-page--compact .hero h1 {
  margin: 0 0 4px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.04;
}

body.project-page--compact .hero p {
  font-size: 15px;
}

body.project-page--compact .divider {
  margin: 10px 0;
}

body.project-page--compact .section {
  padding: 8px 0 12px;
}

body.project-page--compact .project-hero {
  gap: 10px;
  grid-template-columns: 1.35fr .65fr;
}

body.project-page--compact .project-hero .project-cover {
  aspect-ratio: 21/7;
  max-height: 238px;
}

body.project-page--compact .project-hero .project-cover img {
  object-position: center 62%;
}

body.project-page--compact .project-meta {
  padding: 10px;
}

body.project-page--compact .project-meta dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  margin: 0;
}

body.project-page--compact .project-meta dt {
  margin: 0 0 2px;
  font-size: 11px;
}

body.project-page--compact .project-meta dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

body.project-page--compact .project-meta .btn {
  margin-top: 10px;
}

body.project-page--compact .section .prose {
  max-width: none;
  display: block;
  gap: 0;
  align-items: start;
}

body.project-page--compact .section .prose .project-cover {
  margin: 0 0 10px !important;
  aspect-ratio: 16/8;
  max-height: 220px;
}

body.project-page--compact .section .prose p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  max-width: 92ch;
}

.project-page--compact .project-case-study h2 {
  margin: 0 0 10px;
}

.project-page--compact .project-case-study {
  padding-top: 4px;
}

.avs-layout {
  display: grid;
  gap: 10px;
}

.avs-sections {
  display: grid;
  gap: 10px;
}

.case-block--avs {
  padding: 12px;
  margin: 0;
}

.case-block--avs h3 {
  font-size: 18px;
  margin: 0 0 6px;
}

.case-block--avs .case-media {
  margin-top: 8px;
}

.case-block--avs .case-media video,
.case-block--avs .case-media img,
.case-block--avs .case-media iframe {
  min-height: 170px;
}

@media (min-width: 980px) {
  .avs-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .avs-sections .case-block:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  body.project-page--compact .project-hero {
    grid-template-columns: 1fr;
  }

  body.project-page--compact .project-meta dl {
    grid-template-columns: 1fr;
  }

  body.project-page--compact .section .prose {
    grid-template-columns: 1fr;
  }
}

.project-case-study .sub {
  margin: 0 0 12px;
}

.facts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 10px 0 14px;
}

.fact-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(11, 11, 12, .02);
  font-family: var(--font-ui);
}

.fact-card dt {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--muted);
}

.fact-card dd {
  margin: 0;
  font-size: 14px;
}

.case-block {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
  padding: 14px;
  margin: 0 0 14px;
}

.case-block h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
}

.case-block p {
  margin: 0 0 10px;
  color: var(--fg-dim);
  font-family: var(--font-ui);
}

.case-block ul {
  margin: 0 0 8px 18px;
  padding: 0;
  color: var(--muted);
  font-family: var(--font-ui);
}

.case-block li {
  margin: 0 0 6px;
}

.case-accordion {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
  margin: 0 0 10px;
  overflow: hidden;
}

.case-accordion>summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px solid transparent;
  color: var(--fg);
}

.case-accordion[open]>summary {
  border-bottom-color: var(--border);
}

.case-accordion>summary::-webkit-details-marker {
  display: none;
}

.case-accordion .case-block {
  border: 0;
  border-radius: 0;
  margin: 0;
}

.project-static {
  padding-top: 2px;
  padding-bottom: 18px;
  font-family: var(--font-ui);
}

.project-static-page {
  font-family: var(--font-ui);
}

.project-static-page .hero h1,
.project-static-page h2,
.project-static-page h3 {
  font-family: var(--font-ui);
}

.project-static .hero p {
  margin: 0 0 4px;
  color: var(--fg-dim);
  font-size: 15px;
  line-height: 1.5;
  max-width: 70ch;
}

.project-static-top {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  align-items: start;
}

/* Cinematic full-bleed hero: v2 redesign */
.project-hero-cinematic {
  position: relative;
  /* Break out of the container so the video runs edge to edge, no white side bars */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  /* Capped so the banner never eats the whole viewport on a 1080p screen */
  height: clamp(300px, 46vh, 460px);
  overflow: hidden;
  background: #000;
  margin-bottom: 0;
}

.project-hero-cinematic video,
.project-hero-cinematic img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Heavier scrim so overlaid text stays readable on any frame of the video */
.project-hero-cinematic::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.78) 30%, rgba(0, 0, 0, 0.35) 60%, rgba(0, 0, 0, 0.1) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.15) 55%, rgba(0, 0, 0, 0) 100%);
}

.project-hero-cinematic__content {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: var(--max);
  padding: 0 var(--gutter) 26px;
  z-index: 1;
}

.project-hero-cinematic__eyebrow {
  color: #fff;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.project-hero-cinematic__title {
  color: #fff;
  font-size: clamp(34px, 3.4vw, 48px);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 8px;
  text-shadow: 0 3px 22px rgba(0, 0, 0, 0.85);
}

.project-hero-cinematic__sub {
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  max-width: 62ch;
  margin: 0 0 16px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95);
}

/* Byline: boxed (not capsule) role/status chips so they read as data, not buttons */
.project-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  padding: 22px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  font-family: var(--font-ui);
}

.byline-box {
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--fg);
  border-radius: 4px;
  background: var(--bg-card);
  padding: 9px 14px;
  line-height: 1.35;
}

.byline-box__label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 3px;
}

.byline-box__value {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
}

.byline-box__value .logo-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.byline-box__value .logo-row img {
  height: 22px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

.project-overview {
  font-size: 20px;
  line-height: 1.62;
  color: var(--fg);
  max-width: 72ch;
  margin: 0 0 36px;
}

/* Minimal scroll affordance, bottom-right of the banner */
.scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  z-index: 2;
}

.scroll-cue span {
  display: none;
}

.scroll-cue:hover {
  background: rgba(255, 255, 255, 0.16);
  text-decoration: none;
}

/* Owned rows: text left, supporting image right, stacked top to bottom */
.owned-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.owned-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 22px;
  margin-bottom: 20px;
  border: 3px solid var(--cs-accent, #17c3d6);
  background: var(--bg-card);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.85);
  align-items: center;
}

.owned-row:last-child {
  margin-bottom: 0;
}

@media (min-width: 820px) {
  .owned-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    gap: 40px;
  }

  .owned-row--text-only {
    grid-template-columns: 1fr;
  }

  .owned-row--text-only>div {
    max-width: 640px;
  }
}

.owned-row h3 {
  margin: 0 0 12px;
  font-size: 23px;
}

.owned-row ul {
  margin: 0;
  padding-left: 18px;
}

.owned-row li {
  color: var(--fg-dim);
  line-height: 1.62;
  margin-bottom: 8px;
  font-size: 16.5px;
}

.owned-row__media img,
.owned-row__media video {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 0;
  border: none;
  display: block;
}

.placeholder-note {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 12px;
  color: #b45309;
  background: rgba(180, 83, 9, 0.1);
  border: 1px dashed rgba(180, 83, 9, 0.4);
  border-radius: 6px;
  padding: 2px 8px;
  margin-left: 6px;
}

@media (min-width: 980px) {
  .project-static-top {
    grid-template-columns: 1.25fr .75fr;
  }
}

.project-static-media video {
  width: 100%;
  display: block;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #000;
  aspect-ratio: 16/9;
  object-fit: contain;
}

.project-static-media img[data-project-cover] {
  width: 100%;
  display: block;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #000;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.project-static-media video[hidden],
.project-static-media img[data-project-cover][hidden] {
  display: none !important;
}

.project-static-meta {
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 20px;
  font-family: var(--font-ui);
  background: var(--bg-card);
}

.project-static-meta p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
}

.meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.meta-badges span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  background: rgba(11, 11, 12, .03);
}

.tech-spec-chip,
.meta-badges .tech-spec-chip {
  border-radius: 8px;
  font-weight: 500;
  color: var(--fg-dim);
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  cursor: default;
  user-select: none;
}

.tech-spec-chip--category {
  border-style: solid;
  font-weight: 600;
  color: var(--fg);
}

.meta-badges .engine-badge {
  border-radius: 8px;
  color: #fff !important;
}

.engine-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #15171c !important;
  color: #eef4ff;
  border-color: #15171c !important;
}

.engine-badge img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.role-highlight {
  font-size: 17px;
  color: var(--fg) !important;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cta-row--hero {
  margin-top: 12px;
  margin-bottom: 8px;
}

.btn--primary {
  background: #0f1115;
  color: #fff;
  border-color: #0f1115;
}

.btn--primary:hover {
  background: #1a1f28;
  text-decoration: none;
}

.btn--steam {
  background: linear-gradient(135deg, #1b2838 0%, #2a475e 58%, #66c0f4 100%);
  color: #fff;
  border-color: #1b2838;
}

.btn--steam:hover {
  background: linear-gradient(135deg, #243447 0%, #355d7e 58%, #7ad1ff 100%);
  text-decoration: none;
}

.project-static-grid {
  display: grid;
  gap: 24px 28px;
  grid-template-columns: 1fr;
}

@media (min-width: 880px) {
  .project-static-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.project-static .case-block {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
}

.project-static .case-block h3 {
  font-size: 22px;
  margin: 0 0 8px;
  line-height: 1.25;
}

.project-static .case-block p {
  line-height: 1.75;
  font-size: 15px;
}

/* Shared modern structure for all dynamic project pages. */
body.project-detail-modern {
  font-family: var(--font-ui);
}

body.project-detail-modern .hero {
  padding: 6px 0 4px;
}

body.project-detail-modern .hero h1 {
  margin: 0 0 4px;
  font-family: var(--font-ui);
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.06;
}

body.project-detail-modern .hero p {
  margin: 0;
  font-size: 15px;
}

body.project-detail-modern .divider {
  margin: 12px 0;
}

body.project-detail-modern .project-hero {
  grid-template-columns: 1.2fr .8fr;
  gap: 14px;
}

body.project-detail-modern .project-cover {
  aspect-ratio: 16/9;
  max-height: 420px;
}

body.project-detail-modern .project-meta {
  padding: 18px;
}

body.project-detail-modern .project-meta dd {
  line-height: 1.55;
}

body.project-detail-modern .section {
  padding: 10px 0 16px;
}

body.project-detail-modern .section h2 {
  margin: 0 0 10px;
  font-family: var(--font-ui);
  font-size: 26px;
}

body.project-detail-modern .prose {
  max-width: none;
  font-family: var(--font-ui);
}

body.project-detail-modern .prose p {
  line-height: 1.72;
  font-size: 15px;
}

body.project-detail-modern .case-block {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
}

body.project-detail-modern .case-block h3 {
  font-size: 22px;
  margin: 0 0 8px;
  line-height: 1.3;
}

body.project-detail-modern .case-accordion {
  border: 0;
  border-radius: 0;
  background: transparent;
  margin: 0 0 8px;
}

body.project-detail-modern .project-static-grid {
  display: grid;
  gap: 20px 24px;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  body.project-detail-modern .project-static-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.project-detail-modern .case-accordion>summary {
  padding: 6px 0;
  border-bottom: 0;
  font-size: 20px;
}

body.project-detail-modern .case-accordion .case-block {
  padding: 0;
}

@media (max-width: 920px) {
  body.project-detail-modern .project-hero {
    grid-template-columns: 1fr;
  }
}

.case-media {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  margin: 8px 0 0;
}

.case-media iframe,
.case-media video,
.case-media img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(11, 11, 12, .04);
  display: block;
  min-height: 220px;
  object-fit: cover;
}

.case-code {
  margin: 8px 0 0;
  background: #0f1218;
  color: #d8e0ee;
  border-radius: 12px;
  padding: 12px;
  overflow: auto;
  font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (min-width: 820px) {
  .facts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-media {
    grid-template-columns: 1fr;
  }
}

.avs-sections-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.case-section-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 42px 0;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 900px) {
  .case-section-row {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }

  .case-section-row:nth-of-type(even) .case-section__text {
    order: 2;
  }

  .case-section-row:nth-of-type(even) .case-media {
    order: 1;
  }

  .case-section-row--text-only {
    grid-template-columns: 1fr;
  }

  .case-section-row--text-only .case-section__text {
    max-width: 760px;
  }
}

.case-section-row:last-child {
  border-bottom: none;
}

.case-section__text h3 {
  font-size: 26px;
  margin: 0 0 16px;
  line-height: 1.25;
}

.case-section__text p {
  color: var(--fg-dim);
  line-height: 1.68;
  margin-bottom: 14px;
  font-size: 17px;
}

.case-section__text strong {
  color: var(--fg);
  font-weight: 600;
}

.case-section-row .case-media {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Modular Sections: alternating image/text banners, inspired by reference portfolios */
.case-section--modular {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: center;
}

.avs-sections-stack .case-section--modular:first-child {
  padding-top: 8px;
}

.avs-sections-stack .case-section--modular:last-child {
  border-bottom: none;
  padding-bottom: 8px;
}

.case-section--modular .section-header:only-child {
  grid-column: 1 / -1;
  max-width: 720px;
}

@media (min-width: 880px) {
  .case-section--modular {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 48px;
  }

  .case-section--modular .case-media {
    order: 1;
  }

  .case-section--modular .section-header {
    order: 2;
  }

  .case-section--modular:nth-of-type(even) .case-media {
    order: 2;
  }

  .case-section--modular:nth-of-type(even) .section-header {
    order: 1;
  }
}

.case-section--modular .section-header {
  text-align: left;
  max-width: none;
  margin: 0 0 10px 0;
}

.case-section--modular h3 {
  font-size: 1.6rem;
  margin-bottom: 8px;
  color: var(--accent);
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px 0;
}

.case-tags span {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Case study theme v3: bold full-bleed divider banners (one accent pulled from the game's own MOM/HUD
   cyan, not a generic multi-hue palette), numbered pillar cards for lists, media moved up top. */
:root {
  --cs-accent: #17c3d6;
  --cs-accent-ink: #05282d;
}

/* Dev log: chronological, image-first scrapbook scroll. No case-study report framing,
   no numbered cards - just what happened, in order, mostly told through screenshots. */
.devlog {
  max-width: 880px;
  margin: 24px auto 0;
}

.devlog-chapter {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cs-accent-ink);
  background: var(--cs-accent);
  display: inline-block;
  padding: 4px 10px;
  margin: 30px 0 14px;
}

.devlog *:first-child .devlog-chapter {
  margin-top: 0;
}

.devlog-entry {
  margin-bottom: 16px;
}

.devlog-entry__media {
  border-radius: 0;
  overflow: hidden;
  border: 4px solid var(--cs-accent);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.85);
  max-height: 380px;
}

.devlog-entry__media img,
.devlog-entry__media video {
  max-height: 372px;
  object-fit: cover;
  width: 100%;
  display: block;
}

.devlog-entry__note {
  margin: 8px 2px 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: #34363f;
}

.devlog-entry__note strong {
  color: var(--fg);
}

.devlog-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 620px) {
  .devlog-pair {
    grid-template-columns: 1fr 1fr;
  }
}

.devlog-note {
  border-left: 3px solid var(--cs-accent);
  padding: 4px 0 4px 16px;
  margin: 12px 2px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: #34363f;
}

.devlog-note strong {
  color: var(--fg);
}

.devlog-note p {
  margin: 0 0 6px;
}

.devlog-note p:last-child {
  margin-bottom: 0;
}

/* Callout box: bordered card with a solid-color header strip, like the reference sites'
   "KICK" / "DESIGNING A WILDCARD" boxes - a single mechanic explained on its own. */
.case-callout {
  border: 3px solid var(--cs-accent);
  background: var(--bg-card);
  margin: 14px 2px;
}

.case-callout__header {
  background: var(--cs-accent);
  color: var(--cs-accent-ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 14px;
}

.case-callout__body {
  padding: 12px 14px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  color: #34363f;
}

.case-callout__body strong {
  color: var(--fg);
}

.case-callout__body p {
  margin: 0 0 6px;
}

.case-callout__body p:last-child {
  margin-bottom: 0;
}

/* Split layout: image on one side, text on the other, alternating - not stacked media-then-text */
.devlog-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: center;
  margin: 14px 0;
}

@media (min-width: 680px) {
  .devlog-split {
    grid-template-columns: 1fr 1fr;
  }

  .devlog-split--reverse .devlog-split__media {
    order: 2;
  }

  .devlog-split--reverse .devlog-split__text {
    order: 1;
  }
}

.devlog-split__text {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.6;
  color: #34363f;
}

.devlog-split__text strong {
  color: var(--fg);
}

.devlog-split__text p {
  margin: 0 0 6px;
}

.devlog-split__text p:last-child {
  margin-bottom: 0;
}

.devlog-hook {
  font-family: var(--font);
  font-size: 19px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.4;
  margin: 20px 2px 0;
}

.learned-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 780px) {
  .learned-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.learned-card {
  border: 3px solid var(--cs-accent, #17c3d6);
  background: var(--bg-card);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.85);
}

.learned-card__media {
  overflow: hidden;
}

.learned-card__media img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.learned-card__media-img--zoom {
  object-position: 55% 78%;
  transform: scale(1.8);
  transform-origin: 55% 78%;
}

.learned-card__body {
  padding: 18px;
}

.learned-card h3 {
  font-size: 18px;
  margin: 0 0 8px;
}

.learned-card p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--fg-dim);
  margin: 0;
}

/* Angled ribbon banner, not a flat bar - matches the diagonal section dividers in the reference sites */
.case-divider-wrap {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 10px 0;
  overflow: hidden;
}

.case-study:first-of-type .case-divider-wrap {
  margin-top: 8px;
}

.case-divider {
  background: var(--cs-accent);
  color: var(--cs-accent-ink);
  padding: 15px clamp(24px, 6vw, 90px);
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font-mono);
  transform: skewY(-1.4deg);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.case-divider>* {
  transform: skewY(1.4deg);
}

.case-divider__num {
  font-size: 15px;
  font-weight: 700;
  opacity: 0.7;
}

.case-divider__label {
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.case-study {
  margin-bottom: 70px;
}

.case-study:last-of-type {
  margin-bottom: 0;
}

.case-study__inner {
  padding-top: 26px;
}

.case-pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 14px 0;
}

@media (min-width: 700px) {
  .case-pillars {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.case-pillar {
  border: 3px solid var(--cs-accent);
  background: var(--bg-card);
}

.case-pillar__num {
  display: block;
  background: var(--cs-accent);
  color: var(--cs-accent-ink);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 14px;
}

.case-pillar h4 {
  font-size: 16px;
  margin: 0;
  padding: 12px 16px 0;
}

.case-pillar p {
  padding: 0 16px 16px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.55;
  color: #34363f;
  margin: 0;
}

.case-rules {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.case-rules li {
  padding-left: 22px;
  position: relative;
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg-dim);
}

.case-rules li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--cs-accent-ink);
  background: var(--cs-accent);
  width: 16px;
  height: 16px;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
  border-radius: 3px;
  top: 3px;
}

.case-rules strong {
  color: var(--fg);
}

/* Case study index: plain terminal-style jump list, matches the mono prompt language used in the hero */
.case-index {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  margin: 18px 0 44px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 13.5px;
}

.case-index a {
  color: var(--fg-dim);
  text-decoration: none;
  padding: 2px 4px;
}

.case-index a:hover {
  color: var(--fg);
  text-decoration: underline;
}

.case-index a::before {
  content: "> ";
  color: var(--muted);
}

.case-index .case-index__sep {
  color: var(--border-strong);
  padding: 0 6px;
}

.case-index .case-index__num {
  display: none;
}

/* Case studies read as an extension of the page's own prose, not boxed dashboard cards -
   the bold divider banner is the separator now, not a plain rule. */
.case-study {
  scroll-margin-top: 20px;
}

.case-study__top {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
}

.case-study__num {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.case-study__discipline {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
}

.case-study h3 {
  font-size: 1.9rem;
  margin: 0 0 16px;
  line-height: 1.15;
}

.case-quote {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.48;
  color: var(--fg);
  margin: 0 0 22px;
  max-width: 62ch;
}

.case-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin: 0 0 26px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
}

.case-stat {
  padding: 0 20px 0 0;
  margin-right: 20px;
  border-right: 1px solid var(--border);
}

.case-stat:last-child {
  border-right: none;
  margin-right: 0;
  padding-right: 0;
}

.case-stat__num {
  display: block;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--fg);
}

.case-stat__label {
  display: block;
  font-family: var(--font-ui);
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.case-study__body {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--fg-dim);
  max-width: 74ch;
}

.case-study__body p {
  margin: 0 0 16px;
}

.case-study__body p:last-child {
  margin-bottom: 0;
}

.case-study__body strong {
  color: var(--fg);
}

.case-study__media {
  margin-top: 24px;
}

.case-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 6px;
}

.case-hook {
  font-size: 20px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.42;
  margin: 0 0 14px 0;
}

.case-section--modular .section-content p,
.case-section--modular .section-content li {
  font-size: 17px;
  line-height: 1.68;
  color: var(--fg-dim);
}

.case-section--modular h3,
.case-section-row h3 {
  font-size: 1.85rem;
}

.case-section--modular .section-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 3-Column Documentation Grid */
.case-section--modular .section-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-media.doc-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 620px) {
  .case-media.doc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .case-media.doc-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.doc-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
  cursor: pointer;
}

.doc-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-dim);
}

.doc-card::after,
.gallery-item::after {
  content: "🔍 Click to expand";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.doc-card:hover::after,
.gallery-item:hover::after {
  opacity: 1;
}

.doc-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.doc-card .btn-ldd {
  width: 100%;
  justify-content: center;
  margin-top: auto;
  padding: 6px;
  font-size: 0.75rem;
}

.case-section-row .case-media--gallery {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
}

.case-media--gallery {
  display: flex !important;
  flex-direction: column;
  gap: 14px;
}

.case-media--gallery .gallery-item,
.case-media--gallery video {
  width: 100%;
}

.case-media--gallery .gallery-item img,
.case-media--gallery video {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: cover;
  aspect-ratio: 16/9;
}

.btn-ldd {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-top: 15px;
}

.btn-ldd:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* Single Item Layout */
.case-section-row .case-media--single {
  grid-template-columns: 1fr;
  display: grid;
}

.case-section-row .case-media--single img,
.case-section-row .case-media--single video {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  object-fit: cover;
}

.contact-banner {
  position: relative;
  margin: 0 0 20px;
  width: 100%;
  max-width: none;
  height: 220px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0b0b0c;
}

/* Lightbox & Gallery Styles */
.gallery-item {
  margin: 0;
  padding: 0;
}

.gallery-item img {
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item img:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
  padding: 40px;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
  cursor: zoom-out;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  border-radius: 8px;
}

.contact-banner__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .55;
}

.contact-banner__scrim {
  position: absolute;
  inset: 0;
  background: rgba(11, 11, 12, 0.45);
  pointer-events: none;
}

.contact-banner__inner {
  position: relative;
  z-index: 1;
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-banner__eyebrow {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg);
  font-family: var(--font-mono);
}

.contact-banner__title {
  margin: 0;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -.2px;
  font-family: var(--font);
  color: #fff;
}

.contact-banner__lede {
  margin: 22px 0 0;
  max-width: 42ch;
  font-size: 17px;
  line-height: 1.6;
  color: #d1d1d6;
  font-family: var(--font-ui);
}

.contact-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin-bottom: 8px;
}

.contact-card a,
.contact-card .contact-hyperlink {
  color: #0b5fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  word-break: break-word;
}

.contact-card a:hover {
  color: #0040c9;
}

.contact-page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.contact-page .site-footer {
  margin-top: 0;
}

.contact-main {
  width: 100%;
  max-width: min(980px, 100%);
  align-self: center;
  padding-top: 18px;
  padding-bottom: 18px;
}

.contact-page--banner .contact-main {
  padding-top: 0;
}

.contact-page--banner .contact-section {
  padding-top: 22px;
}

.contact-hero {
  padding: 8px 0 6px;
}

.contact-hero h1 {
  margin: 0 0 6px;
}

.contact-section {
  padding: 10px 0 12px;
}

.contact-section h2 {
  margin: 0 0 10px;
}

.contact-card {
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 14px;
  background: var(--bg-card);
  font-family: var(--font-ui);
}

.contact-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.1px;
}

.contact-card p {
  margin: 0;
  color: var(--fg-dim);
}

@media (min-width: 760px) {
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .contact-page {
    grid-template-rows: auto auto auto;
  }

  .contact-main {
    align-self: start;
    padding-top: 8px;
  }
}

/* ─── Theme Toggle Button ─────────────────────────── */
.theme-toggle {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  font-size: 18px;
  transition: background 0.15s ease;
  margin-left: auto;
}

.theme-toggle:hover {
  background: rgba(128, 128, 128, 0.15);
}

[data-theme="dark"] .theme-icon::before {
  content: "🌙";
}

html:not([data-theme="dark"]) .theme-icon::before {
  content: "☀️";
}

/* ─── Terminal Role Links ─────────────────────────── */
.term-line--link {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
  display: flex;
  color: var(--accent) !important;
}

.term-line--link:hover {
  text-decoration-color: var(--accent);
  color: var(--accent-dim) !important;
}

.term-line--link .term-prompt {
  text-decoration: none !important;
}

/* ─── Featured Section & Cards ────────────────────── */
.featured-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.featured-header h2 {
  margin-bottom: 0;
  font-size: 24px;
}

.featured-all-link {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}

.featured-all-link:hover {
  text-decoration: underline;
}

.feat-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
  margin-bottom: 24px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  text-decoration: none !important;
  align-items: stretch;
}

@media (min-width: 768px) {
  .feat-card {
    grid-template-columns: 420px 1fr;
  }
}

.feat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--accent-dim);
  border-color: var(--accent-dim);
}

.feat-card__media {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  border-bottom: 1px solid var(--border-strong);
  overflow: hidden;
  /* Ensure video doesn't bleed */
}

@media (min-width: 768px) {
  .feat-card__media {
    border-bottom: none;
    border-right: 1px solid var(--border-strong);
    width: 420px;
    height: 100%;
    min-height: 0;
    align-self: stretch;
    flex-shrink: 0;
  }
}

.feat-card__media img,
.feat-card__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: opacity 0.3s ease;
}

.feat-card__video {
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  /* Let clicks pass to the card link */
}

.feat-card:hover .feat-card__video {
  opacity: 1;
}

.feat-card__body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feat-card__meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
}

.feat-num {
  color: var(--muted);
}

.feat-engine {
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
}

.feat-engine--unreal {
  background: rgba(255, 255, 255, 0.1);
  color: var(--fg);
}

.feat-engine--unity {
  background: rgba(255, 255, 255, 0.1);
  color: var(--fg);
}

.feat-card__title {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  color: var(--fg);
}

.feat-card__desc {
  font-family: var(--font-ui);
  color: var(--fg-dim);
  font-size: 16.5px;
  line-height: 1.6;
  margin: 0;
}

.feat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.feat-tags span {
  font-family: var(--font-ui);
  font-size: 12px;
  padding: 4px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--fg-dim);
}

.feat-cta {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  color: var(--accent);
  margin: 0;
  padding-top: 2px;
}

.featured-toolbar {
  margin: 0 0 14px;
}

.featured-toolbar .toolbar {
  margin: 0;
}

.feat-card[hidden] {
  display: none !important;
}
/* ---------------------------------------------------------------
   Case-study narrative structure (numbered phases + verdict lines)
   Used by anti-virus-squad.html and the Valorant study pages.
   --------------------------------------------------------------- */

.cs-lede {
  max-width: 880px;
  margin: 0 auto 26px;
  font-size: 17px;
  line-height: 1.65;
  opacity: 0.85;
}

h2.cs-head,
.section h2.cs-head {
  max-width: 880px;
  margin-left: auto !important;
  margin-right: auto !important;
}

.section .cs-lede {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}

.devlog-phase {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 40px 0 6px;
  font-size: 21px;
  line-height: 1.25;
  scroll-margin-top: 90px;
}

.devlog-phase__num {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--cs-accent);
  flex: 0 0 auto;
}

.devlog-phase:first-child {
  margin-top: 0;
}

.devlog-verdict {
  max-width: 68ch;
  margin: 12px 0 18px;
  padding: 10px 0 10px 14px;
  border-left: 3px solid var(--cs-accent);
  font-size: 15.5px;
  line-height: 1.6;
}

.devlog-verdict strong {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 4px;
  color: var(--cs-accent);
}

.devlog-body {
  max-width: 68ch;
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.7;
}

.devlog-body + .devlog-body {
  margin-top: -6px;
}

.cs-sources {
  max-width: 68ch;
  margin: 26px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--line, #2a2a33);
  font-size: 14px;
  line-height: 1.7;
}

.cs-sources h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 10px;
}

.cs-sources ol {
  margin: 0;
  padding-left: 20px;
}

.cs-sources li {
  margin-bottom: 7px;
}

@media (max-width: 620px) {
  .devlog-phase {
    font-size: 18px;
    gap: 9px;
  }
}

/* ---------------------------------------------------------------
   Wide project-page layout (matches the VALORANT hub treatment)
   Applies to every page using .project-static, including the
   dynamic project.html detail pages.
   --------------------------------------------------------------- */

/* Centred section headings and intros */
.project-static .section > h2 {
  text-align: center;
}

.project-static .project-overview {
  max-width: 84ch;
  margin-left: auto;
  margin-right: auto;
}

.project-static .cs-lede {
  text-align: center;
}

/* Close the dead gap between the intro copy and the first heading */
.project-static .section {
  padding-top: 0;
}

.project-static .project-overview + .section,
.project-static .project-byline + .section {
  margin-top: 18px;
}

@media (min-width: 1400px) {
  main.project-static {
    max-width: 1700px;
  }

  .project-hero-cinematic__content {
    max-width: 1700px;
  }

  /* Let the case-study column and its media grow with the page */
  .project-static .devlog {
    max-width: 1040px;
  }

  .project-static .devlog-body,
  .project-static .devlog-verdict,
  .project-static .cs-sources {
    max-width: 76ch;
  }

  .project-static h2.cs-head,
  .project-static .section .cs-lede {
    max-width: 1040px;
  }
}

/* Code screenshots inside owned-row media: show the whole snippet, never crop it */
.owned-row__media img.shot-code {
  object-fit: contain;
  background: #1e1e1e;
}

/* Rights / disclaimer footnote at the end of a project page */
.legal-note {
  max-width: 80ch;
  margin: 26px auto 8px;
  text-align: center;
  opacity: 0.72;
  line-height: 1.6;
}
