:root {
  --bg-color: #ffffff;
  --text-color: #333333;
  --hero-bg: linear-gradient(135deg, #f5f7fa 0%, #e8eaec 100%);
  --secondary-text: #666;
  --card-bg: #ffffff;
  --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  /* Add transition duration and timing for all theme-related properties */
  --theme-transition: 0.3s ease-in-out; /* Shortened duration for snappier response */
}

[data-theme="dark"] {
  --bg-color: #1a1a1a;
  --text-color: #ffffff;
  --hero-bg: linear-gradient(135deg, #2d3436 0%, #1a1a1a 100%);
  --secondary-text: #cccccc;
  --card-bg: #2d2d2d;
  --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

body {
  font-family: "Roboto", sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  background: none; /* Reset any background first */
  background-color: var(--bg-color);
  background-image: radial-gradient(
    var(--secondary-text) 1px,
    var(--bg-color) 1px
  );
  background-size: 50px 50px;
  background-position: -25px -25px;
  color: var(--text-color);
  transition: background-color var(--theme-transition),
    background-image var(--theme-transition), color var(--theme-transition);
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", Arial, sans-serif;
}

body {
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

/* Ensure text color properly transitions with theme */
body,
p,
h1,
h2,
h3,
h4,
h5,
h6,
li,
a {
  color: var(--text-color);
  transition: color var(--theme-transition);
}

/* Container layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Header styles */
header {
  background-color: #2c3e50;
  color: white;
  padding: 1.5rem 0;
  width: 100%; /* Fixed width */
  background-size: 200% 100%;
  animation: shineOnce 2s ease-in-out forwards; /* Changed to shineOnce and added forwards */
  z-index: -1;
}

/* Add proper hero section styling */
.hero {
  padding: 80px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background: var(--hero-bg);
  border-radius: 0 0 30px 30px;
  transition: background var(--theme-transition);
}

.hero h1 {
  font-size: 2.5em;
  margin-bottom: 20px;
  animation: slideInDown 0.8s ease-out;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(45deg, var(--text-color), var(--secondary-text));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background var(--theme-transition);
}

.hero p {
  font-size: 1.2em;
  color: var(--secondary-text);
  max-width: 600px;
  margin: 0 auto;
  animation: slideInUp 0.8s ease-out;
}

.projects {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.projects h2 {
  text-align: center;
  margin-bottom: 40px;
}

/* Make all buttons match the size of repo cards - UPDATED STYLES */
.button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 300px;
  min-height: 180px;
  padding: 25px; /* UPDATED: increased padding to match */
  margin: 0;
  text-decoration: none;
  border-radius: 15px;
  box-shadow: var(--card-shadow);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all var(--theme-transition);
  gap: 12px; /* ADDED: standardized gap between elements */
}

/* Remove individual button styles that cause inconsistency */
.button i {
  font-size: 2.5em;
  color: #ffffff !important;
  transition: transform 0.5s ease;
  margin-bottom: 0; /* Remove bottom margin and use gap instead */
}

/* Standardized heading styling */
.button h3 {
  font-size: 1.8em;
  margin: 0;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  line-height: 1.2;
  height: 62px; /* Fixed height as requested */
  display: flex;
  align-items: center; /* Center text vertically */
  justify-content: center; /* Center text horizontally */
}

.button p {
  font-size: 0.95em;
  margin: 0; /* Use gap for spacing instead */
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 0.9;
}

/* Pomodoro specific styling */
.button.button-1 {
  background-color: #f44336;
}

.button.button-1 h3 {
  font-family: "Pacifico", cursive;
  font-weight: normal;
}

.button.button-1:hover i {
  transform: scale(1.1);
}

.button.button-1:hover {
  background-color: #d32f2f; /* Darker red on hover */
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(211, 47, 47, 0.3); /* Custom shadow with button color */
}

/* Pingpong specific styling */
.button.button-2 {
  background-color: #17a2b8;
}

.button.button-2 h3 {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
}

.button.button-2:hover i {
  transform: rotate(30deg);
  animation: bounce 0.6s ease infinite alternate;
}

.button.button-2:hover {
  background-color: #138496; /* Darker shade on hover */
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(19, 132, 150, 0.3);
}

/* Update button container to center items */
.button-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px; /* Match the gap of repo-container */
  padding: 20px;
  margin-top: 50px;
}

.button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0)
  );
  transform: translateY(100%);
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.button:hover::before {
  transform: translateY(0);
}

.button:hover {
  background-color: #0056b3;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Individual button colors */
.button.button-1 {
  background-color: #f44336;
  color: #ffffff !important;
  display: flex;
  flex-direction: column;
  gap: 15px; /* Add spacing between elements inside the button */
}

.button.button-1 i {
  font-size: 2.5em; /* Larger icon */
  margin-bottom: 5px;
  color: #ffffff !important;
}

.button.button-1 h3 {
  font-family: "Pacifico", cursive;
  font-size: 2.2em;
  font-weight: normal;
  margin: 5px 0; /* Reduce margin to fit in the new size */
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.button.button-1 p {
  font-size: 1em;
  margin: 5px 0 0;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Update button-2 styling for Pingpong Leaderboard */
.button.button-2 {
  background-color: #17a2b8; /* Teal/blue color */
  color: #ffffff !important;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.button.button-2 i {
  font-size: 2.5em;
  margin-bottom: 5px;
  color: #ffffff !important;
  transition: transform 0.5s ease;
}

.button.button-2:hover i {
  transform: rotate(30deg); /* Add a fun rotation effect on hover */
  animation: bounce 0.6s ease infinite alternate;
}

.button.button-2 h3 {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 1.8em;
  margin: 5px 0;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.button.button-2 p {
  font-size: 1em;
  margin: 5px 0 0;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Add bounce animation for the ping pong icon */
@keyframes bounce {
  from {
    transform: translateY(0) rotate(30deg);
  }
  to {
    transform: translateY(-5px) rotate(30deg);
  }
}

.button.button-2:hover {
  background-color: #138496; /* Darker shade on hover */
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(19, 132, 150, 0.3); /* Custom shadow with button color */
}

/* Responsive design for mobile devices */
@media screen and (max-width: 600px) {
  .button,
  .repo-card {
    width: 90%; /* Use same percentage for better mobile scaling */
    min-height: 160px; /* Slightly smaller on mobile */
    margin: 0 auto; /* Center but don't add extra margins */
  }

  .button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .bio-list {
    width: 90%;
    margin: 20px auto;
  }

  .profile-image img {
    width: 150px;
    height: 150px;
  }

  .projects {
    padding: 40px 10px;
  }
}

/* Responsive design for mobile devices */
@media screen and (max-width: 600px) {
  .button {
    display: block;
    width: 80%;
    margin: 10px auto;
  }

  .button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .bio-list {
    width: 90%;
    margin: 20px auto;
  }

  .profile-image img {
    width: 150px;
    height: 150px;
  }

  .projects {
    padding: 40px 10px;
  }
}

/* ...existing code... */

.profile-image {
  margin-bottom: 30px;
  animation: fadeIn 1s ease-in;
}

.profile-image img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(5px);
}

.profile-image img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

.theme-switch {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
}

#themeToggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--card-bg);
  cursor: pointer;
  padding: 0;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all var(--theme-transition);
}

#themeToggle .icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  transition: all 0.3s ease;
}

#themeToggle .sun {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0);
}

#themeToggle .moon {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg);
}

[data-theme="dark"] #themeToggle .sun {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-90deg);
}

