/* ===== CSS Variables ===== */
:root {
    --primary: #e74c3c;
    --primary-dark: #c0392b;
    --secondary: #3498db;
    --success: #2ecc71;
    --warning: #f39c12;
    --purple: #9b59b6;
    --dark: #2c3e50;
    --light: #ecf0f1;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-600: #6c757d;
    --gray-800: #343a40;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 68px;
}

.nav-logo {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    flex: 1;
    justify-content: center;
    gap: 28px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 18px;
    border-left: 1px solid var(--gray-200);
}

.nav-langs {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-link {
    display: inline-flex;
    width: 26px;
    height: 18px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.lang-link svg {
    width: 100%;
    height: 100%;
    display: block;
}

.lang-link:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.lang-link.is-active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.15);
}

.nav-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--dark);
    border-radius: 50%;
    transition: var(--transition);
}

.nav-social:hover {
    color: var(--primary);
    background: var(--gray-100);
}

.nav-social svg {
    width: 18px;
    height: 18px;
}

.nav-linkedin:hover {
    color: #0a66c2;
}

.nav-cta {
    background: var(--primary);
    color: var(--white);
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8rem;
    transition: var(--transition);
}

.nav-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: var(--white);
    padding: 100px 20px 60px;
    text-align: center;
}

.hero-content {
    max-width: 900px;
}

.hero-badge {
    display: inline-block;
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero .highlight {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--gray-300);
    margin-bottom: 40px;
}

.hero-metrics {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.metric-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px 30px;
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
}

.metric-value {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}
.metric-std {
    font-size: 0.55em;
    font-weight: 500;
    color: var(--gray-300);
    letter-spacing: 0.02em;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--gray-300);
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--dark);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

/* ===== Sections ===== */
.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--gray-100);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    color: var(--dark);
}

