/* ROUGESWORLD - Software Section (Tron Style) */

/* Software Theme Variables */
.software-theme {
  --primary-color: var(--tron-blue);
  --secondary-color: var(--tron-white);
  --accent-color: var(--tron-light-blue);
  --glow-color: var(--tron-blue-glow);
  --section-bg: linear-gradient(135deg, 
    rgba(0, 20, 40, 0.9) 0%, 
    rgba(0, 10, 20, 0.95) 50%, 
    rgba(0, 20, 40, 0.9) 100%);
}

/* Tron Background Effects */
.tron-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: 
    radial-gradient(ellipse at 30% 40%, rgba(0, 212, 255, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse at 70% 60%, rgba(0, 212, 255, 0.03) 0%, transparent 70%),
    linear-gradient(135deg, #000000 0%, #001122 50%, #000000 100%);
  overflow: hidden;
}

.software-background {
  animation: tron-pulse 15s ease-in-out infinite alternate;
}

@keyframes tron-pulse {
  0% {
    background: 
      radial-gradient(ellipse at 30% 40%, rgba(0, 212, 255, 0.05) 0%, transparent 70%),
      radial-gradient(ellipse at 70% 60%, rgba(0, 212, 255, 0.03) 0%, transparent 70%),
      linear-gradient(135deg, #000000 0%, #001122 50%, #000000 100%);
  }
  100% {
    background: 
      radial-gradient(ellipse at 30% 40%, rgba(0, 212, 255, 0.08) 0%, transparent 70%),
      radial-gradient(ellipse at 70% 60%, rgba(0, 212, 255, 0.05) 0%, transparent 70%),
      linear-gradient(135deg, #000000 0%, #001a33 50%, #000000 100%);
  }
}

/* Grid Overlay */
.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: 
    linear-gradient(0deg, transparent 24%, rgba(0, 212, 255, 0.05) 25%, rgba(0, 212, 255, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 212, 255, 0.05) 75%, rgba(0, 212, 255, 0.05) 76%, transparent 77%, transparent),
    linear-gradient(90deg, transparent 24%, rgba(0, 212, 255, 0.05) 25%, rgba(0, 212, 255, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 212, 255, 0.05) 75%, rgba(0, 212, 255, 0.05) 76%, transparent 77%, transparent);
  background-size: 50px 50px;
}

/* Circuit Lines */
.circuit-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.circuit-line {
  position: absolute;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
  opacity: 0.3;
}

.circuit-line.horizontal {
  height: 1px;
  width: 100%;
  top: 30%;
  animation: circuit-flow-horizontal 15s linear infinite;
}

.circuit-line.vertical {
  width: 1px;
  height: 100%;
  left: 70%;
  animation: circuit-flow-vertical 12s linear infinite;
}

.circuit-line.diagonal {
  height: 1px;
  width: 150%;
  top: 70%;
  transform: rotate(45deg);
  transform-origin: left center;
  animation: circuit-flow-diagonal 20s linear infinite;
}

@keyframes circuit-flow-horizontal {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes circuit-flow-vertical {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(100%);
    opacity: 0;
  }
}

@keyframes circuit-flow-diagonal {
  0% {
    transform: translateX(-100%) rotate(45deg);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateX(100%) rotate(45deg);
    opacity: 0;
  }
}

/* Energy Nodes */
.energy-nodes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.energy-node {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-color);
  box-shadow: 0 0 15px var(--glow-color);
  opacity: 0.7;
  animation: energy-pulse 4s ease-in-out infinite;
}

.energy-node:nth-child(1) {
  top: 20%;
  left: 30%;
  animation-delay: 0s;
}

.energy-node:nth-child(2) {
  top: 70%;
  left: 20%;
  animation-delay: 1s;
}

.energy-node:nth-child(3) {
  top: 40%;
  left: 80%;
  animation-delay: 2s;
}

.energy-node:nth-child(4) {
  top: 80%;
  left: 60%;
  animation-delay: 3s;
}

@keyframes energy-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.5);
    opacity: 1;
  }
}

/* Navigation */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--primary-color);
}

.nav-home {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  transition: all var(--transition-smooth);
}

.nav-home:hover {
  color: var(--primary-color);
  text-shadow: 0 0 10px var(--glow-color);
}

.nav-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-matrix);
  color: var(--text-secondary);
}

.breadcrumb-separator {
  color: var(--primary-color);
}

.current-section {
  color: var(--primary-color);
  text-shadow: 0 0 5px var(--glow-color);
}

/* Main Container */
.main-container {
  padding-top: 80px;
  min-height: 100vh;
}

