:root {
    --bg: #f2f7ff;
    --bg-soft: #ffffff;
    --text: #25396f;
    --muted: #6c7899;
    --line: #dce7ff;
    --primary: #435ebe;
    --primary-hover: #374c99;
    --accent: #57caeb;
    --card: #ffffffde;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    background: radial-gradient(circle at top left, #e7f0ff 0%, var(--bg) 45%, #edf3ff 100%);
}

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

.page-bg::before,
.page-bg::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    filter: blur(70px);
    z-index: -1;
}

.page-bg::before {
    width: 260px;
    height: 260px;
    left: -80px;
    top: 70px;
    background: #435ebe4d;
}

.page-bg::after {
    width: 320px;
    height: 320px;
    right: -120px;
    top: 190px;
    background: #57caeb52;
}

.container {
    width: min(1100px, 92%);
    margin: 28px auto 34px;
}

.card {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--card);
    backdrop-filter: blur(4px);
    box-shadow: 0 10px 28px -24px #25396fcc;
}

.topbar {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.topbar-head {
    display: flex;
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.brand-icon {
    color: var(--primary);
    font-size: 1.05rem;
}

.menu-toggle {
    display: none;
}

.menu {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

.menu a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.92rem;
    color: var(--muted);
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: 180ms ease;
}

.menu a i {
    font-size: 0.92rem;
    color: #5b74c7;
}

.menu a:hover {
    color: var(--primary);
    border-color: #d4e2ff;
    background: #435ebe12;
}

.menu a:hover i {
    color: var(--primary);
}

.hero {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 20px;
    padding: 30px 0;
}

.hero-copy h1 {
    margin: 10px 0 14px;
    font-size: clamp(2rem, 4.2vw, 3.5rem);
    line-height: 1.1;
}

.hero-copy h1 span {
    color: var(--primary);
}

.badge {
    display: inline-flex;
    margin: 0;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: var(--primary);
    background: #435ebe14;
}

.lead {
    margin: 0;
    max-width: 620px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 1.04rem;
}

.hero-actions {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 10px;
    padding: 11px 18px;
    font-size: 0.92rem;
    font-weight: 700;
    transition: 180ms ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-light {
    border-color: var(--line);
    background: var(--bg-soft);
}

.btn-light:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.hero-card {
    padding: 18px;
    align-self: start;
}

.hero-visual {
    margin: 0 auto 12px;
    max-width: 248px;
    border-radius: 14px;
    border: 1px solid #d9e5ff;
    background: linear-gradient(135deg, #f8fbff 0%, #edf4ff 100%);
    overflow: hidden;
    box-shadow: 0 10px 22px -24px #25396fcc;
}

.hero-visual svg {
    display: block;
    width: 100%;
    height: auto;
}

.hero-card h2 {
    margin: 0 0 10px;
    font-size: 1.12rem;
}

.hero-card ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.hero-card li {
    font-size: 0.95rem;
    color: var(--muted);
}

.hero-course-spotlight {
    display: grid;
    gap: 10px;
    border-color: #d6e4ff;
    background: linear-gradient(180deg, #ffffffea 0%, #f7fbffeb 100%);
}

.hero-course-visual {
    margin: 0;
    width: 100%;
    max-width: none;
    min-height: 84px;
    position: relative;
    border-radius: 12px;
    border: 1px solid #d3e1ff;
    background: linear-gradient(135deg, #4f67c4 0%, #5ec8e8 100%);
    display: block;
    box-shadow: 0 10px 22px -24px #25396fcc;
    overflow: hidden;
}

.hero-course-thumb {
    width: 100%;
    height: 100%;
    min-height: 84px;
    object-fit: cover;
    display: none;
}

.hero-course-visual-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.hero-course-visual-fallback i {
    color: #fff;
    font-size: 1.45rem;
}

.hero-course-visual.has-thumb {
    background: #dce8ff;
}

.hero-course-visual.has-thumb .hero-course-thumb {
    display: block;
}

.hero-course-visual.has-thumb .hero-course-visual-fallback {
    display: none;
}

.hero-course-head {
    display: grid;
    gap: 6px;
}

.hero-course-kicker {
    margin: 0;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #4663bf;
}

.hero-course-head h2 {
    margin: 0;
    font-size: 1.14rem;
    line-height: 1.35;
}

.hero-course-excerpt {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.62;
}

.hero-course-footer {
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.hero-course-footer .btn {
    padding: 9px 12px;
}

.hero-course-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-course-nav-btn {
    width: 34px;
    height: 34px;
    border: 1px solid #c6d6ff;
    border-radius: 10px;
    background: #eef4ff;
    color: #3f5bbd;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.hero-course-nav-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.hero-course-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hero-course-progress {
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.hero-course-progress span {
    font-size: 0.76rem;
    color: var(--muted);
    letter-spacing: 0.2px;
}

.hero-course-dots {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.hero-course-dot {
    width: 7px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: #c9d7fb;
    cursor: pointer;
    padding: 0;
}

.hero-course-dot.is-active {
    width: 18px;
    background: var(--primary);
}

.hero-course-spotlight.is-loading {
    opacity: 0.92;
}

.hero-course-spotlight.is-animating .hero-course-head,
.hero-course-spotlight.is-animating .hero-course-footer,
.hero-course-spotlight.is-animating .hero-course-progress {
    animation: heroCourseFade 260ms ease;
}

@keyframes heroCourseFade {
    from {
        opacity: 0.2;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    margin-top: 12px;
    padding: 16px 0;
}

.section-panel {
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: 0 12px 24px -24px #25396f8a;
}

.section-tone-about {
    background: linear-gradient(180deg, #ffffffd9 0%, #f8fbffd9 100%);
}

.section-tone-articles {
    background: linear-gradient(180deg, #fbfdffd9 0%, #f3f8ffd9 100%);
    border-color: #d4e3ff;
}

.section-tone-projects {
    background: linear-gradient(180deg, #f9fcffd9 0%, #eef5ffd9 100%);
    border-color: #d2e0ff;
}

.section h2 {
    margin: 0 0 10px;
    font-size: 1.7rem;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.section p {
    margin: 0;
    line-height: 1.7;
    color: var(--muted);
}

.chips {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    border-radius: 999px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    font-size: 0.85rem;
    font-weight: 600;
}

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

.course-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.course-card {
    border-color: #d7e3fb;
    background: #fbfdff;
}

.course-home-cover {
    height: 170px;
}

.course-list {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.course-list li {
    display: grid;
    grid-template-columns: 16px 1fr auto;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.9rem;
}

.course-list li i {
    color: #5b74c7;
}

.course-list li small {
    color: #7f8db3;
    font-weight: 600;
}

.project-card {
    padding: 16px;
    display: grid;
    gap: 8px;
}

.project-card h3 {
    margin: 0;
    font-size: 1.05rem;
}

.project-card p {
    margin: 0;
    font-size: 0.93rem;
}

.project-cover {
    position: relative;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #d7e3fb;
    background: #eef4ff;
}

.project-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-cover.project-cover-fallback {
    background: linear-gradient(135deg, #4c70c8 0%, #57caeb 100%);
    border-color: #8cb4f7;
}

.project-cover-fallback-inner {
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
    gap: 8px;
    color: #fff;
    text-align: center;
}

.project-cover-fallback-inner i {
    font-size: 1.8rem;
}

.project-cover-fallback-inner span {
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.project-cover-count {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    color: #fff;
    background: #25396fcc;
    backdrop-filter: blur(3px);
}

.project-card .project-cover-caption {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0;
}

.project-description p,
.project-description ul,
.project-description ol {
    margin: 0;
    font-size: 0.93rem;
    color: var(--muted);
    line-height: 1.7;
}

.project-description p + p,
.project-description p + ul,
.project-description p + ol,
.project-description ul + p,
.project-description ol + p {
    margin-top: 8px;
}

.project-description li + li {
    margin-top: 4px;
}

.project-description a {
    color: var(--primary);
    text-decoration: underline;
}

.project-description pre {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #1f2638;
    color: #e7eeff;
    border: 1px solid #41597f;
    overflow-x: auto;
}

.project-detail-description {
    margin-top: 14px;
}

.project-detail-actions {
    margin-top: 14px;
}

.project-gallery-section {
    margin-top: 22px;
    display: grid;
    gap: 10px;
}

.project-gallery-section h2 {
    margin: 0;
    font-size: 1.15rem;
}

.project-gallery-public-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.project-gallery-public-item {
    margin: 0;
    border: 1px solid #d7e3fb;
    border-radius: 12px;
    overflow: hidden;
    background: #f6f9ff;
}

.project-gallery-trigger {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.project-gallery-trigger:focus-visible {
    outline: 2px solid #6f8be0;
    outline-offset: -2px;
}

.project-gallery-trigger img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 220ms ease;
}

.project-gallery-trigger:hover img {
    transform: scale(1.03);
}

.project-gallery-public-item figcaption {
    padding: 10px 12px;
    font-size: 0.86rem;
    color: var(--muted);
    line-height: 1.55;
}

body.lightbox-open {
    overflow: hidden;
}

.project-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
}

.project-lightbox.is-open {
    display: block;
}

.project-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: #0a1330c9;
    backdrop-filter: blur(4px);
}

.project-lightbox-dialog {
    position: relative;
    z-index: 1;
    width: min(980px, 94vw);
    margin: 4vh auto;
    border-radius: 16px;
    border: 1px solid #3f538699;
    background: linear-gradient(180deg, #121a2f 0%, #0f1729 100%);
    box-shadow: 0 20px 45px -26px #010511f0;
    overflow: hidden;
}

.project-lightbox-media {
    padding: 20px 22px 12px;
    display: grid;
    place-items: center;
}

.project-lightbox-media img {
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 12px;
    background: #111a2f;
}

.project-lightbox-meta {
    padding: 10px 16px 14px;
    color: #d5e1ff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.9rem;
}

.project-lightbox-counter {
    color: #9fb2df;
    font-size: 0.82rem;
    white-space: nowrap;
}

.project-lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 1px solid #4b5f92;
    border-radius: 999px;
    color: #e3ebff;
    background: #1f2a47e6;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.project-lightbox-close:hover {
    background: #2b3a62;
}

.project-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 1px solid #4b5f92;
    border-radius: 999px;
    color: #e3ebff;
    background: #1f2a47e6;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.project-lightbox-nav.prev {
    left: 10px;
}

.project-lightbox-nav.next {
    right: 10px;
}

.project-lightbox-nav:hover {
    background: #2b3a62;
}

.project-card small {
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.3px;
}

.project-card a {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.project-card a:hover {
    color: var(--primary-hover);
}

.project-link-alt {
    font-weight: 600 !important;
    color: var(--muted) !important;
    font-size: 0.84rem !important;
}

.project-link-alt:hover {
    color: var(--primary) !important;
}

.btn-sm-inline {
    padding: 8px 14px;
    font-size: 0.85rem;
}

#articles .project-card.card {
    box-shadow: none;
    border-color: #d7e3fb;
    background: #fbfdff;
    border-radius: 5px;
}

.article-pagination {
    margin-top: 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.page-numbers {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    color: var(--muted);
    background: var(--bg-soft);
    font-size: 0.9rem;
    font-weight: 700;
    transition: 160ms ease;
}

.page-link:hover {
    color: var(--primary);
    border-color: #bfceff;
}

.page-link.is-active {
    border-color: var(--primary);
    color: #fff;
    background: var(--primary);
}

.page-arrow {
    min-width: auto;
}

.article-shell {
    margin-top: 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 16px;
    align-items: start;
}

.article-detail {
    padding: 24px;
}

.article-detail h1 {
    margin: 10px 0 8px;
    font-size: clamp(1.6rem, 2.8vw, 2.2rem);
    line-height: 1.25;
}

.course-detail-thumbnail {
    margin: -24px -24px 16px;
    border-radius: 20px 20px 14px 14px;
    background: #eef4ff;
    overflow: hidden;
    aspect-ratio: 16 / 7;
}

.course-detail-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.course-detail-thumbnail + h1 {
    margin-top: 0;
}

.article-meta {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted);
    font-size: 0.86rem;
    letter-spacing: 0.15px;
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.article-meta i {
    color: #5d78cc;
}

.article-meta b {
    color: #4059b1;
    font-weight: 700;
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
}

.article-card-meta small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0;
    white-space: nowrap;
}

.article-card-meta i {
    color: #5d78cc;
    font-size: 0.84rem;
}

.course-card .course-meta-row {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 8px 10px;
}

.article-card-read {
    display: inline-flex;
    align-items: center;
}

.article-category-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 10px;
    border: 1px solid #cad8ff;
    background: #edf3ff;
    color: #3f5bbd;
    font-size: 0.76rem;
    letter-spacing: 0.15px;
}

.article-excerpt {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f7faff;
    color: var(--muted);
    line-height: 1.7;
}

.article-content {
    margin-top: 18px;
    display: grid;
    gap: 14px;
}

.article-content p {
    margin: 0;
    line-height: 1.8;
    color: #3e517e;
}

.article-content code:not(.hljs) {
    padding: 2px 8px;
    border-radius: 7px;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.88em;
    color: #1b317e;
    background: #e7eeff;
    border: 1px solid #c9d8ff;
}

.article-inline-code {
    padding: 2px 8px;
    border-radius: 7px;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.88em;
    color: #1b317e;
    background: #e7eeff;
    border: 1px solid #c9d8ff;
}

.article-code {
    margin: 0;
    border-radius: 12px;
    border: 1px solid #41597f;
    background: linear-gradient(180deg, #1f2638 0%, #1b2132 100%);
    overflow: hidden;
    box-shadow: 0 14px 30px -24px #091227f2;
}

.article-code-head {
    display: none;
}

.article-code code {
    display: block;
    margin: 0;
    padding: 18px 20px !important;
    overflow-x: auto;
    font-size: 0.96rem;
    line-height: 1.72;
    font-family: "Consolas", "Fira Code", "Courier New", monospace;
    background: transparent !important;
    color: #e8efff;
    tab-size: 4;
}

.article-code code.hljs {
    color: #e8efff;
    text-shadow: 0 0 0 transparent;
}

.article-code .hljs-comment,
.article-code .hljs-quote {
    color: #7f93bd;
    font-style: italic;
}

.article-code .hljs-keyword,
.article-code .hljs-selector-tag,
.article-code .hljs-literal {
    color: #ff6ad5;
    font-weight: 700;
}

.article-code .hljs-title,
.article-code .hljs-title.class_,
.article-code .hljs-title.function_,
.article-code .hljs-function .hljs-title,
.article-code .hljs-name,
.article-code .hljs-type {
    color: #5dffa2;
    font-weight: 700;
}

.article-code .hljs-string,
.article-code .hljs-meta .hljs-string,
.article-code .hljs-attr,
.article-code .hljs-template-variable {
    color: #f8f58f;
}

.article-code .hljs-number,
.article-code .hljs-symbol,
.article-code .hljs-bullet,
.article-code .hljs-variable {
    color: #c5adff;
}

.article-code .hljs-operator,
.article-code .hljs-punctuation {
    color: #dce6ff;
}

.article-code .hljs-built_in,
.article-code .hljs-meta,
.article-code .hljs-link {
    color: #7fe9ff;
}

.article-code .hljs-emphasis {
    font-style: italic;
}

.article-code .hljs-strong {
    font-weight: 700;
}

.article-code .tok-comment {
    color: #7f93bd !important;
    font-style: italic;
}

.article-code .tok-keyword {
    color: #ff6ad5 !important;
    font-weight: 700;
}

.article-code .tok-name {
    color: #5dffa2 !important;
    font-weight: 700;
}

.article-code .tok-string {
    color: #f8f58f !important;
}

.article-code .tok-number {
    color: #c5adff !important;
}

.article-code .tok-variable {
    color: #7fe9ff !important;
}

.article-code .tok-builtin {
    color: #7fe9ff !important;
    font-weight: 600;
}

.article-side {
    padding: 18px;
}

.article-side h2 {
    margin: 0 0 12px;
    font-size: 1.08rem;
}

.article-side-empty {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.92rem;
}

.article-side-item {
    display: grid;
    gap: 4px;
    padding: 12px 0;
    border-top: 1px dashed var(--line);
}

.article-side-item:first-of-type {
    border-top: none;
    padding-top: 0;
}

.article-side-item strong {
    font-size: 0.92rem;
    color: var(--text);
}

.article-side-item span {
    font-size: 0.8rem;
    color: var(--muted);
}

.article-side-item:hover strong {
    color: var(--primary);
}

.form-inline-grid {
    display: grid;
    gap: 10px;
}

.form-label {
    display: inline-flex;
    margin-bottom: 6px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #4b5f95;
}

.form-control,
.form-select {
    width: 100%;
    border: 1px solid #c7d6f8;
    border-radius: 10px;
    background: #f8fbff;
    color: #2d3f74;
    padding: 11px 12px;
    font-size: 0.95rem;
    font-family: inherit;
    line-height: 1.45;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.form-control::placeholder {
    color: #8594ba;
    opacity: 1;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: #6f8be0;
    box-shadow: 0 0 0 3px #435ebe21;
    background: #fff;
}

textarea.form-control {
    resize: none;
    min-height: 112px;
}

.article-side .form-inline-grid .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.course-register-panel .article-side-empty {
    margin-bottom: 10px;
}

.course-detail-quick-actions {
    margin-top: 14px;
}

.course-register-security {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d5e3ff;
    background: #f3f8ff;
    color: #4560ab;
    font-size: 0.82rem;
    line-height: 1.45;
}

.course-register-security i {
    color: #4f6fca;
    font-size: 0.94rem;
}

.course-form-group {
    display: grid;
}

.course-captcha-group {
    border: 1px solid #d8e4ff;
    border-radius: 12px;
    padding: 11px;
    background: #f8fbff;
}

.course-captcha-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.course-captcha-refresh {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #4f68c1;
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid #cedcfd;
    background: #fff;
}

.course-captcha-refresh:hover {
    border-color: #9eb8f1;
    background: #f5f9ff;
    color: #324e9d;
}

.course-captcha-question {
    margin-bottom: 8px;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 1.02rem;
    font-weight: 700;
    color: #2f4686;
    letter-spacing: 0.15px;
}

.course-captcha-hint {
    margin-top: 6px;
    font-size: 0.76rem;
    color: #7788b3;
}

.course-hp-field {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    clip: rect(0 0 0 0);
    overflow: hidden;
    white-space: nowrap;
}

.course-register-notify {
    width: 100%;
    border-color: #cedbfd;
    background: #fff;
    color: #2f4686;
    margin-top: 10px;
}

.course-register-notify:hover {
    background: #f5f9ff;
    border-color: #9eb8f1;
    color: #25396f;
}

.alert {
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid;
    font-size: 0.9rem;
}

.alert ul {
    margin: 0;
}

.alert-light-success {
    border-color: #b4e5ca;
    background: #effbf4;
}

.alert-light-danger {
    border-color: #f1c1c7;
    background: #fff3f5;
}

.color-success {
    color: #226f45;
}

.color-danger {
    color: #933240;
}

.mt-2 {
    margin-top: 0.75rem;
}

.mt-4 {
    margin-top: 1.25rem;
}

.mb-2 {
    margin-bottom: 0.75rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-0 {
    margin-bottom: 0;
}

.ps-4 {
    padding-left: 1.5rem;
}

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

.contact {
    margin-top: 24px;
    padding: 22px;
    background: #25396f;
    border-color: #25396f;
    color: #f5f8ff;
}

.contact h2 {
    margin: 0;
    font-size: 1.6rem;
}

.contact p {
    margin: 10px 0 0;
    color: #d9e3ff;
}

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

.contact .btn-primary {
    background: #ffffff;
    color: #25396f;
}

.contact .btn-primary:hover {
    background: #eef3ff;
}

.contact .btn-light {
    border-color: #ffffff7a;
    background: transparent;
    color: #f5f8ff;
}

.contact .btn-light:hover {
    border-color: #ffffff;
}

.copyright {
    margin-top: 14px;
    font-size: 0.8rem;
    color: #b7c8f2;
}

.reveal {
    animation: rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.delay-1 {
    animation-delay: 120ms;
}

.delay-2 {
    animation-delay: 260ms;
}

.delay-3 {
    animation-delay: 420ms;
}

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

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

    .article-shell {
        grid-template-columns: 1fr;
    }

    .course-detail-page .course-register-panel {
        order: -1;
    }

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

    .topbar {
        border-radius: 16px;
        display: block;
    }

    .topbar-head {
        justify-content: space-between;
        width: 100%;
    }

    .menu-toggle {
        display: inline-flex;
        width: 42px;
        height: 42px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--bg-soft);
        padding: 0;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 4px;
        cursor: pointer;
    }

    .menu-toggle span {
        width: 18px;
        height: 2px;
        background: var(--text);
        border-radius: 2px;
        transition: transform 180ms ease, opacity 180ms ease;
    }

    .menu {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        transition: max-height 220ms ease, opacity 220ms ease;
    }

    .menu a {
        width: 100%;
        padding: 10px 12px;
        background: var(--bg-soft);
        border: 1px solid var(--line);
        border-radius: 12px;
        justify-content: flex-start;
    }

    .topbar.menu-open .menu {
        max-height: 520px;
        opacity: 1;
        pointer-events: auto;
    }

    .topbar.menu-open .menu-toggle span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .topbar.menu-open .menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .topbar.menu-open .menu-toggle span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
}

@media (max-width: 640px) {
    .container {
        width: 92%;
        margin-top: 16px;
    }

    .hero-course-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-course-footer .btn {
        width: 100%;
    }

    .hero-course-nav {
        justify-content: flex-end;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .article-detail {
        padding: 18px;
    }

    .course-detail-thumbnail {
        margin: -18px -18px 14px;
        border-radius: 16px 16px 12px 12px;
        aspect-ratio: 16 / 9;
    }

    .section-panel {
        padding: 16px 14px;
        border-radius: 14px;
    }

    .article-code code {
        padding: 15px 16px !important;
        font-size: 0.88rem;
    }

    .project-gallery-public-grid {
        grid-template-columns: 1fr;
    }

    .project-gallery-trigger img {
        height: 200px;
    }

    .project-lightbox-dialog {
        width: 96vw;
        margin: 2vh auto;
        border-radius: 14px;
    }

    .project-lightbox-media {
        padding: 18px 12px 10px;
    }

    .project-lightbox-media img {
        max-height: 70vh;
    }

    .project-lightbox-meta {
        padding: 10px 12px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .project-lightbox-nav {
        width: 36px;
        height: 36px;
    }
}
