/* =================================================================== */
/* ============================= TOKENS ============================== */
/* =================================================================== */

/* Base tokens (keep cascade the same) */
:root {
  --fg: #111;
  --muted: #b9b9b9;
  --font-heading: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.2, .6, .2, 1);

  --container-max: 1600px;
  --edge: 50px;
  --octo-offset: 123px;
}

/* =================================================================== */
/* ============================== BASE =============================== */
/* =================================================================== */

html {
  scroll-behavior: auto !important;
  cursor: default;
}

@media (prefers-reduced-motion: no-preference) {

  .name-short .the,
  .name-short .rad {
    transition: transform 0.4s ease, color 0.3s ease;
  }
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  overflow: visible;
}

body {
  margin: 0;
  background: #fafafa;
  color: #111;
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(14px, 1.5vw + 0.2rem, 18px);
  line-height: 1.1;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  position: relative;
}

/* =================================================================== */
/* =========================== CURSOR FX ============================= */
/* =================================================================== */

#cursorOrb {
  position: fixed;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle,
      rgba(249, 215, 28, 0.3) 0%,
      rgba(249, 215, 28, 0.1) 30%,
      rgba(249, 215, 28, 0.03) 60%,
      rgba(249, 215, 28, 0.01) 85%,
      transparent 100%);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9998;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.05s ease;
  will-change: transform;
}

#cursorFlashlight {
  position: fixed;
  width: 25px;
  height: 25px;
  background-image: url('assets/flashlight.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ========================================================= */
/* === Disable custom cursor on touch devices / tablets === */
/* ========================================================= */

@media (hover: none),
(pointer: coarse) {
  body.dark-mode {
    cursor: default !important;
  }

  #cursorOrb,
  #cursorFlashlight {
    display: none !important;
    opacity: 0 !important;
    animation: none !important;
  }
}

/* =================================================================== */
/* ============================== HEADER ============================= */
/* =================================================================== */

.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 0.4rem 2rem 0 30px;
  height: 60px;
  background: #fafafa;

  text-transform: uppercase;
  font-family: var(--font-heading);
  letter-spacing: 0;
}

.name-wrapper {
  position: relative;
}

/* THEINER RADIM -> THE RAD colors & swap (lighter surname, darker given) */
.name {
  font-family: 'IBM Plex Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-weight: 900;
  letter-spacing: 0;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1;
  padding-left: 20px;
  color: #111;
  text-decoration: none;
}

.sticky-header .name {
  transition: color .2s ease;
}

.name-full {
  opacity: 1;
  transition: opacity 0.4s ease;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.name-full .surname {
  color: var(--muted) !important;
}

.name-full .given {
  color: var(--fg) !important;
}

.name-short {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;

  pointer-events: none;
  display: inline-block;
  text-decoration: none;

  transform: translateX(0);
  transition: opacity 0.1s ease;
}

.name-short .the {
  color: var(--muted) !important;
  margin-right: 0.3em;
}

.name-short .rad {
  color: var(--fg) !important;
  display: inline-block;
  transform: translateX(1.5em);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

/* When scrolled */
.name-scrolled .name-full {
  opacity: 0;
  pointer-events: none;
}

.name-scrolled .name-short {
  opacity: 1;
  pointer-events: auto;
}

.name-scrolled .name-short .rad {
  opacity: 1;
  transform: translateX(0);
}

/* Right header group */
.header-right {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  padding-bottom: 1rem;
}

/* Contact link + socials */
.contact-link {
  font-size: 17px;
  font-weight: 500;
  color: #111;
  text-decoration: none;
  transition: color 0.3s ease;
  padding-bottom: 2.3rem;
  display: flex;
  align-items: flex-end;
  font-family: 'Courier New', Courier, monospace;
}

.contact-link:hover {
  color: #b9b9b9;
}

.social-link {
  font-size: 14px;
  color: #111;
  text-decoration: none;
  transition: color 0.3s ease;
}

.social-link:hover {
  color: #b9b9b9;
}

/* Bulb */
.bulb-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  padding-top: 0.1rem;
}

.bulb-rope {
  width: 2px;
  height: 80px;
  background-color: currentColor;
  margin-bottom: -8px;
}

.lightbulb-toggle {
  color: #111;
  cursor: pointer;
}

.lightbulb-toggle svg {
  width: 24px;
  height: 32px;
  margin-top: 2px;
  margin-bottom: -8px;
}

.lightbulb-toggle.animate {
  animation: pull-light 0.3s ease;
}

@keyframes pull-light {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(4px);
  }

  100% {
    transform: translateY(0px);
  }
}

/* =================================================================== */
/* ============================ GLOBAL UI ============================ */
/* =================================================================== */

.section {
  padding: 50px 0px;
  min-height: 70vh;
  line-height: 1;
  position: relative;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(28px, 3.2vw, 48px);
  line-height: .95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  padding-left: 50px;
  color: var(--fg);
}

/* Scroll arrow (hero) */
#scrollArrow {
  position: absolute;
  top: 92vh;
  left: 30px;
  transform: translateX(-50%);
  font-size: 1.5rem;
  color: #111;
  opacity: 0;
  z-index: 1;
  animation: arrowBlink 3s ease-in-out infinite;
  animation-delay: 0.5s;
  cursor: pointer;
  max-width: 1600px;
}

