/*========================================
  Global Styles & Reset
========================================*/
:root {
  --primary-color: #00d4ff;       /* Neon blue accent */
  --primary-alt: #66eaff;         /* Lighter neon blue for subtle shifting */
  --secondary-color: #ffffff;     /* White for text */
  --bg-dark: #0b0c10;             /* Dark navy (instead of pure black) */
  --bg-darker: #161a1d;           /* Slightly lighter dark navy */
  --bg-light: #1f2833;            /* Dark blue-gray for cards & containers */
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  cursor: default;
  font-family: 'Poppins', sans-serif;
  /* Dark navy gradient background with a subtle animated blend */
  background: radial-gradient(circle, var(--bg-dark), var(--bg-darker), var(--bg-light));
  animation: backgroundAnimation 15s ease infinite;
  color: var(--secondary-color);
  line-height: 1.6;
}

/* Background Animation */
@keyframes backgroundAnimation {
  0% { background: radial-gradient(circle, var(--bg-dark), var(--bg-darker), var(--bg-light)); }
  50% { background: radial-gradient(circle, var(--bg-darker), var(--bg-light), var(--bg-dark)); }
  100% { background: radial-gradient(circle, var(--bg-dark), var(--bg-darker), var(--bg-light)); }
}

/* Utility */
.view-more {
  display: none;
}

/*========================================
  Background Images
========================================*/
.cover {
  background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url(myphoto.jpg);
  background-size: cover;
  background-attachment: fixed;
}

/*========================================
  Navigation & Menu Links
========================================*/
#welcome-section,
#experience,
#education {
  background-color: var(--bg-darker);
  color: var(--secondary-color);
}

.menu-link {
  display: inline-block;
  position: relative;
}
.menu-link::after {
  content: '';
  position: absolute;
  width: 50%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--secondary-color);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}
.menu-link:hover::after,
.menu-link:focus::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

#welcome-section {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.9);
  padding: 5px 0;
  width: 100%;
  max-width: 100vw;
  margin: 0;
  backdrop-filter: blur(10px);
}

#navbar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 10px 20px;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  margin: 0;
}

#navbar a {
  text-decoration: none;
  color: var(--secondary-color);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 5px;
  margin: 0 8px;
  white-space: nowrap;
  transition: all 0.3s ease-in-out;
  text-shadow: 0 0 3px var(--primary-color);
}
#navbar a:last-child {
  margin-right: 0;
}
#navbar a:hover,
#navbar a:focus {
  background-color: var(--primary-color);
  color: var(--bg-dark);
  box-shadow: 0 0 8px var(--primary-color);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background: var(--bg-darker);
  color: var(--secondary-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/*========================================
  Section Layout
========================================*/
section {
  position: relative;
  scroll-margin-top: 10px;
  padding: 60px 20px 40px; /* Extra bottom padding to reveal separator */
  margin-top: -60px; /* Offset for sticky header */
  transition: opacity 0.8s ease, transform 0.8s ease;
  opacity: 0;
}
.animate {
  transform: translateY(0);
  opacity: 1;
}

/* Insert neon separator at the top of every section except the first */
section:not(:first-child)::before {
  content: "";
  display: block;
  margin: 20px auto 0 auto;
  height: 3px;
  width: 0;
  background-color: var(--primary-color);
  transition: width 1s ease-out;
}
section:not(:first-child).animate::before {
  width: 50%;
}

.w-full {
  background: var(--bg-darker);
  color: var(--secondary-color);
  padding: 40px 20px;
}

h2 {
  font-size: 28px;
  margin-bottom: 20px;
  text-align: center;
  text-shadow: 0 0 8px var(--primary-color), 0 0 12px var(--primary-alt);
}

/* Decorative styling for section headings with animation */
.section-heading.decorative {
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: transform 0.3s ease;
  cursor: default;
}
.section-heading.decorative:hover {
  transform: scale(1.05);
}
.section-heading.decorative::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  transform: translateX(-50%);
  width: 0;
  height: 6px;
  background: var(--primary-color);
  clip-path: polygon(0 0, 100% 0, 85% 100%, 15% 100%);
  animation: underlineExpand 1s forwards;
}

@keyframes underlineExpand {
  to {
    width: 70px;
  }
}

/*========================================
  Container for Education & Experience
========================================*/
/* Ensure the inner containers in Education and Experience have consistent spacing */
#education > .education-box,
#experience > div {
  width: 90%;
  max-width: 900px;
  margin: 0 auto;
}

/*========================================
  Portfolio & Profile
========================================*/
.portfolio-container {
  display: flex;
  align-items: center;
  background: var(--bg-light);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8);
  max-width: 900px;
  width: 90%;
  margin: 40px auto;
  animation: fadeIn 1.2s ease-out;
}

.profile-pic {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-color);
  margin-right: 30px;
  transition: transform 0.3s ease;
  animation: float 3s ease-in-out infinite;
  box-shadow: 0 0 8px var(--primary-color);
}
.profile-pic:hover,
.profile-pic:focus {
  transform: scale(1.1);
}