.section-subtitle {
    text-align: center;
    color: var(--gray-600);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 50px;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Problem Section ===== */
.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.problem-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.problem-icon {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.problem-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.problem-card p {
    color: var(--gray-600);
    line-height: 1.6;
    text-align: center;
}

.problem-source {
    display: block;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
    font-size: 0.75rem;
    color: var(--gray-600);
}

.problem-source a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
}

.problem-source a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.problem-intro {
    max-width: 900px;
    margin: 0 auto 20px;
    text-align: justify;
    text-justify: inter-word;
    line-height: 1.8;
    color: var(--gray-700);
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

/* ===== Pipeline ===== */
.pipeline {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
    margin: 50px 0;
    flex-wrap: wrap;
}

.pipeline-step {
    background: var(--white);
    padding: 35px 25px;
    border-radius: var(--radius);
    text-align: center;
    width: 220px;
    min-height: 180px;
    box-shadow: var(--shadow);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.step-number {
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 auto 18px;
}

.pipeline-step h3 {
    font-size: 1.05rem;
    margin-bottom: 12px;
    line-height: 1.3;
}

.pipeline-step p {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.6;
    text-align: center;
}

.pipeline-arrow {
    width: 30px;
    height: 2px;
    background: var(--primary);
    margin-top: 50px;
}

.pipeline-row-2 {
    margin-top: 20px;
}

.methodology-highlight {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 40px;
    border-left: 4px solid var(--primary);
}

.methodology-highlight h3 {
    margin-bottom: 20px;
    color: var(--primary);
}

.methodology-highlight ul {
    list-style: none;
}

.methodology-highlight li {
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
    line-height: 1.6;
}

.methodology-highlight li:last-child {
    border-bottom: none;
}

/* ===== Dataset Section ===== */
.dataset-info {
    display: grid;
    grid-template-columns: 0.5fr 1.5fr;
    gap: 30px;
    align-items: center;
    margin-bottom: 50px;
}

.dataset-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat {
    background: var(--gray-100);
    padding: 15px;
    border-radius: var(--radius);
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.8rem;
}

.dataset-figure img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.features-table {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.features-table h3 {
    margin-bottom: 20px;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

th {
    background: var(--gray-100);
    font-weight: 600;
}

tr:hover {
    background: var(--gray-100);
}

/* Variable type badges */
.type-continua,
.type-categorica {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

.type-continua {
    background: #e3f2fd;
    color: #1565c0;
}

.type-categorica {
    background: #e8f5e9;
    color: #2e7d32;
}

/* ===== Results Section ===== */
.results-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 50px;
    align-items: stretch;
}

.result-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
}

.result-card.best-model {
    grid-row: span 2;
    border: 2px solid var(--primary);
}

.result-card .badge {
    background: var(--primary);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.rank-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--gray-100);
    color: var(--dark);
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 700;
}
.result-card.best-model .rank-badge {
    background: var(--primary);
    color: var(--white);
}

.result-card h3 {
    margin: 12px 0;
}

.model-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.model-metric {
    text-align: center;
    padding: 15px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
}

.model-metric .value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.model-metric .label {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.model-params {
    margin-top: 15px;
}

.model-params code {
    background: var(--gray-100);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    display: block;
    overflow-x: auto;
}

.result-card .auc, .result-card .f1 {
    margin: 5px 0;
    color: var(--gray-600);
}

.figures-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.figure-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 900px;
}

.figure-card h4 {
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.2rem;
}

.figure-card img {
    width: 100%;
    border-radius: var(--radius-sm);
}

/* ===== Interactive Charts ===== */
.interactive-chart {
    width: 100%;
    min-height: 350px;
    border-radius: var(--radius-sm);
}

.dataset-figure .interactive-chart {
    min-height: 380px;
}

.figures-grid .interactive-chart {
    min-height: 450px;
}

/* ===== Interpretability Section ===== */
.interpretability-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

.importance-card, .category-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.category-card {
    min-height: 280px;
}

/* Feature Importance Legend */
.importance-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 12px 15px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--gray-700);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.importance-bars {
    margin-top: 20px;
}

.importance-bar {
    display: grid;
    grid-template-columns: 140px 1fr 55px 100px;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
}

.importance-bar:hover {
    background: var(--gray-100);
}

.feature-name {
    font-weight: 500;
    font-size: 0.85rem;
}

.feature-category {
    font-size: 0.75rem;
    color: var(--gray-600);
    background: var(--gray-200);
    padding: 3px 8px;
    border-radius: 12px;
    text-align: center;
    white-space: nowrap;
}

.bar-container {
    background: var(--gray-200);
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.bar {
    height: 100%;
    border-radius: 10px;
    transition: var(--transition);
}

.importance-value {
    font-weight: 600;
    color: var(--primary);
}

.category-chart {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.category-item {
    text-align: center;
}

.category-circle {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 0.9rem;
    margin: 0 auto 8px;
}

.category-name {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.threshold-section {
    margin: 50px 0;
}

.threshold-section h3 {
    text-align: center;
    margin-bottom: 30px;
}

.threshold-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.threshold-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--gray-300);
}

.threshold-card.screening {
    border-top-color: var(--success);
}

.threshold-card.balanced {
    border-top-color: var(--secondary);
}

.threshold-card.confirmation {
    border-top-color: var(--warning);
}

.threshold-card h4 {
    margin-bottom: 10px;
}

.threshold-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
    margin: 10px 0;
}

.threshold-metrics p {
    margin: 8px 0;
    line-height: 1.5;
}

.use-case {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--gray-600);
    font-style: italic;
    line-height: 1.5;
}

/* ===== AWS Pipeline Section ===== */
.aws-pipeline {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 40px;
    overflow-x: auto;
}

.aws-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-width: 800px;
    padding: 20px 0;
}

.aws-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-radius: var(--radius);
    min-width: 100px;
    text-align: center;
    transition: var(--transition);
}

.aws-node:hover {
    transform: translateY(-5px);
}

