/* =============================================
   Import Normalize.css and Google Fonts
============================================= */
@import url('https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css');
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Inter:wght@400;500;700&display=swap');

/* =============================================
   Global Overflow Prevention & Smooth Scroll
============================================= */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
  scroll-behavior: smooth;
}

/* =============================================
   1. Root Variables
============================================= */
:root {
  --neon-cyan: #a4ddd9;
  --neon-purple: #948ccd;
  --bg-dark: #141418;
  --bg-dark-rgb: 20, 20, 24;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --text-light: #f8fafc;
  --text-dark: #081831;
  --accent-pink: #ec4899;
  --accent-orange: #f97316;
  --masculine-gradient-start: #31383c;
  --masculine-gradient-end: #0f5270;
  --masculine-box-shadow: rgba(44, 80, 104, 0.7);
}

/* =============================================
   2. Theme Modes & Overrides
============================================= */
body {
  background: var(--bg-dark);
  color: #fff;
  transition: background 0.3s, color 0.3s;
  padding: 0 1rem;
}

body.light-mode {
  --bg-dark: #f5f5f5;
  --neon-cyan: #364b97;
  --neon-purple: #8e44ad;
  background: var(--bg-dark);
  color: #333;
}

body.light-mode p,
body.light-mode h3 {
  color: #333 !important;
}
body.light-mode a {
  color: #1d5a83;
}

/* Light Mode Mobile Nav */
body.light-mode .mobile-nav {
  background: rgba(245, 245, 245, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}
body.light-mode .mobile-nav a {
  color: #333;
}
body.light-mode .mobile-nav a:hover,
body.light-mode .mobile-nav a:active {
  color: var(--neon-purple);
  background: rgba(0, 0, 0, 0.04);
}
body.light-mode .form-input {
  background: #fff;
  border: 1px solid #ccc;
  color: #333;
}
body.light-mode .contact-card {
  background: rgba(245, 245, 245, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #333;
  backdrop-filter: blur(18px) saturate(1.1);
}
body.light-mode footer {
  background: rgba(0, 0, 0, 0.03);
  color: #333;
}
body.light-mode .blogs-modal {
  background: rgba(245, 245, 245, 0.88);
  color: #333;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* Specific overrides for blog options in light mode */
body.light-mode .blogs-option h3 {
  color: #333;
}
body.light-mode .blogs-option p {
  color: #333;
}
body.light-mode .blogs-option .tech {
  color: #666;
}

/* Override links in specific components for better visibility in light mode */
body.light-mode .cyber-button,
body.light-mode .cyber-button:link,
body.light-mode .cyber-button:visited,
body.light-mode .github-link,
body.light-mode .github {
  color: #fff !important;
}

/* =============================================
   Glass Morphism for Sections (Dark & Light)
============================================= */
body:not(.light-mode) .intro,
body:not(.light-mode) #intro,
body:not(.light-mode) .content-section,
body:not(.light-mode) .subsection {
  background: rgba(var(--bg-dark-rgb), 0.88);
  backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 15px;
  padding: 2rem;
  margin: 2rem auto;
}
body.light-mode .intro,
body.light-mode #intro,
body.light-mode .content-section,
body.light-mode .subsection {
  background: rgba(245, 245, 245, 0.82);
  backdrop-filter: blur(18px) saturate(1.1);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 15px;
  padding: 2rem;
  margin: 2rem auto;
}

/* =============================================
   3. Global Resets & Typography
============================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}
a {
  color: var(--neon-cyan);
  text-decoration: none;
  position: relative;
  transition: color 0.3s, text-shadow 0.3s;
}
a:hover {
  color: var(--neon-purple);
}

/* =============================================
   4. Sections & Layout
============================================= */
section {
  min-height: 100vh;
  padding: 3rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.content-section,
#about,
#implementation {
  margin: 0 auto;
  max-width: 1200px;
  padding: 1rem;
  text-align: left;
}

/* =============================================
   5. About Me Section
============================================= */
#about {
  background: rgba(var(--bg-dark-rgb), 0.85);
  backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 15px;
  padding: 1.75rem 2rem 1.25rem;
  max-width: 580px;
  min-height: auto;
  margin: 2rem auto;
}
body.light-mode #about {
  background: rgba(245, 245, 245, 0.82);
  backdrop-filter: blur(18px) saturate(1.1);
  border: 1px solid rgba(0, 0, 0, 0.06);
}
#about h2 {
  margin-bottom: 0.75rem;
  font-size: 1.4rem;
}
#about p {
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

