:root {
  --bg-dark: #0f0f11;
  --bg-section: #141416;
  --bg-accent: #1c1c20;
  --accent: #00ffe7;
  --accent-dark: #0fffc3;
  --accent-alt: #4fc3ff;
  --text-light: #e6f1ff;
  --text-muted: #90a8c7;
  --projard: linear-gradient(145deg, #0e1b2f, #0d192c);
  --prover: rgba(10, 22, 49, 0.85);
  --prover-shad: 0 25px 60px #39d8ff88;
  --promodal: rgba(10, 22, 49, 0.8);
  --promodal-overlay: radial-gradient(circle at center, rgba(0, 255, 231, 0.03), rgba(0, 0, 0, 0.7));
  --promodal-contentbg: linear-gradient(160deg, rgba(14, 22, 33, 0.95), rgba(10, 20, 30, 0.95));
  --promodal-contentborder: 1px solid rgba(79, 195, 255, 0.15);
  --promodal-contentshadow: 0 15px 40px rgba(0, 255, 231, 0.25);
  --promodal-ifrborder: 1px solid rgba(0, 255, 231, 0.2);
  --promodal-ifrshadow: 0 0 20px rgba(0, 255, 231, 0.15);

  --connecticon: #fff;
  --radius: 14px;
  --shadow-light: 0 12px 28px rgba(0, 255, 231, 0.2);
  --transition-fast: 0.3s cubic-bezier(0.65, 0, 0.35, 1);
  --top-bg: linear-gradient(-45deg, #14263d, #0e1621, #1a2e4d, #0e1621);

  --selection-bg: #ffffff;
  --selection-text: #000000;
}

html.light-mode {
  --bg-dark: #f4f5f7;
  --bg-section: #eef0f3;
  --bg-accent: #e4e7eb;
  --accent: #0a192f;
  --accent-dark: #0f2a4a;
  --accent-alt: #2563eb;
  --text-light: #111827;
  --text-muted: #4b5563;
  --projard: linear-gradient(145deg, #ffffff, #f0f2f5);
  --prover: rgba(255, 255, 255, 0.95);
  --prover-shad: 0 25px 60px rgba(10, 25, 47, 0.15);

  --promodal: rgba(255, 255, 255, 0.85);
  --promodal-overlay: radial-gradient(circle at center, rgba(10, 25, 47, 0.05), rgba(0, 0, 0, 0.1));
  --promodal-contentbg: linear-gradient(160deg, rgba(250, 250, 250, 0.96), rgba(245, 245, 245, 0.95));
  --promodal-contentborder: 1px solid rgba(10, 25, 47, 0.15);
  --promodal-contentshadow: 0 15px 40px rgba(10, 25, 47, 0.2);
  --promodal-ifrborder: 1px solid rgba(10, 25, 47, 0.2);
  --promodal-ifrshadow: 0 0 20px rgba(10, 25, 47, 0.12);

  --connecticon: #1a0700;
  --shadow-light: 0 12px 28px rgba(10, 25, 47, 0.12);
  --top-bg: linear-gradient(-45deg, #e2e8f0, #f8fafc, #cbd5e1, #f8fafc);
  background: var(--bg-dark);
  color: var(--text-light);


  --selection-bg: #000000;
  --selection-text: #ffffff;
}

::selection {
  background: var(--selection-bg);
  color: var(--selection-text);
}

/* Typography breathing room */
.modal-description,
.haiku-container {
  line-height: 1.8;
  letter-spacing: 0.3px;
}

.modal-title {
  letter-spacing: -1px;
}

.btn-primary {
  letter-spacing: 1px;
}

html.light-mode .custom-cursor {
  mix-blend-mode: normal;
  background: conic-gradient(from 0deg, #000000, #333333, #555555, #000000);
  box-shadow: 0 0 8px #00000055;
}

html.light-mode .custom-cursor.active {
  background: conic-gradient(from 0deg, #00ffe7, #4fc3ff, #0fffc3, #00ffe7);
  mix-blend-mode: difference;
  box-shadow: 0 0 24px #00ffe7, 0 0 48px #4fc3ff88;
  transform: translate(-50%, -50%) rotate(45deg);
}

html.light-mode .cursor-particle {
  background: radial-gradient(circle, #000000, transparent 60%);
  mix-blend-mode: darken;
}

::-webkit-scrollbar {
  display: none;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: auto;
  transition: background 0.4s ease, color 0.4s ease;
  font-family: 'Outfit', sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  scroll-behavior: smooth;
  overflow-x: hidden;
  /* cursor: none; */
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  background: conic-gradient(from 0deg, #00ffe7, #4fc3ff, #0fffc3, #00ffe7);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  mix-blend-mode: difference;
  box-shadow: 0 0 12px #00ffe7, 0 0 24px #4fc3ff55;
  transition: width 0.2s ease, height 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.custom-cursor.active {
  width: 48px;
  height: 48px;
  box-shadow: 0 0 24px #00ffe7, 0 0 48px #4fc3ff88;
  transform: translate(-50%, -50%) rotate(45deg);
}

.cursor-particle {
  position: fixed;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(circle, #00ffe7, transparent 60%);
  opacity: 0;
}

.cursor-light {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(circle, rgba(0, 255, 231, 0.08) 0%, rgba(0, 255, 231, 0.03) 40%, transparent 70%);
  mix-blend-mode: screen;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

html.light-mode .cursor-light {
  background: radial-gradient(circle, rgba(10, 25, 47, 0.05) 0%, rgba(10, 25, 47, 0.02) 40%, transparent 70%);
  mix-blend-mode: multiply;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

header.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(14, 22, 33, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: var(--shadow-light);
}

header.site-header::after {
  content: "";
  position: absolute;
  bottom: -90px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 30px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.25;
  filter: blur(12px);
  pointer-events: none;
  z-index: -1;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 3rem;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
  background: rgba(10, 15, 25, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(0, 255, 255, 0.12);
  border-bottom: 1px solid rgba(0, 255, 255, 0.1);
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  animation: fadeDown 0.35s ease-out forwards;
  transform: translateY(30%);
  transition: all 0.3s ease;
}

@keyframes fadeDown {
  to {
    transform: translateY(0%);
    opacity: 1;
  }
}

.site-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #e6f1ff;
  letter-spacing: -1px;
  cursor: pointer;
  transition: transform 0.3s ease, text-shadow 0.3s ease;
  animation: neonPulse 2.8s infinite ease-in-out;
  transition: opacity 0.3s ease;
}

@keyframes neonPulse {

  0%,
  100% {
    text-shadow: 0 0 6px rgba(0, 255, 255, 0.5);
  }

  50% {
    text-shadow: 0 0 12px rgba(0, 255, 255, 0.9), 0 0 20px rgba(0, 255, 255, 0.4);
  }
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-title:hover {
  transform: scale(1.08);
  text-shadow: 0 0 12px rgba(0, 255, 255, 0.75);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links li a {
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  color: #fff;
  position: relative;
  padding: 5px 0;
  transition: all 0.3s ease;
  background-clip: text;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #00d4ff, #6effff);
  transition: width 0.35s ease;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
  border-radius: 2px;
}

.nav-links li a:hover::after {
  width: 100%;
}

.nav-links li a:hover {
  background: linear-gradient(90deg, #00d4ff, #6effff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.nav-links li a.active {
  color: #00d4ff;
  font-weight: 600;
  text-shadow: 0 0 6px rgba(0, 212, 255, 0.5);
}

.nav-links li a:focus {
  outline: 2px solid rgba(0, 255, 255, 0.6);
  outline-offset: 4px;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: #00d4ff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.7rem 2rem;
  }

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .horz {
    margin: auto;
    width: 50dvw;
    height: 0px;
    border: 0.5px dotted rgb(192, 192, 192);
  }

  .nav-links {
    position: absolute;
    top: 47px;
    left: 5px;
    right: 0;
    background: rgba(14, 22, 33, 0.95);
    flex-direction: column;
    align-items: flex-start;
    text-align: center;
    width: 97dvw;
    gap: 0.65rem;
    padding: 1.5rem 2rem;
    transform: translateY(0%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.5s ease, opacity 0.4s ease;
    z-index: 998;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
    box-shadow: 0 6px 20px rgba(0, 255, 255, 0.1);
    border-radius: 0 0 12px 12px;
  }

  .nav-links.open {
    transform: translateY(0%);
    opacity: 1;
    visibility: visible;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links li a {
    display: block;
    width: 100%;
    font-size: 1.2rem;
    padding: 0.8rem 0;
  }
}

.navbar.shrink {
  padding: 0.6rem 2rem;
  background: rgba(10, 15, 25, 0.95);
}

section {
  padding: 4rem 1.5rem;
  position: relative;
}

@media(min-width:768px) {
  section {
    padding: 6rem 3rem;
  }
}

.intro-section {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  background: var(--top-bg);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--accent);
  perspective: 1200px;
}

@keyframes gradientShift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.intro-section h1 {
  font-size: clamp(2.5rem, 4vw, 2.85rem);
  margin-bottom: 1rem;
}

.intro-section p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.5;
}

.intro-wrapper {
  width: 100%;
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.2s ease-out;
}

.project-card,
.intro-wrapper,
.intro-wrapper [data-depth] {
  will-change: transform;
}

.neon-outline {
  color: transparent;
  -webkit-text-stroke: 1.2px #00f5ff;
  position: relative;
  text-shadow: 0 0 5px #00f5ff, 0 0 10px #00f5ff, 0 0 20px #0acaff;
  animation: neonOutlineFlicker 2.1s linear forwards;
}

.intro-wrapper h1:hover .neon-outline {
  animation: neonOutlineFlicker 2.5s infinite forwards;
}

.neon-outline.flicker {
  animation: neonOutlineFlicker 2.5s infinite forwards;
}

@keyframes neonOutlineFlicker {
  0% {
    opacity: 1;
    -webkit-text-stroke: 1.2px #00f5ff;
  }

  5% {
    opacity: 0.3;
  }

  10% {
    opacity: 1;
  }

  15% {
    opacity: 0.5;
  }

  20% {
    opacity: 1;
    text-shadow: 0 0 10px #0acaff;
  }

  30% {
    opacity: 0.2;
  }

  40% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }

  60% {
    opacity: 1;
  }

  70% {
    opacity: 0.7;
    text-shadow: 0 0 20px #00f5ff;
  }

  80% {
    opacity: 0.3;
  }

  90% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    color: white;
    -webkit-text-stroke: 2.2px #00f5ff;
    text-shadow: 0 0 5px #00f5ff, 0 0 10px #00f5ff, 0 0 20px #0acaff;
  }
}


/* ========== TEMPORAL RIFT PORTAL ========== */
.time-portal {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  z-index: -1;
  border-radius: 50%;
  box-shadow: 0 0 120px 50px rgba(238, 184, 104, 0.3);
  pointer-events: none;
}

.portal-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(var(--x, -50%), var(--y, -50%)) rotate(0deg);
  width: 100%;
  height: 100%;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  /* Ethereal Gold & Deep Crimson Magic */
  background: linear-gradient(135deg, rgba(238, 184, 104, 0.9), rgba(139, 0, 0, 0.7));
  mix-blend-mode: screen;
  filter: hue-rotate(0deg);
  animation: coreWobble calc(60ms * var(--t)) linear infinite;
  transform-origin: calc(var(--y) * -1) calc(var(--x) * -1);
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.9), 0 0 25px rgba(238, 184, 104, 0.6);
}

.portal-ring:nth-child(1) {
  --x: -53%;
  --y: -53%;
  --t: 27;
}

.portal-ring:nth-child(2) {
  --x: -47%;
  --y: -52%;
  --t: 38;
}

.portal-ring:nth-child(3) {
  --x: -45%;
  --y: -50%;
  --t: 26;
}

.portal-ring:nth-child(4) {
  --x: -53%;
  --y: -45%;
  --t: 42;
}

.portal-ring:nth-child(5) {
  --x: -55%;
  --y: -45%;
  --t: 32;
  backdrop-filter: blur(10px);
}

/* ========== ANCIENT ERA UI THEME (High Fantasy Upgrade) ========== */
html.ancient-mode {
  --bg-dark: #0b0807;
  /* Deep Obsidian */
  --bg-section: #120d0b;
  --bg-accent: #1f1612;
  --accent: #eeb868;
  /* Brilliant Golden Magic */
  --accent-dark: #b58235;
  --accent-alt: #fcebbb;
  --text-light: #fcf2d9;
  /* Ancient Ivory Text */
  --text-muted: #8a7767;

  --projard: linear-gradient(145deg, #17110f, #0d0908);
  --prover: rgba(23, 17, 15, 0.95);
  --prover-shad: 0 25px 60px rgba(0, 0, 0, 0.8);
  --promodal: rgba(11, 8, 7, 0.95);
  --promodal-overlay: radial-gradient(circle at center, rgba(238, 184, 104, 0.08), rgba(0, 0, 0, 0.9));
  --promodal-contentbg: linear-gradient(160deg, #1f1612, #0b0807);
  --promodal-contentborder: 1px solid rgba(238, 184, 104, 0.2);
  --promodal-contentshadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  --promodal-ifrborder: 1px solid rgba(238, 184, 104, 0.3);
  --promodal-ifrshadow: 0 0 40px rgba(238, 184, 104, 0.1);

  --top-bg: linear-gradient(-45deg, #120d0b, #0b0807, #1f1612, #0b0807);

  background: var(--bg-dark);
  color: var(--text-light);
  font-family: 'Georgia', 'Times New Roman', serif;
}

/* Elegant serif font override */
html.ancient-mode .site-title,
html.ancient-mode h1,
html.ancient-mode h2,
html.ancient-mode h3,
html.ancient-mode .nav-links li a,
html.ancient-mode .btn-primary,
html.ancient-mode .filter-btn,
html.ancient-mode .data-node::after {
  font-family: 'Georgia', 'Times New Roman', serif;
  letter-spacing: 1px;
}

/* Ancient Navbar & Glassmorphism Overrides */
html.ancient-mode header.site-header {
  background: rgba(18, 13, 11, 0.95);
}

html.ancient-mode .navbar {
  background: rgba(18, 13, 11, 0.85);
  box-shadow: 0 8px 30px rgba(238, 184, 104, 0.08);
  border-bottom: 1px solid rgba(238, 184, 104, 0.15);
}

html.ancient-mode .navbar.shrink {
  background: rgba(11, 8, 7, 0.95);
}

/* Turn the mobile hamburger menu gold */
html.ancient-mode .menu-toggle span {
  background: var(--accent);
}

/* Mobile Dropdown Menu Ancient styling */
@media (max-width: 768px) {
  html.ancient-mode .nav-links {
    background: rgba(18, 13, 11, 0.95);
    border-top: 1px solid rgba(238, 184, 104, 0.2);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.8);
  }
}

/* Golden glowing typography */
html.ancient-mode .site-title {
  text-shadow: 0 0 12px rgba(238, 184, 104, 0.5);
  animation: none;
}

html.ancient-mode .neon-outline {
  -webkit-text-stroke: 1.2px #eeb868;
  text-shadow: 0 0 15px rgba(238, 184, 104, 0.7);
  animation: none;
  color: transparent;
}

html.ancient-mode .nav-links li a::after {
  background: linear-gradient(90deg, #eeb868, #fcebbb);
  box-shadow: 0 0 10px rgba(238, 184, 104, 0.6);
}

html.ancient-mode .nav-links li a:hover {
  background: linear-gradient(90deg, #eeb868, #fcebbb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Mystical Golden Cursor */
html.ancient-mode .custom-cursor {
  background: conic-gradient(from 0deg, #eeb868, #b58235, #fcebbb, #eeb868);
  box-shadow: 0 0 15px #eeb868;
}

html.ancient-mode .cursor-light {
  background: radial-gradient(circle, rgba(238, 184, 104, 0.08) 0%, rgba(238, 184, 104, 0.03) 40%, transparent 70%);
}

/* Ancient Ledger Terminal */
html.ancient-mode #terminal {
  background: rgba(18, 13, 11, 0.95);
  border: 1px solid rgba(238, 184, 104, 0.3);
  font-family: 'Courier New', monospace;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

html.ancient-mode .terminal-prompt span,
html.ancient-mode .terminal-user-command {
  color: #eeb868;
}

/* Golden Data Runes (Instead of Nodes) */
html.ancient-mode .data-node {
  border-radius: 50%;
  /* Turns diamonds into ancient coins/runes */
  transform: translate(calc(-50% + var(--drop-x)), calc(-50% + var(--drop-y))) scale(var(--n-scale));
}

svg.human {
  width: 190px;
  height: 350px;
  filter: drop-shadow(0 0 2px #0af);
  transform-origin: center center;
  animation: humanPulse 6s ease-in-out infinite, humanFloatRotate 8s ease-in-out infinite;
}

.hand {
  transform-origin: bottom center;
  animation: waveHand 2.4s ease-in-out infinite;
}

@keyframes waveHand {

  0%,
  100% {
    transform: rotate(0deg);
  }

  45%,
  55% {
    transform: rotate(20deg);
  }
}

@keyframes humanPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

svg.human:hover {
  transform: scale(1.05) translateY(-15px);
}

@keyframes humanFloatRotate {

  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }

  50% {
    transform: translateY(-12px) rotate(3deg) scale(1.03);
  }
}

svg.human .head {
  animation: glowPulse 4s ease-in-out infinite;
  filter: url(#glow);
  transform-origin: center;
}

svg.human .body {
  animation: glowPulse 6s ease-in-out infinite alternate;
}

@keyframes glowPulse {

  0%,
  100% {
    filter: drop-shadow(0 0 6px #0af);
  }

  50% {
    filter: drop-shadow(0 0 16px #0af);
  }
}

svg.human .leg {
  animation: legPulse 6s ease-in-out infinite alternate;
}

@keyframes legPulse {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

svg.human .eye {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: blink 5s ease-in-out infinite;
}

svg.human .left-eye {
  animation-delay: 0s;
}

svg.human .right-eye {
  animation-delay: 0.07s;
}

@keyframes blink {

  0%,
  2%,
  8%,
  10%,
  100% {
    transform: scaleY(1);
  }

  4%,
  6% {
    transform: scaleY(0.1);
  }
}

.smile {
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px #00f5ffcc);
  animation: smileGlow 3s ease-in-out infinite;
  transform-origin: center;
  transition: transform 0.3s ease, filter 0.3s ease;
}

@keyframes smileGlow {

  0%,
  100% {
    filter: drop-shadow(0 0 6px #00f5ffcc);
  }

  50% {
    filter: drop-shadow(0 0 10px #00f5ff);
  }
}

.human:hover .smile {
  transform: scale(1.08);
  filter: drop-shadow(0 0 12px #00f5ff);
}

svg.threads-cloud {
  margin-top: -4.5rem;
  width: 270px;
  height: 160px;
  filter: drop-shadow(0 0 8px #0af);
  cursor: grab;
  user-select: none;
  transition: filter 0.3s ease;
}

svg.threads-cloud:hover {
  filter: drop-shadow(0 0 20px #0af);
  transform: scale(1.05);
}

svg.threads-cloud path {
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
  animation: pulseStroke 6s ease-in-out infinite;
  stroke-dasharray: 500;
  stroke-dashoffset: 0;
}

#thread1 {
  stroke-width: 3;
  animation-name: dashMove1;
}

#thread2 {
  stroke-width: 2.5;
  animation-name: dashMove2;
}

#thread3 {
  stroke-width: 2;
  animation-name: dashMove3;
}

@keyframes dashMove1 {

  0%,
  100% {
    stroke-dashoffset: 500;
  }

  50% {
    stroke-dashoffset: 0;
  }
}

@keyframes dashMove2 {

  0%,
  100% {
    stroke-dashoffset: 400;
  }

  50% {
    stroke-dashoffset: -100;
  }
}

@keyframes dashMove3 {

  0%,
  100% {
    stroke-dashoffset: 300;
  }

  50% {
    stroke-dashoffset: -150;
  }
}

@keyframes pulseStroke {

  0%,
  100% {
    stroke-opacity: 0.7;
  }

  50% {
    stroke-opacity: 1;
  }
}

/* ========== MIND EXPLOSION STYLES ========== */
.mind-explosion-container {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 5rem;
}

.data-node-container {
  position: absolute;
  top: 20%;
  left: 50%;
  width: 0;
  height: 0;
  z-index: 0;
  pointer-events: none;
}

.data-node {
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(45deg) scale(0);
  transition: background 0.3s, box-shadow 0.3s;
  pointer-events: auto;
  cursor: pointer;
}

.data-node.exploded {
  animation: nodeFloat 4s infinite alternate ease-in-out;
}

@keyframes nodeFloat {
  0% {
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) rotate(45deg) scale(1);
    box-shadow: 0 0 12px var(--accent);
  }

  100% {
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty) - 10px)) rotate(135deg) scale(1.1);
    box-shadow: 0 0 25px var(--accent);
  }
}

.data-node:hover {
  background: var(--bg-dark);
  border: 2px solid var(--accent);
  box-shadow: 0 0 30px var(--accent), 0 0 40px var(--accent-alt);
  z-index: 10;
}

.data-node::after {
  content: attr(data-project);
  position: absolute;
  top: -35px;
  left: 50%;
  transform: translateX(-50%) rotate(-45deg);
  background: rgba(10, 15, 25, 0.95);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  border: 1px solid rgba(0, 255, 231, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  z-index: 11;
}

html.light-mode .data-node::after {
  background: rgba(255, 255, 255, 0.95);
  color: var(--accent);
  border: 1px solid rgba(10, 25, 47, 0.2);
}

.data-node:hover::after {
  opacity: 1;
  transform: translateX(-50%) rotate(-45deg) translateY(-5px);
}

/* ========== PREMIUM PROJECTS SECTION ========== */
.projects-section {
  position: relative;
  overflow: hidden;
  background: var(--bg-dark);
  color: var(--text-light);
  perspective: 1000px;
  padding-bottom: 8rem;
}

.section-title {
  color: var(--accent);
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title h2 {
  font-size: 3rem;
  font-weight: 300;
  letter-spacing: -1px;
  display: inline-block;
}

/* Master Filter Layout */
.master-filter-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 4rem;
}

.project-filters {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

/* Make the secondary status filters slightly smaller and faded to indicate hierarchy */
.secondary-filters .filter-btn {
  font-size: 0.95rem;
  opacity: 0.7;
}

.secondary-filters .filter-btn.active {
  opacity: 1;
}

/* Awesome Mobile Filters */
@media (max-width: 768px) {
  .master-filter-container {
    width: calc(100% + 3rem);
    margin-left: -1.5rem;
    padding: 0;
    position: relative;
    align-items: stretch;
    overflow: hidden;
  }

  .master-filter-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 100%;
    background: linear-gradient(to right, transparent, var(--bg-dark));
    pointer-events: none;
  }

  .project-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 0.8rem;
    padding: 0 0 0.5rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x proximity;
  }

  .project-filters::-webkit-scrollbar {
    display: none;
  }

  .master-filter-container .filter-btn {
    flex-shrink: 0;
    scroll-snap-align: start;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.6rem 1.5rem !important;
    border-radius: 40px;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
  }

  .master-filter-container .filter-btn:first-child {
    margin-left: 1.5rem;
  }

  .master-filter-container .filter-btn:last-child {
    margin-right: 1.5rem;
  }

  .master-filter-container .filter-btn::after {
    display: none;
  }

  .master-filter-container .filter-btn.active {
    background: var(--accent);
    color: var(--bg-dark);
    font-weight: 700;
    border-color: var(--accent);
  }

  /* Theme handling */
  html.light-mode .master-filter-container .filter-btn {
    background: rgba(10, 25, 47, 0.05);
    border-color: rgba(10, 25, 47, 0.1);
    color: var(--text-light);
  }

  html.ancient-mode .master-filter-container .filter-btn {
    background: rgba(238, 184, 104, 0.05);
    border-color: rgba(238, 184, 104, 0.15);
  }

  /* Ensure active state takes priority in all themes */
  html.light-mode .master-filter-container .filter-btn.active,
  html.ancient-mode .master-filter-container .filter-btn.active {
    background: var(--accent);
    color: var(--bg-dark);
    font-weight: 700;
    border-color: var(--accent);
  }
}

/* ========== PROJECT NEON BADGES ========== */
.project-tags {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.p-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.3rem 0.8rem;
  border-radius: 30px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
}

/* Category Colors */
.p-tag.type-website {
  background: rgba(0, 255, 231, 0.1);
  color: #00ffe7;
  border: 1px solid rgba(0, 255, 231, 0.3);
}

.p-tag.type-app {
  background: rgba(79, 195, 255, 0.1);
  color: #4fc3ff;
  border: 1px solid rgba(79, 195, 255, 0.3);
}

.p-tag.type-script {
  background: rgba(224, 108, 253, 0.1);
  color: #e06cfd;
  border: 1px solid rgba(224, 108, 253, 0.3);
}

/* Status Colors */
.p-tag.status-live {
  background: rgba(46, 213, 115, 0.1);
  color: #2ed573;
  border: 1px solid rgba(46, 213, 115, 0.3);
}

.p-tag.status-developing {
  background: rgba(255, 165, 2, 0.1);
  color: #ffa502;
  border: 1px solid rgba(255, 165, 2, 0.3);
}

.p-tag.status-concept {
  background: rgba(255, 71, 87, 0.1);
  color: #ff4757;
  border: 1px solid rgba(255, 71, 87, 0.3);
}

/* Hide tags in compact view to keep it clean */
.projects-compact .project-tags {
  display: none;
}

/* Ancient Mode Overrides for Badges */
html.ancient-mode .p-tag {
  background: rgba(238, 184, 104, 0.1) !important;
  color: #eeb868 !important;
  border: 1px solid rgba(238, 184, 104, 0.3) !important;
}

.filter-btn {
  font-size: 1.1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.4s ease;
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
}

.filter-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.filter-btn.active,
.filter-btn:hover {
  color: var(--text-light);
}

.filter-btn.active::after,
.filter-btn:hover::after {
  width: 100%;
}

/* ========== VIEW TOGGLES ========== */
.projects-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto 1rem;
  padding: 0 2rem;
}

.view-toggles {
  display: flex;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.4rem;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

html.light-mode .view-toggles {
  background: rgba(10, 25, 47, 0.05);
  border: 1px solid rgba(10, 25, 47, 0.1);
}

.view-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
}

.view-btn svg {
  width: 18px;
  height: 18px;
}

.view-btn.active {
  background: var(--accent);
  color: var(--bg-dark);
  box-shadow: 0 0 15px rgba(0, 255, 231, 0.4);
}

/* ========== RESPONSIVE PROJECTS HEADER ========== */
@media (max-width: 768px) {
  .projects-header-top {
    flex-direction: column;
    gap: 1.5rem;
    /* Adds perfect spacing between the title and the buttons */
    margin-bottom: 2rem;
  }

  .projects-header-top .section-title {
    margin-bottom: 0;
    /* Removes the huge default gap so buttons sit nicely below */
  }
}

/* ========== EMPTY STATE MESSAGE ========== */
.empty-state {
  grid-column: 1 / -1;
  width: 100%;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  font-size: 1.2rem;
  font-style: italic;
  letter-spacing: 1px;
}

html.light-mode .empty-state {
  color: rgba(10, 25, 47, 0.6);
}

/* ========== BASE PROJECT CARD (Shared Elements) ========== */
.project-card {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transform-style: preserve-3d;
  will-change: transform;
}

.project-thumbnail,
.project-video,
.preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-size: cover;
  background-position: center;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), filter 1.2s ease;
  filter: brightness(0.85) grayscale(20%);
}

.project-card:hover .project-thumbnail,
.project-card:hover .project-video,
.project-card:hover .preview-image {
  transform: scale(1.06);
  filter: brightness(1) grayscale(0%);
}

/* GSAP Parallax Image Scale Setup */
.parallax-image {
  width: 100%;
  height: 120%;
  object-fit: cover;
  transform-origin: center;
}

/* ========== MAJESTIC EDITORIAL VIEW (DEFAULT) ========== */
.projects-editorial {
  display: flex;
  flex-direction: column;
  gap: 8rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.projects-editorial .project-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5rem;
  background: transparent;
  box-shadow: none;
  border: none;
  aspect-ratio: auto;
  transform: none !important;
}

.projects-editorial .project-card:nth-child(even) {
  flex-direction: row-reverse;
}

.projects-editorial .project-preview {
  position: relative;
  width: 55%;
  max-width: 650px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: none;
}

.projects-editorial .project-preview:hover {
  transform: scale(1.03);
  box-shadow: 0 30px 60px rgba(0, 255, 231, 0.15);
}

.projects-editorial .project-card::before,
.projects-editorial .project-card::after {
  display: none;
}

.projects-editorial .project-info {
  position: relative;
  width: 45%;
  padding: 0 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

/* Forces text to flow normally instead of overlapping */
.projects-editorial .project-card h3,
.projects-editorial .project-card p,
.projects-editorial .project-card .project-link-text {
  position: relative;
  bottom: auto;
  left: auto;
  right: auto;
  opacity: 1;
  transform: none;
}

.projects-editorial .project-icon {
  display: none;
}

.projects-editorial .project-card h3 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 1.2rem;
  color: var(--text-light);
  letter-spacing: -1px;
}

html.light-mode .projects-editorial .project-card h3 {
  color: var(--accent);
}

.projects-editorial .project-card p {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  max-width: 480px;
  -webkit-line-clamp: unset;
}

html.light-mode .projects-editorial .project-card p {
  color: rgba(10, 25, 47, 0.7);
}

.projects-editorial .project-link-text {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 2px;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--accent);
  color: var(--accent);
  cursor: pointer;
}

@media (max-width: 900px) {
  .projects-editorial {
    gap: 5rem;
    padding: 2rem 0.5rem;
  }

  .projects-editorial .project-card,
  .projects-editorial .project-card:nth-child(even) {
    flex-direction: column;
    gap: 2.5rem;
    align-items: flex-start;
  }

  .projects-editorial .project-preview {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
  }

  .projects-editorial .project-info {
    width: 100%;
    padding: 0 1rem;
  }
}

/* ========== GRID VIEW (TOGGLED) ========== */
.projects-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr));
  padding: 0 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.projects-grid .project-card {
  position: relative;
  aspect-ratio: 5 / 4;
  background: var(--card-bg, #050a15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 20px 40px rgba(0, 0, 0, 0.4);
}

.projects-grid .preview-image {
  background-size: 165%;
  background-position: center;
  background-repeat: no-repeat;
}

html.light-mode .projects-grid .project-card {
  background: var(--card-bg, #ffffff);
  box-shadow: inset 0 0 0 1px rgba(10, 25, 47, 0.1), 0 20px 40px rgba(10, 25, 47, 0.08);
}

.projects-grid .project-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* 1. Hide the dark gradient overlay initially */
.projects-grid .project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(to top, rgba(10, 15, 25, 0.95) 0%, rgba(10, 15, 25, 0.4) 40%, transparent 100%);
  opacity: 0;
  /* <-- Changed from 0.8 to 0 */
  transition: opacity 0.6s ease;
}

html.light-mode .projects-grid .project-card::before {
  background: linear-gradient(to top, rgba(244, 245, 247, 0.95) 0%, rgba(244, 245, 247, 0.6) 40%, transparent 100%);
}

.projects-grid .project-card:hover::before {
  opacity: 0.9;
  /* <-- Shows gradient on hover */
}

/* 2. Hide the text initially and animate it in */
.projects-grid .project-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2.5rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  /* <-- Hides text initially */
  transform: translateY(20px);
  /* <-- Pushes text down slightly */
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.projects-grid .project-card:hover .project-info {
  opacity: 1;
  /* <-- Shows text on hover */
  transform: translateY(0);
}

.projects-grid .project-card h3 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

html.light-mode .projects-grid .project-card h3 {
  color: var(--accent);
}

.projects-grid .project-card p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

html.light-mode .projects-grid .project-card p {
  color: rgba(10, 25, 47, 0.7);
}

.projects-grid .project-link-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.projects-grid .project-card:hover .project-link-text {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}

.projects-grid .project-link-text span {
  display: inline-block;
  transition: transform 0.3s ease;
}

.projects-grid .project-card:hover .project-link-text span {
  transform: translate(3px, -3px);
}

.projects-grid .project-icon {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 30px;
  height: 30px;
  fill: var(--accent-dark);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
  z-index: 3;
}

.projects-grid .project-card:hover .project-icon {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.15s;
}

@media (max-width: 1024px) {
  .projects-grid {
    gap: 2rem;
    padding: 0 1.5rem;
  }

  .projects-grid .project-card h3 {
    font-size: 1.5rem;
  }
}

/* ========== MOBILE INFO TOGGLE (hidden by default on desktop) ========== */
.mobile-info-toggle {
  display: none;
}

/* ========== iOS SCROLL-SNAP CAROUSEL ========== */

/* The outer scroll track — full viewport width, horizontal scroll */
.ios-scroll-track {
  display: flex;
  width: 100%;
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2rem 0 3rem;
  gap: 0;
  /* Center the first/last card by using padding */
  box-sizing: border-box;
}

.ios-scroll-track::-webkit-scrollbar {
  display: none;
}

/* The wrapper becomes a flex container of slides */
.projects-grid.snap-carousel-active {
  display: flex !important;
  flex-direction: row !important;
  gap: 1rem !important;
  padding: 0 calc(50vw - 155px) !important;
  /* centers first and last card */
  box-sizing: content-box !important;
  width: max-content !important;
}

/* Each card is a fixed-size snap item */
.projects-grid.snap-carousel-active .project-card {
  flex: 0 0 310px !important;
  width: 310px !important;
  height: 440px !important;
  max-width: calc(100vw - 60px) !important;
  scroll-snap-align: center !important;
  scroll-snap-stop: always !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  position: relative !important;
  transition: transform 0.35s ease, box-shadow 0.35s ease !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
  cursor: pointer;
}

/* Cards that don't match the filter are hidden via class, not display:none */
.project-card.snap-hidden {
  display: none !important;
}

/* Recede non-active cards slightly (visual scale using sibling selector trick via JS class) */
.projects-grid.snap-carousel-active .project-card:not(:focus-within) {
  transform: scale(0.94);
}

/* Media query for the full mobile experience */
@media (max-width: 768px) {

  /* Fallback vertical stack if NOT snap carousel */
  .projects-grid:not(.snap-carousel-active) {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Icons not needed in card view */
  .projects-grid .project-icon {
    display: none !important;
  }

  /* Show images at full brightness/color on mobile screens */
  .projects-grid .project-thumbnail,
  .projects-grid .project-video,
  .projects-grid .preview-image {
    filter: brightness(1) grayscale(0%);
  }


  /* ── Info Toggle Button ── */
  .projects-grid.snap-carousel-active .mobile-info-toggle {
    display: flex;
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff !important;
    align-items: center;
    justify-content: center;
    z-index: 100;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    transition: all 0.25s ease;
    padding: 0;
  }

  html.light-mode .projects-grid.snap-carousel-active .mobile-info-toggle {
    background: rgba(10, 25, 47, 0.4);
    border-color: rgba(10, 25, 47, 0.6);
  }


  /* ── Default: text hidden, video visible ── */
  .projects-grid.snap-carousel-active .project-card::before {
    opacity: 0 !important;
  }

  .projects-grid.snap-carousel-active .project-info,
  .projects-grid.snap-carousel-active .project-link-text {
    opacity: 0 !important;
    pointer-events: none;
    transform: translateY(16px) !important;
    transition: opacity 0.28s ease, transform 0.28s ease !important;
  }

  .projects-grid.snap-carousel-active .project-info {
    padding: 1.4rem;
  }

  /* ── Active info state ── */
  .projects-grid.snap-carousel-active .project-card.info-visible::before {
    opacity: 0.85 !important;
  }

  .projects-grid.snap-carousel-active .project-card.info-visible .project-info,
  .projects-grid.snap-carousel-active .project-card.info-visible .project-link-text {
    opacity: 1 !important;
    pointer-events: auto;
    transform: translateY(0) !important;
  }

  .projects-grid.snap-carousel-active .project-card.info-visible .mobile-info-toggle {
    background: var(--accent);
    color: var(--bg-dark);
    border-color: var(--accent);
  }
}

/* ── Fraction Indicator ── */
.snap-indicator {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: -1.5rem auto 1.5rem;
  gap: 0.25rem;
}

.snap-fraction {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

html.light-mode .snap-fraction {
  color: var(--text-light);
  background: rgba(10, 25, 47, 0.05);
  border-color: rgba(10, 25, 47, 0.1);
}

.snap-hint {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.snap-hint span {
  font-size: 1rem;
  display: inline-block;
  vertical-align: middle;
  animation: swipePulse 2s infinite ease-in-out;
}

/* ========== COMPACT LIST VIEW (NEW) ========== */
.projects-compact {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  /* Tight spacing for scanning */
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Transform the card into a sleek horizontal row */
.projects-compact .project-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  box-shadow: none;
  aspect-ratio: auto;
  transform: none !important;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.projects-compact .project-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 255, 231, 0.3);
  transform: translateX(8px) !important;
  /* Subtle indent on hover */
}

/* Make the preview a tiny thumbnail */
.projects-compact .project-preview {
  position: relative;
  width: 120px;
  height: 68px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  z-index: 1;
}

.projects-compact .project-card::before,
.projects-compact .project-card::after {
  display: none;
  /* Hide gradient overlays */
}

/* Layout the text horizontally */
.projects-compact .project-info {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  padding-left: 1.5rem;
  opacity: 1;
  transform: none;
  z-index: 3;
  min-width: 0;
}

.projects-compact .project-card h3 {
  font-size: 1.4rem;
  margin: 0;
  flex-shrink: 0;
  /* Keeps title full size */
}

html.light-mode .projects-compact .project-card h3 {
  color: var(--accent);
}

/* Force description to a single truncated line */
.projects-compact .project-card p {
  margin: 0 0 0 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: unset;
  min-width: 0;
}

.projects-compact .project-link-text {
  opacity: 1;
  transform: none;
  margin: 0 0 0 1.5rem;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.projects-compact .project-icon {
  display: none;
}

/* Light Mode Overrides for Compact */
html.light-mode .projects-compact .project-card {
  background: rgba(10, 25, 47, 0.03);
  border: 1px solid rgba(10, 25, 47, 0.08);
}

html.light-mode .projects-compact .project-card:hover {
  background: rgba(10, 25, 47, 0.06);
  border-color: rgba(10, 25, 47, 0.3);
}

/* Ancient Mode Overrides for Compact */
html.ancient-mode .projects-compact .project-card {
  background: rgba(238, 184, 104, 0.03);
  border: 1px solid rgba(238, 184, 104, 0.1);
}

html.ancient-mode .projects-compact .project-card:hover {
  background: rgba(238, 184, 104, 0.08);
  border-color: rgba(238, 184, 104, 0.4);
}

/* Mobile Adjustments for Compact View */
@media (max-width: 768px) {
  .projects-compact .project-card {
    padding: 0.75rem;
  }

  .projects-compact .project-preview {
    width: 80px;
    height: 45px;
  }

  .projects-compact .project-info {
    padding-left: 1rem;
  }

  .projects-compact .project-card h3 {
    font-size: 1.1rem;
    flex-shrink: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }

  .projects-compact .project-card p {
    display: none;
    /* Hides description completely on phones to save space */
  }

  .projects-compact .project-link-text {
    font-size: 0;
    margin-left: auto;
  }

  .projects-compact .project-link-text::after {
    content: '\2197';
    font-size: 1rem;
  }
}

@media (max-width: 500px) {
  .projects-compact {
    padding: 0;
  }
}

/* ========== THE SENTIENT CORE (Mind Modal) ========== */
.sentient-core {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 3rem auto;
  border-radius: 50%;
  /* A subtle pulsing aura behind the core */
  box-shadow: 0 0 60px 20px rgba(0, 255, 231, 0.15);
}

.sentient-atom {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(var(--x, -50%), var(--y, -50%)) rotate(0deg);
  width: 100px;
  height: 100px;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  /* Organic liquid shape */

  /* Premium Glassy Neon Gradient */
  background: linear-gradient(135deg, rgba(0, 255, 231, 0.8), rgba(79, 195, 255, 0.4));
  mix-blend-mode: screen;
  filter: hue-rotate(0deg);

  /* The hypnotic orbital wobble */
  animation: coreWobble calc(150ms * var(--t)) linear infinite;

  /* CSS math to reverse the transform origin dynamically */
  transform-origin: calc(var(--y) * -1) calc(var(--x) * -1);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6), 0 0 10px rgba(0, 255, 231, 0.5);
}

/* Specific orbit calculations for each atom */
.sentient-atom:nth-child(1) {
  --x: -53%;
  --y: -53%;
  --t: 37;
}

.sentient-atom:nth-child(2) {
  --x: -47%;
  --y: -52%;
  --t: 58;
}

.sentient-atom:nth-child(3) {
  --x: -45%;
  --y: -50%;
  --t: 46;
}

.sentient-atom:nth-child(4) {
  --x: -53%;
  --y: -45%;
  --t: 72;
}

/* The 5th atom acts as a magnifying glass distorting the ones behind it */
.sentient-atom:nth-child(5) {
  --x: -55%;
  --y: -45%;
  --t: 62;
  backdrop-filter: blur(4px);
}

@keyframes coreWobble {
  to {
    filter: hue-rotate(360deg);
    transform: translate(var(--x), var(--y)) rotate(360deg);
  }
}

/* Beautiful "Ink in Water" effect for Light Mode */
html.light-mode .sentient-atom {
  mix-blend-mode: multiply;
  background: linear-gradient(135deg, rgba(10, 25, 47, 0.6), rgba(37, 99, 235, 0.4));
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.5), 0 0 10px rgba(10, 25, 47, 0.1);
}

html.light-mode .sentient-core {
  box-shadow: 0 0 60px 20px rgba(10, 25, 47, 0.05);
}


/* Harital Modal */
.harit-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9;
}

.harit-modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(5, 10, 20, 0.35);
  backdrop-filter: blur(3.5px);
}

.harit-modal .modal-H {
  position: relative;
  z-index: 10;
  margin-top: 3.5rem;
  width: 600px;
  max-width: 92dvw;
  max-height: 80dvh;
  background: var(--bg-accent);
  color: var(--text-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-light);
  padding: 1.35rem 1.25rem;
  animation: fadeInUp 0.6s ease-out;
}

.harit-modal .modal-title {
  font-size: clamp(1.55rem, 3vw, 2rem);
  margin-bottom: 1rem;
  letter-spacing: 0.01px;
  text-shadow: 0 0 6px var(--accent);
}

.harit-modal .modal-hunt {
  overflow: auto;
  max-height: 67.5dvh;
  padding: 0.5rem 1rem;
}

.harit-modal .modal-description-H {
  text-align: justify;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.modal-glow-box {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(0, 255, 231, 0.05);
  border: 1px solid var(--accent-alt);
  box-shadow: inset 0 0 20px rgba(0, 255, 231, 0.2);
  font-size: 0.95rem;
}

.harit-modal .modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.harit-modal .modal-close:hover {
  transform: scale(1.2);
}

@keyframes fadeInUp {
  0% {
    transform: translateY(40px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ==== Redesigned Project Modal ==== */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 5.9rem 5.5rem 1.3rem;
  backdrop-filter: blur(8px);
  background: var(--promodal);
  transition: backdrop-filter 0.4s ease;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: var(--promodal-overlay);
  opacity: 0;
  transition: none;
}

.modal-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--promodal-contentbg);
  border-radius: var(--radius);
  box-shadow: var(--promodal-contentshadow);
  overflow: hidden;
  transform: scale(0.95);
  opacity: 0;
  border: var(--promodal-contentborder);
  backdrop-filter: saturate(180%) blur(10px);
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.project-modal.active .modal-content {
  transform: scale(1);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: rgba(0, 255, 231, 0.08);
  border: none;
  color: var(--accent);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  border-radius: 50%;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 3;
}

.modal-close:hover {
  background: rgba(0, 255, 231, 0.18);
  transform: scale(1.1);
}

.modal-body {
  overflow: hidden;
  transition: height 0.5s ease;
  display: flex;
  flex-direction: row;
  gap: 0.85rem;
  padding: 1.2rem 2rem;
}

.deslay {
  flex: 1;
  max-height: 80vh;
  padding-right: 1rem;
}

.modal-iframe-container {
  flex: 1.8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-iframe-container iframe {
  width: 100%;
  height: 72dvh;
  border-radius: var(--radius);
  border: var(--promodal-ifrborder);
  box-shadow: var(--promodal-ifrshadow);
}

.modal-title {
  letter-spacing: -2.85px;
  font-size: clamp(1rem, 4.3vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--accent);
}

.modal-description {
  font-size: 1.05rem;
  max-height: 60vh;
  overflow-y: auto;
  color: var(--text-muted);
  line-height: 1.7;
  text-align: justify;
}

@media (max-width: 1024px) {
  .modal-body {
    gap: 1rem;
    padding: 2rem;
  }

  .modal-title {
    font-size: clamp(2rem, 4.9vw, 3.9rem);
  }

  .deslay {
    flex: 1;
  }

  .modal-iframe-container {
    flex: 1.2;
  }
}

@media (max-width: 768px) {
  .project-modal {
    padding: 5rem 2.5rem 1.3rem;
  }

  .modal-content {
    max-height: 85vh;
    padding-bottom: 0.65rem;
  }

  .modal-body {
    flex-direction: column;
    padding: 0.75rem 1rem;
    gap: 1.2rem;
    position: relative;
    overflow: hidden;
  }

  .modal-iframe-container iframe {
    max-height: 90dvh;
  }

  .deslay {
    padding: 0.1rem;
  }

  .modal-title {
    font-size: 2rem;
    margin-bottom: 0.8rem;
  }

  .modal-description {
    font-size: 0.96rem;
    overflow-y: auto;
  }

  .modal-close {
    font-size: 1.4rem;
    padding: 0.35rem 0.65rem;
  }
}

.mobile-toggle {
  display: none;
  text-align: left;
}

#toggle-view-btn {
  background-color: rgba(0, 255, 231, 0.1);
  color: var(--accent);
  border: 1px solid rgba(0, 255, 231, 0.2);
  padding: 0.4rem 0.9rem;
  font-size: 0.95rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.3s ease;
}

#toggle-view-btn:hover {
  background-color: rgba(0, 255, 231, 0.2);
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }

  .modal-body[data-view="description"] .deslay {
    display: block;
  }

  .modal-body[data-view="description"] .modal-iframe-container {
    display: none;
  }

  .modal-body[data-view="preview"] .deslay {
    display: none;
  }

  .modal-body[data-view="preview"] .modal-iframe-container {
    display: block;
  }
}

@media (max-width: 445px) {
  .project-modal {
    padding: 5rem 1rem 1rem;
  }
}

@keyframes magicSweep {
  0% {
    transform: translateX(-100%) skewX(-20deg);
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    transform: translateX(100%) skewX(-20deg);
    opacity: 0;
  }
}

.modal-body.magic-transition::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.05) 10%, rgba(0, 255, 231, 0.25) 40%, rgba(0, 255, 231, 0.1) 60%, transparent 100%);
  pointer-events: none;
  animation: magicSweep 0.6s ease forwards;
  z-index: 4;
}

.about-section {
  position: relative;
  overflow: hidden;
  background: var(--bg-dark);
  text-align: center;
}

.about-section .content-wrapper {
  max-width: 800px;
  margin: auto;
}

.about-section h2 {
  display: inline-block;
  font-size: 2.4rem;
  margin-bottom: 1.5rem;
  color: var(--accent);
  font-weight: 700;
}

.about-section p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.huge-bg-text {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  text-align: center;
  will-change: transform;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19vw;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
  z-index: 0;
  pointer-events: none;
  line-height: 1;
  letter-spacing: -5px;
}

html.light-mode .huge-bg-text {
  color: rgba(0, 0, 0, 0.03);
}

.project-card .huge-bg-text {
  font-size: clamp(3rem, 10vw, 12rem);
  letter-spacing: -2px;
  color: rgba(255, 255, 255, 0.04);
}

html.light-mode .project-card .huge-bg-text {
  color: rgba(0, 0, 0, 0.04);
}

.contact-section {
  position: relative;
  overflow: hidden;
  min-height: 83dvh;
  background: var(--bg-section);
  text-align: center;
  padding: 8.5rem 2.5rem;
}

.contact-section h2 {
  font-size: 2.4rem;
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--accent);
  font-weight: 700;
}

.contact-section p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.btn-primary {
  display: inline-block;
  padding: 0.9rem 2rem;
  background: var(--accent);
  color: var(--bg-dark);
  font-weight: 600;
  font-family: inherit;
  font-size: 1rem;
  border: none;
  outline: none;
  border-radius: var(--radius);
  transition: background var(--transition-fast), transform var(--transition-fast);
  cursor: pointer;
  user-select: none;
  box-shadow: 0 0 18px var(--accent);
  position: relative;
  overflow: hidden;
  width: 150px;
  height: 50px;
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: scale(1.05);
  box-shadow: 0 0 28px var(--accent-dark);
}

.custom-cursor.snap-cursor {
  transition: width 0.2s ease, height 0.2s ease, box-shadow 0.2s ease;
}

.original {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--bg-dark);
  background: inherit;
  white-space: nowrap;
  transition: none;
  z-index: 2;
}

.reveal-text {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-55%);
  width: 100%;
  text-align: center;
  font-size: 1.19rem;
  font-weight: 600;
  color: var(--bg-dark);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1;
  mask-image: radial-gradient(circle 30px at var(--cursor-x, 50%) var(--cursor-y, 50%), white 100%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle 30px at var(--cursor-x, 50%) var(--cursor-y, 50%), white 99%, transparent 100%);
  mask-repeat: no-repeat;
  mask-size: cover;
}

.btn-primary.revealing .reveal-text {
  opacity: 1;
}

.btn-primary.revealing .original {
  -webkit-mask-image: radial-gradient(circle 40px at var(--cursor-x, 50%) var(--cursor-y, 50%), transparent 100%, black 100%);
  mask-image: radial-gradient(circle 25px at var(--cursor-x, 50%) var(--cursor-y, 50%), transparent 83%, black 100%);
  mask-size: 100% 100%;
  -webkit-mask-size: 100% 100%;
  transition: none;
}

.social-links {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.social-link {
  width: 3.5rem;
  height: 3.5rem;
  color: var(--accent);
  background: var(--bg-section);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}

.social-link svg {
  width: 1.75rem;
  height: 1.75rem;
  transition: transform 0.3s ease;
}

.social-link::before {
  content: '';
  position: absolute;
  inset: 0;
  color: linear-gradient(45deg, #FF6B6B, #FFD93D, #6BCB77, #4D96FF);
  background-size: 300% 300%;
  filter: blur(15px);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 50%;
  z-index: -1;
  animation: gradientShift 4s ease infinite;
}

.social-link:hover::before {
  opacity: 1;
}

.social-link:hover {
  color: var(--connecticon);
  transform: scale(1.15);
}

.social-link:hover svg {
  transform: translateY(-7px) scale(1.05);
}

@media (max-width: 415px) {
  .contact-section {
    padding: 4.5rem 2rem;
  }
}

footer.site-footer {
  background: var(--bg-dark);
  color: var(--text-muted);
  text-align: center;
  padding: 1.25rem 1rem;
  font-size: 0.9rem;
  transform: rotateX(180deg);
}

/* Sleek Glassmorphic Contact FAB */
.fab-contact {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(14, 22, 33, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 255, 231, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 15px rgba(0, 255, 231, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  z-index: 999;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

html.light-mode .fab-contact {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(10, 25, 47, 0.2);
  box-shadow: 0 8px 32px rgba(10, 25, 47, 0.15), 0 0 15px rgba(10, 25, 47, 0.1);
}

.fab-contact svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.fab-contact:hover {
  background: var(--accent);
  color: var(--bg-dark);
  box-shadow: 0 12px 40px rgba(0, 255, 231, 0.4);
}

html.light-mode .fab-contact:hover {
  box-shadow: 0 12px 40px rgba(10, 25, 47, 0.3);
}

.fab-contact:hover svg {
  transform: scale(1.1) rotate(-10deg);
}

/* ========== TERMINAL STYLES ========== */
#terminal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 70vw;
  height: 70vh;
  background: rgba(10, 15, 25, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  color: var(--text-light);
  font-family: 'Courier New', Courier, monospace;
  padding: 2rem;
  display: flex;
  border-radius: 1rem;
  flex-direction: column;
  opacity: 1;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  transform: translate(-50%, -45%);
}

#terminal.terminal-hidden {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

#terminal-output {
  flex-grow: 1;
  overflow-y: auto;
  white-space: pre-wrap;
  font-size: 1rem;
  line-height: 1.5;
}

.terminal-prompt {
  display: flex;
  align-items: center;
}

.terminal-prompt span {
  color: var(--accent);
  margin-right: 0.5rem;
  font-weight: bold;
}

#terminal-input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-light);
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
}

.terminal-line {
  margin-bottom: 0.25rem;
}

.terminal-response {
  color: var(--text-muted);
}

.terminal-user-command {
  color: var(--accent);
}

.terminal-error {
  color: #ff6b6b;
}

html.light-mode #terminal {
  background: rgba(201, 225, 255, 0.792);
  color: var(--text-light);
}

html.light-mode .terminal-prompt span {
  color: var(--accent-dark);
}

html.light-mode #terminal-input {
  color: var(--text-light);
}

html.light-mode .terminal-response {
  color: var(--text-muted);
}

html.light-mode .terminal-user-command {
  color: rgb(132, 0, 214);
}

html.light-mode .terminal-error {
  color: #d93030;
}

/* ========== GLITCH TAKEOVER EFFECT ========== */
body.glitch-takeover {
  animation: glitch-shake 0.3s infinite;
}

body.glitch-takeover #terminal {
  opacity: 0;
  pointer-events: none;
}

body.glitch-takeover::before,
body.glitch-takeover::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-dark);
  z-index: 10002;
  opacity: 0;
  pointer-events: none;
}

html.light-mode body.glitch-takeover::before,
html.light-mode body.glitch-takeover::after {
  background: var(--bg-dark);
}

body.glitch-takeover::before {
  animation: glitch-anim 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
  opacity: 0.3;
}

body.glitch-takeover::after {
  animation: glitch-anim-2 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) reverse both infinite;
  opacity: 0.2;
}

@keyframes glitch-anim {
  0% {
    transform: translate(0);
  }

  10% {
    transform: translate(-5px, -5px);
    clip-path: inset(10% 0 85% 0);
  }

  20% {
    transform: translate(5px, 5px);
    clip-path: inset(90% 0 5% 0);
  }

  30% {
    transform: translate(-5px, 5px);
    clip-path: inset(40% 0 45% 0);
  }

  40% {
    transform: translate(5px, -5px);
    clip-path: inset(80% 0 10% 0);
  }

  50% {
    transform: translate(-5px, -5px);
    clip-path: inset(25% 0 70% 0);
  }

  60% {
    transform: translate(5px, 5px);
    clip-path: inset(5% 0 92% 0);
  }

  70% {
    transform: translate(-5px, 5px);
    clip-path: inset(50% 0 30% 0);
  }

  80% {
    transform: translate(5px, -5px);
    clip-path: inset(75% 0 5% 0);
  }

  90% {
    transform: translate(-5px, -5px);
    clip-path: inset(95% 0 2% 0);
  }

  100% {
    transform: translate(0);
    clip-path: inset(10% 0 85% 0);
  }
}

@keyframes glitch-anim-2 {
  0% {
    transform: translate(0);
  }

  10% {
    transform: translate(3px, -2px);
    clip-path: inset(5% 0 90% 0);
  }

  20% {
    transform: translate(-4px, 3px);
    clip-path: inset(85% 0 10% 0);
  }

  100% {
    transform: translate(0);
    clip-path: inset(5% 0 90% 0);
  }
}

@keyframes glitch-shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(2px);
  }

  50% {
    transform: translateX(-2px);
  }

  75% {
    transform: translateX(2px);
  }
}

/* ========== SKILL CONSTELLATION STYLES ========== */
#skill-constellation-container {
  width: 100%;
  height: 400px;
  margin: 2rem auto;
  cursor: grab;
  position: relative;
}

