/* ========================================
   PROFESSIONAL ACADEMIC RESEARCH PAPER
   Edge Infrastructure for the AI-First Web
   ======================================== */

:root {
    /* Academic Color Palette - Professional with Orange Accents */
    --primary-orange: #FF6B35;
    --primary-orange-light: #FF8C61;
    --primary-orange-dark: #E55A28;
    --accent-orange: #FF9F6D;

    /* Grayscale Palette */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Background Colors - Clean and Professional */
    --bg-primary: #FFFFFF;
    --bg-secondary: #FAFAFA;
    --bg-alt: #F5F5F5;

    /* Text Colors */
    --text-primary: #1F2937;
    --text-secondary: #4B5563;
    --text-muted: #6B7280;

    /* Shadows - Subtle */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Border Radius */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
}

/* ========================================
   GLOBAL STYLES
   ======================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: Georgia, 'Times New Roman', Times, serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--gray-900);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

strong {
    font-weight: 600;
    color: var(--gray-900);
}

em {
    font-style: italic;
}

/* ========================================
   CONTAINER & LAYOUT
   ======================================== */

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

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
}

/* ========================================
   NAVIGATION
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.nav-brand {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
    padding-bottom: 0.25rem;
    border-bottom: 2px solid transparent;
}

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

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    margin-top: 60px;
    background: linear-gradient(to bottom, var(--bg-primary) 0%, var(--gray-50) 100%);
    border-bottom: 4px solid var(--primary-orange);
    padding: 4rem 0 3rem;
}

.paper-header {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.paper-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.paper-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 400;
    font-style: italic;
    line-height: 1.5;
}

.authors-block {
    display: inline-block;
    background: white;
    padding: 1.5rem 2.5rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.authors-line {
    margin: 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.affiliation,
.publication-date {
    margin: 0.5rem 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@media (max-width: 768px) {
    .paper-title {
        font-size: 1.75rem;
    }
    .paper-subtitle {
        font-size: 1rem;
    }
}

/* ========================================
   SECTIONS
   ======================================== */

.section {
    padding: 4rem 0;
}

.section-alt {
    background: var(--bg-primary);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-orange);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.subsection-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

/* ========================================
   ABSTRACT & CONTENT BOXES
   ======================================== */

.abstract-box {
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.abstract-box p {
    text-align: justify;
    hyphens: auto;
}

.keywords,
.acm-classification {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--gray-50);
    border-left: 4px solid var(--primary-orange);
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.keywords strong,
.acm-classification strong {
    color: var(--gray-900);
}

/* ========================================
   LISTS
   ======================================== */

.academic-list {
    margin: 1rem 0 1rem 2rem;
    line-height: 1.8;
}

.academic-list li {
    margin-bottom: 0.75rem;
}

.academic-list strong {
    color: var(--gray-900);
}

/* ========================================
   TABLES
   ======================================== */

.table-container {
    margin: 2rem 0;
    overflow-x: auto;
    background: white;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.95rem;
}

.data-table caption {
    caption-side: top;
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    background: var(--gray-50);
    border-bottom: 2px solid var(--primary-orange);
}

.data-table thead {
    background: var(--gray-50);
}

.data-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-900);
    border-bottom: 2px solid var(--gray-300);
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-200);
    color: var(--text-primary);
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table .table-total {
    background: var(--gray-50);
    font-weight: 600;
}

.data-table .table-total td {
    border-top: 2px solid var(--primary-orange);
    border-bottom: none;
}

/* ========================================
   CONSTRAINT CARDS
   ======================================== */

.constraint-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.constraint-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.constraint-card:hover {
    border-color: var(--primary-orange);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.constraint-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.constraint-card h4 {
    font-size: 1.25rem;
    color: var(--gray-900);
    margin: 0;
}

.constraint-card p {
    margin: 0.75rem 0;
    line-height: 1.6;
}

/* ========================================
   RESEARCH QUESTIONS
   ======================================== */

.research-questions {
    margin: 2rem 0;
}

.rq-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--primary-orange);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.rq-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.rq-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--primary-orange);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.rq-content strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.rq-content p {
    margin: 0;
}

