@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
  --bg-color: #0b0f19;       /* Deep slate/navy dark mode */
  --surface-color: #111827;  /* Slightly lighter card background */
  --primary-color: #e11d48;  /* Vibrant modern crimson/red */
  --text-main: #f3f4f6;      /* Crisp white text */
  --text-muted: #9ca3af;     /* Soft gray for paragraphs */
  --border-color: rgba(255, 255, 255, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  text-decoration: none;
  outline: none;
  border: none;
  transition: all 0.3s ease;
}

html {
  font-size: 62.5%; /* 1rem = 10px */
  scroll-behavior: smooth;
}

html::-webkit-scrollbar { width: 0.8rem; }
html::-webkit-scrollbar-track { background: var(--bg-color); }
html::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 5rem; }

body {
  background: var(--bg-color);
  color: var(--text-main);
  padding-bottom: 10rem; /* Space for the bottom navbar */
}

section {
  padding: 8rem 9%;
  max-width: 1400px;
  margin: 0 auto;
}

/* =========================================
   2. REUSABLE COMPONENTS
   ========================================= */
.heading {
  text-align: center;
  font-size: 4.5rem;
  font-weight: 700;
  margin-bottom: 5rem;
  text-transform: capitalize;
}

.heading span {
  color: var(--primary-color);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--primary-color);
  color: #fff;
  padding: 1.2rem 3rem;
  border-radius: 5rem;
  font-size: 1.6rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(225, 29, 72, 0.2);
}

.btn i {
  background: #fff;
  color: var(--primary-color);
  height: 3.5rem;
  width: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.4rem;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px rgba(225, 29, 72, 0.4);
}

/* --- THE SLEEK FLOATING PILL NAVBAR --- */
.navbar {
  position: fixed;
  bottom: 40px; /* Detached from the bottom */
  left: 50%;
  transform: translateX(-50%); /* Centered, touching nothing */
  
  display: flex;
  align-items: center;
  gap: 5px; 
  
  /* Curvy Edges & Sleek Shape */
  border-radius: 100px; /* Gives it the perfect smooth pill shape */
  padding: 8px 12px;
  
  /* Modern Glass & Floating Effect */
  background: rgba(15, 15, 15, 0.7); /* Slightly transparent dark */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  
  /* This combination creates the true 3D float */
  border: 1px solid rgba(255, 255, 255, 0.08); /* Subtle crisp edge */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), /* Deep drop shadow */
              inset 0 1px 1px rgba(255, 255, 255, 0.1); /* Inner shine */
  
  z-index: 1000;
}

/* The buttons inside the navbar */
/* --- THE SLEEK FLOATING PILL NAVBAR (DESKTOP OPTIMIZED) --- */
.navbar {
  position: fixed;
  bottom: 40px; 
  left: 50%;
  transform: translateX(-50%); 
  
  display: flex;
  align-items: center;
  gap: 15px; /* INCREASED: Gives breathing room between the buttons */
  
  border-radius: 100px; 
  padding: 12px 25px; /* INCREASED: Makes the overall pill wider and taller */
  
  background: rgba(15, 15, 15, 0.75); 
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  
  border: 1px solid rgba(255, 255, 255, 0.08); 
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 
              inset 0 1px 1px rgba(255, 255, 255, 0.1); 
  
  z-index: 1000;
  width: max-content; /* Ensures it stretches nicely to fit the content */
}

/* The buttons inside the navbar */
.navbar a {
  display: flex;
  align-items: center;
  gap: 10px; /* INCREASED: Space between the icon and the text */
  padding: 14px 30px; /* INCREASED: Wider hit area for desktop clicking */
  font-size: 1.6rem; /* Slightly larger text for desktop readability */
  font-weight: 500;
  color: #b3b3b3;
  
  border-radius: 100px; 
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.navbar a:hover {
  background: #CB2729;
  color: #ffffff;
  transform: translateY(-2px); 
  box-shadow: 0 8px 20px rgba(203, 39, 41, 0.4); 
}

.navbar a i {
  font-size: 1.9rem; /* Slightly larger icons */
}

/* --- MOBILE ADJUSTMENTS (Stays compact for small screens) --- */
@media (max-width: 768px) {
  .navbar {
    width: 85%; 
    justify-content: space-around;
    padding: 10px;
    bottom: 25px; 
    gap: 0; /* Removes the big gaps on mobile */
  }
  
  .navbar a span {
    display: none; 
  }
  
  .navbar a {
    padding: 14px 18px; 
  }
}
/* --- MOBILE ADJUSTMENTS --- */
@media (max-width: 768px) {
  .navbar {
    width: 85%; /* Keeps it from touching the sides on phones */
    justify-content: space-around;
    padding: 10px;
    bottom: 25px; /* Slightly lower on phones to save screen space */
  }
  
  .navbar a span {
    display: none; /* Hide words, keep it sleek */
  }
  
  .navbar a {
    padding: 14px 16px;
  }
}
/* =========================================
   4. HOME / HERO SECTION (Clean & Static)
   ========================================= */
.home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6rem;
  min-height: 100vh;
}

