/*base*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

:root {
  /* Colors */
  --primary-color: rgba(0, 170, 255, 0.8);
  --secondary-color: #2575fc; /* Blue */
  --accent-color: #00d1b2; /* Teal/Turquoise accent */
  --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  --icon-gradient: linear-gradient(45deg, var(--accent-color), var(--secondary-color));
  --white: #ffffff;

  /* Backgrounds */
  --bg-dark: #121212; /* Unified dark background */

  /* Text */
  --text-color: #e0e0e0; /* Main text */
  --text-subtle: #aaa; /* Lighter gray for paragraphs, dates, etc. */

  /* Borders & Shadows */
  --border-color: #444;
  --border-color-glass: rgba(255, 255, 255, 0.1); /* Glassmorphism card border */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.2); /* Consistent shadow for all cards */

  /* Fonts */
  --font-primary: 'Poppins', sans-serif;
  --font-heading: 'Lora', serif;

  /* Spacing */
  --spacing-unit: 8px;
  --section-padding: calc(var(--spacing-unit) * 10); /* 80px */
  --container-width: 1140px;
}

  html {
    scroll-behavior: smooth;
  }

  body {
    font-family: var(--font-primary);
    background-color: var(--bg-dark);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden; /* Prevent horizontal scrollbar from AOS */
  }

  .container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 2); /* 16px */
  }

  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--white);
    margin-bottom: calc(var(--spacing-unit) * 2); /* 16px */
    line-height: 1.3;
  }

  h2 {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 6); /* 48px */
    position: relative;
  }

  /* Subtle underline for section headers */
h2::after {
  content: '';
  position: absolute;
  /* Positioned slightly further down for a cleaner look */
  bottom: -10px; 
  left: 50%;
  transform: translateX(-50%);
  width: 80px;  /* Slightly wider for better balance with the font size */
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
  /* Add a subtle glow to match the theme's interactive elements */
  box-shadow: 0 0 15px rgba(0, 170, 255, 0.4);
}

  a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
  }

  a:hover {
    color: var(--secondary-color);
  }

  p {
     margin-bottom: calc(var(--spacing-unit) * 2); /* 16px */
     font-size: 1rem;
     color: var(--light-gray);
  }

  img {
      max-width: 100%;
      height: auto;
      display: block;
  }

  .section {
      padding: var(--section-padding);
  }

  .icon-gradient {
      background: var(--icon-gradient);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      display: inline-block; /* Needed for background-clip */
      margin-right: 8px;
  }

  .text-center {
    text-align: center;
  }


  /*navbar*/
  .navbar {
    background: rgba(18, 18, 18, 0.75); /* Slightly transparent dark */
    backdrop-filter: blur(10px); /* Frosted glass effect */
    padding: calc(var(--spacing-unit) * 1.5); /* 12px */
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.3s ease;
  }

  .navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .navbar .logo {
    display: block;
    height: 60px;
    width: auto;
    border: 2px solid transparent;
    padding: 6px 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
    overflow: hidden;
    box-sizing: border-box;
  }

  .navbar .logo:hover {
    border-color: var(--primary-color);
  }

  .nav-links {
    list-style: none;
    display: flex;
  }

  .nav-links li {
    margin-left: calc(var(--spacing-unit) * 3); /*24px*/
  }

  .nav-links a {
    color: var(--text-color);
    text-decoration: none;
    padding: 5px 10px;
    position: relative;
    transition: color 0.3s ease;
  }

  .nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    transition: width 0.3s ease;
  }

  .nav-links a:hover {
    color: var(--white);
  }

  .nav-links a:hover::after {
    width: 100%;
  }

  .hamburger {
    display: none;
  }

  /*home*/
  #home {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    color: var(--white);
    margin-top: -80px;
  }

  /* tsParticles canvas styling */
  #tsparticles {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 0; /* Behind content */
      pointer-events: none; /* Prevents clicks from being intercepted */
  }

  .hero-content {
    position: relative;
  }

  /* --- Simple Hero Photo Styling --- */


