/* EdgeRIC Custom Styles for Furo Theme */

/* ===== Video Grid Layout: two demos per row ===== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    margin: 2.5rem 0 3rem 0;
    width: 100%;
    max-width: 820px;
    box-sizing: border-box;
}

@media (max-width: 720px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}

/* Light blue + gilded (鎏金) border */
.video-card {
    background: var(--color-background-secondary);
    border: 1px solid rgba(147, 197, 253, 0.85);
    border-radius: 12px;
    padding: 0.4rem 0.55rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.35), 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    width: 100%;
    min-width: 0;
    margin: 0;
}

.video-card:hover {
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.5), 0 8px 24px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.video-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-top: 0.45rem;
}

/* Match Events card typography; main title in deep blue */
.video-card h3 {
    margin: 0 0 0.2rem 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    color: #1e40af;
}

.video-card p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--color-foreground-secondary);
    flex: 1;
}

/* Video wrapper: cover + play button, then video */
.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 6px;
    overflow: hidden;
    background: transparent;
    align-self: stretch;
}

.video-cover {
    position: absolute;
    inset: 0;
    /* Keep poster aspect ratio, add whitespace padding */
    padding: 10px;
    box-sizing: border-box;
    background-origin: content-box;
    background-clip: content-box;
    background-size: contain;
    background-position: center;
    background-color: #ffffff;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
    transition: opacity 0.2s ease;
}

.video-cover:hover {
    opacity: 0.95;
}

.video-cover.hidden {
    display: none;
}

.video-play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #1e40af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0;
    line-height: 1;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, background 0.2s ease;
}

.video-play-btn::after {
    content: '';
    width: 0;
    height: 0;
    margin-left: 4px;
    border-style: solid;
    border-width: 9px 0 9px 16px;
    border-color: transparent transparent transparent currentColor;
}

@media (max-width: 800px) {
    .video-wrapper {
        max-width: 560px;
    }
}

.video-play-btn:hover {
    transform: scale(1.08);
    background: #fff;
}

.video-wrapper video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    vertical-align: top;
}

.video-wrapper video[data-src] {
    opacity: 0;
}

.video-wrapper video.playing {
    opacity: 1;
}

/* ===== Project Grid Layout ===== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

@media (max-width: 800px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}

.project-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-background-secondary);
    border: 1px solid var(--color-background-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    min-height: 80px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--color-brand-primary);
    text-decoration: none;
}

.project-card h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-foreground-primary);
    line-height: 1.3;
    text-align: center;
    width: 100%;
}

.project-card:hover h3 {
    color: #fff;
}

.project-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-foreground-secondary);
    line-height: 1.5;
}

/* ===== Project Card Backgrounds ===== */
/* Schema diagram palette: light blue, peach, green, lavender, pink, gray */

#card-cloud-gaming {
    background: linear-gradient(135deg, #BCACD4, #EBE8F9);
}

#card-multimodal {
    background: linear-gradient(135deg, #A2BFE3, #C0DAE5);
}

#card-telemetry {
    background: linear-gradient(135deg, #C1E2C1, #E9F5ED);
}

#card-qoe {
    background: linear-gradient(135deg, #DFADBE, #F2E0E5);
}

#card-muapps {
    background: linear-gradient(135deg, #C89899, #EBDFCC);
}

#card-tiny-twin {
    background: linear-gradient(135deg, #E8D88A, #FBF4D4);
}

#card-cloud-gaming h3,
#card-multimodal h3,
#card-telemetry h3,
#card-qoe h3,
#card-muapps h3,
#card-tiny-twin h3 {
    color: #333;
    text-shadow: none;
}

/* ===== Team Grid Layout ===== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

@media (max-width: 1000px) {
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.team-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1rem auto;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border: 3px solid #93c5fd;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    background-size: cover;
    background-position: center 60%;
}

/* Add individual photos: source images under docs/team_photos/,
   but in the built site they are copied into _static/, so URLs are just the filenames. */

#photo-dinesh {
    background-image: url('Dinesh.jpg');
}