.arrow-wrapper {
  max-width: 1600px;
  margin: 0 auto;
  position: relative;
}

.scroll-text {
  position: absolute;
  top: 0.2rem;
  left: 2rem;
  transform: translateX(-50%) translateY(5px);
  font-size: 0.9rem;
  color: #333;
  white-space: nowrap;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#scrollArrow:hover .scroll-text {
  opacity: 0.9;
  transform: translateX(-50%) translateY(0);
}

@keyframes arrowBlink {

  0%,
  100% {
    opacity: 0.9;
  }

  50% {
    opacity: 0.5;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Footer */
footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0.3rem 1.5rem 0.5rem;
  background: #fafafa;
  border-top: 0.1px solid #b9b9b9;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  gap: 2rem;
}

.footer-left,
.footer-center,
.footer-right {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: #111;
}

.footer-center a {
  font-weight: 500;
  color: #111;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-center a:hover {
  color: #b9b9b9;
}

/* Contact overlay */
.contact-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(250, 250, 250, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  opacity: 1;
  pointer-events: all;
  transition: opacity 0.3s ease;
  color: #000;
}

.contact-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.contact-box {
  text-align: center;
  font-size: 18px;
  font-weight: 400;
  text-transform: uppercase;
  padding: 2rem;
}

.contact-box a {
  display: block;
  font-size: 16px;
  margin: 10px 0;
  color: #111;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-box a:hover {
  color: #b9b9b9;
}

.contact-overlay .close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 28px;
  font-weight: 300;
  color: #111;
  cursor: pointer;
  user-select: none;
  padding: 4px;
}

.close-btn:hover {
  color: #3b7d8e;
}

/* Footer links reset */
footer a {
  color: inherit;
  text-decoration: none;
}

footer a:visited,
footer a:active {
  color: inherit;
  text-decoration: none;
}

footer a:hover {
  text-decoration: none;
}

/* ========================================================= */
/* === iOS / mobile tap highlight + selection cleanup ======= */
/* ========================================================= */

/* Remove the gray/blue tap flash on iOS */
a,
button,
[role="button"],
input,
textarea,
select,
label,
.lightbulb-toggle,
.close-btn,
.contact-link,
.social-link {
  -webkit-tap-highlight-color: transparent;
}

/* Prevent text selection “blue blocks” when tapping UI */
.lightbulb-toggle,
.close-btn,
#scrollArrow,
.section-scroll-arrow,
.ribbon-item,
.strip-thumb,
.video-row,
.player-box,
.coding-item,
.coding-stage,
.coding-mobile-head,
.coding-mobile-body img {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Optional: remove default focus ring outlines on tap (only if you don’t rely on them) */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid currentColor;
  /* keeps keyboard accessibility */
  outline-offset: 2px;
}


/* =================================================================== */
/* ============================= DARK MODE =========================== */
/* =================================================================== */

body.dark-mode {
  background-color: #2c2c2c;
  color: #fafafa;
  cursor: none;

  --fg: #fafafa;
  --muted: #b9b9b9;
}

body.dark-mode #cursorOrb {
  opacity: 0.6;
}

body.dark-mode #cursorFlashlight {
  opacity: 1;
  animation: bobbing 2.5s ease-in-out infinite, flicker 0.15s infinite;
}

@keyframes bobbing {
  0% {
    transform: translate(-50%, -52%);
  }

  50% {
    transform: translate(-50%, -48%);
  }

  100% {
    transform: translate(-50%, -52%);
  }
}

@keyframes flicker {

  0%,
  19%,
  21%,
  23%,
  25%,
  54%,
  56%,
  100% {
    opacity: 1;
  }

  20%,
  22%,
  24%,
  55% {
    opacity: 0.85;
  }
}

body.dark-mode .sticky-header,
body.dark-mode footer,
body.dark-mode .contact-overlay {
  background-color: #2c2c2c;
}

body.dark-mode .section-title,
body.dark-mode #scrollArrow,
body.dark-mode .scroll-text,
body.dark-mode a,
body.dark-mode .social-link,
body.dark-mode .contact-link,
body.dark-mode .footer-left,
body.dark-mode .footer-right,
body.dark-mode .name-short .rad,
body.dark-mode .footer-center a,
body.dark-mode .close-btn {
  color: #fafafa;
}

body.dark-mode .contact-box {
  color: #fafafa;
}

body.dark-mode .footer-center a:hover,
body.dark-mode .social-link:hover,
body.dark-mode .contact-link:hover,
body.dark-mode .contact-box a:hover,
body.dark-mode .close-btn:hover {
  color: #f9d71c;
}

body.dark-mode .lightbulb-toggle,
body.dark-mode #scrollArrow {
  color: #f9d71c;
}

body.dark-mode .name:hover,
body.dark-mode .name-full:hover,
body.dark-mode .name-short:hover,
body.dark-mode .name:hover span {
  color: #f9d71c;
}

body.dark-mode .sticky-header .name:hover,
body.dark-mode .sticky-header .name:hover span,
body.dark-mode .sticky-header .name-full:hover,
body.dark-mode .sticky-header .name-short:hover {
  color: #f9d71c !important;
}

