@import url("./vars.css");

/* Modern CSS Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  color-scheme: var(--accent-primary), var(--accent-secondary);
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  height: 100%;
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: var(--font-family-primary);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  position: relative;
  min-height: 100%;

  /* Subtle animated background */
  background: linear-gradient(
    135deg,
    var(--bg-primary) 0%,
    #121212 50%,
    var(--bg-primary) 100%
  );
  background-size: 200% 200%;
  animation: gradientShift 20s ease-in-out infinite alternate;

  transition: all var(--transition-normal);
}

/* Utility Classes */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.glass-effect {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glow-effect {
  box-shadow: 0 0 20px rgba(var(--primary-rgb, 0, 255, 204), 0.3);
}

.hover-lift {
  transition: transform var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-4px);
}

.gradient-text {
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Modern Keyframe Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s var(--animation-smooth) forwards;
}

.animate-fade-in-scale {
  animation: fadeInScale 0.4s var(--animation-bounce) forwards;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

/* Skip Link */
.skip-link {
  position: fixed;
  top: -100px;
  left: var(--space-md);
  background: var(--accent-primary);
  color: var(--bg-primary);
  padding: var(--space-sm) var(--space-md);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-medium);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-tooltip);
  transform: translateY(-150px);
  transition: all var(--transition-normal) var(--animation-smooth);
}

.skip-link:focus {
  transform: translateY(var(--space-md));
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

/* Focus Management */
:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Icon buttons for accessibility */
.icon-button {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.icon-button:hover,
.icon-button:focus {
  background-color: var(--hover-bg-primary);
  color: var(--accent-primary);
  outline: var(--focus-outline);
  outline-offset: 2px;
}

* {
  cursor: none;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

a {
  color: #8581fe;
}

/*Focus style*/
body.keyboardnav button:focus,
body.keyboardnav a:focus,
body.keyboardnav input:focus,
body.keyboardnav textarea:focus,
body.keyboardnav canvas:focus,
body.keyboardnav .item:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
body.light-mode.keyboardnav button:focus,
body.light-mode.keyboardnav a:focus,
body.light-mode.keyboardnav input:focus,
body.light-mode.keyboardnav textarea:focus,
body.light-mode.keyboardnav canvas:focus,
body.light-mode.keyboardnav .item:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/*Cursor*/
.custom-cursor {
  position: fixed;
  z-index: var(--z-cursor);
  top: 0;
  left: 0;
  width: var(--cursor-size);
  height: var(--cursor-size);
  border: calc(var(--cursor-size) / 30) solid var(--accent-primary);
  border-radius: 50%;
  animation: cursor 1500ms infinite alternate ease-in-out;
  pointer-events: none;
  box-shadow: 0 0 10px var(--accent-primary);
  will-change: transform;
}

body.light-mode .custom-cursor {
  border: calc(var(--cursor-size) / 30) solid var(--accent-primary);
  animation: cursor-lm 1500ms infinite alternate ease-in-out;
  box-shadow: 0 0 10px rgba(51, 51, 51, 0.3);
}

.custom-cursor::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border: 2px solid var(--bg-primary);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 0 5px var(--accent-primary);
}

body.light-mode .custom-cursor::before {
  border: 2px solid var(--bg-primary);
  background-color: var(--accent-primary);
  box-shadow: 0 0 5px rgba(51, 51, 51, 0.5);
}

.custom-cursor.click {
  animation: cursor-click 1500ms normal ease-in-out;
}

@keyframes cursor {
  from {
    transform: scale(1);
    border-color: #fff;
  }
  to {
    transform: scale(1.25);
    border-color: rgb(var(--color));
  }
}

@keyframes cursor-lm {
  from {
    transform: scale(1);
    border-color: var(--accent-primary);
  }
  to {
    transform: scale(1.25);
    border-color: rgb(var(--color));
  }
}

@keyframes cursor-before {
  from {
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    transform: translate(-50%, -50%) scale(1.5);
  }
}

@keyframes cursor-click {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.5);
  }
}

/*Selection*/
body *::selection {
  background-color: var(--accent-primary);
  color: var(--dark-bg);
}

body.light-mode *::selection {
  background-color: var(--accent-primary);
  color: var(--bg-primary);
}

/* Light Mode Styles */
body.light-mode {
  --bg-primary: var(--light-bg);
  --bg-secondary: var(--white);
  --bg-tertiary: var(--gray-lightest);
  --text-primary: var(--black);
  --text-secondary: var(--gray-dark);
  --text-muted: var(--gray-medium);
  --accent-primary: var(--black);
  --accent-secondary: var(--gray-dark);
  --accent-tertiary: var(--gray-dark);

  --shadow-color: rgba(51, 51, 51, 0.1);
  --shadow-sm: 0 2px 4px var(--shadow-color);
  --shadow-md: 0 4px 12px rgba(51, 51, 51, 0.15);
  --shadow-lg: 0 8px 24px rgba(51, 51, 51, 0.2);
  --shadow-xl: 0 12px 40px rgba(51, 51, 51, 0.25);

  --hover-bg-primary: rgba(0, 85, 170, 0.1);
  --hover-bg-secondary: rgba(0, 85, 170, 0.05);
  --focus-outline: 2px solid var(--accent-primary);
  --card-hover-shadow: 0 0 20px var(--accent-secondary);
  --button-primary-bg: var(--accent-primary);
  --button-primary-color: var(--bg-primary);
  --button-primary-hover: var(--accent-secondary);

  background-color: var(--bg-primary);
  color: var(--text-primary);
  animation: lm-gradientShift 10s infinite alternate ease-in-out;
}

@keyframes lm-gradientShift {
  0% {
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
  }
  50% {
    background: linear-gradient(135deg, #f0f0f0, var(--bg-secondary));
  }
  100% {
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
  }
}

/* Global Transitions - More controlled approach */
* {
  transition:
    color var(--transition-normal),
    background-color var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-fast);
}

