:root {
  --bg-color: #080808;
  --card-bg: #121212;
  --accent-color: #ff3131;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --nav-bg: rgba(10, 10, 10, 0.95);
  --glass-border: rgba(255, 255, 255, 0.08);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  scroll-behavior: smooth;
}

body {
  background: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===================== Navbar ===================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 15px 5%;
  /* Reduced side padding to give logo more room on left */
  z-index: 2000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid var(--glass-border);
  height: 80px;
  transition: var(--transition);
}


.navbar .logo {
  color: var(--accent-color);
  font-size: 18px;
  /* Decreased size as requested */
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
  /* Ensures logo stays on one line */
  flex-shrink: 0;
}



.navbar ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.navbar ul li a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 15px;
  transition: var(--transition);
}

.navbar ul li a:hover {
  color: var(--accent-color);
}


/* Hamburger Menu */
.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  transition: var(--transition);
  background-color: var(--text-primary);
  border-radius: 2px;
}

section {
  scroll-margin-top: 80px;
  padding: 100px 10%;
}






/* ===================== Hero Section ===================== */
.contact-row-flex {
  display: block;
}

.contact-row-flex p {
  margin-bottom: 20px;
}

.contact-column-flex {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 140px 10% 80px;
  min-height: 100vh;
  gap: 60px;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: clamp(32px, 5vw, 52px);
  color: var(--text-primary);
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  /* Ensures "Hi, I'm Faisal Khan" stays on one line */
}

.hero-text h1 span {
  color: var(--accent-color);
  display: inline-block;
  animation: logoPulse 2s infinite ease-in-out;
}

@keyframes logoPulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 0px rgba(255, 49, 49, 0));
  }

  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(255, 49, 49, 0.6));
  }

  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0px rgba(255, 49, 49, 0));
  }
}

.hero-text h4 {
  font-size: clamp(14px, 2.2vw, 18px);
  /* Responsive font size */
  margin-bottom: 30px;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.5px;
}

.student-titles {
  display: block;
}



.founder-title {
  color: var(--text-secondary);
  /* Keep it same professional color */
}




.social-links {
  margin-top: 35px;
  display: flex;
  gap: 15px;
  flex-wrap: nowrap;
}

.social-links a {
  font-size: 18px;
  color: var(--text-secondary);
  transition: var(--transition);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.social-links a:hover {
  color: var(--accent-color);
  transform: translateY(-5px);
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.hero-image img {
  width: clamp(280px, 30vw, 400px);
  height: clamp(280px, 30vw, 400px);
  border-radius: 50%;
  border: 5px solid var(--accent-color);
  box-shadow: 0 0 40px rgba(255, 49, 49, 0.2);
  object-fit: cover;
  object-position: center 10%;
  /* Focus more on the top of the image to show face better */
  transition: var(--transition);
}

.hero-image img:hover {
  transform: scale(1.02);
  box-shadow: 0 0 60px rgba(255, 49, 49, 0.35);
}






.hero-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 40px;
}

.btn,
.hire {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;

  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn {
  background: var(--accent-color);
  color: #fff;
}

.btn:hover {
  background: #c1121f;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 49, 49, 0.3);
}

.hire {
  background: transparent;
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
}

.hire:hover {
  background: var(--accent-color);
  color: #fff;
}







/* ===================== About Section ===================== */
.about {
  padding: 80px 10%;
  text-align: center;
}

.about h2 {
  margin-bottom: 40px;
  color: #ffffff !important;
  text-transform: uppercase;
}





.about-card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 20px;
  line-height: 1.8;
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 1000px;
  margin: 0 auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
  text-align: left;
}

.about-card p a {
  white-space: nowrap;
}


.about-titles {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
  margin-top: 15px;
}


/* Force contact links to stay on one line */
.about-card p a {
  white-space: nowrap;
}


.about-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-color);
}

