/*
Theme Name: Fasterland Blog
Theme URI: https://blog.fasterland.net
Author: Fasterland
Author URI: https://fasterland.net
Description: Premium dark terminal theme for Fasterland's technical blog at blog.fasterland.net, featuring high-end UI design, glassmorphism, top bar menu, left WP widgets, right custom sidebar, nested submenus, and developer UX.
Version: 2.5.0
Text Domain: fasterland-blog
Tags: dark, blog, terminal, developer, modern, responsive, glassmorphism, two-columns, three-columns, custom-menu, featured-images, widgets, sub-menu, top-bar
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  /* Dark Color Palette */
  --bg-darker: #06090e;
  --bg-main: #0b0f17;
  --bg-card: #121824;
  --bg-card-hover: #182234;
  --bg-terminal: #080c14;
  --bg-terminal-header: #131a28;
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(255, 255, 255, 0.24);

  /* Typography Colors */
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Accent Colors */
  --accent-yellow: #facc15;
  --accent-yellow-glow: rgba(250, 204, 21, 0.35);
  --accent-green: #a3e635;
  --accent-green-glow: rgba(163, 230, 53, 0.35);
  --accent-purple: #c084fc;
  --accent-purple-glow: rgba(192, 132, 252, 0.35);
  --accent-blue: #38bdf8;
  --accent-blue-glow: rgba(56, 189, 248, 0.35);

  /* Fonts */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', Consolas, Monaco, monospace;

  /* Layout */
  --topbar-height: 40px;
  --nav-height: 74px;
  --container-width: 1400px;
  --sidebar-width: 320px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
}

img, video, iframe, object, embed, table, pre, code, figure {
  max-width: 100%;
}

/* BRAND LOGO WRAPPER & ASPECT RATIO PROTECTION */
.brand-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.brand-logo-link,
.custom-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img,
.custom-logo {
  height: 38px !important;
  max-height: 38px !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
  display: block !important;
  flex-shrink: 0 !important;
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.brand-logo-link:hover .logo-img,
.custom-logo-link:hover .custom-logo {
  transform: scale(1.04);
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.4));
}

.subdomain-badge-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.subdomain-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-purple);
  background: rgba(192, 132, 252, 0.12);
  border: 1px solid rgba(192, 132, 252, 0.3);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.1);
  flex-shrink: 0;
}

.subdomain-badge i {
  color: var(--accent-purple);
}

.footer-logo {
  height: 28px !important;
  max-height: 28px !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

/* SECONDARY TOP BAR STYLING */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--topbar-height);
  background: rgba(12, 17, 28, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 1001;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  transition: top var(--transition-normal);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.top-bar-container {
  max-width: var(--container-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.top-bar-network-label {
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
}

.top-bar-network-label i {
  color: var(--accent-green);
}

.top-bar-right {
  display: flex;
  align-items: center;
}

.top-bar-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.top-bar-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
}

.top-bar-links a:hover {
  color: var(--accent-yellow);
  background: rgba(250, 204, 21, 0.1);
  text-shadow: 0 0 8px var(--accent-yellow-glow);
}

/* WORDPRESS ADMIN BAR COMPATIBILITY */
body.admin-bar .top-bar {
  top: 32px;
}

body.admin-bar .navbar {
  top: calc(32px + var(--topbar-height));
}

body.admin-bar #reading-progress-bar {
  top: calc(32px + var(--topbar-height));
}

@media screen and (max-width: 782px) {
  body.admin-bar .top-bar {
    top: 46px;
  }
  body.admin-bar .navbar {
    top: calc(46px + var(--topbar-height));
  }
  body.admin-bar #reading-progress-bar {
    top: calc(46px + var(--topbar-height));
  }
}

/* Scroll Progress Bar at Top */
#reading-progress-bar {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-yellow), var(--accent-green), var(--accent-blue), var(--accent-purple));
  z-index: 1002;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px var(--accent-green-glow);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Background Ambient Glows & Grid */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  pointer-events: none;
  z-index: -2;
}

.glow-sphere {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.16;
  pointer-events: none;
  z-index: -1;
}

.sphere-yellow {
  top: -100px;
  left: -100px;
  width: 480px;
  height: 480px;
  background: var(--accent-yellow);
}

.sphere-green {
  top: 35%;
  right: -150px;
  width: 520px;
  height: 520px;
  background: var(--accent-green);
}

.sphere-purple {
  bottom: 8%;
  left: -120px;
  width: 480px;
  height: 480px;
  background: var(--accent-purple);
}

