/* ========================================
   1. CSS Custom Properties
   ======================================== */
:root {
  --primary: #4A90E2;
  --primary-light: #7FBFFF;
  --dark: #1A202C;
  --darker: #0F111A;
  --light: #F0F4F8;
  --gray: #9AAABF;
  --gradient: linear-gradient(135deg, #4A90E2 0%, #306ABF 100%);
  --nav-height: 75px;
}

/* ========================================
   2. Reset & Base Styles
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  max-width: 100vw;
  overflow-x: hidden;
  touch-action: manipulation;
}

body {
  background-color: var(--darker);
  color: var(--light);
  position: relative;
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
  touch-action: manipulation;
}

/* ========================================
   3. Skip-to-Content
   ======================================== */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 0;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  z-index: 10000;
  transition: top 0.3s;
  text-decoration: none;
  font-weight: 600;
}
.skip-to-content:focus {
  top: 0;
}

/* ========================================
   4. Navigation
   ======================================== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(26, 32, 44, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  z-index: 1000;
  border-bottom: 1px solid rgba(240, 244, 248, 0.1);
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.nav-logo {
  font-weight: 700;
  font-size: 1.5rem;
}

.nav-logo a {
  background: #6BB3FF;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: var(--light);
  font-weight: 500;
  position: relative;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary-light);
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
  height: 3px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--light);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ========================================
   5. Hero
   ======================================== */
header, section {
  padding: 8rem 5%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  scroll-margin-top: calc(var(--nav-height) + 1.5rem);
}

section {
  margin-bottom: 4rem;
}

