/* =====================================================================
   VICKY SAHU — NARUTO / UCHIHA CALLIGRAPHIC & PROPORTIONAL STYLE SYSTEM
   =====================================================================
   - Fonts: 'Ninja Naruto' (authentic Naruto display font), 'Reggae One' &
     'Shojumaru' (Japanese shonen brush display), 'Yuji Syuku' (sumi-e kanji
     calligraphy), 'Yatra One' (Devanagari calligraphy), 'Chakra Petch' (UI/body).
   - Proportions: Strict 8px spatial rhythm, centered 1140px sub-screen containers,
     balanced 2-column About/Contact layouts, and level typographic baselines.
   - Video Ready: Built-in styles for #bg-video-stage and #wipe-video so custom
     Sharingan / Kamui video animations drop in without CSS changes.
   ===================================================================== */

:root {
  --red: #e60012;
  --red-deep: #8f000b;
  --obito-orange: #ff5500;
  --obito-gold: #ffaa00;
  --kamui-purple: #8b5cf6;
  --black: #07070b;
  --surface: rgba(10, 10, 16, 0.86);
  --surface-strong: rgba(8, 8, 13, 0.94);
  --white: #f6f4ef;
  --muted: #bdb8af;
  --slash-border: rgba(255, 85, 0, 0.42);

  /* Font Stacks */
  --font-naruto: 'Ninja Naruto', 'Reggae One', 'Shojumaru', Impact, sans-serif;
  --font-calligraphy: 'Reggae One', 'Yuji Syuku', serif;
  --font-kanji: 'Yuji Syuku', serif;
  --font-devanagari: 'Yatra One', 'Rozha One', serif;
  --font-body: 'Chakra Petch', 'Segoe UI', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; height: 100dvh; width: 100%; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  user-select: auto;
  position: relative;
}
button, nav, .seal-badge, .seal-stamp, .brand-mangekyo, .brand-rinne-sharingan, .cursor-mark, canvas {
  user-select: none;
}

/* Authentic Naruto & Japanese Brush Display Typography */
.display {
  font-family: var(--font-naruto);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.brush-font {
  font-family: var(--font-kanji);
}

/* Reusable Inline Shinobi SVG Styling */
.shinobi-svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  transition: transform 0.25s cubic-bezier(.16, 1, .3, 1);
}
.shinobi-svg.dir-left { transform: scaleX(-1); }
.shinobi-svg.dir-up { transform: rotate(-90deg); }
.shinobi-svg.dir-down { transform: rotate(90deg); }
.shinobi-svg.dir-ne { transform: rotate(-35deg); }

/* ============ CANONICAL SHARINGAN & MANGEKYO OCULAR KINEMATICS ============
   Very slow, hypnotic circular rotation of inner eye marks (tomoe & pinwheel blades)
   revolving smoothly around the center pupil, faithful to the anime show. */
@keyframes sharinganSlowSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.sharingan-tomoe-wheel,
.mangekyo-pinwheel {
  transform-box: view-box;
  transform-origin: 32px 32px;
  animation: sharinganSlowSpin 14s linear infinite;
  will-change: transform;
}

/* Organic phase staggering across skill nodes so they feel alive rather than strictly mechanical */
.chakra-skill-node:nth-child(2n) .sharingan-tomoe-wheel {
  animation-duration: 16s;
  animation-delay: -3.5s;
}
.chakra-skill-node:nth-child(3n) .sharingan-tomoe-wheel {
  animation-duration: 18s;
  animation-delay: -7s;
}
.chakra-skill-node:nth-child(5n) .sharingan-tomoe-wheel {
  animation-duration: 13s;
  animation-delay: -10s;
}

/* Brand Mangekyo & Scroll seals rotate with majestic slow pace */
.brand-mangekyo .mangekyo-pinwheel {
  animation-duration: 15s;
}
.scroll-seal .mangekyo-pinwheel {
  animation-duration: 18s;
}
.form-head-sharingan .sharingan-tomoe-wheel {
  animation-duration: 16s;
}
.form-head .form-head-sharingan {
  width: 22px;
  height: 22px;
}

/* Interactive Chakra Flare: Hovering nodes, badges, or brand accelerates rotation to focused jutsu speed */
.hud-brand:hover .mangekyo-pinwheel,
.hud-brand:hover .brand-rinne-sharingan .rinne-tomoe-orbit,
.card:hover .sharingan-tomoe-wheel,
.card:hover .mangekyo-pinwheel,
.chakra-skill-node:hover .sharingan-tomoe-wheel,
.chakra-skill-node:hover .mangekyo-pinwheel,
.shinobi-scroll-group:hover .mangekyo-pinwheel,
.form-head:hover .sharingan-tomoe-wheel {
  animation-duration: 3.2s;
}

/* Unlocked Skill Node Activation: Settles into active high-chakra rotation */
.unlocked-spin .mangekyo-pinwheel,
.chakra-skill-node.unlocked .mangekyo-pinwheel {
  animation-duration: 4.5s;
}

/* ============ OBITO UCHIHA CHRONICLES: ELEMENT ANIMATIONS ============ */
@keyframes rinneganPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.92;
  }
  50% {
    transform: scale(1.045);
    opacity: 1;
  }
}
.rinnegan-svg .rinnegan-ripples {
  transform-box: view-box;
  transform-origin: 32px 32px;
  animation: rinneganPulse 3.8s ease-in-out infinite;
}

@keyframes rinneSharinganSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.rinne-sharingan-svg .rinne-tomoe-orbit {
  transform-box: view-box;
  transform-origin: 32px 32px;
  animation: rinneSharinganSpin 20s linear infinite;
  will-change: transform;
}

@keyframes gudodamaFloat {
  0% {
    transform: rotate(0deg) scale(0.98);
  }
  50% {
    transform: rotate(180deg) scale(1.04);
  }
  100% {
    transform: rotate(360deg) scale(0.98);
  }
}
.gudodama-svg .gudodama-orbit {
  transform-box: view-box;
  transform-origin: 32px 32px;
  animation: gudodamaFloat 9s ease-in-out infinite;
}

@keyframes kamuiVortexTwist {
  0% {
    transform: rotate(0deg) scale(0.96);
  }
  50% {
    transform: rotate(180deg) scale(1.04);
  }
  100% {
    transform: rotate(360deg) scale(0.96);
  }
}
.kamui-rift-svg .kamui-vortex-spin {
  transform-box: view-box;
  transform-origin: 32px 32px;
  animation: kamuiVortexTwist 12s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Animation keyframes for Obito motifs */
@keyframes floatBob {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes swayGently {
  0%, 100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-3.5deg);
  }
}

@keyframes gogglesPulse {
  0%, 100% {
    opacity: 0.88;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

.tobi-mask-svg,
.war-mask-svg {
  animation: floatBob 3.6s ease-in-out infinite;
  will-change: transform;
}

.gunbai-svg {
  transform-box: view-box;
  transform-origin: 32px 58px;
  animation: swayGently 5.5s ease-in-out infinite;
  will-change: transform;
}

.goggles-svg {
  animation: gogglesPulse 4.2s ease-in-out infinite;
  will-change: transform, opacity;
}

/* ============ Creative Pillars / Philosophy Section ============ */
.creative-pillars {
  margin-top: 24px;
  background: rgba(14, 14, 22, 0.72);
  border: 1px solid rgba(255, 85, 0, 0.18);
  padding: 24px 22px;
}
.pillars-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 85, 0, 0.18);
}
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.pillar-card {
  background: rgba(9, 9, 14, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid var(--obito-orange);
  padding: 16px 14px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s, background 0.25s;
}
.pillar-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 85, 0, 0.4);
  border-left-color: var(--obito-gold);
  background: rgba(24, 12, 16, 0.85);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}