.hero-photo {
  width: 200px;
  height: 200px;
  margin-left: 270px;
  object-fit: cover; /* Prevents image from being squashed */
  border-radius: 50%;
  /* Clean, static border that matches the card theme */
  border: 2px solid transparent; 
  /* Simple shadow for depth, not distracting */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease ;
}

.hero-photo:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(0, 170, 255, 0.2);;
}

  .hero-content h1 {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.5);
  }

  .hero-content h1 .highlight-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .hero-content .tagline {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: calc(var(--spacing-unit) * 5);
    color: var(--subtle-text-color);
    text-shadow: 0px 1px 4px rgba(0, 0, 0, 0.5);
  }

  .social-links-hero a {
    color: var(--white);
    font-size: 1.8rem;
    margin: calc(var(--spacing-unit) * 1.5);
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
  }

  .social-links-hero a:hover {
    transform: scale(1.2);
    background: var(--primary-color);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .scroll-down-btn {
    position: absolute;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.7);
    animation: bounce 2.5s infinite;
    z-index: 2;
    transition: color 0.3s ease;
  }

  .scroll-down-btn:hover {
    color: var(--primary-color);
  }

  @keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-20px); }
    60% { transform: translateX(-50%) translateY(-10px); }
  }


  /*about*/
  #about {
    padding: 80px 0;
    background-color: var(--background-color);
  }
  #about p {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    font-size: 1.25rem;
    line-height: 1.8; /* Added for better readability */
    color: var(--subtle-text-color);
  }


  /*skills*/
#skills {
  padding: 80px 0;
}

/* --- The Grid for Skill Cards --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: calc(var(--spacing-unit) * 4) /*32px*/
}

/* --- The Skill Card (Glassmorphism Style) --- */
.skill-card {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--card-border-color);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  opacity: 1;
}

.skill-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 30px rgba(0, 170, 255, 0.2);
}

/* --- The Icon Container --- */
.skill-icon-wrapper {
  margin: 0 auto 20px auto;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0, 170, 255, 0.05); /* A very subtle glow */
  border: 1px solid rgba(0, 170, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-icon {
  font-size: 2.5rem; /* Icon size inside the circle */
  background: var(--icon-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Card Content --- */
.skill-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 20px;
}

/* --- The Skill Tags --- */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.skills-list span {
  background: rgba(0, 170, 255, 0.1);
  color: var(--white);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid rgba(0, 170, 255, 0.2);
}


/*project*/
#projects {
  position: relative;
  padding: 80px 0;
}

/* --- The Grid for Project Cards --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: calc(var(--spacing-unit) * 4) /*32px*/
}

@media screen and (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- The Project Card (Glassmorphism Style) --- */
.project-card {
  backdrop-filter: blur(10px); /* The "glass" effect */
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid var(--card-border-color);
  box-shadow: 0 4px 15px var(--shadow-color);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
  opacity: 1;
}

/* Card Hover Effect */
.project-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 30px rgba(0, 170, 255, 0.2);
}

/* --- Card Content --- */
.project-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-content h3 {
  margin: 0 0 10px 0;
  font-size: 1.3rem;
}

.project-content h3 a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.project-content h3 a:hover {
  color: var(--primary-color);
}

.project-content p {
  color: var(--subtle-text-color);
  font-size: 0.95rem;
  line-height: 1.7;
  flex-grow: 1;
  margin-bottom: 20px;
}

/* --- Technology List (Original Style) --- */
.project-tech {
  display: block;
  font-size: 0.9rem;
  color: var(--subtle-text-color); /* Updated to use new color variable */
  margin-bottom: 20px; /* Adjusted spacing */
}

.project-tech i {
  margin-right: 4px; /* Slightly adjusted spacing */
  margin-left: 10px;
  vertical-align: middle;
  color: var(--primary-color) /* Make icons stand out */
}

.project-tech i:first-child {
  margin-left: 0;
}

/* --- Project Links / Buttons --- */
.project-links {
  padding: 0 25px 25px 25px;
  margin-top: auto;
  display: flex;
  gap: 15px;
}

.btn-outline {
  flex-grow: 1;
  text-align: center;
  display: inline-block;
  padding: 10px 15px;
  border: 1px solid rgba(0, 170, 255, 0.2);
  border-radius: 8px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
  font-size: 0.9rem;
}

