@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;700&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
}

body, html {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: 'Poppins', sans-serif;
  scroll-behavior: smooth;
  background: #fafafa;
  color: #212121;
}

header {
  background: #bbdefb;
  color: #212121;
  padding: 1.2em 2em;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(187, 222, 251, 0.7);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: 2px;
  margin: 0;
}

/* Section underline with soft yellow */
section h2 {
  border-bottom: 3px solid #fff9c4;
  padding-bottom: 0.3em;
}

/* Section background pattern with light yellow pastel */
section {
  background: linear-gradient(135deg, #f5f5f5 25%, #fff9c4 25%, #fff9c4 50%, #f5f5f5 50%, #f5f5f5 75%, #fff9c4 75%, #fff9c4 100%);
  background-size: 40px 40px;
}

/* Message box with soft yellow background */
#contact {
  background-color: #fffde7;
  box-shadow: 0 4px 12px rgba(255, 249, 196, 0.5);
  border-radius: 15px;
  padding: 3em 2em;
}

.contact-intro {
  font-size: 1rem;
  text-align: center;
  margin-bottom: 1em;
}

.contact-details {
  display: flex;
  justify-content: center;
  gap: 2em;
  margin-bottom: 1.5em;
}

@media (max-width: 768px) {
  .contact-details {
    flex-direction: column;
    align-items: center;
    gap: 1em;
  }
}

.contact-details a {
  color: #4a90e2;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5em;
  transition: color 0.3s ease;
}

.contact-details a:hover,
.contact-details a:focus {
  color: #357abd;
}

.contact-details a i {
  font-size: 1.5rem;
}

/* Navbar link hover with soft yellow underline */
nav a:hover,
nav a:focus {
  color: #fff176;
}

nav a:hover::after,
nav a:focus::after {
  background: #fff176;
  width: 100%;
}

/* Button hover with soft yellow */
form button:hover {
  background: #fff176;
  color: #212121;
  transform: scale(1.05);
  transition: background 0.3s ease, transform 0.2s ease;
}

nav a {
  margin: 0 1em;
  color: white;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: #a3c4f3;
  transition: width 0.3s ease;
}

nav a:hover,
nav a:focus {
  color: #a3c4f3;
}

nav a:hover::after,
nav a:focus::after {
  width: 100%;
}

section {
  padding: 4em 2em;
  max-width: 900px;
  margin: 0 auto 3em auto;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

section.active {
  opacity: 1;
  transform: translateY(0);
}

h2 {
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 1em;
  color: #4a90e2;
  text-align: center;
  letter-spacing: 1.5px;
}

#about-me h2 {
  text-align: center;
  margin-bottom: 0.5em;
}

#about-me p {
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  color: #333;
}

@media (max-width: 768px) {
  body {
    padding-left: 16px;
    padding-right: 16px;
    overflow-x: hidden;
  }
  #about-me p {
    font-size: 0.9rem;
    text-align: center;
  }
  section#about-me {
    box-shadow: 0 8px 20px rgba(0,0,0,0.15) !important;
    padding-left: 1em;
    padding-right: 1em;
    margin: 3em 1em;
    max-width: 450px;
  }
}

#about-me {
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 2em 2em;
  margin: 1.5em auto 3em auto;
  max-width: 900px;
}

.skill {
  margin-bottom: 1.5em;
  transition: transform 0.3s ease;
  cursor: default;
}

.skill:hover {
  transform: scale(1.05);
}

.skill span {
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
  color: #2c3e50;
}

.bar {
  background: #dbe9fb;
  border-radius: 20px;
  height: 14px;
  width: 100%;
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

.progress {
  background: #4a90e2;
  height: 100%;
  border-radius: 20px;
  width: 0;
  transition: width 1.5s ease-in-out;
}

.skill.active .progress {
  width: var(--progress-width);
}

ul {
  list-style-type: none;
  padding: 0;
  font-weight: 500;
  font-size: 1.1rem;
  color: #555;
}

ul li {
  background: #e6f0fa;
  margin: 0.5em 0;
  padding: 0.8em 1em;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(74, 144, 226, 0.2);
  transition: background 0.3s ease;
}

ul li:hover {
  background: #c3d9f7;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.2em;
  max-width: 400px;
  margin: 0 auto;
}

form input, form textarea {
  padding: 1em;
  border: 1px solid #ccc;
  border-radius: 12px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
  transition: border-color 0.3s ease;
}

form input:focus, form textarea:focus {
  border-color: #4a90e2;
  outline: none;
  box-shadow: 0 0 8px #4a90e2;
}

form button {
  padding: 1em;
  background: #4a90e2;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1rem;
  transition: background 0.3s ease, transform 0.2s ease;
}

form button:hover {
  background: #357abd;
  transform: scale(1.05);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5em;
  padding: 0;
  margin: 1em 0 0 0;
  list-style: none;
}

.social-links li a {
  color: #4a90e2;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.2rem;
  transition: color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3em;
}

.social-links li a i {
  font-size: 2.5rem;
}

.social-links li a span {
  font-size: 0.9rem;
  color: #212121;
}

.social-links li a:hover,
.social-links li a:focus {
  color: #357abd;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive styles */
@media (max-width: 768px) {
  body {
    padding-left: 0;
    padding-right: 0;
    overflow-x: hidden;
  }
  header {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1em 1.5em;
  }
  header h1 {
    font-size: 1.4rem;
    margin-bottom: 0.5em;
  }
  nav {
    margin: 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }
  nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
  }
  nav a {
    flex: 0 0 auto;
    margin: 0.3em 1em 0.3em 0;
    font-size: 0.9rem;
    white-space: nowrap;
    position: relative;
  }
  nav a:not(:last-child)::after {
    content: none;
  }
  nav a:not(:first-child) {
    border-left: 1px solid #a3c4f3;
    padding-left: 0.7em;
  }
  section {
    padding: 2em 1em;
    margin: 1.5em 1em;
  }
  #social-platforms {
    max-width: 100%;
  }
  .skill span {
    font-size: 0.9rem;
  }
  form {
    max-width: 100%;
  }
  /* Social links horizontal scroll */
  .social-links {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    padding: 0.5em 0;
    justify-content: flex-start;
  }
  .social-links::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
  }
  .social-links li {
    flex: 0 0 auto;
    margin: 0 0.5em;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.4rem;
  }

  nav a {
    font-size: 0.85rem;
    margin: 0.2em 0.4em 0.2em 0;
  }

  h2 {
    font-size: 1.5rem;
  }

  .skill span {
    font-size: 0.85rem;
  }

  form button {
    font-size: 1rem;
  }
}