[data-theme="dark"] #themeToggle .moon {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0);
}

#themeToggle:hover {
  transform: scale(1.1);
}

/* Animation Keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInDown {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes shineOnce {
  /* New animation name */
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.social-links {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 25px;
  position: relative;
  z-index: 2;
  transition: all var(--theme-transition);
}

.social-link {
  font-size: 32px;
  color: var(--text-color);
  background: var(--card-bg);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all var(--theme-transition);
  box-shadow: var(--card-shadow);
}

.social-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.social-link:hover i {
  transform: scale(1.1);
}

/* Update platform-specific hover styles */
.social-link[href*="github"]:hover {
  background-color: #6e5494;
  color: #ffffff;
}

.social-link[href*="linkedin"]:hover {
  background-color: #0077b5;
  color: #ffffff;
}

.social-link[href*="mailto"]:hover {
  background-color: #ea4335;
  color: #ffffff;
}

.bio-list {
  list-style-type: none;
  padding: 0;
  margin: 20px auto;
  text-align: left;
  max-width: 600px;
  display: inline-block;
  font-family: "Roboto", sans-serif;
  font-size: 1.1em;
  line-height: 1.5;
  width: 100%; /* Ensure full width within parent */
}

.bio-list li {
  margin-bottom: 15px;
  padding-left: 25px;
  position: relative;
  animation: fadeInLeft 0.8s ease-out;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 5px;
  padding: 10px 15px;
  transition: all var(--theme-transition);
  color: var(--text-color);
}

/* Removed the bullet points */
.bio-list li::before {
  content: "";
}

[data-theme="dark"] .bio-list li {
  background: rgba(255, 255, 255, 0.05);
  transition: background var(--theme-transition);
}

