/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: #fafafa;
    min-height: 100vh;
}

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

/* Serif font for large content paragraphs */
.serif-text {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Hero section */
.hero {
    position: relative;
    text-align: center;
    padding: 60px 0 40px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #1a202c;
    margin-bottom: 40px;
    border-radius: 0 0 30px 30px;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-visual {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    overflow: hidden;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
}

.element {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    animation: float 6s ease-in-out infinite;
}

.element-1 {
    width: 120px;
    height: 120px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.element-2 {
    width: 80px;
    height: 80px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.element-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 70%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

.title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #1a202c;
}

.authors {
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 500;
    color: #4a5568;
}

.author {
    margin: 0 12px;
    display: inline-block;
}

.author a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.author a:hover {
    opacity: 0.7;
}

.affiliations {
    margin-bottom: 25px;
    font-size: 0.9rem;
    color: #718096;
}

.links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    background: rgba(99, 102, 241, 0.1);
    color: #4169E1;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(10px);
}

.btn:hover {
    background: rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.2);
}

.btn i {
    margin-right: 6px;
}

/* Sections */
section {
    margin-bottom: 50px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
    color: #1a202c;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #4169E1 0%, #4169E1 100%);
    border-radius: 2px;
}

h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

h3 i {
    color: #4169E1;
}

/* Abstract */
.abstract {
    background: white;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
}

.abstract p {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1.05rem;
    margin-bottom: 15px;
    color: #4a5568;
    line-height: 1.8;
    text-align: justify;
}

/* Method overview */
.method-overview {
    background: white;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.overview-content {
    display: grid;
    gap: 30px;
}

.method-figure {
    text-align: center;
}

.responsive-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

.caption {
    font-size: 0.9rem;
    color: #718096;
    font-style: italic;
    line-height: 1.5;
    text-align: justify;
}

.caption strong {
    font-style: normal;
}

.overview-text {
    text-align: justify;
}

.overview-text p {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1.05rem;
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 20px;
}

.highlights {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
}

.highlight-item {
    flex: 1;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.highlight-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.highlight-item i {
    font-size: 2rem;
    color: #4169E1;
    background: rgba(99, 102, 241, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.highlight-item span {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.5;
}

.highlight-item strong {
    display: block;
    color: #2d3748;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

/* Method details */
.method-details {
    background: white;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.method-section-1 {
    margin-top: 40px;
}

.method-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

.method-section:last-child {
    margin-bottom: 0;
}

.method-section p {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: justify;
}

.pipeline-steps {
    display: grid;
    gap: 20px;
    margin-top: 25px;
}

.step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4169E1, #4169E1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.step-content p {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 0;
}

.equation {
    background: #f8fafc;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
    border-left: 4px solid #4169E1;
    font-size: 0.9rem;
}

/* Toy example */
.toy-example {
    background: white;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.toy-content {
    display: grid;
    gap: 30px;
}

.toy-visual {
    text-align: center;
}

.toy-figures {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.toy-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.toy-figure img {
    width: 100%;
    max-width: 360px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.toy-figure img:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.subfigure-caption {
    font-size: 0.9rem;
    color: #4a5568;
    margin-top: 8px;
    margin-bottom: 0;
    font-weight: 500;
}

.toy-explanation h3 {
    margin-bottom: 15px;
    justify-content: flex-start;
}

.toy-explanation p {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.8;
    text-align: justify;
}

/* Results */
.results {
    background: white;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.results-intro {
    text-align: justify;
    margin-bottom: 15px;
}

.results-intro p {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1.05rem;
    color: #4a5568;
    line-height: 1.8;
    text-align: justify;
}

.results-content {
    display: grid;
    gap: 40px;
}

.result-category {
    margin-bottom: 30px;
}

.result-category:last-child {
    margin-bottom: 0;
}

/* Alignment results specific styles */
.language-results {
    margin-top: 20px;
}

.alignment-figures {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.alignment-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    padding: 15px;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.alignment-figure:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.alignment-figure img {
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

.alignment-figure .subfigure-caption {
    font-size: 0.9rem;
    color: #4a5568;
    margin: 0;
    font-weight: 500;
    text-align: center;
}

.result-grid {
    margin-top: 20px;
}

.result-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    align-items: center;
    padding: 25px;
    background: #f8fafc;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.result-item:hover {
    transform: translateY(-3px);
}

.result-text h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.result-text p {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.7;
    text-align: justify;
}

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

.ablation-item {
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    text-align: center;
    border-left: 4px solid #4169E1;
}

.ablation-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.ablation-item p {
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.6;
}

/* BibTeX */
.bibtex {
    text-align: center;
}

.bibtex-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.bibtex-container pre {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    text-align: left;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    border: 1px solid #e2e8f0;
}

.copy-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #4169E1;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s ease;
}

.copy-btn:hover {
    background: #5a67d8;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    color: #718096;
    background: white;
    margin-top: 50px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .title {
        font-size: 2.2rem;
    }
    
    .authors {
        font-size: 0.9rem;
    }
    
    .author {
        margin: 3px 8px;
        display: block;
    }
    
    .result-item {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .ablation-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .highlights {
        flex-direction: column;
    }
    
    .toy-figures {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .gif-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .alignment-figures {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .highlight-item {
        width: 100%;
    }
    
    .step {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .step-number {
        align-self: center;
    }
    
    .links {
        flex-direction: column;
        align-items: center;
    }
    
    .hero {
        padding: 40px 0 30px;
        margin-bottom: 30px;
    }
    
    section {
        margin-bottom: 40px;
    }
    
    .abstract, .method-overview, .method-details, .toy-example, .results, .bibtex-container {
        padding: 25px 20px;
    }
    
    /* Responsive serif text adjustments */
    .abstract p,
    .overview-text p,
    .method-section p,
    .toy-explanation p,
    .results-intro p,
    .result-text p,
    .training-intro,
    .training-summary {
        font-size: 1rem;
        line-height: 1.7;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .floating-elements {
        display: none;
    }
    
    .step {
        gap: 8px;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    /* Further serif text adjustments for mobile */
    .abstract p,
    .overview-text p,
    .method-section p,
    .toy-explanation p,
    .results-intro p,
    .training-intro,
    .training-summary {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .result-text p,
    .step-content p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .toy-figures {
        gap: 20px;
    }
    
    .toy-figure img {
        max-width: 250px;
    }
    
    .gif-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .alignment-figures {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Training progress section */
.training-progress {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

.training-intro {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 25px;
    text-align: justify;
}

.training-summary {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.8;
    margin-top: 25px;
    text-align: justify;
}

.gif-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin: 25px 0;
}

.gif-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    padding: 5px;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.gif-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.responsive-gif {
    width: 100%;
    max-width: 160px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

.gif-caption {
    text-align: center;
    font-size: 0.8rem;
    color: #4a5568;
    margin-top: 8px;
    font-weight: 500;
}

/* ImageNet Results Table Styling */
.imagenet-results {
    margin: 20px 0;
}

.results-description {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 20px;
    text-align: center;
    font-style: italic;
}

.table-container {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    background: white;
    border: 1px solid #e2e8f0;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 800px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.results-table th,
.results-table td {
    padding: 8px 12px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.results-table th {
    background: #fafafa;
    font-weight: 600;
    color: #374151;
    font-size: 0.8rem;
    border-bottom: 2px solid #d1d5db;
    position: sticky;
    top: 0;
    z-index: 10;
}

.results-table th:nth-child(4) {
    border-right: 8px solid #fafafa;
}

.results-table th:nth-child(5) {
    border-left: 8px solid #fafafa;
}

.results-table tbody tr {
    transition: background-color 0.15s ease;
}

.results-table tbody tr:hover {
    background-color: #f9fafb;
}

.baseline-row {
    background-color: #ffffff;
}

.our-method {
    background-color: #fefefe;
}

.separator-row {
    height: 4px;
    background: transparent;
}

.separator-row td {
    border: none;
    padding: 2px 0;
    background: #f3f4f6;
}

.results-table .best {
    font-weight: 600;
    color: #4169E1;
    background-color: #f8fdff;
}

.results-table td:first-child {
    text-align: left;
    font-weight: 500;
    padding-left: 16px;
    color: #374151;
}

.results-table th:first-child {
    text-align: left;
    padding-left: 16px;
}

.results-table td:not(:first-child) {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.8rem;
}

.table-notes {
    margin-top: 20px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #4169E1;
}

.table-notes p {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.table-notes ul {
    list-style: none;
    padding: 0;
}

.table-notes li {
    padding: 3px 0;
    color: #6b7280;
    position: relative;
    padding-left: 16px;
    font-size: 0.85rem;
}

.table-notes li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #4169E1;
    font-weight: bold;
}

/* Responsive table design */
@media (max-width: 768px) {
    .table-container {
        margin: 10px -20px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .results-table {
        font-size: 0.75rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 6px 8px;
    }
    
    .results-table td:not(:first-child) {
        font-size: 0.7rem;
    }
    
    .table-notes {
        margin: 10px -20px 20px;
        border-radius: 0;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .results-table {
        font-size: 0.7rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 4px 6px;
    }
    
    .results-table td:not(:first-child) {
        font-size: 0.65rem;
    }
} 