body.dark-mode .lightbulb-toggle svg {
  filter: drop-shadow(0 0 6px #f9d71c88);
}

body.dark-mode .bulb-rope {
  background-color: #f9d71c;
}

/* Dark mode mapping for name parts */
body.dark-mode .name-full .surname,
body.dark-mode .name-short .the {
  color: #b9b9b9 !important;
}

body.dark-mode .name-full .given,
body.dark-mode .name-short .rad {
  color: #fafafa !important;
}

/* Dark mode: hide cursor on header + ribbons + video list + coding list */
body.dark-mode .sticky-header,
body.dark-mode .sticky-header *,
body.dark-mode .project-ribbon,
body.dark-mode .project-ribbon *,
body.dark-mode .videos-lines,
body.dark-mode .videos-lines *,
body.dark-mode .coding-list,
body.dark-mode .coding-list * {
  cursor: none !important;
}

body.dark-mode .mobile-list,
body.dark-mode .mobile-list * {
  cursor: none !important;
}

/* ========================================================= */
/* === Dark mode: hide system cursor over key interactives === */
/* ========================================================= */

body.dark-mode #scrollArrow,
body.dark-mode #scrollArrow *,

/* Section arrows (new ones) */
body.dark-mode .section-scroll-arrow,
body.dark-mode .section-scroll-arrow *,

/* PHOTO — ribbon, strip, stage image, nav arrows, lightbox controls */
body.dark-mode .project-ribbon,
body.dark-mode .project-ribbon *,
body.dark-mode .strip,
body.dark-mode .strip *,
body.dark-mode .stage-box,
body.dark-mode .stage-box *,
body.dark-mode .lightbox,
body.dark-mode .lightbox *,

/* VIDEO — preview player (thumbnail area), link + badge */
body.dark-mode .player-box,
body.dark-mode .player-box *,
body.dark-mode .player-link,
body.dark-mode .player-badge,

/* CODING — preview images (desktop + mobile) */
body.dark-mode .coding-stage,
body.dark-mode .coding-stage *,
body.dark-mode .coding-preview,
body.dark-mode .coding-preview *,
body.dark-mode .coding-mobile,
body.dark-mode .coding-mobile *,

/* Contact overlay close “X” */
body.dark-mode .contact-overlay .close-btn,
body.dark-mode .contact-overlay .close-btn * {
  cursor: none !important;
}

/* =================================================================== */
/* ============================== HERO =============================== */
/* =================================================================== */

.intro-section {
  position: relative;
  height: 130vh;
  overflow: visible;
}

.hero-headline {
  position: absolute;
  top: 25vh;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  text-align: center;

  font-family: 'IBM Plex Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-weight: 900;
  font-size: clamp(32px, 7.8vw, 128px);
  line-height: 0.92;
  letter-spacing: 0;
  color: #111;
  white-space: nowrap;
}

body.dark-mode .name,
body.dark-mode .hero-headline {
  color: #fafafa;
}

/* Typewriter stays centered ~60vh */
.typewriter-container {
  position: absolute;
  top: 60vh;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  text-align: center;
  font-size: clamp(18px, 2vw, 22px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 5;
  white-space: normal;
  word-break: break-word;
  will-change: transform, opacity;
}

body.dark-mode .typewriter-container {
  opacity: 0.3;
  color: #fafafa;
}

.typewriter-text-wrapper {
  display: inline-block;
  white-space: pre-line;
}

.cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
}

/* ===== Creative Octopus block (original size, new position) ===== */

.sticky-intro-wrapper {
  position: static;
}

.intro-text {
  position: absolute;
  top: 80vh;

  /* keep it 123px from viewport edge */
  right: calc(var(--octo-offset) - max(0px, (100vw - var(--container-max)) / 2));
  left: auto;

  font-size: clamp(0.9rem, 0.8vw + 0.3rem, 1.4rem);
  font-weight: 300;
  text-transform: uppercase;

  line-height: 1.0;
  letter-spacing: 0.01em;

  margin-top: 0.3rem;
  padding-left: 0;
  max-width: 500px;

  text-align: right;
}

.intro-text p {
  margin: 0 0 0.1rem 0;
}

/* Mobile fallback */
@media (max-width: 768px) {
  .intro-text {
    right: 16px;
    left: 16px;
    max-width: none;
    text-align: left;
  }
}

/* Biker */
.sticky-intro {
  position: -webkit-sticky;
  position: relative;
  top: 60px;
  z-index: 10;
  background: inherit;
}

#bikerCircle {
  width: 100px;
  height: 100px;
  background-image: url('assets/biker-dark.gif');
  background-size: contain;
  background-repeat: no-repeat;
  position: fixed;
  left: calc(100vw - 3vh - 100px);
  opacity: 1;
  transition: opacity 0.5s ease, background-image 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

body.dark-mode #bikerCircle {
  background-image: url('assets/biker-light.gif');
}

/* =================================================================== */
/* =============================== PHOTO ============================= */
/* =================================================================== */

/* Photo gallery vars (intentionally override --edge later in the file) */
:root {
  --ribbon-thumb: clamp(96px, 9vw, 140px);
  --strip-thumb: clamp(44px, 5.4vw, 70px);
  --strip-thumb-m: clamp(28px, 10.5vw, 40px);
  --edge: clamp(12px, 2.6vw, 32px);
  --gap: 10px;
}