/* Modern CSS Features */

/* Scroll-driven animations support */
@media (prefers-reduced-motion: no-preference) {
  .parallax-element {
    animation: parallax linear;
    animation-timeline: scroll();
  }

  @keyframes parallax {
    to {
      transform: translateY(-20px);
    }
  }
}

/* Container Query Support (where supported) */
@container (min-width: 400px) {
  .card {
    padding: var(--space-2xl);
  }
}

/* Modern scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--accent-primary), var(--accent-secondary));
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(var(--accent-secondary), var(--accent-primary));
}

/* Firefox scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) var(--bg-secondary);
}

video {
  max-width: 100%;
  max-height: 100%;
}

/*Site CSS start*/
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) var(--space-xl);
  z-index: var(--z-sticky);
  width: 100%;

  background: rgba(13, 13, 13, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 255, 204, 0.1);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.1),
    0 0 20px rgba(0, 255, 204, 0.05);

  transition: all var(--transition-normal);
}

/* Offset main content to account for fixed header. Uses --header-offset (set by JS) with a sensible fallback */
.main-content,
main#main-content {
  padding-top: var(--header-offset, 88px);
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 255, 204, 0.1) 0%,
    transparent 50%,
    rgba(125, 249, 255, 0.05) 100%
  );
  z-index: var(--z-negative);
}

/* Light Mode Header */
body.light-mode header {
  background: rgba(248, 248, 248, 0.9);
  border-bottom: 1px solid rgba(0, 85, 170, 0.1);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.05),
    0 0 20px rgba(0, 85, 170, 0.1);
}

body.light-mode header::before {
  background: linear-gradient(
    135deg,
    rgba(0, 85, 170, 0.1) 0%,
    transparent 50%,
    rgba(0, 85, 170, 0.05) 100%
  );
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  color: var(--accent-primary);
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: scale(1.05);
}

.logo a img {
  filter: drop-shadow(0 0 8px rgba(0, 255, 204, 0.3));
  transition: filter var(--transition-normal);
}

.logo:hover a img {
  filter: drop-shadow(0 0 12px rgba(0, 255, 204, 0.5));
}

.logo a img {
  width: 150px;
  min-width: 150px;
  height: auto;
}

.logo a {
  display: block;
  text-decoration: none;
  outline: none;
}

.logo a:focus {
  outline: 2px solid var(--accent-color);
}

/* Navigation Menu */
nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin: 0;
  border-radius: 15px;
}

body.light-mode nav ul {
  background-color: rgba(248, 248, 248, 0.8);
}

.menu-footer {
  display: none;
}

nav ul li {
  display: inline;
}

nav ul li a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-size: 1rem;
}

nav ul li a:hover {
  color: var(--bg-primary);
  background-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
}

/* Active Section Navigation */
nav ul li a.active {
  color: var(--bg-primary);
  background-color: var(--accent-primary);
  box-shadow: 0 0 15px var(--accent-primary);
  position: relative;
}

nav ul li a.active::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background-color: var(--accent-primary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 255, 204, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 255, 204, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 204, 0);
  }
}

.burger {
  display: none;
}

.burger i {
  font-size: 1.5rem;
  color: var(--text-primary);
}

body.light-mode .burger i {
  color: var(--text-primary);
}

.icons {
  display: flex;
  gap: 1rem;
}

.icons i {
  color: var(--accent-primary);
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.icons i:hover {
  color: var(--accent-secondary);
}

.mode-toggle {
  background-color: var(--accent-primary);
  color: var(--bg-primary);
  border: none;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  transition: background-color 0.3s ease;
  box-shadow: 0 0 10px var(--accent-primary);
  border-radius: 30px;
}

body.light-mode .mode-toggle {
  background-color: var(--accent-primary);
  color: var(--white);
  box-shadow: 0 0 10px var(--accent-primary);
}

.mode-toggle:hover {
  background-color: var(--accent-secondary);
  box-shadow: 0 0 20px var(--accent-secondary);
}

section {
  padding: 2rem;
  text-align: center;
}

.intro {
  background-color: var(--bg-secondary);
  color: var(--accent-primary);
  border-radius: 50px;
  padding: 5rem 0;
  margin: 20px;
  margin-top: 100px;
  box-shadow: 0 0 20px var(--accent-primary);
}

#intro-header {
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid var(--accent-primary);
  display: inline-block;
  animation: blinkCursor 0.8s infinite;
}

@keyframes blinkCursor {
  50% {
    border-color: transparent;
  }
}

.intro h1 {
  font-size: 3rem;
  margin: 0;
  animation: fadeIn 2s ease-in-out;
}

.intro p {
  font-size: 1.5rem;
  animation: fadeIn 3s ease-in-out;
}

.intro button {
  background-color: var(--accent-primary);
  color: var(--bg-primary);
  border: none;
  padding: 1rem 2rem;
  margin-top: 32px;
  font-size: 1rem;
  transition: background-color 0.3s ease;
  animation: fadeIn 4s ease-in-out;
  box-shadow: 0 0 10px var(--accent-primary);
  border-radius: 30px;
  border: var(--bg-primary) 2px solid;
}

.intro button:hover {
  background-color: var(--accent-secondary);
  box-shadow: 0 0 20px var(--accent-secondary);
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

.clock {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--accent-primary);
  text-shadow: 0 0 10px var(--accent-primary);
}

/* Section dividers */
.styled-hr {
  border: none;
  height: 1px;
  background: none;
  margin: var(--space-3xl) auto;
  max-width: 200px;
  position: relative;
  overflow: visible;
}

.styled-hr::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent-primary) 20%,
    var(--accent-secondary) 50%,
    var(--accent-primary) 80%,
    transparent 100%
  );
  box-shadow: 0 0 10px var(--accent-primary);
}

