:root {
  --primary: #4361ee;
  --primary-light: #4895ef;
  --secondary: #3f37c9;
  --dark: #1e1e2c;
  --dark-light: #2d2d44;
  --light: #f8f9fa;
  --gray: #6c757d;
  --success: #4cc9f0;
  --danger: #e63946;
  --warning: #fca311;
  --border-radius: 12px;
  --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  scroll-behavior: smooth;
  font-family: 'Inter', sans-serif;
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
}

body {
  background: linear-gradient(to bottom, #0a192f, #0d1b2a);
  color: var(--light);
  line-height: 1.6;
  overflow-x: hidden;
}

section {
  min-height: 100vh;
  padding: 10rem 9% 2rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Modern Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 9%;
  background: rgba(10, 25, 47, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header.scrolled {
  padding: 1.5rem 9%;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  transition: var(--transition);
}

.navbar {
  display: flex;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 3rem;
}

.nav-links li a {
  color: var(--light);
  font-size: 1.6rem;
  font-weight: 500;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  transition: var(--transition);
  position: relative;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
  transform: translateX(-50%);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
  width: 80%;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  font-size: 2.5rem;
  color: var(--light);
  cursor: pointer;
  z-index: 1001;
}

/* Hero Section - Image on the right */
.home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5rem;
  padding-top: 15rem;
  flex-direction: row; /* explicitly set for clarity */
}

.home-content {
  flex: 1;
  order: 1;
}

.home-content h3 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--primary-light);
}

.home-content h1 {
  font-size: 5.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2rem;
  background: linear-gradient(45deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.my-name{
  color: var(--light);
}

.home-content p {
  font-size: 1.8rem;
  margin-bottom: 3rem;
  color: #ccd6f6;
  max-width: 600px;
}

.container1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5rem;
    padding-top: 15rem; /* move from .home to .container */
    flex-direction: row;
  }

.social-media {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.social-media a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 5rem;
  height: 5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  font-size: 2.2rem;
  color: var(--light);
  transition: var(--transition);
}

.social-media a:hover {
  background: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

.button-container {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 1.5rem 3rem;
  background: var(--primary);
  border-radius: 50px;
  font-size: 1.6rem;
  font-weight: 600;
  color: white;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.btn:hover {
  background: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(67, 97, 238, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.home-img {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  order: 2;
}

.home-content, .home-img {
    max-width: 600px; /* or whatever fits your design */
  }
  

.home-img img {
  width: 100%;
  max-width: 450px;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 10px 30px rgba(67, 97, 238, 0.2));
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0);
  }
}

/* About Section - Text on the right */
.about {
  display: flex;
  align-items: center;
  gap: 8rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 20px;
  padding: 6rem;
  margin: 5rem 0;
}

.about-img {
  flex: 1;
  order: 1;
}

.about-img img {
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  box-shadow: var(--box-shadow);
}

.about-content {
  flex: 1;
  order: 2;
}

.heading {
  font-size: 4.5rem;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.heading::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 50px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.about-content h3 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--primary-light);
}

.about-content p {
  font-size: 1.7rem;
  margin-bottom: 2.5rem;
  line-height: 1.8;
  color: #a8b2d1;
}

.about-quote {
  font-style: italic;
  padding: 2rem;
  border-left: 4px solid var(--primary);
  background: rgba(67, 97, 238, 0.05);
  border-radius: 0 10px 10px 0;
  margin: 3rem 0;
  font-size: 1.6rem;
}

/* Stats Cards */
.about-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  margin: 5rem 0;
}

.about-card {
  background: rgba(255, 255, 255, 0.03);
  padding: 3rem 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.about-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--box-shadow);
  border-color: rgba(67, 97, 238, 0.2);
}

.about-card i {
  font-size: 4rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.about-card h3 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: var(--light);
}

.about-card .card-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary-light);
}

.about-card .card-subtitle {
  font-size: 1.4rem;
  color: #8892b0;
}