.pillar-card:hover #pillar-goggles .goggles-svg {
  filter: drop-shadow(0 0 10px rgba(255, 170, 0, 0.85)) brightness(1.2);
  transform: scale(1.08);
  transition: transform 0.25s, filter 0.25s;
}
.pillar-card:hover #pillar-tobi .tobi-mask-svg {
  filter: drop-shadow(0 0 12px rgba(255, 85, 0, 0.85));
  transform: scale(1.08) rotate(-4deg);
  transition: transform 0.25s, filter 0.25s;
}
.pillar-card:hover #pillar-gunbai .gunbai-svg {
  filter: drop-shadow(0 0 10px rgba(230, 0, 18, 0.85));
  transform: scale(1.06) rotate(6deg);
  transition: transform 0.25s, filter 0.25s;
}
.pillar-card:hover #pillar-rinnegan .rinnegan-svg {
  filter: drop-shadow(0 0 12px rgba(157, 141, 241, 0.85));
  transform: scale(1.08);
  transition: transform 0.25s, filter 0.25s;
}
.pillar-card:hover #pillar-rinnegan .rinnegan-svg .rinnegan-ripples {
  animation-duration: 1.6s;
}
.pillar-icon-wrap {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 18, 28, 0.9);
  border: 1px solid rgba(255, 85, 0, 0.25);
  border-radius: 4px;
}
.pillar-icon-wrap .shinobi-svg {
  width: 30px;
  height: 30px;
}
.pillar-body {
  flex: 1;
}
.pillar-num {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--obito-orange);
  text-transform: uppercase;
  display: block;
  margin-bottom: 3px;
}
.pillar-title {
  font-family: var(--font-naruto);
  font-size: 15px;
  color: var(--white);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.pillar-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}



/* ============ BACKGROUND ARTWORK & VIDEO STAGE ============ */
#bg {
  position: fixed;
  inset: -3vmax;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #06060a;
}
.bg-layer { position: absolute; inset: 0; }

#bg-stripes {
  background: repeating-linear-gradient(
    118deg,
    #110306 0 54px,
    rgba(143, 0, 11, 0.45) 54px 60px,
    #1a0409 60px 132px,
    rgba(255, 85, 0, 0.25) 132px 136px
  );
}

/* Per-Screen Key Visuals (Clean, Undistorted Proportions) */
.menu-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  will-change: transform, opacity;
  pointer-events: none;
  transition: opacity 0.48s cubic-bezier(.16, 1, .3, 1);
  transform: translate3d(0, 0, 0);
}
body[data-screen="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;
}

/* Optional Looping Background Video Slot (Activated automatically when Model.videoConfig has a URL) */
#bg-video-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.45s ease;
  transform: translateZ(0);
  will-change: opacity;
}
#bg-video-stage.active {
  opacity: 1;
}

#bg-ember-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.75;
}

#bg-halftone {
  z-index: 3;
  background-image: radial-gradient(circle, rgba(0,0,0,.4) 1.2px, transparent 1.5px);
  background-size: 14px 14px;
  mix-blend-mode: multiply;
  opacity: 0.55;
}

/* Balanced Ink Vignettes so Text & Artwork Both Breathe Clearly */
#bg-vignette {
  z-index: 4;
  transition: background 0.45s ease;
}
body[data-screen="home"] #bg-vignette {
  background:
    linear-gradient(92deg, rgba(6,6,10,0.94) 0%, rgba(6,6,10,0.78) 38%, rgba(6,6,10,0.18) 68%, rgba(6,6,10,0.35) 100%),
    radial-gradient(ellipse at 74% 50%, transparent 32%, rgba(5,5,9,0.65) 100%);
}
body:not([data-screen="home"]) #bg-vignette {
  background:
    linear-gradient(180deg, rgba(6,6,10,0.88) 0%, rgba(6,6,10,0.78) 50%, rgba(6,6,10,0.92) 100%),
    radial-gradient(ellipse at 50% 40%, rgba(6,6,10,0.45) 0%, rgba(5,5,9,0.85) 100%);
}

/* ============ SCREEN TRANSITION WIPE & VIDEO OVERLAY ============ */
#wipe {
  position: fixed;
  inset: -10%;
  z-index: 80;
  pointer-events: none;
  overflow: hidden;
}
#wipe .pane {
  position: absolute;
  inset: 0;
  transform: translateX(-135%) skewX(-18deg);
  will-change: transform;
}
#wipe .p1 { background: linear-gradient(120deg, var(--red), var(--obito-orange)); }
#wipe .p2 { background: var(--black); }
#wipe .p3 { background: #1a0510; }
#wipe.go .pane { animation: wipeAcross 0.5s cubic-bezier(.65, 0, .15, 1) forwards; }
#wipe.go .p2 { animation-delay: 0.03s; }
#wipe.go .p1 { animation-delay: 0.06s; }

/* Obito Smooth Thrown Kunai Page Transition */
.wipe-kunai-flight {
  position: absolute;
  top: 50%;
  left: 0;
  width: 140px;
  height: 42px;
  transform: translateX(-240px) translateY(-50%) rotate(-4deg);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  filter: drop-shadow(0 0 10px rgba(255, 85, 0, 0.75));
  z-index: 10;
}
.wipe-kunai-flight .thrown-kunai {
  width: 100%;
  height: 100%;
  display: block;
}
#wipe.go .wipe-kunai-flight {
  animation: obitoKunaiThrow 0.52s cubic-bezier(0.22, 0.85, 0.25, 1) forwards;
}

@keyframes obitoKunaiThrow {
  0% {
    transform: translateX(-240px) translateY(-50%) rotate(-6deg) scale(0.9);
    opacity: 0;
  }
  6% {
    opacity: 1;
  }
  48% {
    transform: translateX(52vw) translateY(-50%) rotate(-1deg) scale(1.08);
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  100% {
    transform: translateX(118vw) translateY(-50%) rotate(3deg) scale(0.96);
    opacity: 0;
  }
}

@keyframes wipeAcross {
  0%   { transform: translateX(-135%) skewX(-18deg); }
  45%  { transform: translateX(0%) skewX(-18deg); }
  55%  { transform: translateX(0%) skewX(-18deg); }
  100% { transform: translateX(135%) skewX(-18deg); }
}

/* Custom Sharingan / Kamui Transition Video Player (Plays when Model.videoConfig.transitionVideo is set) */
#wipe-video {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 85;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
#wipe-video.playing {
  opacity: 1;
}

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