#skill-constellation-container:active {
  cursor: grabbing;
}

.skill-label {
  position: absolute;
  color: var(--accent);
  background: rgba(14, 22, 33, 0.5);
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 0.9rem;
  pointer-events: auto;
  text-shadow: 0 0 6px var(--accent);
  opacity: 0;
  transition: opacity 0.3s;
}

html.light-mode .skill-label {
  color: var(--accent-alt);
  background: rgba(240, 244, 249, 0.6);
  text-shadow: none;
}

.skill-tooltip {
  position: fixed;
  pointer-events: none;
  padding: 10px 14px;
  font-size: 0.8rem;
  letter-spacing: 0.5px;

  color: #00ffe7;
  background: rgba(0, 10, 15, 0.75);
  border: 1px solid rgba(0, 255, 231, 0.2);
  backdrop-filter: blur(10px);

  border-radius: 8px;
  white-space: nowrap;

  transform: translate(-50%, -100%) scale(0.95);
  transition: all 0.2s ease;

  z-index: 1000;
}

/* ========== DYSTOPIA ANIMATION STYLES ========== */
@keyframes subtle-glitch {
  0% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(1px, -1px);
  }

  50% {
    transform: translate(-1px, 1px);
  }

  75% {
    transform: translate(1px, 1px);
  }

  100% {
    transform: translate(0, 0);
  }
}

