/* Import Roboto font */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* Global theme transition variable and modern CSS custom properties */
:root {
  --theme-transition: background-color 0.4s cubic-bezier(0.19, 1, 0.22, 1), 
                      color 0.4s cubic-bezier(0.19, 1, 0.22, 1), 
                      border-color 0.4s cubic-bezier(0.19, 1, 0.22, 1), 
                      box-shadow 0.4s cubic-bezier(0.19, 1, 0.22, 1),
                      filter 0.4s cubic-bezier(0.19, 1, 0.22, 1),
                      opacity 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  
  /* Navigation spacing variables */
  --nav-height: 60px;
  --nav-padding-inline: clamp(1rem, 4vw, 2rem);
  --nav-gap: clamp(1rem, 3vw, 2rem);
  --nav-item-padding: clamp(0.75rem, 2vw, 1rem);
  --nav-border-radius: 0.25rem;
  
  /* Icon sizing */
  --icon-size: clamp(22px, 3vw, 26px);
  
  /* Font sizing */
  --brand-font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  --nav-font-size: clamp(0.9rem, 2vw, 1rem);
  
  /* Color accent variables */
  --accent-primary: #6366f1;
  --accent-primary-hover: #5b5bd6;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  
  /* Theme toggle button variables */
  --toggle-size: clamp(28px, 3.5vw, 32px);
  --toggle-border-radius: 6px;
}

/* body, text and connect ul */
body {
  overflow-x: hidden;  
  font-family: "Roboto", sans-serif;
  font-weight: 300;
  margin: 0;
  padding: 0;
  transition: var(--theme-transition);
  /* Hide scrollbar for all browsers */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
  overflow-y: scroll;
}

/* Theme transitioning class */
.theme-transitioning * {
  transition: var(--theme-transition) !important;
}

/* Hide scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar {
  display: none;
}

/* Hide all scrollbars */
::-webkit-scrollbar {
  width: 0;
  height: 0;
  background-color: transparent;
  display: none;
}

/* Global image transitions for dark/light mode */
img {
  transition: var(--theme-transition);
}

