/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Times New Roman', 'Computer Modern', serif;
    line-height: 1.8;
    color: #e0e0e0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0f1f 25%, #0f0f23 50%, #1a1a2e 75%, #0a0a0a 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 0, 0.08) 0%, transparent 50%),
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(0, 255, 255, 0.03) 35px, rgba(0, 255, 255, 0.03) 70px);
    z-index: -1;
    animation: neuralPulse 8s ease-in-out infinite alternate;
}

@keyframes neuralPulse {
    0% { opacity: 0.2; }
    50% { opacity: 0.4; }
    100% { opacity: 0.2; }
}

/* Mathematical Greek symbols styling */
.greek {
    font-family: 'Times New Roman', serif;
    font-style: italic;
    color: #00ffff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
}

/* Research paper typography */
body {
    font-size: 11pt;
    text-align: justify;
}

/* LaTeX-style equation blocks */
.equation {
    font-family: 'Times New Roman', 'Computer Modern', serif;
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid #00ffff;
    border-right: 3px solid #ff00ff;
    position: relative;
}

.equation::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #00ffff, #ff00ff, #ffff00, #00ffff);
    z-index: -1;
    opacity: 0.3;
    animation: neonGlow 2s ease-in-out infinite alternate;
}

@keyframes neonGlow {
    0% { opacity: 0.2; }
    100% { opacity: 0.6; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(16, 16, 32, 0.8) 100%);
    backdrop-filter: blur(15px);
    border: 2px solid transparent;
    border-image: linear-gradient(45deg, #00ffff, #ff00ff, #ffff00) 1;
    color: #e0e0e0;
    padding: 2rem 0;
    text-align: center;
    position: relative;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(255, 0, 255, 0.1);
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(0, 255, 255, 0.1) 50%, transparent 70%);
    animation: neuralFlow 3s linear infinite;
}

header::after {
    content: '∑ ∫ ∂ ∇ ∞';
    position: absolute;
    top: 10px;
    right: 20px;
    font-family: 'Times New Roman', serif;
    font-size: 14px;
    color: rgba(0, 255, 255, 0.3);
    letter-spacing: 8px;
}

@keyframes neuralFlow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 
        0 0 10px rgba(0, 255, 255, 0.8),
        0 0 20px rgba(255, 0, 255, 0.6),
        0 0 30px rgba(255, 255, 0, 0.4);
    position: relative;
    z-index: 1;
    font-family: 'Times New Roman', 'Computer Modern', serif;
}

header h1 a {
    color: transparent;
    text-decoration: none;
    background: linear-gradient(45deg, #00ffff, #ff00ff, #ffff00, #00ffff);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
    position: relative;
}

header h1 a::after {
    content: 'NeuralNetworks.tech = f(θ, W, b)';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: rgba(0, 255, 255, 0.6);
    font-family: 'Times New Roman', serif;
    white-space: nowrap;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
}

/* Navigation */
nav {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(16, 16, 32, 0.9) 100%);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 255, 255, 0.3);
    border-bottom: 1px solid rgba(255, 0, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(0, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

nav ul li {
    margin: 0 1.5rem;
}

nav ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-family: 'Times New Roman', serif;
    text-transform: lowercase;
    letter-spacing: 1px;
}

nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

nav ul li a::after {
    content: 'α';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 8px;
    color: rgba(255, 255, 0, 0.6);
    font-family: 'Times New Roman', serif;
    font-style: italic;
}

nav ul li a:hover {
    color: white;
    transform: translateY(-2px);
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
}

nav ul li a:hover::before {
    opacity: 0.2;
}

/* Main content */
main {
    padding: 2rem 0;
}

section {
    margin-bottom: 3rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: transparent;
    border-bottom: 3px solid transparent;
    padding-bottom: 0.5rem;
    background: linear-gradient(45deg, #00ffff, #ff00ff, #ffff00, #00ffff);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
    position: relative;
    font-family: 'Times New Roman', 'Computer Modern', serif;
    font-weight: 600;
    text-shadow: 
        0 0 10px rgba(0, 255, 255, 0.5),
        0 0 20px rgba(255, 0, 255, 0.3);
}

h2::before {
    content: 'θ';
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 0, 0.6);
    font-family: 'Times New Roman', serif;
    font-style: italic;
    font-size: 16px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #00ffff, #ff00ff, #ffff00);
    border-radius: 2px;
    animation: expandWidth 2s ease-out;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

@keyframes expandWidth {
    0% { width: 0; }
    100% { width: 100px; }
}

/* Post grid */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.post-card {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(16, 16, 32, 0.7) 100%);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(0, 255, 255, 0.1),
        inset 0 0 20px rgba(255, 0, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1) 0%, rgba(255, 0, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-card::after {
    content: '∇';
    position: absolute;
    top: 10px;
    right: 10px;
    font-family: 'Times New Roman', serif;
    font-size: 12px;
    color: rgba(255, 255, 0, 0.4);
    font-style: italic;
}

.post-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 255, 255, 0.3),
        0 0 30px rgba(255, 0, 255, 0.2),
        inset 0 0 30px rgba(255, 255, 0, 0.1);
    border-color: rgba(0, 255, 255, 0.5);
}

.post-card:hover::before {
    opacity: 1;
}

.post-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    position: relative;
    z-index: 1;
    font-family: 'Times New Roman', 'Computer Modern', serif;
    font-weight: 600;
}

