/* ===================================
   TILLRUN CORE Page - Dedicated Styles
   Technical Blueprint Design
   =================================== */

/* Import JetBrains Mono for code-style text */
.tech-font,
.system-message,
.protocol-label,
.core-number {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

/* ===================================
   Core Hero Section
   =================================== */
.core-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--color-bg-primary);
    padding-top: 80px;
    overflow: hidden;
}

.core-hero .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#coreHeroCanvas {
    width: 100%;
    height: 100%;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 217, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 217, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

.core-hero .hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 1000px;
}

.system-message {
    font-size: 0.875rem;
    color: var(--color-accent-cyan);
    letter-spacing: 0.2em;
    margin-bottom: 2rem;
    opacity: 0;
    animation: typewriter 2s steps(20) forwards;
}

@keyframes typewriter {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cursor-blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.core-hero .hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.core-hero .hero-title .tech-font {
    color: var(--color-accent-cyan);
}

.core-hero .hero-description {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
}

/* AI Cube Deconstruction */
.core-cube-deconstruct {
    margin: 4rem 0;
    perspective: 1000px;
}

.cube-container {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    position: relative;
    transform-style: preserve-3d;
}

.ai-cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: cubeRotate 20s linear infinite;
}

@keyframes cubeRotate {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

.cube-face {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 2px solid var(--color-accent-cyan);
    background: rgba(0, 217, 255, 0.05);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

.cube-face.front {
    transform: translateZ(100px);
}

.cube-face.back {
    transform: rotateY(180deg) translateZ(100px);
}

.cube-face.right {
    transform: rotateY(90deg) translateZ(100px);
}

.cube-face.left {
    transform: rotateY(-90deg) translateZ(100px);
}

.cube-face.top {
    transform: rotateX(90deg) translateZ(100px);
}

.cube-face.bottom {
    transform: rotateX(-90deg) translateZ(100px);
}

/* Core Navigation Pills */
.core-nav-pills {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.pill-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid var(--color-accent-cyan);
    border-radius: 2rem;
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pill-btn:hover {
    background: var(--gradient-primary);
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

.pill-btn i {
    font-size: 1rem;
}

/* ===================================
   Core Detail Sections
   =================================== */
.core-detail-section {
    padding: 8rem 0;
    position: relative;
}

.core-detail-section.alternate {
    background: var(--color-bg-secondary);
}

.core-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.core-detail-layout.reverse {
    direction: rtl;
}

.core-detail-layout.reverse > * {
    direction: ltr;
}

/* Core Visual */
.core-visual {
    position: relative;
    height: 600px;
    background: var(--color-bg-tertiary);
    border-radius: 1rem;
    border: 1px solid rgba(0, 217, 255, 0.2);
    overflow: hidden;
}

.core-canvas {
    width: 100%;
    height: 100%;
}

/* Data Core Visual Elements */
.data-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.protocol-label {
    position: absolute;
    padding: 0.5rem 1rem;
    background: rgba(0, 217, 255, 0.2);
    border: 1px solid var(--color-accent-cyan);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: var(--color-accent-cyan);
    animation: float 3s ease-in-out infinite;
}

.protocol-label:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.protocol-label:nth-child(2) {
    top: 50%;
    left: 70%;
    animation-delay: 0.5s;
}

.protocol-label:nth-child(3) {
    top: 70%;
    left: 30%;
    animation-delay: 1s;
}

.protocol-label:nth-child(4) {
    top: 30%;
    right: 10%;
    animation-delay: 1.5s;
}

/* Vision Core Visual Elements */
.bounding-boxes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.bbox {
    position: absolute;
    width: 150px;
    height: 100px;
    border: 2px solid var(--color-accent-cyan);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
    animation: bboxPulse 2s ease-in-out infinite;
}

.bbox-label {
    position: absolute;
    top: -25px;
    left: 0;
    background: var(--color-accent-cyan);
    color: var(--color-bg-primary);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

@keyframes bboxPulse {
    0%, 100% {
        border-color: var(--color-accent-cyan);
        box-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
    }
    50% {
        border-color: var(--color-accent-purple);
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.7);
    }
}

/* LLM Core Visual Elements */
.knowledge-graph {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.graph-node {
    position: absolute;
    padding: 0.75rem 1.25rem;
    background: rgba(168, 85, 247, 0.2);
    border: 2px solid var(--color-accent-purple);
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-accent-purple);
    animation: nodePulse 3s ease-in-out infinite;
}

@keyframes nodePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.6);
    }
}

/* Prediction Core Visual Elements */
.prediction-chart {
    position: absolute;
    bottom: 20px;
    left: 20px;
}

.chart-legend {
    display: flex;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.legend-color {
    width: 20px;
    height: 3px;
    border-radius: 2px;
}

.legend-color.actual {
    background: var(--color-accent-cyan);
}

.legend-color.predicted {
    background: var(--color-accent-purple);
}

/* Media Core Visual Elements */
.media-layers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    pointer-events: none;
}

.layer-badge {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.2), rgba(168, 85, 247, 0.2));
    border: 1px solid var(--color-accent-cyan);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-primary);
    animation: layerSlide 4s ease-in-out infinite;
}