/* For images with dark/light variants */
img.theme-aware-image {
  transition: opacity 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.dark-mode img.light-mode-image,
.light-mode img.dark-mode-image {
  opacity: 0;
  position: absolute;
}

.dark-mode img.dark-mode-image,
.light-mode img.light-mode-image {
  opacity: 1;
  position: relative;
}

/* Image container for theme-aware images */
.theme-aware-container {
  position: relative;
  display: inline-block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Roboto", sans-serif;
  font-weight: 300;
  margin: 0 0 0.5em;
}

h1 {
  font-size: 3em;
  text-align: center;
}

h2 {
  font-size: clamp(3rem, 8vw, 6.25rem);
  text-align: left;
  margin: 0;
  color: inherit; /* Ensure no blue text in hero section */
}

h3 {
  padding: 20px;
}

h4 {
  font-size: 1.5em;
}

p {
  font-family: "Roboto", sans-serif;
  font-weight: 300;
}

ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

/* Theme styles */
body.dark-mode, body.dark-mode .topnav {
  background-color: #000;
  color: #C8C8C8;  
}

body.light-mode, body.light-mode .topnav {
  background-color: #ffffff;
  color: #000;  
}

body.dark-mode .topnav a {
  color: #C8C8C8;  
}

body.light-mode .topnav a {
  color: #000; 
}

/* Navigation styles - Modern CSS Layout with Container Queries Support */
.topnav-container {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(99, 102, 241, 0.1);
  container-type: inline-size;
  transition: var(--theme-transition), box-shadow 0.3s ease;
}

.dark-mode .topnav-container {
  background-color: rgba(0, 0, 0, 0.85);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(99, 102, 241, 0.1);
  border-bottom-color: rgba(99, 102, 241, 0.3);
}

.light-mode .topnav-container {
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 20px rgba(99, 102, 241, 0.08), 0 0 0 1px rgba(99, 102, 241, 0.05);
  border-bottom-color: rgba(99, 102, 241, 0.15);
}

.topnav {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  min-height: var(--nav-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "brand navigation actions";
  align-items: center;
  gap: var(--nav-gap);
  transition: var(--theme-transition);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  padding-inline: var(--nav-padding-inline);
  padding-block: 0.25rem;
  box-sizing: border-box;
}

.topnav a {
  display: flex;
  align-items: center;
  padding-inline: var(--nav-item-padding);
  min-height: var(--nav-height);
  text-decoration: none;
  font-size: var(--nav-font-size);
  transition: var(--theme-transition), transform 0.4s cubic-bezier(0.19, 1, 0.22, 1), box-shadow 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  border-radius: var(--nav-border-radius);
}

.dark-mode .topnav a:hover {
  background-color: rgba(99, 102, 241, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.dark-mode .topnav a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  background-color: rgba(99, 102, 241, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.light-mode .topnav a:hover {
  background-color: rgba(99, 102, 241, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.light-mode .topnav a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  background-color: rgba(99, 102, 241, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

/* Navigation sections */
.left-section {
  grid-area: brand;
  display: flex;
  align-items: center;
  justify-self: start;
}

#leftname {
  font-size: var(--brand-font-size);
  font-weight: 500;
  white-space: nowrap;
  background: var(--accent-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: var(--theme-transition), opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#leftname:hover {
  opacity: 0.8;
  transform: scale(1.05);
  filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.6)) drop-shadow(0 2px 4px rgba(139, 92, 246, 0.4));
}

.wrapper {
  grid-area: navigation;
  display: contents;
}

.middle-section {
  grid-area: navigation;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.25rem, 1vw, 0.5rem);
}

.middle-section a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Improved menu hover effect with accent colors */
.middle-section a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.4s ease;
  transform-origin: center;
}

.middle-section a:hover::after {
  transform: scaleX(1);
  opacity: 1;
}

.middle-section a.active::after {
  transform: scaleX(1);
  opacity: 1;
}

.middle-section a.active {
  color: var(--accent-primary);
}

.right-section {
  grid-area: actions;
  display: flex;
  align-items: center;
  justify-self: end;
  gap: clamp(0.25rem, 1vw, 0.5rem);
}

/* Icons */
.right-section a {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  transition: var(--theme-transition), transform 0.3s ease;
}

.right-section a:hover {
  transform: translateY(-1px);
}

.right-section a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.15);
}

/* Theme toggle button specific styling */
.darklight-icons {
  width: var(--toggle-size);
  height: var(--toggle-size);
  border-radius: var(--toggle-border-radius);
  background: transparent;
  border: none;
  transition: var(--theme-transition), transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), background-color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.darklight-icons:hover {
  transform: translateY(-1px);
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.15);
}

/* Menu button styling for mobile */
.menu-icons {
  width: var(--toggle-size);
  height: var(--toggle-size);
  border-radius: var(--toggle-border-radius);
  background: transparent;
  border: none;
  transition: var(--theme-transition), transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), background-color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.menu-icons:hover {
  transform: translateY(-1px);
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.15);
}

/* Icon sizing adjustments for new button design */

#white-search, #black-search, 
#moon-image, #sun-image, 
#white-menu, #black-menu {
  height: calc(var(--toggle-size) * 0.6);
  width: calc(var(--toggle-size) * 0.6);
  transition: var(--theme-transition);
}

/* Icon visibility based on theme */
.dark-mode #black-search, 
.light-mode #white-search, 
.dark-mode #sun-image, 
.light-mode #moon-image {
  display: none;
}

/* Mobile menu button - hidden by default on larger screens */
.menu-icons {
  display: none !important;
  pointer-events: none;
}

/* Mobile styles */
.hamburger {
  display: none;
}

/* Separate offscreen menu */
.side-menu-container {
  position: fixed;
  top: 0;
  right: -250px; /* Start offscreen */
  width: 250px;
  height: 100%;
  z-index: 1001;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.dark-mode .side-menu-container {
  background-color: #111;
  border-left: 1px solid #333;
}

.light-mode .side-menu-container {
  background-color: #f8f8f8;
  border-left: 1px solid #ddd;
}

.side-menu-container.menu-show {
  right: 0;
}

.side-menu-header {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.2);
  user-select: none; /* Disable text selection */
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* IE/Edge */
}

.side-menu-header h3 {
  user-select: none; /* Disable text selection */
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* IE/Edge */
}

