/* -------------------------
   Global Styles & Variables
-------------------------- */
:root {
  --bg: #0f1724;
  --card: #0b1220;
  --muted: #9aa4b2;
  --accent1: #6ee7b7;
  --accent2: #60a5fa;
  --glass: rgba(255,255,255,0.03);
  --radius: 14px;

  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #071024 0%, #071229 50%);
  color: #e6eef6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.6rem;
}

/* -------------------------
   Header
-------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(6px);
  background: linear-gradient(180deg, rgba(4,8,15,0.6), rgba(4,8,15,0.3));
  border-bottom: 1px solid rgba(255,255,255,0.02);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 0;
}

.logo {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent1);
  text-decoration: none;
}

.logo span {
  color: var(--accent2);
}

.nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: .45rem .6rem;
  border-radius: 8px;
  font-weight: 600;
  transition: color .2s ease;
}

.nav a:hover {
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--muted);
  margin: 4px 0;
  border-radius: 2px;
}
/* -------------------------
   Icon Link Buttons
-------------------------- */
.icon-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  color: var(--muted); /* Uses the existing muted color variable */
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%; /* Makes the button circular */
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.icon-link:hover {
  color: #fff; /* Changes icon color to white on hover */
  background-color: var(--glass); /* Adds a subtle background on hover */
  transform: translateY(-3px); /* Lifts the button slightly */
  border-color: rgba(255, 255, 255, 0.2);
}

.icon-link svg {
  width: 22px;
  height: 22px;
}

/* -------------------------
   Buttons
-------------------------- */

.btn {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  border-radius: 12px;
  padding: .6rem .9rem;
  color: #021124;

  /* --- Animation Code --- */
  /* 1. Add a third color stop to make the gradient seamless when it shifts */
  background: linear-gradient(90deg, var(--accent1), var(--accent2), var(--accent1));
  /* 2. Make the background twice as wide as the button */
  background-size: 200% auto;
  /* 3. Add a smooth transition for the background-position property */
  transition: background-position 0.4s ease-in-out;
}

.btn:hover {
  background-position: right center;
}

.btn.secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.04);
  color: var(--accent1);
  transition: all 0.3s ease; /* Add this line */
}

.btn.secondary:hover {
  border-color: var(--accent1);
  box-shadow: 0 0 15px rgba(110, 231, 183, 0.3); /* Adds a soft glow */
}

.btn.small {
  font-size: .85rem;
  padding: .3rem .6rem;
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--muted);
}

.btn.secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.04);
  color: var(--accent1);
}

/* -------------------------
   Hero Section
-------------------------- */
.hero {
  position: relative;
  padding: 4rem 0 2rem;
  overflow: hidden;
  padding-top: 0; /* reduce/remove top padding */
  margin-top: 0; 
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: center;
}

.hero-left h1 {
  margin: 0;
  font-size: 2.2rem;
}

.hero-left h1 span {
  color: var(--accent1);
}

.lead {
  color: var(--muted);
  max-width: 60ch;
}

.cta-row {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  align-items: center;
}

.profile-card {
  position: relative;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.03);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  box-shadow: 0 8px 30px rgba(2,6,12,0.6);
  overflow: visible;
}

.profile-card .avatar {
   width: 300px;   /* make smaller (try 150–200px) */
  height: auto;   /* keep aspect ratio */
  border-radius: 12px; /* optional rounded corners */
  display: block; 
  margin: 0 auto; /* center inside card */
}

.profile-card .info {
  padding: .8rem;
}

.profile-card h3 {
  margin: 0 0 6px;
}

.skills-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skills-inline span {
  font-size: .85rem;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--muted);
  background: var(--glass);
}

.floating-shape {
  position: absolute;
  top: -30px;
  right: -32px;
  width: 90px;
  height: 90px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent2), var(--accent1));
  opacity: .18;
  filter: blur(12px);
  transform: rotate(22deg);
}

.hero-waves {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 80px;
  fill: transparent;
}

.hero-waves path {
  fill: rgba(255,255,255,0.02);
}

/* -------------------------
   Sections (About / Projects / Skills / Contact)
-------------------------- */
.section {
  padding: 3rem 0;
}

.section-title {
  margin-bottom: 1rem;
  font-size: 1.45rem;
  font-family: 'Poppins', sans-serif;
  color: #fff;
  text-align: center;
  justify-items: center;
}


.skills-graph .skill {
  margin-bottom: .9rem;
}

.skill label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.skill .bar {
  height: 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--accent2), var(--accent1));
  position: relative;
  overflow: hidden;
}

.skill .bar::after {
  content: '';
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: 8px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.project-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.03);
  background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.02));
  transform: translateY(18px);
  opacity: 0;
  transition: all 600ms cubic-bezier(.2,.9,.3,1);
}

.project-card.in {
  transform: none;
  opacity: 1;
}

.project-card .thumb {
  height: 160px;
  background-size: cover;
  background-position: center;
}

.proj-body {
  padding: 1rem;
}

.proj-meta {
  margin-top: .8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Skills Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.chips span {
  font-weight: 600;
  border-radius: 999px;
  padding: .5rem .8rem;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.02));
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
}

