/* Page-1 Theme - Elite Aesthetic Restoration & Alignment */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* Scroll Offsets for Navigation - Calibrated for Text Alignment with Sidebar H1 */
#about,
#experience,
#projects,
#my-projects-2,
#my-projects-3,
#my-projects-4,
#my-projects-5 {
  scroll-margin-top: 10vh; /* Aligns container start with sticky sidebar header */
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #121212 0%, #080808 100%);
  color: #eaeaea;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip; /* clip avoids breaking sticky while fixing horizontal overflow */
}

/* Hide default cursor everywhere to fully replace it with ghost cursor */
body * {
  cursor: none !important;
}

/* ====== Ethereal Custom Cursor & Background Glow ====== */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  background-color: transparent;
  border: 1.5px solid rgba(229, 231, 235, 0.4); /* Minimalist Off-White Cursor Ring */
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              height 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.3s ease, border-color 0.3s ease;
  mix-blend-mode: difference;
}

.custom-cursor.hovering {
  width: 50px; /* Expand on interactive fields */
  height: 50px;
  background-color: rgba(255, 255, 255, 0.15); /* Solid White translucent pool */
  border-color: rgba(255, 255, 255, 0.2); 
  mix-blend-mode: normal;
}

.bg-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 700px; /* Wide spotlight */
  height: 700px;
  background: radial-gradient(circle, rgba(229, 231, 235, 0.05) 0%, rgba(30, 30, 30, 0) 60%); /* Extremely subtle diffuse Off-White tint */
  border-radius: 50%;
  pointer-events: none;
  z-index: -1; /* Keep behind all content */
}

.container {
  display: grid;
  grid-template-columns: 35% 1fr; /* Using 1fr for second column to absorb column-gap without overflowing */
  /* Ya jo bhi aapne rakha hai */
  padding: 10vh 5vw;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
  /* IS VALUE KO BARHAO */
  column-gap: 150px; /* Reduced slightly to prevent clipping on smaller desktop screens */
  box-sizing: border-box;
}

.about,
.experience,
.projectssss {
  font-size: 16px;
  line-height: 1.8;
  color: rgba(234, 234, 234, 0.7);
  margin-top: -5px; /* Pulls text up to match H1 cap-height exactly */
  padding-top: 0; /* Align text exactly with the top of the Sidebar H1 */
  margin-bottom: 120px;
  max-width: 650px;
  width: 100%;
  text-align: justify; /* Elite newspaper styling for clean edges */
}

.mobile-header {
  display: none;
}

.about p,
.experience p {
  margin: 0;
}