#photo-srinivas {
    background-image: url('Srinivas.jpg');
}

#photo-ish {
    background-image: url('Ish.jpg');
}

#photo-saru {
    background-image: url('Saru.jpg');
}

#photo-wcsng {
    background-image: url('WCSNG.jpg');
}

#photo-ushasi {
    background-image: url('Ushasi.jpg');
}

#photo-sushila {
    background-image: url('Sushila.jpg');
}

#photo-Ali {
    background-image: url('Ali.jpg');
}

#photo-archana {
    background-image: url('Archana.jpg');
}

#photo-qingyuan {
    background-image: url('Qingyuan.jpg');
}

#photo-frederik {
    background-image: url('Frederik.jpg');
}

#photo-Sesha{
    background-image: url('Sesha.jpg');
}

#photo-Woo {
    background-image: url('Woo.jpg');
}

.team-card h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-foreground-primary);
}

.team-card p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-foreground-secondary);
}

.team-email {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--color-brand-primary);
    text-decoration: none;
}

.team-email:hover {
    text-decoration: underline;
}

/* ===== Repository Layout: 1x4 compact cards ===== */
.repo-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 2rem 0;
}

@media (max-width: 1100px) {
    .repo-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .repo-list {
        grid-template-columns: 1fr;
    }
}

.repo-card {
    background: linear-gradient(135deg, rgba(219, 234, 254, 1), rgba(191, 219, 254, 1));
    border: 1px solid rgba(147, 197, 253, 0.5);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    text-decoration: none;
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
    min-height: 170px;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .repo-card {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.3), rgba(29, 78, 216, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.repo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
    text-decoration: none;
}

.repo-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e40af;
    pointer-events: none;
    line-height: 1.3;
}

[data-theme="dark"] .repo-card h3 {
    color: #93c5fd;
}

.repo-card p {
    margin: 0;
    font-size: 0.8rem;
    color: #3b82f6;
    pointer-events: none;
    line-height: 1.35;
}

[data-theme="dark"] .repo-card p {
    color: #60a5fa;
}

.repo-meta {
    font-size: 0.78rem;
    color: var(--color-foreground-secondary);
    margin: 0.15rem 0 0.35rem 0;
}

.repo-link {
    display: inline-block;
    margin-top: auto;
    font-size: 0.78rem;
    font-weight: 600;
    color: #ffffff !important;
    background: #1e40af;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    text-decoration: none;
}

.repo-link:hover {
    background: #1d4ed8;
    text-decoration: none;
}

/* ===== Events UI (2-col grid, YouTube embed or same-size cover) ===== */
.event-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 2rem 0;
}

@media (max-width: 720px) {
    .event-grid {
        grid-template-columns: 1fr;
    }
}

.event-tile {
    background: var(--color-background-secondary);
    border: 1px solid var(--color-background-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.event-tile:hover {
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

/* 16:9 video embed – same aspect used for cover */
.event-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #1a1a2e;
}

.event-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Cover (same size when no video) */
.event-tile-cover .event-cover-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.event-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}

.event-cover-badge {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #1e40af;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    margin-bottom: 0.5rem;
}

.event-cover-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-foreground-primary);
    line-height: 1.3;
}

.event-tile-footer {
    padding: 1rem 1.2rem;
}

.event-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.35;
    color: #1e40af;
    background: rgba(219, 234, 254, 1);
    padding: 0.2rem 0.5rem;
    font-size: 0.78rem;
    margin-bottom: 0.4rem;
    margin: 0.15rem 0 0.35rem 0;

.event-tile-title {
    margin: 0 0 0.35rem 0;
    font-size: 1rem;
    margin-top: auto;
    font-size: 0.78rem;
    line-height: 1.25;
}

    padding: 0.28rem 0.75rem;
    margin: 0 0 0.6rem 0;
    font-size: 0.85rem;
    color: var(--color-foreground-secondary);
    line-height: 1.4;
}

.event-tile-cta {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

.event-tile-cta:hover {
    text-decoration: underline;
}

[data-theme="dark"] .event-cover {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.5) 0%, rgba(59, 130, 246, 0.3) 100%);
}