.home .content {
  flex: 1.2;
}

/* Bold, professional name */
.hero-name {
  font-size: 6.5rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

/* Clean, crisp job title */
/* --- Dynamic JS Typing Title --- */
.hero-title {
  font-size: 2.4rem;
  font-weight: 600;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  min-height: 3.5rem; /* Prevents the page from jumping up/down when text erases */
}

/* The text being typed */
#typed-text {
  color: var(--primary-color); /* Makes the typing text your red accent color */
}

/* The Blinking Cursor */
.hero-title .cursor {
  display: inline-block;
  width: 3px;
  height: 2.6rem;
  background-color: var(--primary-color);
  margin-left: 5px;
  animation: blink 1s infinite;
}

/* Stops blinking while actively typing */
.hero-title .cursor.typing {
  animation: none;
}

/* Keyframes for the blinking cursor */
@keyframes blink {
  0%  { background-color: var(--primary-color); }
  49% { background-color: var(--primary-color); }
  50% { background-color: transparent; }
  99% { background-color: transparent; }
  100%  { background-color: var(--primary-color); }
}

/* Readable paragraph */
.hero-desc {
  font-size: 1.6rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 4rem;
  max-width: 650px;
}

/* Simple, sharp image */
.home .image {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.home .image img {
  width: 100%;
  max-width: 450px;
  border-radius: 20px; /* Clean, modern edge */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5); /* Static, deep shadow */
  border: 1px solid var(--border-color);
}

/* --- Mobile Adjustments --- */
@media (max-width: 991px) {
  .home {
    flex-direction: column-reverse;
    text-align: left;
    gap: 4rem;
    padding-top: 5rem;
  }
  
  .hero-name { font-size: 4.5rem; }
  .hero-title { font-size: 1.8rem; }
  
  .home .image img { 
    max-width: 380px; 
    margin: 0 auto; 
    display: block; 
  }
  .home .image { justify-content: center; width: 100%; }
}
/* =========================================
   5. ABOUT & STATS
   ========================================= */
.about .row {
  display: flex;
  flex-wrap: wrap;
  gap: 5rem;
}

.about .info-container {
  flex: 1 1 45rem;
}

.about .count-container {
  flex: 1 1 40rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 2rem;
}

/* --- Left Side: Personal Info --- */
.about .info-container h1 {
  font-size: 3.5rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 3rem;
  text-transform: capitalize;
}

.about .info-container .box-container {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  margin-bottom: 4rem;
}

.about .info-container .box {
  flex: 1 1 20rem;
}

.about .info-container .box h3 {
  font-size: 1.5rem;
  color: var(--text-main);
  font-weight: 400;
  line-height: 2;
  margin-bottom: 1.5rem;
  word-break: break-word; /* Prevents long emails from breaking the layout */
}

.about .info-container .box h3 span {
  color: var(--primary-color);
  font-weight: 600;
  text-transform: capitalize;
  display: inline-block;
  min-width: 100px; /* Aligns the data perfectly */
}

/* --- Right Side: Stats --- */
.about .count-container .box {
  background: var(--surface-color);
  padding: 4rem 3rem;
  border-radius: 2rem;
  border: 1px solid var(--border-color);
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.about .count-container .box:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
}

.about .count-container .box h3 {
  font-size: 4.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 700;
}

.about .count-container .box p {
  font-size: 1.5rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: capitalize;
}

/* =========================================
   6. SKILLS SECTION
   ========================================= */
.skills .box-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 2rem;
}

.skills .box-container .box {
  background: var(--surface-color);
  padding: 3rem 2rem;
  border-radius: 1.5rem;
  border: 1px solid var(--border-color);
  text-align: center;
  transition: all 0.3s ease;
}

.skills .box-container .box:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.skills .box-container .box img {
  height: 6rem;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)); /* Makes the icon pop */
}

.skills .box-container .box h3 {
  font-size: 1.5rem;
  color: var(--text-main);
  font-weight: 500;
}

/* =========================================
   7. TIMELINE (Work & Education)
   ========================================= */
.work .box-container, 
.education .box-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(35rem, 1fr));
  gap: 3rem;
}

