@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&family=Open+Sans:wght@300&display=swap");

html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #f8fafc;
  color: #0f172a;
}

/* COLORS */
:root {
  --primary-color: #7c3aed;
  --primary-color-darker: #5b21b6;
  --secondary-color: #f97316;
  --text-color: #0f172a;
  --text-color-light: #64748b;
  --white: #ffffff;
}

/* LOGO */
.logo {
  font-size: 1.6rem;
  font-weight: 600;
}

.logo span {
  color: var(--primary-color);
  font-size: 2rem;
}

/* NAVBAR */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 80px;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin: 0 20px;
  font-size: 16px;
}

nav ul li a {
  text-decoration: none;
  color: var(--text-color);
  transition: 0.3s;
}

nav ul li a:hover {
  color: var(--primary-color);
}

/* BUTTONS */
.btn {
  background: var(--primary-color);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  transition: 0.3s;
}

.btn:hover {
  background: var(--primary-color-darker);
}

.btn-outline {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 10px 18px;
  border-radius: 6px;
  margin-left: 10px;
  text-decoration: none;
  transition: 0.3s;
}

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--white);
}

/* HERO SECTION */
.firstsec {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 80px;
}

.leftsec {
  max-width: 500px;
}

.hello {
  font-size: 2rem;
  color: var(--text-color-light);
}

.name {
  font-size: 3.5rem;
  font-weight: 600;
  color: var(--primary-color);
}

.pos {
  font-size: 1.5rem;
  margin-top: 10px;
  color: var(--text-color);
}

.description {
  margin-top: 15px;
  font-size: 15px;
  color: var(--text-color-light);
  line-height: 1.6;
  font-family: "Poppins", sans-serif; 
  text-align: justify;
}

.buttons {
  margin-top: 20px;
}


/* IMAGE */
.img-container img {
  width: 350px;
  max-width: 100%;
}

/* ABOUT SECTION */
.about {
  padding: 60px 80px;
  text-align: center;
}

.about h2 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.about p {
  max-width: 600px;
  margin: auto;
  color: var(--text-color-light);
  line-height: 1.6;
}

.skills {
  padding: 60px 80px;
  background: #f1f5f9;
  text-align: center;
}

.skills h2 {
  font-size: 2rem;
  margin-bottom: 30px;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.skill-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: 0.3s;
}

.skill-card h3 {
  margin-bottom: 10px;
  color: #7c3aed;
}

.skill-card p {
  color: #64748b;
  font-size: 14px;
}

.skill-card:hover {
  transform: translateY(-5px);
}

.projects {
  padding: 60px 80px;
  text-align: center;
}

.projects h2 {
  font-size: 2rem;
  margin-bottom: 30px;
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.project-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  text-align: left;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: 0.3s;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-card h3 {
  color: #7c3aed;
  margin-bottom: 10px;
}

.project-card p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 15px;  
  text-align: justify;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card .btn {
  width: 160px;
  text-align: center;
}

/* CONTACT SECTION */
.contact {
  padding: 80px;
  background: #f8fafc;
}

.contact-wrapper {
  display: flex;
  justify-content: space-between;
  gap: 50px;
  flex-wrap: wrap;
}

/* LEFT SIDE */
.contact-left {
  flex: 1;
}

.contact-left h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.subtext {
  font-weight: 500;
  margin-bottom: 15px;
}

.desc {
  color: #64748b;
  margin-bottom: 20px;
}

/* EMAIL */
.email {
  font-size: 15px;
  margin-bottom: 20px;
}

.email a {
  text-decoration: none;
  color: var(--text-color);
  margin-left: 8px;
}

.email a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.email i {
  color: var(--primary-color);
  margin-right: 5px;
}

/* SOCIAL ICONS */
.socials a {
  margin-right: 15px;
  font-size: 22px;
  color: var(--text-color);
  transition: 0.3s;
}

.socials a:hover {
  color: var(--primary-color);
  transform: scale(1.2);
}

/* RIGHT SIDE FORM */
.contact-right {
  flex: 1;
}
.row input {
  width: 100%;
}

/* FORM */
.contact-form {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* ROW (2 inputs) */
.row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

/* FULL WIDTH INPUT */
.full {
  width: 100%;
}

/* INPUTS */
.contact-form input,
.contact-form textarea {
  width: 100%;   /* 🔥 VERY IMPORTANT */
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
}

/* TEXTAREA FIX */
.contact-form textarea {
  resize: none;
}

/* BUTTON */
.contact-form button {
  width: 140px;
  margin-top: 10px;
}

@media (max-width: 992px) {
    nav {
        padding: 20px 40px;
    }

    .firstsec {
        flex-direction: column-reverse; /* Image goes on top, text below */
        text-align: center;
        padding: 60px 20px;
        gap: 30px;
    }

    .leftsec {
        max-width: 100%;
    }

    .buttons {
        justify-content: center;
        display: flex;
    }

    .contact-wrapper {
        flex-direction: column;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    nav ul {
        display: none; 
    }

    .name {
        font-size: 2.5rem;
    }

    .hello {
        font-size: 1.5rem;
    }

    .img-container img {
        width: 280px; 
    }

    .about, .skills, .projects, .contact {
        padding: 40px 20px;
    }

    .row {
        flex-direction: column; 
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 2rem;
    }

    .btn, .btn-outline {
        padding: 8px 15px;
        font-size: 13px;
    }
}