[data-theme="dark"] .event-cover-badge {
    color: #93c5fd;
    background: rgba(15, 23, 42, 0.9);
}

[data-theme="dark"] .event-badge {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.25);
}

[data-theme="dark"] .event-tile-cta {
    color: #60a5fa;
}

/* Legacy event-list / event-card (keep for any other refs) */
.event-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0 2rem 0;
}

.event-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    text-decoration: none;
    background: var(--color-background-secondary);
    border: 1px solid var(--color-background-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
    border-color: rgba(59, 130, 246, 0.45);
}

.event-date {
    flex: 0 0 auto;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    color: #1e40af;
    background: rgba(219, 234, 254, 1);
    border: 1px solid rgba(147, 197, 253, 0.8);
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
}

[data-theme="dark"] .event-date {
    color: #93c5fd;
    background: rgba(30, 58, 138, 0.35);
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.event-main {
    min-width: 0;
    flex: 1 1 auto;
}

.event-title {
    font-weight: 700;
    color: var(--color-foreground-primary);
    line-height: 1.25;
}

.event-desc {
    margin-top: 0.2rem;
    color: var(--color-foreground-secondary);
    font-size: 0.9rem;
    line-height: 1.35;
}

.event-cta {
    flex: 0 0 auto;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    background: #2563eb;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
}

[data-theme="dark"] .event-cta {
    background: #1d4ed8;
}

/* ===== Publication & Tutorial Cards ===== */
.publication-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin: 2rem 0;
}

.publication-card {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.9), rgba(191, 219, 254, 0.8));
    border: 1px solid rgba(147, 197, 253, 0.5);
    border-radius: 12px;
    padding: 1.25rem 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.publication-card:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

[data-theme="dark"] .publication-card {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.35), rgba(29, 78, 216, 0.25));
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.publication-card h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-foreground-primary);
    line-height: 1.25;
}

.publication-desc {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--color-foreground-secondary);
    flex: 1;
}

.publication-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pub-btn {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    text-decoration: none;
    color: #ffffff;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.pub-btn:link,
.pub-btn:visited {
    color: #ffffff;
}

.pub-btn:hover {
    transform: scale(1.04);
}

.pub-btn-paper {
    background: #1e40af;
}

.pub-btn-paper:hover {
    background: #1d4ed8;
    text-decoration: none;
}

.pub-btn-web {
    background: rgba(59, 130, 246, 0.85);
}

.pub-btn-web:hover {
    background: #2563eb;
    text-decoration: none;
}

.pub-btn-code {
    background: #334155;
}

.pub-btn-code:hover {
    background: #475569;
    text-decoration: none;
}

.pub-btn-tutorial {
    background: #0f766e;
}

.pub-btn-tutorial:hover {
    background: #0d9488;
    text-decoration: none;
}

.pub-btn-demo {
    background: #a78bba;
}

.pub-btn-demo:hover {
    background: #b89ac9;
    text-decoration: none;
}

.pub-btn-demo:link,
.pub-btn-demo:visited {
    color: #ffffff;
}

[data-theme="dark"] .pub-btn-demo {
    background: #8b7a9e;
}

[data-theme="dark"] .pub-btn-demo:hover {
    background: #9d8aad;
}

/* ===== Dataset Cards ===== */
.dataset-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 2rem 0;
}

@media (max-width: 720px) {
    .dataset-grid {
        grid-template-columns: 1fr;
    }
}

.dataset-card {
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #93c5fd;
    border-radius: 14px;
    padding: 1.35rem 1.5rem;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.08);
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
}

a.dataset-card {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

a.dataset-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.18);
    background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
    transform: translateY(-2px);
}

[data-theme="dark"] a.dataset-card:hover {
    background: linear-gradient(145deg, #1e3a5f 0%, #1e293b 100%);
    border-color: #60a5fa;
}

[data-theme="dark"] .dataset-card {
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
    border-color: #3b82f6;
}

.dataset-card-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.12);
    border-radius: 14px;
}

