:root {
  /* Default theme variables (medium darkness) */
  --bg-color: #121212;
  --content-bg: rgba(18, 18, 18, 0.95);
  --text-color: #e0e0e0;
  --heading-color: #f5f5f5;
  --subheading-color: #f0f0f0;
  --accent-green: #66bb6a;
  --accent-blue: #42a5f5;
  --highlight-bg: #1e1e1e;
  --secondary-text: #bdbdbd;
  --tech-tag-bg: #1a2726;
  --tech-tag-color: #4db6ac;
  --social-bg: #1e1e1e;
  --social-hover: #424242;
  --canvas-opacity: 0.6;
  --shadow-color: rgba(255, 255, 255, 0.03);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

body {
  font-family: "Rubik", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  overflow-x: hidden;
  background-color: var(--bg-color);
}

/* Theme slider container */
.theme-control {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.theme-panel {
  background-color: var(--highlight-bg, #f0f0f0);
  padding: 12px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.theme-control label {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}

/* Theme toggle button */
.theme-toggle {
  display: none; /* Hidden by default on desktop */
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--accent-green, #4caf50);
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  margin-bottom: 8px;
  transition: transform 0.2s;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

/* Enhance the theme slider thumb */
.theme-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: linear-gradient(to right, #f5f5f5, #121212);
  outline: none;
  cursor: pointer;
  position: relative;
}

/* Style the slider thumb for WebKit browsers (Chrome, Safari, etc.) */
.theme-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-green, #4caf50);
  cursor: grab;
  border: 2px solid white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}

.theme-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.theme-slider:active::-webkit-slider-thumb {
  cursor: grabbing;
  transform: scale(1.05);
}

/* Style the slider thumb for Firefox */
.theme-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-green, #4caf50);
  cursor: grab;
  border: 2px solid white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}

.theme-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.theme-slider:active::-moz-range-thumb {
  cursor: grabbing;
  transform: scale(1.05);
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  .theme-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .theme-panel {
    display: none;
  }

  .theme-panel.active {
    display: flex;
  }
}

/* Layout container for the three columns */
.layout-container {
  display: flex;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

/* Game containers */
.game-container {
  position: fixed;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: -1;
  width: calc((100% - 800px) / 2);
}

.left-game {
  left: 0;
}

.right-game {
  right: 0;
}

/* Canvas styles */
canvas {
  width: 100%;
  max-width: 500px;
  height: auto;
  aspect-ratio: 1 / 1;
  display: block;
  opacity: var(--canvas-opacity);
  margin: 0 auto;
}

/* Main content container */
.content-container {
  flex: 0 1 800px;
  max-width: 800px;
  margin: 0;
  padding: 2rem;
  background-color: var(--content-bg);
  box-shadow: 0 0 20px var(--shadow-color);
  position: relative;
  z-index: 1;
}

/* Typography */
h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--heading-color);
}

h2 {
  font-size: 1.8rem;
  margin: 2rem 0 1rem;
  position: relative;
  padding-bottom: 0.5rem;
  color: var(--subheading-color);
}

h2:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 3px;
  background-color: var(--accent-green);
}

h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--accent-green);
}

p {
  margin-bottom: 1rem;
}

/* Sections */
section {
  margin-bottom: 3rem;
}

.name {
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  color: var(--secondary-text);
}

/* Highlight boxes */
.highlight,
.highlight2 {
  background-color: var(--highlight-bg);
  border-left: 4px solid var(--accent-green);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 4px 4px 0;
}

.highlight2 {
  border-left-color: var(--accent-blue);
}

/* Social links */
.social-links {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--social-bg);
  border-radius: 50%;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.social-link:hover {
  background-color: var(--social-hover);
}

.social-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Tech Stack */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tech-tag {
  background-color: var(--tech-tag-bg);
  color: var(--tech-tag-color);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Media Queries for different screen sizes */
@media (min-width: 2000px) {
  canvas {
    width: 500px;
    height: 500px;
  }
}

@media (max-width: 1999px) and (min-width: 1441px) {
  canvas {
    width: 400px;
    height: 400px;
  }
}

@media (max-width: 1440px) and (min-width: 1201px) {
  canvas {
    width: 300px;
    height: 300px;
  }
}

@media (max-width: 1200px) and (min-width: 992px) {
  canvas {
    width: 250px;
    height: 250px;
  }
}

@media (max-width: 991px) and (min-width: 769px) {
  canvas {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 768px) {
  .layout-container {
    flex-direction: column;
  }

  .left-game,
  .right-game {
    display: none;
  }

  .content-container {
    width: 100%;
    padding: 1.5rem;
    margin: 0;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .theme-control {
    top: 10px;
    right: 10px;
    padding: 8px;
  }
}