/* =============================================
   6. 3D Canvas Background (Animation Adjustments)
============================================= */
#math-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  opacity: 0.25;
  pointer-events: none;
  filter: brightness(1.1);
  will-change: transform, opacity;
}
body.light-mode #math-canvas {
  opacity: 0.15;
}

/* =============================================
   7. Navigation & Mobile Menu
============================================= */
.floating-nav {
  position: fixed;
  top: 2rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  border-radius: 50px;
  background: var(--glass-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}
.floating-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
  position: relative;
}
.floating-nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--neon-cyan);
  transition: width 0.3s;
}
.floating-nav a:hover::after {
  width: 100%;
}
.theme-toggle {
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--neon-cyan);
  transition: border-color 0.3s, color 0.3s, transform 0.3s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--neon-cyan);
  transform: rotate(15deg);
}
.moon-icon { display: block; }
.sun-icon  { display: none; }
body.light-mode .moon-icon { display: none; }
body.light-mode .sun-icon  { display: block; }
body.light-mode .theme-toggle {
  border-color: rgba(0, 0, 0, 0.15);
  color: var(--neon-purple);
}
body.light-mode .theme-toggle:hover {
  border-color: var(--neon-purple);
  transform: rotate(15deg);
}
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
  padding: 6px;
  justify-content: center;
  align-items: center;
}
.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--neon-cyan);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Navigation - Floating Card */
.mobile-nav {
  position: fixed;
  top: 3.5rem;
  right: 0.75rem;
  width: min(280px, calc(100vw - 2rem));
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  background: rgba(var(--bg-dark-rgb), 0.92);
  backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 0.75rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-12px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.mobile-nav.show {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.mobile-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  width: 100%;
  text-align: left;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: transparent;
  border: none;
  transition: background 0.2s ease, color 0.2s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.mobile-nav a:hover,
.mobile-nav a:active {
  color: var(--neon-cyan);
  background: rgba(255, 255, 255, 0.06);
}
.mobile-nav a::after {
  display: none;
}

/* Responsive: Show hamburger and hide regular nav links */
/* Nav fades when user scrolls */
.floating-nav.nav-faded {
  opacity: 0.4;
}
@media (max-width: 1068px) {
  .hamburger {
    display: flex;
  }
  .floating-nav a {
    display: none;
  }
  .floating-nav {
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    top: 0.75rem;
    right: 0.75rem;
  }
}

/* =============================================
   8. Button Styles
============================================= */
.cyber-button,
.cyber-button:link,
.cyber-button:visited {
  text-decoration: none;
  color: #fff;
}
.cyber-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  background: linear-gradient(45deg, var(--masculine-gradient-start), var(--masculine-gradient-end));
  border: none;
  font-weight: 700;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  margin: 1rem;
  box-shadow: 0 0 10px var(--masculine-box-shadow);
}
.cyber-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px var(--masculine-box-shadow);
}
.back-button {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  background: linear-gradient(45deg, var(--masculine-gradient-start), var(--masculine-gradient-end));
  border: none;
  color: #fff;
  font-weight: 700;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 10px var(--masculine-box-shadow);
}
.back-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px var(--masculine-box-shadow);
}

/* =============================================
   9. Contact Section
============================================= */
#contact {
  position: relative;
  padding-bottom: 3rem;
  margin-top: 3rem;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto;
}
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
.contact-card {
  background: rgba(var(--bg-dark-rgb), 0.82);
  padding: 2rem;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.3s;
  backdrop-filter: blur(16px) saturate(1.2);
}
.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
}
.contact-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--neon-cyan);
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}
.form-input {
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 5px;
  transition: all 0.3s;
}
.form-input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

