:root {
  --red: #00a5e6;
  --red-deep: #004ca3;
  --black: #0b0b0d;
  --white: #f6f4ef;
  --ink: #111;
}

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

html,
body {
  height: 100%;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

.display {
  font-family: 'Archivo Black', 'Arial Black', Impact, sans-serif;
}

/* ---------- HOME BACKGROUND VIDEO ---------- */
#home-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

/* ============ BACKGROUND LAYERS ============ */
#bg {
  position: fixed;
  inset: -6vmax;
  z-index: 1;
  pointer-events: none;
}

.bg-layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}

#bg-stripes {
  background: repeating-linear-gradient(115deg,
      var(--red) 0 46px, var(--red-deep) 46px 52px,
      var(--red) 52px 120px, #001dc4 120px 126px);
  animation: stripeDrift 22s linear infinite;
}

@keyframes stripeDrift {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 520px 0;
  }
}

#bg-halftone {
  background-image: radial-gradient(circle, rgba(0, 0, 0, .35) 1.6px, transparent 1.7px);
  background-size: 14px 14px;
  mix-blend-mode: multiply;
  animation: halftoneDrift 30s linear infinite;
}

@keyframes halftoneDrift {
  from {
    background-position: 0 0;
  }

  to {
    background-position: -140px 140px;
  }
}

#bg-vignette {
  background: radial-gradient(ellipse at 32% 40%, transparent 30%, rgba(0, 0, 0, .72) 100%);
}

.bg-star {
  position: absolute;
  opacity: .16;
  animation: spin 60s linear infinite;
  transform-origin: center;
}

.bg-star.s2 {
  animation-duration: 90s;
  animation-direction: reverse;
  opacity: .1;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* big black slash behind the menu, like a torn silhouette */
#slash {
  position: fixed;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: var(--black);
  clip-path: polygon(58% 0, 100% 0, 100% 100%, 40% 100%, 52% 62%, 45% 60%, 60% 24%, 51% 22%);
  transition: clip-path .8s cubic-bezier(.8, 0, .15, 1);
}

body[data-screen]:not([data-screen="home"]) #slash {
  display: none;
}

/* ============ SHELL / HUD ============ */
#shell {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
}

#hud-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 26px 0;
  letter-spacing: .14em;
  font-weight: 600;
}

.hud-tag {
  background: var(--black);
  color: var(--white);
  padding: 5px 14px;
  transform: rotate(-2deg);
  font-size: 14px;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .35);
}

.hud-tag.alt {
  background: var(--white);
  color: var(--black);
  transform: rotate(1.5deg);
}

#hud-bottom {
  padding: 0 26px 16px;
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .95;
}

#hud-bottom .key {
  display: inline-block;
  background: var(--white);
  color: var(--black);
  padding: 2px 8px;
  margin-right: 6px;
  font-weight: 700;
  transform: skewX(-8deg);
  border-radius: 2px;
}

#stage {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* ============ SCREENS ============ */
.screen {
  position: absolute;
  inset: 0;
  padding: 2vh 4vw;
  display: none;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--red) transparent;
}

.screen.active {
  display: block;
}

.screen::-webkit-scrollbar {
  width: 8px;
}

.screen::-webkit-scrollbar-thumb {
  background: var(--red);
}

/* ---------- HOME ---------- */
#screen-home {
  display: none;
  padding: 0 4vw;
}

#screen-home.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#intro-eyebrow {
  font-size: clamp(14px, 1.6vw, 20px);
  letter-spacing: .5em;
  text-transform: uppercase;
  margin-bottom: 1.2vh;
  font-weight: 700;
  text-shadow: 2px 2px 0 var(--black);
}

#big-name {
  line-height: .92;
  margin-bottom: 2.5vh;
}

#big-name .ransom {
  font-size: clamp(44px, 8.5vw, 124px);
  display: block;
}

#tagline {
  max-width: 520px;
  font-size: clamp(15px, 1.5vw, 20px);
  line-height: 1.45;
  background: var(--black);
  padding: 12px 18px;
  transform: rotate(-1deg);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .3);
}

#menu {
  margin-top: 4vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .6vh;
}

.menu-item {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--white);
  text-align: left;
  position: relative;
  padding: 2px 14px 2px 4px;
  transform: translateX(-60px);
  opacity: 0;
}

.menu-item .ransom {
  font-size: clamp(26px, 4.2vw, 56px);
}

.loaded .menu-item {
  animation: menuIn .55s cubic-bezier(.2, 1.2, .3, 1) forwards;
}

