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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #ffffff;
}

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

@media (min-width: 640px) {
    .container {
        padding: 0 3rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 4rem;
    }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e7eb;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.nav-brand-link {
    text-decoration: none;
    color: inherit;
}

.nav-brand-link:hover {
    color: #2563eb;
}

.nav-brand h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    transition: color 0.2s ease;
}

.nav-links {
    display: none;
    gap: 2rem;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-links a {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #1f2937;
}

.nav-external {
    display: flex;
    gap: 1rem;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #e5e7eb;
    color: #1f2937;
}

/* Hero Section */
.hero {
    padding: 6rem 0 4rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.hero-figure {
    margin-bottom: 2rem;
}

.main-figure {
    width: 100%;
    max-width: 900px;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    margin: 0 auto;
    display: block;
}

.figure-caption {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 1rem;
    font-style: italic;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
}

.hero-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 4xl;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: 1.25rem;
    }
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #9ca3af;
}

.hero-video {
    margin-bottom: 2rem;
}

.video-placeholder {
    position: relative;
    background: #1f2937;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    aspect-ratio: 16/9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease;
    max-width: 800px;
    margin: 0 auto;
}

.video-placeholder:hover {
    transform: scale(1.02);
}

.play-button {
    width: 4rem;
    height: 4rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: background 0.2s ease;
}

.video-placeholder:hover .play-button {
    background: rgba(255, 255, 255, 0.3);
}

.video-placeholder p {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.video-placeholder span {
    font-size: 0.875rem;
    color: #d1d5db;
}

.demo-video {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    margin: 0 auto;
    display: block;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

/* Abstract Section */
.abstract {
    padding: 2rem 0 0 0;
    background: white;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2rem;
    text-align: center;
}

.data-collection h3, .policy h3, .results-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

h3 {
    margin-bottom: 0.25rem;
}

.policy h3 {
    text-align: left;
}

.abstract-content {
    max-width: 4xl;
    margin: 0 auto;
}

.abstract-content p {
    font-size: 1.125rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    text-align: justify;
}

.abstract-image {
    width: 100%;
    max-width: 1200px;
    height: auto;
    border: 1px solid #e5e7eb;
    margin: 1rem auto 2rem auto;
    display: block;
}

/* Method Section */
.method {
    padding: 0.5rem 0;
    background: white;
}

.method-overview {
    margin-bottom: 3rem;
}

.data-collection {
    margin: 0;
}


.teleop-main-image {
    width: 100%;
    max-width: 1400px;
    height: auto;
    border: 1px solid #e5e7eb;
    margin: 0 auto;
    display: block;
}

.data-collection-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.data-collection-text h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 1.5rem 0 0.5rem 0;
}

.data-collection-text p {
    font-size: 1rem;
    color: #4b5563;
    margin-bottom: 1rem;
    line-height: 1.6;
    text-align: justify;
}

.simulation-section {
    display: grid;
    gap: 1rem;
    margin-top: 3rem;
}

@media (min-width: 1024px) {
    .simulation-section {
        grid-template-columns: 2fr 1fr;
        align-items: start;
    }
}

.simulation-text h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.simulation-text p {
    font-size: 1rem;
    color: #4b5563;
    margin-bottom: 1rem;
    line-height: 1.6;
    text-align: justify;
}

.init-image, .ik-mpc-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border: 1px solid #e5e7eb;
    margin-bottom: 0.5rem;
}

.method-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    width: 2rem;
    height: 2rem;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.step-content p {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
}

.method-visual {
    margin: 2rem 0;
    text-align: center;
}

.architecture-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.detail-image {
    width: 100%;
    height: auto;
    border: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.task-setting {
    margin: 2rem 0;
}

.task-setting-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border: 1px solid #e5e7eb;
    margin: 0 auto 1rem;
    display: block;
}

.method-details {
    margin: 2rem 0;
}

.detail-card {
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.detail-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.detail-card ul {
    list-style: none;
}

.detail-card li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: #4b5563;
}

.detail-card li::before {
    content: '';
    width: 0.5rem;
    height: 0.5rem;
    background: #10b981;
    border-radius: 50%;
    flex-shrink: 0;
}

.key-sequence {
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    margin: 2rem 0;
}

.key-sequence h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2rem;
    text-align: center;
}

.sequence-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.sequence-step {
    text-align: center;
}

.sequence-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.sequence-icon.reaching {
    background: #dbeafe;
    color: #2563eb;
}

.sequence-icon.twisting {
    background: #dcfce7;
    color: #16a34a;
}

.sequence-icon.pulling {
    background: #fef3c7;
    color: #d97706;
}

.sequence-icon.traversing {
    background: #e9d5ff;
    color: #9333ea;
}

