:root {
  --bg-color: #0a0a0a;
  --text-color: #e0e0e0;
  --accent-color: #00d4ff; /* Cyan-ish neon */
  --accent-secondary: #7928ca; /* Purple gradient part */
  --card-bg: rgba(255, 255, 255, 0.05);
  --font-main: "Outfit", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-main);
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-image:
    radial-gradient(
      circle at 10% 20%,
      rgba(121, 40, 202, 0.15) 0%,
      transparent 20%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(0, 212, 255, 0.15) 0%,
      transparent 20%
    );
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 900px;
  padding: 2rem;
  gap: 3rem;
  text-align: center;
  z-index: 1;
}

@media (min-width: 768px) {
  .container {
    flex-direction: row;
    text-align: left;
  }
}

/* Profile Section */
.profile-box {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 20px;
  padding: 5px;
  background: linear-gradient(
    135deg,
    var(--accent-color),
    var(--accent-secondary)
  );
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
  animation: float 6s ease-in-out infinite;
}

.profile-placeholder {
  width: 100%;
  height: 100%;
  background-color: #1a1a1a;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 600;
  font-size: 1.2rem;
  overflow: hidden;
}

.profile-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Content Section */
.content {
  flex: 1;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease-out forwards 0.5s;
}

h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

@media (min-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1.5rem;
    gap: 2rem;
  }
  
  .profile-box {
    width: 160px;
    height: 160px;
  }

  h1 {
    font-size: 1.8rem;
  }
}

.highlight {
  background: linear-gradient(
    90deg,
    var(--accent-color),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: #b0b0b0;
}

.cta-text {
  margin-bottom: 2rem;
}

/* Button */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: transparent;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  background: var(--accent-color);
  color: #000;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
  transform: translateY(-2px);
}

/* Animations */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Projects Page */
.projects-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.projects-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
}

.back-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--accent-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.snake-card {
    border-color: rgba(0, 212, 255, 0.3);
}

.snake-card:hover {
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.2);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.card-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: #b0b0b0;
}

.btn-small {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--accent-color);
    color: #000;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-small:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.btn-disabled {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: default;
}

/* Snake Game */
.game-body {
    background-color: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 500px;
    padding: 1rem;
}

.game-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 400px;
}

#gameCanvas {
    background-color: #000;
    border: 2px solid var(--accent-secondary);
    box-shadow: 0 0 20px rgba(121, 40, 202, 0.4);
    border-radius: 10px;
    max-width: 100%;
}

.score-board {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
}

.controls-hint {
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}

.controls-hint strong {
    color: #fff;
}

.mobile-controls {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 1rem;
}

.d-pad {
    width: 60px; /* Bigger touch target */
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    touch-action: manipulation; /* Improves touch response */
    transition: background 0.1s, transform 0.1s;
}

.d-pad:active, .d-pad.active {
    background: var(--accent-color);
    color: black;
    transform: scale(0.95);
    border-color: var(--accent-color);
}

.d-pad-row {
    display: flex;
    gap: 10px;
}

@media (max-width: 768px) {
    .controls-hint p {
        display: none;
    }
    
    .mobile-controls {
        display: flex;
    }
}
