/* Cyberpunk Theme - Clean & Optimized */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Orbitron:wght@400;500;700;900&display=swap');
/* ===== CSS VARIABLES ===== */
:root {
/* Colors */
--dark-bg: #0a0a0a;
--dark-fg: #ffffff;
--glass-bg: rgba(10, 10, 10, 0.9);
--glass-border: rgba(255, 0, 98, 0.3);
--neon-pink: #ff0062;
--bright-cyan: #0FF6DF;
--bright-green: #39DE8D;
--bright-yellow: #F2F200;
--electric-purple: #8a1bFF;
--dark-magenta: #cb0c59;
--hot-pink: #E60073;
--acid-green: #B2FF00;
/* Typography */
--font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
--font-display: 'Orbitron', 'Inter', system-ui, sans-serif;
--font-body: 'Inter', system-ui, sans-serif;
/* Effects */
--shadow: 0 2px 12px rgba(255, 0, 98, 0.2);
--shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
}
/* ===== BASE STYLES ===== */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
html, body {
min-height: 100%;
height: auto;
/* No overflow properties - removed to fix position: sticky on TOC */
}
body {
font-family: var(--font-body);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
color: var(--dark-fg) !important;
background-color: #00101e !important;
background-image: none !important;
scroll-behavior: smooth; /* Added to ensure smooth scrolling on body as well */
max-width: 100vw; /* Prevent horizontal overflow without breaking sticky */
overflow-x: hidden; /* Safe to use on body only, not html */
}
/* Firefox-specific optimizations */
@-moz-document url-prefix() {
body {
background-image: none;
background: #001a33;
transform: translate3d(0, 0, 0); /* Force hardware acceleration for smoother scrolling */
will-change: scroll-position; /* Hint to browser for scrolling optimization */
}
.bg-layers {
opacity: 0.08;
transform: translate3d(0, 0, 0);
backface-visibility: hidden;
}
.bg-layers .grid,
.bg-layers .scan {
backface-visibility: hidden;
}
.bg-layers .scan {
background-image: none; /* Remove expensive diagonal gradient for better performance */
}
.toc {
backdrop-filter: none;
background: rgba(10, 10, 10, 0.95);
will-change: transform;
transform: translateZ(0);
backface-visibility: hidden;
box-shadow: none;
}
article {
backdrop-filter: none;
box-shadow: none; /* Reduce shadows for better scrolling performance */
}
}
/* ===== BACKGROUND LAYERS ===== */
.bg-layers {
position: fixed;
inset: 0;
z-index: 0;
pointer-events: none;
}
/* Styles for HTML child elements inside .bg-layers */
.bg-layers .grid {
position: absolute;
inset: 0;
background-image:
linear-gradient(90deg, rgba(0, 0, 128, 0.08) 1px, transparent 1px),
linear-gradient(rgba(0, 31, 63, 0.06) 1px, transparent 1px);
background-size: 60px 60px;
opacity: 0.15;
pointer-events: none;
transform: translateZ(0);
}
.bg-layers .scan {
position: absolute;
inset: 0;
background-image:
repeating-linear-gradient(45deg, transparent, transparent 15px, rgba(0, 128, 255, 0.03) 15px, rgba(0, 128, 255, 0.03) 16px);
opacity: 0.1;
pointer-events: none;
transform: translateZ(0);
}
/* ===== LAYOUT ===== */
.container {
position: relative;
z-index: 1;
max-width: 1100px;
margin: 0 auto;
padding: 20px;
padding-top: 80px;
overflow: visible; /* Ensure no overflow restriction */
}
.layout {
display: grid;
grid-template-columns: 260px 1fr;
gap: 20px;
align-items: start;
position: relative;
overflow: visible; /* Ensure no overflow restriction */
}
/* ===== PROGRESS BAR ===== */
.progress {
position: fixed;
top: 0;
left: 0;
height: 3px;
width: 0%;
z-index: 10;
background: linear-gradient(90deg, var(--bright-cyan), var(--neon-pink));
box-shadow: 0 0 12px rgba(0, 245, 255, 0.6);
}
/* ===== HEADER ===== */
header {
background: var(--glass-bg);
border: 1px solid var(--glass-border);
border-radius: 14px;
padding: 16px;
margin: 16px 0 24px;
box-shadow: var(--shadow);
}
.header-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.header-left {
display: flex;
align-items: center;
gap: 12px;
}
.title {
font-family: var(--font-display);
font-weight: 700;
letter-spacing: -0.02em;
font-size: clamp(32px, 6vw, 56px);
color: var(--neon-pink);
text-shadow:
0 0 10px rgba(255, 0, 98, 0.8),
0 0 20px rgba(255, 0, 98, 0.6),
0 0 30px rgba(255, 0, 98, 0.4);
line-height: 1.1;
position: relative;
}
.title::before {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(45deg, var(--neon-pink), var(--bright-cyan), var(--bright-green));
background-size: 200% 200%;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
opacity: 0;
transition: opacity 0.3s ease;
}
.title:hover {
text-shadow:
0 0 15px rgba(255, 0, 98, 0.9),
0 0 30px rgba(255, 0, 98, 0.7),
0 0 45px rgba(255, 0, 98, 0.5),
0 0 60px rgba(203, 12, 89, 0.3);
}
.title:hover::before {
opacity: 0.8;
}
.meta {
display: flex;
flex-wrap: wrap;
gap: 12px;
opacity: 0.9;
margin-top: 8px;
}
.meta span {
display: inline-flex;
align-items: center;
gap: 6px;
}
.meta i, .meta svg {
font-size: 12px;
color: var(--bright-cyan);
opacity: 0.85;
}
.meta time, #postAuthor, #postReading {
color: var(--bright-cyan);
}
/* ===== HOME BUTTON ===== */
.home-button {
position: fixed;
top: 30px;
left: 30px;
z-index: 1001;
background: rgba(10, 10, 10, 0.95);
backdrop-filter: blur(12px);
border: 1px solid var(--glass-border);
border-radius: 12px;
padding: 12px;
box-shadow: var(--shadow);
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
min-width: 48px;
min-height: 48px;
text-decoration: none;
color: inherit;
}
.home-button:hover {
transform: translateY(-2px) scale(1.05);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 20px rgba(15, 246, 223, 0.2);
background: rgba(10, 10, 10, 0.98);
}
.home-button:focus {
outline: 2px solid var(--bright-cyan);
outline-offset: 2px;
}
.home-button span {
display: none;
}
/* ===== TOC (TABLE OF CONTENTS) ===== */
.toc {
background: rgba(10, 10, 10, 0.85);
backdrop-filter: blur(12px);
border: 1px solid var(--glass-border);
border-radius: 16px;
padding: 20px;
box-shadow: var(--shadow);
scrollbar-width: thin;
scrollbar-color: var(--bright-cyan) rgba(10, 10, 10, 0.5);
/* Ensure sticky behavior */
position: sticky;
position: -webkit-sticky; /* Safari/older WebKit */
top: 20px;
max-height: calc(100vh - 40px);
overflow-y: auto;
z-index: 100;
}
.toc::-webkit-scrollbar {
width: 6px;
}
.toc::-webkit-scrollbar-track {
background: rgba(10, 10, 10, 0.3);
border-radius: 3px;
}
.toc::-webkit-scrollbar-thumb {
background: var(--bright-cyan);
border-radius: 3px;
box-shadow: 0 0 6px rgba(15, 246, 223, 0.3);
}
.toc h3 {
font-size: 16px;
font-weight: 600;
margin-bottom: 12px;
color: var(--bright-cyan);
text-shadow: 0 0 8px rgba(15, 246, 223, 0.4);
border-bottom: 1px solid rgba(15, 246, 223, 0.2);
padding-bottom: 8px;
position: sticky;
top: 0;
z-index: 1;
background: rgba(10, 10, 10, 0.9);
}
.toc ul {
list-style: none;
display: grid;
gap: 8px;
margin: 0;
padding: 0;
}
.toc li {
border-radius: 8px;
overflow: hidden;
transition: all 0.3s ease;
}
.toc li:hover {
background: rgba(15, 246, 223, 0.05);
}
.toc a {
display: block;
color: inherit;
text-decoration: none;
font-size: 14px;
opacity: 0.8;
padding: 6px 8px;
border-radius: 6px;
transition: all 0.3s ease;
border-left: 3px solid transparent;
}
.toc a:hover {
opacity: 1;
color: var(--bright-cyan);
background: rgba(15, 246, 223, 0.08);
border-left-color: rgba(15, 246, 223, 0.5);
text-shadow: 0 0 8px rgba(15, 246, 223, 0.3);
}
.toc a.active {
opacity: 1;
color: var(--bright-cyan);
background: rgba(15, 246, 223, 0.1);
border-left-color: var(--bright-cyan);
text-shadow: 0 0 12px rgba(15, 246, 223, 0.5);
font-weight: 500;
}
.toc-toggle {
display: none;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
background: var(--glass-bg);
border: 1px solid var(--glass-border);
border-radius: 12px;
color: inherit;
cursor: pointer;
transition: transform 0.25s ease, box-shadow 0.25s ease;
box-shadow: var(--shadow);
}
.toc-toggle:hover {
transform: translateY(-2px);
box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
}
.toc-toggle:focus {
outline: 2px solid var(--bright-cyan);
outline-offset: 2px;
}
/* ===== ARTICLE ===== */
article {
background: var(--glass-bg);
border: 1px solid var(--glass-border);
border-radius: 16px;
padding: 28px;
box-shadow: var(--shadow);
position: relative;
overflow: visible;
}
article::before {
content: '';
position: absolute;
inset: -1px;
border-radius: 16px;
padding: 1px;
background: linear-gradient(135deg,
rgba(0, 245, 255, 0.4),
rgba(255, 27, 107, 0.3),
rgba(242, 233, 0, 0.3),
rgba(0, 122, 255, 0.4));
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
-webkit-mask-composite: xor;
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
mask-composite: exclude;
pointer-events: none;
opacity: 0.6;
}
article p {
line-height: 1.8;
margin: 16px 0;
color: var(--dark-fg);
text-align: justify;
hyphens: auto;
word-wrap: break-word;
overflow-wrap: break-word;
}
article h1 {
font-size: clamp(28px, 6vw, 42px);
font-weight: 900;
color: var(--neon-pink);
text-shadow: 0 0 15px rgba(255, 0, 98, 0.6);
margin-top: 24px;
margin-bottom: 12px;
font-family: var(--font-display);
}
article h2 {
font-size: clamp(24px, 5vw, 32px);
font-weight: 900;
color: var(--bright-cyan);
text-shadow: 0 0 15px rgba(0, 245, 255, 0.6);
margin-top: 32px;
margin-bottom: 10px;
font-family: var(--font-display);
position: relative;
}
article h2::before {
content: '';
position: absolute;
left: 0;
bottom: -5px;
width: 60px;
height: 2px;
background: linear-gradient(90deg, var(--bright-cyan), var(--electric-purple));
border-radius: 1px;
}
article h3 {
font-size: clamp(20px, 4vw, 24px);
font-weight: 700;
color: var(--bright-yellow);
text-shadow: 0 0 10px rgba(242, 233, 0, 0.4);
margin-top: 24px;
margin-bottom: 10px;
font-family: var(--font-display);
}
article h4 {
font-size: clamp(18px, 3vw, 20px);
font-weight: 600;
color: var(--acid-green);
text-shadow: 0 0 8px rgba(178, 255, 0, 0.3);
margin-top: 20px;
margin-bottom: 10px;
font-family: var(--font-display);
}
article a {
color: var(--bright-cyan);
text-decoration: none;
border-bottom: 1px solid transparent;
transition: all 0.3s ease;
text-shadow: 0 0 8px rgba(0, 245, 255, 0.3);
}
article a:hover {
border-bottom-color: var(--bright-cyan);
text-shadow: 0 0 12px rgba(0, 245, 255, 0.6);
color: var(--bright-yellow);
}
article a:focus {
outline: 2px solid var(--bright-cyan);
outline-offset: 2px;
border-radius: 2px;
}
article img {
max-width: 100%;
height: auto;
border-radius: 12px;
margin: 16px 0;
filter: saturate(1.15) contrast(1.05) brightness(1.05);
border: 1px solid rgba(0, 245, 255, 0.2);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
display: block;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
article img:hover {
transform: scale(1.02);
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
article blockquote {
margin: 20px 0;
padding: 16px 20px;
border-left: 4px solid var(--bright-cyan);
background: rgba(0, 245, 255, 0.08);
border-radius: 10px;
position: relative;
box-shadow: inset 0 0 15px rgba(0, 245, 255, 0.1);
font-style: italic;
}
article blockquote::before {
content: '"';
position: absolute;
top: -10px;
left: 10px;
font-size: 48px;
color: var(--bright-cyan);
opacity: 0.3;
font-family: var(--font-display);
}
article ul, article ol {
margin: 16px 0;
padding-left: 24px;
}
article li {
margin: 8px 0;
line-height: 1.6;
}
article ul li::marker {
color: var(--bright-cyan);
}
article ol li::marker {
color: var(--neon-pink);
}
article hr {
border: none;
height: 1px;
background: linear-gradient(90deg, transparent, var(--bright-cyan), transparent);
margin: 32px 0;
opacity: 0.5;
}
/* ===== CODE BLOCKS ===== */
pre, code {
font-family: var(--font-mono);
}
code {
background: rgba(0, 245, 255, 0.08);
border: 1px solid rgba(0, 245, 255, 0.3);
padding: 3px 8px;
border-radius: 8px;
font-size: 0.95em;
color: var(--bright-yellow);
text-shadow: 0 0 5px rgba(242, 233, 0, 0.3);
transition: all 0.3s ease;
}
code:hover {
background: rgba(0, 245, 255, 0.15);
border-color: rgba(0, 245, 255, 0.5);
box-shadow: 0 0 10px rgba(0, 245, 255, 0.3);
}
pre {
background: rgba(10, 10, 10, 0.8);
border: 1px solid rgba(0, 245, 255, 0.3);
padding: 18px;
border-radius: 12px;
overflow: auto;
box-shadow:
inset 0 0 15px rgba(0, 245, 255, 0.1),
0 0 20px rgba(0, 245, 255, 0.1);
position: relative;
margin: 20px 0;
}
pre::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 2px;
background: linear-gradient(90deg,
transparent,
var(--bright-cyan),
var(--electric-purple),
var(--acid-green),
transparent);
border-radius: 12px 12px 0 0;
}
pre code {
background: transparent;
border: none;
padding: 0;
color: var(--dark-fg);
text-shadow: none;
}
/* ===== SOCIAL SHARE ===== */
.social-share {
backdrop-filter: blur(10px);
background: var(--glass-bg);
border: 1px solid var(--glass-border);
border-radius: 14px;
padding: 20px;
margin: 24px 0;
box-shadow: var(--shadow);
text-align: center;
}
.social-share h4 {
margin-bottom: 12px;
color: var(--neon-pink);
}
.share-buttons {
display: flex;
gap: 12px;
justify-content: center;
flex-wrap: wrap;
}
.share-btn {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 10px 16px;
border-radius: 10px;
text-decoration: none;
font-size: 14px;
font-weight: 600;
border: 1px solid var(--glass-border);
transition: transform 0.25s ease, box-shadow 0.25s ease;
min-height: 44px;
min-width: 44px;
}
.share-btn:focus {
outline: 2px solid var(--bright-cyan);
outline-offset: 2px;
}
.share-btn.twitter {
background: rgba(255, 0, 98, 0.1);
color: var(--neon-pink);
}
.share-btn.linkedin {
background: rgba(203, 12, 89, 0.1);
color: var(--dark-magenta);
}
.share-btn.copy {
background: rgba(57, 222, 141, 0.1);
color: var(--bright-green);
}
.share-btn:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
/* ===== FOOTER ===== */
.post-footer {
margin-top: 40px;
}
.footer-content {
text-align: center;
}
.footer-content p {
margin-bottom: 12px;
opacity: 0.8;
font-size: 14px;
}
.footer-links {
display: flex;
gap: 16px;
justify-content: center;
flex-wrap: wrap;
}
.footer-links a {
color: var(--neon-pink);
text-decoration: none;
font-weight: 600;
transition: text-shadow 0.25s ease;
}
.footer-links a:hover {
text-shadow: 0 0 8px rgba(255, 0, 98, 0.6);
}
/* ===== TAGS ===== */
.tag {
font-size: 12px;
padding: 6px 12px;
border-radius: 999px;
background: rgba(15, 246, 223, 0.08);
border: 1px solid rgba(15, 246, 223, 0.3);
box-shadow: 0 0 12px rgba(15, 246, 223, 0.2) inset;
transition: all 0.3s ease;
font-weight: 500;
cursor: pointer;
}
.tag:hover {
background: rgba(15, 246, 223, 0.15);
border-color: rgba(15, 246, 223, 0.5);
transform: scale(1.05);
box-shadow: 0 0 15px rgba(15, 246, 223, 0.3);
}
/* ===== TOAST NOTIFICATIONS ===== */
.toast {
position: fixed;
bottom: 30px;
left: 50%;
transform: translateX(-50%) translateY(100px);
background: var(--glass-bg);
border: 1px solid var(--glass-border);
border-radius: 12px;
padding: 16px 24px;
box-shadow: var(--shadow-lg);
z-index: 9999;
opacity: 0;
transition: all 0.3s ease;
}
.toast.show {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
/* ===== RESPONSIVE DESIGN ===== */
@media (min-width: 1400px) {
.home-button {
top: 40px;
left: 40px;
padding: 16px;
}
}
@media (min-width: 1200px) and (max-width: 1399px) {
.home-button {
top: 35px;
left: 35px;
padding: 14px;
}
}
@media (min-width: 769px) {
.social-share, .post-footer {
width: calc(100% - 260px - 20px);
margin-left: calc(260px + 20px);
}
/* TOC sticky positioning - ensure it sticks on desktop */
.toc {
position: sticky;
position: -webkit-sticky;
}
.layout article {
grid-column: 2;
}
}
@media (max-width: 980px) {
.home-button {
position: absolute;
top: 20px;
left: 20px;
z-index: 50;
}
}
@media (max-width: 768px) {
.layout {
grid-template-columns: 1fr;
}
.container {
padding: 10px;
padding-top: 70px;
}
.toc-toggle {
display: flex;
min-width: 44px;
min-height: 44px;
justify-content: center;
align-items: center;
}
.toc {
display: none;
position: fixed;
top: 120px;
left: 20px;
right: 20px;
z-index: 100;
max-height: calc(100vh - 160px);
overflow-y: auto;
/* Disable sticky on mobile */
}
.toc.visible {
display: block;
}
.home-button {
position: fixed;
top: auto;
left: auto;
bottom: 30px;
right: 30px;
padding: 16px;
}
.home-button:hover {
transform: translateY(-3px) scale(1.08);
}
.share-btn {
min-width: 48px;
min-height: 48px;
padding: 12px 16px;
font-size: 16px;
}
}
@media (max-width: 480px) {
.container {
padding-top: 60px;
}
.home-button {
bottom: 20px;
right: 20px;
padding: 14px;
min-width: 44px;
min-height: 44px;
}
}
/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
* {
transition: none;
animation-duration: 0.001ms;
animation-iteration-count: 1;
}
body {
opacity: 1;
transform: none;
}
}
@media (prefers-contrast: high) {
:root {
--dark-bg: #000000;
--dark-fg: #ffffff;
--glass-border: rgba(0, 245, 255, 0.8);
}
article, header, footer {
border-color: rgba(0, 245, 255, 0.5);
}
.tag {
border-color: rgba(0, 245, 255, 0.6);
}
}
/* ===== PRINT STYLES ===== */
@media print {
.bg-layers,
.progress,
.toc-toggle,
.home-button,
.social-share,
.footer-links a[href="#top"] {
display: none !important;
}
body {
background: white !important;
color: black !important;
}
article {
background: white !important;
border: none !important;
box-shadow: none !important;
}
}