#hud-top {
  height: 68px;
  min-height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5vw;
  z-index: 15;
  background: linear-gradient(180deg, rgba(6, 6, 10, 0.9) 0%, rgba(6, 6, 10, 0) 100%);
}
.hud-left {
  display: flex;
  align-items: center;
  gap: 16px;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
body[data-screen="home"] .hud-left {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.hud-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

/* Shinobi Crest Brand Button */
.hud-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(12, 12, 18, 0.9);
  color: var(--white);
  border: 1px solid rgba(255, 85, 0, 0.4);
  border-left: 3px solid var(--obito-orange);
  padding: 7px 16px;
  font-family: var(--font-naruto);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.hud-brand:hover {
  transform: translateY(-1px);
  border-color: var(--obito-gold);
  background: rgba(230, 0, 18, 0.22);
}
.hud-brand .brand-mangekyo,
.hud-brand .brand-rinne-sharingan {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.hud-brand:hover .brand-rinne-sharingan .rinne-tomoe-orbit {
  animation-duration: 4.5s;
}

.hud-location {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

/* Sub-Screen Navigation Bar (Hidden on Home so Home stays clean) */
.top-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(9, 9, 14, 0.88);
  padding: 5px 12px;
  border: 1px solid rgba(255, 85, 0, 0.32);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  backdrop-filter: blur(8px);
}
body[data-screen="home"] .top-nav {
  display: none !important;
}
.top-nav-btn {
  background: transparent;
  color: #d8d4cc;
  border: none;
  padding: 6px 14px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  transition: color 0.18s, background 0.18s;
}
.top-nav-btn:hover {
  color: var(--white);
  background: rgba(255, 85, 0, 0.15);
}
.top-nav-btn.active {
  background: linear-gradient(110deg, var(--obito-orange), var(--red));
  color: var(--white);
}

/* Anime HUD Obito OST Music Controller Pill (45% Volume) */
.hud-music-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 10, 16, 0.82);
  border: 1px solid rgba(255, 85, 0, 0.35);
  border-left: 2px solid var(--obito-orange);
  color: var(--white);
  padding: 6px 13px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  user-select: none;
}
.hud-music-pill:hover {
  background: rgba(230, 0, 18, 0.24);
  border-color: var(--obito-gold);
  transform: translateY(-1px);
}
.hud-music-pill.is-playing {
  border-left-color: var(--obito-gold);
  background: rgba(255, 85, 0, 0.16);
}
.hud-music-pill .music-icon {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 13px;
  width: 14px;
}
.hud-music-pill .music-bar {
  width: 2.5px;
  background: var(--muted);
  border-radius: 1px;
  height: 3px;
  transition: height 0.2s, background 0.2s;
}
.hud-music-pill.is-playing .music-bar {
  background: var(--obito-gold);
}
.hud-music-pill.is-playing .bar-1 {
  animation: musicWave 0.75s ease-in-out infinite alternate;
}
.hud-music-pill.is-playing .bar-2 {
  animation: musicWave 0.55s ease-in-out 0.2s infinite alternate;
}
.hud-music-pill.is-playing .bar-3 {
  animation: musicWave 0.85s ease-in-out 0.35s infinite alternate;
}

@keyframes musicWave {
  0% { height: 3px; }
  100% { height: 13px; }
}

.hud-clock-pill {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(10, 10, 16, 0.75);
  padding: 6px 14px;
  border-right: 2px solid var(--obito-orange);
}

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

/* ============ SCREENS & PROPORTIONAL CONTAINERS ============ */
.screen {
  position: absolute;
  inset: 0;
  padding: 20px 5vw 40px;
  display: none;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  transform: translateZ(0);
  scrollbar-width: thin;
  scrollbar-color: var(--obito-orange) rgba(0,0,0,0.3);
}
.screen.active { display: block; }
.screen::-webkit-scrollbar { width: 6px; }
.screen::-webkit-scrollbar-thumb { background: linear-gradient(var(--obito-orange), var(--red)); }

.sub-container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
}

/* ---------- HOME SCREEN: BALANCED CALLIGRAPHIC HERO ---------- */
#screen-home.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 6vw;
  overflow: hidden;
}
.home-main {
  max-width: 620px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#intro-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(12px, 1.15vw, 14px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 14px;
  color: var(--obito-orange);
  text-shadow: 0 2px 10px rgba(0,0,0,0.9);
}
#intro-eyebrow .eyebrow-line {
  width: 36px;
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--obito-orange));
}
#intro-eyebrow .eyebrow-kanji {
  font-family: var(--font-kanji);
  font-size: 16px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red), var(--obito-orange));
  border: 1px solid rgba(255, 170, 0, 0.5);
  box-shadow: 0 0 10px rgba(230, 0, 18, 0.4);
  padding: 1px 7px;
  line-height: 1.2;
}

/* Main Hero Name — Authentic Naruto Font, Level Baselines, Proportional Scale */
#big-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 20px;
  cursor: pointer;
  user-select: none;
}
#big-name .hero-name-line {
  font-family: var(--font-naruto);
  font-size: clamp(48px, 6.4vw, 90px);
  line-height: 1.04;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: block;
  transition: transform 0.24s cubic-bezier(.16, 1, .3, 1);
}
#big-name .line-primary {
  color: var(--white);
  text-shadow:
    4px 5px 0 #07070b,
    -1px -1px 0 #07070b,
    0 10px 28px rgba(0, 0, 0, 0.85);
}
#big-name .line-accent {
  background: linear-gradient(180deg, #ffbb33 0%, #ff5500 55%, #e60012 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(4px 5px 0 #07070b) drop-shadow(0 6px 20px rgba(230, 0, 18, 0.35));
}
#big-name:hover .line-primary {
  transform: translateX(4px);
}
#big-name:hover .line-accent {
  transform: translateX(8px);
}

/* Calligraphic "प्रणाम बन्धु !" Greeting Banner */
#tagline {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
  padding: 8px 24px 8px 16px;
  background: linear-gradient(90deg, rgba(230, 0, 18, 0.35) 0%, rgba(10, 10, 16, 0.94) 75%, rgba(10, 10, 16, 0.85) 100%);
  border: 1px solid rgba(255, 85, 0, 0.22);
  border-left: 3px solid var(--obito-orange);
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
}
#tagline .pranam-text {
  font-family: var(--font-devanagari);
  font-weight: 400;
  font-size: clamp(20px, 2vw, 27px);
  letter-spacing: 0.04em;
  color: var(--white);
  text-shadow: 2px 2px 0 var(--black);
  line-height: 1.2;
}
#tagline .seal-stamp {
  font-family: var(--font-kanji);
  font-size: 14px;
  color: var(--white);
  background: rgba(230, 0, 18, 0.9);
  border: 1px solid rgba(255, 170, 0, 0.65);
  box-shadow: 0 0 8px rgba(230, 0, 18, 0.45);
  padding: 2px 6px;
  line-height: 1.1;
}

/* Proportional Shinobi Menu List */
#menu {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: min(100%, 390px);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(90deg, rgba(10, 10, 16, 0.82) 0%, rgba(10, 10, 16, 0.35) 88%, transparent 100%);
  border: none;
  border-left: 3px solid rgba(255, 85, 0, 0.38);
  cursor: pointer;
  color: var(--white);
  text-align: left;
  position: relative;
  padding: 10px 22px 10px 16px;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 100%, 0 100%);
  transform: translateX(-32px);
  opacity: 0;
  transition: transform 0.22s cubic-bezier(.16, 1, .3, 1), background 0.22s, border-color 0.22s;
}
.loaded .menu-item { animation: menuIn 0.45s cubic-bezier(.16, 1, .3, 1) forwards; }
.menu-item:nth-child(1) { animation-delay: 0.06s; }
.menu-item:nth-child(2) { animation-delay: 0.12s; }
.menu-item:nth-child(3) { animation-delay: 0.18s; }
.menu-item:nth-child(4) { animation-delay: 0.24s; }
@keyframes menuIn { to { transform: translateX(0); opacity: 1; } }

.menu-item .menu-rank {
  font-family: var(--font-kanji);
  font-size: 16px;
  color: var(--obito-orange);
  min-width: 24px;
  text-align: center;
  opacity: 0.88;
  transition: color 0.2s, transform 0.2s;
}
.menu-item .menu-label {
  font-family: var(--font-naruto);
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: 0.07em;
  line-height: 1.08;
  color: var(--white);
  text-shadow: 2px 3px 0 var(--black);
  flex: 1;
  transition: color 0.2s, transform 0.2s;
}
.menu-item.sel,
.menu-item:hover {
  transform: translateX(10px) !important;
  border-left-color: var(--obito-gold);
  background: linear-gradient(90deg, rgba(230, 0, 18, 0.88) 0%, rgba(255, 85, 0, 0.75) 78%, transparent 100%);
}
.menu-item.sel .menu-rank,
.menu-item:hover .menu-rank {
  color: var(--obito-gold);
  transform: scale(1.1);
}
.menu-item:focus-visible {
  outline: 2px solid var(--obito-orange);
  outline-offset: 3px;
}