/* Portfolio Showcase */
.portfolio-showcase {
  padding: 10rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 6rem;
}

.section-header .heading {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.showcase-description {
  font-size: 1.8rem;
  max-width: 700px;
  margin: 0 auto;
  color: #8892b0;
}

.showcase-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 5rem;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 1.2rem 2.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50px;
  font-size: 1.6rem;
  font-weight: 500;
  color: #8892b0;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.tab-btn:hover {
  background: rgba(67, 97, 238, 0.1);
  color: var(--primary);
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 3rem;
}

.portfolio-box {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  height: 250px;
  transition: var(--transition);
}

.portfolio-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.portfolio-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(transparent, var(--dark));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: var(--transition);
}

.portfolio-box:hover .portfolio-layer {
  opacity: 1;
}

.portfolio-box:hover img {
  transform: scale(1.1);
}

.portfolio-layer h4 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.portfolio-layer p {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: #ccd6f6;
}

.live-demo-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  background: var(--primary);
  border-radius: 50%;
  color: white;
  font-size: 1.8rem;
  transition: var(--transition);
}

.live-demo-btn:hover {
  background: var(--secondary);
  transform: translateY(-5px);
}

/* Certificate Modal */
.certificate-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.certificate-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
}

.modal-content img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
}

.close-modal {
  position: absolute;
  top: -40px;
  right: 0;
  font-size: 3rem;
  color: white;
  cursor: pointer;
  background: var(--primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
}

.close-modal:hover {
  background: var(--danger);
  transform: rotate(90deg);
}

/* Contact Section */
.contact {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 20px;
  padding: 8rem 6rem;
  margin: 5rem 0;
}

.contact-form {
  max-width: 800px;
  margin: 0 auto;
}

.input-box {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.input-box input,
.contact-form textarea {
  width: 100%;
  padding: 1.8rem;
  font-size: 1.6rem;
  color: var(--light);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.input-box input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

.contact-form textarea {
  resize: none;
  height: 200px;
  margin-bottom: 3rem;
}

.form-btn {
  text-align: center;
}

/* Footer */
.footer {
  background: rgba(10, 25, 47, 0.95);
  padding: 4rem 0 2rem;
  text-align: center;
}

.footer-text {
  font-size: 1.6rem;
  color: #8892b0;
  margin-bottom: 2rem;
}

.footer-iconTop {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 5rem;
  height: 5rem;
  background: var(--primary);
  border-radius: 50%;
  color: white;
  font-size: 2rem;
  transition: var(--transition);
  margin: 0 auto;
}

.footer-iconTop:hover {
  background: var(--secondary);
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

/* Responsive Design */
@media (max-width: 991px) {
  .home {
    flex-direction: column;
    text-align: center;
    padding-top: 12rem;
  }

  .container1 {
    flex-direction: column;
    text-align: center;
    padding-top: 12rem;
  }
  .home-content {
    margin-bottom: 5rem;
    order: 2;
  }

  .home-img {
    order: 1;
    justify-content: center;
    margin-bottom: 3rem;
  }

  .button-container {
    justify-content: center;
  }

  .about {
    flex-direction: column;
    gap: 5rem;
  }

  .about-img {
    order: 1;
  }

  .about-content {
    order: 2;
  }

  .input-box {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 2rem 5%;
  }

  .menu-toggle {
    display: block;
  }

  .navbar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--dark);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    transition: var(--transition);
    z-index: 1000;
  }

  .navbar.active {
    right: 0;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
  }

  .home-content h1 {
    font-size: 4.5rem;
  }

  .about {
    padding: 4rem;
  }

  .about-cards {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 450px) {
  html {
    font-size: 55%;
  }

  .home-img img {
    max-width: 100%;
  }

  .about {
    padding: 3rem 2rem;
  }

  .contact {
    padding: 5rem 3rem;
  }
}
