@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Dark Mode Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #1a1d29;
    color: #e8eaed;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
}

/* Matrix Background Animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent 98%, rgba(0, 255, 0, 0.03) 100%),
        linear-gradient(0deg, transparent 98%, rgba(0, 255, 0, 0.03) 100%);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

/* Matrix Rain Effect - Blue theme, full screen */
.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.matrix-column {
    position: absolute;
    top: -100%;
    color: #60a5fa;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.2;
    opacity: 0.6;
    animation: matrix-fall linear infinite;
    text-shadow: 0 0 5px rgba(96, 165, 250, 0.5);
}

.matrix-column:nth-child(odd) {
    opacity: 0.3;
    animation-duration: 8s;
}

.matrix-column:nth-child(even) {
    opacity: 0.5;
    animation-duration: 12s;
}

.matrix-column:nth-child(3n) {
    opacity: 0.2;
    animation-duration: 15s;
    color: #93c5fd;
}

.matrix-column:nth-child(4n) {
    opacity: 0.4;
    animation-duration: 10s;
    color: #60a5fa;
    text-shadow: 0 0 8px rgba(96, 165, 250, 0.8);
}

/* DITA highlight styling - very bright and bold */
.dita-highlight {
    font-weight: 900;
    color: #ffffff;
    text-shadow: 
        0 0 10px #ffffff,
        0 0 20px #60a5fa,
        0 0 30px #3b82f6,
        0 0 40px #2563eb;
    font-size: 16px;
    letter-spacing: 1px;
    animation: dita-glow 2s ease-in-out infinite alternate;
}

@keyframes dita-glow {
    0% {
        text-shadow: 
            0 0 10px #ffffff,
            0 0 20px #60a5fa,
            0 0 30px #3b82f6,
            0 0 40px #2563eb;
    }
    100% {
        text-shadow: 
            0 0 15px #ffffff,
            0 0 25px #60a5fa,
            0 0 35px #3b82f6,
            0 0 45px #2563eb,
            0 0 55px #1d4ed8;
    }
}

@keyframes matrix-fall {
    0% {
        transform: translateY(-100vh);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

/* Main Content Area */
.content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
    position: relative;
}

/* Headers with gradient effect (bottom to top, darker to lighter) */
h1, h2, h3, h4, h5, h6 {
    background: linear-gradient(to top, #64748b, #cbd5e1, #f1f5f9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #f1f5f9; /* Fallback for browsers that don't support background-clip */
}

/* Enhanced gradient for main headings - keep original colors */
h1 {
    background: linear-gradient(to top, #475569, #94a3b8, #e2e8f0, #f8fafc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #f1f5f9; /* Fallback for browsers that don't support background-clip */
}

h2 {
    background: linear-gradient(to top, #475569, #94a3b8, #e2e8f0, #f8fafc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #4a9eff; /* Keep original blue color as fallback */
}

/* Specific styling for different header levels */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: 2rem 0 1rem 0;
    line-height: 1.2;
}

h2 {
    font-size: 1.875rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin: 1.5rem 0 1rem 0;
    line-height: 1.3;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 2rem 0 1rem 0;
    /* Gradient is inherited from h1-h6 rule above */
}

h4 {
    font-size: 1rem;
    font-weight: 500;
    font-style: italic;
    text-align: right;
    border-bottom: 2px solid #334155;
    padding: 0.5rem 0;
    margin: 1.5rem 0 1rem 0;
    /* Gradient is inherited from h1-h6 rule above */
}

/* Paragraphs and Text */
p {
    line-height: 1.6;
    margin: 1rem 0;
    color: #e2e8f0;
}

/* Links */
a {
    color: #60a5fa;
    text-decoration: underline;
    text-underline-position: under;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

a:hover {
    color: #93c5fd;
    background-color: rgba(74, 158, 255, 0.1);
    text-decoration: none;
}

a[href^="http"]::after,
a[href^="https://"]::after {
    content: "";
    width: 11px;
    height: 11px;
    margin-left: 4px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2360a5fa' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z'/%3E%3Cpath fill-rule='evenodd' d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    display: inline-block;
}

/* Navigation */
#navigation {
    margin-bottom: 2rem;
}

/* Lists */
ul, ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

li {
    line-height: 1.7;
    margin: 0.5rem 0;
    color: #e2e8f0;
}

/* Emphasis */
i, em {
    background-color: rgba(74, 158, 255, 0.1);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-style: italic;
    color: #93c5fd;
}

b, strong {
    font-weight: 600;
    color: #f1f5f9;
}

/* Subtitle */
.subtitle {
    margin: 1rem 0;
    font-style: italic;
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Code and Pre */
.prettyprint, pre, code {
/*    background-color: #0f172a !important;
    color: #e2e8f0 !important;
    border: 1px solid #334155 !important;
    border-radius: 0.5rem !important;*/
    padding: 1rem !important;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
    margin: 1rem 0;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.logo-container {
    text-align: center;
    margin: 2rem 0;
}

.alex-container {
    text-align: center;
    margin: 2rem 0;
}
.logo-container img {
	filter: invert(1) hue-rotate(-90deg);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
	
.author-image {
    width: 150px;
    height: auto;
    border-radius: 50%;
    margin: 1rem 0;
}

/* Chapter Styling - Enhanced with gradient and elegant shadows */
.chapter {
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 0.75rem;
    box-shadow: 
        0 15px 35px -5px rgba(0, 0, 0, 0.5),
        0 8px 15px -3px rgba(0, 0, 0, 0.3),
        0 4px 6px -1px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: visible;
    z-index: 2;
}

.chapter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.5), transparent);
}

.chapter:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 25px 50px -10px rgba(0, 0, 0, 0.6),
        0 15px 25px -5px rgba(0, 0, 0, 0.4),
        0 8px 16px -4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.chapter:first-child {
    margin-top: 0;
}

/* Business/Info Box */
.business {
    position: absolute;
    right: 2rem;
    top: 3rem;
    width: 300px;
    padding: 1.5rem;
    background-color: #1e293b;
    border: 2px solid #4a9eff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.business p {
    text-align: left;
    margin: 0.5rem 0;
    padding: 0;
    color: #e2e8f0;
}

/* Box Finished - Status Box - Enhanced with elegant design */
.box_finished {
    position: absolute;
    right: 2rem;
    top: 0.5rem;
    width: 350px;
    padding: 1.5rem;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    border-radius: 0.75rem;
    box-shadow: 
        0 15px 35px -5px rgba(0, 0, 0, 0.5),
        0 8px 15px -3px rgba(0, 0, 0, 0.3),
        0 4px 6px -1px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    z-index: 10;
    overflow: visible;
}

.box_finished::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.5), transparent);
}