.menu-item:nth-child(1) {
  animation-delay: .15s;
}

.menu-item:nth-child(2) {
  animation-delay: .25s;
}

.menu-item:nth-child(3) {
  animation-delay: .35s;
}

.menu-item:nth-child(4) {
  animation-delay: .45s;
}

@keyframes menuIn {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.menu-item::before {
  content: "";
  position: absolute;
  left: -4%;
  top: 18%;
  height: 70%;
  width: 0;
  background: var(--black);
  transform: skewX(-16deg);
  z-index: -1;
  transition: width .18s cubic-bezier(.7, 0, .3, 1);
}

.menu-item.sel::before {
  width: 108%;
}

.menu-item.sel {
  transform: translateX(14px) !important;
}

.menu-item.sel .ch {
  color: var(--white);
}

.menu-item.sel .ch.box {
  background: var(--red);
  color: var(--white);
}

.menu-item.sel .ch.boxw {
  background: var(--white);
  color: var(--black);
}

.menu-item:focus-visible {
  outline: 3px dashed var(--white);
  outline-offset: 4px;
}

.cursor-mark {
  position: absolute;
  right: -46px;
  top: 50%;
  transform: translateY(-50%) rotate(8deg);
  font-size: clamp(18px, 2.4vw, 30px);
  opacity: 0;
  transition: opacity .12s;
  color: var(--white);
  text-shadow: 2px 2px 0 var(--black);
}

.menu-item.sel .cursor-mark {
  opacity: 1;
  animation: pulse 0.9s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: translateY(-50%) rotate(8deg) scale(1);
  }

  50% {
    transform: translateY(-50%) rotate(8deg) scale(1.18);
  }
}

/* ---------- RANSOM LETTERS ---------- */
.ransom {
  display: inline-block;
  white-space: nowrap;
}

.ransom .ch {
  display: inline-block;
  line-height: 1;
  padding: 0;
  margin-right: -0.15em;
  transition: transform .15s;
}

.ransom .ch.box {
  background: var(--black);
  color: var(--white);
  padding: .02em .08em;
  margin: 0 -0.02em;
}

.ransom .ch.boxw {
  background: var(--white);
  color: var(--black);
  padding: .02em .08em;
  margin: 0 .03em;
}

.ransom .ch.red {
  color: var(--red);
  text-shadow: 1px 1px 0 var(--black);
}

.menu-item:hover .ch,
.menu-item.sel .ch {
  animation: jitter .35s ease both;
}

.menu-item:hover .ch:nth-child(odd) {
  animation-delay: .03s;
}

.menu-item:hover .ch:nth-child(3n) {
  animation-delay: .06s;
}

@keyframes jitter {
  0% {
    transform: var(--t) translateY(0);
  }

  35% {
    transform: var(--t) translateY(-6px) rotate(3deg);
  }

  70% {
    transform: var(--t) translateY(2px) rotate(-2deg);
  }

  100% {
    transform: var(--t) translateY(0);
  }
}

/* ---------- SUB-SCREEN CHROME ---------- */
.sub {
  background: transparent;
}

.sub .screen-head {
  margin: 1vh 0 3.5vh;
  position: relative;
  display: inline-block;
}

.sub .screen-head .ransom {
  font-size: clamp(38px, 6vw, 84px);
}

.sub .screen-head::after {
  content: "";
  position: absolute;
  left: -6px;
  bottom: -10px;
  height: 10px;
  width: 105%;
  background: var(--red);
  transform: skewX(-24deg);
}

.back-hint {
  display: inline-block;
  margin-left: 22px;
  vertical-align: middle;
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  background: var(--white);
  color: var(--black);
  padding: 4px 10px;
  transform: rotate(-2deg);
  cursor: pointer;
  border: 0;
  font-weight: 700;
  font-family: inherit;
}

.back-hint:hover {
  background: var(--red);
  color: var(--white);
}

/* ---------- PROJECTS ---------- */
#repo-status {
  font-size: 15px;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 2vh;
  opacity: .85;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 26px 34px;
  padding-top: 14px;
}

#repo-grid {
  padding-bottom: 6vh;
}

.card {
  color: var(--ink);
  position: relative;
  padding: 20px 22px 18px;
  cursor: pointer;
  text-decoration: none;
  display: block;
  transform: rotate(var(--tilt)) translateY(24px);
  opacity: 0;
  transition: transform .18s cubic-bezier(.7, 0, .3, 1), filter .18s;
  filter: drop-shadow(7px 7px 0 rgba(0, 0, 0, .5));
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--white);
  clip-path: polygon(0 6%, 3% 0, 100% 0, 100% 88%, 97% 100%, 0 100%);
}