.sequence-step h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.sequence-step p {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Policy Section */
.policy {
    padding: 0.5rem 0;
    background: white;
}

.policy-content {
    display: grid;
    gap: 2rem;
    margin-top: 0.5rem;
}

@media (min-width: 1024px) {
    .policy-content {
        grid-template-columns: 2fr 1fr;
        align-items: start;
    }
}

.policy-text p {
    font-size: 1rem;
    color: #4b5563;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    line-height: 1.6;
    text-align: justify;
}

.policy-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.model-image, .hyperparameters-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border: 1px solid #e5e7eb;
    margin-bottom: 0.5rem;
}

/* Results Section */
.results {
    padding: 1rem 0;
    background: white;
}

.results-section {
    margin-bottom: 0.5rem;
}

.results-section h3 {
    font-size: 1.875rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2rem;
}

.results-content {
    margin-bottom: 1rem;
}

.results-text p {
    font-size: 1.125rem;
    color: #4b5563;
    margin-top: 0.25rem;
    margin-bottom: 1rem;
    line-height: 1.7;
    text-align: justify;
}

.results-highlights {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.highlight {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.highlight-icon {
    width: 2rem;
    height: 2rem;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.highlight-text strong {
    display: block;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.highlight-text span {
    font-size: 0.875rem;
    color: #6b7280;
}

.hardware-results {
    display: grid;
    gap: 1rem;
    margin-top: 0;
}

@media (min-width: 1024px) {
    .hardware-results {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
}

.hardware-text p {
    font-size: 1.125rem;
    color: #4b5563;
    margin-top: 0.25rem;
    margin-bottom: 1rem;
    line-height: 1.7;
    text-align: justify;
}

.disturbance-demo h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.disturbance-steps {
    display: grid;
    gap: 1rem;
}

.disturbance-step {
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    border-left: 4px solid #2563eb;
}

.step-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 0.25rem;
}

.disturbance-step p {
    font-size: 0.875rem;
    color: #4b5563;
    margin: 0;
}

.ablation-study {
    margin: 1rem 0;
}

.ablation-study h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.ablation-study p {
    font-size: 1rem;
    color: #4b5563;
    margin-bottom: 1rem;
    line-height: 1.6;
    text-align: justify;
}

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

.ablation-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #e5e7eb;
}

.ablation-table th,
.ablation-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.ablation-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #1f2937;
    border-bottom: 1px solid #e5e7eb;
}

.ablation-table td {
    color: #4b5563;
}

.highlight-row {
    background: #eff6ff;
}

.highlight-row td {
    color: #1e40af;
    font-weight: 500;
}

/* Conclusion Section */
.conclusion {
    padding: 3rem 0;
    background: white;
}

.conclusion-content p {
    font-size: 1.125rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    text-align: justify;
}

.conclusion-image {
    width: 100%;
    max-width: 1200px;
    height: auto;
    border: 1px solid #e5e7eb;
    margin: 1rem auto;
    display: block;
}

.contributions {
    margin-top: 3rem;
}

.contributions h3 {
    font-size: 1.875rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2rem;
    text-align: center;
}

.contribution-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 768px) {
    .contribution-list {
        flex-direction: row;
    }
}

.contribution {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    flex: 1;
}

.contribution-number {
    width: 2.5rem;
    height: 2.5rem;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    flex-shrink: 0;
}

.contribution-text h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.contribution-text p {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
}

/* Citation Footer */
.citation-footer {
    background: #f9fafb;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
}

.citation-footer h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    text-align: center;
}

.citation-footer .citation {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    overflow-x: auto;
    color: #374151;
    max-width: 600px;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .method-content h3,
    .results-section h3 {
        font-size: 1.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

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

.method-overview,
.results-content,
.hardware-results {
    animation: fadeInUp 0.6s ease-out;
}

/* Hover Effects */
.detail-card,
.key-sequence,
.ablation-study {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-card:hover,
.key-sequence:hover,
.ablation-study:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Focus States for Accessibility */
a:focus,
button:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Image Styles */
.deployment-image {
    width: 100%;
    max-width: 1400px;
    height: auto;
    border: 1px solid #e5e7eb;
    margin-bottom: 0.5rem;
}

.disturbance-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.results-visual {
    margin: 1rem 0;
    text-align: center;
}

.hardware-visual {
    margin: 1rem 0;
    text-align: center;
}

.results-table-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border: 1px solid #e5e7eb;
    margin: 0 auto 1rem;
    display: block;
}

/* Print Styles */
@media print {
    .header,
    .hero-actions,
    .footer {
        display: none;
    }
    
    .hero {
        padding-top: 2rem;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}