/* Container */
.gallery {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: clamp(100px, 2.6vw, 28px);
  padding-inline: var(--edge);
  align-items: start;
  overflow-x: hidden;
}

/* Ribbon */
.project-ribbon {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  column-gap: clamp(10px, 1.6vw, 18px);
  row-gap: clamp(10px, 1.6vw, 18px);
  align-items: flex-start;
}

.ribbon-item {
  flex: 0 0 var(--ribbon-thumb);
  width: var(--ribbon-thumb);
  display: grid;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  border: 0;
  background: transparent;
  outline: none;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
}

.ribbon-item .num {
  font: 600 12px var(--font-heading);
  letter-spacing: 0.06em;
  color: var(--muted);
  padding-left: 2px;
  text-align: left;
}

.ribbon-item .thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.ribbon-item .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.45s var(--ease);
}

.ribbon-item .overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
  font: 800 clamp(12px, 1.2vw, 16px) var(--font-heading);
  letter-spacing: 0.06em;
  color: #fff;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  transition: opacity 0.45s var(--ease), background 0.45s var(--ease);
}

.ribbon-item:hover .overlay {
  background: rgba(0, 0, 0, 0.42);
  opacity: 1;
}

.project-ribbon::after {
  content: '';
  flex: 0 0 var(--ribbon-thumb);
}

.ribbon-item[aria-current="true"] .num {
  color: var(--fg);
}

/* Main */
.gallery-main {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(16px, 3vw, 36px);
  align-items: start;
}

/* Left: about */
.about-block {
  top: 92px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding-right: 4px;
  margin-top: 10vh;
  min-height: 700px;
}

.about-title {
  font: 600 clamp(18px, 2.2vw, 28px) var(--font-heading);
  text-transform: uppercase;
  margin: 0 0 6px 0;
}

.about-text {
  margin-top: 30px;
  opacity: 0.9;
  line-height: 1.35;
}

.viewer {
  min-height: 60vh;
}

.about-text p {
  margin: 0 0 12px 0;
}

.about-text p+p {
  margin-top: 10px;
}

.mobile-about p {
  margin: 0 0 10px 0;
}

/* Stage */
.stage-box {
  position: relative;
  width: 100%;
  height: min(72vh, 680px);
  margin: 0 0 14px 0;
  outline: none;
}

.stage-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0;
  z-index: 1;
  cursor: zoom-in;
  transition: opacity 0.6s var(--ease), filter 0.6s var(--ease), transform 0.6s var(--ease);
  will-change: opacity, filter, transform;
}

.stage-box img.is-preview {
  filter: blur(8px);
  transform: scale(1.01);
}

.stage-index {
  position: absolute;
  top: 0;
  left: 0;
  font: 800 clamp(28px, 4.2vw, 60px) var(--font-heading);
  letter-spacing: 0.04em;
  padding: 2px 10px;
  pointer-events: none;
  z-index: 3;
  color: #fff;
  background: transparent;
  border: 0;
  text-shadow: none;
  -webkit-text-stroke: 0;
  transition: color 0.18s var(--ease);
}

.stage-index.index--dark {
  color: #000;
  -webkit-text-stroke: 2px #fff;
  text-shadow: 0 0 1px #fff;
}

/* Arrows */
.stage-box .nav {
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: clamp(34px, 4vw, 52px);
  display: grid;
  place-items: center;
  border: 0;
  font-size: clamp(22px, 2.6vw, 30px);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  background: transparent;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  z-index: 2;
  outline: none;
}

.stage-box:hover .nav {
  opacity: 1;
}

.stage-box .prev {
  left: 8px;
}

.stage-box .next {
  right: 8px;
}

/* Desktop strip */
.strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  align-content: flex-start;
  max-height: calc(var(--strip-thumb) * 2 + var(--gap));
}

.strip-thumb {
  position: relative;
  flex: 0 0 auto;
  width: var(--strip-thumb);
  height: var(--strip-thumb);
  padding: 0;
  line-height: 0;
  overflow: hidden;
  cursor: pointer;
  border: 0;
  background: transparent;
  outline: none;
}

.strip-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0);
}

.strip-thumb::after {
  content: attr(data-num);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 800 clamp(16px, 2.8vw, 26px) var(--font-heading);
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.38s var(--ease);
}

.strip-thumb:hover::after,
.strip-thumb[aria-selected="true"]::after {
  opacity: 1;
}

/* Stage caption */
.stage-caption {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 6px;
  font: 600 11px/1.2 var(--font-heading);
  letter-spacing: 0.03em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  opacity: 0.95;
  pointer-events: none;
  z-index: 3;
}

.stage-caption:not(.has-caption) {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-caption {
    position: absolute;
    left: 8px;
    bottom: 6px;
    font: 600 11px/1.2 var(--font-heading);
    letter-spacing: .03em;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
    opacity: .95;
    pointer-events: none;
    z-index: 3;
  }

  .mobile-caption:not(.has-caption) {
    display: none;
  }
}

/* ===== Mobile (accordion) — fits on tiny screens ===== */
.mobile-list {
  display: none;
}