body.dystopia-animations svg.human {
  animation: humanPulse 6s ease-in-out infinite, humanFloatRotate 8s ease-in-out infinite, subtle-glitch 3s steps(2, end) infinite alternate;
}

body.dystopia-animations .project-card:hover {
  animation: subtle-glitch 0.3s steps(3, end) infinite;
}

/* ========== HAIKU CONTACT FORM STYLES ========== */
#haiku-form {
  max-width: 600px;
  margin: 2.5rem auto 0;
  text-align: left;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 1rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-accent);
  border: 1px solid rgba(79, 195, 255, 0.2);
  border-radius: var(--radius);
  color: var(--text-light);
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(0, 255, 231, 0.3);
}

#haiku-form button {
  display: block;
  margin: 2rem auto 0;
  width: 180px;
}

.haiku-container {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--bg-accent);
  border: 1px solid rgba(79, 195, 255, 0.1);
  border-radius: var(--radius);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--accent);
  white-space: pre-wrap;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.haiku-container.visible {
  opacity: 1;
  transform: translateY(0);
}

.contact-divider {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  opacity: 0.3;
  max-width: 400px;
  margin: 3.5rem auto;
}

.simple-contact-prompt {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

/* ========== DYSTOPIA FONT OVERRIDE ========== */
body.dystopia-animations {
  font-family: 'Courier New', Courier, monospace;
}

body.dystopia-animations h1,
body.dystopia-animations h2,
body.dystopia-animations h3,
body.dystopia-animations .site-title {
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  letter-spacing: -1px;
}

/* ========== BACK TO TOP ROCKET ========== */
.rocket-container {
  display: flex;
  justify-content: center;
  padding: 2rem 0 1rem 0;
  /* Creates breathing room above the footer */
  position: relative;
  z-index: 10;
}

.rocket-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(14, 22, 33, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 255, 231, 0.3);
  box-shadow: 0 0 20px rgba(0, 255, 231, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: var(--accent);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
  will-change: transform;
}

.rocket-btn svg {
  width: 26px;
  height: 26px;
}

.rocket-btn:hover {
  box-shadow: 0 10px 30px rgba(0, 255, 231, 0.4);
  transform: translateY(-5px);
  /* Pre-launch hover state */
}

/* Light Mode Overrides */
html.light-mode .rocket-btn {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(10, 25, 47, 0.2);
  box-shadow: 0 0 20px rgba(10, 25, 47, 0.1);
}

/* Ancient Mode Overrides */
html.ancient-mode .rocket-btn {
  background: rgba(26, 20, 16, 0.95);
  border: 1px solid rgba(238, 184, 104, 0.3);
  box-shadow: 0 0 20px rgba(238, 184, 104, 0.15);
  color: var(--accent);
}

/* --- THE LAUNCH SEQUENCE --- */
.rocket-btn.launching {
  animation: launchVibrate 0.1s infinite;
  box-shadow: 0 20px 50px rgba(0, 255, 231, 0.6);
  pointer-events: none;
  /* Prevent double-clicks */
}

html.ancient-mode .rocket-btn.launching {
  box-shadow: 0 20px 50px rgba(238, 184, 104, 0.6);
}

/* Violent shaking to simulate G-Force */
@keyframes launchVibrate {
  0% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(-2px, 2px);
  }

  50% {
    transform: translate(2px, -2px);
  }

  75% {
    transform: translate(-2px, -2px);
  }

  100% {
    transform: translate(0, 0);
  }
}

