/* Global Styling - Animated Gradient Background */
body {
  font-family: 'Arial', sans-serif;
  background: linear-gradient(270deg, #ff6f61, #007BFF);
  background-size: 400% 400%;
  animation: gradientAnimation 15s ease infinite;
  color: #fff;
  margin: 0;
  padding: 0;
  line-height: 1.7;
  transition: background-color 0.5s ease, color 0.5s ease;
}

@keyframes gradientAnimation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

header {
  text-align: center;
  padding: 50px 0;
}

/* Adjusted Text Sizes */
h1 {
  font-size: 2.8em;
  letter-spacing: normal;
}

h2 {
  font-size: 2.4em;
}

p, li {
  font-size: 1.3em;
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
}

nav ul li {
  margin: 0 20px;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 1.2em;
}

nav ul li a:hover {
  color: #ff6f61;
}

/* Typewriter Effect */
header h1 {
  font-size: 2.8em;
  color: #fff;
  text-align: center;
  display: inline-block;
  margin: 0 auto;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid #fff; /* Caret style */
  width: fit-content;
  max-width: fit-content;
  animation: typing 1.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  50% {
    border-color: transparent;
  }
  100% {
    border-color: white;
  }
}

/* No Background Box for Skills */
#skills ul {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  padding: 0;
}

#skills ul li {
  background-color: transparent;
  padding: 15px 25px;
  border-radius: 8px;
  font-size: 1.3em;
  list-style: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#skills ul li:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Customized Skill Semi-Buttons */
#skills ul li[data-skill="html"]::before {
  content: "<html> ... </html>";
  display: block;
  font-family: monospace;
  color: #ff6f61;
  font-size: 1em;
}

#skills ul li[data-skill="css"]::before {
  content: "body { background: #141414; }";
  display: block;
  font-family: monospace;
  color: #007BFF;
  font-size: 1em;
}

#skills ul li[data-skill="javascript"]::before {
  content: "function() { alert('Hello World'); }";
  display: block;
  font-family: monospace;
  color: #F0DB4F;
  font-size: 1em;
}

/* Email box styling to match background */
#contact a {
  color: #ff6f61;
  font-size: 1.4em;
  text-decoration: none;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

#contact a:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* Project Section Styling */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.project-item {
  background-color: rgba(255, 255, 255, 0.2);
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s;
  color: #fff;
}

.project-item:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.project-item h3 {
  margin-top: 0;
  color: #fff;
}

.project-item p {
  color: #fff;
}

.project-item a {
  color: #fff;
  text-decoration: none;
}

/* Scroll to Top Button - Improved Design */
#scrollToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #ff6f61;
  color: white;
  border: none;
  padding: 15px;
  cursor: pointer;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  font-size: 18px;
  display: none;
  transition: all 0.3s ease;
}

#scrollToTop:hover {
  background-color: #ff453a;
  transform: scale(1.1);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}

footer {
  text-align: center;
  padding: 30px 0;
}

footer p {
  color: #fff;
}

.social-links a {
  margin: 0 10px;
  color: #fff;
  text-decoration: none;
}

social-links a:hover {
  color: #ff6f61;
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s, transform 0.5s;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

