body {
  font-family: monospace, monospace;
  font-size: 16px;
  line-height: 1.5;
  background-color: #f8eaea;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column; /* Stack vertically */
  justify-content: center;
  align-items: center;
  min-height: 100vh; /* Fill viewport */
  color: #333;
  opacity: 1;
  position: relative; /* Enable positioning for the blob */
  overflow: hidden; /* Prevent blob overflow */
  z-index: 0; /* Blob behind content */
  width: 100%;
  box-sizing: border-box;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: monospace, monospace;
  font-size: 16px;
  line-height: 1.5;
  background-color: #f8eaea;
  color: #333;
  width: 100%;
  overflow-x: hidden;
}

main {
  flex: 1; /* Take remaining space */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

section {
  max-width: 800px;
  width: 100%;
  margin: 20px auto; /* Center horizontally */
  padding: 30px 25px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  text-align: left; /* Keep text left-aligned */
}

#about,
#skills {
  max-width: 800px;
  width: 100%;
  margin: 40px auto;
  background: rgba(255, 255, 255, 0.15);
  padding: 30px 25px;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  animation: fadeIn 2.5s ease-out forwards;
  opacity: 0;
  transition: all 0.3s ease-in-out;
}

#about h3,
#skills h3 {
  font-size: 24px;
  margin-bottom: 15px;
  text-align: left;
  border-bottom: 2px solid #3498db;
  display: inline-block;
  padding-bottom: 5px;
}

#about p {
  margin-bottom: 1em;
  line-height: 1.7;
}

#skills ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

#skills li {
  margin-bottom: 10px;
  line-height: 1.6;
}

#skills li strong {
  color: #000;
  font-weight: bold;
}

#education {
  max-width: 800px;
  width: 100%;
  margin: 40px auto;
  background: rgba(255, 255, 255, 0.15);
  padding: 30px 25px;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  animation: fadeIn 2.5s ease-out forwards;
  opacity: 0;
}

#education h3 {
  font-size: 24px;
  margin-bottom: 15px;
  border-bottom: 2px solid #3498db;
  display: inline-block;
  padding-bottom: 5px;
}

#education ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#education li {
  margin-bottom: 10px;
  line-height: 1.6;
}

header {
  padding: 10px 20px;
  text-align: center;
  width: 100%;
  animation: fadeIn 2s ease-out forwards;
  opacity: 0;
  position: relative; /* Above blob */
  z-index: 1;
  box-sizing: border-box;
}

header p {
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

nav {
  padding: 20px 20px;
  width: 100%;
  animation: fadeIn 4s;
  box-sizing: border-box;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap; /* Wrap on small screens */
  justify-content: center;
  gap: 15px;
}

nav ul li {
  flex: 0 1 auto; /* Do not stretch */
  min-width: 120px;
  text-align: center;
}

nav ul li a {
  display: block;
  text-decoration: none;
  color: #000000eb;
  font-size: 16px;
  font-weight: bold;
  padding: 10px 15px;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

nav ul li a:hover {
  background-color: #333333a3;
  transform: scale(1.1);
}

nav ul li a.active {
  background-color: #3498db;
  color: #fff;
}

/* Bigger, wider drifting blob */
.gooey-blob {
  position: absolute;
  bottom: -180px; /* Lower so large size does not dominate */
  left: 50%;
  width: min(1200px, 140vw); /* Larger max with gentle overflow */
  height: min(1200px, 140vw);
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.35), rgba(108, 92, 231, 0.25));
  border-radius: 50%;
  filter: blur(200px); /* Softer edges for larger size */
  transform: translateX(-50%) translateY(0);
  animation: gooey-move 42s ease-in-out infinite; /* Slower and floatier */
  z-index: -1;
}

footer {
  text-align: center;
  padding: 20px;
  background-color: transparent;
  color: #333;
  width: 100%;
  margin-top: auto;
}

footer .social-links {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  display: flex;
  justify-content: center;
  gap: 15px;
}

footer .social-links li {
  display: inline-block;
}

footer .social-links a {
  text-decoration: none;
  color: #3498db;
  font-size: 24px;
  transition: color 0.3s ease, transform 0.3s ease;
}

footer .social-links a:hover {
  color: #6c5ce7;
  transform: scale(1.2);
}

footer p {
  font-size: 14px;
  color: #666;
  margin-top: 10px;
}

/* Wider, driftier path */
@keyframes gooey-move {
  0% {
    transform: translate(-50%, 65%) scale(0.95);
  }
  15% {
    transform: translate(-15%, -35%) scale(1.45); /* Up-right and expand */
  }
  35% {
    transform: translate(-80%, 25%) scale(1.1); /* Drift far left and dip */
  }
  55% {
    transform: translate(-35%, -50%) scale(1.55); /* Rise high and expand */
  }
  75% {
    transform: translate(-90%, -5%) scale(1.2); /* Sweep left */
  }
  100% {
    transform: translate(-50%, 65%) scale(0.95);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.fade-out {
  animation: fadeOut 0.5s forwards;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  body {
    font-size: 14px;
  }

  header {
    padding: 10px;
  }

  nav {
    padding: 10px;
  }

  nav ul {
    gap: 10px;
  }

  nav ul li a {
    padding: 8px 12px;
    font-size: 14px;
  }

  /* Keep the blob large but tame on mobile */
  .gooey-blob {
    bottom: -140px;
    width: min(1000px, 160vw);
    height: min(1000px, 160vw);
    filter: blur(180px);
    animation-duration: 46s; /* Even slower on small screens */
  }

  section {
    margin: 20px 10px;
    padding: 20px;
  }

  section h3 {
    font-size: 20px;
  }

  section p,
  section li {
    font-size: 14px;
  }
}

@media screen and (max-width: 480px) {
  body {
    font-size: 12px;
  }

  header p {
    max-width: 100%;
    padding: 0 10px;
  }

  nav ul li {
    min-width: 100px;
  }

  nav ul li a {
    padding: 6px 10px;
    font-size: 12px;
  }

  footer .social-links a {
    font-size: 20px;
  }

  /* Slightly smaller on very small screens to avoid covering content */
  .gooey-blob {
    bottom: -120px;
    width: min(900px, 180vw);
    height: min(900px, 180vw);
    filter: blur(170px);
  }
}