/* Hero Section */
.software-hero {
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-content {
  z-index: 2;
  position: relative;
}

.hero-text {
  margin-bottom: 3rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  margin: 0 0 1rem 0;
  line-height: 1.1;
}

.tron-text {
  color: var(--primary-color);
  text-shadow: 0 0 20px var(--glow-color);
  position: relative;
  display: inline-block;
}

.tron-text::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  color: var(--secondary-color);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  animation: tron-glitch 5s infinite;
  z-index: -1;
  opacity: 0.7;
}

@keyframes tron-glitch {
  0%, 90%, 100% {
    transform: translate(0);
    opacity: 0.7;
  }
  10% {
    transform: translate(-2px, 2px);
    opacity: 0.8;
  }
  20% {
    transform: translate(2px, -2px);
    opacity: 0.9;
  }
  30% {
    transform: translate(-1px, 1px);
    opacity: 0.7;
  }
  40% {
    transform: translate(1px, -1px);
    opacity: 0.8;
  }
  50% {
    transform: translate(0);
    opacity: 0.7;
  }
}

.hero-subtitle {
  font-family: var(--font-matrix);
  font-size: var(--text-lg);
  color: var(--accent-color);
  margin: 0 0 2rem 0;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
  letter-spacing: 2px;
}

.hero-description {
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 500px;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}

.stat-card {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--primary-color);
  border-radius: 5px;
  padding: 1.5rem;
  text-align: center;
  flex: 1;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-smooth);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px var(--glow-color);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px var(--glow-color);
}

.stat-label {
  font-family: var(--font-matrix);
  font-size: var(--text-sm);
  color: var(--secondary-color);
}

/* Code Visualization */
.code-visualization {
  position: relative;
  z-index: 2;
}

.code-window {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--primary-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.window-header {
  background: rgba(0, 20, 40, 0.9);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--primary-color);
}

.window-controls {
  display: flex;
  gap: 0.5rem;
  margin-right: 1rem;
}

.control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.control.close {
  background: #ff5f57;
}

.control.minimize {
  background: #ffbd2e;
}

.control.maximize {
  background: #28ca41;
}

.window-title {
  font-family: var(--font-matrix);
  font-size: var(--text-sm);
  color: var(--secondary-color);
}

.code-content {
  padding: 1rem;
  font-family: var(--font-matrix);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-secondary);
  max-height: 300px;
  overflow-y: auto;
}

.code-line {
  display: flex;
  margin-bottom: 0.5rem;
  white-space: pre;
}

.line-number {
  color: rgba(255, 255, 255, 0.3);
  margin-right: 1rem;
  user-select: none;
}

.keyword {
  color: #ff79c6;
}

.module {
  color: #8be9fd;
}

.function {
  color: #50fa7b;
}

.class {
  color: #ffb86c;
}

.variable {
  color: #f8f8f2;
}

.property {
  color: #bd93f9;
}

.string {
  color: #f1fa8c;
}

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

@keyframes cursor-blink {
  0%, 100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

.typing {
  animation: typing 3s steps(30, end) infinite;
  white-space: nowrap;
  overflow: hidden;
}

@keyframes typing {
  0% {
    width: 0;
  }
  50% {
    width: 100%;
  }
  90%, 100% {
    width: 100%;
  }
}

/* Software Lab Section */
.software-lab {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  margin: 0 0 1rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.title-text {
  color: var(--text-primary);
  text-shadow: 0 0 15px var(--glow-color);
}

.title-subtitle {
  font-family: var(--font-matrix);
  font-size: var(--text-md);
  color: var(--primary-color);
  font-weight: 400;
}

.section-description {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Project Filter */
.project-filter {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  font-family: var(--font-matrix);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  border-radius: 5px;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  transition: left 0.5s;
}

.filter-btn:hover::before,
.filter-btn.active::before {
  left: 100%;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-color);
  color: var(--bg-primary);
  box-shadow: 0 0 20px var(--glow-color);
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.project-card {
  position: relative;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--primary-color);
  border-radius: 10px;
  padding: 2rem;
  transition: all var(--transition-smooth);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 0 30px var(--glow-color);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.project-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}

.project-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.5;
}

.project-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color);
  box-shadow: 0 0 10px var(--glow-color);
  animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

.status-text {
  font-family: var(--font-matrix);
  font-size: var(--text-xs);
  color: var(--primary-color);
}

.project-content {
  flex: 1;
}

.project-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--primary-color);
  margin: 0 0 0.5rem 0;
  text-shadow: 0 0 10px var(--glow-color);
}

.project-subtitle {
  font-family: var(--font-matrix);
  font-size: var(--text-sm);
  color: var(--secondary-color);
  margin: 0 0 1rem 0;
}