.side-menu-close {
  cursor: pointer;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-menu-content {
  padding: 20px 0;
  display: flex;
  flex-direction: column;
}

.side-menu-content a {
  display: block;
  padding: 15px 20px;
  text-decoration: none;
  font-size: 18px;
  border-left: 3px solid transparent;
  transition: var(--theme-transition);
}

.dark-mode .side-menu-content a {
  color: #C8C8C8;
}

.light-mode .side-menu-content a {
  color: #000;
}

.dark-mode .side-menu-content a:hover {
  background-color: #222;
  border-left: 3px solid #6366f1;
}

.light-mode .side-menu-content a:hover {
  background-color: #eee;
  border-left: 3px solid #6366f1;
}

/* Menu overlay */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.visible {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 750px) {
  .topnav {
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand actions";
    padding-inline: clamp(0.75rem, 3vw, 1rem);
  }
  
  .menu-icons {
    display: flex !important;
    pointer-events: auto;
  }
  
  .middle-section {
    display: none;
  }
  
  .wrapper {
    display: none;
  }
  
  /* Adjust right section gap for mobile */
  .right-section {
    gap: clamp(0.5rem, 2vw, 0.75rem);
  }
  
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
  }
  
  .hamburger span {
    width: 24px;
    height: 3px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
  }
  
  .dark-mode .hamburger span {
    background: #C8C8C8;
  }
  
  .light-mode .hamburger span {
    background: #000;
  }
  
  /* Menu toggle icons */
  .dark-mode #white-menu, 
  .light-mode #black-menu {
    display: block;
  }
  
  .dark-mode #black-menu, 
  .light-mode #white-menu {
    display: none;
  }
}

/* Additional responsive adjustments */
@media (min-width: 751px) and (max-width: 1000px) {
  .topnav {
    padding-inline: clamp(0.75rem, 3vw, 1.25rem);
    gap: clamp(0.75rem, 2vw, 1.5rem);
  }
}

/* Handle smaller mobile devices */
@media (max-width: 380px) {
  .topnav {
    padding-inline: 0.5rem;
    gap: 0.5rem;
  }
  
  .right-section {
    gap: 0.5rem;
  }
  
  /* Slightly smaller buttons on very small screens */
  :root {
    --toggle-size: 26px;
  }
}

/* Page transition effect */
#fader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  pointer-events: none;
  background-color: #000;
  animation-duration: 300ms;
  animation-timing-function: ease-in-out;
  transition: var(--theme-transition);
}

.light-mode #fader {
  background-color: #fff;
  transition: var(--theme-transition);
}

@keyframes fade-out {
  from { opacity: 1 }
  to { opacity: 0 }
}

@keyframes fade-in {
  from { opacity: 0 }
  to { opacity: 1 }
}

#fader.fade-out {
  opacity: 0;
  animation-name: fade-out;
}

#fader.fade-in {
  opacity: 1;
  animation-name: fade-in;
}

/* Blog section - Enhanced with search and tags */
.blog-section {
  width: 95%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
  transition: background-color 0.3s, color 0.3s;
  position: relative;
  overflow: hidden;
}

/* Blog Controls */
.blog-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
  align-items: center;
}

/* Search Container */
.search-container {
  width: 100%;
  max-width: 500px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 25px;
  padding: 12px 20px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.dark-mode .search-box {
  background: rgba(40, 40, 40, 0.8);
  border-color: rgba(99, 102, 241, 0.5);
}

.light-mode .search-box {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(99, 102, 241, 0.3);
}

.search-box:focus-within {
  border-color: #6366f1;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
}

.search-box.focused {
  border-color: #6366f1;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.search-icon {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

/* Theme-aware search icons */
.dark-mode .search-icon.light-mode-image {
  display: none;
}

.dark-mode .search-icon.dark-mode-image {
  display: block;
}

.light-mode .search-icon.light-mode-image {
  display: block;
}

.light-mode .search-icon.dark-mode-image {
  display: none;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 16px;
  color: inherit;
  transition: var(--theme-transition);
}

.search-input::placeholder {
  color: rgba(128, 128, 128, 0.7);
  transition: var(--theme-transition);
}

.clear-search {
  background: none;
  border: none;
  color: rgba(128, 128, 128, 0.7);
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
}

.clear-search.visible {
  opacity: 1;
  visibility: visible;
}

.clear-search:hover {
  background: rgba(128, 128, 128, 0.2);
  color: rgba(128, 128, 128, 0.9);
}

/* Tag Filters */
.tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 100%;
}

.tag-filter {
  background: rgba(99, 102, 241, 0.1);
  border: 2px solid rgba(99, 102, 241, 0.3);
  color: #6366f1;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  white-space: nowrap;
}

.dark-mode .tag-filter {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
}

.light-mode .tag-filter {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
}

.tag-filter:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: #6366f1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.tag-filter.active {
  background: #6366f1;
  border-color: #6366f1;
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.tag-filter.active:hover {
  background: #5b5bd6;
  transform: translateY(-1px);
}

/* Blog Header with Tags */
.blog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.blog-header h3 {
  margin: 0;
  flex: 1;
  min-width: 200px;
  text-align: left;
}

.blog-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  min-width: fit-content;
}

