/* Project-specific styles */

/* Project Header */
.project-header {
    padding: 8rem 0 4rem;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.project-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
    z-index: -1;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb i {
    font-size: 0.75rem;
}

.project-hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.project-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.project-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.meta-item i {
    color: var(--primary);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-badge {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 2rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tech-badge:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Project Hero Visual */
.project-hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.database-visual {
    position: relative;
    width: 300px;
    height: 300px;
}

.db-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    z-index: 2;
}

.connection-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.line {
    position: absolute;
    background: var(--primary);
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
}

.line-1 {
    top: 50%;
    left: 50%;
    width: 100px;
    height: 2px;
    transform: translate(-50%, -50%) rotate(0deg);
    animation-delay: 0s;
}

.line-2 {
    top: 50%;
    left: 50%;
    width: 100px;
    height: 2px;
    transform: translate(-50%, -50%) rotate(90deg);
    animation-delay: 0.5s;
}

.line-3 {
    top: 50%;
    left: 50%;
    width: 100px;
    height: 2px;
    transform: translate(-50%, -50%) rotate(45deg);
    animation-delay: 1s;
}

.line-4 {
    top: 50%;
    left: 50%;
    width: 100px;
    height: 2px;
    transform: translate(-50%, -50%) rotate(135deg);
    animation-delay: 1.5s;
}

.data-nodes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.node {
    position: absolute;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
    animation: float 3s ease-in-out infinite;
}

.node-1 {
    top: 20%;
    left: 0;
    animation-delay: 0s;
}

.node-2 {
    top: 20%;
    right: 0;
    animation-delay: 0.5s;
}

.node-3 {
    bottom: 20%;
    left: 0;
    animation-delay: 1s;
}

.node-4 {
    bottom: 20%;
    right: 0;
    animation-delay: 1.5s;
}

/* Content Layout */
.project-content {
    padding: 4rem 0;
}

.content-layout {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
}

.main-content {
    flex: 1;
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin: 0 auto;
}

.content-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.content-section p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.section-intro {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* Highlight Stats */
.highlight-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-text {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: 0.5rem;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Notebook Cell Styles */
.notebook-cell {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    margin: 2rem 0;
    overflow: hidden;
}

.cell-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--text-primary);
}

.cell-header i {
    color: var(--primary);
}

.cell-actions {
    margin-left: auto;
}

.expand-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.expand-btn:hover {
    background: var(--primary);
    color: white;
}

.cell-content {
    max-height: 400px;
    max-width: 775px;
    overflow-y: auto;
    transition: max-height 0.3s ease;
}

.cell-content.expanded {
    max-height: none;
}

.code-block {
    background: #1e1e1e;
    border-radius: 0;
    margin: 0;
}

.code-block pre {
    padding: 1.5rem;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    overflow-x: auto;
}

.code-explanation {
    padding: 1.5rem;
    background: var(--bg-secondary);
}

.code-explanation h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.code-explanation ul {
    margin-left: 1rem;
    color: var(--text-secondary);
}

.code-explanation li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.code-explanation strong {
    color: var(--text-primary);
}

/* Visual Results */
.visual-result {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.visual-result h4 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

/* Schema Diagram */
.schema-diagram {
    position: relative;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.table-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.table-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    min-width: 200px;
}

.table-header {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1rem;
    font-weight: 600;
    border-radius: 0.5rem 0.5rem 0 0;
}

.table-fields {
    padding: 1rem;
}

.field {
    padding: 0.25rem 0;
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.field.primary {
    color: var(--accent);
    font-weight: 600;
}

.field.foreign {
    color: var(--secondary);
}

.connection-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.metric-card {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

.metric-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Feature Importance */
.feature-importance {
    margin-top: 2rem;
}

.feature-importance h5 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.importance-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.importance-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.feature-name {
    min-width: 150px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.bar-container {
    flex: 1;
    position: relative;
    height: 24px;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
}

.bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 12px;
    transition: width 0.3s ease;
}

.importance-value {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: white;
    font-weight: 600;
}

/* Impact Cards */
.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.impact-card {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.impact-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.impact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.impact-content h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.impact-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
}

/* Sidebar */
.sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 5rem;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
}

.sidebar-section h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item strong {
    color: var(--text-primary);
    flex-shrink: 0;

}

.detail-item span {
    color: var(--text-secondary);
    text-align: right;
}

.tech-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.tech-item i {
    width: 20px;
    color: var(--primary);
}

.achievement-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.achievement-item i {
    color: var(--primary);
}

.related-projects {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-project {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.related-project:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.related-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.related-content h4 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.related-content p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Project Navigation */
.project-navigation {
    padding: 3rem 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.nav-btn.next {
    margin-left: auto;
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .project-hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .content-layout {
        flex-direction: column;
        gap: 2rem;
    }
    
    .sidebar {
        width: 100%;
        position: static;
    }
    
    .highlight-stats {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .project-title {
        font-size: 2.5rem;
    }
    
    .project-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .table-group {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .importance-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .feature-name {
        min-width: auto;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-btn.next {
        margin-left: 0;
    }
}

/* Carousel Slideshow */
.visual-slideshow {
  position: relative;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
}

.visual-slideshow h4 {
    color: var(--text-primary);
    margin-bottom: .25rem;
    font-size: 1.5rem;
}

.visual-slideshow p {
    color: var(--text-secondary);
    margin-bottom: 0rem;
    font-size: 1rem;
}

.slides-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  display: none;
  text-align: center;
  animation: fade 0.5s ease;
}

.slide.active {
  display: block;
}

.slide img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  align-self: center;
}

.slide-label {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Navigation Arrows */
.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  padding: 0.5rem 0.8rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  z-index: 2;
}

.slide-btn:hover {
  background: var(--primary);
  color: #fff;
}

.slide-btn.prev {
  left: 10px;
}

.slide-btn.next {
  right: 10px;
}

.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0,0,0,0.9);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
}

.close {
  position: absolute;
  top: 15px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}


/* Fade animation */
@keyframes fade {
  from { opacity: 0.4; }
  to { opacity: 1; }
}