/* UNIVERSAL SELECTOR */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*::before,
*::after {
  box-sizing: border-box;
}

/* ELEMENT SELECTORS */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #334155;
  background-color: #f8fafc;
}

html {
  scroll-behavior: smooth;
}

h1, h2, h3 {
  color: #1e3a8a;
  font-weight: 700;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  text-align: justify;
}

a {
  text-decoration: none;
  color: #3b82f6;
  transition: color 0.3s ease;
}

a:hover {
  color: #1e3a8a;
}

ul {
  list-style: none;
}

/*  ID SELECTORS  */
#header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.85), rgba(59, 130, 246, 0.75)), 
              url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?ixlib=rb-1.2.1&auto=format&fit=crop&w=1352&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: white;
}

#header .profile-container {
  display: flex;
  flex-direction: column;
  text-align: left;
}

#header h1 {
  color:#e2e8f0
}
#header p {
  color:#e2e8f0
}

#header img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid #f0f0f0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  margin-left: 20px;
}

.section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.tagline {
  font-size: 1.2rem;
  opacity: 0.9;
  font-weight: 300;
}

/* NAVBAR */
.navbar {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(10px);
  padding: 1.5rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar.scrolled {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

.navbar a {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  margin: 0 0.5rem;
  background-color: #f1f5f9;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.navbar a:hover {
  background-color: #3b82f6;
  color: white;
  transform: translateY(-2px);
}

.navbar a.active {
  background-color: #1e3a8a;
  color: #ffffff;
  transform: translateY(-2px);
}

/* ABOUT SECTION */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

.carousel-track {
  display: flex;
  transition: transform 0.6s ease-in-out;
  will-change: transform;
}

.carousel img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

/* SKILLS SECTION */
.skill-item {
  background: linear-gradient(135deg, #3b82f6, #1e3a8a);
  color: white;
  padding: 1rem 1.5rem;
  margin: 0.5rem;
  border-radius: 25px;
  display: inline-block;
  font-weight: 500;
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
  transition: transform 0.3s ease;
  position: relative;
}

.skill-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(59, 130, 246, 0.5);
}

.skill-item::after {
  content: attr(data-desc);
  position: absolute;
  left: 50%;
  top: -10px;
  transform: translate(-50%, -110%);
  background: #111827;
  color: #f9fafb;
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.skill-item:hover::after {
  opacity: 1;
  transform: translate(-50%, -120%);
}

/* PROJECT CARD */
.project-card {
  background: white;
  padding: 2rem;
  margin: 1.5rem 0;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-left: 5px solid #3b82f6;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.carousel-wrapper {
  flex-shrink: 0;
  width: 350px;
}

/* carousel portfolio */
.carousel-wrapper .carousel {
  margin-bottom: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto; 
}

.carousel-wrapper .carousel img {
  height: 100%;
  object-fit: cover;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 1.5rem;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  z-index: 10;
  border-radius: 50%;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  opacity: 0; 
}

.carousel:hover .carousel-btn {
  opacity: 1; 
}

.carousel-btn:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

.project-info {
  flex: 1;
}

/* CONTACT SECTION */
#contact {
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.contact-info p {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.contact-info a {
  color: #3b82f6;
  font-weight: 500;
}

/* FORM ELEMENTS */
input, 
textarea, 
button {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

input:focus, 
textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

button {
  background: linear-gradient(135deg, #3b82f6, #1e3a8a);
  color: white;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

/* FOOTER */
#footer {
  background-color: #1e3a8a;
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}

/* REVEAL ANIMATION */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
  .navbar a {
      display: block;
      margin: 0.5rem 1rem;
  }

  h1 {
      font-size: 2rem;
  }

  h2 {
      font-size: 1.5rem;
  }

  .section {
      padding: 2rem 1rem;
  }

  .skill-item {
      display: block;
      text-align: center;
      max-width: 250px;
      margin: 0.5rem auto;
  }

  .carousel img {
      height: 180px;
  }
  
  .project-card {
    flex-direction: column;
    text-align: center;
  }

  .carousel-wrapper {
    width: 100%;
  }
}

@media (max-width: 480px) {
  #header {
      padding: 2rem 1rem;
  }

  .project-card {
      padding: 1.5rem;
  }
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1e3a8a);
  color: #ffffff;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.2s ease;
  z-index: 200;
}

.back-to-top:hover {
  transform: translateY(-3px);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.stat-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(0,0,0,0.12);
}

.stat-value {
  font-size: 2rem;
  color: #1e3a8a;
  font-weight: 800;
}

.stat-label {
  color: #475569;
  margin-top: 0.25rem;
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.8rem;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #3b82f6, #1e3a8a);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 0.75rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.1rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.timeline-title {
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 0.25rem;
}

.timeline-desc {
  color: #475569;
}

.skill-group {
  margin-bottom: 1rem;
}

.progress {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #1e3a8a);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.tool-card {
  background: white;
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  font-weight: 600;
  color: #1e3a8a;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.cert-list li {
  background: #ffffff;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
  margin-bottom: 0.5rem;
}

.process {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.process-card {
  background: white;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  text-align: center;
  font-weight: 600;
  color: #1e3a8a;
}

.testimonials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.testimonial {
  background: white;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  color: #334155;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-card {
  background: white;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  text-align: center;
}

.faq .faq-item {
  background: white;
  border-radius: 16px;
  padding: 1rem 1.25rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  margin-bottom: 0.75rem;
}

.faq-question {
  font-weight: 700;
  color: #1e3a8a;
  cursor: pointer;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.25s ease;
}

.faq-item.open .faq-answer {
  max-height: 400px;
  opacity: 1;
}

.cta {
  text-align: center;
}

.cta .btn {
  display: inline-block;
  padding: 0.9rem 1.25rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #1e3a8a);
  color: #ffffff;
  font-weight: 700;
}

@media (max-width: 768px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .process, .testimonials, .contact-cards {
    grid-template-columns: 1fr;
  }
}

