/* ==========================================================================
   MINIMALIST CYBERSEC / DEV AESTHETIC - LIQUID GLASS STYLESHEET
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,200;1,300;1,400;1,500;1,600;1,700;1,800&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;0,8..60,700;1,8..60,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Common typography */
  --font-title: 'Spectral', 'Source Serif 4', Georgia, serif;
  --font-serif: 'Spectral', 'Source Serif 4', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Universal transition curves */
  --ease-glass: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   THEME COLOR PALETTES
   -------------------------------------------------------------------------- */
:root[data-theme="light"] {
  --bg-color: #f4f3ef;
  --text-main: #22262f;
  --text-muted: #646d7e;
  --text-dim: #98a2b3;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;

  /* Glassmorphism - Light Mode (Frosted Blue Tint) */
  --glass-bg: rgba(235, 243, 255, 0.55);
  --glass-border: rgba(200, 215, 235, 0.7);
  --glass-highlight: rgba(255, 255, 255, 0.85);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.06);

  /* Mobile Dropdown Frosted Background */
  --mobile-menu-bg: rgba(244, 243, 239, 0.94);
  --mobile-menu-border: rgba(200, 215, 235, 0.85);
  --mobile-menu-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);

  /* Switcher specifics */
  --switcher-bg: rgba(225, 232, 243, 0.65);
  --switcher-pill-bg: rgba(255, 255, 255, 0.85);
  --switcher-icon-color: #334155;
  --switcher-icon-active: #1e293b;
  --switcher-border: rgba(203, 213, 225, 0.6);

  /* Code block */
  --code-bg: rgba(226, 232, 240, 0.6);
  --code-border: rgba(203, 213, 225, 0.5);
  --code-text: #0f172a;
}

:root[data-theme="dark"] {
  --bg-color: #0b0e14;
  --text-main: #e2e8f0;
  --text-muted: #8a95a7;
  --text-dim: #475569;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;

  /* Glassmorphism - Dark Mode (Deep Midnight Transparent Glass) */
  --glass-bg: rgba(13, 17, 26, 0.42);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-highlight: rgba(255, 255, 255, 0.15);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);

  /* Mobile Dropdown Frosted Background */
  --mobile-menu-bg: rgba(11, 14, 20, 0.94);
  --mobile-menu-border: rgba(255, 255, 255, 0.15);
  --mobile-menu-shadow: 0 16px 40px rgba(0, 0, 0, 0.75);

  /* Switcher specifics */
  --switcher-bg: rgba(15, 23, 42, 0.55);
  --switcher-pill-bg: rgba(255, 255, 255, 0.12);
  --switcher-icon-color: #94a3b8;
  --switcher-icon-active: #f8fafc;
  --switcher-border: rgba(255, 255, 255, 0.12);

  /* Code block */
  --code-bg: rgba(15, 23, 42, 0.7);
  --code-border: rgba(255, 255, 255, 0.08);
  --code-text: #e2e8f0;
}

/* --------------------------------------------------------------------------
   BASE RESETS & TYPOGRAPHY
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Headings use transitional serif */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 200;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 0.75em;
  letter-spacing: -0.01em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; margin-top: 1.5em; }
h3 { font-size: 1.25rem; margin-top: 1.25em; }

p {
  margin-bottom: 1.2em;
  color: var(--text-muted);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
  border-bottom: 1px solid transparent;
}

a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

/* Background canvas for dark mode gradient & cursor distortion */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

:root[data-theme="dark"] #bg-canvas {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   NAVBAR & LIQUID GLASS HEADER
   -------------------------------------------------------------------------- */
