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

:root {
    --color-purple: #8b5cf6;
    --color-orange: #f97316;
    --color-blue: #3b82f6;
    --color-green: #10b981;
    --color-dark: #1f2937;
    --color-gray: #6b7280;
    --color-light-gray: #f9fafb;
    --color-white: #ffffff;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    --font-mono: 'Monaco', 'Courier New', monospace;
}

body {
    font-family: var(--font-sans);
    line-height: 1.7;
    color: var(--color-dark);
    background-color: var(--color-white);
}

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

/* Navigation */
.top-nav {
    background-color: var(--color-white);
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--color-gray);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--color-purple);
}

/* Hero Section */
.hero {
    padding: 5rem 0 4rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 120%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.project-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--color-dark);
    margin-bottom: 1rem;
    line-height: 1.1;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.4rem;
    color: var(--color-gray);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Feature Badges */
.feature-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.badge {
    padding: 0.6rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-white);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    z-index: 1;
}

.badge:hover {
    transform: translateY(-2px);
}

.badge-purple {
    background: linear-gradient(135deg, var(--color-purple), #a78bfa);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.badge-purple:hover {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.badge-orange {
    background: linear-gradient(135deg, var(--color-orange), #fb923c);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

.badge-orange:hover {
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

.badge-blue {
    background: linear-gradient(135deg, var(--color-blue), #60a5fa);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.badge-blue:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.badge-green {
    background: linear-gradient(135deg, var(--color-green), #34d399);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.badge-green:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-purple), #a78bfa);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background-color: var(--color-white);
    color: var(--color-dark);
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    border-color: var(--color-purple);
    color: var(--color-purple);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.15);
}

/* Announcements */
.announcements {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.announcement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-gray);
    font-size: 0.95rem;
}

.announcement-icon {
    font-size: 1.1rem;
}

/* Authors Section */
.authors {
    padding: 4rem 0;
    background: linear-gradient(180deg, var(--color-light-gray) 0%, var(--color-white) 100%);
}

.authors-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    margin-bottom: 1rem;
}

.author {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.author-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-purple), var(--color-blue));
    border: 4px solid var(--color-white);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s, box-shadow 0.3s;
}

.author:hover .author-photo {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.3);
}

.author-name {
    color: var(--color-dark);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.author-name:hover {
    color: var(--color-purple);
}

.affiliation {
    text-align: center;
    color: var(--color-gray);
    font-size: 1rem;
    margin-top: 1rem;
}

/* Content Sections */
.content-section {
    padding: 4rem 0;
}

.bg-light {
    background: linear-gradient(180deg, var(--color-light-gray) 0%, rgba(249, 250, 251, 0.5) 100%);
    position: relative;
}

.bg-light::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-purple), var(--color-blue));
    border-radius: 2px;
}

.subsection-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.subsection-title:first-child {
    margin-top: 0;
}

.section-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-gray);
}

.contribution {
    margin-bottom: 2rem;
}

.contribution:last-child {
    margin-bottom: 0;
}

/* Approach Steps */
.approach-steps {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background-color: var(--color-white);
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.bg-light .step {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.step:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-purple), var(--color-blue));
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

.step-description {
    color: var(--color-gray);
    line-height: 1.7;
}

/* Results Summary */
.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.result-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, var(--color-white) 100%);
    padding: 2.5rem;
    border-radius: 1.25rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-top: 5px solid var(--color-purple);
    transition: transform 0.3s, box-shadow 0.3s;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.2);
}

.result-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 1.5rem;
}

.result-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: var(--color-light-gray);
    border-radius: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-gray);
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-purple);
}

.result-description {
    color: var(--color-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Comparison Table */
.comparison-table-wrapper {
    overflow-x: auto;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--color-white);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
}

.comparison-table th {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: 1rem 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.comparison-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
}

.comparison-table td:first-child {
    text-align: left;
    font-weight: 500;
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.comparison-table tbody tr:hover {
    background-color: var(--color-light-gray);
}

/* Workflow Section */
.workflow-container {
    margin-top: 2rem;
}

.memory-levels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.memory-level {
    flex: 1;
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid transparent;
}

.memory-level:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.3);
}