.styled-hr::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  box-shadow:
    0 0 15px var(--accent-primary),
    inset 0 0 8px rgba(255, 255, 255, 0.3);
  animation: divider-pulse 4s ease-in-out infinite alternate;
}

@keyframes divider-pulse {
  0% {
    box-shadow:
      0 0 15px var(--accent-primary),
      inset 0 0 8px rgba(255, 255, 255, 0.3);
  }
  100% {
    box-shadow:
      0 0 25px var(--accent-primary),
      0 0 40px var(--accent-secondary),
      inset 0 0 12px rgba(255, 255, 255, 0.4);
  }
}

/* Light Mode Dividers */
body.light-mode .styled-hr::before {
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent-primary) 20%,
    var(--accent-secondary) 50%,
    var(--accent-primary) 80%,
    transparent 100%
  );
  box-shadow: 0 0 10px var(--accent-primary);
}

body.light-mode .styled-hr::after {
  background: var(--accent-primary);
  box-shadow:
    0 0 15px var(--accent-primary),
    inset 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Interactive Divider Hover Effects */
.styled-hr:hover::before {
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--secondary-color) 15%,
    var(--primary-color) 35%,
    var(--secondary-color) 65%,
    var(--primary-color) 85%,
    transparent 100%
  );
  box-shadow: 0 0 20px rgba(0, 255, 204, 0.8);
}

.styled-hr:hover::after {
  transform: translate(-50%, -50%) scale(1.2);
  box-shadow:
    0 0 30px var(--primary-color),
    0 0 50px rgba(0, 255, 204, 0.5),
    inset 0 0 15px rgba(255, 255, 255, 0.5);
}

#about p {
  text-align: center;
}

/* Inventory section */
.inventory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: var(--space-lg);
  padding: var(--space-2xl);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  margin-top: 48px;
  position: relative;
  overflow: visible;

  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 255, 204, 0.2);
  box-shadow: var(--shadow-lg);
}

body.light-mode .inventory {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.7) 100%
  );
  border: 1px solid rgba(0, 85, 170, 0.2);
  box-shadow: 0 4px 24px rgba(0, 85, 170, 0.1);
}

/* Inventory items */
.item {
  position: relative;
  width: 100px;
  height: 100px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal) var(--animation-smooth);
  border: 2px solid transparent;
  overflow: visible;

  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Hover shimmer effect */
.item.has-tooltip::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 255, 204, 0.2),
    transparent
  );
  transition: width 0.5s ease;
  z-index: var(--z-negative);
  overflow: hidden;
}

body.light-mode .item {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(248, 248, 248, 0.6) 100%
  );
  border-color: rgba(0, 85, 170, 0.1);
}

.item:hover,
.item.active {
  transform: scale(1.08) rotateY(5deg);
  border-color: var(--accent);
  box-shadow:
    var(--shadow-xl),
    0 0 30px rgba(0, 255, 204, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  background: linear-gradient(
    135deg,
    rgba(0, 255, 204, 0.1) 0%,
    rgba(0, 255, 204, 0.05) 100%
  );
}

.item.has-tooltip:hover::before,
.item.has-tooltip.active::before {
  left: 100%;
}

body.light-mode .item:hover,
body.light-mode .item.active {
  border-color: var(--accent-primary);
  box-shadow:
    0 8px 32px rgba(0, 85, 170, 0.2),
    0 0 30px rgba(0, 85, 170, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  background: linear-gradient(
    135deg,
    rgba(0, 85, 170, 0.1) 0%,
    rgba(0, 85, 170, 0.05) 100%
  );
}

/* Focus states for accessibility */
.item:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body.light-mode .item:focus {
  outline-color: var(--accent-primary);
}

/* Tooltips inventory */
.inventory .item {
  position: relative;
}

.inventory .item.has-tooltip:hover {
  z-index: var(--z-tooltip);
}

.inventory .item.has-tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: var(--z-tooltip);
  pointer-events: none;
  max-width: 90vw;
  min-width: max-content;
}

.inventory .item.has-tooltip:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Tooltip activation for mobile on click */
.inventory .item.has-tooltip.tooltip-active::before {
  opacity: 1;
  visibility: visible;
}

.inventory .item.has-tooltip.tooltip-active {
  z-index: var(--z-tooltip);
}

.inventory .item.has-tooltip::after {
  content: "";
  position: absolute;
  bottom: 110%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: var(--z-tooltip);
}

.inventory .item.has-tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

.inventory .item.has-tooltip.tooltip-active::after {
  opacity: 1;
  visibility: visible;
}

body.light-mode .inventory .item.has-tooltip::before {
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  border: 1px solid #ddd;
}

body.light-mode .inventory .item.has-tooltip::after {
  border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
}

/* Clean up - remove debug styles */

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .inventory .item .tooltip {
    bottom: 130%;
    font-size: 12px;
    padding: 6px 10px;
  }
}

.item img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  transition: all var(--transition-normal) var(--animation-smooth);
}

.item:hover img {
  transform: scale(1.1);
  filter: brightness(1.1) drop-shadow(0 0 8px rgba(0, 255, 204, 0.3));
}

body.light-mode .item:hover img {
  filter: brightness(1.1) drop-shadow(0 0 8px rgba(0, 85, 170, 0.3));
}