.card>* {
  position: relative;
}

.screen.active .card {
  animation: cardIn .5s cubic-bezier(.2, 1.1, .3, 1) forwards;
  animation-delay: var(--d);
}

@keyframes cardIn {
  to {
    transform: rotate(var(--tilt)) translateY(0);
    opacity: 1;
  }
}

.card:hover {
  transform: rotate(0deg) scale(1.03) !important;
  filter: drop-shadow(10px 10px 0 var(--black));
  z-index: 3;
}

.card .lang {
  position: absolute;
  top: -12px;
  right: 14px;
  background: var(--black);
  color: var(--white);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 4px 12px;
  transform: rotate(2deg);
}

.card .lang::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lc, var(--red));
  margin-right: 7px;
}

.card h3 {
  font-family: 'Archivo Black', 'Arial Black', Impact, sans-serif;
  font-size: 21px;
  line-height: 1.05;
  text-transform: uppercase;
  margin-bottom: 10px;
  word-break: break-word;
}

.card h3 em {
  font-style: normal;
  color: var(--red);
}

.card p {
  font-size: 15.5px;
  line-height: 1.4;
  min-height: 44px;
  color: #2c2c2c;
}

.card .meta {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
}

.card .meta .go {
  background: var(--red);
  color: var(--white);
  padding: 4px 12px;
  transform: skewX(-10deg);
  transition: background .15s;
}

.card:hover .meta .go {
  background: var(--black);
}

/* ---------- FEATURED CARDS (SHOWCASE ONE BY ONE) ---------- */
#screen-projects {
  padding-top: 3.5vh;
  padding-bottom: 10vh;
}

#screen-projects .screen-head {
  margin-bottom: 1.5vh;
}

#feat-grid {
  display: flex;
  flex-direction: column;
  gap: 36px;
  max-width: 980px;
  margin: 16px auto 60px;
  padding: 0 10px;
}

.card.feat {
  width: 100%;
  color: var(--white);
  padding: 28px 34px 24px;
  filter: drop-shadow(8px 8px 0 var(--red-deep));
  transform: rotate(var(--tilt)) translateY(20px);
  opacity: 0;
  transition: transform .2s cubic-bezier(.7, 0, .3, 1), filter .2s;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.card.feat::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--black);
  clip-path: polygon(0 5%, 1.8% 0, 100% 0, 100% 93%, 98.2% 100%, 0 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.card.feat:hover {
  transform: rotate(0deg) scale(1.015) !important;
  filter: drop-shadow(12px 12px 0 var(--red));
  z-index: 5;
}

.card.feat .card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card.feat .lang {
  position: static;
  display: inline-flex;
  align-items: center;
  background: var(--red);
  color: var(--white);
  font-family: 'Archivo Black', Impact, sans-serif;
  font-size: 13.5px;
  letter-spacing: .12em;
  padding: 5px 14px;
  transform: skewX(-10deg);
}

.card.feat .award-tag {
  display: inline-block;
  background: var(--white);
  color: var(--black);
  font-family: 'Archivo Black', Impact, sans-serif;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 12px;
  transform: skewX(-10deg);
  box-shadow: 3px 3px 0 var(--black);
}

.card.feat h3 {
  font-family: 'Archivo Black', Impact, sans-serif;
  font-size: clamp(26px, 3.4vw, 42px);
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: .03em;
  line-height: 1.1;
}

.card.feat h3 em {
  font-style: normal;
  color: var(--red);
}

.card.feat p {
  font-size: clamp(16px, 1.35vw, 18.5px);
  line-height: 1.6;
  color: #dfdeda;
  min-height: auto;
  margin-bottom: 16px;
}

.card.feat .card-tech {
  margin-bottom: 16px;
}

.card.feat .card-tech span {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--red);
  color: #fff;
  font-size: 13.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 12px;
  font-weight: 700;
}

.card.feat .meta {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.22);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
}

.card.feat .meta .go {
  background: var(--white);
  color: var(--black);
  padding: 8px 18px;
  font-size: 14px;
  transform: skewX(-10deg);
  transition: background .15s, color .15s;
}

.card.feat:hover .meta .go {
  background: var(--red);
  color: var(--white);
}

.live-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3dff6e;
  margin-right: 7px;
  animation: liveBlink 1.1s ease-in-out infinite;
}

@keyframes liveBlink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .25;
  }
}

