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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #e9ecef;
  background-color: #1a1a1a;
  position: relative;
}

/* Dynamic Background */
#dynamic-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  border: none;
  background: transparent;
  opacity: 0.8;
}

/* Container & Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 2.5rem;
  color: #f8f9fa;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

/* Header */
.site-header {
  background: linear-gradient(135deg, #4c63d2 0%, #5b2c87 100%);
  color: white;
  padding: 3rem 0;
  text-align: center;
}

.site-header h1 {
  color: white;
  margin-bottom: 0.5rem;
}

.site-description {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

.stats span {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

/* Main Content */
main {
  padding: 2rem 0;
}

/* Filter Section */
.filter-section {
  background: #2d3748;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.search-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

#search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #4a5568;
  border-radius: 8px;
  font-size: 1rem;
  background: #1a202c;
  color: #e2e8f0;
  transition: border-color 0.3s ease;
}

#search-input:focus {
  outline: none;
  border-color: #4c63d2;
}

#clear-search {
  padding: 0.75rem 1.5rem;
  background: #4a5568;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#clear-search:hover {
  background: #2d3748;
}

/* Tag Filters */
.tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag-filter {
  padding: 0.5rem 1rem;
  background: #1a202c;
  border: 2px solid #4a5568;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.tag-filter:hover {
  background: #2d3748;
}

.tag-filter.active {
  background: #4c63d2;
  color: white;
  border-color: #4c63d2;
}

/* Sort Controls */
.sort-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-controls label {
  font-weight: 500;
  color: #a0aec0;
}

#sort-select {
  padding: 0.5rem;
  border: 2px solid #4a5568;
  border-radius: 6px;
  background: #1a202c;
  color: #e2e8f0;
  cursor: pointer;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 3rem 1rem;
  background: #2d3748;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.no-results p {
  font-size: 1.2rem;
  color: #a0aec0;
  margin-bottom: 1rem;
}

#clear-filters {
  padding: 0.75rem 1.5rem;
  background: #4c63d2;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

#clear-filters:hover {
  background: #3c51b4;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #4c63d2;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: #3c51b4;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: rgba(74, 85, 104, 0.6);
  color: white;
  text-decoration: none;
  /* border: 2px solid #4c63d2; */
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #4c63d2;
  color: white;
  transform: translateY(-1px);
}

/* Tags */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #4a5568;
  color: #e2e8f0;
  border-radius: 12px;
  font-size: 0.8rem;
  margin: 0.25rem 0.25rem 0.25rem 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tag:hover {
  background: #4c63d2;
  color: white;
}

.tag.active-filter {
  background: #4c63d2;
  color: white;
  font-weight: 500;
}

/* Footer */
.site-footer {
  background: #1a202c;
  color: #a0aec0;
  text-align: center;
  padding: 2rem 0;
  margin-top: 4rem;
}

.site-footer p {
  margin: 0;
  opacity: 0.8;
}

.site-footer a {
  color: #4c63d2;
  text-decoration: none;
}

.site-footer a:hover {
  color: #5a73e8;
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .site-header {
    padding: 2rem 0;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .site-description {
    font-size: 1rem;
  }
  
  .stats {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .search-container {
    flex-direction: column;
  }
  
  .sort-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .filter-section {
    padding: 1rem;
  }
  
  .tag-filters {
    justify-content: center;
  }
  
  .tag-filter {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
} 