@media (max-width: 768px) {
  .inventory {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: var(--space-md);
    padding: var(--space-lg);
  }

  .item {
    width: 90px;
    height: 90px;
  }

  .item img {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .inventory {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: var(--space-sm);
    padding: var(--space-md);
  }

  .item {
    width: 80px;
    height: 80px;
  }

  .item img {
    width: 45px;
    height: 45px;
  }
}

/* Inventory loading animation */
.inventory .item {
  animation: inventoryItemFadeIn 0.6s var(--animation-smooth) forwards;
  opacity: 0;
}

.inventory .item:nth-child(1) {
  animation-delay: 0.1s;
}
.inventory .item:nth-child(2) {
  animation-delay: 0.15s;
}
.inventory .item:nth-child(3) {
  animation-delay: 0.2s;
}
.inventory .item:nth-child(4) {
  animation-delay: 0.25s;
}
.inventory .item:nth-child(5) {
  animation-delay: 0.3s;
}
.inventory .item:nth-child(6) {
  animation-delay: 0.35s;
}
.inventory .item:nth-child(7) {
  animation-delay: 0.4s;
}
.inventory .item:nth-child(8) {
  animation-delay: 0.45s;
}
.inventory .item:nth-child(9) {
  animation-delay: 0.5s;
}
.inventory .item:nth-child(10) {
  animation-delay: 0.55s;
}
.inventory .item:nth-child(n + 11) {
  animation-delay: 0.6s;
}

@keyframes inventoryItemFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/*Footer*/
footer {
  text-align: center;
  padding: 20px;
  background-color: var(--bg-primary);
  color: var(--accent-primary);
}

footer a {
  color: var(--accent-primary);
  text-decoration: none;
  margin: 0 10px;
  padding: 5px;
  border-radius: 10px;
}

footer a:hover {
  text-decoration: underline;
  background-color: var(--accent-primary);
  color: var(--bg-primary);
}

#skills {
  padding: 2rem 0;
}

/* Orbity Tag Cloud Tooltip */

.myCanvasContainer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 700px;
  height: fit-content;
  margin: 0 auto;
  padding: var(--space-lg);
}

#orbityCanvas {
  width: 100% !important;
  height: auto !important;
  max-width: 700px;
  aspect-ratio: 1;
  display: block;
}

#orbity-tooltip {
  position: relative;
  display: none;
  margin: 24px auto 0 auto;
  width: 100%;
  max-width: 400px;
  min-height: 48px;
  padding: 12px 20px;
  background: linear-gradient(
    135deg,
    var(--bg-primary) 80%,
    var(--bg-secondary) 100%
  );
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
  border-radius: 12px;
  font-family: "Orbitron", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  box-shadow:
    0 0 18px var(--accent-primary),
    0 0 2px var(--accent-primary);
  text-align: center;
  z-index: var(--z-tooltip);
  pointer-events: none;
  opacity: 1;
  transition: box-shadow 0.3s;
}

#orbity-tooltip[style*="display: block"] {
  display: block;
}

/*Contact form*/
#contact-form {
  display: flex;
  flex-direction: column;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

#contact-form label {
  margin-top: 10px;
}

#contact-form input,
#contact-form textarea {
  padding: 15px;
  margin-top: 8px;
  border: 2px solid var(--accent-primary);
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  box-shadow: 0 0 10px var(--accent-primary);
  border-radius: 8px;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
  transition:
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.captcha-group {
  gap: 0.75rem;
}

.captcha-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid rgba(0, 255, 204, 0.25);
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(0, 255, 204, 0.08),
    rgba(18, 18, 18, 0.2)
  );
  box-shadow: 0 0 16px rgba(0, 255, 204, 0.12);
}

.captcha-question {
  font-weight: 600;
  color: var(--text-primary);
}

.captcha-refresh {
  justify-self: start;
  padding: 0.7rem 1rem;
  border: 1px solid var(--accent-primary);
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.captcha-refresh:hover,
.captcha-refresh:focus-visible {
  background: var(--accent-primary);
  color: var(--bg-primary);
  box-shadow: 0 0 12px var(--accent-primary);
}

.captcha-start {
  justify-self: start;
  padding: 0.8rem 1.2rem;
  border: 2px solid var(--accent-primary);
  border-radius: 8px;
  background: var(--accent-primary);
  color: var(--bg-primary);
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s ease;
}

.captcha-start:hover,
.captcha-start:focus-visible {
  background: var(--accent-secondary);
  border-color: var(--accent-secondary);
  box-shadow: 0 0 18px var(--accent-secondary);
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#contact-form input:focus,
#contact-form textarea:focus {
  outline: none;
  box-shadow: 0 0 15px var(--accent-primary);
  border-color: var(--accent-secondary);
}

#contact-form button {
  margin-top: 25px;
  padding: 15px 30px;
  background-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 200px;
  align-self: center;
}

#contact-form button:hover {
  background-color: var(--accent-secondary);
  box-shadow: 0 0 20px var(--accent-secondary);
  transform: translateY(-2px);
}

/*Contact form error*/
.input-error {
  border-color: #ff4d4d !important;
  box-shadow: 0 0 10px #ff4d4d !important;
  animation: shake 0.3s;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-5px);
  }
  100% {
    transform: translateX(0);
  }
}

.form-error-msg {
  color: #ff4d4d;
  font-size: 0.9rem;
  height: 1.2rem;
  margin-top: 5px;
  display: block;
}

/* Modern Project Cards with CSS Grid */
.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: var(--space-xl);
  padding: var(--space-2xl) 0;
  max-width: var(--container-max-width);
  margin: 0 auto;
}

.card {
  position: relative;
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: all var(--transition-normal) var(--animation-smooth);

  /* Modern glass morphism effect */
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    var(--shadow-md),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 255, 204, 0.1),
    transparent
  );
  transition: left 0.5s;
  z-index: var(--z-negative);
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    var(--shadow-xl),
    0 0 30px rgba(0, 255, 204, 0.3);
}

.card:hover::before {
  left: 100%;
}

.card:focus-visible {
  transform: translateY(-4px);
  box-shadow:
    var(--shadow-lg),
    0 0 0 3px var(--primary-color);
}

.card h3 {
  margin-bottom: var(--space-sm);
  font-weight: var(--font-weight-bold);
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.card img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: var(--space-md);
}