.cursor-mark {
  opacity: 0;
  color: var(--obito-gold);
  transform: translateX(6px);
  transition: opacity 0.18s, transform 0.18s;
}
.cursor-mark .kunai-cursor {
  width: 26px;
  height: 14px;
  transform: scaleX(-1);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.85));
}
.menu-item.sel .cursor-mark,
.menu-item:hover .cursor-mark {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- SUB-SCREEN HEADER BAR ---------- */
.sub-top-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin: 4px 0 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 85, 0, 0.3);
}
.sub-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}
.sub-kanji-seal {
  font-family: var(--font-kanji);
  font-size: 28px;
  line-height: 1;
  color: var(--obito-orange);
  background: rgba(230, 0, 18, 0.16);
  border: 1px solid rgba(255, 85, 0, 0.45);
  padding: 8px 12px;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.sub .screen-head {
  font-family: var(--font-naruto);
  font-size: clamp(30px, 4.2vw, 52px);
  letter-spacing: 0.06em;
  line-height: 1.05;
  color: var(--white);
  text-shadow: 3px 4px 0 var(--black);
}
.sub-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--obito-orange);
  margin-bottom: 4px;
}

.back-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(11, 11, 17, 0.9);
  color: var(--white);
  border: 1px solid rgba(255, 85, 0, 0.45);
  padding: 8px 18px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: all 0.18s;
}
.back-hint:hover {
  background: var(--obito-orange);
  color: var(--black);
  transform: translateX(-3px);
}

/* ---------- PROJECTS SCREEN ---------- */
.projects-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 22px;
}
.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(12, 12, 18, 0.88);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 7px 16px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: all 0.18s;
}
.filter-pill:hover, .filter-pill.active {
  background: linear-gradient(110deg, var(--red), var(--obito-orange));
  color: var(--white);
  border-color: var(--obito-gold);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 24px;
  padding-bottom: 36px;
}

.card {
  position: relative;
  background: linear-gradient(150deg, rgba(16, 14, 23, 0.96) 0%, rgba(9, 9, 14, 0.98) 100%);
  color: var(--white);
  border: 1px solid rgba(255, 85, 0, 0.22);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 3px solid var(--obito-orange);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  display: flex;
  flex-direction: column;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65);
  transition: transform 0.26s cubic-bezier(.16, 1, .3, 1), border-color 0.26s, box-shadow 0.26s;
  animation: cardIn 0.42s cubic-bezier(.16, 1, .3, 1) backwards;
  animation-delay: var(--d, 0ms);
  contain: layout style;
  will-change: transform;
}
.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: skewX(-24deg);
  pointer-events: none;
  transition: left 0.75s ease;
}
.card:hover::after {
  left: 170%;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card:hover {
  transform: translateY(-4px) perspective(900px) rotateX(1.2deg);
  border-color: rgba(255, 170, 0, 0.55);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75), 0 0 24px rgba(255, 85, 0, 0.14);
}

.card.feat.flagship-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(280px, 1.08fr) 1.42fr;
  border-left: 4px solid var(--obito-orange);
  background: linear-gradient(135deg, rgba(24, 9, 15, 0.95) 0%, rgba(9, 9, 14, 0.97) 100%);
}

.card.repo-card {
  border-left: 3px solid var(--lc, var(--obito-orange));
  min-height: 180px;
}
.card.repo-card .card-body {
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}
.card.repo-card h3 {
  margin-top: 8px;
  margin-bottom: 8px;
}
.card.repo-card p {
  flex-grow: 1;
  margin-bottom: 14px;
}

.card .thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0d0d12;
  overflow: hidden;
  position: relative;
}
.card.feat.flagship-card .thumb {
  height: 100%;
  min-height: 230px;
  aspect-ratio: auto;
}
.card .thumb img,
.card .thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(.16, 1, .3, 1);
}
.card .thumb video {
  pointer-events: none;
}
.card:hover .thumb img,
.card:hover .thumb video {
  transform: scale(1.04);
}
.kanji-watermark {
  position: absolute;
  right: 14px;
  bottom: 8px;
  font-family: var(--font-kanji);
  font-size: 38px;
  line-height: 1;
  color: rgba(255, 85, 0, 0.32);
  text-shadow: 0 2px 8px rgba(0,0,0,0.85);
  pointer-events: none;
}

/* ---------- Interactive Project Banner Slideshow ---------- */
.thumb.has-slideshow {
  position: relative;
  overflow: hidden;
  user-select: none;
}
.slideshow-track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1);
  transition: opacity 0.55s ease, transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.slide-img.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}
.card:hover .slide-img.active {
  transform: scale(1.04);
}
.slideshow-hud {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
.slideshow-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(9, 9, 14, 0.88);
  border: 1px solid rgba(255, 85, 0, 0.45);
  backdrop-filter: blur(6px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #ff9d5c;
  font-weight: 600;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
}
.slideshow-live-pip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff5500;
  box-shadow: 0 0 8px #ff5500;
  animation: pulsePip 1.8s infinite ease-in-out;
}
@keyframes pulsePip {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.65); }
}
.slide-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(9, 9, 14, 0.82);
  border: 1px solid rgba(255, 85, 0, 0.45);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.2s, border-color 0.2s, transform 0.2s, color 0.2s;
  backdrop-filter: blur(4px);
  padding: 0;
}
.slide-arrow.prev-slide { left: 10px; }
.slide-arrow.next-slide { right: 10px; }
.thumb.has-slideshow:hover .slide-arrow,
.thumb.has-slideshow:focus-within .slide-arrow {
  opacity: 1;
}
.slide-arrow:hover {
  background: var(--obito-orange);
  border-color: var(--obito-orange);
  color: #09090d;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 14px rgba(255, 85, 0, 0.65);
}
.slide-arrow:active {
  transform: translateY(-50%) scale(0.94);
}
@media (hover: none) {
  .slide-arrow { opacity: 0.88; }
}
.slideshow-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(9, 9, 14, 0.78);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
}
.slide-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.slide-dot:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: scale(1.25);
}
.slide-dot.active {
  width: 20px;
  border-radius: 999px;
  background: var(--obito-orange);
  box-shadow: 0 0 8px rgba(255, 85, 0, 0.85);
}

.card-body {
  padding: 20px 24px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.seal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(230, 0, 18, 0.24);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 4px 12px;
  text-transform: uppercase;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.seal-badge.is-flagship {
  background: linear-gradient(90deg, var(--obito-orange), var(--red));
  color: var(--white);
}
.seal-badge .badge-svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.card:hover .seal-badge .rinne-sharingan-svg .rinne-tomoe-orbit {
  animation-duration: 8s;
}
.card:hover .seal-badge .rinnegan-svg .rinnegan-ripples {
  animation-duration: 1.8s;
}
.card:hover .seal-badge .tobi-mask-svg {
  animation-duration: 1.8s;
}

.lang-slash {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--obito-gold);
}
.repo-stars {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--obito-gold);
}
.star-shuriken {
  width: 14px;
  height: 14px;
  color: var(--obito-gold);
}

.card h3 {
  font-family: var(--font-naruto);
  font-weight: 400;
  font-size: clamp(20px, 2vw, 25px);
  letter-spacing: 0.05em;
  line-height: 1.15;
  margin-bottom: 6px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card h3 em {
  font-style: normal;
  color: var(--obito-orange);
}
.uchiha-live-seal .cloud-mini {
  width: 22px;
  height: 14px;
}

.card-subtitle {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.card p {
  font-size: 15px;
  line-height: 1.55;
  color: #dedad2;
  flex: 1;
  margin-bottom: 14px;
}

.tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}
.blade-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 85, 0, 0.14);
  border: 1px solid rgba(255, 85, 0, 0.28);
  color: #eae6de;
  padding: 4px 11px;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.blade-tag .tag-icon {
  width: 11px;
  height: 11px;
  color: var(--obito-orange);
}