.btn-outline i {
  margin-right: 8px;
}

.btn-outline:hover {
  background-color: rgba(0, 170, 255, 0.1);
  color: var(--background-color);
}


  /*experience*/
/* --- The Timeline Container --- */
.timeline {
  position: relative;
  max-width: 900px; /* Increased max-width for a better look */
  margin: 0 auto;
}

/* The vertical line */
.timeline::after {
  content: '';
  position: absolute;
  width: 6px;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px; /* half of width */
  border-radius: 3px;
  box-shadow: 0 4px 12px var(--shadow-color);
}

/* --- The Timeline Item Container --- */
.timeline-item {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
}

/* Position items on the left */
.timeline-item:not(.right) {
  left: 0;
}

/* Position items on the right */
.timeline-item.right {
  left: 50%;
}

/* --- The Circular Icon on the Timeline --- */
.timeline-icon {
  position: absolute;
  width: 50px;
  height: 50px;
  right: -25px; /* (width/2) */
  background: var(--gradient-primary);
  top: 15px;
  border-radius: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: white;
  box-shadow: 0 0 0 4px var(--background-color), 0 4px 12px var(--shadow-color);
}

/* Icon for right-sided items */
.timeline-item.right .timeline-icon {
  left: -25px; /* (width/2) */
}

/* --- The Content Box --- */
.timeline-content {
  padding: 20px 30px;
  position: relative;
  border-radius: 8px;
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover Effect */
.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 170, 255, 0.2);
}

/* The arrow pointing to the timeline */
.timeline-content::after {
  content: " ";
  height: 0;
  position: absolute;
  top: 22px;
  width: 0;
  z-index: 1;
}

/* Arrow for left-sided items */
.timeline-item:not(.right) .timeline-content::after {
  right: -15px; /* Position arrow outside the box */
  border-width: 15px 0 15px 15px;
  border-color: transparent transparent transparent;
}

/* Arrow for right-sided items */
.timeline-item.right .timeline-content::after {
  left: -15px; /* Position arrow outside the box */
  border-width: 15px 15px 15px 0;
  border-color: transparent transparent transparent;
}

/* Content typography */
.timeline-content h3 {
  margin-top: 0;
  color: var(--primary-color);
  font-weight: 600;
}

.timeline-content .date {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--subtle-text-color);
  letter-spacing: 1px;
}

.timeline-content p {
  margin: 10px 0 0;
  color: var(--text-color);
}


/*certifications*/
#certifications, #positions {
  padding: 80px 0;
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: calc(var(--spacing-unit) * 4) /*32px*/
}

.highlight-card {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: calc(var(--spacing-unit) * 4); /*32px*/
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--card-border-color);
  border-bottom: 3px solid var(--primary-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  opacity: 1;
}

.highlight-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 30px rgba(0, 170, 255, 0.2);
}

.highlight-card .card-icon {
  font-size: 2.8 rem;
  margin-bottom: 20px;
  background: var(--icon-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}

.highlight-card i:first-child {
  font-size: 3rem;
  margin-bottom: 16px;
  background: var(--icon-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}

.highlight-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit)); /*8px*/;
}

.highlight-card h3 a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s ease;
}

.highlight-card h3 a:hover {
  color: var(--primary-color);
}

.highlight-card p {
  font-size: 0.95rem;
  color: var(--subtle-text-color);
  margin-bottom: 15px;
  line-height: 1.6;
}

/*positions*/
.highlight-card ul {
  list-style: none;
  padding: 0;
  margin-top: calc(var(--spacing-unit)); /*8px*/
  text-align: left;
  flex-grow: 1;
}

.highlight-card li {
  color: var(--text-color);
  margin-bottom: calc(var(--spacing-unit)); /*8px*/
  display: flex;
  align-items: flex-start;
}

.highlight-card li::before {
  content: '\f560'; /* double check icon*/
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--primary-color);
  margin-right: calc(var(--spacing-unit) * 1.5); /*12px*/
  font-size: 1.1rem;
  margin-top: 2px;
}