.layer-badge:nth-child(2) {
    animation-delay: 0.5s;
}

.layer-badge:nth-child(3) {
    animation-delay: 1s;
}

@keyframes layerSlide {
    0%, 100% {
        transform: translateX(0);
        opacity: 0.7;
    }
    50% {
        transform: translateX(20px);
        opacity: 1;
    }
}

/* Security Core Visual Elements */
.security-shield {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
}

.shield-layer {
    width: 100%;
    height: 100%;
    border: 2px solid var(--color-accent-cyan);
    border-radius: 50%;
    animation: shieldPulse 3s ease-in-out infinite;
}

@keyframes shieldPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }
}

.shield-scan {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-accent-cyan);
    box-shadow: 0 0 10px var(--color-accent-cyan);
    animation: scanLine 2s linear infinite;
}

/* Core Info */
.core-info {
    max-width: 600px;
}

.core-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.core-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-accent-cyan);
    opacity: 0.3;
}

.core-icon-large {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

.core-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.core-tagline {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
}

.core-description {
    margin-bottom: 2.5rem;
}

.core-description p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
}

/* Technology Stack */
.tech-stack {
    margin-bottom: 2.5rem;
}

.tech-stack h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-tag {
    padding: 0.5rem 1rem;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--color-accent-cyan);
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: rgba(0, 217, 255, 0.2);
    border-color: var(--color-accent-cyan);
    transform: translateY(-2px);
}

/* Core Metrics */
.core-metrics {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: var(--color-bg-tertiary);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.metric-item {
    flex: 1;
    text-align: center;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accent-cyan);
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Use Cases */
.use-cases h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.use-case-list {
    list-style: none;
    padding: 0;
}

.use-case-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.use-case-list li:last-child {
    border-bottom: none;
}

.use-case-list li i {
    color: var(--color-accent-cyan);
    font-size: 0.875rem;
}

/* ===================================
   Technical Specs Section
   =================================== */
.tech-specs-section {
    padding: 8rem 0;
    background: var(--color-bg-primary);
    position: relative;
}

.data-flow-diagram {
    position: relative;
    height: 400px;
    margin: 4rem 0;
    background: var(--color-bg-secondary);
    border-radius: 1rem;
    border: 1px solid rgba(0, 217, 255, 0.2);
    overflow: hidden;
}

#dataFlowCanvas {
    width: 100%;
    height: 100%;
}

.flow-labels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    pointer-events: none;
}

.flow-label {
    background: rgba(10, 14, 26, 0.9);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--color-accent-cyan);
    max-width: 250px;
}

.flow-label h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--color-accent-cyan);
}

.flow-label p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Specs Grid */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.spec-card {
    padding: 2rem;
    background: var(--color-bg-secondary);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.spec-card:hover {
    border-color: var(--color-accent-cyan);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.spec-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 217, 255, 0.1);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-accent-cyan);
    margin-bottom: 1.5rem;
}

.spec-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.spec-card > p {
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}

.spec-list {
    list-style: none;
    padding: 0;
}

.spec-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    color: var(--color-text-muted);
    position: relative;
    font-size: 0.875rem;
}

.spec-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--color-accent-cyan);
}

/* ===================================
   Core CTA Section
   =================================== */
.core-cta-section {
    padding: 6rem 0;
    background: var(--color-bg-secondary);
    text-align: center;
}

.cta-content h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-content p {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
    .core-detail-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .core-detail-layout.reverse {
        direction: ltr;
    }
    
    .core-visual {
        height: 400px;
    }
    
    .flow-labels {
        flex-direction: column;
        justify-content: space-around;
    }
}

@media (max-width: 768px) {
    .core-hero .hero-title {
        font-size: 2.5rem;
    }
    
    .core-nav-pills {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .core-title {
        font-size: 2rem;
    }
    
    .core-metrics {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .core-hero .hero-title {
        font-size: 2rem;
    }
    
    .core-nav-pills {
        grid-template-columns: 1fr;
    }
    
    .core-number {
        font-size: 2rem;
    }
    
    .core-icon-large {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Active menu item */
.menu-item.active {
    color: var(--color-accent-cyan);
}

.menu-item.active::after {
    width: 100%;
}