.github-projects {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.github-projects h2 {
  text-align: center;
  margin-bottom: 40px;
}

.repo-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.repo-card {
  display: block;
  background: var(--card-bg);
  color: var(--text-color);
  width: 300px;
  padding: 20px;
  border-radius: 15px;
  box-shadow: var(--card-shadow);
  transition: all var(--theme-transition);
  text-decoration: none;
  min-height: 180px;
}

.repo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.repo-card h3 {
  margin-top: 0;
  font-size: 1.5em;
}

.repo-card p {
  font-size: 1em;
  color: var(--secondary-text);
}

.language-stats {
  margin-top: 15px;
  border-radius: 5px;
  overflow: hidden;
  height: 10px;
  display: flex;
  background: rgba(0, 0, 0, 0.1);
}

.language-bar {
  height: 100%;
  transition: width 0.3s ease;
}

.language-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  font-size: 0.8em;
}

.language-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.language-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* ...existing code... */
.skills {
  padding: 80px 20px;
  background: var(--card-bg);
  transition: all var(--theme-transition);
}

.skills h2 {
  text-align: center;
  margin-bottom: 40px;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(5, 120px); /* Force 5 columns of 120px each */
  gap: 50px;
  padding: 20px;
  max-width: min(
    1200px,
    calc(120px * 5 + 200px)
  ); /* Adjust for 5 items plus gaps */
  margin: 0 auto;
  justify-content: center;
}

/* Primary Skills */
.skill {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 120px;
  opacity: 1;
  transform: translateY(0);
  transition: all var(--theme-transition);
  margin: 0 auto; /* Center within grid cell */
}

.skill i {
  font-size: 3em; /* Adjust the size for primary skills */
  color: var(--text-color); /* Explicitly set icon color */
  transition: color var(--theme-transition);
}

.skill p {
  font-size: 1em;
  margin: 0;
}

/* Line break */
.skill-break {
  grid-column: 1 / -1; /* Span all columns */
  width: 100%;
  border-top: 1px solid var(--secondary-text);
  margin: 20px 0;
  opacity: 0.5;
}

/* Less Familiar Skills */
.skill.less-familiar {
  transform: scale(0.75); /* Slightly smaller than primary skills */
  opacity: 0.8;
}

.skill.less-familiar i {
  font-size: 2em; /* Adjust the size for less familiar skills */
  color: var(--text-color); /* Ensure less familiar icons also change color */
  transition: color var(--theme-transition);
}

.skill.less-familiar p {
  font-size: 0.9em;
  margin: 0;
}

.skill.less-familiar:hover {
  transform: scale(0.9);
  opacity: 1;
}

/* Tablet breakpoint */
@media screen and (max-width: 768px) {
  .skills-container {
    grid-template-columns: repeat(4, 1fr);
    gap: 30px; /* Fixed the excessive gap */
    padding: 15px;
    justify-items: center; /* Center items horizontally */
    align-items: center; /* Center items vertically */
  }

  .skill {
    width: 100px;
    text-align: center;
    margin: 0 auto;
  }

  .skill i {
    font-size: 2.5em; /* Adjust the size for primary skills on tablet */
    display: block;
    margin-bottom: 5px;
  }

  .skill.less-familiar i {
    font-size: 1.5em; /* Adjust the size for less familiar skills on tablet */
  }
}

/* Mobile breakpoint */
@media screen and (max-width: 600px) {
  .skills-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 10px;
    justify-items: center; /* Center items horizontally */
    align-items: center; /* Center items vertically */
  }

  .skill {
    width: 80px;
    text-align: center; /* Ensure text is centered */
    margin: 0 auto; /* Center the skill container */
  }

  .skill i {
    font-size: 2.5em;
    display: block; /* Ensure icon takes full width */
    margin-bottom: 5px; /* Add some space between icon and text */
  }

  .skill p {
    font-size: 0.8em;
    margin: 0; /* Remove default margins */
    width: 100%; /* Ensure text takes full width */
  }
}

/* ...existing code... */
.skill-break {
  width: 100%;
  border-top: 1px solid var(--secondary-text);
  margin: 20px 20px;
}

.skill.less-familiar {
  transform: scale(0.85);
  opacity: 0.8;
}
/* ...existing code... */

.copyright {
  text-align: center;
  padding: 20px;
  color: var(--secondary-text);
  font-size: 0.9em;
  background: var(--card-bg);
  margin-top: 40px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  transition: all var(--theme-transition);
}

/* Responsive fixes for the hero section */
@media screen and (max-width: 768px) {
  .hero {
    padding: 60px 10px;
  }

  /* ...existing code... */
}

@media screen and (max-width: 600px) {
  .hero {
    padding: 40px 10px;
  }

  /* ...existing code... */
}

/* ...existing code... */
