/* === Reset & Base Styles === */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 20px;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  color: #fff;

  /* Background image with a dark overlay for readability */
  background:
    linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
    url('images/Nkosingiphile_picture.jpg') no-repeat center center fixed;
  background-size: cover;
  scroll-behavior: smooth; /* smooth scrolling */
}

/* === Header Styling === */
header {
  text-align: center;
  margin-bottom: 40px;
}

h1 {
  font-size: 48px;
  font-weight: 600;
  color: #159957;
  text-shadow: 1.5px 1.5px 3px rgba(0,0,0,0.5);
  margin: 0;
}

/* Animated Hero Text */
h2 {
  font-size: 28px;
  font-weight: 300;
  color: #a8d5ba;
  margin-top: 5px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);

  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 1.1s ease-out forwards 0.3s;
}

/* Keyframes for h2 fadeUp */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Main content styling === */
main {
  max-width: 900px;
  margin: 0 auto;
}

/* === Summary Styling === */
.summary {
  background: rgba(21, 89, 151, 0.7);
  border-radius: 10px;
  padding: 25px 30px;
  margin-bottom: 40px;
  font-size: 18px;
  font-family: 'Times New Roman', serif;
  color: #ffd966;
  text-align: justify;
  box-shadow: 0 4px 15px rgba(21, 89, 151, 0.3);
}

/* === Skills & Interests Table === */
.skills-interests table {
  border-collapse: collapse;
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-weight: 600;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin-bottom: 50px;
  font-size: 16px;
}

.skills-interests th,
.skills-interests td {
  padding: 12px 18px;
  text-align: left;
  border-bottom: 1px solid #ccc;
  width: 33.33%;
}

.skills-interests th {
  background-color: #159957;
  color: #fff;
}

.skills-interests tr:nth-child(even) {
  background-color: #f6f8f9;
}

.skills-interests tr:hover {
  background-color: #d2ebd7;
}

/* === Education, Work Experience, Achievements, Projects Sections === */
#education, #work-experience, #achievements, #projects {
  background: rgba(255, 255, 255, 0.85);
  color: #333;
  border-radius: 10px;
  padding: 30px 30px;
  margin-bottom: 40px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
  font-size: 16px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

#education h3, #work-experience h3, #achievements h3, #projects h3 {
  color: #159957;
  font-weight: 600;
  font-size: 28px;
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
}

#education h4, #work-experience h4 {
  color: #115d3a;
  margin-bottom: 10px;
  font-weight: 600;
}

#education p, #work-experience p {
  margin-top: 5px;
  font-size: 16px;
  line-height: 1.5;
}

/* Background image overlay for work experience */
#work-experience {
  position: relative;
  background-image: url('images/download.jpeg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  color: white;
  min-height: 250px;
}

#work-experience::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 0;
  border-radius: 10px;
}

#work-experience * {
  position: relative;
  z-index: 1;
}

/* Work experience task lists */
.work-tasks {
  padding-left: 22px;
  margin-top: 8px;
  color: #e7ffe7;
  font-size: 15px;
  line-height: 1.6;
  list-style-type: disc;
}

#work-experience .work-tasks li {
  margin-bottom: 6px;
}

/* Nested list styles for achievements and projects */
#achievements ul {
  list-style-type: disc;
  padding-left: 20px;
  line-height: 1.6;
  color: #555;
}

#achievements ul ul {
  list-style-type: circle;
  padding-left: 20px;
  margin-top: 5px;
  margin-bottom: 15px;
}

#projects ul {
  list-style-type: disc;
  padding-left: 20px;
  line-height: 1.7;
  color: #555;
}

#projects li {
  margin-bottom: 18px;
}

#projects a {
  color: #159957;
  text-decoration: underline;
  font-weight: 500;
}

#projects a:hover {
  color: #115d3a;
}

/* === Footer styling === */
footer {
  text-align: center;
  padding: 15px 0;
  font-size: 0.93rem;
  color: #a8d5ba;
  border-top: 1px solid rgba(255,255,255,0.3);
  margin-top: 60px;
}