.sphere-blue {
  top: 15%;
  left: 35%;
  width: 420px;
  height: 420px;
  background: var(--accent-blue);
}

/* Top Primary Navigation Bar */
.navbar {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(11, 15, 23, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  transition: var(--transition-normal);
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.nav-links-wrapper {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  height: 100%;
  margin: 0;
  padding: 0;
}

.nav-links > li {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.4rem;
}

.nav-links a:hover {
  color: var(--accent-green);
}

.cmd-prompt {
  color: var(--accent-yellow);
  opacity: 0.85;
  font-weight: 600;
}

.nav-arrow {
  font-size: 0.72rem;
  margin-left: 0.25rem;
  color: var(--text-dim);
  transition: transform var(--transition-fast);
}

.nav-links li:hover > a .nav-arrow {
  transform: rotate(180deg);
  color: var(--accent-green);
}

/* NESTED SUBMENUS & DROPDOWNS */
.sub-menu {
  position: absolute;
  top: calc(100% - 6px);
  left: 0;
  min-width: 220px;
  background: rgba(14, 20, 32, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-md);
  padding: 0.6rem 0;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1005;
}

.sub-menu .sub-menu {
  top: 0;
  left: 100%;
  margin-left: 4px;
}

.nav-links li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sub-menu li {
  width: 100%;
  display: block;
}

.sub-menu a {
  padding: 0.65rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  color: var(--text-main);
  font-size: 0.85rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.04);
  transition: all var(--transition-fast);
}

.sub-menu li:last-child > a {
  border-bottom: none;
}

.sub-menu a:hover {
  background: rgba(163, 230, 53, 0.12);
  color: var(--accent-green);
  padding-left: 1.5rem;
}

.external-link {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-blue) !important;
  padding: 0.4rem 0.85rem !important;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast) !important;
}

.external-link:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #fff !important;
  box-shadow: 0 0 14px var(--accent-blue-glow);
}

/* ANIMATED HAMBURGER MENU BUTTON FOR MOBILE */
.nav-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  transition: all var(--transition-fast);
  z-index: 1002;
  flex-shrink: 0;
}

.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: transform 0.35s cubic-bezier(0.68, -0.6, 0.32, 1.6), opacity 0.25s ease, background-color 0.3s ease;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-yellow);
}

.nav-toggle:hover .hamburger-bar {
  background-color: var(--accent-yellow);
}

/* Morphs into 'X' when active */
.nav-toggle.active {
  background: rgba(250, 204, 21, 0.15);
  border-color: rgba(250, 204, 21, 0.5);
  box-shadow: 0 0 12px var(--accent-yellow-glow);
}

.nav-toggle.active .bar-top {
  transform: translateY(7px) rotate(45deg);
  background-color: var(--accent-yellow);
}

.nav-toggle.active .bar-mid {
  opacity: 0;
  transform: translateX(-10px);
}

.nav-toggle.active .bar-bot {
  transform: translateY(-7px) rotate(-45deg);
  background-color: var(--accent-yellow);
}

/* Container & Layout */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.main-wrapper {
  padding-top: calc(var(--topbar-height) + var(--nav-height) + 2rem);
  padding-bottom: 5rem;
  width: 100%;
}

/* PERFECTLY CENTERED GRID LAYOUT */
.blog-grid-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 2.2rem;
  align-items: start;
  width: 100%;
}

/* 3 COLUMNS SYMMETRIC: 320px Left Sidebar + Perfectly Centered minmax(0, 1fr) Main Column + 320px Right Sidebar */
.blog-grid-layout.has-left-sidebar {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--sidebar-width);
  justify-content: center;
}

.blog-grid-layout > * {
  min-width: 0; /* Ensures mathematical symmetry & prevents grid track expansion overflow */
}

.blog-grid-layout.no-sidebar {
  grid-template-columns: 1fr;
}

/* Posts Container & Post Cards */
.posts-container,
.single-post-main {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Flex ordering inside single-post-main to guarantee Next/Prev buttons at bottom */
.single-post-main {
  display: flex;
  flex-direction: column;
}

.single-post-wrapper {
  order: 1;
}

.comments-area {
  order: 2;
}

.single-post-navigation-container {
  order: 3 !important;
  width: 100%;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  max-width: 100%;
}

.post-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55);
}

.post-card.sticky {
  border-color: rgba(250, 204, 21, 0.4);
  box-shadow: 0 0 25px rgba(250, 204, 21, 0.12);
}

