/* Portfolio General Stylesheet - Deep Blue Theme */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a1929 0%, #1a2f4a 50%, #0d47a1 100%);
    background-attachment: fixed;
    color: #e3f2fd;
    line-height: 1.6;
    min-height: 100vh;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(13, 71, 161, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(26, 47, 74, 0.4) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Container */
header, main, footer, section {
    max-width: 900px;
    width: 100%;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.5rem;
    color: #ffffff;
    margin: 0 0 16px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
    font-weight: 600;
}

.subtitle {
    font-size: 1.125rem;
    color: #90caf9;
    margin: 0;
    font-weight: 300;
}

/* Headings */
h2 {
    font-size: 1.75rem;
    color: #64b5f6;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #1976d2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

h3 {
    font-size: 1.3rem;
    color: #42a5f5;
    margin: 20px 0 15px 0;
    padding-left: 10px;
    border-left: 4px solid #1976d2;
}

/* Content Sections */
.content-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(100, 181, 246, 0.2);
    transition: all 0.3s ease;
}

.content-section:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(100, 181, 246, 0.4);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}

/* Lists */
ul, ol {
    margin: 0;
    padding-left: 24px;
}

li {
    margin-bottom: 16px;
    color: #e0e0e0;
}

li:last-child {
    margin-bottom: 0;
}

ul.steps-list li,
ul.features-list li,
ul.tech-list li,
ul.phases-list li {
    margin-bottom: 16px;
}

strong {
    color: #90caf9;
    font-weight: 600;
}

/* Links */
a {
    color: #90caf9;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(144, 202, 249, 0.6);
}

a:focus {
    outline: 2px solid #90caf9;
    outline-offset: 2px;
}

/* Back Button */
.back-button {
    display: inline-block;
    margin-bottom: 20px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #1976d2 0%, #2196f3 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(25, 118, 210, 0.4);
}

.back-button:hover {
    background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%);
    transform: translateX(-5px);
    box-shadow: 0 6px 12px rgba(25, 118, 210, 0.6);
}

.back-button:focus {
    outline: 3px solid #2196f3;
    outline-offset: 3px;
}

/* Back Link (Footer) */
.back-link {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(100, 181, 246, 0.2);
    backdrop-filter: blur(10px);
    color: #90caf9;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid rgba(100, 181, 246, 0.3);
    transition: all 0.3s ease;
}

.back-link:hover {
    background: rgba(100, 181, 246, 0.3);
    border-color: rgba(100, 181, 246, 0.5);
    color: #ffffff;
}

/* Video Container */
.video-container {
    max-width: 800px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 24px;
    border: 1px solid rgba(100, 181, 246, 0.2);
}

video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

/* Results Section */
.results {
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.3) 0%, rgba(26, 47, 74, 0.3) 100%);
    border-left: 4px solid #2196f3;
}

.result-summary {
    font-size: 1.125rem;
    margin: 0;
    color: #e3f2fd;
    font-weight: 500;
}

/* Architecture Section */
.architecture {
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.2) 0%, rgba(26, 47, 74, 0.2) 100%);
    border-left: 4px solid #42a5f5;
}

.architecture-diagram {
    background: rgba(0, 0, 0, 0.3);
    padding: 24px;
    border-radius: 8px;
    margin-top: 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #90caf9;
    overflow-x: auto;
    border: 1px solid rgba(100, 181, 246, 0.2);
}

.architecture-diagram pre {
    margin: 0;
    color: #90caf9;
}

/* Code Blocks */
.code-block {
    background: rgba(0, 0, 0, 0.4);
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
    overflow-x: auto;
    border: 1px solid rgba(100, 181, 246, 0.2);
}

.code-block code, code {
    color: #81d4fa;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Fusion Explanation (for kitti.html) */
.fusion-explanation {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 1px solid rgba(100, 181, 246, 0.2);
}

.fusion-explanation h2 {
    color: #64b5f6;
    margin-bottom: 20px;
    border-bottom: 2px solid #1976d2;
    padding-bottom: 10px;
}

.fusion-types {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fusion-type {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid rgba(100, 181, 246, 0.3);
    transition: all 0.3s ease;
}

.fusion-type:hover {
    background: rgba(255, 255, 255, 0.06);
    border-left-color: #42a5f5;
}

.fusion-type.highlight {
    border-left-color: #2196f3;
    background: rgba(33, 150, 243, 0.1);
}

.fusion-type h3 {
    color: #42a5f5;
    margin-top: 0;
    margin-bottom: 10px;
    border-left: none;
    padding-left: 0;
}

.fusion-type p {
    margin: 10px 0;
    line-height: 1.6;
}

.fusion-type ol {
    margin: 10px 0;
    padding-left: 20px;
    line-height: 1.8;
}

.fusion-type ol li {
    margin: 8px 0;
}

.note {
    background: rgba(255, 193, 7, 0.1);
    padding: 10px;
    border-radius: 4px;
    border-left: 3px solid #ffc107;
    margin-top: 15px;
    font-size: 0.95em;
}

.note strong {
    color: #ffc107;
}

/* Gradio Interface */
.gradio-container {
    background: rgba(13, 71, 161, 0.2);
    border-radius: 10px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(100, 181, 246, 0.2);
}

.gradio-iframe-wrapper {
    position: relative;
    width: 100%;
    min-height: 600px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(100, 181, 246, 0.2);
}

.gradio-iframe {
    width: 100%;
    height: 600px;
    border: none;
    display: block;
}

.gradio-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    padding: 40px;
    text-align: center;
}

.gradio-placeholder h3 {
    color: #42a5f5;
    margin: 0 0 16px 0;
    font-size: 1.5rem;
    border-left: none;
    padding-left: 0;
}

.gradio-placeholder p {
    color: #90caf9;
    margin: 0 0 24px 0;
    max-width: 600px;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(100, 181, 246, 0.2);
}

.file-path {
    font-size: 0.875rem;
    color: #64b5f6;
    margin: 0 0 16px 0;
    font-family: 'Courier New', monospace;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 20px 16px;
    }

    h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    .content-section,
    .gradio-container {
        padding: 24px 20px;
    }

    .back-button:hover {
        transform: translateX(-3px);
    }

    .gradio-iframe {
        height: 500px;
    }

    .gradio-placeholder {
        min-height: 500px;
        padding: 24px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }

    body::before {
        display: none;
    }

    .back-button,
    .back-link {
        display: none;
    }
}