/* =============================================
   10. Blogs Modal
============================================= */
.blogs-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  display: block;
  opacity: 0;
  pointer-events: none;
  width: 80%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem;
  border-radius: 15px;
  z-index: 1001;
  background: rgba(var(--bg-dark-rgb), 0.92);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px) saturate(1.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
body.light-mode .blogs-modal {
  background: rgba(245, 245, 245, 0.88);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #222;
  backdrop-filter: blur(24px) saturate(1.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}
.modal-active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}
.blogs-modal::-webkit-scrollbar {
  width: 8px;
}
.blogs-modal::-webkit-scrollbar-thumb {
  background: var(--neon-cyan);
  border-radius: 4px;
}
.blogs-modal::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}
.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  color: var(--neon-cyan);
  cursor: pointer;
  transition: color 0.3s;
}
.close-modal:hover {
  color: var(--neon-purple);
}
.blogs-options {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.blogs-option {
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.05) 100%);
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s, border 0.3s;
  border: 1px solid transparent;
  position: relative;
  padding: 1.5rem;
}
.blogs-option h3 {
  margin-bottom: 0.75rem;
  color: var(--neon-cyan);
  font-weight: 600;
}
.blogs-option p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
  color: #ddd;
}
.blogs-option .tech {
  font-size: 0.8rem;
  color: #aaa;
  margin-top: 0.5rem;
}
.blogs-option:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.15);
  transform: translateY(-3px);
}
.github-link {
  font-size: 0.85rem;
  background: linear-gradient(45deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  transition: background 0.3s, transform 0.3s, text-shadow 0.3s;
}

.github-link:hover {
  transform: scale(1.03);
  filter: brightness(1.1);
}

.github {
  font-size: 0.85rem;
  background: linear-gradient(45deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  transition: background 0.3s;
}

/* =============================================
   11. Footer
============================================= */
footer {
  text-align: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  margin-top: 2rem;
}
.duck-button {
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--neon-cyan);
  position: absolute;
  top: 1rem;
  right: 1rem;
  transition: color 0.3s;
}
.duck-button:hover {
  color: var(--neon-purple);
}

/* =============================================
   12. Animations & Effects
============================================= */
.dots {
  display: inline-block;
  margin-left: 0.5rem;
}
.dots span {
  display: inline-block;
  font-weight: bold;
  animation: bounce 1.5s infinite;
}
.dots span:nth-child(1) { animation-delay: 0s; }
.dots span:nth-child(2) { animation-delay: 0.3s; }
.dots span:nth-child(3) { animation-delay: 0.6s; }
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.floating {
  animation: float 3s ease-in-out infinite;
}

/* =============================================
   13. Placeholder Container
============================================= */
.placeholder-container {
  position: relative;
  z-index: 2;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--neon-cyan);
  pointer-events: none;
}

/* =============================================
   14. Extended Content Sections
============================================= */
.content-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  text-align: left;
  margin-top: 2rem;
  line-height: 1.7;
}
.content-section img {
  max-width: 100%;
  border-radius: 10px;
  margin: 2rem 0;
}

/* =============================================
   15. Code Snippet Styling
============================================= */
.code-snippet {
  background: #1e1e1e;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
  width: 100%;
  box-sizing: border-box;
}
.code-snippet pre {
  margin: 0;
  font-family: "Courier New", Courier, monospace;
  color: #f8f8f2;
  white-space: pre-wrap;
  word-wrap: break-word;
  word-break: break-all;
  text-align: left;
}

/* =============================================
   16. Subsection Styling
============================================= */
.subsection {
  margin-top: 2rem;
}
.subsection h3 {
  margin-bottom: 0.75rem;
  color: var(--neon-purple);
}
.subsection p {
  margin-bottom: 1rem;
}

/* =============================================
   17. Data Visualization Chart Adjustments
   (Specific styling for #vitalsChart only)
============================================= */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
#math-canvas {
  will-change: transform, opacity;
}


/* =============================================
   18. Certification Section Styling
============================================= */
#certifications {
  padding: 4rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