/* ---------- SKILLS ---------- */
.skill-group {
  margin-bottom: 5vh;
  max-width: 900px;
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(2px) saturate(180%);
  -webkit-backdrop-filter: blur(2px) saturate(180%);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  border-left: 6px solid var(--red);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25), 10px 10px 0 rgba(0, 0, 0, 0.55);
  padding: 24px 28px 22px;
  clip-path: polygon(0 4%, 1.8% 0, 100% 0, 100% 96%, 98.2% 100%, 0 100%);
}

.skill-group h3 {
  display: inline-block;
  background: var(--black);
  color: var(--white);
  font-family: 'Archivo Black', 'Arial Black', Impact, sans-serif;
  font-size: clamp(18px, 2.2vw, 26px);
  text-transform: uppercase;
  padding: 6px 16px;
  transform: rotate(-1.5deg);
  margin-bottom: 2.4vh;
  box-shadow: 4px 4px 0 var(--red);
}

.skill-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
}

.skill-row .name {
  width: 220px;
  flex-shrink: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--black);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.skill-bar {
  flex: 1;
  height: 20px;
  background: rgba(0, 0, 0, 0.16);
  border: 2px solid var(--black);
  position: relative;
  transform: skewX(-18deg);
  overflow: hidden;
  max-width: 520px;
}

.skill-bar .fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: var(--black);
  background-image: repeating-linear-gradient(90deg, transparent 0 24px, rgba(0, 165, 230, .45) 24px 28px);
  transition: width .9s cubic-bezier(.2, 1, .3, 1);
}

.skill-row .lv {
  font-family: 'Archivo Black', 'Arial Black', Impact, sans-serif;
  font-size: 16px;
  width: 70px;
  text-align: right;
  color: var(--black);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* ---------- ABOUT / CONTACT ---------- */
.paper {
  max-width: 760px;
  background: var(--white);
  color: var(--ink);
  padding: 30px 34px;
  font-size: 18px;
  line-height: 1.55;
  clip-path: polygon(0 4%, 2% 0, 100% 0, 100% 94%, 98% 100%, 0 100%);
  transform: rotate(-.6deg);
  box-shadow: 10px 10px 0 rgba(0, 0, 0, .55);
  margin-bottom: 4vh;
}

.paper strong {
  color: var(--red);
}

.paper .stamp {
  display: inline-block;
  background: var(--black);
  color: var(--white);
  padding: 2px 8px;
  transform: rotate(-2deg);
  font-weight: 700;
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 6vh;
}

.contact-chip {
  background: var(--black);
  color: var(--white);
  text-decoration: none;
  font-family: 'Archivo Black', 'Arial Black', Impact, sans-serif;
  font-size: clamp(16px, 2vw, 22px);
  text-transform: uppercase;
  padding: 14px 26px;
  transform: skewX(-8deg) rotate(-1deg);
  transition: transform .15s, background .15s, color .15s;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .4);
}

.contact-chip span {
  display: inline-block;
  transform: skewX(8deg);
}

.contact-chip:hover {
  background: var(--white);
  color: var(--red);
  transform: skewX(-8deg) rotate(0) scale(1.06);
}

/* ============ IMAGE SLOTS ============ */
/* 1. Hero art — big character/portrait on the right, over the black slash */
#hero-art {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: min(92vh, 900px);
  max-width: 46vw;
  object-fit: contain;
  object-position: bottom right;
  filter: drop-shadow(-14px 10px 0 rgba(0, 73, 230, 0.85)) drop-shadow(-4px 4px 12px rgba(0, 0, 0, .6));
  pointer-events: none;
  transition: transform .8s cubic-bezier(.8, 0, .15, 1), opacity .5s;
}

body[data-screen]:not([data-screen="home"]) #hero-art {
  transform: translateX(60%) skewX(-6deg);
  opacity: 0;
}

@media (max-width:900px) {
  #hero-art {
    max-width: 70vw;
    opacity: .5;
  }
}

/* 2. Project card thumbnails */
.card .thumb {
  margin: -20px -22px 14px;
  height: 150px;
  overflow: hidden;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 82%, 0 100%);
  background: var(--black);
}

.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(.9) contrast(1.15);
  transition: filter .2s, transform .3s;
}

.card:hover .thumb img {
  filter: grayscale(0) contrast(1.05);
  transform: scale(1.05);
}

.card .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 78%, var(--red) 78.5%);
}