/* Exhaust Flames */
.rocket-flame {
  opacity: 0;
  stroke: #ff3366;
  /* Hot thruster red */
  transition: opacity 0.2s ease;
}

.rocket-btn.launching .rocket-flame {
  opacity: 1;
}

html.ancient-mode .rocket-flame {
  stroke: #ff3300;
}


/* ================================================================
   PREMIUM UPGRADE BLOCK — Humanly Premium & Visually Addictive
   ================================================================ */

/* --- Category Color System --- */
:root {
  --color-website: #00ffe7;
  --color-app: #4fc3ff;
  --color-script: #b47cff;
  --color-concept: #ff6b9d;
}

/* --- Space Grotesk — Hero Display Font --- */
.intro-section .intro-wrapper h1 {
  font-family: 'Space Grotesk', 'Outfit', sans-serif;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -3px;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

/* --- Ambient Orb Behind Human Figure --- */
.ambient-orb {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 231, 0.13) 0%, rgba(79, 195, 255, 0.07) 45%, transparent 70%);
  filter: blur(28px);
  animation: ambientPulse 5s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes ambientPulse {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.7;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.18);
    opacity: 1;
  }
}

html.ancient-mode .ambient-orb {
  background: radial-gradient(circle, rgba(238, 184, 104, 0.12) 0%, rgba(181, 130, 53, 0.06) 45%, transparent 70%);
}