/* ========================================
   CHARTS
   ======================================== */

.chart-container {
    margin: 2rem 0;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

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

/* ========================================
   FINDINGS
   ======================================== */

.finding-section {
    margin: 3rem 0;
}

.finding-statement {
    font-size: 1.1rem;
    font-weight: 500;
    padding: 1.5rem;
    background: linear-gradient(to right, rgba(255, 107, 53, 0.1) 0%, rgba(255, 159, 109, 0.05) 100%);
    border-left: 4px solid var(--primary-orange);
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
}

.finding-statement strong {
    color: var(--primary-orange);
}

/* ========================================
   EQUATION BOX
   ======================================== */

.equation-box {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    margin: 1.5rem 0;
    font-family: 'Courier New', monospace;
}

.equation {
    font-size: 1.1rem;
    text-align: center;
    margin: 1rem 0;
    font-weight: 600;
}

/* ========================================
   LATENCY BREAKDOWN
   ======================================== */

.latency-breakdown {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.latency-breakdown h4 {
    color: var(--gray-900);
    margin-bottom: 1rem;
}

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

.timeline-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    border-left: 2px solid var(--primary-orange);
}

.timeline-list li::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 1rem;
    width: 10px;
    height: 10px;
    background: var(--primary-orange);
    border-radius: 50%;
}

/* ========================================
   COMPARISON BOX
   ======================================== */

.comparison-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.comparison-col {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.comparison-col h4 {
    color: var(--gray-900);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-orange);
}

.comparison-col ul {
    list-style: none;
    padding-left: 0;
}

.comparison-col li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.comparison-col li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-orange);
    font-weight: bold;
}

/* ========================================
   METHODOLOGY BOX
   ======================================== */

.methodology-box {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-md);
    padding: 2rem;
    margin: 1.5rem 0;
}

.methodology-box h4 {
    color: var(--gray-900);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-orange);
}

.methodology-box h4:first-child {
    margin-top: 0;
}

/* ========================================
   CODE BLOCKS
   ======================================== */

.code-block {
    background: var(--gray-900);
    color: #E5E7EB;
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    box-shadow: var(--shadow-md);
}

.code-block pre {
    margin: 0;
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ========================================
   PRINCIPLES GRID
   ======================================== */

.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.principle-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    transition: all var(--transition-base);
}