.card .card-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.card .card-meta .tag-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.card .card-meta .project-cta {
  background: transparent;
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 5px;
  border: 2px solid var(--text-primary);
  cursor: pointer;
}

.card .card-meta .project-cta:focus,
.card .card-meta .project-cta:hover {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 10px var(--accent-primary);
  transition: background-color 0.3s ease;
  text-decoration: underline;
}

.see-all-home {
  display: inline-block;
  margin: 1rem auto 0;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: 2px solid var(--accent-primary);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
}
.see-all-home:hover,
.see-all-home:focus {
  background: var(--accent-primary);
  color: var(--bg-primary);
  box-shadow: 0 6px 18px rgba(0, 255, 204, 0.12);
  outline: none;
}

/* Light Mode Cards */
body.light-mode .card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.7) 100%
  );
  color: var(--text-primary);
  border: 1px solid rgba(0, 85, 170, 0.1);
  box-shadow:
    0 4px 12px rgba(0, 85, 170, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--card-hover-shadow);
}

/* Socials */
.socials {
  display: flex;
  justify-content: space-evenly;
}

.socials a i {
  font-size: 5rem;
  color: var(--accent-primary);
  transition: color 0.3s ease;
}

.socials a:hover {
  box-shadow: none;
}

.socials a i:hover {
  color: var(--accent-secondary);
}

/* Section layout */
.section {
  padding: var(--space-3xl) var(--space-lg);
  max-width: var(--container-max-width);
  margin: 0 auto;

  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s var(--animation-smooth);

  position: relative;
}

.section::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 120px;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--text-primary) 20%,
    var(--text-secondary) 50%,
    var(--text-primary) 80%,
    transparent 100%
  );
  transform: translateX(-50%);
  border-radius: 2px;
  box-shadow: 0 0 20px rgba(0, 255, 204, 0.4);
  opacity: 0.8;
  animation: pulse-glow 3s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.4);
    opacity: 0.8;
  }
  100% {
    box-shadow: 0 0 30px rgba(0, 255, 204, 0.6);
    opacity: 1;
  }
}

/* Visible state with staggered animations */
.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: var(--space-lg);
  text-align: center;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Back to top button */
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--accent-primary);
  color: var(--bg-primary);
  border: none;
  padding: 10px 15px;
  font-size: 20px;
  border-radius: 50%;
  display: none;
  box-shadow: 0 0 10px var(--accent-primary);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  z-index: var(--z-fixed);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#back-to-top:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px var(--accent-primary);
}

body.light-mode #back-to-top {
  background-color: var(--accent-primary);
  color: var(--bg-primary);
  box-shadow: 0 0 10px var(--accent-primary);
}

body.light-mode #back-to-top:hover {
  background-color: var(--accent-secondary);
  box-shadow: 0 0 20px var(--accent-secondary);
}

/* Keyframes for fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive styles */
@media (max-width: 940px) {
  #about p {
    text-align: justify;
  }
  #Vscode-tooltip {
    left: 150%;
  }
  #Filezilla-tooltip {
    left: 75%;
  }
  #Combell-tooltip,
  #Youtube-tooltip {
    left: 100%;
  }
  #Github-tooltip,
  #Piskel-tooltip {
    left: 20%;
  }
  #Rpgmakervxace-tooltip,
  #Colorhex-tooltip {
    left: -50%;
  }
}

/* Additional form for accessibility styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-error-msg {
  display: block;
  color: #e74c3c;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  min-height: 1.2rem;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #e74c3c;
  box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

/* Enhanced button for accessibility */
.cta-button,
.submit-button {
  position: relative;
  padding: 12px 24px;
  background: var(--primary-color);
  color: var(--text-light);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-weight: 500;
}

.cta-button:hover,
.submit-button:hover {
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  transform: translateY(2px);
}

.cta-button:focus,
.submit-button:focus,
.cta-button:focus-visible,
.submit-button:focus-visible {
  color: var(--text-primary);
  box-shadow: 0 0 10px var(--accent-primary);
  background-color: var(--bg-primary);
  border: 2px solid var(--primary-color);
  transform: translateY(-2px);
}

/* Social links for accessibility */
.socials a:hover,
.socials a:focus {
  transform: scale(1.1);
  outline: 2px solid var(--accent-primary);
  outline-offset: 4px;
}
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: none;
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--accent-primary);
  padding: 14px 28px;
  z-index: var(--z-cookie-banner);
  box-shadow:
    0 0 20px rgba(0, 255, 204, 0.25),
    0 0 4px rgba(0, 255, 204, 0.4);
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

#cookie-banner[style*="display: flex"] {
  display: flex !important;
}

#cookie-banner p {
  margin: 0;
  flex: 1 1 420px;
  line-height: 1.35;
}

#cookie-banner a {
  color: var(--accent-secondary);
  text-decoration: underline;
}

#cookie-banner a:hover {
  text-decoration: none;
}

body.light-mode #cookie-banner {
  background: rgba(248, 248, 248, 0.95);
  color: var(--text-primary);
  box-shadow:
    0 0 18px rgba(0, 85, 170, 0.25),
    0 0 4px rgba(0, 85, 170, 0.4);
}

#accept-cookies {
  margin: 0;
  padding: 10px 22px;
  background: var(--accent-primary);
  border: none;
  color: var(--bg-primary);
  cursor: pointer;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.25s;
  box-shadow: 0 0 14px var(--accent-primary);
}

#accept-cookies:hover {
  background: var(--button-primary-hover);
  box-shadow: 0 0 22px var(--button-primary-hover);
  transform: translateY(-2px);
}

#reject-cookies {
  margin: 0;
  padding: 10px 22px;
  background: transparent;
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  cursor: pointer;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease,
    color 0.3s ease,
    transform 0.25s;
  box-shadow: 0 0 12px rgba(0, 255, 204, 0.35);
}

