@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;700;900&family=Dancing+Script:wght@700&display=swap');

:root {
  --bg-dark: #0f0e0e;
  --bg-accent: #1a1818;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --accent-color: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.1);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-cursive: 'Dancing Script', cursive;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Neon Accents */
  --neon-cyan: #00f2ff;
  --neon-magenta: #ff00ff;
}

/* Reset and base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: radial-gradient(circle at top right, #1a1818, #0f0e0e);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
}

/* Header using CSS Grid for layout */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  position: sticky;
  top: 20px;
  margin: 0 20px;
  z-index: 100;
  background: rgba(25, 24, 24, 0.85);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 2px solid white;
  border-radius: 20px;
  box-shadow: 
    0 10px 50px rgba(0, 0, 0, 0.6), 
    0 4px 15px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1); /* Top inner highlight */
}

/* Logo container stacks logo and line vertically */
.logo-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  z-index: 2;
}

/* Logo styling */
.logo {
  font-family: var(--font-cursive);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  margin-bottom: 0;
  text-transform: none; /* Reverting uppercase for cursive */
}

.logo span {
  font-weight: 400;
}

/* White line below logo */
.logo-line {
  display: none; /* Removing the flat long line for a cleaner look */
}

/* Favicon TG centered */
.favicon-tg {
  font-family: var(--font-cursive);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  user-select: none;
  white-space: nowrap;
  line-height: 1;
  z-index: 3;
  pointer-events: none;
  
  border: 1.5px solid var(--glass-border);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}

/* Navigation styles */
nav {
  display: flex;
  align-items: center;
  z-index: 2;
  padding: 0;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 10px 20px rgba(0, 0, 0, 0.3);
}

nav ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 50px;
  transition: var(--transition);
  display: block;
  position: relative;
}

nav ul li a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

nav ul li a.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.15);
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

/* Main content */
main {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Game styles */
.game-container {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 20px;
}

.game-header {
  text-align: center;
  width: 100%;
}

.game-selector {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

.game-tab {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
  padding: 8px 24px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.1em;
}

.game-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.game-tab.active {
  background: white;
  color: #0f0e0e;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.game-header h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  margin-bottom: 5px;
  background: linear-gradient(to bottom, #fff, rgba(255, 255, 255, 0.3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.game-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.canvas-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

#gameCanvas, #invadersCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

#invadersCanvas.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.game-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 14, 14, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  transition: var(--transition);
}

.game-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.start-button {
  background: white;
  color: #0f0e0e;
  border: none;
  padding: 15px 40px;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
  letter-spacing: 0.1em;
}

.start-button:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 40px rgba(255, 255, 255, 0.2);
  background: #f0f0f0;
}

.quit-button {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  z-index: 5;
  transition: var(--transition);
  backdrop-filter: blur(5px);
}

.quit-button:hover {
  background: rgba(255, 0, 0, 0.2);
  border-color: rgba(255, 0, 0, 0.4);
}

.quit-button.hidden {
  display: none;
}

/* About Me page styles */
.about-container {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 80px;
  max-width: 1200px;
  margin: 100px auto;
  padding: 0 40px;
  align-items: stretch; /* Stretch to equal height */
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
  height: 100%;
}

.profile-image {
  width: 100%;
  aspect-ratio: 0.85;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 40px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  filter: contrast(1.05) brightness(1.02);
}

.info-sidebar-grid {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Space out cards to fill height */
  flex-grow: 1;
  padding-bottom: 5px; /* Fine tune the very bottom alignment */
}

.info-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 15px 20px;
  border-radius: 16px;
  backdrop-filter: blur(10px);
}

.profile-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 40px;
  background: radial-gradient(circle at center, transparent 30%, rgba(15, 14, 14, 0.4) 100%);
  z-index: 3;
  pointer-events: none;
}

.profile-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(0, 242, 255, 0.15) 0%, transparent 70%);
  z-index: 1;
  pointer-events: none;
}

.bg-glow-1 {
  position: fixed;
  top: -10%;
  left: -10%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(0, 242, 255, 0.05) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.bg-glow-2 {
  position: fixed;
  bottom: -10%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(255, 0, 255, 0.05) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.about-section {
  padding-top: 20px;
}

.about-section h1.job-title {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 40px;
  letter-spacing: -0.03em;
  color: white;
  line-height: 1.1;
  text-transform: uppercase;
  background: linear-gradient(to right, #fff, var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.description {
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 50px;
  max-width: 700px;
}

.skills-section h3 {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 25px;
  color: rgba(255, 255, 255, 0.4);
}

.info-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.info-card .label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.5);
}

.info-card .value {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
}

.skills-section {
  margin-top: 40px;
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  padding: 30px;
  border-radius: 24px;
  backdrop-filter: blur(10px);
}

.skills-section h3 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.skill-tag:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--neon-cyan);
  color: white;
  transform: translateY(-2px);
}

.description {
  margin-top: 20px;
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  padding: 30px;
  border-radius: 24px;
  backdrop-filter: blur(10px);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Education page styles */
.education-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
}

.education-section h1 {
  font-size: 3rem;
  font-weight: 700;
  text-decoration: underline;
  margin-bottom: 20px;
}

.education-description {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.6;
  color: #ddd;
}

/* Footer line */
footer {
  padding: 40px 60px;
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--glass-border);
  margin-top: auto;
}

footer p {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    padding: 20px;
    gap: 20px;
    text-align: center;
  }

  nav ul {
    gap: 5px;
    padding: 3px;
  }

  nav ul li a {
    padding: 8px 15px;
    font-size: 0.8rem;
  }

  .centered-text h1 {
    font-size: 4rem;
  }

  .about-container {
    grid-template-columns: 1fr;
    margin: 20px;
    gap: 30px;
  }

  .profile-wrapper {
    position: static;
  }

  .profile-image {
    max-width: 100%;
  }

  .about-section {
    padding: 40px 20px;
  }

  .about-section h1 {
    font-size: 2.5rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}