.project-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  padding: 0.25rem 0.75rem;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid var(--primary-color);
  border-radius: 15px;
  font-family: var(--font-matrix);
  font-size: var(--text-xs);
  color: var(--primary-color);
}

.project-actions {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--primary-color);
  background: transparent;
  color: var(--primary-color);
  font-family: var(--font-matrix);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-smooth);
  border-radius: 5px;
  flex: 1;
  justify-content: center;
}

.action-btn.primary {
  background: rgba(0, 212, 255, 0.2);
}

.action-btn:hover {
  background: var(--primary-color);
  color: var(--bg-primary);
  box-shadow: 0 0 15px var(--glow-color);
  transform: translateY(-2px);
}

.project-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 10px;
  box-shadow: inset 0 0 20px var(--glow-color);
  pointer-events: none;
  opacity: 0.3;
  transition: opacity var(--transition-smooth);
}

.project-card:hover .project-glow {
  opacity: 0.5;
}

.project-card.featured {
  border-color: var(--secondary-color);
}

.featured-glow {
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.3);
}

.featured-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--secondary-color);
  color: var(--bg-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-family: var(--font-matrix);
  font-size: var(--text-xs);
  font-weight: 700;
  z-index: 2;
}

/* Development Philosophy Section */
.dev-philosophy {
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(0, 20, 40, 0.8) 0%, rgba(0, 0, 0, 0.8) 100%);
  margin-top: 4rem;
}

.dev-philosophy::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(0deg, transparent 24%, rgba(0, 212, 255, 0.05) 25%, rgba(0, 212, 255, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 212, 255, 0.05) 75%, rgba(0, 212, 255, 0.05) 76%, transparent 77%, transparent),
    linear-gradient(90deg, transparent 24%, rgba(0, 212, 255, 0.05) 25%, rgba(0, 212, 255, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 212, 255, 0.05) 75%, rgba(0, 212, 255, 0.05) 76%, transparent 77%, transparent);
  background-size: 30px 30px;
  opacity: 0.3;
  z-index: 0;
}

.philosophy-content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.philosophy-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  margin: 0 0 3rem 0;
  text-align: center;
  color: var(--secondary-color);
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.philosophy-card {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--secondary-color);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  transition: all var(--transition-smooth);
}

.philosophy-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--secondary-color);
  margin: 0 0 1rem 0;
}

.card-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Oracle Software Personality */
.software-oracle .oracle-trigger {
  background: linear-gradient(135deg, var(--tron-blue) 0%, var(--tron-dark-blue) 100%);
}

.software-pulse {
  border-color: var(--tron-blue);
  box-shadow: 0 0 20px var(--tron-blue-glow);
}

.oracle-chat.software-personality {
  border-color: var(--tron-blue);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.oracle-chat.software-personality::before {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(0, 100, 200, 0.05) 100%);
}

.software-style {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 100, 200, 0.1) 100%);
  border-left: 3px solid var(--tron-blue);
}

/* Tron-themed Scrollbar */
.software-theme::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.software-theme::-webkit-scrollbar-track {
  background: rgba(0, 20, 40, 0.5);
  border-radius: var(--radius-full);
}

.software-theme::-webkit-scrollbar-thumb {
  background: var(--tron-blue);
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.software-theme::-webkit-scrollbar-thumb:hover {
  background: var(--tron-blue-light);
  box-shadow: 0 0 10px var(--tron-blue-glow);
}

.software-theme::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox Scrollbar */
.software-theme {
  scrollbar-width: thin;
  scrollbar-color: var(--tron-blue) rgba(0, 20, 40, 0.5);
}

/* Code Content Scrollbar */
.code-content::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.code-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.8);
}

.code-content::-webkit-scrollbar-thumb {
  background: var(--tron-blue);
  border-radius: var(--radius-full);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .software-hero {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .code-window {
    max-width: 100%;
  }
  
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .main-nav {
    padding: 1rem;
  }
  
  .software-hero {
    padding: 2rem 1rem;
  }
  
  .software-lab {
    padding: 2rem 1rem;
  }
  
  .dev-philosophy {
    padding: 2rem 1rem;
  }
  
  .project-filter {
    gap: 0.5rem;
  }
  
  .filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .project-actions {
    flex-direction: column;
  }
  
  .hero-stats {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .philosophy-grid {
    grid-template-columns: 1fr;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .circuit-line,
  .energy-node,
  .status-indicator {
    animation: none;
  }
  
  .project-card:hover,
  .philosophy-card:hover {
    transform: none;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .project-card,
  .philosophy-card,
  .code-window {
    border-width: 2px;
  }
  
  .main-nav {
    border-bottom-width: 2px;
  }
}