body.light-mode #reject-cookies {
  background: transparent;
  color: var(--accent-secondary);
  border-color: var(--accent-secondary);
  box-shadow: 0 0 12px rgba(0, 85, 170, 0.35);
}

#reject-cookies:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
  box-shadow: 0 0 22px var(--accent-primary);
  transform: translateY(-2px);
}

body.light-mode #reject-cookies:hover {
  background: var(--accent-secondary);
  color: var(--bg-primary);
  box-shadow: 0 0 22px var(--accent-secondary);
  transform: translateY(-2px);
}

/* Project modal styles */
.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: var(--z-modal);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-modal[aria-hidden="false"] {
  display: flex;
  opacity: 1;
}

.project-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
}

body.light-mode .project-modal-overlay {
  background: rgba(0, 0, 0, 0.3);
}

.project-modal-content {
  background: var(--bg-secondary);
  border: 2px solid var(--accent-primary);
  border-radius: 15px;
  max-width: 90vw;
  max-height: 90vh;
  width: 800px;
  /* Keep modal content from collapsing when images or dynamic content load */
  min-height: 60vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 255, 204, 0.3);
  animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-mode .project-modal-content {
  background: var(--bg-primary);
  border: 2px solid var(--accent-primary);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.project-modal-close,
.lightbox-close {
  width: 48px;
  height: 48px;
  position: fixed;
  top: 18px;
  right: 18px;
  background: rgba(13, 13, 13, 0.8);
  border: 2px solid var(--text-primary);
  font-size: 1.5rem;
  color: var(--text-primary);
  z-index: var(--z-modal);
  border-radius: 50%;
  transition: all 0.3s ease;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0;
  margin: 0;
  font-family: "Arial", sans-serif;
  font-weight: bold;
  text-align: center;
  line-height: 44px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 0 12px rgba(0, 255, 204, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.light-mode .project-modal-close,
body.light-mode .lightbox-close {
  background: rgba(248, 248, 248, 0.9);
  border: 2px solid var(--bg-primary);
  color: var(--bg-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.project-modal-close:hover,
.project-modal-close:focus,
.lightbox-close:hover,
.lightbox-close:focus {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
  transform: scale(1.1) rotate(90deg);
  box-shadow:
    0 0 24px var(--accent-primary),
    0 0 12px rgba(0, 255, 204, 0.5);
}

body.light-mode .project-modal-close:hover,
body.light-mode .project-modal-close:focus,
body.light-mode .lightbox-close:hover,
body.light-mode .lightbox-close:focus {
  background: var(--blue-primary);
  color: var(--white);
  border-color: var(--blue-primary);
  box-shadow:
    0 0 24px rgba(0, 85, 170, 0.5),
    0 4px 20px rgba(0, 85, 170, 0.3);
}

/* Modal header */
.project-modal-header {
  position: relative;
  margin-bottom: 2rem;
}

.project-hero-image {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  border-radius: 15px 15px 0 0;
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--hover-color) 100%
  );
}

body.light-mode .project-hero-image {
  background: linear-gradient(
    135deg,
    var(--text-primary) 0%,
    var(--accent-secondary) 100%
  );
}

.project-modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-modal-image:hover {
  transform: scale(1.05);
}

.project-stats {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: flex;
  gap: 20px;
  background: rgba(13, 13, 13, 0.9);
  padding: 15px 20px;
  border-radius: 10px;
  border: 1px solid var(--accent-primary);
}

body.light-mode .project-stats {
  background: rgba(248, 248, 248, 0.95);
  border: 1px solid var(--text-primary);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--accent-primary);
  opacity: 0.8;
  margin-bottom: 2px;
}

body.light-mode .stat-label {
  color: var(--text-primary);
}

.stat-value {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--accent-primary);
}

body.light-mode .stat-value {
  color: var(--text-primary);
}

.project-header-content {
  padding: 30px;
  padding-bottom: 0;
}

.project-modal-title {
  font-size: 2.2rem;
  margin: 0 0 10px 0;
  color: var(--accent-primary);
  font-weight: bold;
}

body.light-mode .project-modal-title {
  color: var(--text-primary);
}

.project-modal-subtitle {
  font-size: 1.1rem;
  color: var(--accent-primary);
  opacity: 0.8;
  margin: 0;
  font-style: italic;
}

body.light-mode .project-modal-subtitle {
  color: var(--text-secondary);
}

/* Modal body */
.project-modal-body {
  padding: 0 30px 20px;
}

.project-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0, 255, 204, 0.2);
}

body.light-mode .project-section {
  border-bottom: 1px solid rgba(0, 85, 170, 0.2);
}

.project-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.project-section h3 {
  color: var(--accent-primary);
  font-size: 1.3rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

body.light-mode .project-section h3 {
  color: var(--text-primary);
}

.project-section h3::before {
  content: "";
  width: 4px;
  height: 20px;
  background: var(--accent-primary);
  border-radius: 2px;
}

body.light-mode .project-section h3::before {
  background: var(--accent-primary);
}

.project-modal-problem {
  color: var(--accent-primary);
  line-height: 1.6;
  opacity: 0.9;
}

body.light-mode .project-modal-problem {
  color: var(--text-primary);
}

.project-modal-tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-badge {
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--hover-color)
  );
  color: var(--text-primary);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(0, 255, 204, 0.3);
  transition: transform 0.2s ease;
}

body.light-mode .tech-badge {
  background: linear-gradient(135deg, var(--bg-primary), var(--hover-color));
  color: var(--text-primary);
  box-shadow: 0 2px 10px rgba(0, 85, 170, 0.3);
}

.tech-badge:hover {
  transform: translateY(-2px);
}

.project-modal-features {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}