.card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 85, 0, 0.22);
}
.meta-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}
.jutsu-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(110deg, var(--obito-orange), var(--red));
  color: var(--white);
  padding: 8px 16px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: transform 0.18s, filter 0.18s;
}
.jutsu-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
}
.jutsu-btn.secondary-cta, .jutsu-btn.scroll-cta {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
}
.jutsu-btn.secondary-cta:hover, .jutsu-btn.scroll-cta:hover {
  background: var(--white);
  color: var(--black);
}
.jutsu-btn.scroll-cta {
  margin-left: auto;
}
.jutsu-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--obito-orange);
}

#repo-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-size: 12.5px;
  color: var(--muted);
}
#repo-status .status-eye {
  width: 16px;
  height: 16px;
}

.grid-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-naruto);
  font-weight: 400;
  font-size: clamp(17px, 1.8vw, 22px);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 8px 0 16px;
  color: var(--white);
}
.grid-label .bar {
  display: inline-block;
  width: 28px;
  height: 5px;
  background: linear-gradient(90deg, var(--red), var(--obito-orange));
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
}

/* ---------- SKILLS SCREEN: SHINOBI DOJO STAGE + 4 ELEMENTAL SCROLLS ---------- */
.mario-arcade-shell {
  background: linear-gradient(145deg, rgba(14, 12, 20, 0.95), rgba(7, 7, 12, 0.97));
  border: 1px solid rgba(255, 85, 0, 0.32);
  border-left: 4px solid var(--obito-orange);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  padding: 18px 22px;
  margin-bottom: 32px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.7);
}
.mario-hud-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.mario-stats {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.mario-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mario-stats span strong {
  color: var(--obito-gold);
  font-family: var(--font-naruto);
  font-weight: 400;
  letter-spacing: 0.06em;
  margin-left: 2px;
}
.mario-actions {
  display: flex;
  gap: 10px;
}
.mario-ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(110deg, var(--obito-orange), var(--red));
  color: var(--white);
  border: none;
  padding: 7px 16px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: all 0.18s;
}
.mario-ctrl-btn:hover, .mario-ctrl-btn.active {
  background: var(--white);
  color: var(--black);
}
.mario-ctrl-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.mario-canvas-wrap {
  position: relative;
  width: 100%;
  height: 264px;
  overflow: hidden;
  background: #07070c;
  cursor: pointer;
  border: 1px solid rgba(255, 85, 0, 0.35);
}
#mario-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.mario-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.dpad-group {
  display: flex;
  gap: 8px;
}
.arcade-pad-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border: 1px solid rgba(255, 85, 0, 0.4);
  padding: 7px 16px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: background 0.15s, color 0.15s;
}
.arcade-pad-btn:hover, .arcade-pad-btn:active {
  background: var(--obito-orange);
  color: var(--black);
}
.arcade-pad-btn.jump-btn {
  background: rgba(230, 0, 18, 0.28);
  border-color: var(--red);
}

#mario-inspector {
  flex: 1;
  min-width: 260px;
  background: linear-gradient(90deg, rgba(255, 85, 0, 0.12), transparent);
  border-left: 3px solid var(--obito-orange);
  padding: 8px 14px;
  font-size: 13.5px;
  color: #e4e0d8;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.insp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--obito-orange);
  color: var(--black);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  padding: 3px 10px;
  text-transform: uppercase;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.insp-svg { width: 13px; height: 13px; }
.insp-used {
  margin-left: auto;
  color: var(--obito-gold);
  font-size: 12px;
  font-weight: 700;
}

/* 4 Elemental Shinobi Mastery Scrolls */
#skills-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr));
  gap: 28px;
  padding-bottom: 48px;
}

/* Makimono Scroll Container */
.shinobi-scroll-group {
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.75);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s;
  contain: layout;
}
.shinobi-scroll-group:hover {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.85), 0 0 16px var(--scroll-glow, rgba(255, 85, 0, 0.22));
}

/* Lacquered Scroll Spindles / Rollers with Gold Knobs */
.scroll-roller {
  height: 10px;
  background: linear-gradient(180deg, #422818 0%, #170d08 30%, #5c351f 55%, #1f110a 82%, #0c0604 100%);
  position: relative;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.7);
  z-index: 2;
}
.scroll-roller::before,
.scroll-roller::after {
  content: '';
  position: absolute;
  top: -2px;
  width: 10px;
  height: 14px;
  background: linear-gradient(180deg, #ffeaa7 0%, #d4a017 30%, #ffd700 70%, #8c6505 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.8), inset 0 1px 1px rgba(255, 255, 255, 0.6);
}
.scroll-roller::before {
  left: -5px;
  border-radius: 3px 0 0 3px;
}
.scroll-roller::after {
  right: -5px;
  border-radius: 0 3px 3px 0;
}

.top-roller {
  border-bottom: 1px solid rgba(0, 0, 0, 0.6);
}
.bottom-roller {
  border-top: 1px solid rgba(0, 0, 0, 0.6);
}

/* Washi Parchment & Cyber Glass Surface */
.scroll-parchment {
  position: relative;
  background:
    radial-gradient(ellipse at 88% 12%, var(--scroll-glow, rgba(255, 85, 0, 0.12)) 0%, transparent 50%),
    radial-gradient(ellipse at 12% 90%, rgba(0, 0, 0, 0.5) 0%, transparent 60%),
    linear-gradient(168deg, rgba(16, 13, 23, 0.96) 0%, rgba(9, 8, 14, 0.98) 100%);
  border-left: 3px solid var(--scroll-accent, var(--obito-orange));
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 22px 24px;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
}

/* Corner brackets decorative accent */
.scroll-parchment::before,
.scroll-parchment::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: none;
  opacity: 0.35;
}
.scroll-parchment::before {
  top: 6px;
  left: 6px;
  border-top: 2px solid var(--scroll-accent, var(--obito-orange));
  border-left: 2px solid var(--scroll-accent, var(--obito-orange));
}
.scroll-parchment::after {
  bottom: 6px;
  right: 6px;
  border-bottom: 2px solid var(--scroll-accent, var(--obito-orange));
  border-right: 2px solid var(--scroll-accent, var(--obito-orange));
}

/* Shinobi Summoning Seal & Watermark */
.scroll-watermark-wrap {
  position: absolute;
  right: 12px;
  top: 8px;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
}
.scroll-seal-ring {
  position: absolute;
  inset: 0;
  border: 1.5px dashed var(--scroll-accent, var(--obito-orange));
  border-radius: 50%;
  opacity: 0.16;
  animation: sharinganSlowSpin 36s linear infinite;
}
.scroll-watermark {
  font-family: var(--font-kanji);
  font-size: 78px;
  line-height: 1;
  color: var(--scroll-accent, var(--obito-orange));
  opacity: 0.16;
  text-shadow: 0 0 24px var(--scroll-accent, var(--obito-orange));
  transition: opacity 0.3s, transform 0.3s;
}
.shinobi-scroll-group:hover .scroll-watermark {
  opacity: 0.28;
  transform: scale(1.05);
}

