:root {
    color-scheme: dark;
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-elevated: #1f2630;
    --border-color: #30363d;
    --text-primary: #c9d1d9;
    --text-secondary: #42d231;
    --text-muted: #8b949e;
    --accent-blue: #58a6ff;
    --accent-blue-soft: rgba(56, 139, 253, 0.12);
    --accent-green: #3fb950;
    --brand-green: #39ff88;
    --brand-green-soft: rgba(57, 255, 136, 0.12);
    --brand-green-border: rgba(57, 255, 136, 0.7);
    --accent-yellow: #d29922;
    --focus-ring: rgba(88, 166, 255, 0.35);
    --shadow-color: rgba(0, 0, 0, 0.35);
    --logo-bg: #ffffff;
    --nav-border: #34506b;
}

[data-theme="light"] {
    color-scheme: light;
    --bg-primary: #eef2f6;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f7f9fb;
    --bg-elevated: #ffffff;
    --border-color: #d6dde6;
    --text-primary: #1f2933;
    --text-secondary: #275d38;
    --text-muted: #5f6c7b;
    --accent-blue: #0b63ce;
    --accent-blue-soft: rgba(11, 99, 206, 0.1);
    --accent-green: #2f8f46;
    --brand-green: #087f3b;
    --brand-green-soft: rgba(8, 127, 59, 0.1);
    --brand-green-border: rgba(8, 127, 59, 0.35);
    --accent-yellow: #9a6a00;
    --focus-ring: rgba(11, 99, 206, 0.22);
    --shadow-color: rgba(31, 41, 51, 0.12);
    --logo-bg: #ffffff;
    --nav-border: #b7c7d9;
}

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

html {
    background: var(--bg-primary);
}

body {
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: Verdana, Geneva, sans-serif;
    font-size: 12px;
    line-height: 1.6;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    color: inherit;
}

a {
    color: var(--accent-blue);
}

a:hover,
a:focus {
    text-decoration-thickness: 2px;
}

:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.container {
    width: min(100%, 1080px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 20px;
    background: var(--bg-secondary);
}

.site-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
}

.banner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    min-height: 64px;
    width: 100%;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--logo-bg);
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.banner-image {
    display: block;
    width: auto;
    height: 60px;
    object-fit: contain;
}

