/* Optimized glassmorphism card with CSS variables */
.glass-card {
  --blur-value: 10px;
  --refraction: 0.05;
  --depth: 10px;
  --border-radius: 20px;
  
  width: 290px;
  height: auto;
  min-height: 420px;
  background: rgba(255, 255, 255, var(--refraction));
  backdrop-filter: blur(var(--blur-value)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--blur-value)) saturate(1.2);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 var(--depth) calc(var(--depth) / 2) rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  padding: 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}


/* Border gradient and highlight effects */
.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--border-radius);
  padding: 1px;
  background: linear-gradient(
    rgba(255, 255, 255, 0.21) 1%, 
    rgba(255, 255, 255, 0.35) 100%
  );
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  pointer-events: none;
}

.glass-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  pointer-events: none;
}

/* Hover effects */
.glass-card:hover {
  transform: translateY(-10px);
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(255, 255, 255, 0.3),
    inset 0 0 var(--depth) calc(var(--depth) / 2) rgba(255, 255, 255, 0.15);
}

/* Inner glow effect */
.glass-card .inner-glow{
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--border-radius) - 1px);
  box-shadow: 
    inset 0 0 2px rgba(255, 255, 255, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 0.08),
    inset 0 -2px 2px rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

/* Radial glow overlay */
.glass-card .radial-glow {
  position: absolute;
  inset: 2px;
  border-radius: calc(var(--border-radius) - 2px);
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* Left edge highlight */
.glass-card .left-highlight{
  position: absolute;
  top: 10%;
  left: 0;
  width: 1px;
  height: 80%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.06), transparent);
  pointer-events: none;
}

/* Glass card content styles */
.glass-card h3{
  color: white;
  font-size: 1.5rem;
  margin-bottom: 15px;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.glass-card p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  text-align: center;
  margin-bottom: 20px;
  flex-grow: 1;
}

.glass-card .icon{
  font-size: 3rem;
  text-align: center;
  margin-bottom: 20px;
  opacity: 0.8;
}

.glass-card .button {
  display: inline-block;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  color: white;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  width: 100%;
  box-sizing: border-box;
  margin-top: auto;
}

.glass-card .button:hover{
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.cards-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
  justify-items: center;
}
/* ========================================
   BLOB ANIMATIONS FOR BACKGROUNDS
   ======================================== */

.blob {
  position: absolute;
  width: 500px;
  height: 500px;
  background: linear-gradient(180deg, rgba(47, 184, 255, 0.42) 31.77%, #5c9df1 100%);
  mix-blend-mode: color-dodge;
  animation: move 25s infinite alternate;
  transition: all 1s cubic-bezier(0.07, 0.8, 0.19, 1);
  border-radius: 50%;
  z-index: -1;
  filter: blur(0px);
}

.blob:hover,
.blob.blob-hovered {
  width: 520px !important;
  height: 520px !important;
  filter: blur(30px) saturate(1.5) !important;
  box-shadow:
    inset 0 0 0 5px rgba(255, 255, 255, 0.6),
    inset 100px 100px 0 0 #fa709a,
    inset 200px 200px 0 0 #784ba8,
    inset 300px 300px 0 0 #2b86c5 !important;
}

@keyframes move {
  from {
    transform: translate(-200px, -400px) rotate(-90deg);
    border-radius: 24% 76% 35% 65% / 27% 36% 64% 73%;
  }
  to {
    transform: translate(400px, 100px) rotate(-10deg);
    border-radius: 76% 24% 33% 67% / 68% 55% 45% 32%;
  }
}

/* ========================================
   DEMO PAGE STYLES
   ======================================== */
/* Demo page base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #33475a 0%, #2c6d69 50%, #349040 100%);
  position: relative;
  overflow-x: hidden;
}

/* Smooth scrolling for in-page links */
html { scroll-behavior: smooth; }

/* ===============================
   STICKY HORIZONTAL GLASS HEADER
   =============================== */
.glass-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 2px 12px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.25);
}
.glass-header.is-stuck {
  box-shadow: 0 10px 30px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.35);
  background: rgba(255, 255, 255, 0.18);
}
.glass-header .profile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
}
.glass-header .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.4px;
  background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(255,255,255,0.08));
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 4px 12px rgba(0,0,0,0.22);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.glass-header .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.glass-header .info h1 {
  margin: 0;
  font-size: 1.05rem;
  color: #fff;
  line-height: 1.2;
}
.glass-header .info p {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
}
.glass-header .nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.glass-header .nav a {
  color: #fff;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.glass-header .nav a:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

/* Section spacing so anchors have room below the sticky header */
.section { padding: 80px 20px; }
.section .section-inner {
  max-width: 1000px;
  margin: 0 auto;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 24px;
  color: #fff;
}

@media (max-width: 768px) {
  .demo-title {
    font-size: 2rem;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }
  
  .explanation {
    padding: 20px;
  }
  
  .glass-header { padding: 10px 12px; gap: 10px; }
  .glass-header .info h1 { font-size: 0.95rem; }
  .glass-header .info p { font-size: 0.8rem; }
  .glass-header .nav { gap: 8px; }
  .glass-header .nav a { padding: 6px 10px; }
  .section { padding: 70px 14px; }
}

/* ==================
   DARK MODE THEME
   ================== */

/* Theme toggle button styles */
.theme-toggle {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-size: 14px;
  transition: all 0.2s ease;
}
.theme-toggle:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

/* Dark mode styles */
body.dark-mode {
  /* Darker background gradient - not fully black but significantly darker */
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #e6eef5;
}

body.dark-mode .section .section-inner {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: #eef6ff;
}

body.dark-mode .glass-header {
  background: rgba(20, 26, 34, 0.6);
  border-bottom-color: rgba(255,255,255,0.18);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.12);
}
body.dark-mode .glass-header.is-stuck {
  background: rgba(24, 30, 38, 0.7);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.15);
}