.projectssss {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Ensure individual cards look clean */
.first-project,
.second-project,
.third-project,
.fourth-project,
.fivth-project {
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  /* Thora aur subtle */
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}

/* Navigation Back Block */
.nav-back {
  position: absolute;
  top: -40px;
  /* Float above the main alignment line */
}

.home-link {
  color: rgba(234, 234, 234, 0.6);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.home-link:hover {
  color: #fff;
}

/* Left Content Sidebar (Sticky for Grid) */
.left-content {
  position: sticky;
  top: 10vh;
  height: fit-content; /* Ensure height only wraps content for sticky to work ideally */
  margin-right: 20px;
}

.left-content h1 {
  font-size: 48px;
  font-weight: 800;
  margin: 0;
  /* Reset margin for horizontal leveling */
  line-height: 1;
  letter-spacing: -1px;
}

.left-content h3 {
  font-size: 18px;
  font-weight: 400;
  color: rgba(234, 234, 234, 0.6);
  margin: 15px 0 30px 0;
}

.left-content p {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(234, 234, 234, 0.5);
  margin-bottom: 50px;
}

/* Sections Navigation */
.sections a {
  display: flex;
  align-items: center;
  gap: 15px;
  color: rgba(234, 234, 234, 0.5);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 25px;
  transition: all 0.4s ease;
}

.sections a .line {
  width: 30px;
  height: 1px;
  background: rgba(234, 234, 234, 0.3);
  transition: width 0.4s ease, background 0.4s ease;
}

.sections a:hover {
  color: #fff;
  transform: translateX(10px);
}

.sections a:hover .line {
  width: 60px;
  background: #fff;
}

.resume {
  margin-top: 10vh;
}

.resume a {
  font-size: 14px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 5px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Social Buttons */
.profile-button {
  display: flex;
  gap: 20px;
  margin-top: 40px;
}

.profile-button a {
  font-size: 20px;
  color: rgba(234, 234, 234, 0.6);
  transition: color 0.3s ease, transform 0.3s ease;
}

.profile-button a:hover {
  color: #fff;
  transform: translateY(-3px);
}

.resume-mobile {
  display: none;
}

/* Main content alignment is handled by the unified .about/.experience/.projectssss block at the top */

.project-card {
  display: flex;
  gap: 24px;
  padding: 24px;
  text-decoration: none;
  border-radius: 12px;
  transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.4s ease;
  background: transparent;
  align-items: flex-start;
}

/* Hover Effect: Charcoal Black Highlight */
.project-card:hover {
  background: #1a1a1a; /* Exact Charcoal-black hover highlight */
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.05); /* Subtle depth */
}

/* Left side: Project Image */
.footer-image {
  flex-shrink: 0;
  width: 130px;
  height: 80px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.4s ease;
}

.footer-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.project-card:hover .footer-image {
  border-color: #333333; /* Lighter charcoal border for accent, no blue */
}

.project-card:hover img {
  opacity: 1;
  transform: scale(1.05);
}

/* Right side: Text Content */
.text-container {
  display: flex;
  flex-direction: column;
  max-width: 480px; /* Concise reading width */
}

.text-container span {
  font-family: 'Inter', sans-serif;
  color: #f8fafc; /* Crisp off-white */
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.2;
}

/* Arrow Icon and Diagonal Animation */
.text-container span i {
  font-size: 14px;
  color: #94a3b8;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
              color 0.3s ease;
}

.project-card:hover span {
  color: #ffffff; /* Bright white pop instead of teal */
}

.project-card:hover span i {
  transform: translate(4px, -4px); /* Diagonal movement (Up & Right) */
  color: #ffffff; /* Bright white pop instead of teal */
}

.text-container p {
  color: #94a3b8; /* Professional slate-gray */
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
  font-weight: 400;
}

/* Tech Stack Pills */
.tech-stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tech-pill {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #888;
  background: transparent;
  border: 1px solid #333;
  padding: 4px 10px;
  border-radius: 99px; /* Rounded pill shape */
  line-height: 1;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  cursor: pointer;
}

.tech-pill:hover {
  background: rgba(255, 255, 255, 0.05); /* Faint highlight tint */
  border-color: #555;
  color: #eee;
}

/* Scroll Reveal Classes */
.reveal-fade {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-fade.active {
  opacity: 1;
  transform: translateY(0);
}

/* Footer Section Information */
.know {
  margin-top: 15vh;
  font-size: 13px;
  color: rgba(234, 234, 234, 0.4);
}

/* Responsive Overrides */
@media (max-width: 1100px) {
  .left-content h1 {
    font-size: 38px;
  }

  .container {
    grid-template-columns: 1fr;
    padding: 10vh 8vw;
    column-gap: 0;
  }

  .left-content {
    position: relative;
    width: 100%;
    height: auto;
    top: 0;
    margin-bottom: 80px;
    margin-right: 0;
  }
  
  .sections {
    display: none; /* Hide side navigation on mobile for cleaner look */
  }

  .resume-mobile {
    display: block;
    margin-top: 30px;
  }

  .resume-mobile a {
    font-size: 14px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 5px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
  }

  .mobile-header {
    display: block;
    position: sticky;
    top: 0;
    width: calc(100% + 16vw);
    margin-left: -8vw;
    padding: 20px 8vw;
    background: rgba(12, 12, 12, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 50;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 30px;
    text-transform: uppercase;
  }

  .about,
  .experience,
  .projectssss {
    max-width: 100%;
    margin-bottom: 80px;
    text-align: left; /* Better for mobile readability than justify */
  }

  .project-card {
    padding: 16px;
    gap: 16px;
  }

  .footer-image {
    width: 100px;
    height: 60px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 60px 24px;
  }

  .left-content h1 {
    font-size: 32px;
  }

  .left-content h3 {
    font-size: 16px;
    margin: 10px 0 20px 0;
  }

  .left-content p {
    margin-bottom: 30px;
  }

  .resume {
    margin-top: 40px;
  }

  .project-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-image {
    width: 100%;
    height: 180px;
    margin-bottom: 15px;
  }

  .text-container {
    max-width: 100%;
  }

  .bg-glow {
    width: 300px;
    height: 300px;
  }
  
  /* Disable custom cursor on touch devices to prevent interference */
  .custom-cursor {
    display: none;
  }
  
  body * {
    cursor: auto !important;
  }
}

@media (max-width: 480px) {
  .left-content h1 {
    font-size: 28px;
  }
  
  .project-card {
    padding: 12px;
  }

  .footer-image {
    height: 150px;
  }
}