/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: #f9f9f9;
  color: #333;
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2.5rem;
  background-color: #0a192f;
  color: white;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #a259ff;
  cursor: default;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  transition: transform 0.3s ease-in-out;
}

.nav-links li {
  position: relative;
}

.nav-link {
  color: #ccd6f6;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: #a259ff;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  color: #a259ff;
}

/* Mobile */
.nav-toggle {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  color: #a259ff;
}

.nav-close {
  display: none;
  font-size: 2rem;
  color: #a259ff;
  padding-left: 1rem;
}

/* Scroll effect */
.navbar.scrolled {
  padding: 0.7rem 2.5rem;
  background-color: rgba(10, 25, 47, 0.8);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}

/* Mobile Menu */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    background-color: #0a192f;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.4s ease;
  }

  .nav-links.show {
    right: 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-close {
    display: block;
    position: absolute;
    top: 20px;
    right: 20px;
  }
}

/* Hero Styling */
.hero {
  text-align: center;
  padding-top: 30px;  /* Adjusted for higher position */
  padding-bottom: 80px;
  background-color: #0a192f;
  color: #ccd6f6;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  box-sizing: border-box;
}

.cube-scene {
  width: 250px;
  height: 250px;
  perspective: 800px;
  margin: auto;
}

.cube {
  width: 200px;
  height: 200px;
  transform-style: preserve-3d;
  transform: rotateX(20deg) rotateY(20deg);
  animation: rotateCube 6s infinite linear;
  transition: transform 0.3s ease-out;
}

/* Optional: Different colored faces */
.cube div {
  position: absolute;
  width: 200px;
  height: 200px;
  background: rgba(162, 89, 255, 0.2);
  border: 1px solid #a259ff;
}

/* Example faces (front, back, etc.) */
.front  { transform: translateZ(100px); }
.back   { transform: rotateY(180deg) translateZ(100px); }
.right  { transform: rotateY(90deg) translateZ(100px); }
.left   { transform: rotateY(-90deg) translateZ(100px); }
.top    { transform: rotateX(90deg) translateZ(100px); }
.bottom { transform: rotateX(-90deg) translateZ(100px); }

@keyframes rotateCube {
  from { transform: rotateX(0deg) rotateY(0deg); }
  to   { transform: rotateX(360deg) rotateY(360deg); }
}



.hero-title {
  font-size: 4rem;
  font-weight: bold;
  margin: 10px 0 5px;
  color: #a259ff;
  font-family: 'Courier New', Courier, monospace; /* monospaced font */
  line-height: 1.2;
  min-height: 4.5rem; /* prevent bouncing */
}

#name-typed {
  display: inline-block;
  min-width: 10ch; /* enough space for longest name like "David Williams" */
}

.subtitle {
  font-size: 1.5rem;
  color: #a8b2d1;
  margin: 0 auto;
  max-width: 90%;
  min-height: 4rem; /* prevents bounce when deleting */
  font-family: 'Courier New', Courier, monospace;
  padding-bottom: 20px;
}


.cursor {
  display: inline-block;
  color: #a259ff;
  font-weight: bold;
  margin-left: 2px;
  animation: blink-caret 0.7s step-end infinite;
}

@keyframes blink-caret {
  50% {
    opacity: 0;
  }
}

/* Import Google Font for a modern look */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* About Section Container - full width and centered */
.about-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 60px 20px;
  background-color: #0f172a;
  color: #e0e7ff;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  overflow-x: hidden;
}

/* Inner wrapper */
.about-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  max-width: 1100px;
  width: 100%;
  gap: 50px;
  border-radius: 12px;
  padding: 50px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  box-shadow: 0 8px 24px rgba(162, 89, 255, 0.3);
  transition: box-shadow 0.3s ease;
}

.about-inner:hover {
  box-shadow: 0 12px 36px rgba(162, 89, 255, 0.5);
}