/*contact*/
#contact {
  position: relative;
  text-align: center;
  padding: 80px 0;
}

#contact h2 {
  margin-bottom: calc(var(--spacing-unit) * 2.5); /*20px*/
}

#contact p {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: calc(var(--spacing-unit) * 5); /*40px*/
  color: var(--subtle-text-color);
  font-size: 1.1rem;
  line-height: 1.7;
}

.btn-primary {
  display: inline-block;
  background: var(--gradient-primary);
  color: var(--white);
  padding: 14px 40px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 170, 255, 0.3);
  color: var(--white);
}

.btn-primary i {
  margin-right: calc(var(--spacing-unit)); /*8px*/
  vertical-align: middle;
}

  .social-links-footer {
      margin-top: 60px;
  }
  .social-links-footer a {
      color: var(--subtle-text-color);
      font-size: 1.8rem;
      margin: 0 15px;
      transition: color 0.3s ease, transform 0.3s ease;
  }
  .social-links-footer a:hover {
      color: var(--primary-color);
      transform: scale(1.3);
  }

  /*footer*/
    footer {
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      padding: calc(var(--spacing-unit) * 2.5) 0; /* 20px */
      text-align: center;
      margin-top: var(--section-padding);
      border-top: 1px solid var(--border-color);
      font-size: 0.9rem;
      color: var(--subtle-text-color);
  }

  /* --- Responsive Media Queries --- */
@media screen and (max-width: 768px) {
  h2 {
    font-size: 2.2rem;
  }

  .hero-content h1 {
    font-size: 3rem;
  }

  .hero-photo {
    margin-bottom: 20px;
    margin-left: 80px;
  }

  .hero-content .tagline {
    font-size: 1.2rem;
  }

  .navbar {
    position: sticky;
  }

  /* --- FIX: Navbar Mobile Layout --- */
  .navbar .logo {
    height: 50px;
    padding-left: 8px;
  }

  /* --- Hamburger Menu --- */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-dark);
    flex-direction: column;
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);

    /* Animation Properties: Initially hidden and slightly moved up */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none; /* Prevents clicking on hidden links */
    
    /* The magic: Animate these properties over 0.3 seconds */
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  }

  .nav-links.active {
    display: flex;

    /* Animate to: Fully visible and in its final position */
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto; /* Make links clickable again */
  }

  .nav-links li {
    margin: 15px 0;
  }

  .hamburger {
    display: block;
    background: none;
    color: var(--primary-color);
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 8px;
  }

  /* --- FIX: Timeline Mobile Layout (Education & Experience) --- */
  .timeline::after {
    left: 30px;
  }

  .timeline-item {
    width: 100%;
    /* Create space for the icon on the left */
    padding-left: 70px; 
    /* NEW: Add breathing room on the right edge */
    padding-right: 15px; 
  }

  .timeline-item.right {
    left: 0%;
  }

  .timeline-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    left: 0px;
  }

  .timeline-item.right .timeline-icon {
    left: 6px;
  } 
  
  .timeline-content {
    padding: 15px 20px;
    width: 225px;
    margin: 5px;
  }
  
  /* NEW: Give paragraph text more vertical breathing room */
  .timeline-content p {
    font-size: 0.9rem;
    line-height: 1.6; /* Increased for better readability */
  }
  
  .timeline-content h3 {
    font-size: 1.1rem;
  }

  .timeline-content .date {
    font-size: 0.9rem;
  }

  .timeline-content::after,
  .timeline-item:not(.right) .timeline-content::after {
    left: -15px;
    border-width: 15px 15px 15px 0;
    border-color: transparent transparent transparent;
  }
}

  @media (max-width: 576px) {
      :root { --section-padding: calc(var(--spacing-unit) * 6); } /* 48px */
       h2 { font-size: 1.8rem; }
      .hero-content h1 { font-size: 2rem; }
      .hero-content .tagline { font-size: 1rem; }
      .social-links-hero a, .social-links-footer a { font-size: 1.5rem; margin: 0 10px;}
      .btn-primary { padding: 12px 28px; font-size: 1rem; }
  }