.tag {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.tag.projects {
  background: rgba(99, 102, 241, 0.2);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.tag.updates {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.tag.coding {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tag.video {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.tag.school {
  background: rgba(168, 85, 247, 0.2);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

/* No Results */
.no-results {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  text-align: center;
}

.no-results-content h3 {
  margin-bottom: 10px;
  color: #6366f1;
}

.no-results-content p {
  opacity: 0.7;
  margin: 0;
}



.blog-section .section-heading {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.blog-section h1 {
  font-size: 2.5rem;
  font-weight: 500;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.blog-section h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

/* Blog Container with Fixed Height */
.blog-container-wrapper {
  position: relative;
  max-width: 90%;
  width: 1200px;
  margin: 0 auto 50px;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: var(--theme-transition);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Progress bar for blog scroll position */
.blog-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 0;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  z-index: 10;
  transition: width 0.1s ease;
  border-radius: 4px 0 0 0;
}

.dark-mode .blog-progress-bar {
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}

.light-mode .blog-progress-bar {
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}

.blog-container-wrapper:hover {
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}

.dark-mode .blog-container-wrapper {
  background-color: rgba(30, 30, 30, 0.6);
  border: 1px solid rgba(70, 70, 70, 0.5);
}

.light-mode .blog-container-wrapper {
  background-color: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.blog-container {
  width: 100%;
  max-width: 100%;
  max-height: 450px;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-right: 10px; /* Reduced padding for better centering */
  transition: var(--theme-transition);
  align-items: center;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.blog-container::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.blog-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}

.blog-container::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.5);
  border-radius: 10px;
  transition: background 0.3s ease;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.blog-container::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.8);
  background-clip: padding-box;
}

.dark-mode .blog-container::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.7);
}

.light-mode .blog-container::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.7);
}

.blog-card {
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: var(--theme-transition), transform 0.3s ease;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.blog-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  border-left: 3px solid #6366f1;
}

.dark-mode .blog-card {
  background-color: rgba(40, 40, 40, 0.7);
  border: 1px solid rgba(70, 70, 70, 0.5);
  border-left: 3px solid transparent;
}

.light-mode .blog-card {
  background-color: #f8f9fa;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-left: 3px solid transparent;
}

.dark-mode .blog-card:hover {
  background-color: rgba(50, 50, 50, 0.8);
  border-left: 3px solid #6366f1;
}

.light-mode .blog-card:hover {
  background-color: white;
  border-left: 3px solid #6366f1;
}

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

.blog-content h3 {
  margin-top: 0;
  position: relative;
  display: inline-block;
  margin-bottom: 15px;
  transition: var(--theme-transition);
}

.blog-content h3::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  transition: width 0.3s ease;
}

.blog-card:hover .blog-content h3::after {
  width: 100%;
}

/* Hide blog cards when filtered out */
.blog-card.hidden {
  display: none;
}

/* Animation for filtered cards */
.blog-card {
  animation: fadeInUp 0.5s ease forwards;
  transition: all 0.3s ease;
}



@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced tag hover effects */
.tag:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Search box enhanced focus */
.search-box:focus-within .search-icon {
  opacity: 1;
  transform: scale(1.1);
}

/* Tag filter enhanced interactions */
.tag-filter:active {
  transform: translateY(0) scale(0.95);
}

.dark-mode .blog-content h3 {
  color: #ffffff;
}

.light-mode .blog-content h3 {
  color: #222222;
}

.date {
  font-size: 0.9rem;
  margin-bottom: 10px;
  opacity: 0.7;
  transition: var(--theme-transition);
}

.dark-mode .date {
  color: #bbbbbb;
}

.light-mode .date {
  color: #555555;
}

.date span {
  font-weight: 500;
  transition: var(--theme-transition);
}

.dark-mode .date span {
  color: #8b5cf6;
}

.light-mode .date span {
  color: #6366f1;
}

.summary {
  line-height: 1.6;
  margin-bottom: 0;
  font-size: 0.95rem;
  transition: var(--theme-transition);
}

.dark-mode .summary {
  color: #C8C8C8;
}

.light-mode .summary {
  color: #333333;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hide scrollbars from all scrollable elements while maintaining scroll functionality */
.scrollable-gallery {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer and Edge */
}

.scrollable-gallery::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none; /* Chrome, Safari, Opera */
}

/* Responsive adjustments for blog section */
@media (max-width: 900px) {
  .blog-container {
    height: 500px;
    padding: 20px;
  }
  
  .blog-section h1 {
    font-size: 2.2rem;
  }
  
  .blog-controls {
    margin-bottom: 25px;
  }
}

@media (max-width: 767px) {
  .blog-container {
    height: 400px;
    padding: 15px;
  }
  
  .blog-section {
    width: 98%;
    padding: 15px 0;
  }
  
  .blog-section h1 {
    font-size: 2rem;
    margin-bottom: 10px;
  }
  
  .blog-content h3 {
    font-size: 1.3rem;
  }
  
  .blog-card {
    padding: 15px;
  }
  
  .summary {
    font-size: 0.95rem;
  }
  
  .blog-container-wrapper {
    width: 98%;
    padding: 20px;
  }
  
  .blog-controls {
    margin-bottom: 20px;
  }
  
  .search-container {
    max-width: 100%;
  }
  
  .search-box {
    padding: 10px 16px;
  }
  
  .search-input {
    font-size: 14px;
  }
  
  .tag-filters {
    gap: 8px;
    justify-content: center;
  }
  
  .tag-filter {
    padding: 6px 12px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .blog-section {
    width: 100%;
    padding: 10px 0;
  }
  
  .blog-section h1 {
    font-size: 1.8rem;
  }
  
  .blog-container-wrapper {
    width: 95%;
    padding: 15px;
    margin-bottom: 30px;
  }
  
  .blog-container {
    height: 350px;
    padding: 10px;
  }
  
  .blog-card {
    padding: 12px;
  }
  
  .blog-content h3 {
    font-size: 1.2rem;
  }
  
  .summary {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  
  .date {
    font-size: 0.85rem;
  }
  
  .blog-controls {
    gap: 12px;
    margin-bottom: 15px;
  }
  
  .search-box {
    padding: 8px 14px;
  }
  
  .search-input {
    font-size: 13px;
  }
  
  .search-icon {
    width: 18px;
    height: 18px;
    margin-right: 10px;
  }
  
  .tag-filters {
    gap: 6px;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .tag-filters::-webkit-scrollbar {
    display: none;
  }
  
  .tag-filter {
    flex-shrink: 0;
    padding: 5px 10px;
    font-size: 12px;
  }
  
  .blog-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .blog-header h3 {
    min-width: auto;
    width: 100%;
    font-size: 1.1rem;
  }
  
  .blog-tags {
    gap: 4px;
  }
  
  .tag {
    padding: 2px 8px;
    font-size: 10px;
  }
}

/* Hide scrollbars for all browsers while maintaining scroll functionality */
html {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

html::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Apply to all elements with scrollbars */
* {
  scrollbar-width: none;
}

*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* Blog scroll indicators with improved transitions */
.blog-container-wrapper {
  position: relative;
  transition: box-shadow 0.4s ease;
}

.blog-container-wrapper.scrolling {
  transition: box-shadow 0.2s ease;
}

.blog-container-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to top, rgba(0,0,0,0.15), transparent);
  pointer-events: none;
  border-radius: 0 0 12px 12px;
  opacity: 0.8;
  z-index: 1;
  transition: opacity 0.3s ease, background 0.3s ease;
}

.blog-container-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15), transparent);
  pointer-events: none;
  border-radius: 12px 12px 0 0;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.3s ease;
  z-index: 1;
}