.dataset-card-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

[data-theme="dark"] .dataset-card-icon {
    background: rgba(59, 130, 246, 0.2);
}

.dataset-card-body {
    flex: 1;
    min-width: 0;
}

.dataset-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #1e40af;
    line-height: 1.3;
}

[data-theme="dark"] .dataset-card h4 {
    color: #93c5fd;
}

.dataset-card p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #475569;
    letter-spacing: 0.01em;
}

[data-theme="dark"] .dataset-card p {
    color: #94a3b8;
}

[data-theme="dark"] .pub-btn-paper {
    background: #2563eb;
}

[data-theme="dark"] .pub-btn-paper:hover {
    background: #3b82f6;
}

[data-theme="dark"] .pub-btn-tutorial {
    background: #0d9488;
}

[data-theme="dark"] .pub-btn-tutorial:hover {
    background: #14b8a6;
}

/* ===== EdgeRIC Architecture Sections ===== */
.arch-section-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.25rem 0 2rem 0;
}

.arch-section {
    display: block;
    position: relative;
    padding: 0.85rem 1.1rem 0.85rem 1.5rem;
    border-left: none;
    border-radius: 0 10px 10px 0;
    text-decoration: none;
    background: var(--color-background-secondary);
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}

/* Wavy irregular left edge (cover line) – SVG path: vertical bar with wavy right edge */
.arch-section::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='160' viewBox='0 0 14 160'%3E%3Cpath fill='rgba(59,130,246,0.55)' d='M0 0h14v12 Q 8 18 14 24 v14 Q 6 42 14 48 v12 Q 9 66 14 72 v16 Q 5 92 14 98 v14 Q 8 116 14 122 v12 Q 7 138 14 144 v16 H0 V0 Z'/%3E%3C/svg%3E") repeat-y;
    background-size: 14px 160px;
    border-radius: 3px 0 0 3px;
}

.arch-section:hover {
    background: rgba(219, 234, 254, 0.8);
    transform: translateX(2px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.arch-section:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='160' viewBox='0 0 14 160'%3E%3Cpath fill='rgba(59,130,246,0.85)' d='M0 0h14v12 Q 8 18 14 24 v14 Q 6 42 14 48 v12 Q 9 66 14 72 v16 Q 5 92 14 98 v14 Q 8 116 14 122 v12 Q 7 138 14 144 v16 H0 V0 Z'/%3E%3C/svg%3E");
}

[data-theme="dark"] .arch-section {
    background: rgba(15, 23, 42, 0.7);
}

[data-theme="dark"] .arch-section::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='160' viewBox='0 0 14 160'%3E%3Cpath fill='rgba(59,130,246,0.5)' d='M0 0h14v12 Q 8 18 14 24 v14 Q 6 42 14 48 v12 Q 9 66 14 72 v16 Q 5 92 14 98 v14 Q 8 116 14 122 v12 Q 7 138 14 144 v16 H0 V0 Z'/%3E%3C/svg%3E");
}

[data-theme="dark"] .arch-section:hover {
    background: rgba(30, 64, 175, 0.55);
}

.arch-section-title {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--color-foreground-primary);
    margin-bottom: 0.15rem;
}

.arch-section-desc {
    font-size: 0.86rem;
    color: var(--color-foreground-secondary);
    line-height: 1.4;
}

/* ===== EdgeRIC Tutorial Sections (light blue) ===== */
.tutorial-section-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.25rem 0 2rem 0;
}

.tutorial-section {
    display: block;
    padding: 0.85rem 1.1rem;
    border-left: 3px solid rgba(59, 130, 246, 0.45);
    border-radius: 0 10px 10px 0;
    text-decoration: none;
    background: rgba(219, 234, 254, 0.6);
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}