/* STRICT 16:9 ASPECT RATIO FOR PREVIEW IMAGES ON CARDS */
.post-thumbnail-link {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  overflow: hidden;
  position: relative;
  background: #080c14;
  border-bottom: 1px solid var(--border-subtle);
}

.post-thumbnail-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 15, 23, 0.05) 0%, rgba(18, 24, 36, 0.85) 100%);
  pointer-events: none;
}

.post-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover .post-thumbnail-img {
  transform: scale(1.05);
}

/* Placeholder Image for Posts without Featured Image */
.post-thumbnail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d131f 0%, #172133 100%);
  position: relative;
}

.placeholder-icon {
  font-size: 3.5rem;
  color: rgba(163, 230, 53, 0.25);
}

/* Formatted Meta Information Bar (Underneath Top Image) */
.post-card-terminal-header {
  background: var(--bg-terminal-header);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
}

.post-meta-inline {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  width: 100%;
}

.post-author-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: #fff;
}

.post-author-avatar,
.author-avatar-mini,
.author-box-avatar,
.widget-author-avatar {
  display: inline-block !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1 !important;
}

.post-author-avatar {
  width: 26px !important;
  height: 26px !important;
  border: 1.5px solid var(--accent-blue) !important;
  box-shadow: 0 0 8px var(--accent-blue-glow);
}

/* HIGHLY LEGIBLE CATEGORY STYLING */
.post-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-sm);
  background: rgba(250, 204, 21, 0.16);
  border: 1px solid rgba(250, 204, 21, 0.35);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.1);
}

.post-category-badge a,
.post-meta-inline .post-category-badge a,
.single-post-header .banner-tag a {
  color: #facc15 !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  transition: color var(--transition-fast);
}

.post-category-badge a:hover,
.single-post-header .banner-tag a:hover {
  color: #ffffff !important;
  text-shadow: 0 0 8px var(--accent-yellow);
}

.post-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
}

.post-meta-item i {
  color: var(--accent-yellow);
}

.post-card-body {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  width: 100%;
}

.post-title {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.9rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.post-title a {
  color: #fff;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.post-title a:hover {
  color: var(--accent-green);
}

.post-excerpt {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.post-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-subtle);
}

/* VIOLET / PURPLE TAGS STYLING */
.post-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
}

.post-tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.28rem 0.7rem;
  border-radius: 4px;
  background: rgba(192, 132, 252, 0.14) !important;
  color: var(--accent-purple) !important;
  border: 1px solid rgba(192, 132, 252, 0.35) !important;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.post-tag:hover {
  background: rgba(192, 132, 252, 0.28) !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px var(--accent-purple-glow);
  transform: translateY(-1px);
}

/* GREEN READ MORE BUTTON STYLING */
.btn-readmore,
.btn-primary {
  background: var(--accent-green) !important;
  color: #000000 !important;
  font-weight: 700 !important;
  border: 1px solid #a3e635 !important;
  box-shadow: 0 0 16px var(--accent-green-glow) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-readmore:hover,
.btn-primary:hover {
  background: #bbff44 !important;
  color: #000000 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 22px var(--accent-green-glow) !important;
}

.btn-readmore i,
.btn-primary i {
  transition: transform var(--transition-fast);
}

.btn-readmore:hover i,
.btn-primary:hover i {
  transform: translateX(3px);
}

/* HIGH-LEGIBILITY SECONDARY BUTTON STYLING */
.btn-secondary {
  background: rgba(56, 189, 248, 0.16) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  font-family: var(--font-mono) !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none !important;
  transition: all var(--transition-fast) !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.12) !important;
}

.btn-secondary:hover {
  background: rgba(56, 189, 248, 0.32) !important;
  color: #ffffff !important;
  border-color: rgba(56, 189, 248, 0.6) !important;
  box-shadow: 0 0 18px var(--accent-blue-glow) !important;
  transform: translateY(-2px);
}

/* Single Post View with STRICT 16:9 Featured Media at VERY TOP */
.single-post-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
  margin-bottom: 1.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.single-featured-media {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  overflow: hidden;
  background: var(--bg-darker);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.single-featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.single-post-header {
  background: var(--bg-terminal-header);
  padding: 2.5rem 2rem;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  width: 100%;
}

.single-post-title {
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 1.2rem;
  letter-spacing: -0.5px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.single-post-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.author-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.author-avatar-mini {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  border: 2px solid var(--accent-blue) !important;
  box-shadow: 0 0 12px var(--accent-blue-glow) !important;
  object-fit: cover !important;
}

/* Social Share Bar in Single Post Header */
.social-share-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px dashed var(--border-subtle);
  flex-wrap: wrap;
}

.share-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-yellow);
  margin-right: 0.4rem;
  display: inline-block;
}