/* 3. About photo — taped-up polaroid */
.about-photo {
  float: right;
  width: min(240px, 38%);
  margin: 0 0 14px 22px;
  background: var(--white);
  padding: 10px 10px 34px;
  transform: rotate(3deg);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .35);
  position: relative;
}

.about-photo img {
  width: 100%;
  display: block;
  filter: contrast(1.05);
}

.about-photo::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  width: 90px;
  height: 26px;
  background: var(--red);
  opacity: .9;
  clip-path: polygon(4% 0, 96% 8%, 100% 92%, 0 100%);
}

.about-photo figcaption {
  text-align: center;
  margin-top: 8px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--ink);
}

/* ============ WIPE TRANSITION ============ */
#wipe {
  position: fixed;
  inset: -10%;
  z-index: 50;
  pointer-events: none;
}

#wipe .pane {
  position: absolute;
  inset: 0;
  transform: translateX(-130%) skewX(-14deg);
}

#wipe .p1 {
  background: var(--red);
}

#wipe .p2 {
  background: var(--black);
}

#wipe .p3 {
  background: var(--white);
}

#wipe.go .pane {
  animation: wipeAcross .7s cubic-bezier(.75, 0, .2, 1) forwards;
}

#wipe.go .p2 {
  animation-delay: .06s;
}

#wipe.go .p1 {
  animation-delay: .12s;
}

@keyframes wipeAcross {
  0% {
    transform: translateX(-130%) skewX(-14deg);
  }

  45% {
    transform: translateX(0%) skewX(-14deg);
  }

  55% {
    transform: translateX(0%) skewX(-14deg);
  }

  100% {
    transform: translateX(130%) skewX(-14deg);
  }
}

#wipe .flash {
  position: absolute;
  inset: 0;
  background: var(--white);
  opacity: 0;
}

#wipe.go .flash {
  animation: flash .7s linear forwards;
}

@keyframes flash {

  0%,
  44% {
    opacity: 0;
  }

  48% {
    opacity: 1;
  }

  56% {
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

/* ============ CUSTOM ANIMATED CURSOR ============ */
@media (pointer:fine) {

  body.cursor-on,
  body.cursor-on * {
    cursor: none !important;
  }
}

#cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  z-index: 100000;
  pointer-events: none;
  display: none;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-image: url("../assets/cursors/normal.png");
  margin: -3px 0 0 -4px;
  /* NORMAL hotspot */
}

#cursor.link {
  background-image: url("../assets/cursors/link.png");
  margin: -6px 0 0 -6px;
  /* LINK_SELECT hotspot */
}

/* clickable name */
#big-name {
  cursor: pointer;
  width: max-content;
}

#big-name:hover .ch {
  animation: jitter .35s ease both;
}

#big-name:hover .ch:nth-child(odd) {
  animation-delay: .03s;
}

#big-name:hover .ch:nth-child(3n) {
  animation-delay: .06s;
}

#big-name:active {
  transform: scale(.985);
}

/* ============ PER-SCREEN MENU ARTWORK ============ */
/* Each screen can have its own art at assets/menus/<screen>.jpg.
   Missing files remove themselves; the CSS stripes show through. */
.menu-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  will-change: transform;
  pointer-events: none;
  transition: opacity .55s ease;
}

body[data-screen="home"].has-art-home #art-home,
body[data-screen="projects"] #art-projects,
body[data-screen="skills"] #art-skills,
body[data-screen="about"] #art-about,
body[data-screen="contact"] #art-contact {
  opacity: 1;
}

/* the home artwork carries its own black diagonal — drop the CSS slash */
body.has-art-home #slash {
  display: none;
}

/* halftone overlay whenever a screen's art is showing */
body.has-art-home[data-screen="home"] #bg-halftone,
body.has-art-skills[data-screen="skills"] #bg-halftone,
body.has-art-about[data-screen="about"] #bg-halftone,
body.has-art-contact[data-screen="contact"] #bg-halftone {
  opacity: .65;
}

/* readability scrims — darken the side the content sits on */
body.has-art-home[data-screen="home"] #bg-vignette,
body.has-art-skills[data-screen="skills"] #bg-vignette {
  background:
    linear-gradient(100deg, rgba(0, 0, 0, .42) 0%, rgba(0, 0, 0, .12) 36%, transparent 58%),
    radial-gradient(ellipse at 32% 40%, transparent 30%, rgba(0, 0, 0, .55) 100%);
}

body.has-art-contact[data-screen="contact"] #bg-vignette {
  background:
    linear-gradient(260deg, rgba(0, 0, 0, .48) 0%, rgba(0, 0, 0, .14) 38%, transparent 60%),
    radial-gradient(ellipse at 68% 40%, transparent 30%, rgba(0, 0, 0, .55) 100%);
}