.hero {
  min-height: calc(100vh - var(--nav-height));
  margin-top: var(--nav-height);
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.hero-content {
  max-width: 600px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero h1 span {
  background: var(--primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: var(--gray);
  margin-bottom: 2rem;
  max-width: 500px;
}

.typewriter {
  font-size: 1.25rem;
  color: var(--primary-light);
  margin-bottom: 2rem;
  height: 1.5em;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary {
  background: #2563EB;
  color: white;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  background: #1D4FD8;
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.6);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  margin-left: 1rem;
}

.btn-outline:hover {
  background: rgba(74, 144, 226, 0.1);
}

.profile-pic {
  width: 340px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 20px;
  border: 5px solid rgba(74, 144, 226, 0.5);
  box-shadow: 0 25px 50px rgba(0,0,0,0.4);
  transition: all 0.5s ease;
  margin-left: auto;
}

.profile-pic:hover {
  transform: scale(1.05);
  box-shadow: 0 35px 70px rgba(0,0,0,0.5);
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  width: 50%;
  height: 4px;
  bottom: -10px;
  left: 0;
  background: var(--primary);
  border-radius: 2px;
}

/* ========================================
   6. About
   ======================================== */
.about-content {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.about-text {
  flex: 1;
}

.about-text p {
  margin-bottom: 1.5rem;
  color: var(--gray);
}

.about-illustration {
  flex: 1;
  text-align: center;
}

.about-illustration img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
}

/* ========================================
   7. Skills
   ======================================== */
.skills-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 3rem;
}

.tab-btn {
  background: rgba(26, 32, 44, 0.7);
  border: 1px solid rgba(240, 244, 248, 0.1);
  color: var(--gray);
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn:hover {
  background: rgba(74, 144, 226, 0.1);
  color: var(--light);
  border-color: rgba(74, 144, 226, 0.3);
  transform: translateY(-2px);
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4);
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.5rem;
}

.skill-box {
  background: rgba(26, 32, 44, 0.7);
  border: 1px solid rgba(240, 244, 248, 0.2);
  padding: 2rem 1rem;
  text-align: center;
  border-radius: 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-box.hidden {
  display: none !important;
}

.skill-box:hover {
  transform: translateY(-10px);
  background: rgba(74, 144, 226, 0.15);
  border-color: var(--primary-light);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.skill-box i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: var(--primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skill-box h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

/* ========================================
   7.5 Interests Section
   ======================================== */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

.interest-card {
  position: relative;
  background: rgba(26, 32, 44, 0.65);
  border: 1px solid rgba(240, 244, 248, 0.15);
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.interest-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 80% 20%, rgba(74, 144, 226, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.interest-card:hover {
  transform: translateY(-8px);
  border-color: rgba(74, 144, 226, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 
              0 0 20px rgba(74, 144, 226, 0.1);
  background: rgba(26, 32, 44, 0.85);
}

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

.interest-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.interest-glow::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 100px;
  height: 100px;
  background: var(--primary);
  filter: blur(40px);
  opacity: 0.15;
  transition: all 0.4s ease;
}

.interest-card:hover .interest-glow::after {
  opacity: 0.4;
  transform: scale(1.5);
}

.interest-icon {
  width: 60px;
  height: 60px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(74, 144, 226, 0.1) 0%, rgba(48, 106, 191, 0.2) 100%);
  border: 1px solid rgba(74, 144, 226, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: all 0.4s ease;
  position: relative;
  z-index: 2;
}

.interest-icon i {
  font-size: 1.75rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: all 0.4s ease;
}

.interest-card:hover .interest-icon {
  transform: scale(1.1) rotate(5deg);
  border-color: var(--primary-light);
  box-shadow: 0 0 15px rgba(74, 144, 226, 0.3);
}

.interest-card h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--light);
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
  transition: color 0.3s ease;
}

.interest-card:hover h3 {
  color: var(--primary-light);
}

.interest-card p {
  font-size: 0.95rem;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
  flex-grow: 1;
}

.interest-tags {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: relative;
  z-index: 2;
  margin-top: auto;
}

.interest-tags li span {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary-light);
  background: rgba(74, 144, 226, 0.1);
  border: 1px solid rgba(74, 144, 226, 0.15);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.interest-card:hover .interest-tags li span {
  background: rgba(74, 144, 226, 0.2);
  border-color: rgba(74, 144, 226, 0.4);
  color: white;
}

/* ========================================
   8. Certifications
   ======================================== */
.certifications-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 2rem;
}
.cert-card {
  background: rgba(26, 32, 44, 0.7);
  border: 1px solid rgba(240, 244, 248, 0.2);
  border-radius: 0.75rem;
  padding: 1.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cert-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  transition: width 0.3s ease;
  z-index: 1;
}

.cert-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-light);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.cert-card:hover::before {
  width: 8px;
}

/* 1. Security / CISSP Card Glow */
.cert-premium-security {
  border-color: rgba(243, 156, 18, 0.4); /* Gold */
  background: linear-gradient(135deg, rgba(26, 32, 44, 0.7) 0%, rgba(38, 47, 65, 0.8) 100%);
}

.cert-premium-security::before {
  background: #F39C12; /* Gold */
}

.cert-premium-security:hover {
  border-color: #F39C12;
  box-shadow: 0 10px 25px rgba(243, 156, 18, 0.25);
}

.cert-premium-security .cert-icon-fa {
  color: #F39C12;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

/* 2. AI Card Glow */
.cert-ai {
  border-color: rgba(163, 0, 217, 0.4); /* Purple */
  background: linear-gradient(135deg, rgba(26, 32, 44, 0.7) 0%, rgba(45, 30, 65, 0.8) 100%);
}

.cert-ai::before {
  background: #A300D9; /* Deep Purple */
}

.cert-ai:hover {
  border-color: #A300D9;
  box-shadow: 0 10px 25px rgba(163, 0, 217, 0.25);
}

.cert-ai .cert-icon-fa {
  color: #A300D9;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

/* 3. freeCodeCamp brand icon styling */
.cert-card .fa-free-code-camp {
  background: linear-gradient(135deg, #0A0A23 0%, #1A1A3A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Cert Badges */
.cert-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.security-badge {
  background: rgba(243, 156, 18, 0.15);
  color: #F39C12;
  border: 1px solid rgba(243, 156, 18, 0.3);
}

.dev-badge {
  background: rgba(46, 204, 113, 0.15);
  color: #2ECC71;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.ai-badge {
  background: rgba(163, 0, 217, 0.15);
  color: #D68DFF;
  border: 1px solid rgba(163, 0, 217, 0.3);
}

.design-badge {
  background: rgba(52, 152, 219, 0.15);
  color: #3498DB;
  border: 1px solid rgba(52, 152, 219, 0.3);
}

.product-badge {
  background: rgba(155, 89, 182, 0.15);
  color: #9B59B6;
  border: 1px solid rgba(155, 89, 182, 0.3);
}

.tools-badge {
  background: rgba(149, 165, 166, 0.15);
  color: #BDC3C7;
  border: 1px solid rgba(149, 165, 166, 0.3);
}
.cert-icon-fa {
  font-size: 2.2rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  flex-shrink: 0;
}
.cert-info h4 {
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 0.3rem;
}
.cert-info p {
  color: var(--gray);
  font-size: 0.9rem;
}
.view-cert-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary-light);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 0.5rem;
  transition: color 0.3s;
}
.view-cert-link:hover {
  color: var(--primary);
}

/* ========================================
   9. Portfolio
   ======================================== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 2rem;
}

.project-card {
  background: rgba(26, 32, 44, 0.7);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(240, 244, 248, 0.2);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  border-color: var(--primary-light);
}

.project-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-info h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.project-info p {
  color: var(--gray);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  background: rgba(74, 144, 226, 0.2);
  color: var(--primary-light);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.project-links a {
  color: var(--light);
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.3s ease;
}

.project-links a:hover {
  color: var(--primary-light);
}

/* ========================================
   10. Quote
   ======================================== */
.quote-card {
  background: rgba(26, 32, 44, 0.7);
  border-radius: 1rem;
  padding: 3rem;
  text-align: center;
  border: 1px solid rgba(74, 144, 226, 0.5);
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.quote-card::before {
  content: '"';
  position: absolute;
  font-size: 10rem;
  color: rgba(74, 144, 226, 0.1);
  top: -3rem;
  left: -1rem;
  line-height: 1;
  z-index: 0;
}

.quote-card p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-style: italic;
  position: relative;
  z-index: 1;
}

.quote-card .author {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--primary-light);
}

/* ========================================
   11. Testimonials
   ======================================== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background: rgba(26, 32, 44, 0.7);
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid rgba(240, 244, 248, 0.2);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.testimonial-text {
  color: var(--gray);
  margin-bottom: 1.5rem;
  font-style: italic;
  flex-grow: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.author-avatar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(74, 144, 226, 0.1);
  color: var(--primary);
  font-size: 1.3rem;
}

.author-info h3.author-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.author-info p {
  color: var(--gray);
  font-size: 0.8rem;
}

/* ========================================
   12. Contact
   ======================================== */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(74, 144, 226, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--primary-light);
}

.contact-text h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.contact-text a, .contact-text p {
  color: var(--gray);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-text a:hover {
  color: var(--primary-light);
}

.contact-form {
  background: rgba(26, 32, 44, 0.7);
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid rgba(240, 244, 248, 0.2);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(240, 244, 248, 0.1);
  background: rgba(240, 244, 248, 0.05);
  color: var(--light);
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
  border-color: var(--primary-light);
  background: rgba(74, 144, 226, 0.2);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* ========================================
   13. Footer
   ======================================== */
footer {
  background: rgba(26, 32, 44, 0.8);
  padding: 3rem 5%;
  text-align: center;
  border-top: 1px solid rgba(240, 244, 248, 0.1);
  position: relative;
  z-index: 10;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 11;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(240, 244, 248, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light);
  transition: all 0.3s ease;
  position: relative;
  z-index: 13;
}

.social-link:hover {
  background: var(--primary);
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.copyright {
  color: var(--gray);
  font-size: 0.9rem;
}

/* ========================================
   14. Background Effects
   ======================================== */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.3;
}

.bg-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
}

.bg-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg,
    rgba(26, 32, 44, 0.9) 0%,
    rgba(15, 17, 26, 0.95) 50%,
    rgba(26, 32, 44, 0.9) 100%);
}

.bg-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  background-image:
    radial-gradient(circle at 25% 25%,
      var(--primary-light) 0%,
      transparent 20%),
    radial-gradient(circle at 75% 75%,
      var(--primary) 0%,
      transparent 20%);
  background-size: 300px 300px;
  animation: bgMove 30s linear infinite;
}

.bg-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.15;
}

