/* ===== Modern CSS with Enhanced UI/UX ===== */
:root {
  --primary: #4070f4;
  --primary-light: #6e93f7;
  --primary-dark: #2a5bd7;
  --secondary: #f4a640;
  --text-dark: #0E2431;
  --text-light: #f8f9fa;
  --bg-light: #F0F8FF;
  --card-bg: #ffffff;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 5px 15px rgba(64, 112, 244, 0.4);
  --border-radius: 8px;
}

/* Dark Mode Variables */
:root.dark {
  --primary: #5d8bf4;
  --primary-light: #7a9ff7;
  --primary-dark: #4a7aee;
  --text-dark: #f0f0f0;
  --text-light: #ffffff;
  --bg-light: #121212;
  --card-bg: #1e1e1e;
}

/* ===== Base Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  overflow-x: hidden;
  background-color: var(--bg-light);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== Navigation ===== */
nav {
  position: fixed;
  width: 100%;
  padding: 1rem 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

nav.sticky {
  background: var(--primary);
  padding: 0.8rem 0;
  box-shadow: var(--shadow-primary);
}

.navbar {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--primary);
  transition: transform 0.2s ease;
}

nav.sticky .logo a {
  color: var(--text-light);
}

.logo a:hover {
  transform: scale(1.05);
}

.menu {
  display: flex;
  list-style: none;
  align-items: center;
}

.menu li {
  margin: 0 0.75rem;
}

.menu a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-dark);
  padding: 0.5rem 0;
  position: relative;
}

.menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.menu a:hover::after {
  width: 100%;
}

nav.sticky .menu a {
  color: var(--text-light);
}

nav.sticky .menu a::after {
  background: var(--text-light);
}

/* ===== Home Section ===== */
.home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95));
  padding-top: 80px;
}

.home-content {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 0;
  text-align: center;
}

.text-one {
  font-size: 1.25rem;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  opacity: 0;
  animation: fadeIn 0.6s ease forwards 0.2s;
}

.text-two {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeIn 0.6s ease forwards 0.4s;
}

.text-three {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--primary);
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeIn 0.6s ease forwards 0.6s;
}

.text-four {
  font-size: 1.25rem;
  color: var(--text-dark);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeIn 0.6s ease forwards 0.8s;
}

.button-group {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  opacity: 0;
  animation: fadeIn 0.6s ease forwards 1s;
}

.cta-button button {
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.cta-button button {
  background: var(--primary);
  color: var(--text-light);
  border: 2px solid var(--primary);
}

.cta-button.secondary button {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.cta-button button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--text-light);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
  z-index: -1;
}

.cta-button button:hover {
  color: var(--primary);
  box-shadow: var(--shadow-primary);
}

.cta-button button:hover::before {
  transform: translateX(0);
}

.cta-button.secondary button::before {
  background: var(--primary);
}

.cta-button.secondary button:hover {
  color: var(--text-light);
}

/* ===== About Section ===== */
.about {
  padding: 6rem 0;
  background-color: var(--card-bg);
}

.content {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.title {
  margin-bottom: 3rem;
  text-align: center;
}

.title span {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.title span::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--primary);
}

.about-details {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.left {
  flex: 1;
  display: flex;
  justify-content: center;
}

.left img {
  width: 100%;
  max-width: 380px;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease;
}

.left img:hover {
  transform: scale(1.02);
}

.right {
  flex: 1;
}

.topic {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.right p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.personal-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.info-item {
  display: flex;
  gap: 0.5rem;
}

.label {
  font-weight: 600;
  color: var(--primary);
}

.value {
  color: var(--text-dark);
}

/* Skills Section */
.skills-section {
  padding: 5rem 2rem;
  background: #fefefe;
  text-align: center;
}

.skills-section .title h2 {
  font-size: 2.8rem;
  margin-bottom: 0.3rem;
  color: #222;
}

.skills-section .title p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 3rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.skill-card {
  padding: 2rem 1.5rem;
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  transition: 0.3s ease-in-out;
}

.skill-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.skill-card img {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
}

.skill-card h3 {
  font-size: 1.2rem;
  color: #111;
  margin-bottom: 0.5rem;
}

.skill-card p {
  font-size: 0.95rem;
  color: #555;
}



/* ===== Projects Section ===== */
.projects {
  padding: 6rem 0;
  background-color: var(--card-bg);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-primary);
}

.project-content {
  width: 100%;
}

.project-content .icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 1.5rem;
  margin: 0 auto 1.5rem;
  box-shadow: var(--shadow-sm);
}

.project-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.project-content p {
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.project-tags span {
  background: var(--primary-light);
  color: var(--text-light);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
}

/* ===== Contact Section ===== */
.contact {
  padding: 6rem 0;
  background-color: var(--bg-light);
}

.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 2rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-info h3 {
  font-size: 1.5rem;
  color: var(--primary);
}

.contact-info p {
  color: var(--text-dark);
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-dark);
}

.info-item i {
  color: var(--primary);
  font-size: 1.2rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  border: 1px solid #ddd;
  font-family: inherit;
  transition: var(--transition);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(64, 112, 244, 0.2);
}

.submit-btn {
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: var(--text-light);
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  align-self: flex-start;
}

.submit-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}

/* ===== Footer ===== */
footer {
  background: var(--primary);
  padding: 2rem 0;
  text-align: center;
}

.footer-content {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

footer p {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-light);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--secondary);
}

/* ===== Scroll Button ===== */
.scroll-button a {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  background: var(--primary);
  color: var(--text-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}

.scroll-button a.active {
  opacity: 1;
  visibility: visible;
}

.scroll-button a:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
  .about-details {
    flex-direction: column;
  }
  
  .left img {
    max-width: 320px;
    margin-bottom: 2rem;
  }
}

@media (max-width: 768px) {
  .menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--text-dark);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 998;
  }
  
  .menu.active {
    left: 0;
  }
  
  .menu li {
    margin: 1rem 0;
  }
  
  .menu a {
    font-size: 1.25rem;
    color: var(--text-light);
  }
  
  .button-group {
    flex-direction: column;
    gap: 1rem;
  }
  
  .personal-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .title span {
    font-size: 1.5rem;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }
}