@media (max-width: 1024px) {

  .project-ribbon,
  .gallery-main {
    display: none;
  }

  .mobile-list {
    display: block;
  }

  .mobile-item {
    border-top: 1px solid rgba(0, 0, 0, .08);
  }

  body.dark-mode .mobile-item {
    border-top-color: rgba(255, 255, 255, .14);
  }

  .mobile-head {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) clamp(26px, 8.5vw, 34px) 20px;
    align-items: center;
    gap: 10px;
    padding: 12px 8px;
    cursor: pointer;
    text-transform: uppercase;
    font-family: var(--font-heading);
    width: 100%;
  }

  .mobile-num {
    font-size: .85rem;
    color: var(--muted);
    width: 28px;
  }

  .mobile-title {
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .mobile-thumb {
    width: clamp(26px, 8.5vw, 34px);
    height: clamp(26px, 8.5vw, 34px);
    overflow: hidden;
    justify-self: end;
  }

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

  .mobile-chev {
    opacity: .7;
    transform: rotate(0deg);
    transition: transform .2s var(--ease);
    justify-self: end;
    width: 20px;
    text-align: right;
  }

  .mobile-item[aria-expanded="true"] .mobile-chev {
    transform: rotate(90deg);
  }

  .mobile-body {
    overflow: hidden;
    max-height: 0;
    transition: max-height .26s var(--ease);
  }

  .mobile-about {
    padding: 8px 4px 8px;
  }

  .mobile-stage {
    position: relative;
    width: 100%;
    height: min(60vh, 440px);
    margin-bottom: 12px;
  }

  .mobile-stage img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
  }

  .mobile-stage .nav {
    position: absolute;
    top: 8px;
    bottom: 8px;
    width: 44px;
    background: transparent;
    border: 0;
    font-size: 20px;
    color: #fff;
    opacity: 0;
    z-index: 2;
    transition: opacity .18s var(--ease);
  }

  .mobile-stage:hover .nav {
    opacity: 1;
  }

  .mobile-stage .prev {
    left: 8px;
  }

  .mobile-stage .next {
    right: 8px;
  }

  /* >>> Mobile strip: THREE ROWS, NO SCROLL <<< */
  .mobile-strip {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap);
    overflow: hidden;
    max-height: calc(var(--strip-thumb-m) * 3 + var(--gap) * 2);
    padding: 0 0 8px 0;
  }

  .mobile-strip .strip-thumb {
    width: var(--strip-thumb-m);
    height: var(--strip-thumb-m);
  }
}

/* Micro: ~480px phones */
@media (max-width: 480px) {
  :root {
    --edge: 8px;
    --strip-thumb-m: clamp(26px, 10vw, 36px);
  }

  .mobile-head {
    grid-template-columns: 24px minmax(0, 1fr) clamp(24px, 8vw, 30px) 18px;
    gap: 8px;
    padding: 10px 8px;
  }

  .mobile-num {
    width: 24px;
    font-size: .78rem;
  }
}

/* Ultra-narrow (≤360px) */
@media (max-width: 360px) {
  :root {
    --edge: 6px;
  }

  .mobile-head {
    gap: 6px;
    padding: 10px 6px;
  }
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  display: grid;
  place-items: center;
  z-index: 1000;
  opacity: 1;
  transition: opacity .35s var(--ease);
}

.lightbox.hidden {
  opacity: 0;
  pointer-events: none;
}

.lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

.lb-nav {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 64px;
  background: transparent;
  border: 0;
  font-size: 28px;
  color: #fff;
  opacity: .9;
  cursor: pointer;
}

.lb-prev {
  left: 0;
}

.lb-next {
  right: 0;
}

.lb-close {
  position: fixed;
  top: 16px;
  right: 20px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  border: 0;
  font-size: 22px;
  border-radius: 50%;
  cursor: pointer;
}

/* 1) Desktop: never create a scroll container inside PHOTO */
@media (min-width: 1024px) {
  .about-block {
    overflow: visible !important;
    max-height: none !important;
  }

  .gallery,
  .gallery-main,
  .viewer {
    overflow: visible !important;
  }
}

/* 2) Short desktop viewports: disable sticky so wheel events never trap */
@media (min-width: 1024px) and (max-height: 900px) {
  .about-block {
    position: static !important;
    top: auto !important;
    margin-top: 0 !important;
  }

  .stage-box {
    height: min(60vh, 560px);
  }
}

/* =================================================================== */
/* =============================== VIDEO ============================= */
/* =================================================================== */

.videos-section {
  --line: rgba(0, 0, 0, .10);
  --line-strong: rgba(0, 0, 0, .18);
}

body.dark-mode .videos-section {
  --line: rgba(255, 255, 255, .14);
  --line-strong: rgba(255, 255, 255, .22);
}

.videos-wrap {
  position: relative;
  padding: clamp(30px, 1vh, 60px) 0;
  margin-bottom: 13vh;
}

/* Dynamic title block */
.videos-head {
  margin-left: 5vw;
  margin-right: 5vw;
  max-width: 72ch;
  min-height: 280px;
  margin-bottom: 10vh;
  display: flex;
  flex-direction: column;
}

.videos-kicker {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  opacity: .35;
  font-size: 12px;
}