.bg-shape-1 {
  width: 500px;
  height: 500px;
  background: var(--primary-light);
  top: -100px;
  left: -100px;
  animation: float 15s ease-in-out infinite;
}

.bg-shape-2 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  bottom: -150px;
  right: -100px;
  animation: float 18s ease-in-out infinite reverse;
}

.bg-shape-3 {
  width: 300px;
  height: 300px;
  background: #306ABF;
  top: 40%;
  right: 20%;
  animation: float 12s ease-in-out infinite 2s;
}

/* ========================================
   15. Animations
   ======================================== */
@keyframes bgMove {
  0% { background-position: 0 0; }
  100% { background-position: 300px 300px; }
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(50px, 50px); }
  50% { transform: translate(0, 100px); }
  75% { transform: translate(-50px, 50px); }
}

/* ========================================
   15.5 Form Overlay & Toasts (AJAX Submission)
   ======================================== */
.contact-form {
  position: relative;
  overflow: hidden;
}

.form-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 17, 26, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  border-radius: 1rem;
}

.form-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.spinner-container {
  text-align: center;
  color: var(--light);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(74, 144, 226, 0.1);
  border-left-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Toast System styles */
.toast-container {
  position: fixed;
  bottom: 6rem; /* Stacks cleanly above the scroll-to-top button */
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  pointer-events: none;
  transition: all 0.4s ease;
}

.toast {
  background: rgba(26, 32, 44, 0.95);
  border: 1px solid rgba(240, 244, 248, 0.1);
  border-left: 4px solid var(--primary);
  color: var(--light);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 320px;
  max-width: 450px;
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.success {
  border-left-color: #2ECC71;
}

.toast.error {
  border-left-color: #E74C3C;
}

.toast-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  color: #2ECC71;
}

.toast.error .toast-icon {
  color: #E74C3C;
}

.toast-message {
  font-size: 0.95rem;
  line-height: 1.4;
}

.toast-message strong {
  color: var(--primary-light);
}

@media (max-width: 576px) {
  .toast-container {
    bottom: 5.5rem; /* Stacks above mobile scroll-to-top button */
    right: 1rem;
    left: 1rem;
  }
  
  .toast {
    min-width: unset;
    width: 100%;
  }
}

/* Scroll to Top Button Base Styles */
.scroll-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(26, 32, 44, 0.85);
  border: 1px solid rgba(240, 244, 248, 0.15);
  color: var(--light);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 998; /* Under toast (9999) but above standard content */
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.scroll-to-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(74, 144, 226, 0.4);
}

