/* Variables */
:root {
  --primary-color: #9fd801;
  --bg-color: #0b0d1b;
  --card-bg: rgba(17, 20, 41, 0.85);
  --text-color: #ffffff;
  --secondary-text: #cccccc;
  --accent-glow: rgba(159, 216, 1, 0.5);
  --transition-speed: 0.3s;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Content Protection */
body {
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+/Edge */
    user-select: none; /* Standard */
}

/* Allow selection on inputs if needed, though this is a resume site */
input, textarea {
    user-select: text;
}

/* Canvas Background */
#canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Navigation */
nav {
  background-color: rgba(17, 20, 41, 0.95);
  backdrop-filter: blur(10px);
  padding: 0 2rem; /* Removed vertical padding */
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
  border-bottom: 1px solid rgba(159, 216, 1, 0.1);
}

nav a, nav button {
  color: var(--secondary-text);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 1rem 1.5rem; /* Increased vertical padding for better touch target */
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

nav a:hover, nav button:hover, nav button.active-btn {
  color: var(--text-color);
  background: rgba(255, 255, 255, 0.05); /* Subtle background highlight */
  border-bottom-color: var(--primary-color); /* The line right same size as the button */
  box-shadow: none;
  transform: none;
}

/* Main Container */
.container {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem; /* Reduced top padding */
  width: 100%;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Typography */
/* Header Layout */
.main-header {
    text-align: center;
    padding: 0.5rem 1rem 0; /* Removed bottom padding */
    background: rgba(17, 20, 41, 0.8);
    backdrop-filter: blur(5px);
    z-index: 101;
    position: relative;
    margin-bottom: 0; /* Removed bottom margin */
    margin-top: -1rem;
}

.interactive-name {
    font-size: clamp(3rem, 6vw, 5rem);
    margin: 0;
    cursor: default;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    color: white;
    animation: fadeInDown 1s ease-out;
}

.letter {
    display: inline-block;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), text-shadow 0.2s ease;
    position: relative;
    z-index: 1;
    padding: 0 2px;
}

.space {
    width: 20px;
}

.letter:hover {
    transform: scale(1.5) perspective(500px) translateZ(20px); /* Zoom effect */
    color: #fff;
    text-shadow: 
        0 0 10px #fff,
        0 0 20px #fff,
        0 0 40px var(--primary-color),
        0 0 80px var(--primary-color),
        0 0 120px var(--primary-color);
    z-index: 10;
}

/* Electric line simulation using pseudo-element */
.letter:hover::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 5px var(--primary-color);
    transform: translateY(-50%) rotate(calc(var(--r, 0) * 1deg));
    animation: electric-flicker 0.1s infinite;
    pointer-events: none;
}

@keyframes electric-flicker {
    0% { opacity: 0.5; transform: translateY(-50%) rotate(15deg) scaleX(0.8); }
    50% { opacity: 1; transform: translateY(-50%) rotate(-15deg) scaleX(1.2); }
    100% { opacity: 0.5; transform: translateY(-50%) rotate(5deg) scaleX(0.9); }
}

h3 {
  color: var(--secondary-text);
  font-weight: 300;
  margin-bottom: 4px; /* Very small margin to keep it close to nav */
  font-size: 1rem;
  animation: fadeInUp 1s ease-out 0.3s backwards;
}

/* Sections */
.section {
  display: none;
  width: 100%;
  max-width: 900px;
  background: var(--card-bg);
  backdrop-filter: blur(5px);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  margin-top: 0.5rem; /* Reduced margin top */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: slideIn 0.5s ease-out forwards;
}

.section-title {
  color: var(--primary-color);
  font-size: 1.8rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Lists & Content */
ul {
  list-style: none;
}

li {
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--primary-color);
  transition: transform 0.2s ease;
}

li:hover {
  transform: translateX(5px);
  background: rgba(255,255,255,0.02);
}

p {
  margin-bottom: 1rem;
  color: var(--secondary-text);
}

strong {
  color: white;
}

/* Games Section */
.game-card-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
    display: flex; /* Ensure height stretches */
    height: 100%;
}