.about-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* About Text */
.about-text {
  flex: 1;
  line-height: 1.8;
  font-size: 1.125rem;
  color: #cbd5e1;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0;
}

.about-text p {
  margin-bottom: 1.25rem;
}

/* Section Title */
.section-title {
  font-size: 2.75rem;
  font-weight: 700;
  color: #a259ff;
  margin-bottom: 1rem;
  letter-spacing: 1.2px;
}

/* Highlighted text */
.highlight {
  color: #d8b4fe;
  font-weight: 700;
}

/* Motto */
.motto {
  margin-top: 30px;
  font-size: 1.25rem;
  font-style: italic;
  color: #9ca3af;
  text-align: center;
}

/* About Image */
.about-image {
  flex: 1;
  max-width: 350px;
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 6px 20px rgba(162, 89, 255, 0.5);
  height: auto;
  transition: transform 0.3s ease;
}

.about-image:hover {
  transform: scale(1.05);
}

/* Mobile: Stack Image on Top */
@media (max-width: 767px) {
  .about-inner {
    flex-direction: column;
    padding: 30px 20px;
    gap: 30px;
  }

  .about-text {
    padding: 0;
    font-size: 1rem;
    text-align: left;
  }

  .section-title {
    font-size: 2rem;
    text-align: center;
  }

  .motto {
    font-size: 1.1rem;
    text-align: center;
  }

  .about-image {
    max-width: 100%;
    width: 100%;
  }
}

.section-title {
  font-size: 2.5rem;
  color: #ffffff;
  margin-bottom: 30px;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background-color: #a259ff; /* purple accent */
  margin: 10px auto 0;
}

.highlight {
  color: #a259ff;
  font-weight: bold;
}

.motto {
  text-align: center;
  margin-top: 30px;
  font-size: 1.2rem;
  color: #a259ff;
  font-style: italic;
}

/* Section General Styling */
section {
  padding: 5rem 2rem;
  background-color: #0a192f; /* dark purple-blue background */
  color: #d6ccf2; /* light purple text */
  text-align: center;
}

.section-title {
  font-size: 2.5rem;
  color: #b992ff; /* bright lavender */
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #a497c9; /* muted lavender */
  margin-bottom: 2.5rem;
}

/* Skills List Styling */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  padding: 0;
  list-style: none;
}

/* Single skill */
.skill {
  background: #2f2a4c; /* deeper purple background */
  border: 1px solid #b992ff; /* lavender border */
  padding: 1rem 1.5rem;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  color: #b992ff; /* lavender text */
  min-width: 180px;
  max-width: 260px;
  position: relative;
  text-align: left;
  cursor: default;
  box-shadow: 0 0 0 transparent;
  transition: all 0.3s ease;
  margin-bottom: 1rem
}

/* Skill hover effect */
.skill:hover {
  background-color: #3c3570; /* lighter purple hover */
  transform: scale(1.05);
  box-shadow: 0 0 12px #b992ffaa;
}

/* Skill icon */
.skill-icon {
  margin-right: 10px;
  font-size: 1.5rem;
  vertical-align: middle;
}

/* Progress bar container */
.progress-bar {
  background-color: #3c3570; /* progress bar background */
  border-radius: 20px;
  height: 10px;
  margin-top: 10px;
  overflow: hidden;
}