.share-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  text-decoration: none;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.share-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
  border-color: rgba(56, 189, 248, 0.4);
}

.desktop-only-text {
  display: inline-block;
}

/* Article Entry Content & STRICT CONTENT OVERFLOW PROTECTION */
.entry-content {
  padding: 2.5rem 2rem;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-main);
  word-break: break-word;
  overflow-wrap: anywhere;
  width: 100%;
}

.entry-content,
.entry-content *,
.single-post-wrapper,
.single-post-wrapper * {
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
}

.entry-content p {
  margin-bottom: 1.5rem;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  color: #fff;
  font-weight: 700;
  margin-top: 2.2rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.entry-content h2 {
  font-size: 1.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.entry-content h3 {
  font-size: 1.42rem;
  color: var(--accent-yellow);
}

.entry-content a {
  color: var(--accent-blue);
  text-decoration: none;
  border-bottom: 1px dashed rgba(56, 189, 248, 0.4);
  transition: all var(--transition-fast);
}

.entry-content a:hover {
  color: var(--accent-green);
  border-bottom-color: var(--accent-green);
}

.entry-content ul,
.entry-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.8rem;
}

.entry-content li {
  margin-bottom: 0.5rem;
}

.entry-content blockquote,
.wp-block-quote {
  background: rgba(192, 132, 252, 0.08);
  border-left: 4px solid var(--accent-purple);
  padding: 1.4rem 1.6rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-main);
  box-shadow: 0 4px 15px rgba(192, 132, 252, 0.05);
}