.post-card h3 a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    background: linear-gradient(45deg, rgba(0, 255, 255, 0.9), rgba(255, 0, 255, 0.9));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    position: relative;
}

.post-card h3 a::before {
    content: 'f(x)';
    position: absolute;
    top: -15px;
    left: 0;
    font-size: 10px;
    color: rgba(255, 255, 0, 0.5);
    font-family: 'Times New Roman', serif;
    font-style: italic;
}

.post-card h3 a:hover {
    background-position: 100% 50%;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
}

.post-card p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    font-family: 'Times New Roman', serif;
    text-align: justify;
    font-size: 10.5pt;
    line-height: 1.6;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(255, 0, 255, 0.2) 100%);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(0, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    font-family: 'Times New Roman', serif;
    text-transform: lowercase;
    letter-spacing: 0.5px;
}

.tag::before {
    content: 'λ';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8px;
    color: rgba(255, 255, 0, 0.6);
    font-family: 'Times New Roman', serif;
    font-style: italic;
}

.tag:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3) 0%, rgba(255, 0, 255, 0.3) 100%);
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.tag:nth-child(1) { background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 255, 255, 0.3) 100%); color: rgba(0, 255, 255, 0.9); border-color: rgba(0, 255, 255, 0.4); }
.tag:nth-child(2) { background: linear-gradient(135deg, rgba(255, 0, 255, 0.2) 0%, rgba(255, 0, 255, 0.3) 100%); color: rgba(255, 0, 255, 0.9); border-color: rgba(255, 0, 255, 0.4); }
.tag:nth-child(3) { background: linear-gradient(135deg, rgba(255, 255, 0, 0.2) 0%, rgba(255, 255, 0, 0.3) 100%); color: rgba(255, 255, 0, 0.9); border-color: rgba(255, 255, 0, 0.4); }

/* About section */
#about {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(16, 16, 32, 0.6) 100%);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 255, 255, 0.2);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(0, 255, 255, 0.1),
        inset 0 0 20px rgba(255, 0, 255, 0.05);
    position: relative;
}

#about::before {
    content: '∫';
    position: absolute;
    top: 10px;
    left: 10px;
    font-family: 'Times New Roman', serif;
    font-size: 16px;
    color: rgba(255, 255, 0, 0.4);
    font-style: italic;
}

#about p {
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Times New Roman', serif;
    text-align: justify;
    font-size: 11pt;
    line-height: 1.7;
}

/* Footer */
footer {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(16, 16, 32, 0.8) 100%);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(0, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    position: relative;
}

footer::before {
    content: 'π ≈ 3.14159...';
    position: absolute;
    top: 10px;
    left: 20px;
    font-family: 'Times New Roman', serif;
    font-size: 10px;
    color: rgba(255, 255, 0, 0.4);
    font-style: italic;
}

footer::after {
    content: 'e ≈ 2.71828...';
    position: absolute;
    top: 10px;
    right: 20px;
    font-family: 'Times New Roman', serif;
    font-size: 10px;
    color: rgba(255, 255, 0, 0.4);
    font-style: italic;
}

/* Blog post specific styles */
.post-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.post-content {
    max-width: 800px;
    margin: 0 auto;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.post-content h1 { font-size: 2.5rem; }
.post-content h2 { font-size: 2rem; border-bottom: 2px solid #667eea; padding-bottom: 0.5rem; }
.post-content h3 { font-size: 1.5rem; }
.post-content h4 { font-size: 1.3rem; }

.post-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

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

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

.post-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #666;
}

.post-content code {
    background: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
}

.post-content pre {
    background: #f4f4f4;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.post-content th,
.post-content td {
    border: 1px solid #ddd;
    padding: 0.75rem;
    text-align: left;
}

.post-content th {
    background: #f8f9fa;
    font-weight: 600;
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #764ba2;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 0.5rem 0;
    }
    
    .post-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .post-content h1 {
        font-size: 2rem;
    }
    
    .post-content h2 {
        font-size: 1.5rem;
    }
}

/* Footer links styling */
.footer-links {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 255, 255, 0.3);
}

.footer-links h4 {
    color: #00ffff;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: center;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
}

.link-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.link-category {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
}

.link-category h5 {
    color: #ffff00;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.link-category a {
    display: block;
    color: #e0e0e0;
    text-decoration: none;
    padding: 0.3rem 0;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
    padding-left: 0.5rem;
}

.link-category a:hover {
    color: #00ffff;
    border-left-color: #00ffff;
    text-shadow: 0 0 6px rgba(0, 255, 255, 0.6);
    transform: translateX(3px);
}

@media (max-width: 768px) {
    .link-categories {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1.5rem 0;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .post-card {
        padding: 1rem;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-links {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
    
    .link-category {
        padding: 0.8rem;
    }
}