.videos-dynamic-title {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: .02em;
  font-weight: 600;
  font-size: clamp(18px, 2.2vw, 28px);
  line-height: 1.05;
  margin-top: 8px;
  margin-bottom: clamp(10px, 3vh, 20px);
}

.videos-dynamic-bio {
  opacity: .9;
  font-size: inherit;
  line-height: 1.35;
  margin-top: 10px;
}

.videos-dynamic-bio p {
  margin: 0 0 10px 0;
}

.videos-dynamic-bio p:last-child {
  margin-bottom: 0;
}

/* Lines */
.videos-lines {
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-auto-rows: 64px;
  gap: 0;
}

.video-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}

.video-row:last-child {
  border-bottom: 0;
}

.row-title {
  padding: 12px 0;
  margin-right: 5vw;
  margin-left: 5vw;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: .25;
  transition: opacity .2s var(--ease);
}

.video-row:hover .row-title,
.video-row.is-active .row-title {
  opacity: 1;
}

/* Meta */
.row-meta {
  justify-self: end;
  display: grid;
  grid-auto-flow: column;
  gap: clamp(10px, 3vw, 40px);
  padding: 12px 0;
  margin-right: 5vw;
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 500;
  color: var(--fg);
  opacity: .35;
  transition: opacity .2s var(--ease);
}

body.dark-mode .row-meta {
  color: rgba(255, 255, 255, .55);
  opacity: 1;
  cursor: none;
}

/* Overlay player (desktop) */
.videos-stage {
  position: absolute;
  left: 50%;
  top: 56%;
  transform: translate(-50%, -50%);
  z-index: 2;
  margin-top: 12vh;
  pointer-events: none;
}

.player-box {
  width: min(760px, 48vw);
  aspect-ratio: 16 / 9;
  position: relative;
  background: rgba(0, 0, 0, .06);
  overflow: hidden;
  pointer-events: auto;
}

.player-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.player-link {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
}

.player-badge {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: .02em;
  font-weight: 600;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .72);
  color: var(--fg);
  backdrop-filter: blur(10px);
}

body.dark-mode .player-badge {
  background: rgba(0, 0, 0, .45);
  border-color: rgba(255, 255, 255, .22);
  color: #fff;
}

/* <=1024: stack layout */
@media (max-width: 1024px) {
  .videos-wrap {
    display: grid;
    gap: 26px;
    margin-bottom: 4vh;
    padding: 20px 0;
  }

  .videos-lines {
    order: 1;
  }

  .videos-head {
    order: 2;
  }

  .videos-stage {
    order: 3;
  }

  .videos-head {
    margin-top: 20px;
    margin-bottom: 20px;
    min-height: 0;
  }

  .videos-stage {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    margin-top: 18px;
    pointer-events: auto;
  }

  .player-box {
    width: min(680px, 92vw);
    margin-left: auto;
    margin-right: auto;
  }

  .video-row {
    grid-template-columns: 1fr;
  }

  .row-title {
    padding: 14px 0 4px 0;
  }

  .row-meta {
    justify-self: start;
    margin-left: 5vw;
    margin-right: 5vw;
    padding: 0 0 12px 0;
    opacity: .5;
  }

  .videos-dynamic-bio {
    margin-top: 15px;
  }
}

@media (max-width: 760px) {
  .player-box {
    width: min(92vw, 680px);
  }
}

/* Dark mode – hide pointer cursor in Video section */
body.dark-mode .videos-section .video-row {
  cursor: none;
}

/* =================================================================== */
/* =============================== CODING ============================ */
/* =================================================================== */

.coding-section {
  margin-top: 10vh;
}

/* Desktop-only extra breathing room + spacer under CODING title */
@media (min-width: 1025px) {
  .coding-section {
    padding-bottom: 10vh;
  }

  .coding-wrap {
    margin-top: clamp(16px, 2.5vh, 34px);
  }
}

.coding-wrap {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(20px, 4vw, 60px);
  padding: 0 var(--edge);
  align-items: stretch;
  width: 100%;
  justify-content: center;
}

/* More centered feel on wide screens + flexible column gap */
@media (min-width: 1280px) {
  .coding-wrap {
    grid-template-columns: minmax(340px, 520px) minmax(560px, 700px);
    gap: clamp(28px, 6vw, 110px);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ---------- LEFT LIST ---------- */

.coding-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(0, 0, 0, .10);
}

/* Push list down to visually align with reserved description space (desktop only) */
@media (min-width: 1025px) {
  .coding-list {
    margin-top: calc(1.45em * 4);
  }
}

body.dark-mode .coding-list {
  border-top-color: rgba(255, 255, 255, .14);
}

.coding-item {
  display: grid;
  grid-template-columns: 34px 1fr 38px 20px;
  align-items: center;
  gap: 12px;

  width: 100%;
  padding: 12px 8px;

  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, .08);

  text-transform: uppercase;
  font-family: var(--font-heading);
  cursor: pointer;

  opacity: .55;
  transition: opacity .2s var(--ease), color .2s var(--ease);
}

body.dark-mode .coding-item {
  border-bottom-color: rgba(255, 255, 255, .14);
  cursor: none;
}

.coding-item:hover,
.coding-item.is-active {
  opacity: 1;
}