.entry-content code,
p code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-green);
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.88em;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* OVERFLOW PROTECTION FOR IMAGES, TABLES, EMBEDS, AND MEDIA INSIDE CONTENT */
.entry-content img,
.entry-content picture,
.entry-content figure,
.entry-content canvas,
.entry-content svg,
.wp-block-image img,
figure.wp-block-image img,
figure img,
.wp-block-image,
.aligncenter,
.alignleft,
.alignright,
.alignnone {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
  object-fit: contain !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.entry-content table {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.entry-content iframe,
.entry-content video,
.entry-content embed,
.entry-content object,
.wp-block-embed iframe,
.wp-block-embed video {
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
}

.wp-block-columns {
  flex-wrap: wrap !important;
}

.wp-block-column {
  flex-basis: 100% !important;
  max-width: 100% !important;
}

/* Terminal Window Code Decorator */
.code-block-wrapper {
  background: var(--bg-terminal);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin: 2rem 0;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  width: 100%;
}

.code-block-header {
  background: #141b28;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.code-block-lang {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.copy-code-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.copy-code-btn:hover {
  background: rgba(163, 230, 53, 0.2);
  color: #a3e635;
  border-color: rgba(163, 230, 53, 0.4);
}

.entry-content pre,
.wp-block-code pre,
.code-block-wrapper pre {
  background: var(--bg-terminal) !important;
  padding: 1.4rem;
  overflow-x: auto !important;
  white-space: pre-wrap !important;
  word-break: break-all !important;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #e2e8f0;
  margin: 0;
  max-width: 100% !important;
  -webkit-overflow-scrolling: touch !important;
}

/* Author Box Widget */
.author-box {
  background: #141c2b;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-top: 2.5rem;
  width: 100%;
}

.author-box-avatar {
  width: 80px !important;
  height: 80px !important;
  border-radius: 50% !important;
  border: 3px solid var(--accent-blue) !important;
  box-shadow: 0 0 18px var(--accent-blue-glow) !important;
  object-fit: cover !important;
  flex-shrink: 0;
}

.author-box-info h4 {
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.author-box-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  line-height: 1.55;
}

.author-social-links {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.author-social-links a {
  color: var(--text-muted);
  font-size: 1rem;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.author-social-links a:hover {
  color: var(--accent-yellow);
}

/* Post Navigation Container */
.single-post-navigation-container {
  width: 100%;
}

.post-navigation {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin: 1.5rem 0 2rem 0;
  width: 100%;
}

.nav-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  text-decoration: none;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.nav-box:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.nav-box-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-yellow);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.nav-box-title {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
}

/* Sidebar & Widgets (Supporting Left & Right Sidebars) */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  width: 100%;
  min-width: 0;
}

.widget {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  padding: 1.2rem;
  width: 100%;
}

.widget-title {
  background: #141b28;
  margin: -1.2rem -1.2rem 1.2rem -1.2rem;
  padding: 0.9rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-yellow);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.widget-body {
  width: 100%;
}

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

.widget ul li {
  padding: 0.6rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.widget ul li:last-child {
  border-bottom: none;
}

.widget ul li a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.widget ul li a:hover {
  color: var(--accent-green);
}

.cat-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-purple);
  background: rgba(192, 132, 252, 0.12);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

/* WP Block Widgets & Core Widgets Formatting */
.widget_search .search-form,
.wp-block-search {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.wp-block-search__input {
  background: var(--bg-terminal);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  flex-grow: 1;
}

.wp-block-search__button {
  background: var(--accent-yellow);
  color: #000;
  border: none;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.tagcloud a,
.wp-block-tag-cloud a {
  font-family: var(--font-mono) !important;
  font-size: 0.76rem !important;
  padding: 0.28rem 0.7rem !important;
  border-radius: 4px !important;
  background: rgba(192, 132, 252, 0.14) !important;
  color: var(--accent-purple) !important;
  border: 1px solid rgba(192, 132, 252, 0.35) !important;
  text-decoration: none !important;
  display: inline-block !important;
  margin: 0.2rem !important;
}

/* Terminal Search Form Widget */
.search-form-terminal {
  display: flex;
  align-items: center;
  background: var(--bg-terminal);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.8rem;
  gap: 0.5rem;
  width: 100%;
  transition: border-color var(--transition-fast);
}

.search-form-terminal:focus-within {
  border-color: var(--accent-blue);
  box-shadow: 0 0 12px var(--accent-blue-glow);
}

.search-prompt {
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.search-field {
  flex-grow: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  width: 100%;
}

.search-submit-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  transition: color var(--transition-fast);
}

.search-submit-btn:hover {
  color: var(--accent-yellow);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
  width: 100%;
}

.page-numbers {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.page-numbers:hover,
.page-numbers.current {
  background: rgba(163, 230, 53, 0.15);
  color: var(--accent-green);
  border-color: rgba(163, 230, 53, 0.4);
  box-shadow: 0 0 10px var(--accent-green-glow);
}

/* Comments Section */
.comments-area {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  width: 100%;
  min-width: 0;
}

.comments-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.comment-list {
  list-style: none;
  margin-bottom: 2.5rem;
}

.comment-body {
  background: #141c2b;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin-bottom: 1.2rem;
}

.comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  gap: 0.8rem;
}

.comment-author-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.comment-avatar img {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  border: 1px solid var(--accent-purple) !important;
}

.comment-author-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}

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

.comment-content {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.comment-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.comment-form-field label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.comment-input,
.comment-textarea {
  background: var(--bg-terminal);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition-fast);
  width: 100%;
}

.comment-input:focus,
.comment-textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 10px var(--accent-blue-glow);
}

/* Floating Back-to-Top Button */
#back-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(18, 24, 36, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-hover);
  color: var(--accent-yellow);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  z-index: 999;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

#back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

#back-to-top-btn:hover {
  background: var(--accent-yellow);
  color: #000;
  transform: translateY(-3px);
  box-shadow: 0 0 15px var(--accent-yellow-glow);
}

/* Footer Section */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2.2rem 0;
  background: var(--bg-darker);
  width: 100%;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-socials a {
  color: var(--text-dim);
  font-size: 1.2rem;
  text-decoration: none;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.footer-socials a:hover {
  color: var(--accent-yellow);
  transform: translateY(-2px);
}

.footer-tag {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-green);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Responsive Breakpoints & Mobile Optimization */
@media (max-width: 1200px) {
  .blog-grid-layout.has-left-sidebar {
    grid-template-columns: 280px minmax(0, 1fr) 280px;
  }
}

/* MOBILE FLEX COLUMN LAYOUT (< 992px) */
@media (max-width: 992px) {
  .blog-grid-layout,
  .blog-grid-layout.has-left-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
  }

  .posts-container,
  .single-post-main,
  .single-post-wrapper,
  .error-404-card {
    order: 1;
    width: 100%;
  }

  .sidebar-left {
    order: 2;
    width: 100%;
  }

  .sidebar-right {
    order: 3;
    width: 100%;
  }

  /* FORCED ICON-ONLY SHARE BAR (< 992px) */
  .social-share-bar {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
  }

  .share-label,
  .desktop-only-text,
  .share-btn-text {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
  }

  .share-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: var(--radius-sm) !important;
    font-size: 1.2rem !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
  }

  .share-btn i {
    margin: 0 !important;
    font-size: 1.2rem !important;
    text-align: center !important;
  }
}