.principle-card:hover {
    border-color: var(--primary-orange);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.principle-number {
    width: 50px;
    height: 50px;
    background: var(--primary-orange);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.principle-content h4 {
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.principle-content p {
    margin: 0;
    line-height: 1.6;
}

/* ========================================
   ARCHITECTURE DIAGRAM
   ======================================== */

.architecture-diagram-container {
    padding: 2rem;
    background: linear-gradient(to bottom, var(--gray-50), white);
    border-radius: var(--border-radius-lg);
    margin: 2rem 0;
    border: 1px solid var(--gray-200);
}

/* ========================================
   PIPELINE VISUALIZATION
   ======================================== */

.pipeline-visualization {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin: 2rem 0;
    padding: 2rem;
    background: var(--gray-50);
    border-radius: var(--border-radius-lg);
}

.pipeline-step {
    flex: 1;
    min-width: 150px;
    text-align: center;
    padding: 1.5rem;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.pipeline-step:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-orange);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-orange);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.pipeline-step h5 {
    font-size: 1rem;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.pipeline-step p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.pipeline-arrow {
    font-size: 2rem;
    color: var(--primary-orange);
    font-weight: 700;
    padding: 0 1rem;
}

.metric-highlight {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-light));
    color: white;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@media (max-width: 768px) {
    .pipeline-visualization {
        flex-direction: column;
        gap: 1rem;
    }

    .pipeline-arrow {
        transform: rotate(90deg);
    }
}

/* ========================================
   COMPONENT SECTION
   ======================================== */

.component-section {
    margin: 2.5rem 0;
}

.component-section h4 {
    color: var(--gray-900);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* ========================================
   IMPACT METRICS
   ======================================== */

.impact-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.metric-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.metric-card:hover {
    border-color: var(--primary-orange);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.metric-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.metric-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-orange);
    margin-bottom: 0.5rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.metric-label {
    font-size: 1.1rem;
    color: var(--gray-900);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.metric-detail {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* ========================================
   CONTRIBUTIONS GRID
   ======================================== */

.contributions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.contribution-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    transition: all var(--transition-base);
}

.contribution-card:hover {
    border-color: var(--primary-orange);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.contribution-number {
    width: 50px;
    height: 50px;
    background: var(--primary-orange);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.contribution-content h4 {
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.contribution-content p {
    margin: 0;
    line-height: 1.6;
}

/* ========================================
   FUTURE WORK SECTION
   ======================================== */

.future-work-section {
    margin: 2rem 0;
}

.future-work-section h4 {
    color: var(--gray-900);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.15rem;
}

/* ========================================
   ACKNOWLEDGMENTS
   ======================================== */

.acknowledgments {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--gray-50);
    border-left: 4px solid var(--primary-orange);
    border-radius: var(--border-radius-md);
}

.acknowledgments h4 {
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.acknowledgments p {
    margin: 0;
    font-style: italic;
}

/* ========================================
   REFERENCES
   ======================================== */

.references-list {
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--gray-200);
}

.references-list p {
    margin-bottom: 1rem;
    padding-left: 2rem;
    text-indent: -2rem;
    line-height: 1.6;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    text-align: center;
}

.footer-content p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.copyright {
    color: var(--gray-400);
}

.paper-info {
    color: var(--gray-300);
    font-weight: 600;
}

.conference-info {
    color: var(--gray-500);
    font-style: italic;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    body {
        background: white;
        font-size: 11pt;
    }

    .navbar {
        display: none;
    }

    .hero {
        margin-top: 0;
        border-bottom: 2px solid black;
    }

    .section {
        page-break-inside: avoid;
    }

    .chart-container {
        page-break-inside: avoid;
    }

    .table-container {
        page-break-inside: avoid;
    }

    a {
        color: black;
        text-decoration: none;
    }

    .footer {
        page-break-before: always;
    }
}

/* ========================================
   SMOOTH ANIMATIONS
   ======================================== */

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

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

/* ========================================
   RESPONSIVE DESIGN - MOBILE OPTIMIZED
   ======================================== */

/* Tablet and below (768px) */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .container {
        padding: 0 1.25rem;
    }

    /* Hero Section Mobile */
    .hero {
        padding: 3rem 0 2rem;
    }

    .paper-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .paper-subtitle {
        font-size: 1.05rem;
    }

    .authors-block {
        padding: 1.25rem 1.5rem;
    }

    .authors-line {
        font-size: 0.95rem;
    }

    /* Typography Mobile */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.65rem; }
    h3 { font-size: 1.35rem; }
    h4 { font-size: 1.15rem; }
    h5 { font-size: 1rem; }

    .section {
        padding: 3rem 0;
    }

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

    .subsection-title {
        font-size: 1.25rem;
        margin-top: 2rem;
    }

    /* Content Boxes Mobile */
    .abstract-box {
        padding: 1.5rem;
    }

    .abstract-box p {
        text-align: left;
    }

    /* Tables Mobile - Better Scrolling */
    .table-container {
        margin: 1.5rem 0;
        border-radius: var(--border-radius-sm);
    }

    .data-table {
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.6rem 0.75rem;
        white-space: nowrap;
    }

    .data-table caption {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    /* Cards and Grids Mobile */
    .constraint-cards,
    .principles-grid,
    .contributions-grid,
    .impact-metrics {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .constraint-card,
    .principle-card,
    .contribution-card,
    .metric-card {
        padding: 1.5rem;
    }

    .comparison-box {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    /* Research Questions Mobile */
    .rq-item {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem;
    }

    .rq-number {
        width: 45px;
        height: 45px;
    }

    /* Charts Mobile */
    .chart-container {
        padding: 1.25rem;
        margin: 1.5rem 0;
    }

    .chart-caption {
        font-size: 0.85rem;
    }

    /* Code Blocks Mobile */
    .code-block {
        padding: 1rem;
        font-size: 0.8rem;
    }

    .code-block pre {
        font-size: 0.8rem;
    }

    /* Pipeline Mobile */
    .pipeline-visualization {
        padding: 1.5rem;
    }

    .pipeline-step {
        padding: 1.25rem;
    }

    /* Methodology Box Mobile */
    .methodology-box {
        padding: 1.5rem;
    }

    /* Footer Mobile */
    .footer {
        padding: 2rem 0;
    }

    .footer-content p {
        font-size: 0.85rem;
    }
}

/* Mobile Phones (480px and below) */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 1rem;
    }

    /* Hero Section Small Mobile */
    .hero {
        padding: 2.5rem 0 1.5rem;
    }

    .paper-title {
        font-size: 1.5rem;
        line-height: 1.4;
    }

    .paper-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .authors-block {
        padding: 1rem 1.25rem;
    }

    .authors-line,
    .affiliation,
    .publication-date {
        font-size: 0.85rem;
    }

    /* Typography Small Mobile */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }
    h5 { font-size: 1rem; }

    .section {
        padding: 2.5rem 0;
    }

    .section-title {
        font-size: 1.35rem;
        margin-bottom: 1.25rem;
    }

    .subsection-title {
        font-size: 1.15rem;
        margin-top: 1.75rem;
    }

    /* Content Boxes Small Mobile */
    .abstract-box {
        padding: 1.25rem;
    }

    .keywords,
    .acm-classification {
        padding: 0.85rem 1rem;
        font-size: 0.85rem;
    }

    /* Lists Small Mobile */
    .academic-list {
        margin: 0.75rem 0 0.75rem 1.25rem;
    }

    /* Tables Small Mobile */
    .data-table {
        font-size: 0.8rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem 0.6rem;
    }

    /* Cards Small Mobile */
    .constraint-card,
    .principle-card,
    .contribution-card {
        padding: 1.25rem;
    }

    .constraint-icon {
        font-size: 2rem;
    }

    .principle-number,
    .contribution-number,
    .rq-number {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    /* Metric Cards Small Mobile */
    .metric-card {
        padding: 1.5rem 1rem;
    }

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

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

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

    /* Research Questions Small Mobile */
    .rq-item {
        padding: 1rem;
    }

    /* Charts Small Mobile */
    .chart-container {
        padding: 1rem;
        margin: 1.25rem 0;
    }

    /* Finding Statements Small Mobile */
    .finding-statement {
        padding: 1rem;
        font-size: 1rem;
    }

    /* Pipeline Small Mobile */
    .pipeline-step {
        padding: 1rem;
    }

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

    .pipeline-arrow {
        font-size: 1.5rem;
        padding: 0.5rem;
    }

    /* Comparison Box Small Mobile */
    .comparison-col {
        padding: 1.25rem;
    }

    /* Equation Box Small Mobile */
    .equation-box {
        padding: 1rem;
    }

    .equation {
        font-size: 0.95rem;
    }

    /* Latency Breakdown Small Mobile */
    .latency-breakdown {
        padding: 1.25rem;
    }

    .timeline-list li {
        font-size: 0.9rem;
    }

    /* Acknowledgments Small Mobile */
    .acknowledgments {
        padding: 1.5rem;
    }

    /* References Small Mobile */
    .references-list {
        padding: 1.25rem;
    }

    .references-list p {
        font-size: 0.9rem;
        padding-left: 1.5rem;
        text-indent: -1.5rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .nav-menu a {
        padding: 0.5rem 0.75rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Remove hover effects on touch devices */
    .constraint-card:hover,
    .principle-card:hover,
    .contribution-card:hover,
    .metric-card:hover {
        transform: none;
    }

    /* Better tap targets for links */
    a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* Landscape Mobile Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 2rem 0 1.5rem;
    }

    .section {
        padding: 2.5rem 0;
    }

    .chart-container {
        padding: 1.5rem 1rem;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

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

.text-muted {
    color: var(--text-muted);
}

.font-mono {
    font-family: 'Courier New', monospace;
}