/* the About art's star pattern is busy — heavier scrim so the header reads */
body.has-art-about[data-screen="about"] #bg-vignette {
  background:
    linear-gradient(260deg, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .3) 42%, transparent 64%),
    radial-gradient(ellipse at 68% 40%, transparent 25%, rgba(0, 0, 0, .6) 100%);
}

body.has-art-home #menu .ch:not(.box):not(.boxw),
body.has-art-home #big-name .ch:not(.box):not(.boxw) {
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .6);
}

/* ============ RIGHT-ALIGNED SCREENS (art on the left) ============ */
.screen.align-right.active {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.screen.align-right .contact-list {
  justify-content: flex-end;
}

.screen.align-right .paper {
  transform: rotate(.6deg);
}

.screen.align-right .about-photo {
  float: left;
  margin: 0 22px 14px 0;
  transform: rotate(-3deg);
}

@media (max-width:820px) {

  /* on small screens the art is mostly behind content anyway — keep it simple */
  .screen.align-right.active {
    align-items: stretch;
  }

  .screen.align-right .contact-list {
    justify-content: flex-start;
  }
}

/* ============ CV DOWNLOAD BUTTON ============ */
.cv-btn {
  display: inline-block;
  margin-bottom: 6vh;
  text-decoration: none;
  background: var(--red);
  color: var(--white);
  font-family: 'Archivo Black', 'Arial Black', Impact, sans-serif;
  font-size: clamp(17px, 2.2vw, 24px);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 16px 30px;
  transform: skewX(-8deg) rotate(-1deg);
  box-shadow: 7px 7px 0 var(--black);
  transition: transform .15s, background .15s, color .15s, box-shadow .15s;
}

.cv-btn span {
  display: inline-block;
  transform: skewX(8deg);
}

.cv-btn:hover {
  background: var(--white);
  color: var(--red);
  transform: skewX(-8deg) rotate(0) scale(1.05);
  box-shadow: 10px 10px 0 var(--black);
}

.cv-btn:active {
  transform: skewX(-8deg) scale(.97);
}

/* ============ CONTACT FORM ============ */
#contact-form {
  width: 100%;
}

.form-head {
  font-family: 'Archivo Black', 'Arial Black', Impact, sans-serif;
  font-size: clamp(18px, 2.2vw, 24px);
  text-transform: uppercase;
  margin-bottom: 18px;
  position: relative;
  display: inline-block;
}

.form-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 7px;
  width: 100%;
  background: var(--red);
  transform: skewX(-24deg);
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field span {
  display: block;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 5px;
}

.field input,
.field textarea {
  width: 100%;
  border: 3px solid var(--black);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 16px;
  transform: skewX(-2deg);
  transition: border-color .15s, box-shadow .15s;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 4px 4px 0 var(--red);
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.form-foot {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.form-send {
  border: 0;
  cursor: pointer;
  margin-bottom: 0;
  font-size: 17px;
  padding: 12px 26px;
}

.form-send:disabled {
  opacity: .55;
  cursor: wait;
}

#form-status {
  font-weight: 700;
  letter-spacing: .08em;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--ink);
}

.paper a {
  color: var(--red);
  font-weight: 700;
}

.paper a:hover {
  background: var(--red);
  color: var(--white);
  text-decoration: none;
}

.paper .quote em {
  display: inline;
  background: var(--black);
  color: var(--white);
  font-style: italic;
  padding: 1px 6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  line-height: 1.7;
}

/* ============ RESPONSIVE / MOTION ============ */


@media (prefers-reduced-motion:reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .001s !important;
    transition-duration: .001s !important;
  }
}

/* =========================================================
   VIDEO ONLY ON HOME
   ========================================================= */

/* Keep portfolio text/menu above the background */
#shell {
  position: relative;
  z-index: 2;
}

#big-name .ransom:nth-child(2) {
  letter-spacing: -0.08em;
}

/* =========================================================
   ABOUT PAGE - HIGHLIGHTED PERSONA 5 STYLE
   ========================================================= */