.project-modal-features li {
  display: flex;
  align-items: center;
  color: var(--accent-primary);
  opacity: 0.9;
  padding: 8px 0;
}

body.light-mode .project-modal-features li {
  color: var(--text-primary);
}

.project-modal-features li::before {
  content: "✓";
  background: var(--accent-primary);
  color: var(--bg-primary);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
  margin-right: 15px;
  flex-shrink: 0;
}

body.light-mode .project-modal-features li::before {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.challenges-grid {
  display: grid;
  gap: 20px;
}

.challenge-item {
  background: rgba(0, 255, 204, 0.1);
  border: 1px solid rgba(0, 255, 204, 0.3);
  border-radius: 10px;
  padding: 20px;
  transition: transform 0.2s ease;
}

body.light-mode .challenge-item {
  background: rgba(0, 85, 170, 0.1);
  border: 1px solid rgba(0, 85, 170, 0.3);
}

.challenge-item:hover {
  transform: translateY(-2px);
}

.challenge-title {
  color: var(--accent-primary);
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 1rem;
}

body.light-mode .challenge-title {
  color: var(--text-primary);
}

.challenge-solution {
  color: var(--accent-primary);
  opacity: 0.8;
  line-height: 1.5;
  font-size: 0.95rem;
}

body.light-mode .challenge-solution {
  color: var(--text-primary);
}

.results-content {
  display: grid;
  gap: 20px;
}

.project-modal-results,
.project-modal-learning {
  color: var(--accent-primary);
  opacity: 0.9;
  line-height: 1.6;
}

body.light-mode .project-modal-results,
body.light-mode .project-modal-learning {
  color: var(--text-primary);
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 15px;
}

.gallery-item {
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--accent-primary);
  transition: transform 0.3s ease;
  cursor: pointer;
  position: relative;
}

body.light-mode .gallery-item {
  border: 2px solid var(--text-primary);
}

.gallery-item:hover,
.gallery-item:focus {
  transform: scale(1.05);
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

.gallery-item::after {
  content: "🔍";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: var(--accent-primary);
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.gallery-item:hover::after,
.gallery-item:focus::after {
  opacity: 1;
}

.gallery-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

/* Lightbox Styles */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-lightbox);
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.95);
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image-container {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  text-align: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 255, 204, 0.3);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  font-size: 30px;
  cursor: pointer;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: var(--z-lightbox);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-prev:hover,
.lightbox-prev:focus,
.lightbox-next:hover,
.lightbox-next:focus {
  background: rgba(0, 255, 204, 0.2);
  transform: translateY(-50%) scale(1.1);
  outline: 2px solid var(--accent-primary);
}

.lightbox-info {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: var(--accent-primary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  border: 1px solid var(--accent-primary);
}

.lightbox-counter {
  font-weight: var(--font-weight-medium);
}

/* Mobile responsiveness for lightbox */
@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 30px;
  }

  .lightbox-info {
    bottom: -35px;
    font-size: 12px;
    padding: 6px 12px;
  }
}

.project-modal-footer {
  padding: 20px 30px 30px;
  background: rgba(0, 255, 204, 0.05);
  border-top: 1px solid rgba(0, 255, 204, 0.2);
}

body.light-mode .project-modal-footer {
  background: rgba(0, 85, 170, 0.05);
  border-top: 1px solid rgba(0, 85, 170, 0.2);
}