.coding-num {
  font-size: .85rem;
  color: var(--muted);
}

body.dark-mode .coding-num {
  color: rgba(255, 255, 255, .45);
}

.coding-item-title {
  font-weight: 500;
  letter-spacing: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body.dark-mode .coding-item-title {
  color: rgba(255, 255, 255, .65);
}

.coding-thumb {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  overflow: hidden;
}

.coding-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;

  filter: grayscale(100%) brightness(0.2) contrast(1.1);
  transition: filter .2s var(--ease);
}

body.dark-mode .coding-thumb img {
  filter: grayscale(100%) brightness(1.8) contrast(1.1);
}

/* Restore original color on hover or active */
.coding-item:hover .coding-thumb img,
.coding-item.is-active .coding-thumb img {
  filter: none;
}

.coding-chev {
  opacity: .7;
  text-align: right;
  color: inherit;
}

body.dark-mode .coding-chev {
  color: rgba(255, 255, 255, .65);
  opacity: 1;
}

/* ---------- RIGHT PREVIEW ---------- */

.coding-preview {
  max-width: 700px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.coding-dynamic-title {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 32px);
  margin: 0 0 8px 0;
}

.coding-tech {
  font-size: 14px;
  opacity: .5;
  margin: 0 0 16px 0;
}

.coding-spacer {
  flex: 1 1 auto;
  min-height: 0;
}

.coding-stage {
  flex: 0 0 380px;
  height: 380px;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;

  margin: 0 0 14px 0;

  cursor: pointer;
  transition: transform .2s var(--ease);
}

.coding-stage:hover {
  transform: scale(1.015);
}

.coding-stage img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;

  cursor: pointer;
  transition: transform 0.3s var(--ease);
}

.coding-stage img:active {
  transform: scale(0.98);
}

.coding-stage-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.coding-dynamic-bio {
  max-width: 60ch;
  line-height: 1.45;
  opacity: .85;

  min-height: calc(1.45em * 4);
  margin: 0;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}

/* ---------- MOBILE ---------- */

.coding-mobile {
  display: none;
}

@media (max-width: 1024px) {
  .coding-wrap {
    display: none;
  }

  .coding-mobile {
    display: block;
    padding: 0 var(--edge);
  }

  .coding-mobile-item {
    border-top: 1px solid rgba(0, 0, 0, .10);
  }

  body.dark-mode .coding-mobile-item {
    border-top-color: rgba(255, 255, 255, .15);
  }

  .coding-mobile-head {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 38px 20px;
    align-items: center;
    gap: 12px;
    padding: 12px 8px;

    cursor: pointer;
    text-transform: uppercase;
    font-family: var(--font-heading);
    width: 100%;
  }

  .coding-mobile-num {
    font-size: .85rem;
    color: var(--muted);
    width: 34px;
  }

  body.dark-mode .coding-mobile-num {
    color: rgba(255, 255, 255, .45);
  }

  .coding-mobile-title {
    font-weight: 500;
    letter-spacing: 0;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  body.dark-mode .coding-mobile-title {
    color: rgba(255, 255, 255, .65);
  }

  .coding-mobile-thumb {
    width: 38px;
    height: 38px;
    overflow: hidden;
    justify-self: end;
    border-radius: 6px;
  }

  .coding-mobile-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .coding-mobile-chev {
    opacity: .7;
    justify-self: end;
    width: 20px;
    text-align: right;
    transform: rotate(0deg);
    transition: transform .2s var(--ease);
    color: inherit;
  }

  .coding-mobile-item[aria-expanded="true"] .coding-mobile-chev {
    transform: rotate(90deg);
  }

  .coding-mobile-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .26s var(--ease);
    padding: 0 8px;
  }

  .coding-mobile-tech {
    font-size: clamp(14px, 2.2vw, 16px);
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;

    opacity: 1;
    margin: 10px 0 12px;

    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .coding-mobile-body img {
    display: block;
    width: auto;
    max-width: 70vw;
    max-height: 40vh;
    height: auto;

    object-fit: contain;
    margin: 0 auto 12px auto;

    cursor: pointer;
    transition: transform 0.3s var(--ease);
  }

  .coding-mobile-body img:active {
    transform: scale(0.98);
  }

  .coding-mobile-body p {
    margin: 0 0 14px 0;
    line-height: 1.45;
    opacity: .85;
  }
}

body.dark-mode .coding-stage-link,
body.dark-mode .coding-stage-link *,
body.dark-mode .coding-mobile-link,
body.dark-mode .coding-mobile-link * {
  cursor: none;
}

.coding-mobile-link {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ================= Coding Private Popup ================= */

.coding-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity .25s var(--ease);
}

.coding-popup.hidden {
  opacity: 0;
  pointer-events: none;
}

.coding-popup-box {
  background: #fff;
  color: #111;
  padding: 32px 36px;
  max-width: 420px;
  text-align: center;
  border-radius: 10px;
  font-family: var(--font-heading);
  position: relative;
}

body.dark-mode .coding-popup-box {
  background: #111;
  color: #fff;
}

.coding-popup-text {
  line-height: 1.5;
  font-size: 15px;
  opacity: .85;
}

/* (kept final version) */
.coding-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;

  width: 38px;
  height: 38px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 999px;

  background: transparent;
  color: inherit;

  font-size: 18px;
  line-height: 1;

  opacity: .75;
  cursor: pointer;

  transition:
    opacity .2s var(--ease),
    transform .2s var(--ease),
    border-color .2s var(--ease),
    color .2s var(--ease);
}