.intro-section {
  margin-left: 20px;
}
.intro-section h1 {
  font-size: 36px;
  color: var(--primary-color);
  margin-bottom: 10px;
  animation: fadeInDown 1s ease-in-out;
  text-shadow: 0 0 6px var(--primary-color);
}
.intro-section p {
  font-size: 18px;
  line-height: 1.8;
  color: var(--secondary-color);
}

/*========================================
  Card Components
========================================*/
.max-w-sm {
  background: var(--bg-light);
  border: 1px solid var(--bg-darker);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}
.max-w-sm:hover,
.max-w-sm:focus {
  transform: translateY(-8px) scale(1.02) rotate(0.2deg);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85);
  filter: brightness(1.05);
}
.max-w-sm .font-semibold {
  color: var(--primary-color);
  font-size: 18px;
  text-shadow: 0 0 4px var(--primary-color);
}
.max-w-sm p {
  color: var(--secondary-color);
}

/*========================================
  Buttons & Inline Elements
========================================*/
button {
  background: var(--primary-color);
  color: var(--bg-dark);
  border: none;
  border-radius: 5px;
  padding: 12px 20px;
  font-size: 16px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  text-shadow: 0 0 3px var(--primary-color);
}
button:hover,
button:focus {
  background: #00a3cc;
  transform: scale(1.05);
  box-shadow: 0 0 10px var(--primary-color);
  outline: none;
}

span.inline-block {
  background: var(--bg-darker);
  color: var(--primary-color);
  border-radius: 50px;
  padding: 8px 14px;
  margin: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}
span.inline-block:hover,
span.inline-block:focus {
  background-color: var(--primary-color);
  color: var(--bg-dark);
}

/*========================================
  Technical Skills Styling
========================================*/
.tech-box {
  background: var(--bg-light);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}
.skills .skill {
  background: var(--bg-darker);
  padding: 8px 12px;
  border-radius: 20px;
  margin: 4px;
  transition: transform 0.3s ease, background 0.3s ease;
  cursor: default;
}
.skills .skill:hover {
  transform: scale(1.1);
  background: var(--primary-alt);
}

/*========================================
  Education Box Styling
========================================*/
.education-box {
  background: var(--bg-light);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

/*========================================
  Text Helpers
========================================*/
.text-left {
  color: var(--secondary-color);
  font-size: 16px;
  line-height: 1.5;
}
.text-left span {
  display: block;
}
.text-left .font-bold {
  color: var(--primary-color);
}

/*========================================
  Animations
========================================*/
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes underlineExpand {
  to {
    width: 70px;
  }
}

/* Subtle neon color shift for headings */
@keyframes colorShift {
  0% { color: var(--primary-color); }
  50% { color: var(--primary-alt); }
  100% { color: var(--primary-color); }
}

/* Floating animation for the profile picture */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/*========================================
  Mobile Styles (for screens below 768px)
========================================*/
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    padding: 10px 15px;
    align-items: flex-start;
  }
  #navbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
  }
  #navbar a {
    margin: 4px 0;
    font-size: 0.95rem;
  }
  .portfolio-container {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  .profile-pic {
    margin: 0 auto 20px auto;
    width: 150px;
    height: 150px;
  }
  .intro-section {
    margin-left: 0;
  }
  h2 {
    font-size: 24px;
  }
  .intro-section h1 {
    font-size: 28px;
  }
  .intro-section p {
    font-size: 16px;
  }
  .max-w-sm {
    margin: 10px auto;
  }
  .w-full {
    padding: 20px 10px;
  }
  button {
    padding: 10px 16px;
    font-size: 14px;
  }
}

footer a:hover,
footer a:focus {
  transform: translateY(-3px);
  transition: transform 0.3s ease;
}

#view-projects {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.certification-card:hover,
.certification-card:focus {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8);
  transition: all 0.3s ease;
}

/*========================================
  Certificate Images Adjustments
========================================*/
.certification-card img {
  filter: brightness(0.7) contrast(1.2);
  border: 2px solid var(--bg-darker);
  border-radius: 5px;
}

/*========================================
  Text Block Adjustments for Sections
========================================*/
/* Increase the width of text blocks in Achievements, Experience, Education, and Tech */
#achievements .section-text,
#achievements .section-list,
#experience .section-text,
#experience .section-list,
#education .section-text,
#education .section-list,
#tech .section-text,
#tech .section-list {
  max-width: 80%;
  margin: 0 auto;
  text-align: left;
}

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -2;
  transition: transform 0.2s ease-out;
}
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--primary-color);
  color: var(--bg-dark);
  padding: 10px 15px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 8px var(--primary-color);
  transition: transform 0.3s ease;
  z-index: 100;
}
#back-to-top:hover,
#back-to-top:focus {
  transform: scale(1.1);
  outline: none;
}

.skip-nav {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: var(--bg-dark);
  padding: 8px 16px;
  z-index: 1000;
  transition: top 0.3s;
}
.skip-nav:focus {
  top: 0;
}