#certifications h2 {
  font-size: 2.5rem;
  color: var(--text-light);
  margin-bottom: 3rem;
  text-align: center;
  transition: color 0.3s ease;
}
.certification-card {
  background: rgba(var(--bg-dark-rgb), 0.75);
  padding: 2rem;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.certification-card h3 {
  color: var(--text-light);
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
  line-height: 1.3;
  min-height: 3.5rem;
  transition: color 0.3s ease;
}
.certification-card p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  flex-grow: 1;
  transition: color 0.3s ease;
}
.certification-card .cyber-button {
  align-self: flex-start;
  margin-top: auto;
  transition: transform 0.3s ease;
}
body.light-mode #certifications h2 {
  color: var(--text-dark);
}
body.light-mode .certification-card {
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.1);
}
body.light-mode .certification-card h3 {
  color: var(--text-dark);
}
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  padding: 1rem;
}
@media (max-width: 1024px) {
  .certifications-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
  }
}
@media (max-width: 768px) {
  #certifications h2 {
    font-size: 2rem;
    margin-bottom: 2.5rem;
  }
  .certification-card {
    padding: 1.5rem;
  }
  .certification-card h3 {
    font-size: 1.3rem;
    min-height: auto;
    margin-bottom: 1rem;
  }
  .certification-card p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }
}
@media (max-width: 480px) {
  .certifications-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .certification-card {
    padding: 1.25rem;
  }
  #certifications h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
  }
}
.certification-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(102, 217, 239, 0.15);
  border-color: rgba(102, 217, 239, 0.3);
}
.certification-card:hover .cyber-button {
  transform: translateY(-2px);
}
.certification-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(164,221,217,0.25);
  border-color: rgba(164,221,217,0.3);
}
.certification-card:hover .cyber-button {
  transform: translateY(-2px);
}

/* =============================================
   20. Overrides for Contact Form & Code Snippet Responsiveness
============================================= */
.contact-form .cyber-button {
  position: static;
  margin-top: 1rem;
}

/* =============================================
   21. Additional Responsive Adjustments (Max-Width 480px)
============================================= */
@media (max-width: 480px) {
  body {
    font-size: 0.9rem;
  }
  .contact-form,
  .content-section,
  #implementation {
    padding: 0 1rem;
    margin-top: 1rem;
  }
  #about {
    padding: 1.5rem 1.25rem;
    margin-top: 1rem;
  }
  .code-snippet {
    font-size: 0.85rem;
    padding: 0.75rem;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .contact-card {
    padding: 1rem;
  }
  .mobile-nav a {
    font-size: 0.9rem;
  }
}

/* =============================================
   22. Specific Mobile Optimizations for iPhone 14 / Small 6-inch Screens
============================================= */
@media (max-width: 480px) {
  #home h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 1.8rem;
  }
  p, li, .subsection p {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  .content-section {
    padding: 0 0.5rem;
    margin-top: 1rem;
  }
  .code-snippet {
    padding: 0.75rem;
  }
  img {
    max-width: 100%;
    height: auto;
  }
}

/* =============================================
   23. Smooth Scroll & Scrollbar Styling
============================================= */
html {
  scroll-behavior: smooth;
}
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}
::-webkit-scrollbar-thumb {
  background: var(--neon-cyan);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--neon-purple);
}


/* =============================================
   24. Images
============================================= */