.tutorial-section:hover {
    border-color: rgba(59, 130, 246, 0.85);
    background: rgba(191, 219, 254, 0.85);
    transform: translateX(2px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

[data-theme="dark"] .tutorial-section {
    background: rgba(30, 64, 175, 0.25);
    border-color: rgba(59, 130, 246, 0.45);
}

[data-theme="dark"] .tutorial-section:hover {
    background: rgba(30, 64, 175, 0.45);
}

.tutorial-section-title {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--color-foreground-primary);
    margin-bottom: 0.15rem;
}

.tutorial-section-desc {
    font-size: 0.86rem;
    color: var(--color-foreground-secondary);
    line-height: 1.4;
}

/* ===== Content Width ===== */
.content {
    max-width: 1200px;
    padding: 0 2rem;
}

/* ===== Typography Enhancements ===== */
.content h1 {
    border-bottom: 2px solid var(--color-brand-primary);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.content h2 {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-background-border);
}

/* ===== Code Blocks ===== */
.highlight {
    border-radius: 8px;
    margin: 1rem 0;
}

code.literal {
    background-color: var(--color-inline-code-background);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

/* ===== Admonitions ===== */
.admonition {
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admonition-title {
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ===== Images ===== */
.content img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 1rem 0;
    max-width: 100%;
    height: auto;
}

/* ===== Side by Side Layout ===== */
.side-by-side {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin: 1.5rem 0;
}

.side-by-side .video {
    flex: 1;
}

.side-by-side .text {
    flex: 1;
}

@media (max-width: 768px) {
    .side-by-side {
        flex-direction: column;
    }
}

/* ===== Centered Image ===== */
.centered-image {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

/* ===== Custom Blue Box ===== */
.custom-blue-box {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border: 1px solid #c9e0f5;
    border-left: 4px solid var(--color-brand-primary);
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin: 1rem 0;
}

[data-theme="dark"] .custom-blue-box {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.15) 0%, rgba(0, 102, 204, 0.1) 100%);
    border-color: rgba(77, 166, 255, 0.3);
}

/* ===== Tables ===== */
table.docutils {
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin: 1.5rem 0;
    width: 100%;
}

table.docutils th {
    background-color: var(--color-brand-primary);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1rem;
}

table.docutils td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-background-border);
}

table.docutils tr:hover td {
    background-color: var(--color-background-hover);
}

/* ===== Sidebar Enhancements ===== */
.sidebar-tree .reference {
    transition: color 0.2s ease, background-color 0.2s ease;
}



.sidebar-tree a.reference {
    color: var(--color-foreground-secondary);
}
.sidebar-tree a.reference:hover {
    color: var(--color-foreground-primary);
    background-color: var(--color-background-hover);
}
.sidebar-tree .current > .reference {
    font-weight: 600;
    color: var(--color-foreground-primary);
}

.sidebar-tree p.caption,
.sidebar-tree .caption {
    font-size: 0.8rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin: 1rem 0 0.4rem 0;
    padding: 0.25rem 0 0.25rem 0.25rem;
    color: var(--color-foreground-primary);
    border-left: 3px solid var(--color-brand-primary);
}

.sidebar-tree p.caption > a.reference,
.sidebar-tree .caption > a.reference {
    display: inline-block;
    color: var(--color-foreground-primary);
}


.sidebar-tree > ul {
    margin: 0;
    padding-left: 0;
}

.sidebar-tree ul > li {
    margin: 0;
    list-style: none;
}

.sidebar-tree > ul > li > .reference,
.sidebar-tree > ul > li > a.reference {
    padding: 0.35rem 0.5rem 0.35rem 1.25rem;
    display: block;
    border-radius: 4px;
}

.sidebar-tree ul ul {
    padding-left: 1.25rem;
    margin-top: 0.1rem;
}

.sidebar-tree ul ul > li > .reference,
.sidebar-tree ul ul > li > a.reference {
    padding: 0.28rem 0.5rem 0.28rem 1.25rem;
    font-size: 0.92em;
    border-radius: 4px;
}

.sidebar-tree ul ul ul {
    padding-left: 1.25rem;
}


.sidebar-tree .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.35rem;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--color-foreground-secondary);
    font-size: 0.6rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 3px;
    vertical-align: middle;
    flex-shrink: 0;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.sidebar-tree .sidebar-toggle:hover {
    color: var(--color-brand-primary);
    background-color: var(--color-background-hover);
}

