/* Recursion Page Styles */

.page-hero {
    background: var(--gradient-1);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Fractal background pattern */
.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 2px, transparent 2px),
        radial-gradient(circle at 75% 25%, rgba(255,255,255,0.08) 1px, transparent 1px),
        radial-gradient(circle at 25% 75%, rgba(255,255,255,0.06) 3px, transparent 3px),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.04) 1.5px, transparent 1.5px),
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.05) 4px, transparent 4px),
        repeating-conic-gradient(from 0deg at 50% 50%, 
            transparent 0deg, 
            rgba(255,255,255,0.03) 30deg, 
            transparent 60deg, 
            rgba(255,255,255,0.02) 90deg);
    background-size: 80px 80px, 40px 40px, 120px 120px, 60px 60px, 200px 200px, 300px 300px;
    animation: fractalFloat 20s ease-in-out infinite;
    z-index: 1;
}

/* Spiral fractal overlay */
.page-hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px;
    height: 800px;
    transform: translate(-50%, -50%);
    background: 
        repeating-conic-gradient(from 0deg at 50% 50%, 
            transparent 0deg, 
            rgba(255,255,255,0.02) 5deg, 
            transparent 10deg),
        repeating-conic-gradient(from 45deg at 50% 50%, 
            transparent 0deg, 
            rgba(255,255,255,0.015) 3deg, 
            transparent 6deg);
    border-radius: 50%;
    animation: fractalRotate 30s linear infinite;
    z-index: 1;
}

@keyframes fractalFloat {
    0%, 100% { 
        transform: translateY(0px) scale(1); 
        opacity: 0.6;
    }
    50% { 
        transform: translateY(-10px) scale(1.02); 
        opacity: 0.8;
    }
}

@keyframes fractalRotate {
    0% { 
        transform: translate(-50%, -50%) rotate(0deg); 
    }
    100% { 
        transform: translate(-50%, -50%) rotate(360deg); 
    }
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

.page-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

header.page-hero .container .hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    font-style: italic;
    color: white !important;
}

.page-hero p.hero-subtitle {
    color: white !important;
}

.content-section {
    padding-top: 4rem;
}

.recursion-intro {
    max-width: 800px;
    margin: 0 auto;
}

.lead {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 2rem;
    font-weight: 500;
}

.recursion-contexts {
    margin: 3rem 0;
    display: grid;
    gap: 2rem;
}

.context-item {
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--purple-light);
}

.context-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.context-item p {
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
}

.ai-context {
    margin: 4rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 10px;
}

.ai-context h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.ai-context p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.recursion-human-thought {
    margin: 4rem 0;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.recursion-human-thought h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.recursion-human-thought h3 {
    color: var(--purple-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.recursion-human-thought p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.recursion-human-thought ul {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.recursion-human-thought ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.recursion-human-thought ul li::before {
    content: "↻";
    position: absolute;
    left: 0;
    color: var(--purple-light);
    font-size: 1.2rem;
}

.recursion-human-thought pre {
    background: #1e1e1e;
    padding: 1.5rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.recursion-human-thought code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    color: #e0e0e0;
    line-height: 1.6;
}

.recursion-summary {
    margin-top: 3rem;
    text-align: center;
}

.emphasis {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--purple-dark);
    line-height: 1.6;
}

/* Visual recursion effect */
.recursion-intro::before {
    content: "∞";
    position: absolute;
    font-size: 15rem;
    opacity: 0.03;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: var(--purple-light);
    z-index: -1;
}

/* Carousel Section */
.carousel-section {
    margin: 4rem 0;
    padding: 2rem 0;
    background: var(--bg-light);
}

.carousel-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-size: 2rem;
}

.carousel-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: white;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.3s ease;
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    font-size: 2rem;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 2;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.95);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-dot.active {
    background: var(--purple-dark);
}

/* Video Section */
.video-section {
    margin-top: 4rem;
    margin-bottom: 4rem;
    padding-bottom: 2rem;
}

.video-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-size: 2rem;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.video-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Blog Posts Carousel */
.blog-carousel-section {
    margin: 4rem 0;
    padding: 3rem 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
    border-radius: 20px;
}

.blog-carousel-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-size: 2rem;
    font-weight: 600;
}

.blog-carousel-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}

.blog-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.blog-carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.blog-carousel-slide {
    min-width: 100%;
    padding: 0 2rem;
}

.blog-post-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15);
}

.post-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--bg-light);
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.post-content {
    padding: 2rem;
}

.post-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    line-height: 1.3;
}

.post-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-excerpt {
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.read-more-link {
    color: var(--purple-light);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
}

.read-more-link:hover {
    color: var(--purple-dark);
}

/* Blog Carousel Navigation */
.blog-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.blog-carousel-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.blog-carousel-prev {
    left: 1rem;
}

.blog-carousel-next {
    right: 1rem;
}

.blog-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.blog-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-carousel-dot.active {
    background: var(--purple-light);
    transform: scale(1.2);
}

.loading-message,
.no-posts,
.error-message {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 1.125rem;
}

.error-message {
    color: #e74c3c;
}

/* Interview Section */
.interview-section {
    margin: 4rem 0;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.interview-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 2rem;
    text-align: center;
}

.interview-video {
    max-width: 800px;
    margin: 0 auto 2rem;
}

.interview-description {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .page-hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .emphasis {
        font-size: 1.25rem;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-carousel-section {
        padding: 2rem 0;
        margin: 2rem 0;
    }
    
    .blog-carousel-slide {
        padding: 0 1rem;
    }
    
    .post-content {
        padding: 1.5rem;
    }
    
    .post-content h3 {
        font-size: 1.25rem;
    }
    
    .blog-carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .blog-carousel-prev {
        left: 0.5rem;
    }
    
    .blog-carousel-next {
        right: 0.5rem;
    }
    
    .interview-section {
        padding: 2rem 1rem;
    }
}