/* --- Scrolling Interest Strip --- */
.scrolling-strip {
  width: 100%;
  overflow: hidden;
  padding: 1.5rem 0 0.5rem;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.scrolling-strip-inner {
  display: flex;
  gap: 2.5rem;
  animation: stripScroll 28s linear infinite;
  width: max-content;
}

.scrolling-strip-inner:hover {
  animation-play-state: paused;
}

.strip-item {
  font-family: 'Space Grotesk', 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 0.65;
  transition: opacity 0.3s;
}

.strip-item:hover {
  opacity: 1;
  color: var(--accent);
}

.strip-item .strip-dot {
  color: var(--accent);
  margin-right: 0.6rem;
  font-size: 0.6rem;
  vertical-align: middle;
}

@keyframes stripScroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

html.light-mode .strip-item {
  color: var(--text-muted);
}

html.ancient-mode .strip-item .strip-dot {
  color: var(--accent);
}

/* --- Position fix for category-bar absolute positioning --- */
.project-card {
  position: relative;
}

/* --- Category Bar — Top 3px Colored Strip --- */
.category-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 12px 12px 0 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 5;
}

.project-card[data-type*="website"] .category-bar {
  background: var(--color-website);
  box-shadow: 0 0 10px rgba(0, 255, 231, 0.5);
}