.about-highlight {
  display: inline;
  background: #050505;
  color: #ffffff;
  padding: 2px 7px;
  margin: 1px 2px;
  font-weight: 800;
  box-shadow: 4px 4px 0 #00aeea;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Slight variation for highlighted phrases */
.about-highlight:nth-of-type(even) {
  transform: rotate(1deg);
}

/* Quote at the bottom */
.about-quote {
  display: block;
  background: #050505;
  color: #ffffff;
  padding: 14px 18px;
  margin-top: 10px;
  font-size: 1.05em;
  font-weight: 700;
  border-left: 7px solid #00aeea;
  box-shadow: 7px 7px 0 #00aeea;
  transform: rotate(-1deg);
}

/* Make the About text slightly more readable */
#screen-about .paper p {
  line-height: 1.65;
}

/* Give the first paragraph extra importance */
#screen-about .paper .quote {
  font-weight: 700;
  font-size: 1.05em;
}

/* FORCE ABOUT HIGHLIGHT TEXT TO WHITE */
#screen-about .about-highlight {
  color: #ffffff !important;
  background: #050505 !important;
}

#audio-toggle {
  position: fixed;
  right: 25px;
  bottom: 35px;
  z-index: 99999;

  width: 50px;
  height: 42px;

  background: #000;
  color: #fff;

  border: 2px solid #fff;
  box-shadow: 5px 5px 0 #00aeef;

  font-size: 18px;
  font-weight: bold;

  cursor: pointer;
}

#audio-toggle:hover {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 #00aeef;
}

#clock {
  color: #000 !important;
  opacity: 1 !important;
  font-weight: 700;
}

/* =========================================================
   RESPONSIVE / MOBILE OPTIMIZATION (PHONES & SMALL TABLETS)
   Preserves 100% desktop styling for viewports > 768px
   ========================================================= */