.about-card h1 {
  font-size: 32px;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.about-card h3 {
  color: var(--accent-color);
  font-weight: 500;
  margin-bottom: 25px;
}

.about-card h2 {
  font-size: 24px;
  margin: 30px 0 15px;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
}



.about-card h2::after {
  margin: 10px 0 0;
}

.about-card p {
  margin-bottom: 15px;
}

.about-card ul li strong {
  color: var(--text-primary);
}

.about-card a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
}






/* ===================== Generic Sections ===================== */
ul {
  list-style: disc;
  padding-left: 20px;
  color: var(--text-secondary);
}




/* ===================== Education Section ===================== */
.education {
  padding: 100px 10%;
  text-align: center;
}

/* Education Cards */
.edu-card {
  background: var(--card-bg);
  margin: 20px auto;
  max-width: 800px;
  padding: 30px;
  text-align: left;
  border-radius: 12px;
  border-left: 4px solid var(--accent-color);
  position: relative;
  transition: 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass-border);
}

.edu-card::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 25px;
  width: 16px;
  height: 16px;
  background: var(--accent-color);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-color);
}

.edu-card h3 {
  font-size: 1.15rem;
  /* Reduced from 1.3rem to prevent overflow */
  font-weight: 800;
  /* Ensuring it's very bold */
  color: #ffffff;
  /* Explicit white as requested */
  white-space: nowrap;
  margin-bottom: 8px;
}


.edu-card h3 span {
  font-weight: 400;
  font-size: 0.8rem;
  /* Reduced from 0.95rem for a cleaner look */
  color: var(--accent-color);
  margin-left: 10px;
}


.edu-card p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* Hover effect: moves the card up and highlights border */
.edu-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-color);
  box-shadow: 0 15px 40px rgba(255, 49, 49, 0.1);
}


/* Certificate Circle Hover Effect (optional) */
.cert-circle:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}




/* ===================== Experience Section ===================== */
#experience {
  padding: 60px 10%;
}

/* ===================== Experience & Projects ===================== */
.project-card {
  background: var(--card-bg);
  padding: 35px;
  margin-bottom: 40px;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  transition: var(--transition);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.project-card:hover {
  transform: translateY(-12px);
  border-color: var(--accent-color);
  box-shadow: 0 25px 50px rgba(255, 49, 49, 0.1);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 20px;
}

.project-header h3 {
  font-size: 22px;
  color: var(--accent-color);
  font-weight: 700;
  line-height: 1.3;
}

.exp-date {
  background: rgba(255, 49, 49, 0.15);
  color: var(--accent-color);
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--accent-color);
  white-space: nowrap;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 20px;
}

.project-card ul li {
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-size: 15px;
}

.projects h2 {
  text-align: center;
}

.project-card {
  background: var(--card-bg);
  padding: 30px;
  margin: 25px 0;
  border-radius: 15px;
  border: 1px solid var(--glass-border);
  transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-color);
  box-shadow: 0 20px 40px rgba(255, 49, 49, 0.1);
}


.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.project-card h3 {
  font-size: 22px;
  color: var(--accent-color);
  margin-bottom: 15px;
  font-weight: 700;
}

.hero-text h4 {
  font-size: 18px;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 30px;
}

.title-line {
  display: block;
}






.project-card p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.project-card .btn {
  padding: 8px 20px;
  font-size: 14px;
  background: var(--accent-color);
  color: #fff;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

.project-card .btn:hover {
  background: #fff;
  color: var(--accent-color);
}








/* ===================== Skills Section ===================== */

.skills h2,
.skills-card h2 {
  text-align: center;
}

.skills h2 {
  text-align: center;
  color: #ffffff !important;
  text-transform: uppercase;
}



.skills-card {
  padding: 60px 40px;
  max-width: 1200px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--glass-border);
  text-align: center;
}

.section-divider {
  display: none;
}