.work .box, 
.education .box {
  background: var(--surface-color);
  padding: 3.5rem;
  border-radius: 2rem;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.work .box:hover, 
.education .box:hover {
  border-color: var(--primary-color);
  transform: translateY(-3px);
}

/* The big background icon watermark */
.work .box i, 
.education .box i {
  position: absolute;
  top: -1.5rem;
  right: -1.5rem;
  font-size: 12rem;
  color: rgba(255, 255, 255, 0.02); /* Very subtle watermark */
  z-index: 0;
  transform: rotate(-15deg);
}

.work .box span, 
.education .box span {
  display: inline-block;
  background: rgba(225, 29, 72, 0.1); /* Faded red background */
  color: var(--primary-color);
  padding: 0.6rem 1.8rem;
  border-radius: 50px;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.work .box h3, 
.education .box h3 { 
  font-size: 2.2rem; 
  color: var(--text-main);
  margin-bottom: 1.5rem; 
  position: relative;
  z-index: 1;
}

.work .box p, 
.education .box p { 
  font-size: 1.5rem; 
  color: var(--text-muted); 
  line-height: 1.8; 
  position: relative;
  z-index: 1;
}

/* =========================================
   6. GRID CARDS (Skills, Portfolio, Blogs)
   ========================================= */
.skills .box-container, 
.portfolio .box-container, 
.blogs .box-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
  gap: 3rem;
}

.skills .box-container .box,
.blogs .box-container .box {
  background: var(--surface-color);
  padding: 3rem;
  border-radius: 2rem;
  border: 1px solid var(--border-color);
  text-align: center;
}

.skills .box-container .box:hover,
.blogs .box-container .box:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
}

.skills .box-container .box img {
  height: 8rem;
  margin-bottom: 2rem;
}

.skills .box-container .box h3 {
  font-size: 1.8rem;
  font-weight: 500;
}

/* Portfolio Specific */
.portfolio .box {
  position: relative;
  border-radius: 2rem;
  overflow: hidden;
  height: 35rem;
}

.portfolio .box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio .box .content {
  position: absolute;
  bottom: -100%;
  left: 0;
  width: 100%;
  background: linear-gradient(transparent, rgba(11, 15, 25, 0.95));
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
}

.portfolio .box:hover .content {
  bottom: 0;
}

.portfolio .box .content h3 { font-size: 2.2rem; color: #fff; }
.portfolio .box .content p { font-size: 1.4rem; color: var(--text-muted); margin: 1rem 0; }

/* =========================================
   7. TIMELINE (Work & Education)
   ========================================= */
.work .box-container, .education .box-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 800px;
  margin: 0 auto;
}

.work .box, .education .box {
  background: var(--surface-color);
  padding: 3rem;
  border-radius: 2rem;
  border: 1px solid var(--border-color);
  position: relative;
  border-left: 4px solid var(--primary-color);
}

.work .box span, .education .box span {
  display: inline-block;
  background: rgba(225, 29, 72, 0.1);
  color: var(--primary-color);
  padding: 0.5rem 1.5rem;
  border-radius: 5rem;
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.work .box h3, .education .box h3 { font-size: 2.2rem; margin-bottom: 1rem; }
.work .box p, .education .box p { font-size: 1.5rem; color: var(--text-muted); line-height: 1.8; }

/* =========================================
   8. CONTACT FORM
   ========================================= */
.contact .row {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem;
  background: var(--surface-color);
  padding: 5rem;
  border-radius: 3rem;
  border: 1px solid var(--border-color);
}

.contact .info-container { flex: 1 1 35rem; }
.contact form { flex: 1 1 50rem; }

.contact .info-container h1 { font-size: 3.5rem; margin-bottom: 2rem; }
.contact .info-container p { font-size: 1.6rem; color: var(--text-muted); margin-bottom: 3rem; }

.contact form .inputBox {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.contact form .inputBox input { width: 100%; }

.contact form input, .contact form textarea {
  width: 100%;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 1.5rem 2rem;
  border-radius: 1rem;
  color: var(--text-main);
  font-size: 1.6rem;
  margin-bottom: 2rem;
}

.contact form input:focus, .contact form textarea:focus {
  border-color: var(--primary-color);
}

.contact form textarea { height: 20rem; resize: none; }

/* =========================================
   9. RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 991px) {
  html { font-size: 55%; }
  section { padding: 6rem 5%; }
  
  .home {
    flex-direction: column-reverse;
    text-align: center;
    justify-content: center;
    margin-top: 5rem;
  }
  
  .home .content p { margin: 0 auto 3rem; }
  .home .image img { max-width: 350px; }
}

@media (max-width: 768px) {
  .navbar {
    width: 90%;
    justify-content: space-between;
    padding: 1rem;
  }
  
  .navbar a span { display: none; } /* Hide text on mobile, just show icons */
  .navbar a { padding: 1.5rem; border-radius: 50%; }
  
  .contact .row { padding: 3rem 2rem; }
  .contact form .inputBox { flex-direction: column; gap: 0; }
}