/* ================================================ */
/* 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 {
  --modern-bg-1: #f7f5ef;
  --modern-bg-2: #f1eee6;
  --modern-bg-3: #ebe6da;
  --modern-surface: rgba(255, 255, 255, 0.55);
  --modern-surface-strong: rgba(255, 255, 255, 0.75);
  --modern-stroke: rgba(151, 150, 137, 0.35);
  --modern-stroke-strong: rgba(151, 150, 137, 0.55);
  --modern-text: #2b2a24;
  --modern-muted: #5b5a4f;
  --modern-accent: #6f7f57;
  --modern-accent-strong: #5a6b44;
  --modern-header: rgba(46, 51, 39, 0.75);
  --modern-header-stroke: rgba(151, 150, 137, 0.45);
  --modern-glow: rgba(111, 127, 87, 0.2);
  background: var(--modern-bg-2);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--modern-text);
  min-height: 100vh;
  background-attachment: scroll;
  position: relative;
  overflow-x: hidden;
}


/* Glassmorphism header with enhanced liquid effect */
body.modern-style header {
  background: var(--modern-header);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border-bottom: 1px solid var(--modern-header-stroke);
  border-radius: 0 0 24px 24px;
  box-shadow: 0 8px 32px 0 rgba(46, 51, 39, 0.22),
              0 2px 8px 0 rgba(30, 32, 26, 0.2),
              inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
  padding: 1.5rem 1rem;
  position: relative;
  overflow: hidden;
}

/* Soft aurora glow behind the header */
body.modern-style header::before {
  content: none;
}

@keyframes headerGlow {
  0% {
    opacity: 0.65;
    transform: translate3d(-8px, -6px, 0) scale(1);
    background-position: 18% 28%, 78% 18%, 50% 78%;
  }
  50% {
    opacity: 0.9;
    transform: translate3d(6px, 8px, 0) scale(1.02);
    background-position: 22% 24%, 82% 22%, 46% 82%;
  }
  100% {
    opacity: 0.7;
    transform: translate3d(-4px, 10px, 0) scale(1.04);
    background-position: 20% 30%, 80% 26%, 52% 74%;
  }
}

body.modern-style header h1 {
  color: #f8fafc;
  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,
body.modern-style .marquee-wrap {
  display: none;
}

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

body.modern-style nav a {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  border: 1px solid var(--modern-stroke);
  border-radius: 14px;
  padding: 0.6rem 1.2rem;
  color: #f8fafc;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: none;
  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.28);
  /* Keep buttons fully visible within the header while still giving lift */
  transform: translateY(-1px);
  box-shadow: none;
  text-decoration: none;
  border-color: var(--modern-stroke-strong);
}

/* 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: var(--modern-surface);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid var(--modern-stroke);
  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: var(--modern-text);
  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(111, 127, 87, 0.1);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  color: var(--modern-text);
}

body.modern-style .reading-sidebar h2,
body.modern-style .blog-sidebar h2 {
  color: var(--modern-accent-strong);
  font-weight: 700;
  border-bottom: 2px solid rgba(111, 127, 87, 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: var(--modern-accent-strong);
  text-decoration: none;
  transition: all 0.2s ease;
}

body.modern-style a:hover {
  color: var(--modern-accent);
  text-decoration: none;
}

body.modern-style .reading-sidebar a,
body.modern-style .blog-sidebar a {
  color: var(--modern-accent-strong);
  font-weight: 500;
}

body.modern-style .reading-sidebar a:hover,
body.modern-style .blog-sidebar a:hover {
  color: var(--modern-accent);
  text-decoration: underline;
}

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

body.modern-style .project-section h2 {
  color: var(--modern-accent-strong);
  font-weight: 700;
  font-size: 1.75rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid rgba(111, 127, 87, 0.22);
  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: var(--modern-surface-strong);
  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(111, 127, 87, 0.16);
  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(111, 127, 87, 0.18),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border-color: rgba(111, 127, 87, 0.25);
}

body.modern-style .project-section li a {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--modern-accent-strong);
}

body.modern-style .project-summary {
  color: var(--modern-muted);
  margin-top: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Modern styling for standalone content pages (posts/apps) */
body.modern-style main:not(.main-column) {
  background: var(--modern-surface);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid var(--modern-stroke);
  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.75rem;
  color: var(--modern-text);
}

/* Style toggle button with enhanced glass effect */
body.modern-style #style-toggle-btn {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  border: 1px solid var(--modern-stroke);
  border-radius: 14px;
  padding: 0.6rem 1.2rem;
  color: #f8fafc;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: none;
  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.28);
  transform: translateY(-2px);
  box-shadow: none;
  border-color: var(--modern-stroke-strong);
}

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

body.modern-style .lava-button {
  background: rgba(111, 127, 87, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(111, 127, 87, 0.35);
  border-radius: 8px;
  color: var(--modern-accent-strong);
  font-weight: 500;
  transition: all 0.3s ease;
}

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

/* Details/summary modern style with glass effect */
body.modern-style details {
  background: var(--modern-surface-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 1rem;
  border: 1px solid rgba(111, 127, 87, 0.18);
  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: var(--modern-accent-strong) !important;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

body.modern-style #keypad button {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(111, 127, 87, 0.2);
  border-radius: 10px;
  color: var(--modern-accent-strong);
  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(30, 32, 26, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(111, 127, 87, 0.35);
  border-radius: 10px;
  color: #c7d0b4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2),
              inset 0 0 20px rgba(111, 127, 87, 0.1);
}

/* 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(111, 127, 87, 0.12);
  transition: all 0.2s ease;
}

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

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(30, 32, 26, 0.94);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-top: 1px solid rgba(111, 127, 87, 0.35);
  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: #e2e8f0;
  font-family: inherit;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* About page modern overrides */
body.modern-style {
  --bg: var(--modern-bg-1);
  --panel: var(--modern-surface-strong);
  --muted: var(--modern-muted);
  --text: var(--modern-text);
  --brand: var(--modern-accent-strong);
  --accent: var(--modern-accent);
  --danger: #dc2626;
  --ring: rgba(111, 127, 87, 0.35);
  --radius: 14px;
}

body.modern-style .wrap {
  max-width: 1120px;
}

body.modern-style .hero {
  background: var(--modern-surface);
  border: 1px solid var(--modern-stroke);
  box-shadow: 0 10px 30px rgba(46, 51, 39, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

body.modern-style .card {
  background: var(--modern-surface-strong);
  border: 1px solid var(--modern-stroke);
  box-shadow: 0 6px 18px rgba(46, 51, 39, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

body.modern-style .btn {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--modern-stroke-strong);
  color: var(--modern-text);
  box-shadow: 0 4px 12px rgba(46, 51, 39, 0.1);
}

body.modern-style .btn--primary {
  color: #ffffff;
  background: linear-gradient(135deg, #6f7f57, #5a6b44);
  border-color: rgba(111, 127, 87, 0.6);
}

body.modern-style .btn:hover {
  background: rgba(255, 255, 255, 0.85);
}

body.modern-style .btn--primary:hover {
  filter: brightness(1.05);
}

body.modern-style .pill,
body.modern-style .badge,
body.modern-style .stat,
body.modern-style .logo-line span,
body.modern-style .img {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--modern-stroke);
  color: var(--modern-muted);
}

body.modern-style .stat .num {
  color: var(--modern-accent-strong);
}

body.modern-style .hr {
  border-top-color: rgba(111, 127, 87, 0.15);
}

/* Time elements with subtle glow */
body.modern-style time {
  color: var(--modern-accent-strong);
  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;
  }
}