/* Scroll Header */
.scroll-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}
.scroll-head::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 80px;
  height: 1px;
  background: var(--scroll-accent, var(--obito-orange));
  box-shadow: 0 0 8px var(--scroll-accent, var(--obito-orange));
}
.scroll-seal-frame {
  position: relative;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(230, 0, 18, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 12px rgba(230, 0, 18, 0.3);
  flex-shrink: 0;
}
.scroll-seal-orbit {
  position: absolute;
  inset: -2px;
  border: 1px dashed rgba(255, 85, 0, 0.4);
  border-radius: 50%;
  animation: sharinganSlowSpin 18s linear infinite;
}
.scroll-seal .scroll-mangekyo {
  width: 26px;
  height: 26px;
}
.scroll-titles {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.scroll-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.world-tag {
  display: inline-block;
  color: var(--scroll-accent, var(--obito-orange));
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.element-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1px 7px;
  border-radius: 3px;
  text-transform: uppercase;
}
.shinobi-scroll-group h3 {
  font-family: var(--font-naruto);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* Chakra Stream List & Nodes */
.chakra-streams-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chakra-skill-node {
  position: relative;
  background: linear-gradient(135deg, rgba(28, 22, 38, 0.94) 0%, rgba(18, 14, 25, 0.96) 45%, rgba(10, 8, 15, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid var(--scroll-accent, var(--obito-orange));
  border-radius: 4px;
  color: var(--white);
  padding: 11px 15px;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.22s cubic-bezier(.16, 1, .3, 1), background 0.22s, border-color 0.22s, box-shadow 0.22s;
  contain: layout style;
  will-change: transform;
}

/* Sheen sweep effect on hover */
.chakra-skill-node::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 80%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transform: skewX(-24deg);
  transition: left 0.55s ease;
  pointer-events: none;
}
.chakra-skill-node:hover::before {
  left: 180%;
}

.chakra-skill-node:hover {
  transform: translateX(5px) translateY(-1px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(32, 22, 35, 0.88) 45%, rgba(14, 11, 20, 0.98) 100%);
  border-color: rgba(255, 255, 255, 0.18);
  border-left-color: var(--obito-gold);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.65), 0 0 16px -2px var(--scroll-glow, rgba(255, 85, 0, 0.3));
}

.chakra-skill-node.unlocked {
  border-left: 3px solid var(--obito-gold);
  border-color: rgba(255, 170, 0, 0.45);
  background: linear-gradient(135deg, rgba(255, 170, 0, 0.16) 0%, rgba(36, 24, 28, 0.9) 45%, rgba(14, 10, 16, 0.98) 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 20px rgba(255, 170, 0, 0.35), inset 0 0 12px rgba(255, 170, 0, 0.08);
}
.chakra-skill-node.unlocked .csn-name {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 170, 0, 0.5);
}
.chakra-skill-node.unlocked .csn-seal-wrap {
  box-shadow: 0 0 10px rgba(255, 170, 0, 0.6);
  border-color: rgba(255, 170, 0, 0.5);
}
.chakra-skill-node.unlocked .katana-gauge .fill {
  background: linear-gradient(90deg, #e60012 0%, var(--obito-orange) 40%, var(--obito-gold) 85%, #ffffff 100%);
  box-shadow: 0 0 14px rgba(255, 170, 0, 0.8), inset 0 1px 1px #ffffff;
}
.chakra-skill-node.unlocked .fill-spark {
  box-shadow: 0 0 10px #ffffff, 0 0 18px var(--obito-gold);
}

/* Header line inside Node */
.csn-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
}
.csn-seal-wrap {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(230, 0, 18, 0.3);
}
.csn-seal .seal-svg,
.csn-tech-logo {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.csn-tech-logo svg {
  width: 16px;
  height: 16px;
  display: block;
}
.csn-name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f6f4ef;
  flex: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Jutsu Rank Badges */
.csn-rank-pill {
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.csn-rank-pill.rank-s {
  color: #ffd700;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 136, 0, 0.12) 100%);
  border: 1px solid rgba(255, 215, 0, 0.55);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.35);
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}
.csn-rank-pill.rank-a {
  color: #ff5252;
  background: linear-gradient(135deg, rgba(255, 82, 82, 0.18) 0%, rgba(230, 0, 18, 0.1) 100%);
  border: 1px solid rgba(255, 82, 82, 0.5);
  box-shadow: 0 0 10px rgba(255, 82, 82, 0.3);
  text-shadow: 0 0 6px rgba(255, 82, 82, 0.4);
}
.csn-rank-pill.rank-b {
  color: #ffa502;
  background: rgba(255, 165, 2, 0.14);
  border: 1px solid rgba(255, 165, 2, 0.45);
}
.csn-rank-pill.rank-c {
  color: #70a1ff;
  background: rgba(112, 161, 255, 0.14);
  border: 1px solid rgba(112, 161, 255, 0.45);
}

/* Chakra XP Capsule */
.csn-xp-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 170, 0, 0.28);
  padding: 3px 9px;
  border-radius: 3px;
}
.csn-xp {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--obito-gold);
  text-shadow: 0 0 8px rgba(255, 170, 0, 0.4);
}
.csn-xp-label {
  font-family: var(--font-body);
  font-size: 8.5px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.14em;
}

/* Katana Blade Chakra Conduit */
.katana-gauge {
  height: 6px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  margin-bottom: 7px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
}
/* Subtle conduit notch division lines */
.katana-gauge::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1px), rgba(0, 0, 0, 0.5) calc(10% - 1px), rgba(0, 0, 0, 0.5) 10%);
  z-index: 2;
  pointer-events: none;
}
.katana-gauge .fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--red-deep, #8f000b) 0%, var(--red) 35%, var(--obito-orange) 75%, var(--obito-gold) 100%);
  box-shadow: 0 0 10px rgba(255, 85, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.5);
  transition: width 0.75s cubic-bezier(.16, 1, .3, 1);
  overflow: visible;
}
/* Electric spark glint at the cutting edge */
.fill-spark {
  position: absolute;
  right: -1px;
  top: -2px;
  bottom: -2px;
  width: 4px;
  background: #ffffff;
  border-radius: 2px;
  box-shadow: 0 0 6px #ffffff, 0 0 12px var(--obito-gold);
}

/* Lore & Mission Project Deployments */
.csn-lore {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
}
.csn-desc {
  color: #cfcbbe;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  flex: 1;
  min-width: 180px;
}
.csn-proj {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 85, 0, 0.08);
  border: 1px solid rgba(255, 85, 0, 0.25);
  color: var(--obito-orange);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.02em;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  white-space: nowrap;
}
.chakra-skill-node:hover .csn-proj {
  background: rgba(255, 170, 0, 0.14);
  border-color: rgba(255, 170, 0, 0.45);
  color: var(--obito-gold);
}
.mini-kunai { width: 12px; height: 12px; }

/* ---------- ABOUT & CONTACT SCREENS (PROPORTIONAL 2-COLUMN DOSSIERS) ---------- */
.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.35fr);
  gap: 28px;
  align-items: start;
  padding-bottom: 40px;
}

.paper {
  position: relative;
  background: linear-gradient(155deg, rgba(14, 12, 20, 0.96) 0%, rgba(8, 8, 13, 0.98) 100%);
  color: var(--white);
  border: 1px solid rgba(255, 85, 0, 0.22);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 4px solid var(--obito-orange);
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  padding: 26px 30px;
  font-size: 16px;
  line-height: 1.65;
  box-shadow: 0 14px 32px rgba(0,0,0,.7);
  contain: layout style;
}
.paper p {
  margin-bottom: 16px;
  color: #dedad2;
}
.paper p:last-child {
  margin-bottom: 0;
}
.paper strong { color: var(--obito-orange); }
.paper .stamp {
  display: inline-block;
  background: rgba(255, 85, 0, 0.16);
  border: 1px solid rgba(255, 85, 0, 0.35);
  color: var(--obito-gold);
  padding: 1px 9px;
  font-weight: 700;
  font-size: 14.5px;
}
.paper p a,
.paper article a {
  color: var(--obito-orange);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1.5px solid rgba(255,85,0,0.45);
}
.paper p a:hover,
.paper article a:hover { color: var(--white); border-color: var(--white); }

.about-profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
}
.about-photo {
  width: 100%;
  max-width: 220px;
  margin-bottom: 16px;
  background: #0d0d14;
  border: 2px solid rgba(255, 85, 0, 0.5);
  padding: 6px;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}
.about-photo img { width: 100%; height: auto; display: block; }
.about-photo figcaption {
  margin-top: 8px;
  font-family: var(--font-naruto);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--obito-gold);
}
.about-quick-meta {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 20px;
  text-align: left;
  font-size: 13.5px;
  color: var(--muted);
}
.about-quick-meta div {
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 2px solid var(--obito-orange);
}
.about-quick-meta strong {
  color: var(--white);
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 14px;
  border: 1px solid rgba(255, 85, 0, 0.35);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: all 0.18s;
}
.contact-chip:hover {
  background: linear-gradient(110deg, var(--obito-orange), var(--red));
  color: var(--white);
  transform: translateY(-2px);
}