.project-card[data-type*="app"] .category-bar {
  background: var(--color-app);
  box-shadow: 0 0 10px rgba(79, 195, 255, 0.5);
}

.project-card[data-type*="script"] .category-bar {
  background: var(--color-script);
  box-shadow: 0 0 10px rgba(180, 124, 255, 0.5);
}

.project-card[data-type*="concept"] .category-bar {
  background: var(--color-concept);
  box-shadow: 0 0 10px rgba(255, 107, 157, 0.5);
}

.project-card:hover .category-bar,
.project-card.bar-visible .category-bar {
  transform: scaleX(1);
}

/* Hide in compact view where we use a left border instead */
.projects-compact .category-bar {
  display: none;
}

/* --- Project Meta Row (Number + Year) --- */
.project-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 0.8rem;
}

/* Ghost oversized number for editorial view */
.project-number {
  font-family: 'Space Grotesk', 'Outfit', sans-serif;
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 255, 231, 0.15);
  letter-spacing: -4px;
  user-select: none;
  transition: -webkit-text-stroke-color 0.5s ease;
  margin-bottom: -0.5rem;
}

.project-card:hover .project-number {
  -webkit-text-stroke-color: rgba(0, 255, 231, 0.45);
}

.project-card[data-type*="app"]:hover .project-number {
  -webkit-text-stroke-color: rgba(79, 195, 255, 0.45);
}

