/* ========== BASE STYLES ========== */
body {
  font-family: 'Inter', sans-serif;
  background: #f9f5f1;
  color: #5a4d41;
  min-height: 100vh;
  padding: 2rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  z-index: 0;
}
html {
  scroll-behavior: smooth;
}

/* ========== FLOATING BUBBLES ========== */
.bubbles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.bubble {
  position: absolute;
  bottom: calc(-1 * var(--size));
  left: var(--left);
  width: var(--size);
  height: var(--size);
  background: radial-gradient(circle, rgba(207,161,125,0.2) 0%, rgba(207,161,125,0.05) 100%);
  border-radius: 50%;
  filter: drop-shadow(0 0 8px rgba(207, 161, 125, 0.3));
  animation: rise var(--duration) linear infinite;
  animation-delay: var(--delay);
  mix-blend-mode: screen;
  opacity: 0.7;
}
@keyframes rise {
  0% { transform: translateY(0) scale(1); opacity: 0.7; }
  50% { opacity: 0.9; }
  100% { transform: translateY(-110vh) scale(1.2); opacity: 0; }
}

/* ========== MAIN CONTAINER ========== */
main {
  background: #fff9f4;
  border-radius: 1.5rem;
  padding: 3rem 3.5rem 4rem;
  max-width: 900px;
  width: 100%;
  box-shadow: 0 0 30px rgba(167, 137, 103, 0.3);
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideUp 1s forwards ease-out;
  position: relative;
  z-index: 1;
}
@keyframes fadeSlideUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ========== HEADINGS ========== */
h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: 3rem;
  margin-bottom: 0.4rem;
  color: #a67c52;
  text-shadow: 0 0 12px #a67c5277;
  letter-spacing: 0.05em;
}
h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 2.1rem;
  margin-bottom: 1.5rem;
  color: #7a99a1;
  border-bottom: 2px solid #cfa17d;
  padding-bottom: 0.3rem;
  position: relative;
  overflow: hidden;
}
h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
  background: linear-gradient(135deg, #cfa17d, #f1c9b7);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
  border-radius: 3px;
}
h2:hover::after { transform: translateX(0); }