/* === Floating Contact/Social Sidebar (bottom-right) === */
#contact-social-fab {
  position: fixed;
  bottom: 20px;
  right: 18px;
  width: 310px;
  background: rgba(255,255,255,0.96);
  color: #222;
  border-radius: 12px;
  box-shadow: 0 2px 18px rgba(21,89,151,0.15), 0 2px 8px rgba(0,0,0,0.14);
  z-index: 1000;
  padding: 18px 18px 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 11px;
}

/* Contact message text styling */
.contact-message p {
  font-size: 15px;
  margin-bottom: 7px;
  color: #159957;
  line-height: 1.5;
}

.contact-message a {
  color: #115d3a;
  text-decoration: underline;
  font-weight: 500;
}

/* Contact form inputs styling */
#floating-contact-form input[type="text"],
#floating-contact-form input[type="email"],
#floating-contact-form textarea {
  width: 100%;
  margin-bottom: 8px;
  padding: 7px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
}

#floating-contact-form textarea {
  resize: vertical;
  min-height: 40px;
}

/* Contact form Submit Button with pulse animation */
#floating-contact-form input[type="submit"] {
  width: 100%;
  background-color: #159957;
  color: #fff;
  border: none;
  padding: 9px 0;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;

  animation: pulse 1.6s infinite;
  transition: background-color 0.3s ease;
}

#floating-contact-form input[type="submit"]:hover {
  background: #115d3a;
}

/* Pulse animation keyframes */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 #15995744;
  }
  70% {
    box-shadow: 0 0 0 6px #15995711;
  }
  100% {
    box-shadow: 0 0 0 0 #15995744;
  }
}

/* Social icons container */
.contact-social-icons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 7px;
}

/* Social icon styling and hover effect */
.contact-social-icons img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.12));
  transition: transform 0.18s ease;
}

.contact-social-icons img:hover {
  transform: scale(1.12);
}

/* === Profile Photos Containers & Photos === */

/* Containers fixed at top-left and top-right */
.top-right-photos,
.top-left-photos {
  position: fixed;
  top: 18px;
  display: flex;
  gap: 14px;
  z-index: 10000;

  /* Initially hidden for scroll fade-in effect */
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

/* Positions */
.top-right-photos {
  right: 18px;
}
.top-left-photos {
  left: 18px;
}

/* Profile pictures styling */
.corner-profile-pic {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #159957;
  box-shadow: 0 2px 12px rgba(21,89,151,0.18);
  background: #fff;

  transition: box-shadow 0.32s ease;
}

/* Glow on hover */
.corner-profile-pic:hover {
  box-shadow: 0 0 24px 5px #15995788, 0 2px 12px rgba(21, 89, 151, 0.3);
}

/* Responsive adjustments for smaller screens */
@media (max-width: 600px) {
  .corner-profile-pic {
    width: 70px;
    height: 70px;
  }
  .top-right-photos {
    top: 8px;
    right: 8px;
    gap: 8px;
  }
  .top-left-photos {
    top: 8px;
    left: 8px;
    gap: 8px;
  }
}

/* Responsive general resizing */
@media (max-width: 700px) {
  body {
    padding: 15px 10px;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 22px;
  }

  .summary {
    font-size: 16px;
    padding: 20px;
  }

  .skills-interests table {
    font-size: 14px;
  }

  #education, #work-experience, #achievements, #projects {
    padding: 20px 20px;
  }
}

/* Responsive contact widget on very small screens */
@media (max-width: 450px) {
  #contact-social-fab {
    width: 95vw;
    right: 2vw;
    padding: 10px 4px 12px 4px;
  }
}

/* === Hackathon badge fixed bottom-left === */
.hackathon-badge {
  position: fixed;
  left: 12px;
  bottom: 24px;
  background: #159957;
  color: #fff;
  font-weight: bold;
  padding: 7px 14px;
  border-radius: 0 10px 10px 0;
  box-shadow: 0 2px 8px #2222;
  font-size: 15px;
  z-index: 1200;
  pointer-events: none;
  letter-spacing: 0.5px;
}