.contact-form label {
  display: block;
  margin-bottom: .8rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: .7rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  background: transparent;
  color: inherit;
}

.form-row {
  display: flex;
  gap: .6rem;
}

.contact-card {
  padding: 1rem;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(119, 228, 255, 0.02), rgba(119, 228, 255, 0.02));
}

.contact-card .social a {
  margin-right: .6rem;
  color: var(--muted);
  display: inline-block;
}

/* Footer */
.site-footer {
  padding: 1.2rem 0;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.02);
}

/* -------------------------
   Responsive
-------------------------- */
@media (max-width: 900px) {
  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    position: fixed;
    top: 60px;
    right: 18px;
    display: none;
    flex-direction: column;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(5,8,15,0.9);
  }

  .nav.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }
}

/* -------------------------
   Animations & Effects
-------------------------- */
.section, 
.profile-card {
  opacity: 0;
  transform: translateY(18px);
  transition: all 700ms cubic-bezier(.18,.9,.3,1);
}

.section.in, 
.profile-card.in {
  opacity: 1;
  transform: none;
}

.glow {
  position: relative;
}

.glow::after {
  content: '';
  position: absolute;
  left: -6px;
  right: -6px;
  bottom: -6px;
  height: 14px;
  border-radius: 10px;
  filter: blur(14px);
  z-index: -1;
  background: linear-gradient(
    90deg,
    rgba(110,231,183,0.12),
    rgba(96,165,250,0.12)
  );
}

/* Utility */
.small {
  font-size: .85rem;
}
.skills-section {
  text-align: center;
  padding: 4rem 2rem;
  background: #050c1b; /* dark background */
  color: #fff;
  position: relative;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}

.skills-box {
  max-width: 350px;
  font-size: 1rem;
  line-height: 1.6;
}

.gradient-text {
  background: linear-gradient(90deg, #4facfe, #00f2fe);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.skills-center {
  position: relative;
}

.brain-img {
  width: 280px;
  animation: pulse 3s infinite ease-in-out;
  filter: drop-shadow(0 0 20px rgba(0, 200, 255, 0.6));
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

.skills-icons {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.skills-icons img {
  width: 50px;
  transition: transform 0.3s;
}

.skills-icons img:hover {
  transform: scale(1.2);
}
/* -------------------------
   New About Me Section
-------------------------- */
.about-grid-new {
      display: grid;
      grid-template-columns: 1fr; /* Use a single column */
      justify-items: center; /* Center the content block horizontally */
      text-align: center; /* Center all the text inside */
    }

.about-image {
  position: relative;
  width: 280px;
  height: 280px;
  justify-self: center; /* Center the image container in the grid cell */
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.1);
}

/* Decorative glowing dots */
.glow-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.6;
}

.glow-dot.top-left {
  top: 10%;
  left: 10%;
  background-color: var(--accent1);
}

.glow-dot.bottom-right {
  bottom: 10%;
  right: 10%;
  background-color: var(--accent2);
}

/* Reduce the top space of the About section */
    section#about {
      padding-top: 1.5rem;
    }
    
    /* Set a max-width for the content so it looks good when centered */
    .about-content {
      max-width: 750px;
    }
    
    /* Center the title's gradient underline */
    .about-title::after {
      margin-left: auto;
      margin-right: auto;
    }
    
    /* Center the flex items in these containers */
    .tech-stack-grid, .info-badges {
      justify-content: center;
    }
/* Add a gradient underline to the title */
.about-title {
  margin-bottom: 1.5rem; /* Add some space below the title */
}

.about-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  border-radius: 2px;
  margin-top: 0.5rem;
}

.about-content p {
  color: var(--muted);
  max-width: 65ch;
  margin-bottom: 1rem;
}

/* Tech Stack Styles */
.tech-stack-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.tech-stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 1rem;
}

.tech-item {
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1rem 0.5rem;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.tech-item:hover {
  background: rgba(255,255,255,0.05);
  transform: translateY(-4px);
}

.tech-item svg {
  color: var(--muted);
}

.tech-item span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

/* Info Badges */
.info-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.badge {
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
}

/* Responsive adjustments for the new about section */
@media (max-width: 900px) {
  .about-grid-new {
    grid-template-columns: 1fr; /* Stack columns on smaller screens */
    gap: 2rem;
    text-align: center;
  }
  
  .about-title::after {
    margin-left: auto;
    margin-right: auto; /* Center the underline */
  }

  .tech-stack-grid {
    justify-content: center;
  }
  
  .info-badges {
    justify-content: center;
  }
}

/* -------------------------
   Contact Card Buttons
-------------------------- */
.contact-button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.8rem 1rem;
  margin-bottom: 0.8rem;
  text-decoration: none;
  
  /* This controls the text and icon color */
  color: var(--muted);
  
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.contact-button:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.contact-button svg {
  margin-right: 0.8rem;
  flex-shrink: 0; /* Prevents the icon from shrinking */
}

.contact-button span {
  /* Prevents long text from breaking layout */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
