/* Gruvbox Dark Color Palette */
:root {
  --bg: #282828;        /* Background */
  --fg: #fbf1c7;        /* Foreground/Text */
  --red: #fb4934;       /* Red */
  --green: #b8bb26;     /* Green */
  --yellow: #fabd2f;    /* Yellow */
  --blue: #83a598;      /* Blue */
  --purple: #d3869b;   /* Purple */
  --aqua: #8ec07c;      /* Aqua */
  --orange: #fe8019;    /* Orange */
}

/* Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'JetBrains Mono', monospace;
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  /* Subtle background texture */
  background-image: 
    radial-gradient(circle at 1px 1px, var(--fg) 0.5px, transparent 1px);
  background-size: 20px 20px;
}

/* Accessibility: Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

/* Profile section styling */
.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  transition: transform 0.3s ease;
}

.profile-section:hover {
  transform: scale(1.01);
}

.profile-img-container {
  margin-bottom: 1.5rem;
  position: relative;
  transition: transform 0.3s ease;
}

.profile-img-container:hover {
  transform: scale(1.05);
}

.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.profile-img:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 25px rgba(131, 165, 152, 0.4);
}

.name {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--fg);
  text-align: center;
  margin: 0.5rem 0;
  transition: color 0.3s ease;
}

.name:hover {
  color: var(--yellow);
}

/* Navigation section */
.navigation-section {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.nav-link {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background-color: transparent;
  color: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  text-align: center;
}

.nav-link:hover {
  background-color: rgba(131, 165, 152, 0.1); /* --blue with opacity */
  color: var(--yellow);
  transform: translateY(-2px);
}

/* Contact section */
.contact-section {
  margin-bottom: 2rem;
  text-align: center;
}

.contact-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--aqua);
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background-color: transparent;
  color: var(--purple);
  border: 1px solid var(--purple);
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.contact-link:hover {
  background-color: rgba(211, 134, 155, 0.1); /* --purple with opacity */
  color: var(--yellow);
  transform: translateY(-2px);
}

/* Repositories section */
.repos-section {
  margin-bottom: 2rem;
}

.repos-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--green);
  text-align: center;
}

.repos-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.repo-card {
  background-color: rgba(40, 40, 40, 0.8);
  border: 1px solid var(--blue);
  border-radius: 8px;
  padding: 1.2rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.repo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  border-color: var(--yellow);
}

.repo-name {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--blue);
}

.repo-name a {
  color: inherit;
  text-decoration: none;
}

.repo-name a:hover {
  color: var(--yellow);
  text-decoration: underline;
}

.repo-description {
  margin-bottom: 0.8rem;
  color: #d5c4a1;
}

.repo-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--orange);
}

.loading {
  text-align: center;
  padding: 2rem;
  color: var(--fg);
  font-style: italic;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.pulse {
  animation: pulse 2s infinite;
}

.float {
  animation: float 3s ease-in-out infinite;
}

/* Enhanced hover effects for all interactive elements */
.nav-link,
.contact-link,
.repo-card,
.profile-img {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

/* Ripple effect for clickable elements */
.ripple {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(251, 241, 199, 0.4);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(2);
    opacity: 0;
  }
}

/* Smooth transitions for text elements */
.name,
h2 {
  transition: all 0.3s ease;
}

/* Responsive design */
@media (max-width: 992px) {
  .container {
    max-width: 90%;
  }
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  .container {
    max-width: 100%;
    padding: 10px;
  }
  
  .name {
    font-size: 2rem;
  }
  
  .repos-container {
    grid-template-columns: 1fr;
  }
  
  .profile-img {
    width: 120px;
    height: 120px;
  }
  
  .contact-links {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }
  
  .nav-link, .contact-link {
    width: 80%;
    max-width: 250px;
  }
}

@media (max-width: 480px) {
  .name {
    font-size: 1.8rem;
  }
  
  .profile-img {
    width: 100px;
    height: 100px;
  }
  
  .nav-link, .contact-link {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    width: 90%;
  }
  
  .profile-section {
    padding: 1rem;
  }
  
  .repos-section h2,
  .contact-section h2 {
    font-size: 1.3rem;
  }
  
  .repo-card {
    padding: 1rem;
  }
}

/* Extra small devices */
@media (max-width: 360px) {
  .name {
    font-size: 1.6rem;
  }
  
  .profile-img {
    width: 80px;
    height: 80px;
  }
  
  body {
    font-size: 0.9rem;
  }
}

/* Large screens */
@media (min-width: 1200px) {
  .repos-container {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
}