.project-card[data-type*="script"]:hover .project-number {
  -webkit-text-stroke-color: rgba(180, 124, 255, 0.45);
}

.project-card[data-type*="concept"]:hover .project-number {
  -webkit-text-stroke-color: rgba(255, 107, 157, 0.45);
}

/* Hide big number in grid & compact (different layouts) */
.projects-grid .project-number,
.projects-compact .project-number {
  display: none;
}

.project-year {
  font-family: 'Space Grotesk', 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 2.5px;
  color: var(--text-muted);
  opacity: 0.5;
  margin-top: 0.5rem;
  text-transform: uppercase;
}

.projects-grid .project-year,
.projects-compact .project-year {
  display: none;
}

.projects-compact .project-meta-row {
  display: none;
}

/* Light & Ancient mode overrides */
html.light-mode .project-number {
  -webkit-text-stroke: 1px rgba(10, 25, 47, 0.12);
}

html.light-mode .project-card:hover .project-number {
  -webkit-text-stroke-color: rgba(10, 25, 47, 0.35);
}

html.ancient-mode .project-number {
  -webkit-text-stroke: 1px rgba(238, 184, 104, 0.18);
}

html.ancient-mode .project-card:hover .project-number {
  -webkit-text-stroke-color: rgba(238, 184, 104, 0.45);
}