body.dark-mode .coding-popup-close {
  border-color: rgba(255, 255, 255, .18);
  cursor: none;
}

.coding-popup-close:hover {
  opacity: 1;
  transform: translateY(-1px);
}

body.dark-mode .coding-popup-close:hover {
  color: #f9d71c;
}

/* ================= Styled Info Message (Overlay) ================= */

.coding-info-message {
  position: fixed;
  bottom: 40vh;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 10000;

  background: rgba(255, 255, 255, 0.95);
  color: #111;
  padding: 16px 24px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);

  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

body.dark-mode .coding-info-message {
  background: rgba(20, 20, 20, 0.9);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.coding-info-message.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.info-message-content p:first-child {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 11px;
  margin-bottom: 4px;
  opacity: 0.5;
}

.info-message-content p:last-child {
  font-size: 14px;
  font-weight: 500;
}

/* =================================================================== */
/* =============================== ARROWS ============================ */
/* =================================================================== */

/* Desktop only */
@media (max-width: 1024px) {
  .section-scroll-arrow--section {
    display: none !important;
  }
}

.section-scroll-arrow {
  font-size: 1.5rem;
  color: #111;
  animation: arrowBlink 3s ease-in-out infinite;
  cursor: pointer;
}

.section-scroll-arrow--hero {
  display: block;
}

.section-scroll-arrow--section {
  position: absolute;
  left: 30px;
  bottom: 18px;
  background: transparent;
  border: 0;
  padding: 0;
  line-height: 1;
  z-index: 3;
}

.section-scroll-arrow .scroll-text {
  position: absolute;
  top: 0.2rem;
  left: 3.5rem;
  transform: translateX(-50%) translateY(5px);
  font-size: 0.9rem;
  color: #333;
  white-space: nowrap;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.section-scroll-arrow:hover .scroll-text {
  opacity: 0.9;
  transform: translateX(-50%) translateY(0);
}

/* PHOTO section arrow positioning */
#photos {
  overflow: visible;
}

#photos .section-scroll-arrow--section {
  position: absolute;
  top: 70rem;
}

#photos .section-scroll-arrow--section .scroll-text {
  top: 4.7rem;
  left: 3.6rem;
  transform: translateX(-50%) translateY(5px);
  text-align: center;
}

#photos .section-scroll-arrow--section:hover .scroll-text {
  transform: translateX(-50%) translateY(0);
}

/* Dark mode colors */
body.dark-mode .section-scroll-arrow {
  color: #f9d71c;
}

body.dark-mode .section-scroll-arrow .scroll-text {
  color: #fafafa;
  cursor: none;
}

/* =================================================================== */
/* ================================ ME =============================== */
/* =================================================================== */

.me-section {
  position: relative;
  padding-bottom: 10vh;
  padding-top: 10vh;
}

.about-me-wrapper {
  max-width: 760px;
  margin: 80px auto 0 auto;
  padding: 0 var(--edge);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.about-me-text {
  text-align: left;
  line-height: 1.45;
  opacity: 0.9;
}

.about-me-text p {
  margin: 0 0 20px 0;
}

.me-game-placeholder {
  width: 100%;
  height: 220px;
  margin: 40px 0;

  background: #3b7dff;
  border-radius: 12px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.about-me-cta {
  text-align: center;
  font-weight: 500;
  margin-top: 10px;
}

/* =================================================================== */
/* ================================ GAME ============================= */
/* =================================================================== */

.me-game-wrap {
  width: 100%;
  max-width: 820px;
  margin: 28px auto 0 auto;
  padding: 0 var(--edge);
}

.me-game-canvas-wrap {
  position: relative;
  width: 100%;
  height: clamp(140px, 22vw, 220px);

  overflow: visible;
  outline: none;

  background: transparent !important;
  border: 0 !important;
}

#meGameCanvas {
  width: 100%;
  height: 100%;
  display: block;
  background: transparent !important;
}

/* ===== ME GAME: styled toast (aligned with coding-info-message) ===== */
.me-game-info {
  position: fixed;
  bottom: 40vh;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 10000;

  background: rgba(255, 255, 255, 0.95);
  color: #111;

  padding: 18px 26px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);

  text-align: center;

  max-width: 320px;
  /* prevents long lines */
  width: calc(100% - 40px);
  /* safe on small screens */

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.35s var(--ease),
    transform 0.35s var(--ease),
    visibility 0s linear 0.35s;
}

body.dark-mode .me-game-info {
  background: rgba(20, 20, 20, 0.92);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.me-game-info.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition:
    opacity 0.35s var(--ease),
    transform 0.35s var(--ease),
    visibility 0s;
}

/* Headline (GAME OVER / LEVEL COMPLETE) */
.me-game-info .info-message-content p:first-child {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 11px;
  margin: 0 0 6px 0;
  opacity: 0.5;
  text-transform: uppercase;
}

/* Body text */
.me-game-info .info-message-content p:last-child {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  /* nicer wrapping */
}