/* ===================== Skills Grid ===================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.skill-card {
  background: var(--card-bg);
  padding: 35px;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  transition: var(--transition);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.skill-card:hover {
  transform: scale(1.03);
  border-color: var(--accent-color);
}

.skill-card h3 {
  color: var(--accent-color);
  font-size: 20px;
  margin-bottom: 25px;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.skill-card ul {
  list-style: none;
  padding: 0;
}

.skill-card ul li {
  color: var(--text-secondary);
  padding: 10px 0;
  border-bottom: 1px solid var(--glass-border);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-card ul li::before {
  content: "•";
  color: var(--accent-color);
  font-weight: 800;
}






/* ===================== Certifications Section ===================== */
.certifications {
  padding: 60px 10%;
  /* Increased from 20px to 10% for better side spacing */
  text-align: center;
}

.certifications h2 {
  text-align: center;
  color: #ffffff !important;
  text-transform: uppercase;
}



/* ===================== Certifications & Services (Restored Structures) ===================== */
/* ===================== Certifications (Restored Card Style) ===================== */
.cert-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  /* Decreased size to fit 4 per row */
  gap: 20px;
  margin-top: 40px;
}


.cert-card {
  background: var(--card-bg);
  padding: 20px;
  /* Reduced padding slightly to fit 4 per row better */
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--glass-border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
  /* Reduced min-height slightly */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}


.cert-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-color);
  box-shadow: 0 0 20px rgba(255, 49, 49, 0.2);
}

.cert-card span {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 15px;
  line-height: 1.4;
}

.cert-card .btn {
  padding: 8px 20px;
  font-size: 13px;
  border-radius: 30px;
  align-self: center;
}

/* Specific overrides for Services Section */
#services .cert-container {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  /* Further decreased to guarantee 4 per row */
  gap: 15px;
  /* Slightly tighter gap */
}

#services .cert-card {
  min-height: 160px;
  /* Reduced height for services */
  padding: 25px;
  justify-content: center;
  /* Center content vertically */
}

#services .cert-card span {
  font-size: 16px;
  /* Optimized font size for compact layout */
  margin-bottom: 0;
}







/* ===================== Contact Section ===================== */
.contact {
  background: var(--bg-color);
  padding: 60px 10%;
  text-align: center;
}


.contact h2 {
  font-size: 32px;
  margin-bottom: 20px;
  color: #ffffff !important;
  letter-spacing: 2px;
  text-transform: uppercase;
}




/* ===================== Contact Section ===================== */
.full-contact {
  display: flex;
  gap: 60px;
  margin-top: 50px;
  align-items: flex-start;
}

.contact-info {
  flex: 1;
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 20px;
}


.contact-info p i {
  color: var(--accent-color);
  font-size: 22px;
  width: 30px;
}

.contact-info a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
}

.contact-info a:hover {
  color: var(--accent-color);
}

.contact-form {
  flex: 1.5;
  background: var(--card-bg);
  padding: 50px;
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  text-align: left;
  /* Explicitly align form contents to the left */
}


.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}


.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  background: rgba(255, 49, 49, 0.05);
  box-shadow: 0 0 20px rgba(255, 49, 49, 0.1);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(255, 49, 49, 0.2);
  outline: none;
}

#submit-message {
  margin-top: 20px;
  font-weight: 500;
  text-align: center;
  min-height: 24px;
}

.success-msg {
  color: #28a745;
}

.error-msg {
  color: #dc3545;
}

/* Keep your existing circle style */
.cert-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  padding: 20px;
  border-radius: 50%;
  text-align: center;
  margin: 10px;
  transition: transform 0.3s;
}

.cert-circle:hover {
  transform: scale(1.05);
}

/* Modal styling */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
  background-color: var(--card-bg);
  color: var(--text-primary);
  margin: 10% auto;
  padding: 40px;
  border-radius: 20px;
  max-width: 500px;
  border: 1px solid var(--accent-color);
  box-shadow: 0 0 50px rgba(255, 49, 49, 0.2);
}

.close-btn {
  color: var(--text-secondary);
}





footer {
  background: #050505;
  padding: 40px;
  text-align: center;
  border-top: 1px solid var(--glass-border);
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}



footer p {
  color: #fff;
  white-space: nowrap;
  /* Ensures text stays in one line */
}