.box_finished::after {
    content: "IN PROGRESS";
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    font-family: "Inter", sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: #00ff00;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid #00ff00;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transform: rotate(15deg);
    box-shadow: 
        0 8px 15px -3px rgba(0, 255, 0, 0.3),
        0 4px 6px -1px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(0, 255, 0, 0.2);
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

/* Video/iframe Styling */
iframe {
    width: 100%;
    max-width: 560px;
    height: 315px;
    border: none;
    border-radius: 0.5rem;
    margin: 1rem 0;
    background-color: #0f172a;
}

/* Intro Section - Enhanced with gradient and elegant shadows */
.intro {
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 0.75rem;
    box-shadow: 
        0 15px 35px -5px rgba(0, 0, 0, 0.4),
        0 8px 15px -3px rgba(0, 0, 0, 0.2),
        0 4px 6px -1px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(74, 158, 255, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.6), transparent);
}

/* Author Info - Enhanced with gradient and elegant shadows */
.author-info {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    border: 1px solid rgba(51, 65, 85, 0.8);
    box-shadow: 
        0 15px 35px -5px rgba(0, 0, 0, 0.5),
        0 8px 15px -3px rgba(0, 0, 0, 0.3),
        0 4px 6px -1px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: visible;
    z-index: 2;
}

.author-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.5), transparent);
}

/* Footer */
footer {
    margin-top: 4rem;
    padding: 2rem 0;
    text-align: center;
    background-color: #0f172a;
    color: #ffffff;
    font-weight: 600;
    border-top: 1px solid #334155;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content {
        margin-right: 0;
        max-width: 100%;
    }
    
    .box_finished {
        position: absolute;
        right: 1rem;
        top: 0.5rem;
        width: 300px;
    }
    
    .business {
        position: static;
        width: 100%;
        margin: 2rem 0;
    }
    
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .box_finished {
        position: static;
        width: 100%;
        margin: 1rem 0 2rem 0;
        right: auto;
        top: auto;
    }
    
    .chapter {
        padding: 1rem;
        margin: 2rem 0;
    }
    
    iframe {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    .chapter {
        padding: 0.75rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Selection Styling */
::selection {
    background-color: rgba(74, 158, 255, 0.3);
    color: #ffffff;
}