.scroll-to-top-btn:active {
  transform: translateY(-2px);
}

@media (max-width: 576px) {
  .scroll-to-top-btn {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* ========================================
   16. Responsive — Tablets (max-width: 992px)
   ======================================== */
@media (max-width: 992px) {
  .about-content {
    flex-direction: column;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    min-height: calc(100vh - var(--nav-height));
  }

  .hero-content {
    max-width: 100%;
  }

  .profile-pic {
    margin: 2rem auto;
  }

  .contact-container {
    grid-template-columns: 1fr;
  }

  /* --- Mobile Navigation --- */
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 17, 26, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    font-size: 1.35rem;
    letter-spacing: 0.02em;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links a:hover,
  .nav-links a:focus {
    color: var(--primary-light);
  }

  .mobile-menu-btn {
    display: block;
    z-index: 1001;
  }
}

/* ========================================
   17. Responsive — Mobile (max-width: 768px)
   ======================================== */
@media (max-width: 768px) {
  header, section {
    padding: 6rem 5%;
  }

  .profile-pic {
    max-width: 45vw;
    display: block;
    margin: 2rem auto;
  }

  .bg-wrapper,
  .bg-gradient,
  .bg-pattern,
  .bg-shapes,
  .about-illustration img {
    max-width: 100vw;
    overflow-x: hidden;
  }
}

/* ========================================
   18. Responsive — Small Phones (max-width: 576px)
   ======================================== */
@media (max-width: 576px) {
  .btn-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .btn-outline {
    margin-left: 0;
  }

  .portfolio-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .skills-container {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
  }

  .certifications-list {
    flex-direction: column;
    gap: 1rem;
  }

  header, section {
    padding: 4rem 2%;
  }

  .quote-card {
    padding: 1.5rem;
  }

  .contact-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .btn, .btn-primary, .btn-outline {
    width: 100%;
    text-align: center;
    font-size: 1rem;
    padding: 1rem 0.5rem;
  }

  .about-content {
    flex-direction: column;
    gap: 2rem;
  }

  .about-illustration img {
    max-width: 90vw;
    height: auto;
  }

  .cert-card {
    min-width: unset;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  .cert-icon-fa {
    font-size: 1.8rem;
  }

  .form-control {
    font-size: 1rem;
    padding: 0.6rem 0.8rem;
  }
}