.level-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, var(--color-purple), var(--color-blue));
    color: var(--color-white);
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.level-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 0.75rem;
}

.level-description {
    font-size: 0.9rem;
    color: var(--color-gray);
    line-height: 1.6;
}

.memory-arrow {
    font-size: 2rem;
    color: var(--color-purple);
    font-weight: 700;
    flex-shrink: 0;
}

.workflow-placeholder {
    background-color: var(--color-white);
    border: 2px dashed #e5e7eb;
    border-radius: 1rem;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--color-gray);
}

.workflow-placeholder p:first-child {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.placeholder-text {
    font-size: 1rem;
}

.caption {
    margin-top: 1rem;
    color: var(--color-gray);
    font-size: 0.95rem;
    text-align: center;
    font-style: italic;
}

/* Results Table */
.table-container {
    overflow-x: auto;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--color-white);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.results-table th {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.results-table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.results-table tbody tr:last-child td {
    border-bottom: none;
}

.results-table tbody tr:hover {
    background-color: var(--color-light-gray);
}

.highlight-row {
    background-color: #faf5ff !important;
}

.highlight-row:hover {
    background-color: #f3e8ff !important;
}

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

.analysis-item {
    display: flex;
    flex-direction: column;
}

.chart-placeholder {
    background-color: var(--color-white);
    border: 2px dashed #e5e7eb;
    border-radius: 0.5rem;
    padding: 3rem 2rem;
    text-align: center;
    color: var(--color-gray);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Takeaways */
.takeaways {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.takeaway {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: var(--color-white);
    border-left: 4px solid var(--color-purple);
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.bg-light .takeaway {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.takeaway-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--color-purple);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.takeaway-text {
    color: var(--color-gray);
    line-height: 1.7;
    flex: 1;
}

/* BibTeX Section */
.bibtex-block {
    background-color: var(--color-dark);
    color: #e5e7eb;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-top: 1.5rem;
}

.bibtex-block code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Footer */
.footer {
    background-color: var(--color-dark);
    color: #9ca3af;
    padding: 3rem 0;
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer a {
    color: var(--color-purple);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-contact {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-contact .footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 0.75rem;
}

.footer-note {
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .project-title {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1.1rem;
    }

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

    .nav-container {
        flex-direction: column;
        gap: 0.75rem;
    }

    .authors-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .step {
        flex-direction: column;
    }

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

    .memory-levels {
        flex-direction: column;
    }

    .memory-arrow {
        transform: rotate(90deg);
        margin: 0.5rem 0;
    }

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

    .comparison-table {
        font-size: 0.8rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Why PMD Grid */
.why-pmd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.why-card {
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.why-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.why-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.why-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 0.75rem;
}

.why-text {
    color: var(--color-gray);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Callout Box */
.callout-box {
    margin-top: 2rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    border-left: 4px solid var(--color-purple);
    border-radius: 0.5rem;
    font-size: 1.1rem;
    color: var(--color-dark);
    line-height: 1.7;
}

.callout-box strong {
    color: var(--color-purple);
}

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

.finding-card {
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.finding-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.finding-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.finding-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 1rem;
}

.finding-text {
    color: var(--color-gray);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Selection Color */
::selection {
    background-color: var(--color-purple);
    color: var(--color-white);
}

/* Workflow Image */
.workflow-image-container {
    margin-top: 2rem;
    text-align: center;
}

.workflow-image {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    margin-bottom: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.workflow-image:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.2);
}

/* Analysis Images Grid */
.analysis-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.analysis-image-item {
    text-align: center;
}

.analysis-image {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.analysis-image:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.15);
}