.sidebar-tree .sidebar-caption-with-toggle {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.sidebar-tree .sidebar-caption-with-toggle .sidebar-toggle {
    margin-left: auto;
    margin-right: 0;
}

.sidebar-tree .sidebar-li-with-toggle {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.sidebar-tree .sidebar-li-with-toggle > .reference,
.sidebar-tree .sidebar-li-with-toggle > a.reference {
    flex: 1 1 auto;
    min-width: 0;
}

.sidebar-tree .sidebar-li-with-toggle > .sidebar-toggle {
    margin-left: auto;
    margin-right: 0;
}

.sidebar-tree .sidebar-li-with-toggle > ul {
    width: 100%;
}

.sidebar-tree ul.sidebar-collapsed {
    display: none;
}

/* ===== Cards/Feature Boxes ===== */
.feature-card {
    background: var(--color-background-secondary);
    border: 1px solid var(--color-background-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.feature-card h3 {
    margin-top: 0;
    color: var(--color-brand-primary);
}

/* ===== Grid Layout for Features ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* ===== TOC Enhancements ===== */
.toc-tree {
    padding: 1rem;
    background: var(--color-background-secondary);
    border-radius: 8px;
    margin: 1rem 0;
}

/* ===== Footer ===== */
.footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-background-border);
}

/* ===== Tabs Styling ===== */
.sphinx-tabs {
    margin: 1.5rem 0;
}

.sphinx-tabs-tab {
    border-radius: 8px 8px 0 0 !important;
    transition: background-color 0.2s ease;
}

.sphinx-tabs-panel {
    border-radius: 0 0 8px 8px !important;
}

/* ===== API Documentation ===== */
dl.py.function, dl.py.class, dl.py.method {
    background: var(--color-background-secondary);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid var(--color-brand-primary);
}

dt.sig {
    font-family: var(--font-stack--monospace);
    background: transparent !important;
}

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

/* Sidebar brand title: blue background, white text */
.sidebar-brand {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.sidebar-brand > * {
    margin-left: 0 !important;
}

.sidebar-brand a.sidebar-brand-text,
.sidebar-brand .sidebar-brand-text {
    display: inline-block;
    background: transparent;
    color: #111827 !important;
    padding: 0;
    font-size: 2.1rem;
    border-radius: 0;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-decoration: none;
}

.sidebar-brand a.sidebar-brand-text:hover {
    color: #000000 !important;
    text-decoration: none;
}

[data-theme="dark"] .sidebar-brand a.sidebar-brand-text,
[data-theme="dark"] .sidebar-brand .sidebar-brand-text {
    color: #f9fafb !important;
}
/* ===== Sidebar brand: Edgeric + school logos ===== */
.sidebar-school-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    margin-bottom: 0.75rem;
    padding: 0.75rem 0;
    padding-left: 0 !important;
    margin-left: 0 !important;
    border-top: 0;
}

.sidebar-school-logo-single {
    height: auto;
    width: 100%;
    max-width: 220px;
    object-fit: contain;
    opacity: 0.95;
}

.sidebar-school-logo-single:hover {
    opacity: 1;
}

/* ===== News and Updates Sidebar ===== */
.news-updates-sidebar {
    padding: 0.5rem 0;
}

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

.news-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-background-border);
}

.news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.news-item:first-child {
    padding-top: 0;
}

.news-date {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-brand-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.25rem;
}

.news-item p {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--color-foreground-secondary);
}

/* Hide the in-page news source container; content is reused in sidebar */
.content .news-sidebar-source {
    display: none;
}

/* ===== Hide in-content toctree / nav (keep only in sidebar) ===== */
.content .toctree-wrapper {
    display: none !important;
}
/* .content .arch-section-list,
.content .event-list {
    display: none !important;
} */

/* ===== Print Styles ===== */
@media print {
    .sidebar-drawer,
    .toc-drawer {
        display: none !important;
    }
    
    .content {
        max-width: 100% !important;
    }
}