/* --- Featured Badge --- */
.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #f4d03f;
  background: rgba(244, 208, 63, 0.08);
  border: 1px solid rgba(244, 208, 63, 0.25);
  padding: 0.28rem 0.75rem;
  border-radius: 30px;
  animation: shimmerBadge 3.5s ease-in-out infinite;
  white-space: nowrap;
}

@keyframes shimmerBadge {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(244, 208, 63, 0);
  }

  50% {
    box-shadow: 0 0 14px 0 rgba(244, 208, 63, 0.25);
  }
}

html.ancient-mode .featured-badge {
  color: var(--accent);
  background: rgba(238, 184, 104, 0.1);
  border-color: rgba(238, 184, 104, 0.3);
  animation: shimmerBadge 3.5s ease-in-out infinite;
}

/* --- Tech Stack Pills --- */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 2rem;
}

.tech-pill {
  font-size: 0.7rem;
  font-weight: 600;
  font-family: 'Space Grotesk', monospace;
  letter-spacing: 0.3px;
  color: rgba(144, 168, 199, 0.7);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0.22rem 0.62rem;
  border-radius: 4px;
  transition: color 0.35s ease, border-color 0.35s ease, background 0.35s ease, transform 0.2s ease;
}

.project-card:hover .tech-pill {
  transform: translateY(-1px);
}

.project-card[data-type*="website"]:hover .tech-pill {
  color: var(--color-website);
  border-color: rgba(0, 255, 231, 0.22);
  background: rgba(0, 255, 231, 0.04);
}

.project-card[data-type*="app"]:hover .tech-pill {
  color: var(--color-app);
  border-color: rgba(79, 195, 255, 0.22);
  background: rgba(79, 195, 255, 0.04);
}

.project-card[data-type*="script"]:hover .tech-pill {
  color: var(--color-script);
  border-color: rgba(180, 124, 255, 0.22);
  background: rgba(180, 124, 255, 0.04);
}

.project-card[data-type*="concept"]:hover .tech-pill {
  color: var(--color-concept);
  border-color: rgba(255, 107, 157, 0.22);
  background: rgba(255, 107, 157, 0.04);
}

/* Light mode */
html.light-mode .tech-pill {
  color: rgba(75, 85, 99, 0.65);
  background: rgba(10, 25, 47, 0.03);
  border-color: rgba(10, 25, 47, 0.1);
}

/* Ancient mode */
html.ancient-mode .tech-pill {
  color: rgba(138, 119, 103, 0.7);
  border-color: rgba(238, 184, 104, 0.1);
  background: transparent;
}

html.ancient-mode .project-card:hover .tech-pill {
  color: var(--accent);
  border-color: rgba(238, 184, 104, 0.3);
}

/* Hide tech-stack in compact (too crowded) */
.projects-compact .tech-stack {
  display: none;
}

/* --- Colored Hover Glow Per Category (Editorial) --- */
.projects-editorial .project-card[data-type*="website"]:hover .project-preview {
  box-shadow: 0 30px 70px rgba(0, 255, 231, 0.18), 0 0 60px rgba(0, 255, 231, 0.08);
}

.projects-editorial .project-card[data-type*="app"]:hover .project-preview {
  box-shadow: 0 30px 70px rgba(79, 195, 255, 0.18), 0 0 60px rgba(79, 195, 255, 0.08);
}

.projects-editorial .project-card[data-type*="script"]:hover .project-preview {
  box-shadow: 0 30px 70px rgba(180, 124, 255, 0.18), 0 0 60px rgba(180, 124, 255, 0.08);
}

.projects-editorial .project-card[data-type*="concept"]:hover .project-preview {
  box-shadow: 0 30px 70px rgba(255, 107, 157, 0.18), 0 0 60px rgba(255, 107, 157, 0.08);
}

/* --- Editorial View — Display-size Title Upgrade --- */
.projects-editorial .project-card h3 {
  font-family: 'Space Grotesk', 'Outfit', sans-serif;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
}

/* --- Compact View — Category Left Border --- */
.projects-compact .project-card[data-type*="website"] {
  border-left: 3px solid var(--color-website);
}

.projects-compact .project-card[data-type*="app"] {
  border-left: 3px solid var(--color-app);
}

.projects-compact .project-card[data-type*="script"] {
  border-left: 3px solid var(--color-script);
}

.projects-compact .project-card[data-type*="concept"] {
  border-left: 3px solid var(--color-concept);
}

/* --- About Section — Split Layout --- */
.about-split-layout {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
  text-align: left;
  margin-bottom: 3rem;
}

.about-quote-col {
  flex: 0 0 260px;
}

.about-text-col {
  flex: 1;
}

.about-pull-quote {
  font-family: 'Space Grotesk', 'Outfit', sans-serif;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding-left: 1.4rem;
  margin: 0;
  letter-spacing: -0.3px;
  text-shadow: 0 0 25px rgba(0, 255, 231, 0.25);
  font-style: normal;
}

html.light-mode .about-pull-quote {
  text-shadow: none;
}

html.ancient-mode .about-pull-quote {
  color: var(--accent);
  border-left-color: var(--accent);
  text-shadow: 0 0 25px rgba(238, 184, 104, 0.2);
}

/* --- Traits Grid --- */
.traits-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.6rem;
}

.trait-pill {
  font-size: 0.78rem;
  font-weight: 600;
  font-family: 'Space Grotesk', 'Outfit', sans-serif;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 0.32rem 0.85rem;
  border-radius: 30px;
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease, transform 0.2s ease;
  cursor: default;
}

.trait-pill:hover {
  color: var(--accent);
  border-color: rgba(0, 255, 231, 0.3);
  background: rgba(0, 255, 231, 0.05);
  transform: translateY(-2px);
}

html.light-mode .trait-pill {
  color: var(--text-muted);
  border-color: rgba(10, 25, 47, 0.15);
}

html.light-mode .trait-pill:hover {
  color: var(--accent-alt);
  border-color: rgba(37, 99, 235, 0.3);
  background: rgba(37, 99, 235, 0.05);
}

html.ancient-mode .trait-pill {
  border-color: rgba(238, 184, 104, 0.15);
  color: var(--text-muted);
}

html.ancient-mode .trait-pill:hover {
  color: var(--accent);
  border-color: rgba(238, 184, 104, 0.4);
  background: rgba(238, 184, 104, 0.05);
}

@media (max-width: 768px) {
  .about-split-layout {
    flex-direction: column;
    gap: 2rem;
  }

  .about-quote-col {
    flex: none;
  }

  .about-section .content-wrapper {
    text-align: left;
  }
}

/* --- Availability Indicator in Contact --- */
.availability-indicator {
  display: flex;
  width: max-content;
  margin-left: auto;
  margin-right: auto;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: 'Space Grotesk', 'Outfit', sans-serif;
  letter-spacing: 0.5px;
  color: #2ed573;
  margin-bottom: 2rem;
  padding: 0.5rem 1.25rem;
  border-radius: 30px;
  background: rgba(46, 213, 115, 0.07);
  border: 1px solid rgba(46, 213, 115, 0.2);
}

.avail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ed573;
  flex-shrink: 0;
  animation: availPulse 2.2s ease-in-out infinite;
}

@keyframes availPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(46, 213, 115, 0.5);
  }

  50% {
    box-shadow: 0 0 0 7px rgba(46, 213, 115, 0);
  }
}

html.ancient-mode .availability-indicator {
  color: var(--accent);
  background: rgba(238, 184, 104, 0.07);
  border-color: rgba(238, 184, 104, 0.2);
}

html.ancient-mode .avail-dot {
  background: var(--accent);
}

@keyframes availPulseAncient {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(238, 184, 104, 0.5);
  }

  50% {
    box-shadow: 0 0 0 7px rgba(238, 184, 104, 0);
  }
}

html.ancient-mode .avail-dot {
  animation-name: availPulseAncient;
}

/* Contact Button Mobile Flip Animation */
@media (max-width: 768px) {

  .btn-primary .original,
  .btn-primary .reveal-text {
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }

  .btn-primary .original {
    animation: swapTextOriginal 4s infinite ease-in-out;
  }

  .btn-primary .reveal-text {
    animation: swapTextReveal 4s infinite ease-in-out;
  }

  @keyframes swapTextOriginal {

    0%,
    40% {
      opacity: 1;
      transform: scale(1);
    }

    45%,
    50% {
      opacity: 0;
      transform: scale(0.9);
    }

    50%,
    95% {
      opacity: 0;
      transform: scale(0.9);
    }

    100% {
      opacity: 1;
      transform: scale(1);
    }
  }

  @keyframes swapTextReveal {

    0%,
    40% {
      opacity: 0;
      transform: translateY(-55%) scale(0.9);
    }

    45%,
    50% {
      opacity: 1;
      transform: translateY(-55%) scale(1);
    }

    50%,
    95% {
      opacity: 1;
      transform: translateY(-55%) scale(1);
    }

    100% {
      opacity: 0;
      transform: translateY(-55%) scale(0.9);
    }
  }

  .fab-contact {
    bottom: max(35px, env(safe-area-inset-bottom));
    right: 20px;
  }
}

/* Hide Custom Cursors on Mobile/Touch Devices */
@media (pointer: coarse),
(max-width: 768px) {

  .custom-cursor,
  .cursor-particle,
  .cursor-light {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }
}
/* --- Project Link Menu --- */
.project-link-menu {
  background: rgba(10, 25, 47, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.project-link-menu-item {
  color: var(--text-light);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 4px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  transition: background 0.2s;
  display: block;
}
.project-link-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}
html.light-mode .project-link-menu {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(10, 25, 47, 0.1);
}
html.light-mode .project-link-menu-item {
  color: var(--text-light);
}
html.light-mode .project-link-menu-item:hover {
  background: rgba(10, 25, 47, 0.05);
}