#services {
  background: var(--bg-color);
  padding: 60px 10%;
  text-align: center;
}

#services p {
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 30px;
}


/* ===================== Responsive Media Queries ===================== */


/* ===================== Fluid Responsiveness ===================== */
@media (max-width: 1200px) {

  section,
  .navbar {
    padding-left: 5%;
    padding-right: 5%;
  }
}

@media (max-width: 992px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    gap: 40px;
    padding-top: 160px;
  }

  .hero-image {
    justify-content: center;
  }

  .hero-image img {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    object-fit: cover;
  }

  .full-contact {
    flex-direction: column;
    gap: 50px;
  }

  .contact-info {
    text-align: left;
    margin: 0 auto;
    width: 100%;
    max-width: 500px;
    /* Constrain for better centering appearance */
  }

  .contact-info p {
    justify-content: flex-start;
  }

  .contact-form {
    margin: 0 auto;
    width: 100%;
    max-width: 600px;
    /* Center the form block */
  }


}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    right: -100%;
    top: 80px;
    width: 80%;
    height: calc(100vh - 80px);
    background: var(--nav-bg);
    backdrop-filter: blur(25px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-left: 1px solid var(--glass-border);
  }

  .nav-links.active {
    right: 0;
  }

  /* Hamburger to X Animation */
  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .navbar ul li a {
    font-size: 20px;
    font-weight: 600;
  }

  .hero-text h1 {
    font-size: 40px;
  }

  .about-card,
  .contact-form {
    padding: 30px 20px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-bottom: 40px;
    /* Reduced gap to About section */
  }

  .about {
    padding-top: 40px;
    /* Reduced gap from Hero section */
  }

  .hero-text h1 {
    font-size: 32px;
  }

  .hero-text h4 {
    font-size: 15px;
  }

  .hero-buttons {
    justify-content: center;
    gap: 10px;
    white-space: nowrap;
  }

  .btn,
  .hire {
    padding: 10px 14px;
    font-size: 13px;
    /* Reduced to fit on one line on narrow screens */
  }


  .contact-row-flex {
    flex-direction: row;
    /* Force row on small screens too as requested */
    justify-content: flex-start;
    gap: 15px;
    font-size: 11px;
    /* Very small to fit one line */
  }


  .contact-row-flex span,
  .contact-row-flex p {
    gap: 5px;
  }

  .social-links {

    justify-content: center;
    gap: 20px;
    flex-wrap: nowrap;
    /* Force one line as requested */
  }

  .social-links a {
    font-size: 24px;
    /* Hide text on mobile to keep icons in one line */
    font-size: 0;
  }

  .social-links a i {
    font-size: 36px;
    /* Increased further as requested */
    margin: 0;
  }



  #submit-message {
    text-align: center;
    width: 100%;
    display: block;
  }


  .hero-image img {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    object-fit: cover;
  }

  .about-card h1 {
    font-size: 24px;
  }

  .about-card p a {
    font-size: 14px;
    /* Slightly smaller to fit on one line */
  }

  .project-header {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }

  .project-header h3 {
    flex-basis: 100%;
    margin-bottom: 15px;
  }

  .about-card h3 {
    font-size: 16px;
    /* Smaller to prevent overflow */
  }

  .job-titles {
    white-space: normal;
    /* Allow wrapping on very small screens */
    display: block;
  }

  footer p {
    font-size: 12px;
    /* Smaller font to fit on one line on mobile */
  }

  .edu-card h3 {
    font-size: 12px;
    /* Smaller font to fit long titles + dates on one line */
    white-space: nowrap;
  }

  .edu-card h3 span {
    font-size: 10px;
    /* Reduced further on mobile */
    margin-left: 5px;
  }


  .skill-card h3 {
    font-size: 16px;
    white-space: nowrap;
    letter-spacing: 0px;
  }


  .about-card p a {
    font-size: 13px;
    /* Slightly smaller to fit on one line on narrow screens */
    white-space: nowrap;
  }
}