.header-wrapper {
  position: sticky;
  top: 1.25rem;
  z-index: 100;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.25rem;
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 9999px;
  box-shadow: var(--glass-shadow);
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.logo {
  font-family: var(--font-title);
  font-weight: 200;
  font-size: 1.15rem;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.logo:hover {
  border-bottom-color: transparent;
  opacity: 0.85;
}

.logo-dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  list-style: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.nav-separator {
  color: var(--text-dim);
  user-select: none;
  font-weight: 300;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  border-bottom: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover {
  color: var(--text-main);
  border-bottom: none;
}

.nav-link.active {
  color: var(--accent);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   RE-ENGINEERED 2-STATE LIQUID GLASS SWITCHER
   -------------------------------------------------------------------------- */
.switcher {
  position: relative;
  display: flex;
  align-items: center;
  width: 76px;
  height: 38px;
  padding: 3px;
  border: 1px solid var(--switcher-border);
  border-radius: 9999px;
  background: var(--switcher-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin: 0;
  cursor: pointer;
  user-select: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.switcher__legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.switcher__option {
  position: relative;
  z-index: 2;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.switcher__input {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switcher__icon {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease, opacity 0.25s ease;
  opacity: 0.6;
}

.switcher__icon path {
  fill: var(--switcher-icon-color);
  transition: fill 0.3s ease;
}

.switcher__option:hover .switcher__icon {
  opacity: 0.9;
}

/* 2-State Pill Indicator with Glass & SVG Filter */
.switcher__pill {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 33px;
  height: 30px;
  border-radius: 9999px;
  background: var(--switcher-pill-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 1px 1px var(--glass-highlight);
  backdrop-filter: url(#switcher) blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1;
  transition: transform 0.35s var(--ease-glass), background 0.3s ease;
  pointer-events: none;
}

/* Sliding Pill Transforms for 2 Options */
:root[data-theme="light"] .switcher__pill {
  transform: translateX(0px);
}

:root[data-theme="dark"] .switcher__pill {
  transform: translateX(35px);
}

/* Active Icon Highlight */
:root[data-theme="light"] .switcher__option:has(input[value="light"]) .switcher__icon,
:root[data-theme="dark"] .switcher__option:has(input[value="dark"]) .switcher__icon {
  opacity: 1;
  transform: scale(1.1);
}

:root[data-theme="light"] .switcher__option:has(input[value="light"]) .switcher__icon path,
:root[data-theme="dark"] .switcher__option:has(input[value="dark"]) .switcher__icon path {
  fill: var(--switcher-icon-active);
}

/* Mobile Toggle Hamburger */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 8px;
}

.mobile-nav-toggle svg {
  width: 22px;
  height: 22px;
  stroke: var(--text-main);
}

/* Mobile Navigation Dropdown */
.mobile-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 1.25rem;
  right: 1.25rem;
  background: var(--mobile-menu-bg);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid var(--mobile-menu-border);
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--mobile-menu-shadow);
  z-index: 999;
}

.mobile-menu.open {
  display: block;
  animation: fadeInDown 0.25s var(--ease-glass);
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mobile-nav-item {
  font-size: 1.05rem;
}

.mobile-nav-item .nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  color: var(--text-main);
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav-item .nav-link:hover,
.mobile-nav-item .nav-link.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
}

:root[data-theme="light"] .mobile-nav-item .nav-link:hover,
:root[data-theme="light"] .mobile-nav-item .nav-link.active {
  background: rgba(0, 0, 0, 0.05);
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   PAGE LAYOUT & CONTAINER
   -------------------------------------------------------------------------- */
.main-container {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem 1.25rem;
}

/* --------------------------------------------------------------------------
   HOMEPAGE TWO-COLUMN LAYOUT
   -------------------------------------------------------------------------- */
.home-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

.bio-section {
  display: flex;
  flex-direction: column;
}

.bio-title {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 200;
  margin-bottom: 0.4em;
  color: var(--text-main);
}

.bio-subtitle {
  font-size: 1.1rem;
  color: var(--accent);
  font-family: var(--font-sans);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.bio-text {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.bio-text p {
  margin-bottom: 1.4em;
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pill {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
}

/* Recent Posts Card Widget (Right Column) */
.recent-posts-card {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--glass-shadow);
}

.card-title {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 200;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title a {
  font-size: 0.85rem;
  font-family: var(--font-sans);
  font-weight: 500;
}

.post-mini-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.post-mini-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.post-mini-item a {
  font-family: var(--font-title);
  font-size: 1.05rem;
  color: var(--text-main);
  font-weight: 200;
  border-bottom: none;
}

.post-mini-item a:hover {
  color: var(--accent);
}

.post-mini-date {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   BLOG INDEX & ARTICLES
   -------------------------------------------------------------------------- */
.blog-container, .contact-container, .article-container {
  max-width: 720px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 2.5rem;
}

.page-title {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 200;
  margin-bottom: 0.4em;
}

.page-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* Blog Posts List */
.blog-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.blog-card {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 1.6rem;
  box-shadow: var(--glass-shadow);
  transition: transform 0.25s var(--ease-glass), border-color 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.blog-card-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.blog-card-title {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 200;
  margin-bottom: 0.6rem;
}

.blog-card-title a {
  color: var(--text-main);
  border-bottom: none;
}

.blog-card-title a:hover {
  color: var(--accent);
}

.blog-card-summary {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Article Styling */
.article {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.article > h1:first-child {
  font-family: var(--font-title);
  font-size: 2.4rem;
  font-weight: 200;
  margin-bottom: 0.3em;
  color: var(--text-main);
  line-height: 1.2;
}

.article-meta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
}

/* Markdown Headings within Article Content */
.article-content h1 {
  font-family: var(--font-title);
  font-size: 2.1rem;
  font-weight: 200;
  margin-top: 2em;
  margin-bottom: 0.6em;
  color: var(--text-main);
  line-height: 1.25;
}

.article-content h2 {
  font-family: var(--font-title);
  font-size: 1.65rem;
  font-weight: 200;
  margin-top: 1.8em;
  margin-bottom: 0.5em;
  color: var(--text-main);
  line-height: 1.3;
}

.article-content h3 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 300;
  margin-top: 1.5em;
  margin-bottom: 0.4em;
  color: var(--text-main);
  line-height: 1.35;
}

.article-content h4,
.article-content h5,
.article-content h6 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.4em;
  margin-bottom: 0.4em;
  color: var(--text-main);
}

.article-content p {
  margin-bottom: 1.3em;
  line-height: 1.8;
  color: var(--text-muted);
}

/* Lists & Bullet Point Alignment */
.article-content ul,
.article-content ol,
.article ul,
.article ol {
  margin: 1.2em 0 1.5em 0;
  padding-left: 1.65rem;
}

.article-content ul,
.article ul {
  list-style-type: disc;
}

.article-content ol,
.article ol {
  list-style-type: decimal;
}

.article-content li,
.article li {
  margin-bottom: 0.45em;
  padding-left: 0.35rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.article-content li::marker,
.article li::marker {
  color: var(--accent);
}

.article-content ul ul,
.article-content ol ol,
.article-content ul ol,
.article-content ol ul,
.article ul ul,
.article ol ol,
.article ul ol,
.article ol ul {
  margin: 0.4em 0 0.5em 0;
  padding-left: 1.4rem;
}

.article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(96, 165, 250, 0.4);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.article-content a:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent-hover);
}

.article-content hr {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: 2.5rem 0;
}

.article code,
.article-content code {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  color: var(--code-text);
}

.article pre,
.article-content pre {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 12px;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  -webkit-overflow-scrolling: touch;
}

.article pre code,
.article-content pre code {
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
}

.article blockquote,
.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.6rem 0;
  font-style: italic;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0 8px 8px 0;
}

.article figure,
.article-content figure {
  margin: 2rem 0;
}

.article figure img,
.article-content figure img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

.article figcaption,
.article-content figcaption {
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: 0.5rem;
}

.article table,
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.95rem;
  overflow-x: auto;
  display: block;
}

.article th,
.article-content th,
.article td,
.article-content td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--glass-border);
  text-align: left;
}

.article th,
.article-content th {
  background: var(--code-bg);
  color: var(--text-main);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   CONTACT PAGE
   -------------------------------------------------------------------------- */
.contact-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.contact-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-label {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.contact-value {
  font-size: 1.1rem;
  color: var(--text-main);
  font-weight: 500;
}

.pgp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 9999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  width: fit-content;
}

.pgp-btn:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  border-bottom: none;
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.footer {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem 1.25rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .home-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .main-container {
    padding: 1.75rem 1.15rem 3rem 1.15rem;
  }

  .header-wrapper {
    top: 0.8rem;
  }

  .header {
    position: relative;
    padding: 0.5rem 1rem;
  }

  /* Rearrange Header for Mobile: Switcher Left, Logo Center, Hamburger Right */
  .header .switcher {
    order: 1;
  }

  .header .logo {
    order: 2;
    margin: 0 auto;
  }

  .header .desktop-nav {
    display: none;
  }

  .mobile-nav-toggle {
    display: block;
    order: 3;
  }

  /* Single Column Mobile Home Page (Drop Right Column) */
  .recent-posts-card {
    display: none;
  }

  .bio-title {
    font-size: 1.8rem;
  }

  .page-title {
    font-size: 1.8rem;
  }

  /* Mobile Article Typography & Reading Optimization */
  .article > h1:first-child {
    font-size: 1.95rem;
  }

  .article-content h1 {
    font-size: 1.75rem;
  }

  .article-content h2 {
    font-size: 1.4rem;
  }

  .article-content h3 {
    font-size: 1.2rem;
  }

  .article-content p,
  .article-content li {
    font-size: 1rem;
    line-height: 1.75;
  }

  .article-content ul,
  .article-content ol,
  .article ul,
  .article ol {
    padding-left: 1.45rem;
  }

  .article-content pre,
  .article pre {
    padding: 1rem;
    border-radius: 10px;
    margin: 1.25rem 0;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   404 NOT FOUND PAGE STYLING
   ========================================================================== */

.p404-container {
  width: 100%;
  max-width: 860px;
  margin: 1.5rem auto 3.5rem;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.p404-banner-badge {
  background: #f59e0b;
  color: #0f172a;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.88rem;
  padding: 0.45rem 1.25rem;
  border-radius: 999px;
  border: 2px solid #000;
  box-shadow: 4px 4px 0 #000;
  transform: rotate(-1.5deg);
  margin-bottom: 1.25rem;
  text-align: center;
  z-index: 2;
}

.p404-poster {
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 3px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 8px 8px 0px rgba(0, 0, 0, 0.4);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
}

.p404-headline-group {
  text-align: center;
  margin-bottom: 2rem;
}

.p404-stop-title {
  font-family: 'Impact', 'Arial Black', -apple-system, sans-serif;
  font-size: 5rem;
  line-height: 1;
  color: #ef4444;
  text-shadow: 4px 4px 0 #000, -2px -2px 0 #fde047, 0 0 25px rgba(239, 68, 68, 0.5);
  letter-spacing: 3px;
  margin: 0 0 0.5rem;
  animation: p404Pulse 2s infinite ease-in-out;
}

.p404-question {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 1.6rem;
  color: var(--text-main);
  margin: 0.3rem 0;
  line-height: 1.25;
}

.p404-sub-question {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0.25rem 0 0;
}

.p404-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  margin: 1.75rem 0;
}

.p404-panel {
  padding: 1.4rem;
  border: 2px dashed rgba(59, 130, 246, 0.5);
  border-radius: 16px;
  background: rgba(59, 130, 246, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.p404-panel-cat {
  text-align: center;
  position: relative;
}

.p404-speech-bubble {
  background: #fef08a;
  color: #1e293b;
  padding: 0.65rem 1rem;
  border-radius: 14px;
  border: 2px solid #000;
  box-shadow: 3px 3px 0 #000;
  display: inline-block;
  font-size: 0.95rem;
  line-height: 1.35;
  margin-bottom: 1rem;
  transform: rotate(-1deg);
}

.p404-speech-bubble span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.p404-speech-bubble strong {
  font-weight: 800;
}

.p404-cat-circle-wrap {
  position: relative;
  display: inline-block;
  margin: 0.5rem auto;
}

.p404-red-circle {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: 6px solid #ef4444;
  box-shadow: 0 0 0 5px #fde047, 0 10px 30px rgba(239, 68, 68, 0.6);
  overflow: hidden;
  margin: 0 auto;
  background: #000;
  animation: p404Pulse 2.5s infinite ease-in-out;
}

.p404-cat-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.p404-sketchy-arrow {
  position: absolute;
  right: -25px;
  top: 15px;
  width: 75px;
  height: 60px;
  transform: rotate(15deg);
  filter: drop-shadow(2px 2px 0px #000);
}

.p404-arrow-caption {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #ef4444;
  display: block;
  font-weight: 800;
  margin-top: 0.75rem;
}

.p404-mini-tag {
  background: #10b981;
  color: #ffffff;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  border: 2px solid #000;
  box-shadow: 3px 3px 0 #000;
  font-size: 0.88rem;
  font-weight: 800;
  display: inline-block;
  margin: 0.85rem auto 0;
  transform: rotate(-2deg);
}

.p404-fact-header {
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: 1.25rem;
  color: #f59e0b;
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}

.p404-status-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.4rem 0 0.6rem;
}

.p404-status-emoji {
  font-size: 2.4rem;
  line-height: 1;
}

.p404-status-text {
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: 1.7rem;
  line-height: 1.15;
  color: #ef4444;
  text-shadow: 2px 2px 0 #000;
  margin: 0;
}

.p404-fact-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0.4rem 0 0.8rem;
}

.p404-asmr-box {
  background: #fef9c3;
  color: #1e293b;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 2px solid #ca8a04;
  box-shadow: 3px 3px 0 #ca8a04;
  text-align: center;
  margin-top: 0.85rem;
}

.p404-asmr-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  color: #854d0e;
  margin-bottom: 0.45rem;
}

.p404-squish-btn {
  background: linear-gradient(135deg, #f43f5e, #8b5cf6);
  color: #ffffff;
  border: 2px solid #000;
  padding: 0.55rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 800;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 3px 3px 0 #000;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  width: 100%;
}

.p404-squish-btn:hover {
  transform: scale(1.03) rotate(-1deg);
  box-shadow: 4px 4px 0 #000;
}

.p404-squish-btn.squished {
  transform: scale(0.94);
  box-shadow: 1px 1px 0 #000;
}

.p404-squish-hint {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #a16207;
  margin-top: 0.35rem;
}

.p404-official-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  padding: 1.1rem 1.5rem;
  border-radius: 12px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 1.75rem 0;
}

.p404-action-buttons {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

.p404-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.8rem;
  font-weight: 800;
  font-size: 1rem;
  border-radius: 14px;
  border: 2px solid #000;
  box-shadow: 4px 4px 0 #000;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}

.p404-btn-home {
  background: #22c55e;
  color: #0f172a;
}

.p404-btn-home:hover {
  background: #16a34a;
  color: #ffffff;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
  border-bottom-color: #000;
}

.p404-btn-blogs {
  background: #3b82f6;
  color: #ffffff;
}

.p404-btn-blogs:hover {
  background: #2563eb;
  color: #ffffff;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
  border-bottom-color: #000;
}

.p404-floating-emoji {
  position: fixed;
  pointer-events: none;
  z-index: 999999;
  font-size: 2rem;
  animation: p404FloatUp 1.2s forwards ease-out;
}

@keyframes p404Pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

@keyframes p404Spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes p404FloatUp {
  0% {
    opacity: 1;
    transform: scale(0.6) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(1.4) translateY(-90px);
  }
}

/* Mobile Responsive for 404 */
@media (max-width: 768px) {
  .p404-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .p404-stop-title {
    font-size: 3.6rem;
  }

  .p404-question {
    font-size: 1.25rem;
  }

  .p404-poster {
    padding: 1.75rem 1.25rem;
  }

  .p404-action-buttons {
    flex-direction: column;
    width: 100%;
  }

  .p404-btn {
    width: 100%;
  }
}