.paper a.cv-btn,
.cv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  background: linear-gradient(110deg, var(--obito-orange), var(--red));
  color: #ffffff !important;
  border: none !important;
  border-bottom: none !important;
  font-family: var(--font-naruto);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 12px 24px;
  cursor: pointer;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: all 0.18s;
  box-shadow: 0 4px 14px rgba(230, 0, 18, 0.35);
}
.paper a.cv-btn span,
.cv-btn span {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}
.cv-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
}

#contact-form { width: 100%; }
.form-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-naruto);
  font-size: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
  color: var(--white);
}
.field { display: block; margin-bottom: 16px; }
.field span {
  display: block;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11.5px;
  color: var(--obito-orange);
  margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 3px solid var(--obito-orange);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.18s, background 0.18s;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--obito-gold);
  background: rgba(255, 85, 0, 0.08);
}
.field textarea { resize: vertical; min-height: 96px; }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
#form-status {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 12.5px;
  text-transform: uppercase;
  color: var(--obito-gold);
}

/* ============ SHINOBI SCROLL DOSSIER MODAL ============ */
#dossier-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(5, 5, 10, 0.84);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#dossier-modal.open { display: flex; }
.dossier-card {
  background: linear-gradient(150deg, #14111d 0%, #09090f 100%);
  color: var(--white);
  border: 1px solid rgba(255, 85, 0, 0.4);
  border-left: 4px solid var(--obito-orange);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  box-shadow: 0 24px 60px rgba(0,0,0,0.92);
  max-width: 680px;
  width: 100%;
  max-height: 88dvh;
  overflow-y: auto;
  padding: 28px 32px;
  position: relative;
}
.dossier-close {
  position: absolute;
  top: 18px;
  right: 22px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  color: var(--white);
  border: 1px solid rgba(230, 0, 18, 0.5);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  cursor: pointer;
}
.dossier-close:hover { background: var(--red); }
.dossier-thumb {
  width: 100%;
  height: 195px;
  object-fit: cover;
  margin: 12px 0;
  border: 1px solid rgba(255, 85, 0, 0.3);
}
.dossier-thumb.has-slideshow {
  position: relative;
  overflow: hidden;
  user-select: none;
  background: #0d0d12;
}
.dossier-thumb.has-slideshow .slide-arrow {
  opacity: 0.92;
}
.dossier-highlights {
  list-style: none;
  margin: 12px 0 18px 0;
  line-height: 1.55;
  font-size: 15px;
  color: #dcd9d2;
}
.dossier-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.dossier-highlights .li-kunai {
  margin-top: 4px;
  color: var(--obito-orange);
}
.hs-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============ BOTTOM HUD & SUB-SCREEN MOBILE DOCK ============ */
#hud-bottom {
  height: 46px;
  min-height: 46px;
  padding: 0 5vw;
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 10;
  background: linear-gradient(0deg, rgba(6, 6, 10, 0.9) 0%, rgba(6, 6, 10, 0) 100%);
}
#hud-bottom .key {
  display: inline-block;
  background: rgba(255, 85, 0, 0.2);
  border: 1px solid rgba(255, 85, 0, 0.45);
  color: var(--obito-gold);
  padding: 2px 8px;
  margin-right: 6px;
  font-family: var(--font-body);
  font-weight: 700;
}
.hud-scene-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--obito-orange);
  font-weight: 700;
}
#hud-scene-kanji {
  font-family: var(--font-kanji);
  font-size: 15px;
  color: var(--white);
}

#mobile-nav {
  display: none;
  background: rgba(9, 9, 13, 0.96);
  border-top: 1px solid var(--slash-border);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  justify-content: space-around;
  align-items: center;
  gap: 4px;
  z-index: 20;
}
body[data-screen="home"] #mobile-nav {
  display: none !important;
}
.mob-nav-btn {
  flex: 1;
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 8px 4px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.mob-nav-btn.active {
  background: linear-gradient(110deg, var(--red), var(--obito-orange));
  color: var(--white);
}

/* ============ CUSTOM CURSOR ============ */
#cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  z-index: 9999;
  pointer-events: none;
  display: none;
  will-change: transform;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-image: url("../assets/cursors/normal.png");
  margin: -3px 0 0 -4px;
}
#cursor.link {
  background-image: url("../assets/cursors/link.png");
  margin: -6px 0 0 -6px;
  filter: drop-shadow(0 0 8px rgba(255, 85, 0, 0.6));
}
#cursor.link::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 85, 0, 0.75);
  box-shadow: 0 0 10px rgba(230, 0, 18, 0.45);
  animation: cursorKamuiRing 3s linear infinite;
  pointer-events: none;
}
@keyframes cursorKamuiRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@media (pointer: fine) and (hover: hover) {
  body.cursor-on, body.cursor-on * { cursor: none !important; }
}
@media (pointer: coarse), (hover: none) {
  #cursor {
    display: none !important;
  }
}

/* ============ PROJECT FILTER FLEXIBILITY ============ */
#feat-grid:has(.card:only-child) {
  display: flex;
  justify-content: flex-start;
}
#feat-grid:has(.card:only-child) .card {
  max-width: 680px;
  width: 100%;
}