.dark-mode .blog-container-wrapper::after {
  background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
}

.dark-mode .blog-container-wrapper::before {
  background: linear-gradient(to bottom, rgba(0,0,0,0.3), transparent);
}

.light-mode .blog-container-wrapper::after {
  background: linear-gradient(to top, rgba(0,0,0,0.05), transparent);
}

.light-mode .blog-container-wrapper::before {
  background: linear-gradient(to bottom, rgba(0,0,0,0.05), transparent);
}

/* Show top scroll indicator when scrolled down */
.blog-container-wrapper.scrolled-down::before {
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

/* Skills Section - Enhanced with blog-style tags */
.skills-container {
  width: 95%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 0;
  transition: background-color 0.3s, color 0.3s;
}

.skills-header {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.skills-header h2 {
  font-size: 2.5rem;
  font-weight: 500;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.skills-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.skills-header p {
  font-size: 1.1rem;
  opacity: 0.8;
  margin: 0;
}

/* Skill Tag Filters - Matching blog style */
.skill-tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 100%;
  margin-bottom: 30px;
}

.skill-tag-filter {
  background: rgba(99, 102, 241, 0.1);
  border: 2px solid rgba(99, 102, 241, 0.3);
  color: #6366f1;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  white-space: nowrap;
}

.dark-mode .skill-tag-filter {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
}

.light-mode .skill-tag-filter {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
}

.skill-tag-filter:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: #6366f1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.skill-tag-filter.active {
  background: #6366f1;
  border-color: #6366f1;
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.skill-tag-filter.active:hover {
  background: #5b5bd6;
  transform: translateY(-1px);
}

.skill-tag-filter:active {
  transform: translateY(0) scale(0.95);
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  backdrop-filter: blur(10px);
}

.dark-mode .skill-item {
  background: rgba(40, 40, 40, 0.6);
  border-color: rgba(70, 70, 70, 0.3);
}

.light-mode .skill-item {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.08);
}

.skill-item:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: #6366f1;
}