@media (max-width: 768px) {
  /* 1. General & Screen Containers */
  .screen {
    padding: 12px 16px max(90px, 14vh) 16px;
    -webkit-overflow-scrolling: touch;
  }

  /* 2. Top HUD */
  #hud-top {
    padding: max(10px, env(safe-area-inset-top, 10px)) 12px 0;
    gap: 6px;
    align-items: center;
  }

  .hud-tag {
    font-size: 11px;
    padding: 4px 8px;
    letter-spacing: .08em;
  }

  /* 3. Bottom HUD (Keyboard cues for PC) -> Hide completely on phone touchscreens */
  #hud-bottom {
    display: none !important;
  }

  /* 4. Audio Toggle Button */
  #audio-toggle {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: 44px;
    height: 44px;
    font-size: 18px;
    box-shadow: 4px 4px 0 var(--red);
  }

  /* 5. Home Screen: Hide the black diagonal polygon so full width is usable */
  #slash {
    display: none !important;
  }

  #screen-home {
    padding: 10px 16px;
    justify-content: center;
  }

  #intro-eyebrow {
    font-size: 12px;
    letter-spacing: .22em;
    margin-bottom: 8px;
  }

  #big-name {
    margin-bottom: 12px;
  }

  #big-name .ransom {
    font-size: clamp(38px, 11.5vw, 52px);
    letter-spacing: 0 !important;
  }

  #big-name .ransom:nth-child(2) {
    letter-spacing: 0 !important;
  }

  #big-name .ransom .ch {
    margin-right: -0.04em;
  }

  #tagline {
    max-width: 100%;
    font-size: 14px;
    line-height: 1.45;
    padding: 10px 14px;
    transform: rotate(-0.5deg);
    margin-bottom: 10px;
  }

  #menu {
    margin-top: 2vh;
    gap: 8px;
  }

  .menu-item {
    padding: 4px 14px 4px 6px;
    transform: none;
    opacity: 1;
  }

  .menu-item .ransom {
    font-size: clamp(26px, 7.5vw, 36px);
  }

  .menu-item.sel {
    transform: translateX(8px) !important;
  }

  .cursor-mark {
    right: -28px;
    font-size: 18px;
  }

  /* 6. Sub-screen Heads & Navigation */
  .sub .screen-head {
    margin: 0.5vh 0 1.8vh;
  }

  .sub .screen-head .ransom {
    font-size: clamp(32px, 8.5vw, 44px);
  }

  /* Floating Back Button for Mobile: Remains accessible while scrolling */
  body[data-screen="home"] .back-hint {
    display: none !important;
  }

  .back-hint {
    position: fixed;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    left: 14px;
    z-index: 99998;
    margin: 0;
    font-size: 12px;
    font-weight: 800;
    padding: 8px 14px;
    letter-spacing: .14em;
    background: var(--white);
    color: var(--black);
    border: 2px solid var(--black);
    box-shadow: 4px 4px 0 var(--red);
    transform: rotate(-2deg);
    cursor: pointer;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    -webkit-tap-highlight-color: transparent;
    transition: transform .12s ease, background .12s ease, color .12s ease, box-shadow .12s ease;
  }

  .back-hint:hover,
  .back-hint:active {
    background: var(--red);
    color: var(--white);
    box-shadow: 2px 2px 0 var(--black);
    transform: rotate(-2deg) translate(2px, 2px);
  }

  /* 7. About Screen: Unfloat polaroid photo, center on top, readable full-width text */
  .screen.align-right.active {
    align-items: stretch !important;
  }

  .screen.align-right .paper,
  .paper {
    padding: 18px 16px;
    font-size: 15px;
    line-height: 1.6;
    max-width: 100%;
    transform: none !important;
    clip-path: polygon(0 2%, 2% 0, 100% 0, 100% 98%, 98% 100%, 0 100%);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, .55);
    margin-bottom: 24px;
  }

  .screen.align-right .about-photo,
  .about-photo {
    float: none !important;
    display: block;
    margin: 0 auto 16px auto !important;
    width: min(180px, 55%) !important;
    transform: rotate(-1.5deg);
  }

  .about-highlight {
    padding: 2px 5px;
    margin: 1px 1px;
    line-height: 1.7;
    box-shadow: 3px 3px 0 #00aeea;
  }

  .about-quote {
    padding: 10px 14px;
    font-size: 14px;
    margin-top: 12px;
  }

  /* 8. Skills Screen: 2-line layout (name left, % right, 100% bar below) */
  .skill-group {
    padding: 16px 14px 14px;
    max-width: 100%;
    margin-bottom: 24px;
    clip-path: polygon(0 2%, 1.8% 0, 100% 0, 100% 98%, 98.2% 100%, 0 100%);
  }

  .skill-group h3 {
    font-size: 16px;
    padding: 5px 12px;
    margin-bottom: 14px;
  }

  .skill-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px 0;
    margin-bottom: 14px;
  }

  .skill-row .name {
    width: auto;
    flex: 1 1 auto;
    max-width: calc(100% - 46px);
    font-size: 13.5px;
    letter-spacing: .05em;
    line-height: 1.25;
  }

  .skill-row .lv {
    width: 40px;
    font-size: 14px;
    text-align: right;
  }

  .skill-bar {
    width: 100%;
    flex-basis: 100%;
    height: 14px;
    max-width: 100%;
    margin-top: 3px;
  }

  /* 9. Contact Screen: 2x2 grid buttons and full-width inputs */
  .screen.align-right .contact-list,
  .contact-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-bottom: 20px;
    width: 100%;
    justify-content: stretch;
  }

  .contact-chip {
    padding: 12px 8px;
    font-size: 14px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, .4);
    transform: skewX(-6deg);
  }

  .contact-chip span {
    transform: skewX(6deg);
  }

  .form-head {
    font-size: 18px;
    margin-bottom: 14px;
  }

  .field input,
  .field textarea {
    font-size: 16px; /* Prevents auto-zoom in iOS Safari */
    padding: 10px 10px;
    transform: none;
  }

  .form-send {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    font-size: 16px;
  }

  /* 10. Projects Screen: Featured cards */
  #screen-projects {
    padding-top: 1.5vh;
  }

  #feat-grid {
    gap: 20px;
    margin: 10px auto 30px;
    padding: 0;
  }

  .card.feat {
    padding: 18px 16px 16px;
    transform: rotate(var(--tilt)) translateY(10px);
    filter: drop-shadow(5px 5px 0 var(--red-deep));
  }

  .card.feat::before {
    clip-path: polygon(0 3%, 2% 0, 100% 0, 100% 97%, 98% 100%, 0 100%);
  }

  .card.feat h3 {
    font-size: 20px;
    margin-bottom: 8px;
    line-height: 1.2;
  }

  .card.feat p {
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 12px;
  }

  .card.feat .card-top {
    gap: 6px;
    margin-bottom: 8px;
  }

  .card.feat .lang {
    font-size: 11px;
    padding: 4px 10px;
  }

  .card.feat .award-tag {
    font-size: 11px;
    padding: 3px 8px;
  }

  .card.feat .card-tech span {
    font-size: 11.5px;
    padding: 3px 8px;
  }

  .card.feat .meta {
    margin-top: 10px;
    padding-top: 10px;
    font-size: 12px;
  }

  .card.feat .meta .go {
    padding: 6px 14px;
    font-size: 12px;
  }

  .grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 10px;
  }

  #repo-grid {
    grid-template-columns: 1fr;
  }
}