/* =============================================
   25. Social Icons
============================================= */
.social-icons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  font-size: 1.6rem;
  margin-top: 0.5rem;
}
.social-icons a {
  color: var(--neon-cyan);
  transition: color 0.3s;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.social-icons a:hover {
  color: var(--neon-purple);
}

/* =============================================
   26. Blog Wrapper (single glass card for entire blog)
============================================= */
.blog-wrapper {
  background: rgba(var(--bg-dark-rgb), 0.88);
  backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 15px;
  padding: 2.5rem 3rem;
  margin: 2rem auto;
  max-width: 900px;
  text-align: left;
  line-height: 1.8;
}
body.light-mode .blog-wrapper {
  background: rgba(245, 245, 245, 0.82);
  border: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(18px) saturate(1.1);
}
/* Override individual card glass effect inside wrapper */
body:not(.light-mode) .blog-wrapper .content-section {
  background: none;
  backdrop-filter: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0 0 2.5rem 0;
}
body.light-mode .blog-wrapper .content-section {
  background: none;
  backdrop-filter: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0 0 2.5rem 0;
}
/* Section headings inside blog - left aligned, numbered, subtle divider */
.blog-wrapper h2 {
  text-align: left;
  color: var(--neon-cyan);
  font-size: 1.4rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
body.light-mode .blog-wrapper h2 {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
/* Subheadings inside blog */
.blog-wrapper h3 {
  text-align: left;
  color: var(--neon-purple);
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
/* Paragraphs inside blog */
.blog-wrapper p {
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.8;
}
@media (max-width: 768px) {
  .blog-wrapper {
    padding: 1.5rem 1.25rem;
    margin: 1rem auto;
  }
}

/* =============================================
   27. Blog Table of Contents
============================================= */
.blog-toc {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1.5rem 2rem;
  margin: 0 0 2.5rem 0;
}
.blog-toc h3 {
  color: var(--neon-cyan);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
.blog-toc ol {
  list-style: none;
  counter-reset: toc-counter;
  padding: 0;
}
.blog-toc ol li {
  counter-increment: toc-counter;
  margin-bottom: 0.4rem;
}
.blog-toc ol li a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.95rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.blog-toc ol li a::before {
  content: counter(toc-counter, decimal-leading-zero);
  color: var(--neon-cyan);
  font-weight: 700;
  font-size: 0.85rem;
  min-width: 1.5rem;
}
.blog-toc ol li a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--neon-cyan);
}
.blog-toc ol ol {
  margin-left: 2rem;
  margin-top: 0.3rem;
  counter-reset: toc-sub-counter;
}
.blog-toc ol ol li {
  counter-increment: toc-sub-counter;
}
.blog-toc ol ol li a::before {
  content: counter(toc-counter, decimal-leading-zero) "." counter(toc-sub-counter, upper-alpha);
  font-size: 0.8rem;
}
body.light-mode .blog-toc {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
}
body.light-mode .blog-toc ol li a {
  color: #333;
}
body.light-mode .blog-toc ol li a:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* =============================================
   28. Blog Images
============================================= */
.blog-img {
  max-width: 100%;
  border-radius: 12px;
  margin: 1.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
body.light-mode .blog-img {
  border: 1px solid rgba(0, 0, 0, 0.1);
}
body.light-mode .blog-img svg {
  background: rgba(230, 234, 242, 0.9) !important;
}
body.light-mode .blog-img svg text[fill="#f8fafc"],
body.light-mode .blog-img svg text[fill="#f8f8f2"] {
  fill: #1e293b;
}
body.light-mode .blog-img svg text[fill="#94a3b8"] {
  fill: #475569;
}
body.light-mode .blog-img svg text[fill="#948ccd"] {
  fill: #6d28d9;
}
body.light-mode .blog-img svg text[fill="#a4ddd9"] {
  fill: #0e7490;
}
body.light-mode .blog-img svg line[stroke="#334155"] {
  stroke: #94a3b8;
}
body.light-mode .blog-img svg rect[stroke="#948ccd"] {
  stroke: #7c3aed;
}
body.light-mode .blog-img svg rect[stroke="#a4ddd9"] {
  stroke: #0891b2;
}

/* =============================================
   29. Blog Section Anchors
============================================= */
.blog-section {
  scroll-margin-top: 5rem;
}

/* =============================================
   30. Blogs Modal - Clean card style
============================================= */
.blogs-options {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 1rem;
}
.blogs-option {
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s;
  padding: 1.2rem 0.5rem;
}
.blogs-option:last-child {
  border-bottom: none;
}
.blogs-option:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: none;
  transform: none;
}
.blogs-option h3 {
  margin-bottom: 0.4rem;
  color: var(--neon-cyan);
  font-weight: 600;
  font-size: 1.05rem;
}
.blogs-option p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #aaa;
  margin: 0;
}
body.light-mode .blogs-option {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}
body.light-mode .blogs-option:hover {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 10px;
}

/* =============================================
   29. Images
============================================= */
.illustration-container {
  text-align: center;
  margin-bottom: 25px; /* Adds space before the next element */
}

.illustration-container img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.illustration-container figcaption {
  margin-top: 5px; /* Small space under the image */
}

.caption, .credit {
  font-size: 14px;
  color: #717171;
  margin: 3px 0; /* Keeps both captions close together */
}

.credit {
  margin-bottom: 10px; /* Extra space before next elements */
}