.skill-item.active {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2);
}

.skill-item img {
  width: 50px;
  height: 50px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.skill-item:hover img {
  transform: scale(1.1);
}

.skill-item span {
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  color: inherit;
  transition: var(--theme-transition);
}

/* Animation classes for skills */
.skill-fade-in {
  opacity: 0;
  transform: translateY(20px);
}

.skill-animating-in {
  opacity: 0;
  transform: translateY(20px);
}

.skill-animating-out {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.skill-click {
  animation: skill-pulse 0.3s ease;
}

@keyframes skill-pulse {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.1); }
  100% { transform: translateY(0) scale(1); }
}

.category-click {
  animation: button-pulse 0.3s ease;
}

@keyframes button-pulse {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.05); }
  100% { transform: translateY(0) scale(1); }
}

.deactivating {
  opacity: 0.7;
}

/* Projects Display */
.projects-display {
  margin-top: 20px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  will-change: opacity, max-height;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.projects-display.active {
  opacity: 1;
  overflow: visible;
  padding: 20px 0;
}

.projects-display.activating {
  animation: slide-up 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.projects-display.deactivating {
  overflow: hidden;
}

.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.project-cards.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes slide-up {
  0% { transform: translateY(30px); }
  100% { transform: translateY(0); }
}

.project-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(70, 70, 70, 0.3);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.dark-mode .project-card {
  background: rgba(40, 40, 40, 0.7);
  border-color: rgba(70, 70, 70, 0.5);
}

.light-mode .project-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.08);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: #6366f1;
}

.project-card h3 {
  margin: 0 0 10px 0;
  color: #6366f1;
  font-size: 1.2rem;
}

.project-card p {
  margin: 0 0 15px 0;
  opacity: 0.8;
  line-height: 1.5;
}

.project-card a {
  color: #6366f1;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.project-card a:hover {
  color: #5b5bd6;
}

/* Mobile Responsive Skills */
@media (max-width: 768px) {
  .skills-container {
    width: 98%;
    padding: 30px 0;
  }
  
  .skills-header h2 {
    font-size: 2rem;
  }
  
  .skill-tag-filters {
    gap: 8px;
    margin-bottom: 25px;
  }
  
  .skill-tag-filter {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
  }
  
  .skill-item {
    padding: 15px;
  }
  
  .skill-item img {
    width: 40px;
    height: 40px;
  }
  
  .project-cards {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .skills-container {
    width: 100%;
    padding: 20px 0;
  }
  
  .skills-header h2 {
    font-size: 1.8rem;
  }
  
  .skill-tag-filters {
    gap: 6px;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .skill-tag-filters::-webkit-scrollbar {
    display: none;
  }
  
  .skill-tag-filter {
    flex-shrink: 0;
    padding: 5px 10px;
    font-size: 12px;
  }
  
  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
  }
  
  .skill-item {
    padding: 12px;
  }
  
  .skill-item img {
    width: 35px;
    height: 35px;
  }
  
  .skill-item span {
    font-size: 11px;
  }
}