/* Modern Reset & Base Styles */
:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-tertiary: #6e7681;
  --accent: #8250df;
  --accent-light: #9e6cfd;
  --border: #30363d;
  --success: #3fb950;
  --shadow: 0 8px 24px rgba(1, 4, 9, 0.8);
  --transition: all 0.2s cubic-bezier(0.3, 0, 0.5, 1);
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f6f8fa;
  --bg-tertiary: #eaeef2;
  --text-primary: #24292f;
  --text-secondary: #57606a;
  --text-tertiary: #6e7781;
  --accent: #8250df;
  --border: #d0d7de;
  --shadow: 0 8px 24px rgba(140, 149, 159, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  transition: var(--transition);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Layout & Containers */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  flex: 1;
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 0 2rem;
  text-align: center;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }

/* Profile Elements */
.profile-logo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--border);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.profile-logo:hover {
  transform: scale(1.05);
  border-color: var(--accent);
}

/* Fixed Navigation Bar */
.fixed-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-color: rgba(var(--bg-primary-rgb), 0.85);
  border-bottom: 1px solid var(--border-primary);
  padding: 0.5rem 1rem;
}

.mobile-menu-button {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.gh-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.gh-nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  padding: 0.5rem 1rem;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: var(--transition);
}

/* Mobile Styles */
@media (max-width: 768px) {
  .mobile-menu-button {
    display: block;
    position: absolute;
    right: 1rem;
    top: 0.5rem;
  }
  
  .gh-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: rgba(var(--bg-primary-rgb), 0.95);
    padding: 1rem;
    border-bottom: 1px solid var(--border-primary);
    gap: 0.5rem;
  }
  
  .gh-nav.active {
    display: flex;
  }
  
  .gh-nav-item {
    width: 100%;
    padding: 0.75rem 1rem;
  }
  
  .theme-toggle {
    margin-left: 0;
    width: 100%;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-primary);
    margin-top: 0.5rem;
  }
  
  .container {
    margin-top: 60px;
  }
}

/* Theme Toggle in Navbar */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  padding: 0.5rem 1rem;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: var(--transition);
}

.theme-toggle:hover {
  color: var(--text-primary);
  background-color: var(--bg-tertiary);
}

/* Adjust container to account for fixed navbar */
.container {
  margin-top: 70px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .gh-nav {
    justify-content: flex-start;
    gap: 0.25rem;
  }
  
  .gh-nav-item {
    padding: 0.5rem;
    font-size: 0.85rem;
  }
  
  .theme-toggle {
    margin-left: 0;
    padding: 0.5rem;
  }
  
  .container {
    margin-top: 90px;
  }
}

/* Cards & Content */
.gh-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.gh-card:hover {
  border-color: var(--accent-light);
  transform: translateY(-2px);
}

.gh-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

/* Stats */
.gh-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.stat-item {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.stat-item:hover {
  border-color: var(--accent);
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Buttons */
.gh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.gh-btn:hover {
  background-color: var(--bg-secondary);
  border-color: var(--accent);
  color: var(--accent);
}

.gh-btn-primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: white;
}

.gh-btn-primary:hover {
  background-color: var(--accent-light);
  border-color: var(--accent-light);
}

/* Skill Bars */
.skill-bar {
  height: 8px;
  background-color: var(--bg-tertiary);
  border-radius: 4px;
  margin: 1rem 0;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background-color: var(--accent);
  border-radius: 4px;
}

/* Education Items */
.education-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.education-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Content Box */
.content-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  text-align: left;
}

.content-box h3 {
  color: var(--accent);
  margin-bottom: 1rem;
}

.content-box p {
  margin-bottom: 0.75rem;
}

/* Back Button */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  margin: 2rem 0;
  text-decoration: none;
  transition: var(--transition);
}

.back-button:hover {
  background-color: var(--bg-secondary);
  border-color: var(--accent);
  color: var(--accent);
}

/* Social Icons */
.social-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  transition: var(--transition);
}

.social-icon:hover {
  background-color: var(--accent);
  transform: translateY(-2px);
}

.social-icon img {
  width: 20px;
  height: 20px;
}

/* Language Tags */
.language-tags {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.language-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  z-index: 100;
  transition: var(--transition);
}

.theme-toggle:hover {
  background-color: var(--accent);
  color: white;
}

/* Floating Animation */
.floating {
  animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* Footer Styles */
.site-footer {
  background-color: var(--bg-tertiary);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: auto;
  color: var(--text-secondary);
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer .octicon {
  vertical-align: middle;
}

.site-footer .octicon-heart {
  color: #ff4d4d;
}

/* Projects Page Styles */
.project-categories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

.category-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(130, 80, 223, 0.5);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 14px;
  background: linear-gradient(45deg, 
      var(--accent), 
      rgba(130, 80, 223, 0.5), 
      var(--accent));
  z-index: -1;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(130, 80, 223, 0.2);
}

.project-card:hover::before {
  opacity: 1;
  animation: glow 2s infinite alternate;
}

@keyframes glow {
  from {
      box-shadow: 0 0 5px -5px var(--accent);
  }
  to {
      box-shadow: 0 0 10px 5px rgba(130, 80, 223, 0.5);
  }
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.project-badge {
  background: var(--accent);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.project-content {
  margin-bottom: 1.5rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tech-tag {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.8rem;
}

.project-footer {
  display: flex;
  gap: 1rem;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

/* Contact Page Styles */
.contact-intro {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.social-tile {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.social-tile::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 18px;
  background: linear-gradient(135deg, 
      rgba(130, 80, 223, 0.8) 0%, 
      rgba(130, 80, 223, 0.4) 50%, 
      rgba(130, 80, 223, 0.8) 100%);
  z-index: -1;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.social-tile:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(130, 80, 223, 0.35);
}

.social-tile:hover::before {
  opacity: 1;
  animation: glow-pulse 2s infinite ease-in-out;
}

.social-icon {
  font-size: 2.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 60px;
  width: 60px;
  border-radius: 50%;
  background: rgba(130, 80, 223, 0.1);
  transition: all 0.3s ease;
}

.social-tile:hover .social-icon {
  background: rgba(130, 80, 223, 0.2);
  transform: scale(1.1);
}

.social-icon img {
  height: 30px;
  width: 30px;
  object-fit: contain;
}

.social-name {
  font-weight: 600;
  font-size: 1rem;
  margin-top: 0.5rem;
}

.social-handle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .profile-header {
    padding: 2rem 0 1rem;
  }
  
  .gh-nav {
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
  }
  
  .gh-nav-item {
    justify-content: center;
  }
  
  .gh-stats {
    grid-template-columns: 1fr 1fr;
  }
  
  .gh-card {
    padding: 1.5rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .social-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .social-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-intro {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
}

/* Back Button Enhancement */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1.8rem;
  margin: 3rem 0 2rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.back-button:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(130, 80, 223, 0.4);
}

/* Ensure particles background scales properly */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Better category buttons for large screens */
@media (min-width: 1600px) {
  .project-categories {
    margin: 3rem 0;
  }
  
  .category-btn {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
  }
}
