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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --bg-color: #ffffff;
    --light-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

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

header {
    text-align: center;
    padding: 40px 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

header h1 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

header h1 a:hover {
    color: var(--secondary-color);
}

.subtitle {
    font-size: 1.2em;
    color: #666;
    font-weight: 300;
}

nav {
    margin-bottom: 40px;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 0;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 5px;
    transition: all 0.3s;
}

nav a:hover,
nav a.active {
    background-color: var(--secondary-color);
    color: white;
}

main {
    min-height: 60vh;
}

.profile-section,
.research-section {
    margin-bottom: 40px;
}

.research-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 2em;
}

.project-card {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.project-card h3 {
    margin-bottom: 15px;
}

.project-card h3 a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 1.5em;
    transition: color 0.3s;
}

.project-card h3 a:hover {
    color: var(--accent-color);
}

.project-status {
    margin-top: 15px;
    font-style: italic;
    color: #666;
    font-size: 0.95em;
}

.research-article {
    max-width: 900px;
    margin: 0 auto;
}

.paper-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--secondary-color);
    flex-wrap: wrap;
    gap: 20px;
}

.paper-header h2 {
    color: var(--primary-color);
    font-size: 2.5em;
    margin: 0;
}

.conference-badge,
.lab-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 24px;
    border-radius: 25px;
    box-shadow: var(--shadow);
    color: white;
    font-weight: 600;
}

.conference-badge span {
    color: white;
}

.lab-badge {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.lab-logo {
    height: 35px;
    width: auto;
    background: white;
    padding: 5px 10px;
    border-radius: 5px;
}

.lab-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lab-name {
    font-weight: 700;
    font-size: 1.05em;
    color: white;
}

.supervisor {
    font-size: 0.9em;
    opacity: 0.95;
    color: white;
    font-weight: 500;
}

.icml-logo {
    height: 30px;
    width: auto;
}

.paper-links {
    margin-bottom: 40px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.pdf-link,
.github-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.pdf-link {
    background: var(--accent-color);
    color: white;
}

.pdf-link:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.github-link {
    background: #24292e;
    color: white;
}

.github-link:hover {
    background: #2f363d;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.github-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.pdf-link .note,
.github-link .note {
    font-size: 0.9em;
    opacity: 0.9;
    font-weight: normal;
}

.content-section {
    margin-bottom: 50px;
}

.content-section h3 {
    color: var(--primary-color);
    font-size: 1.8em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.content-section p {
    margin-bottom: 15px;
    text-align: justify;
    font-size: 1.05em;
}

.framework-diagram {
    background: var(--light-bg);
    padding: 40px;
    border-radius: 10px;
    margin: 40px 0;
    box-shadow: var(--shadow);
}

.diagram-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.framework-box {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.framework-box:hover {
    transform: translateY(-5px);
}

.box-header {
    font-weight: bold;
    font-size: 1.1em;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.box-content {
    color: #555;
}

.process-flow {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 10px;
}

.flow-step {
    background: var(--secondary-color);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.flow-arrow {
    color: var(--secondary-color);
    font-size: 1.5em;
    font-weight: bold;
}

.corrector-process,
.feedback-flow {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.process-item,
.feedback-item {
    background: #50c878;
    color: white;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-size: 0.95em;
}

.feedback-item {
    background: #ff6b6b;
}

.diagram-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.framework-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.detail-card {
    background: white;
    border-left: 4px solid var(--secondary-color);
    padding: 20px;
    border-radius: 5px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.detail-card:hover {
    transform: translateX(5px);
}

.detail-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2em;
}

.detail-card p {
    color: #666;
    font-size: 0.95em;
}

.mathematical-framework {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 10px;
    margin: 40px 0;
    box-shadow: var(--shadow);
}

.mathematical-framework h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5em;
}

.math-box {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.math-list {
    list-style: none;
    padding-left: 0;
}

.math-list li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    color: #555;
}

.math-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.math-list li em {
    font-style: italic;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
    border-top: 2px solid var(--border-color);
    color: #666;
}

.architecture-overview {
    margin: 40px 0;
}

.architecture-overview h4 {
    color: var(--primary-color);
    font-size: 1.5em;
    margin-bottom: 25px;
}

.component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.component-card {
    background: white;
    border-left: 4px solid var(--secondary-color);
    padding: 20px;
    border-radius: 5px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.component-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-hover);
}

.component-card h5 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2em;
}

.component-card p {
    color: #555;
    font-size: 0.95em;
    line-height: 1.6;
    margin: 0;
}

.component-card em {
    font-style: italic;
    color: var(--primary-color);
}

.flow-desc {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

.detailed-algorithm {
    margin: 40px 0;
    background: var(--light-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.detailed-algorithm h4 {
    color: var(--primary-color);
    font-size: 1.5em;
    margin-bottom: 25px;
}

.algorithm-steps {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.algorithm-step {
    display: flex;
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.algorithm-step:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
}

.step-content {
    flex: 1;
}

.step-content h5 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1em;
}

.step-content p {
    color: #555;
    font-size: 0.95em;
    line-height: 1.6;
    margin: 0;
}

.formula-box {
    background: #f0f0f0;
    border-left: 3px solid var(--accent-color);
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    overflow-x: auto;
}

.formula-box em {
    font-style: normal;
    color: var(--primary-color);
}

.setup-details {
    margin: 40px 0;
}

.setup-details h4 {
    color: var(--primary-color);
    font-size: 1.5em;
    margin-bottom: 25px;
}

.setup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.setup-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.setup-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.setup-card h5 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1em;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

.setup-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.setup-card li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    color: #555;
    font-size: 0.95em;
    line-height: 1.5;
}

.setup-card li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.2em;
}

.setup-card strong {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .paper-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .diagram-container {
        grid-template-columns: 1fr;
    }
    
    .framework-details {
        grid-template-columns: 1fr;
    }
    
    nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .component-grid {
        grid-template-columns: 1fr;
    }
    
    .setup-grid {
        grid-template-columns: 1fr;
    }
    
    .algorithm-step {
        flex-direction: column;
    }
    
    .step-number {
        align-self: flex-start;
    }
    
    .paper-links {
        flex-direction: column;
    }
    
    .pdf-link,
    .github-link {
        width: 100%;
        justify-content: center;
    }
    
    .lab-badge {
        width: 100%;
    }
    
    .lab-info {
        width: 100%;
    }
}