/* ============ RESPONSIVE / MOBILE OPTIMIZATIONS ============ */
@media (max-width: 900px) {
  .top-nav { display: none; }
  .card.feat.flagship-card { grid-template-columns: 1fr; }
  .card.feat.flagship-card .thumb { min-height: 190px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   DEDICATED MOBILE PHONE SYSTEM (360px - 430px across all aspect ratios)
   - Tested on iPhone SE (16:9), Galaxy S24 (20:9), iPhone 14/15/16 Pro,
     Pixel 7/8/9, and iPhone Pro Max.
   - Preserves Full Desktop Mode when user triggers "Desktop Site" (>=980px).
   ===================================================================== */
@media (max-width: 768px) {
  #cursor { display: none !important; }

  /* Top HUD on Mobile */
  #hud-top {
    height: calc(52px + env(safe-area-inset-top, 0px));
    min-height: 52px;
    padding: env(safe-area-inset-top, 0px) 4vw 0;
  }
  .hud-location,
  .hud-clock-pill {
    display: none !important;
  }
  .hud-brand {
    gap: 8px;
  }
  .hud-brand .brand-badge {
    width: 24px;
    height: 24px;
  }
  .brand-logo-text {
    font-size: 14px;
  }
  .hud-music-pill {
    padding: 4px 8px;
    font-size: 9.5px;
    gap: 5px;
  }
  #hud-bottom {
    display: none !important;
  }

  /* Screens & Sub-containers */
  .screen {
    padding: 14px 4vw calc(68px + env(safe-area-inset-bottom, 0px));
  }
  .sub-top-bar {
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .sub-eyebrow {
    font-size: 9px;
    letter-spacing: 0.18em;
  }
  .screen-head {
    font-size: 24px;
    letter-spacing: 0.05em;
  }
  .sub-kanji-seal {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  .back-hint {
    padding: 5px 10px;
  }
  .back-hint span {
    font-size: 10.5px;
  }

  /* ---------- HOME SCREEN (MOBILE CINEMATIC VIEW) ---------- */
  body[data-screen="home"] #bg-vignette {
    background:
      linear-gradient(180deg,
        rgba(6, 6, 10, 0.1) 0%,
        rgba(6, 6, 10, 0.25) 28%,
        rgba(6, 6, 10, 0.72) 58%,
        rgba(6, 6, 10, 0.94) 80%,
        rgba(6, 6, 10, 1) 100%),
      radial-gradient(circle at 65% 25%, transparent 28%, rgba(5, 5, 9, 0.55) 100%) !important;
  }

  #bg-video-stage,
  .menu-art {
    object-position: 65% 15% !important;
  }

  #screen-home.active {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 5vw calc(20px + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
  }
  .home-main {
    width: 100%;
    max-width: 100%;
    align-items: flex-start;
    padding-bottom: 4px;
  }
  #intro-eyebrow {
    font-size: 11px;
    letter-spacing: 0.22em;
    margin-bottom: 8px;
  }
  #intro-eyebrow .eyebrow-line {
    width: 24px;
  }
  #big-name {
    margin-bottom: 12px;
  }
  #big-name .hero-name-line {
    font-size: clamp(36px, 11vw, 54px);
    line-height: 1.02;
  }
  #tagline {
    margin-bottom: 16px;
    padding: 5px 14px 5px 10px;
    clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  }
  #tagline .pranam-text {
    font-size: 17px;
  }
  #menu {
    width: 100%;
    gap: 8px;
  }
  .menu-item {
    width: 100%;
    padding: 10px 16px 10px 14px;
    min-height: 46px;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 100%, 0 100%);
    background: linear-gradient(90deg, rgba(14, 12, 20, 0.88) 0%, rgba(14, 12, 20, 0.55) 85%, transparent 100%);
  }
  .menu-item .menu-label {
    font-size: 18px;
  }
  .menu-item .menu-rank {
    font-size: 15px;
    min-width: 20px;
  }

  /* Compact phones height override (e.g. iPhone SE / 667px height) */
  @media (max-height: 720px) {
    #big-name .hero-name-line { font-size: 34px; }
    #big-name { margin-bottom: 8px; }
    #tagline { margin-bottom: 10px; padding: 4px 10px; }
    #tagline .pranam-text { font-size: 15px; }
    #menu { gap: 6px; }
    .menu-item { padding: 8px 12px; min-height: 40px; }
    .menu-item .menu-label { font-size: 16px; }
  }

  /* ---------- SKILLS SCREEN ON MOBILE ---------- */
  .mario-arcade-shell {
    margin-bottom: 16px;
  }
  .mario-hud-bar {
    padding: 8px 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .mario-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
    font-size: 9.5px;
  }
  .mario-actions {
    display: flex;
    gap: 6px;
  }
  .mario-ctrl-btn {
    flex: 1;
    padding: 5px 8px;
    font-size: 10px;
    justify-content: center;
    min-height: 34px;
  }
  .mario-canvas-wrap {
    height: clamp(140px, 34vw, 175px);
  }
  .mario-bottom-bar {
    padding: 8px 10px;
    flex-direction: column;
    gap: 8px;
  }
  .dpad-group {
    width: 100%;
    display: flex;
    gap: 6px;
  }
  .arcade-pad-btn {
    flex: 1;
    min-height: 44px;
    padding: 8px 4px;
    font-size: 11px;
    justify-content: center;
  }
  #mario-inspector {
    width: 100%;
    font-size: 11px;
    padding: 6px 8px;
    min-height: unset;
    line-height: 1.35;
  }

  /* Mobile Jutsu Scrolls */
  #skills-body {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-bottom: 24px;
  }
  .scroll-roller {
    height: 9px;
  }
  .scroll-roller::before {
    left: -2px;
    width: 8px;
    height: 11px;
    top: -1px;
  }
  .scroll-roller::after {
    right: -2px;
    width: 8px;
    height: 11px;
    top: -1px;
  }
  .scroll-parchment {
    padding: 16px 14px;
  }
  .scroll-watermark-wrap {
    width: 70px;
    height: 70px;
    right: 6px;
    top: 4px;
  }
  .scroll-watermark {
    font-size: 54px;
  }
  .scroll-head {
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
  }
  .scroll-seal-frame {
    width: 32px;
    height: 32px;
  }
  .scroll-seal .scroll-mangekyo {
    width: 22px;
    height: 22px;
  }
  .world-tag {
    font-size: 9px;
  }
  .element-tag {
    font-size: 8.5px;
    padding: 1px 5px;
  }
  .shinobi-scroll-group h3 {
    font-size: 17px;
  }
  .chakra-streams-list {
    gap: 9px;
  }
  .chakra-skill-node {
    padding: 10px 12px;
    min-height: 44px;
  }
  .csn-name {
    font-size: 13.5px;
  }
  .csn-rank-pill {
    font-size: 8.5px;
    padding: 1.5px 5px;
  }
  .csn-xp-pill {
    font-size: 11.5px;
    padding: 2px 6px;
  }
  .katana-gauge {
    height: 5px;
    margin-bottom: 6px;
  }
  .csn-lore {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .csn-desc {
    font-size: 11.5px;
    min-width: 100%;
    line-height: 1.35;
  }
  .csn-proj {
    font-size: 10px;
    padding: 1.5px 6px;
  }

  /* ---------- PROJECTS SCREEN ON MOBILE ---------- */
  .projects-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 14px;
  }
  .filter-pills {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .filter-pills::-webkit-scrollbar {
    display: none;
  }
  .filter-pill {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 11px;
    padding: 6px 12px;
    min-height: 36px;
  }
  .card.feat.flagship-card {
    grid-template-columns: 1fr;
  }
  .card.feat.flagship-card .thumb {
    min-height: 180px;
    height: 180px;
  }
  .card.feat .card-content {
    padding: 16px 14px;
  }
  .card-title {
    font-size: 19px;
  }
  .card-summary {
    font-size: 13px;
    line-height: 1.5;
  }
  .card-actions {
    flex-direction: column;
    gap: 8px;
  }
  .card-actions .cv-btn,
  .card-actions .card-action-btn {
    width: 100%;
    min-height: 42px;
    justify-content: center;
  }

  /* ---------- ABOUT SCREEN ON MOBILE ---------- */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .about-photo img {
    max-width: 170px;
    margin: 0 auto;
    display: block;
  }
  .about-quick-meta {
    gap: 8px;
  }
  .about-quick-meta div {
    font-size: 12.5px;
  }
  .paper {
    padding: 18px 14px;
    font-size: 14.5px;
    line-height: 1.6;
  }
  .creative-pillars {
    margin-top: 16px;
  }
  .pillars-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
  .pillar-card {
    padding: 12px;
  }

  /* ---------- CONTACT SCREEN ON MOBILE ---------- */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .contact-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .contact-chip {
    min-height: 44px;
    font-size: 12px;
    justify-content: center;
  }
  .field span {
    font-size: 11px;
  }
  .field input,
  .field textarea {
    font-size: 16px !important; /* Prevents auto zoom in iOS Safari */
    min-height: 44px;
    padding: 10px 12px;
  }
  .form-send {
    width: 100%;
    min-height: 48px;
    font-size: 15px;
    justify-content: center;
  }

  /* ---------- MOBILE BOTTOM NAVIGATION BAR ---------- */
  body:not([data-screen="home"]) #mobile-nav {
    display: flex;
  }
  #mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(52px + env(safe-area-inset-bottom, 0px));
    padding: 0 4px env(safe-area-inset-bottom, 0px);
    background: rgba(9, 9, 13, 0.96);
    border-top: 1px solid rgba(255, 85, 0, 0.35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    justify-content: space-around;
    align-items: center;
    gap: 3px;
    z-index: 100;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.6);
  }
  .mob-nav-btn {
    flex: 1;
    height: 42px;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    background: transparent;
    border: none;
    border-radius: 4px;
    transition: color 0.18s, background 0.18s;
    cursor: pointer;
    clip-path: none;
  }
  .mob-nav-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(230, 0, 18, 0.85) 0%, rgba(255, 85, 0, 0.85) 100%);
    box-shadow: 0 2px 10px rgba(230, 0, 18, 0.4);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  .sharingan-tomoe-wheel,
  .mangekyo-pinwheel {
    animation: none !important;
  }
}