/* HIGH-PRECISION MOBILE RESPONSIVE POLISH (MAX-WIDTH: 768PX) */
@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
    --topbar-height: 36px;
  }

  .brand-logo-wrapper {
    gap: 0.45rem;
  }

  .logo-img,
  .custom-logo {
    height: 28px !important;
    max-height: 28px !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.35));
  }

  .subdomain-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
  }

  .container {
    padding: 0 0.5rem;
    width: 100%;
    max-width: 100%;
  }

  .main-wrapper {
    padding-top: calc(var(--topbar-height) + var(--nav-height) + 1rem);
    padding-bottom: 2.5rem;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
  }

  /* Full Width Cards and Wrappers on Mobile without Side Margins */
  .posts-container,
  .single-post-main {
    gap: 1.2rem;
    width: 100%;
  }

  .post-card,
  .single-post-wrapper,
  .comments-area,
  .widget,
  .author-box,
  .error-404-card {
    border-radius: var(--radius-md);
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
  }

  .post-thumbnail-link {
    aspect-ratio: 16 / 9;
    width: 100%;
  }

  .post-card-terminal-header {
    padding: 0.6rem 0.85rem;
    background: #0f1522;
  }

  .post-meta-inline {
    gap: 0.5rem 0.9rem;
    font-size: 0.75rem;
  }

  .post-author-avatar {
    width: 22px !important;
    height: 22px !important;
  }

  .post-category-badge {
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
  }

  .post-card-body {
    padding: 1.1rem 0.9rem;
  }

  .post-title {
    font-size: 1.25rem;
    line-height: 1.35;
    margin-bottom: 0.5rem;
  }

  .post-excerpt {
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 1rem;
  }

  .post-card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding-top: 0.75rem;
  }

  .btn-readmore {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
  }

  /* Single Article Mobile Formatting */
  .single-post-header {
    padding: 1.25rem 0.9rem;
  }

  .single-post-title {
    font-size: 1.45rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
  }

  .single-post-meta {
    gap: 0.6rem 1rem;
    font-size: 0.78rem;
  }

  .entry-content {
    padding: 1.25rem 0.9rem;
    font-size: 0.95rem;
    line-height: 1.68;
  }

  .entry-content p {
    margin-bottom: 1.1rem;
  }

  .entry-content h2 {
    font-size: 1.35rem;
    margin-top: 1.6rem;
    margin-bottom: 0.8rem;
  }

  .entry-content h3 {
    font-size: 1.18rem;
    margin-top: 1.4rem;
    margin-bottom: 0.6rem;
  }

  .code-block-wrapper {
    margin: 1.2rem 0;
  }

  .author-box {
    padding: 1rem;
    margin-top: 1.5rem;
  }

  .author-box-avatar {
    width: 60px !important;
    height: 60px !important;
  }

  .post-navigation {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin: 0;
  }

  .comments-area {
    padding: 1.2rem 0.9rem;
    margin-top: 1.5rem;
  }

  .top-bar {
    font-size: 0.75rem;
  }

  .top-bar-network-label {
    display: none;
  }

  .top-bar-container {
    justify-content: center;
  }
  
  .nav-links-wrapper {
    width: 100%;
  }

  .nav-links {
    display: flex;
    position: fixed;
    top: calc(var(--topbar-height) + var(--nav-height));
    left: 0;
    width: 100vw;
    height: calc(100vh - var(--topbar-height) - var(--nav-height));
    overflow-y: auto;
    background: rgba(11, 15, 23, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    padding: 1.8rem 1.5rem;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.7);
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-links > li {
    flex-direction: column;
    align-items: stretch;
    height: auto;
  }

  .nav-links a {
    font-size: 1.05rem;
    padding: 0.8rem 0;
    width: 100%;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
  }

  .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.03);
    border: none;
    border-left: 2px solid var(--accent-purple);
    border-radius: 0;
    margin-left: 0.8rem;
    padding: 0.3rem 0;
    display: none;
  }

  .nav-links li.active-mobile-dropdown > .sub-menu {
    display: block;
  }

  .nav-toggle {
    display: flex;
  }

  .footer-content {
    flex-direction: column;
    gap: 1.2rem;
    text-align: center;
  }
}
