body {
  font-family: "Space Grotesk", sans-serif;
  background: #0a0e27;
  background-image: 
    radial-gradient(at 0% 0%, rgba(0, 255, 157, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(0, 242, 254, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
  color: #e0e6ed;
  margin: 0;
  padding: 0;
}

/* Ensure full-page height for containers so sidebar can stretch with content */
html, body { height: 100%; }

h1, h2, h3, h4, h5, h6 {
  font-family: "Space Grotesk", sans-serif;
  color: #ffffff;
  font-weight: 600;
}

h1 {
  background: linear-gradient(135deg, #60a5fa 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Layout: sidebar + content */
.container {
  display: flex;
  min-height: 100vh;
  align-items: flex-start; /* let each column size to its content height */
  gap: 1.5rem; /* spacing between sidebar and content */
}

.sidebar {
  width: 260px;
  background: linear-gradient(180deg, rgba(10, 14, 39, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
  backdrop-filter: blur(10px);
  color: #e0e6ed;
  /* reduce top padding to remove excess space at page top */
  padding: 1.25rem 1.25rem;
  box-sizing: border-box;
  /* default: sidebar participates in layout; we'll make it fixed on larger screens */
  position: relative;
  overflow: visible;
  transition: transform 0.25s ease-in-out;
  z-index: 40;
  border-radius: 14px; /* smooth edges all around */
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.02);
}

/* Accent strip along the inner edge to make the divider look nicer */
.sidebar::after { display: none; }

.sidebar-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.profile-pic {
  width: 100%;
  max-width: 200px;        /* cap on large screens */
  aspect-ratio: 4 / 5;     /* preserves intended shape without fixed height */
  border-radius: 16px;
  object-fit: cover;       /* crop to fill the box */
  display: block;
  margin-bottom: 1rem;
  border: 2px solid rgba(0, 255, 157, 0.4);
}

.name {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.75rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  background: linear-gradient(135deg, #60a5fa 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bio {
  font-size: 0.95rem;
  color: #b4c0d3;
  text-align: center;
  margin-bottom: 1.25rem;
}

/* Page Navigation */
.page-nav {
  width: 100%;
  margin-bottom: 1.5rem;
}

/* Social links section - push to bottom */
nav[aria-label="Social and contact links"] {
  margin-top: auto;
  width: 100%;
}

.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.nav-link {
  display: block;
  padding: 0.65rem 1rem;
  text-align: center;
  color: #b4c0d3;
  text-decoration: none;
  border-radius: 8px;
  background: transparent;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.nav-link:hover,
.nav-link:focus {
  background: rgba(0, 255, 157, 0.1);
  color: #00ff9d;
  border-color: rgba(0, 255, 157, 0.3);
}

.nav-link.active {
  background: rgba(0, 255, 157, 0.15);
  color: #00ff9d;
  font-weight: 600;
  border-color: rgba(0, 255, 157, 0.4);
}

.socials {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  align-items: center;
}

.socials a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #b4c0d3;
  text-decoration: none;
  padding: 0.55rem 0.75rem;
  width: calc(100% - 1.5rem);
  border-radius: 8px;
  background: transparent;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.socials a svg { color: inherit; width: 16px; height: 16px; }

.socials a:hover,
.socials a:focus {
  background: rgba(0, 242, 254, 0.08);
  color: #00f2fe;
  transform: translateX(3px);
  border-color: rgba(0, 242, 254, 0.2);
}

/* Icon images and text styles */
.socials a .icon { width: 16px; height: 16px; display: inline-block; flex-shrink: 0; }
.socials a .label { font-weight: 600; font-size: 0.82rem; letter-spacing: 0.4px; text-transform: uppercase; color: #7a8a9e; }
.socials a .username { font-size: 0.85rem; color: #b4c0d3; opacity: 0.95; }

.socials a:hover .label,
.socials a:focus .label,
.socials a:hover .username,
.socials a:focus .username { color: #00f2fe; }

/* Brand coloring for inline SVGs */
.brand-github svg { color: #00ff9d; }
.brand-github:hover svg, .brand-github:focus svg { color: #5fffbb; }

.brand-linkedin svg { color: #00f2fe; }
.brand-linkedin:hover svg, .brand-linkedin:focus svg { color: #5ff7fe; }

/* Optional brand accents */
.brand-leetcode svg { color: #ff006e; }
.brand-leetcode:hover svg, .brand-leetcode:focus svg { color: #e68506ff; }

.brand-codeforces svg { color: #00d9ff; }
.brand-codeforces:hover svg, .brand-codeforces:focus svg { color: #5fe5ff; }

.icon-email svg { color: #b4c0d3; }
.socials a:hover .icon-email svg, .socials a:focus .icon-email svg { color: #00f2fe; }

.sr { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.content {
  margin-left: 0; /* sidebar is now in the normal flow (flex) so no manual left margin needed */
  /* reduce top padding so main content sits higher on the page */
  padding: 2rem 1.5rem;
  flex: 1 1 auto;
  max-width: 900px;
}

/* Pull the H1 up to reduce the perceived top whitespace */
.intro h1 {
  margin-top: 0;
}

.sidebar-toggle {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 60;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: 0;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  display: none; /* shown on small screens */
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
}

/* Mobile: hide sidebar off-canvas, show toggle */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-110%);
    width: 82%;
    max-width: 320px;
    box-shadow: 8px 0 24px rgba(0,0,0,0.6);
    border-radius: 0; /* full-height overlay shouldn't be rounded */
    max-height: none;
    overflow: auto;
  }

  /* no accent on mobile */

  .sidebar.open {
    transform: translateX(0);
  }

  .content { margin-left: 0; padding: 5.5rem 1rem 2rem; } /* extra top padding so hamburger doesn't block heading */

  .sidebar-toggle { display: inline-block; }

  .intro h1 { margin-top: 2rem; } /* push heading down below hamburger on mobile */

  .skip-link:focus { position: static; margin: 0.5rem; background: #111; color: #fff; padding: 0.25rem 0.5rem; border-radius: 4px; }
}

/* Small adjustments */
footer { margin-top: 2.25rem; color: #7a8a9e; }

footer a { color: #00f2fe; text-decoration: none; }
footer a:hover { color: #5ff7fe; text-decoration: underline; }

/* Projects page styles */
.projects-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.project-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card {
  background: rgba(0, 255, 157, 0.03);
  border: 1px solid rgba(0, 255, 157, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #00ff9d, #00f2fe);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover::before {
  opacity: 1;
}

.project-card-link:hover .project-card,
.project-card-link:focus .project-card {
  background: rgba(0, 255, 157, 0.06);
  border-color: rgba(0, 255, 157, 0.5);
  transform: translateY(-4px);
}

.project-card-link:focus {
  outline: 2px solid rgba(0, 255, 157, 0.5);
  outline-offset: 2px;
  border-radius: 12px;
}

.project-card h2 {
  margin-top: 0;
  font-size: 1.3rem;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.project-card p {
  color: #b4c0d3;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.tech-stack {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tech-tag {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  background: rgba(0, 242, 254, 0.1);
  color: #00f2fe;
  border-radius: 6px;
  font-weight: 500;
  border: 1px solid rgba(0, 242, 254, 0.3);
  transition: all 0.2s ease;
}

.tech-tag:hover {
  background: rgba(0, 242, 254, 0.2);
}

/* About page styles */
.about-content {
  margin-top: 1.5rem;
}

.focus-with-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  /* pull following content closer with negative margin */
  margin-bottom: -1rem;
}

.focus-text h2 {
  margin-top: 0;
}

.leetcode-card {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.leetcode-card a {
  display: block;
  /* removed transform to eliminate vertical spacing */
  transition: transform 0.3s ease;
  border-radius: 12px;
}

.leetcode-card a:hover {
  /* hover should lift the card by 4px */
  transform: translateY(-4px);
}

/* make the shadow follow the SVG's visible shape (respects transparency/rounded corners) */
.leetcode-card img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(0, 242, 254, 0.2);
  display: block;
  filter: drop-shadow(0 20px 30px rgba(0, 242, 254, 0.08));
  transition: filter 0.28s ease, transform 0.28s ease;
}

.leetcode-card a:hover img {
  /* tighten and darken the shadow on hover so it looks like the card lifts */
  filter: drop-shadow(0 8px 24px rgba(0, 242, 254, 0.32));
}

@media (max-width: 900px) {
  .focus-with-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .leetcode-card {
    margin-bottom: 1rem; /* add spacing between LeetCode card and Education heading on mobile */
  }
}

/* Extra small screens tweaks */
@media (max-width: 480px) {
  .name { font-size: 1.25rem; }
  .profile-pic { max-width: 140px; border-radius: 12px; }
  .content { padding: 1rem; }
  .nav-link { padding: 0.5rem 0.75rem; font-size: 0.9rem; }
}

/* Desktop: fix the sidebar to the viewport so it stays visible while scrolling */
@media (min-width: 900px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    overflow-y: visible; /* no internal scrolling */
    z-index: 60;
  }

  /* move content right so it doesn't go under the fixed sidebar */
  .content {
    margin-left: 260px; /* sidebar width, content sits next to it */
    padding: 1rem 1.5rem 0.5rem; /* minimal bottom padding */
  }
}

/* Very wide screens: center the layout and avoid extremely long content lines
   Make the sidebar flow inside the centered container instead of being fixed to the viewport. */
@media (min-width: 1400px) {
  .container {
    max-width: 1200px;    /* limit total content width */
    margin: 0 auto;       /* center on very wide viewports */
    gap: 2rem;            /* space between sidebar and content */
    align-items: flex-start;
  }

  /* Keep the sidebar fixed on large screens; just tweak visual styles */
  .sidebar {
    box-shadow: 0 10px 48px rgba(0,0,0,0.55);
  }

  /* Ensure content stays to the right of the fixed sidebar */
  .content {
    margin-left: 260px; /* match the fixed sidebar width */
    padding: 3rem 1.5rem;
    max-width: 860px;     /* keep comfortable line length for readability */
    flex: 1 1 auto;
  }

  .sidebar-inner {
    align-items: flex-start;
    padding-top: 1rem;
  }

  .profile-pic { max-width: 180px; }
}

.about-content h2 {
  /* bring section headings slightly closer to preceding content */
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  color: #ffffff;
  background: linear-gradient(135deg, #00ff9d 0%, #00f2fe 50%, #ff006e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.about-content h2::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #00ff9d, #00f2fe);
}

.about-content h3 {
  color: #00f2fe;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.about-content p,
.about-content ul {
  color: #b4c0d3;
  line-height: 1.7;
}

.about-content ul {
  padding-left: 1.5rem;
  margin-top: 0.5rem;
}

.about-content li {
  margin-bottom: 0.4rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
  margin-bottom: 0; /* remove bottom margin */
}

.skill-category {
  /* softer gradient base, subtle border and shadow for depth */
  background: linear-gradient(180deg, rgba(0,242,254,0.02), rgba(0,255,157,0.01));
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 1rem;
  transition: transform .28s cubic-bezier(.2,.9,.2,1), box-shadow .28s ease, border-color .28s ease;
  position: relative;
  box-shadow: 0 6px 20px rgba(0,242,254,0.03);
  overflow: hidden;
}

.skill-category::before {
  /* left accent bar */
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #00ff9d, #00f2fe);
  opacity: 0.22;
  transition: opacity 0.28s ease, transform 0.28s ease;
  transform: translateX(0);
}

.skill-category:hover::before {
  opacity: 0.95;
  transform: translateX(0);
}

.skill-category:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(0,242,254,0.06);
  border-color: rgba(0, 242, 254, 0.18);
}

.skill-category::after {
  /* subtle glossy highlight */
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 36%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
}

.skill-category ul {
  /* restore semantic bullets for lists inside cards */
  list-style: disc;
  padding-left: 1.1rem;
  margin: 0.4rem 0 0.2rem 0;
}

.skill-category li {
  color: #e0e6ed;
  padding: 0.25rem 0;
  font-size: 0.9rem;
}

/* Move the headings up a bit and add an underline style */
.skill-category h3 {
  margin-top: 0;
  margin-bottom: 0.45rem;
  font-size: 1.05rem;
  color: #00f2fe;
  display: inline-block;
  padding-bottom: 0.18rem;
  border-bottom: 2px solid rgba(0,242,254,0.18);
}

.skill-category h3 small {
  display: block;
  font-size: 0.78rem;
  color: #b4c0d3;
}



/* Inline content links: subtle neon color with animated gradient underline */
.content a {
  color: #7df8c9;
  text-decoration: none;
  background-image: linear-gradient(90deg, #00ff9d, #00f2fe);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px; /* animate underline from 0 -> 100% */
  transition: background-size .25s ease, color .18s ease, transform .12s ease;
  border-radius: 2px;
}

.content a:hover,
.content a:focus {
  color: #eafff6;
  background-size: 100% 2px;
  transform: translateY(-1px);
}

.content a:focus {
  box-shadow: 0 0 0 4px rgba(0,255,157,0.08);
  outline: none;
}