.aws-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.aws-icon svg {
    width: 40px;
    height: 40px;
}

.aws-label {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.aws-sublabel {
    font-size: 0.8rem;
    color: var(--gray-600);
}

.aws-arrow {
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    position: relative;
    flex-shrink: 0;
}

.aws-arrow::after {
    content: '';
    position: absolute;
    right: -6px;
    top: -4px;
    border: 6px solid transparent;
    border-left-color: var(--secondary);
}

.aws-split {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Node colors */
.user-node {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
}

.cloudfront-node {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    color: #e65100;
}

.s3-node {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
}

.api-node {
    background: linear-gradient(135deg, #fce4ec, #f8bbd9);
    color: #c2185b;
}

.lambda-node {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    color: #7b1fa2;
}

.ml-node {
    background: linear-gradient(135deg, #e8eaf6, #c5cae9);
    color: #303f9f;
}

/* Tech Cards */
.aws-tech-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

.aws-tech-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary);
}

.aws-tech-card h4 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.aws-tech-card ul {
    list-style: none;
    padding: 0;
}

.aws-tech-card li {
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.9rem;
    color: var(--gray-700);
}

.aws-tech-card li:last-child {
    border-bottom: none;
}

/* ===== Demo Section ===== */
.demo-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.demo-form {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.demo-form h3 {
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.form-group input, .form-group select {
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.demo-result {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.result-placeholder {
    text-align: center;
    padding: 40px;
    color: var(--gray-600);
}

.risk-gauge {
    text-align: center;
    padding: 30px;
    margin-bottom: 20px;
}

.gauge-value {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary);
}

.gauge-label {
    color: var(--gray-600);
}

.risk-category {
    text-align: center;
    padding: 15px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.risk-category.low {
    background: rgba(46, 204, 113, 0.1);
    color: var(--success);
}

.risk-category.medium {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning);
}

.risk-category.high {
    background: rgba(231, 76, 60, 0.1);
    color: var(--primary);
}

.demo-cta {
    text-align: center;
    padding: 30px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.demo-cta p {
    margin-bottom: 15px;
    color: var(--gray-600);
}

/* ===== Team Section ===== */
.team-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.team-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.team-card.advisor {
    border-left: 4px solid var(--primary);
}

.team-card h3 {
    color: var(--primary);
    margin-bottom: 15px;
}

.team-card .name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.team-card .role {
    color: var(--gray-600);
    margin-bottom: 10px;
}

.team-card .institution {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.team-card ul {
    list-style: none;
    text-align: left;
}

.team-card ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
}

.team-card ul li:last-child {
    border-bottom: none;
}

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: var(--primary);
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: var(--gray-300);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary);
}

.disclaimer {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--primary);
    padding: 20px 25px;
    border-radius: var(--radius-sm);
    margin-bottom: 30px;
}

.disclaimer p {
    font-size: 0.9rem;
    color: var(--gray-300);
    line-height: 1.7;
    text-align: justify;
    text-justify: inter-word;
    margin: 0;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* ===== Responsive - Tablet (992px) ===== */
@media (max-width: 992px) {
    .nav-menu {
        gap: 18px;
    }

    .nav-menu a {
        font-size: 0.82rem;
    }

    .nav-actions {
        padding-left: 12px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .result-card.best-model {
        grid-row: auto;
    }

    .interpretability-grid {
        grid-template-columns: 1fr;
    }

    .demo-container {
        grid-template-columns: 1fr;
    }

    .threshold-cards {
        grid-template-columns: 1fr;
    }

    .figures-grid {
        grid-template-columns: 1fr;
    }

    .aws-tech-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Responsive - Mobile (768px) ===== */
@media (max-width: 768px) {
    /* Container */
    .container {
        padding: 0 15px;
    }

    /* Section */
    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    /* Hero Section */
    .hero {
        padding: 100px 20px 60px;
        min-height: auto;
    }

    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    /* Hero Metrics - Grid 2x2 */
    .hero-metrics {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin: 30px 0;
    }

    .metric-card {
        padding: 15px 12px;
        min-width: auto;
    }

    .metric-value {
        font-size: 1.4rem;
    }

    .metric-label {
        font-size: 0.75rem;
    }

    .metric-hint {
        display: none;
    }

    /* Hero Buttons */
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    /* Problem Cards */
    .problem-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .problem-card {
        padding: 25px 20px;
    }

    .problem-icon {
        font-size: 2.5rem;
    }

    /* Pipeline */
    .pipeline {
        flex-direction: column;
        align-items: center;
    }

    .pipeline-step {
        width: 100%;
        max-width: 300px;
    }

    .pipeline-arrow {
        width: 2px;
        height: 25px;
        margin: 0;
    }

    .pipeline-arrow::after {
        border-width: 6px 6px 0 6px;
        border-color: var(--gray-400) transparent transparent transparent;
        top: auto;
        bottom: -6px;
        left: 50%;
        transform: translateX(-50%);
    }

    /* Methodology Highlight */
    .methodology-highlight {
        padding: 20px;
    }

    .methodology-highlight h3 {
        font-size: 1.1rem;
    }

    /* Dataset */
    .dataset-info {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .dataset-stats {
        flex-direction: row;
        justify-content: space-around;
        flex-wrap: wrap;
    }

    .stat-value {
        font-size: 1.8rem;
    }

    /* Table Responsive */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -15px;
        padding: 0 15px;
    }

    .features-table table {
        min-width: 500px;
        font-size: 0.85rem;
    }

    .features-table th,
    .features-table td {
        padding: 10px 12px;
    }

    /* Results */
    .result-card {
        padding: 20px;
    }

    .result-card.best-model {
        padding: 25px 20px;
    }

    .model-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .model-params code {
        font-size: 0.7rem;
        word-break: break-all;
    }

    /* Figure Cards */
    .figure-card {
        padding: 15px;
    }

    .figure-card h4 {
        font-size: 1rem;
    }

    /* Interactive Charts */
    .interactive-chart {
        min-height: 280px;
        margin: 0 -10px;
    }

    /* Glossary */
    .metrics-glossary {
        padding: 20px 15px;
    }

    .glossary-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .glossary-item {
        padding: 12px;
    }

    /* Interpretability */
    .importance-card,
    .category-card {
        padding: 20px 15px;
    }

    .importance-bar {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 8px;
        padding: 12px 0;
    }

    .importance-bar .feature-name {
        order: 1;
        font-size: 0.9rem;
    }

    .importance-bar .bar-container {
        order: 2;
        width: 100%;
    }

    .importance-bar .importance-value {
        order: 3;
    }

    .importance-bar .feature-category {
        order: 4;
        font-size: 0.7rem;
    }

    .importance-legend {
        flex-wrap: wrap;
        justify-content: center;
        font-size: 0.7rem;
        gap: 8px;
    }

    /* Category Circles */
    .category-chart {
        flex-wrap: wrap;
        gap: 20px;
        justify-content: center;
    }

    .category-circle {
        transform: scale(0.85);
    }

    /* Threshold Cards */
    .threshold-cards {
        gap: 15px;
    }

    .threshold-card {
        padding: 20px 15px;
    }

    .threshold-value {
        font-size: 2rem;
    }

    /* AWS Pipeline */
    .aws-pipeline {
        padding: 20px 15px;
        overflow-x: auto;
    }

    .aws-flow {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .aws-split {
        flex-direction: column;
        gap: 15px;
    }

    .aws-node {
        min-width: 120px;
        padding: 15px;
    }

    .aws-arrow {
        width: 2px;
        height: 20px;
        margin: 0;
    }

    .aws-arrow::after {
        border-width: 6px 6px 0 6px;
        border-color: var(--gray-400) transparent transparent transparent;
        right: auto;
        left: 50%;
        top: auto;
        bottom: -6px;
        transform: translateX(-50%);
    }

    .aws-tech-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .aws-tech-card {
        padding: 15px;
    }

    /* Team */
    .team-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .team-card {
        padding: 25px 20px;
    }

    /* References */
    .reference-item {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .ref-number {
        font-size: 0.9rem;
    }

    .ref-text {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    .ref-link {
        font-size: 0.75rem;
    }

    .ref-link a {
        word-break: break-all;
    }

    /* Footer */
    .footer {
        padding: 40px 0 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .disclaimer {
        padding: 15px;
    }

    .disclaimer p {
        font-size: 0.8rem;
        text-align: left;
    }

    /* Info Boxes */
    .info-box {
        padding: 0;
        margin-bottom: 25px;
    }

    .info-content > strong:first-child {
        font-size: 1rem;
    }

    .info-content p {
        font-size: 0.88rem;
        text-align: left;
    }

    /* Chart Explanations */
    .chart-explanation {
        padding: 14px 15px;
        font-size: 0.85rem;
        text-align: left;
    }

    .card-explanation {
        font-size: 0.82rem;
        text-align: left;
    }

    /* Touch Targets - Minimum 44px */
    .btn,
    .nav-cta,
    a[target="_blank"] {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* ===== Responsive - Small Mobile (480px) ===== */
@media (max-width: 480px) {
    /* Navigation */
    .nav-container {
        padding: 0 12px;
        height: 60px;
    }

    .nav-logo {
        font-size: 1.2rem;
    }

    .nav-cta {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .nav-social {
        width: 32px;
        height: 32px;
    }

    /* Hero */
    .hero {
        padding: 80px 15px 50px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-metrics {
        gap: 10px;
    }

    .metric-card {
        padding: 12px 10px;
    }

    .metric-value {
        font-size: 1.2rem;
    }

    .metric-label {
        font-size: 0.7rem;
    }

    /* Sections */
    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 0.9rem;
    }

    /* Problem Cards */
    .problem-icon {
        font-size: 2rem;
    }

    .problem-card h3 {
        font-size: 1.1rem;
    }

    .problem-card p {
        font-size: 0.85rem;
    }

    .problem-source {
        font-size: 0.65rem;
    }

    /* Pipeline Steps */
    .pipeline-step {
        padding: 20px 15px;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .pipeline-step h3 {
        font-size: 1rem;
    }

    .pipeline-step p {
        font-size: 0.8rem;
    }

    /* Results */
    .result-card h3 {
        font-size: 1.1rem;
    }

    .model-metric .value {
        font-size: 1.3rem;
    }

    /* Charts */
    .interactive-chart {
        min-height: 250px;
    }

    .figure-card h4 {
        font-size: 0.95rem;
    }

    /* Threshold */
    .threshold-value {
        font-size: 1.8rem;
    }

    .threshold-metrics p {
        font-size: 0.85rem;
    }

    /* Category Circles */
    .category-circle {
        transform: scale(0.7);
    }

    .category-name {
        font-size: 0.75rem;
    }

    /* Glossary */
    .glossary-term {
        font-size: 0.85rem;
    }

    .glossary-definition {
        font-size: 0.78rem;
    }

    /* AWS */
    .aws-label {
        font-size: 0.8rem;
    }

    .aws-sublabel {
        font-size: 0.65rem;
    }

    .aws-tech-card h4 {
        font-size: 0.95rem;
    }

    .aws-tech-card li {
        font-size: 0.8rem;
    }

    /* Team */
    .team-card h3 {
        font-size: 1.1rem;
    }

    .team-card .name {
        font-size: 1rem;
    }

    /* References */
    .ref-text {
        font-size: 0.8rem;
    }

    /* Footer */
    .footer-section h4 {
        font-size: 1rem;
    }

    .copyright {
        font-size: 0.8rem;
    }
}

/* ===== Info Boxes (Explicações Didáticas) ===== */
.info-box {
    background: transparent;
    border: none;
    border-radius: var(--radius);
    padding: 0;
    margin-bottom: 35px;
}
.info-note {
    display: inline-block;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(52, 152, 219, 0.35);
}
.info-note a {
    color: var(--secondary);
    font-weight: 600;
    text-decoration: none;
}
.info-note a:hover {
    text-decoration: underline;
}

.info-box-light {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--primary);
}

.info-content > strong:first-child {
    display: block;
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 12px;
}

.info-content {
    max-width: 900px;
    margin: 0 auto;
}

.info-content p {
    color: var(--gray-700);
    line-height: 1.8;
    margin: 0 auto 20px;
    font-size: 0.95rem;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}
.info-content p:last-child {
    margin-bottom: 0;
}

.info-content p strong {
    color: var(--dark);
    font-weight: 600;
    white-space: normal;
    display: inline;
}

.no-break {
    white-space: nowrap;
}

/* ===== Chart Explanations ===== */
.chart-explanation {
    background: var(--gray-100);
    padding: 18px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--gray-700);
    border-left: 3px solid var(--secondary);
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

.chart-explanation strong {
    color: var(--dark);
    font-weight: 600;
}

.chart-explanation > strong:first-child {
    display: inline;
    margin-right: 4px;
}

/* ===== Card Explanations ===== */
.card-explanation {
    font-size: 0.88rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

.card-explanation strong {
    color: var(--dark);
    font-weight: 600;
}

.card-explanation > strong:first-child {
    display: inline;
    margin-right: 4px;
}

/* ===== Threshold Explanation ===== */
.threshold-explanation {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 30px;
    color: var(--gray-700);
    font-size: 0.95rem;
    line-height: 1.7;
}
.threshold-title {
    font-size: 1.05rem;
    color: var(--gray-600);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ===== Metrics Glossary ===== */
.metrics-glossary {
    background: var(--white);
    padding: 35px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 50px;
}

.metrics-glossary h3 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--dark);
}

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

.glossary-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 15px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.glossary-term {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

.glossary-definition {
    font-size: 0.85rem;
    color: var(--gray-700);
    line-height: 1.65;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

/* ===== Hero Metric Hints ===== */
.metric-hint {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
    font-weight: 400;
}

.metric-card {
    cursor: help;
    transition: var(--transition);
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ===== Responsive adjustments for new elements ===== */
@media (max-width: 768px) {
    .info-box {
        padding: 20px;
    }

    .glossary-grid {
        grid-template-columns: 1fr;
    }

    .chart-explanation {
        font-size: 0.85rem;
        padding: 12px 15px;
    }

    .metric-hint {
        display: none;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== Loading State ===== */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid var(--gray-300);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== References Section ===== */
.references-list {
    max-width: 900px;
    margin: 0 auto;
}

.reference-item {
    display: flex;
    gap: 15px;
    padding: 20px 25px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    transition: var(--transition);
    border-left: 4px solid var(--secondary);
}

.reference-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.ref-number {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
    min-width: 30px;
    flex-shrink: 0;
}

.ref-text {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--gray-800);
    margin: 0;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

.ref-text em {
    color: var(--dark);
}

.ref-text a {
    color: var(--secondary);
    text-decoration: none;
    word-break: break-all;
    transition: var(--transition);
}

.ref-text a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.ref-link {
    display: block;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.ref-link a {
    color: var(--secondary);
    font-weight: 500;
}

@media (max-width: 768px) {
    .reference-item {
        flex-direction: column;
        gap: 8px;
        padding: 15px 20px;
    }

    .ref-number {
        font-size: 0.9rem;
    }

    .ref-text {
        font-size: 0.85rem;
    }
}
    .nav-actions {
        padding-left: 0;
        border-left: none;
        gap: 8px;
    }