.banner-title {
    flex: 1 1 auto;
    margin-left: clamp(28px, 5vw, 72px);
    color: #1f2933;
    font-size: clamp(16px, 2vw, 21px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
    white-space: nowrap;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: 1px solid #cfd6df;
    border-radius: 50%;
    background: #ffffff;
    color: #1f2933;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.theme-toggle:hover,
.theme-toggle:focus {
    border-color: var(--accent-blue);
}

.theme-toggle-icon {
    font-size: 18px;
    line-height: 1;
}

h1 {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

h2 {
    color: var(--text-primary);
    font-size: 17px;
    line-height: 1.35;
}

h3 {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.35;
}

.info-box {
    margin: 20px 0;
    padding: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.7;
}

.info-box h2 {
    margin-bottom: 12px;
    font-size: 16px;
}

.info-box p + p,
.intro-more p + p {
    margin-top: 12px;
}

.intro-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.pill {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid var(--accent-blue);
    border-radius: 999px;
    background: var(--accent-blue-soft);
    color: var(--accent-blue);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-pill {
    position: relative;
    overflow: hidden;
    border-color: var(--brand-green-border);
    background:
        linear-gradient(90deg, transparent 0, var(--brand-green-soft) 35%, transparent 70%),
        rgba(0, 0, 0, 0.18);
    color: var(--brand-green);
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    letter-spacing: 0.16em;
    text-shadow: 0 0 8px var(--brand-green);
    box-shadow:
        inset 0 0 14px var(--brand-green-soft),
        0 0 14px rgba(57, 255, 136, 0.16);
}

[data-theme="light"] .brand-pill {
    background: var(--brand-green-soft);
    text-shadow: none;
    box-shadow: inset 0 0 10px rgba(8, 127, 59, 0.08);
}

.link-pill {
    text-decoration: none;
}

.link-pill:hover,
.link-pill:focus {
    border-color: var(--accent-blue);
    text-decoration: underline;
}

.read-more-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    margin: 8px 0 12px;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--accent-blue);
    cursor: pointer;
    font-weight: 700;
}

.read-more-toggle:hover,
.read-more-toggle:focus {
    text-decoration: underline;
}

.intro-more {
    margin-bottom: 12px;
}

.intro-more[hidden] {
    display: none;
}

main {
    margin: 28px 0;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: stretch;
    margin-bottom: 18px;
    padding: 6px;
    background:
        linear-gradient(180deg, var(--bg-elevated), var(--bg-tertiary));
    border: 1px solid var(--nav-border);
    border-radius: 6px;
    box-shadow:
        inset 0 -1px 0 var(--border-color),
        0 8px 18px rgba(0, 0, 0, 0.08);
}

.tab-button {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 700;
    text-align: center;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.tab-button:hover,
.tab-button:focus {
    border-color: var(--accent-blue);
}

.tab-button.is-active {
    background: var(--bg-primary);
    border-color: var(--border-color);
    color: var(--accent-blue);
}

.featured-tab {
    border-color: var(--brand-green-border);
    background: var(--brand-green-soft);
    color: var(--brand-green);
}

.featured-tab.is-active {
    border-color: var(--brand-green-border);
    background: var(--bg-primary);
    color: var(--brand-green);
    box-shadow: inset 0 0 14px var(--brand-green-soft);
}

.tab-panel {
    animation: panel-in 150ms ease-out;
}

.tab-panel[hidden] {
    display: none;
}

@keyframes panel-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
    padding: 0 2px;
}

.panel-heading p,
.muted {
    color: var(--text-muted);
}

.projects-list {
    display: grid;
    gap: 12px;
}

.project-row {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.project-row:hover {
    background: var(--bg-elevated);
}

.project-media {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.project-thumb {
    width: 76px;
    height: 76px;
    object-fit: contain;
    background: transparent;
}

.project-thumb.me-thumb,
.project-thumb.intern-thumb {
    width: 92px;
    height: 92px;
}

.project-thumb.me-thumb {
    filter: brightness(1.35) contrast(1.02) saturate(1.05) drop-shadow(0 0 2px rgba(255, 255, 255, 0.25));
}

[data-theme="light"] .project-thumb.me-thumb {
    filter: contrast(1.05) saturate(1.02);
}

.project-content {
    min-width: 0;
}

.project-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.project-link {
    color: var(--text-primary);
    font-weight: 700;
    text-decoration: none;
}

.project-link:hover,
.project-link:focus {
    color: var(--text-primary);
    text-decoration: underline;
}

.project-content p {
    color: var(--text-secondary);
}

.team-name {
    margin-top: 8px;
    color: var(--text-muted);
    font-weight: 700;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-green);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.text-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--accent-blue);
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
}

.text-action:hover,
.text-action:focus {
    border-color: var(--accent-blue);
    text-decoration: underline;
}

.primary-action {
    border-color: var(--brand-green-border);
    background: var(--brand-green-soft);
    color: var(--brand-green);
}

.webinar-panel {
    display: grid;
    gap: 14px;
}

.webinar-hero {
    padding: 22px;
    background:
        linear-gradient(135deg, var(--brand-green-soft), transparent 46%),
        var(--bg-tertiary);
    border: 1px solid var(--brand-green-border);
    border-radius: 6px;
    box-shadow: inset 0 0 22px rgba(57, 255, 136, 0.08);
}

[data-theme="light"] .webinar-hero {
    box-shadow: inset 0 0 16px rgba(8, 127, 59, 0.06);
}

.webinar-hero h2 {
    max-width: 780px;
    margin-top: 6px;
    font-size: 22px;
}

.webinar-lead {
    max-width: 860px;
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 15px;
}

.webinar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.webinar-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.webinar-card,
.webinar-contact,
.webinar-video-section {
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.webinar-card p,
.webinar-contact p,
.webinar-video-section p {
    margin-top: 8px;
    color: var(--text-secondary);
}

.webinar-contact {
    border-color: var(--brand-green-border);
}

.webinar-video-section h3 {
    margin-bottom: 2px;
}

.webinar-next-action {
    margin-top: 12px;
}

.webinar-video {
    display: block;
    width: 100%;
    margin-top: 12px;
    background: #000000;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.definition-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 14px;
}

.definition-block,
.simple-panel {
    padding: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.definition-block p,
.simple-panel p {
    margin-top: 10px;
    color: var(--text-secondary);
}

.definition-block h3 {
    margin-top: 16px;
}

.definition-block ul {
    margin-top: 8px;
    padding-left: 18px;
    color: var(--text-secondary);
}

.link-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.link-list a {
    font-weight: 700;
    text-decoration: none;
}

.link-list a:hover,
.link-list a:focus {
    text-decoration: underline;
}

.media-links {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

.media-links h3 {
    margin-top: 16px;
}

.media-links h3:first-child {
    margin-top: 0;
}

.media-links ul {
    margin-top: 8px;
    padding-left: 20px;
    color: var(--text-secondary);
}

.media-links li + li {
    margin-top: 6px;
}

.media-links a {
    font-weight: 700;
    text-decoration: none;
}

.media-links a:hover,
.media-links a:focus {
    text-decoration: underline;
}

.modal,
.image-preview {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.is-open,
.image-preview.is-open {
    display: flex;
}

.modal-backdrop,
.image-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
}

.modal-body,
.image-preview-body {
    position: relative;
    z-index: 1;
    width: min(100%, 1000px);
    max-height: min(90vh, 820px);
    overflow: auto;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 18px 48px var(--shadow-color);
}

.modal-close,
.image-preview-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.modal-close:hover,
.modal-close:focus,
.image-preview-close:hover,
.image-preview-close:focus {
    border-color: var(--accent-blue);
}

.video-modal-body {
    width: min(100%, 1120px);
}

.video-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 16px;
    align-items: stretch;
}

.video-stage {
    display: flex;
    min-height: 320px;
    background: #000000;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.project-video {
    display: block;
    width: 100%;
    max-height: 76vh;
    background: #000000;
}

.video-sidebar {
    padding: 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.video-sidebar h2 {
    padding-right: 22px;
}

.video-sidebar p {
    margin-top: 12px;
    color: var(--text-secondary);
}

.sidebar-kicker {
    margin-top: 0;
    color: var(--accent-yellow);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.exam-link {
    display: inline-block;
    margin-top: 18px;
    color: var(--accent-blue);
    font-weight: 700;
    text-decoration: none;
}

.exam-link.is-disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

.gallery-modal-body h2 {
    margin: 0 40px 14px 0;
    font-size: 16px;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.modal-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    padding: 0;
    overflow: hidden;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: zoom-in;
}

.modal-item:hover,
.modal-item:focus {
    border-color: var(--accent-blue);
}

.modal-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--bg-primary);
}

.image-preview {
    z-index: 1000;
}

.image-preview-backdrop {
    background: rgba(0, 0, 0, 0.78);
}

.image-preview-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 1080px);
    padding: 12px 12px 18px;
}

.image-preview-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.image-preview-caption {
    margin-top: 10px;
    padding: 0 8px;
    color: var(--text-secondary);
    text-align: center;
}

footer {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 11px;
    text-align: center;
}

@media (max-width: 760px) {
    .container {
        padding: 14px;
    }

    .banner {
        align-items: center;
    }

    .banner-image {
        max-width: calc(100% - 56px);
        height: auto;
        max-height: 60px;
    }

    .banner-title {
        margin-left: 10px;
        font-size: 15px;
        white-space: normal;
    }

    .info-box {
        padding: 16px;
        font-size: 14px;
    }

    .tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tab-button {
        width: 100%;
    }

    .panel-heading,
    .project-title-row {
        display: block;
    }

    .panel-heading p {
        margin-top: 4px;
    }

    .status-badge {
        margin-top: 8px;
    }

    .project-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .project-media {
        justify-content: flex-start;
    }

    .definition-grid,
    .webinar-grid,
    .video-layout {
        grid-template-columns: 1fr;
    }

    .modal,
    .image-preview {
        padding: 12px;
    }

    .video-stage {
        min-height: 220px;
    }
}

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

    .project-actions {
        display: grid;
    }

    .text-action {
        width: 100%;
    }
}