/* Progress bar fill */
.progress {
  height: 10px;
  background: linear-gradient(90deg, #b992ff, #8b66e8);
  border-radius: 20px;
  width: 0;
  animation: fillProgress 2s forwards;
}

/* Animation for progress fill */
@keyframes fillProgress {
  to {
    width: var(--width);
  }
}

/* Responsive */
@media (max-width: 600px) {
  .skills-list {
    justify-content: center;
  }
  .skill {
    min-width: 140px;
    max-width: 180px;
  }
}

/* Fade-in animation */
.skills-list, .skill {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.skills-list.visible, .skill.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Section headings inside skills */
.skills-category {
  margin-bottom: 2.5rem;
  text-align: center;
}

.skills-category h3 {
  color: #b992ff;
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border-bottom: 2px solid #b992ff;
  padding-bottom: 0.3rem;
  display: inline-block;
}

/* Certifications list to stack vertically */
.skills-list.certifications {
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

/* Responsive */
@media (max-width: 600px) {
  .skills-list {
    justify-content: center;
  }
  .skill {
    min-width: 140px;
    max-width: 180px;
  }
  .skills-category h3 {
    font-size: 1.4rem;
  }
}

/* Certifications Section */
#certifications {
  text-align: center;
  color: #b992ff;
}

.certifications-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.certification {
  background: #2f2a4c; /* same deep purple */
  border: 1px solid #b992ff;
  padding: 0.8rem 1.2rem;
  border-radius: 25px;
  font-weight: 600;
  margin-bottom: 0.8rem;
  font-size: 1rem;
  transition: background-color 0.3s ease, transform 0.3s ease;
  cursor: default;
}

.certification:hover {
  background-color: #3c3570;
  transform: scale(1.05);
}

/* Projects */
#projects {
  padding: 4rem 2rem;
  background: #0f172a; /* Dark purple background */
  color: #d1c4e9; /* Light purple text */
}
.section-title {
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
  font-weight: 700;
}
.section-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: #b39ddb;
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(300px,1fr));
  gap: 2rem;
}
.project-card {
  background: #311b92; /* Deep purple */
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.project-title {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: #ede7f6;
}
.project-description {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #d1c4e9;
  flex-grow: 1;
}
.see-more-btn {
  background: #7e57c2;
  border: none;
  padding: 0.5rem 1rem;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: 600;
}
.see-more-btn:hover {
  background: #9575cd;
}
.project-links {
  margin-top: 1rem;
  font-size: 0.95rem;
  display: none;
  color: #b39ddb;
}
.project-links a {
  color: #ce93d8;
  text-decoration: none;
}
.project-links a:hover {
  text-decoration: underline;
}

/* Contact Section */
/* Contact Section */
.contact-section {
  background: #0a192f;
  padding: 5rem 2rem;
  text-align: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.contact-section h2 {
  font-size: 2.5rem;
  color: #a8b2d1;
  margin-bottom: 0.5rem;
}

.contact-description {
  color: #8892b0;
  margin-bottom: 2rem;
  font-size: 1.1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Form Layout */
form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Inputs and Textarea */
form input,
form textarea {
  padding: 0.9rem 1rem;
  border-radius: 8px;
  border: 1px solid #1f2937;
  font-size: 1rem;
  font-family: inherit;
  background-color: #112240;
  color: #e2e8f0;
  transition: all 0.3s ease;
}

form input:focus,
form textarea:focus {
  border-color: #a259ff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(162, 89, 255, 0.2);
}

/* Submit Button */
form button {
  background: #a259ff;
  color: white;
  padding: 0.9rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

form button:hover {
  background: #8b45e3;
}

/* Message Box */
.message-box {
  height: 2rem;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.95rem;
  text-align: center;
  display: block;
  color: white;
  background: transparent;
  transition: all 0.3s ease;
}

.success {
  background-color: #1e3a2b;
  color: #4aff91;
}

.error {
  background-color: #3a1e1e;
  color: #ff4a4a;
}

/* Responsive */
@media (max-width: 600px) {
  .contact-section h2 {
    font-size: 2rem;
  }

  .contact-description {
    font-size: 1rem;
  }

  form {
    padding: 0 1rem;
  }
}


/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    background: #0a192f;
    position: absolute;
    top: 60px;
    right: 0;
    width: 100%;
    display: none;
    padding: 2rem;
  }
  .nav-links.show {
    display: flex;
  }
  .nav-close {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    cursor: pointer;
  }
  .nav-toggle {
    display: block;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1.2rem;
    max-width: 100%;
  }
}
