:root {
  --primary: #00bfff;
  --primary-dark: #0088cc;
  --text: #ffffff;
  --text-secondary: #aaaaaa;
  --bg-dark: #000000;
  --bg-darker: #0a0a0a;
  --bg-card: #1a1a1a;
  --bg-card-light: #222222;
  --border: #333333;
  --border-light: #444444;
  --success: #4CAF50;
  --danger: #ff4d4d;
  --warning: #FFC107;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

.container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Mobile-first sidebar */
.sidebar {
  width: 100%;
  background-color: var(--bg-darker);
  padding: 15px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.profile-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.profile-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  box-shadow: 0 0 10px rgba(0, 191, 255, 0.3);
  transition: all 0.3s ease;
}

.profile-img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0, 191, 255, 0.5);
}

.sidebar h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 0;
}

.subtitle {
  display: none;
}

.sidebar nav {
  width: 100%;
  order: 3;
  margin-top: 15px;
}

.sidebar nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.sidebar nav ul li {
  margin: 0;
}

.sidebar nav ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
}

.sidebar nav ul li a i {
  margin-right: 8px;
  width: 16px;
  text-align: center;
  font-size: 14px;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
  color: var(--primary);
  background-color: rgba(0, 191, 255, 0.1);
  transform: translateX(0);
}

.sidebar footer {
  display: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
}

.main-content {
  flex: 1;
  padding: 20px;
  min-height: 100vh;
}

.section {
  display: none;
  animation: fadeIn 0.5s ease;
}

.section.active {
  display: block;
}

#home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  position: relative;
  text-align: center;
  padding: 20px 0;
}

.intro-text {
  max-width: 100%;
  z-index: 2;
  margin-bottom: 30px;
}

.intro-text h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
}

.intro-text span {
  color: var(--primary);
}

.intro-text .description {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 25px;
}

.main-img {
  max-width: 100%;
  max-height: 50vh;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 191, 255, 0.2);
  animation: float 6s ease-in-out infinite;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  margin: 10px 5px;
}

.btn:hover {
  background-color: var(--primary);
  color: #000;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 191, 255, 0.2);
}

/* Section headings */
#contributed h1,
#animations h1,
#projects h1,
#worked h1,
#contact h1 {
  font-size: 28px;
  margin-bottom: 30px;
  color: var(--primary);
  text-align: center;
  position: relative;
  padding-bottom: 10px;
}

#contributed h1::after,
#animations h1::after,
#projects h1::after,
#worked h1::after,
#contact h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background-color: var(--primary);
}

/* Grid layouts */
.games-grid,
.animations-grid,
.projects-grid,
.worked-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 20px;
}

/* Cards */
.game-card,
.animation-card,
.project-card,
.worked-group {
  background-color: var(--bg-card);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.game-card:hover,
.animation-card:hover,
.project-card:hover,
.worked-group:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 191, 255, 0.2);
  border-color: var(--primary);
}

.game-link,
.animation-link,
.project-link,
.group-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.game-header,
.animation-header,
.project-header,
.group-header {
  padding: 15px;
  background-color: var(--bg-card-light);
  border-bottom: 1px solid var(--border);
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-header h3,
.animation-header h3,
.project-header h3,
.group-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
}

.game-badge,
.group-badge {
  background-color: var(--primary);
  color: #000;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
}

.game-stats,
.group-stats {
  display: flex;
  padding: 12px 15px;
  background-color: var(--bg-card);
  flex-wrap: wrap;
}

.stat,
.group-stat {
  flex: 1 0 50%;
  text-align: center;
  margin-bottom: 10px;
}

.stat-value,
.group-stat-value {
  font-size: 20px;
  font-weight: 700;
  display: block;
  color: var(--primary);
}

.stat-label,
.group-stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 3px;
}

.game-image,
.animation-image,
.project-image,
.group-image {
  height: 160px;
  overflow: hidden;
  position: relative;
}

.game-image img,
.animation-image img,
.project-image img,
.group-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.game-card:hover .game-image img,
.animation-card:hover .animation-image img,
.project-card:hover .project-image img,
.worked-group:hover .group-image img {
  transform: scale(1.05);
}

/* Contact section */
.contact-info {
  max-width: 100%;
  margin: 0 auto;
  padding: 15px;
  text-align: center;
  color: var(--text-secondary);
}

.contact-info p {
  font-size: 16px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.social-link {
  padding: 10px 15px;
  background-color: var(--bg-card);
  border-radius: 6px;
  color: var(--primary);
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  font-size: 14px;
}

.social-link:hover {
  background-color: var(--primary);
  color: #000;
  transform: translateY(-2px);
}

.social-link i {
  font-size: 16px;
}

/* Loading states */
.loading-projects {
  text-align: center;
  padding: 40px 20px;
  color: var(--primary);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.no-projects {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  font-size: 16px;
}

.error {
  text-align: center;
  padding: 40px 20px;
  color: var(--danger);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Tablet and larger screens */
@media (min-width: 768px) {
  .container {
    flex-direction: row;
  }
  
  .sidebar {
    width: 220px;
    height: 100vh;
    position: fixed;
    flex-direction: column;
    align-items: flex-start;
    padding: 25px 15px;
    border-right: 1px solid var(--border);
    border-bottom: none;
  }
  
  .profile-container {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 20px;
  }
  
  .profile-img {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
  }
  
  .sidebar h2 {
    font-size: 20px;
    display: block;
  }
  
  .subtitle {
    display: block;
    font-size: 13px;
    color: var(--primary);
    margin-bottom: 20px;
  }
  
  .sidebar nav {
    order: initial;
    margin-top: 0;
  }
  
  .sidebar nav ul {
    flex-direction: column;
    gap: 5px;
  }
  
  .sidebar nav ul li a {
    padding: 10px 15px;
    font-size: 15px;
  }
  
  .sidebar nav ul li a:hover,
  .sidebar nav ul li a.active {
    transform: translateX(5px);
  }
  
  .sidebar footer {
    display: block;
    margin-top: auto;
    font-size: 11px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    width: 100%;
    text-align: center;
  }
  
  .main-content {
    margin-left: 220px;
    padding: 30px;
  }
  
  #home {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
  }
  
  .intro-text {
    max-width: 50%;
    margin-bottom: 0;
  }
  
  .intro-text h1 {
    font-size: 36px;
  }
  
  .main-img {
    max-width: 45%;
    max-height: 60vh;
  }
  
  .games-grid,
  .animations-grid,
  .projects-grid,
  .worked-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
  }
  
  .btn {
    margin: 0 10px 0 0;
  }
}

/* Desktop screens */
@media (min-width: 992px) {
  .sidebar {
    width: 260px;
    padding: 30px 20px;
  }
  
  .profile-img {
    width: 100px;
    height: 100px;
  }
  
  .sidebar h2 {
    font-size: 22px;
  }
  
  .subtitle {
    font-size: 14px;
  }
  
  .main-content {
    margin-left: 260px;
    padding: 40px;
  }
  
  .intro-text h1 {
    font-size: 42px;
  }
  
  #contributed h1,
  #animations h1,
  #projects h1,
  #worked h1,
  #contact h1 {
    font-size: 32px;
  }
}

/* Large desktop screens */
@media (min-width: 1200px) {
  .intro-text h1 {
    font-size: 52px;
  }
  
  .intro-text .description {
    font-size: 18px;
  }
  
  .games-grid,
  .animations-grid,
  .projects-grid,
  .worked-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
}