/* ================================================ */
/* modern-style.css - Modern Glassmorphism Theme   */
/* ================================================ */

/* Applied when body has class 'modern-style'       */

/* Modern color palette: cream and maroon with liquid glass effect */
body.modern-style {
  background: linear-gradient(135deg, #FFF8E7 0%, #F5E6D3 25%, #FFE5CC 50%, #F0D9C0 75%, #E8CDB5 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #2c1810;
  min-height: 100vh;
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

/* Animated gradient overlay for depth */
body.modern-style::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(255, 245, 235, 0.3) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(245, 220, 200, 0.3) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

/* Glassmorphism header with enhanced liquid effect */
body.modern-style header {
  background: rgba(139, 0, 0, 0.65);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0 0 24px 24px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2),
              0 2px 8px 0 rgba(139, 0, 0, 0.15),
              inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
  padding: 1.5rem 1rem;
  position: relative;
  overflow: hidden;
}

/* Subtle shimmer effect on header */
body.modern-style header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  animation: shimmer 8s infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

body.modern-style header h1 {
  color: #FFFEF0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4),
               0 0 30px rgba(255, 255, 255, 0.15);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
}

/* Hide marquee in modern style */
body.modern-style marquee {
  display: none;
}

/* Modern navigation with enhanced glass effect */
body.modern-style nav {
  margin-top: 1rem;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

body.modern-style nav a {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  padding: 0.6rem 1.2rem;
  color: #FFFEF0;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
}

body.modern-style nav a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

body.modern-style nav a:hover::before {
  left: 100%;
}

body.modern-style nav a:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
  text-decoration: none;
  border-color: rgba(255, 255, 255, 0.45);
}

/* Glass panels for sidebars and main content with enhanced depth */
body.modern-style .main-column,
body.modern-style .reading-sidebar,
body.modern-style .blog-sidebar {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 24px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.12),
              0 2px 8px 0 rgba(0, 0, 0, 0.05),
              inset 0 1px 0 0 rgba(255, 255, 255, 0.5),
              inset 0 -1px 0 0 rgba(255, 255, 255, 0.2);
  padding: 1.5rem;
  color: #2c1810;
  opacity: 1 !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

body.modern-style .main-column:hover,
body.modern-style .reading-sidebar:hover,
body.modern-style .blog-sidebar:hover {
  box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.15),
              0 4px 12px 0 rgba(0, 0, 0, 0.08),
              inset 0 1px 0 0 rgba(255, 255, 255, 0.6),
              inset 0 -1px 0 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

body.modern-style .reading-sidebar,
body.modern-style .blog-sidebar {
  background: rgba(139, 0, 0, 0.08);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  color: #2c1810;
}

body.modern-style .reading-sidebar h2,
body.modern-style .blog-sidebar h2 {
  color: #8B0000;
  font-weight: 700;
  border-bottom: 2px solid rgba(139, 0, 0, 0.25);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* Modern links */
body.modern-style a {
  color: #8B0000;
  text-decoration: none;
  transition: all 0.2s ease;
}

body.modern-style a:hover {
  color: #A52A2A;
  text-decoration: none;
}

body.modern-style .reading-sidebar a,
body.modern-style .blog-sidebar a {
  color: #800000;
  font-weight: 500;
}

body.modern-style .reading-sidebar a:hover,
body.modern-style .blog-sidebar a:hover {
  color: #A52A2A;
  text-decoration: underline;
}

/* Modern project sections */
body.modern-style .project-section {
  margin-bottom: 2rem;
}

body.modern-style .project-section h2 {
  color: #8B0000;
  font-weight: 700;
  font-size: 1.75rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid rgba(139, 0, 0, 0.2);
  padding-bottom: 0.5rem;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

body.modern-style .project-section ul {
  list-style: none;
  padding-left: 0;
}

body.modern-style .project-section li {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 1.2rem;
  margin-bottom: 0.75rem;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(139, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05),
              inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.modern-style .project-section li:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: translateX(6px) translateY(-2px);
  box-shadow: 0 6px 16px rgba(139, 0, 0, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border-color: rgba(139, 0, 0, 0.2);
}

body.modern-style .project-section li a {
  font-size: 1.25rem;
  font-weight: 600;
  color: #800000;
}

body.modern-style .project-summary {
  color: #4a3428;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Style toggle button with enhanced glass effect */
body.modern-style #style-toggle-btn {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  padding: 0.6rem 1.2rem;
  color: #FFFEF0;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

body.modern-style #style-toggle-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

body.modern-style #style-toggle-btn:hover::before {
  left: 100%;
}

body.modern-style #style-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.45);
}

/* Modern 88x31 buttons section - HIDDEN in modern mode */
body.modern-style .buttons88x31 {
  display: none;
}

body.modern-style .lava-button {
  background: rgba(139, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(139, 0, 0, 0.3);
  border-radius: 8px;
  color: #8B0000;
  font-weight: 500;
  transition: all 0.3s ease;
}

body.modern-style .lava-button:hover {
  background: rgba(139, 0, 0, 0.3);
  transform: translateY(-1px);
}

/* Details/summary modern style with glass effect */
body.modern-style details {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 1rem;
  border: 1px solid rgba(139, 0, 0, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05),
              inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

body.modern-style details:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.modern-style summary {
  color: #8B0000 !important;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

body.modern-style #keypad button {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(139, 0, 0, 0.2);
  border-radius: 10px;
  color: #8B0000;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

body.modern-style #keypad button:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: scale(1.05) translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

body.modern-style #keypad button:active {
  transform: scale(0.95);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

body.modern-style #codeDisplay {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 255, 0, 0.2);
  border-radius: 10px;
  color: #00FF00;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2),
              inset 0 0 20px rgba(0, 255, 0, 0.05);
}

/* Lists styling with enhanced glass effect */
body.modern-style .reading-sidebar ul,
body.modern-style .blog-sidebar ul {
  list-style: none;
  padding-left: 0;
}

body.modern-style .reading-sidebar li,
body.modern-style .blog-sidebar li {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(139, 0, 0, 0.12);
  transition: all 0.2s ease;
}

body.modern-style .reading-sidebar li:hover,
body.modern-style .blog-sidebar li:hover {
  padding-left: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  border-bottom-color: transparent;
}

body.modern-style .reading-sidebar li:last-child,
body.modern-style .blog-sidebar li:last-child {
  border-bottom: none;
}

/* Terminal overlay modern style with glass effect */
body.modern-style #terminal-overlay {
  background: rgba(44, 24, 16, 0.95);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-top: 1px solid rgba(139, 0, 0, 0.4);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.modern-style #terminalLink {
  color: #FFFEF0;
  font-family: inherit;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Time elements with subtle glow */
body.modern-style time {
  color: #8B0000;
  font-weight: 500;
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* Smooth transitions for all elements */
body.modern-style * {
  transition: background 0.35s ease, color 0.35s ease, border 0.35s ease, transform 0.35s ease;
}

/* Hide lava container in modern mode */
body.modern-style #lava-container {
  display: none;
}

/* Ensure content is visible */
body.modern-style header,
body.modern-style .content-wrapper {
  z-index: 1;
  position: relative;
}

/* Responsive adjustments */
@media (max-width: 968px) {
  body.modern-style header h1 {
    font-size: 2rem;
  }
  
  body.modern-style .main-column,
  body.modern-style .reading-sidebar,
  body.modern-style .blog-sidebar {
    border-radius: 16px;
    padding: 1.25rem;
  }
}

@media (max-width: 480px) {
  body.modern-style header h1 {
    font-size: 1.75rem;
  }
  
  body.modern-style nav a,
  body.modern-style #style-toggle-btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
  }
}