body.dark-mode .glass-header .nav a {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.25);
}
body.dark-mode .glass-header .nav a:hover {
  background: rgba(255,255,255,0.18);
}

body.dark-mode .theme-toggle {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
}

/* Make glass cards darker and more transparent in dark mode */
body.dark-mode .glass-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 var(--depth) calc(var(--depth) / 2) rgba(255, 255, 255, 0.06);
}
body.dark-mode .glass-card:hover {
  box-shadow:
    0 25px 60px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(255, 255, 255, 0.18),
    inset 0 0 var(--depth) calc(var(--depth) / 2) rgba(255, 255, 255, 0.09);
}

body.dark-mode .glass-card .button {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.24);
}
body.dark-mode .glass-card .button:hover {
  background: rgba(255,255,255,0.25);
}

/* Adjust blob in dark mode */
body.dark-mode .blob {
  mix-blend-mode: screen;
}

body.dark-mode .blob:hover,
body.dark-mode .blob.blob-hovered {
  filter: blur(30px) saturate(1.2) brightness(0.8);
}

/* ==================
   NEW SECTION STYLES
   ================== */

/* About highlights */
.about-highlights {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 15px;
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.highlight-icon {
  font-size: 1.2rem;
}

/* Education grid */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.education-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.education-card h3 {
  color: #fff;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.education-card p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 5px;
}

/* Project tech tags */
.project-tech {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.tech-tag {
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Skills grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

.skill-category {
  background: rgba(255, 255, 255, 0.08);
  padding: 20px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

.skill-category h3 {
  color: #fff;
  margin-bottom: 15px;
  font-size: 1.1rem;
  text-align: center;
}

.skill-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.skill-tag {
  background: rgba(255, 255, 255, 0.12);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.skill-tag:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Achievements grid */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.achievement-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.achievement-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}

.achievement-card h3 {
  color: #fff;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.achievement-card p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 10px;
}

.achievement-card .year {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Contact grid */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.08);
  padding: 15px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

.contact-icon {
  font-size: 1.3rem;
}

.contact-item a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: #fff;
}

.quote {
  text-align: center;
  margin-top: 30px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.quote p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
}

/* Dark mode adjustments for new sections */
body.dark-mode .education-card,
body.dark-mode .achievement-card,
body.dark-mode .skill-category {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .tech-tag,
body.dark-mode .skill-tag,
body.dark-mode .highlight-item,
body.dark-mode .contact-item {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .skill-tag:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .about-highlights {
    flex-direction: column;
    align-items: center;
  }
  
  .education-grid,
  .achievements-grid {
    grid-template-columns: 1fr;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
}