.project-links {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.project-modal-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 25px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.primary-link {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
}

body.light-mode .primary-link {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

.secondary-link {
  background: transparent;
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

body.light-mode .secondary-link {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.project-modal-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 255, 204, 0.4);
}

body.light-mode .project-modal-link:hover {
  box-shadow: 0 5px 15px rgba(0, 85, 170, 0.4);
}

.primary-link:hover {
  background: var(--hover-color);
  border-color: var(--hover-color);
}

body.light-mode .primary-link:hover {
  background: var(--accent-secondary);
  border-color: var(--accent-secondary);
}

.secondary-link:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

body.light-mode .secondary-link:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
}

/* Link disabled state */
.project-modal-link[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
  background: #666;
  color: #ccc;
  border-color: #666;
}

/* Accessibility Statement Styles */
.accessibility-statement {
  text-align: center;
  margin: 2rem 0;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: 8px;
}

.accessibility-statement small {
  color: var(--text-primary);
  line-height: 1.5;
}

.accessibility-statement a {
  color: var(--text-secondary);
  text-decoration: none;
}

.accessibility-statement a:hover,
.accessibility-statement a:focus {
  text-decoration: underline;
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Responsive section */

/* 1214px and below - Show burger menu, hide desktop nav */
@media (max-width: 1214px) {
  /* Mobile menu backdrop overlay */
  nav ul::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
      visibility 0.35s;
    z-index: -1;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  nav ul.active::after {
    opacity: 1;
    visibility: visible;
  }

  nav ul {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.25rem;
    width: 280px;
    max-width: 85vw;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background-color: rgba(13, 13, 13, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: var(--z-fixed);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-100%);
    padding: 100px 0 20px 0;
    border-radius: 0 24px 24px 0;
    border-top: 3px solid var(--accent-primary);
    border-bottom: 3px solid var(--accent-primary);
    border-right: 3px solid var(--accent-primary);
    box-shadow:
      4px 0 32px rgba(0, 0, 0, 0.5),
      0 0 0 1px rgba(0, 255, 204, 0.1) inset;
    overflow-y: auto;
    pointer-events: auto;
  }

  nav ul.active {
    transform: translateX(0);
    pointer-events: auto;
  }

  nav ul li,
  nav ul li a {
    pointer-events: auto;
    cursor: pointer;
  }

  body.light-mode nav ul {
    background-color: rgba(248, 248, 248, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    color: var(--text-primary);
    border-radius: 0 24px 24px 0;
    border-top: 3px solid var(--text-primary);
    border-right: 3px solid var(--text-primary);
    border-bottom: 3px solid var(--text-primary);
    box-shadow:
      4px 0 32px rgba(0, 0, 0, 0.2),
      0 0 0 1px rgba(0, 85, 170, 0.1) inset;
  }

  .burger {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
  }

  .burger:hover {
    background-color: rgba(0, 255, 204, 0.1);
  }

  body.light-mode .burger:hover {
    background-color: rgba(0, 85, 170, 0.1);
  }

  nav ul.active {
    transform: translateX(0);
  }

  nav ul li {
    width: 100%;
    padding: 0 16px;
  }

  nav ul li a {
    font-size: 1.05rem;
    font-weight: 600;
    padding: 14px 20px;
    width: 100%;
    display: block;
    text-align: left;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
  }

  nav ul li a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--accent-primary);
    transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 2px 2px 0;
  }

  nav ul li a:hover::before,
  nav ul li a.active::before {
    height: 70%;
  }

  nav ul li a:hover {
    background-color: rgba(0, 255, 204, 0.12);
    padding-left: 28px;
    transform: translateX(4px);
  }

  body.light-mode nav ul li a:hover {
    background-color: rgba(0, 85, 170, 0.12);
  }

  body.light-mode nav ul li a::before {
    background: var(--accent-secondary);
  }

  nav .icons {
    display: none;
  }

  body.light-mode nav ul li a,
  body.light-mode .icons i {
    color: var(--text-primary);
  }

  /* Ensure mode toggle is interactive in mobile menu */
  .mode-toggle {
    pointer-events: auto;
    cursor: pointer;
    margin: 0 16px;
    padding: 12px 20px;
    width: calc(100% - 32px);
    justify-content: center;
  }

  .menu-footer {
    display: block;
    text-align: center;
    padding: 20px 16px;
    margin-top: auto;
    border-top: 1px solid rgba(0, 255, 204, 0.2);
    font-size: 0.85rem;
    opacity: 0.8;
  }

  body.light-mode .menu-footer {
    border-top: 1px solid rgba(0, 85, 170, 0.2);
  }

  .menu-footer p {
    margin: 0;
  }
}

/* 768px */
@media (max-width: 768px) {
  html {
    overflow-x: hidden;
  }
  body {
    overflow-x: hidden;
  }
  * {
    cursor: auto;
    max-width: 100%;
  }
  #intro-header {
    font-size: 1rem;
  }
  header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    padding: var(--space-md) var(--space-lg);
    background: rgba(13, 13, 13, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
  }
  #myCanvas {
    width: 100%;
  }

  .myCanvasContainer {
    max-width: 100%;
    padding: var(--space-md);
  }

  #orbityCanvas {
    max-width: 400px;
  }
  .inventory {
    grid-template-columns: repeat(auto-fill, minmax(80px, 30%));
    grid-auto-rows: 100px;
    max-width: fit-content;
    min-width: 50%;
    width: 70vw;
  }
  .item {
    min-width: 80px;
    min-height: 80px;
  }
  .tooltip {
    font-size: smaller;
    min-width: fit-content;
  }

  footer {
    display: none;
  }

  .custom-cursor {
    display: none;
  }

  #back-to-top {
    bottom: 50px;
    right: 50px;
  }

  .custom-cursor::before {
    display: none;
  }
  .logo img {
    width: 120px;
    min-width: 120px;
  }

  .intro h1 {
    font-size: 2rem;
  }

  .intro p {
    font-size: 1.1rem;
    line-height: 1.5;
  }

  .intro button {
    font-size: 0.95rem;
    padding: 0.875rem 1.75rem;
  }

  .mode-toggle {
    margin: 0rem 1rem;
  }
  body.light-mode .mode-toggle {
    background-color: var(--accent-primary);
    color: var(--white);
    margin: 0rem 1rem;
  }
}
@media (min-width: 1200px) {
  .logo img {
    width: 170px;
    min-width: 170px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none;
  }
  .section {
    opacity: 1 !important;
    transform: none !important;
  }

  .cta-button:hover,
  .submit-button:hover,
  .socials a:hover {
    transform: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .section {
    opacity: 1;
    transform: none;
  }
}

/* Enhanced contrast for accessibility */
@media (prefers-contrast: high) {
  :root {
    --accent-primary: #00ffff;
    --bg-primary: #000000;
    --text-primary: #ffffff;
  }
  body.light-mode {
    --accent-primary: #1a1a1a;
    --bg-primary: #ffffff;
    --text-primary: #000000;
  }
}

/* 600px */
@media (max-width: 600px) {
  .project-modal-content {
    width: 95vw;
    max-height: 95vh;
    min-height: 45vh;
  }

  .project-hero-image {
    height: 200px;
  }

  .project-stats {
    position: static;
    margin-top: 15px;
    background: rgba(13, 13, 13, 0.95);
  }

  body.light-mode .project-stats {
    background: rgba(248, 248, 248, 0.98);
  }

  .project-header-content,
  .project-modal-body,
  .project-modal-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .project-links {
    flex-direction: column;
  }

  .project-modal-link {
    justify-content: center;
  }

  /* Contact form  */
  #contact-form {
    max-width: 100%;
    padding: 0 15px;
  }

  #contact-form input,
  #contact-form textarea {
    padding: 12px;
  }

  #contact-form button {
    padding: 12px 24px;
    max-width: 100%;
  }
}

/* Larger screens - optimize form layout */
@media (min-width: 768px) {
  #contact-form {
    max-width: 700px;
    padding: 0 40px;
  }

  #contact-form input,
  #contact-form textarea {
    padding: 18px;
    font-size: 17px;
  }

  #contact-form button {
    max-width: 250px;
    font-size: 17px;
  }
}

@media (min-width: 1200px) {
  #contact-form {
    max-width: 800px;
  }
}

#red {
  color: red;
}