.game-card-link:hover {
    transform: translateY(-5px);
}

.game-preview {
    background: #000;
    transition: all 0.3s ease;
    width: 200px; /* Compact width */
    min-height: 160px; /* Compact height */
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1rem;
    border-radius: 30px; /* Curved TV edges */
    border: 6px solid #333; /* TV Bezel */
    box-shadow: 
        inset 0 0 20px rgba(0,0,0,0.9), /* Screen depth */
        0 0 0 2px #111, /* Outer bezel edge */
        0 10px 20px rgba(0,0,0,0.5); /* Drop shadow */
    position: relative;
    overflow: hidden;
}

/* Screen reflection effect */
.game-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1), transparent);
    border-radius: 24px 24px 100% 100% / 24px 24px 10% 10%;
    pointer-events: none;
}

.game-preview:hover {
    border-color: #444;
    box-shadow: 
        inset 0 0 30px rgba(159, 216, 1, 0.2), /* Inner glow */
        0 0 0 2px #111,
        0 0 20px var(--accent-glow); /* Outer glow */
}

.game-preview h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    z-index: 1;
}

.game-preview p {
    font-size: 0.8rem;
    margin-bottom: 1rem;
    z-index: 1;
}

.play-btn {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-color);
    color: black;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
    text-transform: uppercase;
    z-index: 1;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Footer */
footer {
  background-color: rgba(17, 20, 41, 0.95);
  padding: 1.5rem;
  text-align: center;
  margin-top: auto;
  border-top: 1px solid rgba(159, 216, 1, 0.1);
  z-index: 10;
}

.contact-icons {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

footer a {
  color: var(--secondary-text);
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

footer a:hover {
  color: var(--primary-color);
}

/* Watermarks */
.watermark {
  position: fixed;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.03);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  white-space: nowrap;
}

.watermark-first {
  top: 50%;
  left: -5%;
  font-size: 15vw;
  transform: rotate(-90deg) translateY(-50%);
  animation: float1 15s ease-in-out infinite;
}

.watermark-second {
  bottom: 10%;
  right: -5%;
  font-size: 8vw;
  transform: rotate(90deg);
  animation: float2 20s ease-in-out infinite;
}

/* Animations */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes float1 {
  0%, 100% { transform: rotate(-90deg) translate(0, 0); }
  50% { transform: rotate(-90deg) translate(20px, 20px); }
}

@keyframes float2 {
  0%, 100% { transform: rotate(90deg) translate(0, 0); }
  50% { transform: rotate(90deg) translate(-20px, -20px); }
}

/* Stars */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent url('https://www.transparenttextures.com/patterns/stardust.png') repeat;
    opacity: 0.3;
    z-index: -2;
    pointer-events: none;
}

/* Spaceships */
#spaceship-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.spaceship {
    position: absolute;
    color: rgba(255, 255, 255, 0.15);
    font-weight: bold;
    white-space: nowrap;
    user-select: none;
}

#ship-big {
    font-size: 4rem;
}

#ship-small {
    font-size: 2rem;
}

/* Sparkle */
.sparkle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px white, 0 0 20px yellow;
    animation: sparkleAnim 1s linear forwards;
    pointer-events: none;
}

@keyframes sparkleAnim {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(3); opacity: 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
  nav {
    padding: 0.5rem;
    justify-content: center;
  }
  
  nav a, nav button {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    margin: 0.2rem;
  }

  .container {
    padding: 2rem 1rem;
  }

  .interactive-name {
    font-size: 2.5rem;
  }

  .section {
    padding: 1.5rem;
  }
  
  .watermark {
    display: none; /* Hide watermarks on small screens to prevent overflow/clutter */
  }
}

/* Force update comment */