/* ========== PROFILE IMAGE ========== */
.profile-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 4px solid #cfa17d;
  box-shadow: 0 15px 40px #cfa17dcc;
  object-fit: cover;
  margin: 0 auto 1.8rem;
  cursor: pointer;
  transition: transform 0.6s ease, box-shadow 0.6s ease;
  animation: pulse 3s infinite alternate ease-in-out, float 5s ease-in-out infinite;
}
.profile-img:hover {
  transform: scale(1.12) rotate(3deg);
  box-shadow: 0 25px 60px #cfa17dff;
  transition-delay: 0.05s;
}
@keyframes pulse {
  0% { box-shadow: 0 15px 40px #cfa17dcc; }
  100% { box-shadow: 0 25px 60px #cfa17dff; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ========== INTRO PARAGRAPH ========== */
p.intro {
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
  color: #6b5e4a;
  line-height: 1.6;
  font-weight: 500;
  opacity: 0;
  animation: fadeIn 1s forwards ease-out;
  animation-delay: 0.6s;
}
@keyframes fadeIn {
  to { opacity: 1; }
}

/* ========== SECTIONS ========== */
.section {
  background-color: #fff9f4;
  border-radius: 1.25rem;
  padding: 3rem 2.5rem 4rem;
  margin-bottom: 3.5rem;
  box-shadow: 0 10px 25px rgba(207, 161, 125, 0.15);
  text-align: center;
  opacity: 0;
  transform: translateY(40px);
  animation: sectionFadeUp 0.8s ease-out forwards;
}
@keyframes sectionFadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.section:nth-of-type(2) { animation-delay: 0.3s; }
.section:nth-of-type(3) { animation-delay: 0.6s; }
.section:nth-of-type(4) { animation-delay: 0.9s; }

/* ========== SKILLS ========== */
.skills-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  max-width: 700px;
  margin: 0 auto 3rem;
}
.skill-badge {
  padding: 0.5rem 1.3rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 5px 15px rgba(207, 161, 125, 0.6);
  user-select: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
  background-color: #f1d9b7;
  color: #5a4d41;
}
.skill-badge:hover {
  transform: scale(1.15);
  box-shadow: 0 10px 30px rgba(207, 161, 125, 0.9);
}

/* ========== PROJECTS ========== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 2.2rem;
  margin-bottom: 3rem;
}
.project-card {
  background: #f9f4f0;
  border-radius: 1rem;
  padding: 1.7rem 2rem;
  box-shadow: 0 8px 30px rgba(167, 137, 103, 0.3);
  color: #5a4d41;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  animation: fadeSlideUp 0.8s forwards ease-out, float 6s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
.project-card:nth-child(1) { animation-delay: 0.2s; }
.project-card:nth-child(2) { animation-delay: 0.4s; }
.project-card:nth-child(3) { animation-delay: 0.6s; }
.project-card:nth-child(4) { animation-delay: 0.8s; }
.project-card:hover {
  transform: scale(1.05);
  box-shadow: 0 18px 50px rgba(207, 161, 125, 0.6);
  animation-play-state: paused;
}
.project-card a.btn-link {
  background: transparent;
  box-shadow: none;
  color: #1e40af;
  text-decoration: underline;
  padding: 0;
  font-weight: 600;
  transition: color 0.3s ease;
}
.project-card a.btn-link:hover,
.project-card a.btn-link:focus {
  color: #2563eb;
  text-decoration: none;
  transform: scale(1.1);
  box-shadow: none;
}

/* ========== BUTTONS ========== */
.btn-link {
  display: inline-block;
  background: #f9f5f1;
  color: #1e40af;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.55rem 1.4rem;
  border-radius: 9999px;
  box-shadow: 0 3px 8px rgba(59, 130, 246, 0.3);
  text-decoration: none;
  transition: all 0.3s ease;
  user-select: none;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  border: 2px solid transparent;
}
.btn-link:hover,
.btn-link:focus {
  background: #e0e7ff;
  color: #1d4ed8;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.6);
  transform: scale(1.05);
  outline: none;
  border-color: #1d4ed8;
}
.btn-resume {
  background: linear-gradient(135deg, #f1c9b7, #cfa17d);
  color: #5a4d41;
  font-weight: 700;
  font-size: 1.15rem;
  padding: 0.85rem 3.2rem;
  border-radius: 9999px;
  box-shadow: 0 8px 30px rgba(207, 161, 125, 0.5);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  margin: 0 auto;
  transition: all 0.4s ease;
  animation: pulseBtn 3s infinite alternate ease-in-out;
  user-select: none;
  position: relative;
  z-index: 1;
}
.btn-resume:hover {
  background: linear-gradient(135deg, #7a99a1, #667c8a);
  box-shadow: 0 14px 45px rgba(122, 153, 161, 0.8);
  transform: scale(1.1);
  color: #f9f5f1;
  animation-play-state: paused;
}
@keyframes pulseBtn {
  0% { box-shadow: 0 8px 30px rgba(207, 161, 125, 0.5); }
  100% { box-shadow: 0 14px 45px rgba(207, 161, 125, 0.9); }
}

/* ========== CONTACT FORM ========== */
.contact-section form {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  text-align: left;
}
.contact-section label {
  font-weight: 600;
  color: #5a4d41;
}
.contact-section input,
.contact-section textarea {
  padding: 0.8rem 1.1rem;
  border: 2px solid #cfa17d;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: inset 0 2px 6px rgba(207, 161, 125, 0.15);
}
.contact-section input:focus,
.contact-section textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 8px #2563ebaa;
  background-color: #fff;
}
.contact-section button.btn-resume {
  max-width: 220px;
  margin: 1.3rem auto 0;
  background: #1e40af;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.9rem 2.8rem;
  border-radius: 9999px;
  box-shadow: 0 8px 25px rgba(30, 64, 175, 0.8);
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  border: none;
}
.contact-section button.btn-resume:hover {
  background: #2563eb;
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.9);
  transform: scale(1.05);
}

/* ========== FOOTER ========== */
footer {
  margin-top: 4rem;
  text-align: center;
  color: #8b7d6b;
  position: relative;
  z-index: 1;
}
footer ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}
footer a {
  color: #cfa17d;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #f1c9b7, #cfa17d);
  box-shadow: 0 6px 18px rgba(207, 161, 125, 0.5);
  user-select: none;
  animation: pulseFooter 4s ease-in-out infinite alternate;
}
footer a:hover {
  color: #f9f5f1;
  background: linear-gradient(135deg, #7a99a1, #667c8a);
  box-shadow: 0 12px 36px rgba(122, 153, 161, 0.8);
}
@keyframes pulseFooter {
  0% { box-shadow: 0 6px 18px rgba(207, 161, 125, 0.5); }
  100% { box-shadow: 0 10px 26px rgba(207, 161, 125, 0.75); }
}

/* ========== ACCESSIBILITY ========== */
*:focus-visible {
  outline: 3px dashed #7a99a1;
  outline-offset: 5px;
}
a:focus {
  outline: 2px solid #7a99a1;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  main, .section {
    padding: 2rem 1.5rem 2.5rem;
  }
  h1 { font-size: 2.3rem; }
  h2 { font-size: 1.5rem; }
  .profile-img {
    width: 130px;
    height: 130px;
    margin-bottom: 1.2rem;
  }
  .btn-resume {
    font-size: 1rem;
    padding: 0.75rem 2rem;
  }
  .skills-container { gap: 10px; }
  .projects-grid { gap: 1.5rem; }
  footer a {
    font-size: 0.9rem;
    padding: 0.3rem 0.7rem;
  }
}
@media (max-width: 520px) {
  .contact-section form { max-width: 100%; }
}

/* ========== CERTIFICATIONS SECTION ========== */
.certifications {
  margin-top: 4rem;
  padding: 2.5rem 2rem;
  background: #fffdfb;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  text-align: left;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  transform: translateY(40px);
  animation: sectionFadeUp 0.8s ease-out forwards;
  animation-delay: 1.1s;
}

.certifications h2 {
  color: #5a4d41;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5rem;
}

.cert-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cert-item {
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-left: 5px solid #c4a484;
  background: #fffaf6;
  border-radius: 12px;
  transition: transform 0.3s ease, background 0.3s ease;
  cursor: default;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s forwards;
}

.cert-item:hover {
  transform: translateY(-5px);
  background: #f9f5ef;
}

.cert-item:nth-child(1) { animation-delay: 1.2s; }
.cert-item:nth-child(2) { animation-delay: 1.35s; }
.cert-item:nth-child(3) { animation-delay: 1.5s; }
.cert-item:nth-child(4) { animation-delay: 1.65s; }
.cert-item:nth-child(5) { animation-delay: 1.8s; }
.cert-item:nth-child(6) { animation-delay: 1.95s; }

.cert-link {
  font-weight: 600;
  font-size: 1.1rem;
  color: #5a4d41;
  text-decoration: none;
  user-select: text;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.cert-badge {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(207, 161, 125, 0.3);
  flex-shrink: 0;
}

.cert-link:hover {
  color: #a97450;
  text-decoration: underline;
}


.cert-desc {
  margin-top: 0.4rem;
  color: #6f5f4d;
  font-size: 0.95rem;
  line-height: 1.4;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
