/* Homepage sections - an add-on stylesheet (style.css / responsive.css are untouched).
   Each menu link lands with the section heading right under the sticky menu (--nav-h is set by section-flow.js),
   and the gaps between sections are kept compact so the page scrolls as one continuous whole. */
:root { --nav-h: 110px; }

#scholastics, #publication, #project, #skills, #certifications {
    scroll-margin-top: calc(var(--nav-h) + 8px);
    padding-top: 8px;
    padding-bottom: 8px;
}
/* the small divider bar between sections: much less air around it */
hr.soft-divider { margin: 1rem auto !important; }

/* Publications / Projects on the home page: template names become small tags on each card, and every card in a row is the same height */
.card-tag-row > [class*="col-"] { display: flex; }
.card-tag-row > [class*="col-"] > a { display: block; width: 100%; }
.card-tag-row .d2c_card_wrapper { height: calc(100% - 24pt); }
.card-tag-row h4 { text-transform: none; text-align: left; }
.card-tag {
    display: inline-block; margin: 14px 0 8px; padding: 4px 13px; border-radius: 999px; font-size: .78rem; line-height: 1.4;
    letter-spacing: .03em; color: #8fc3ff; background: rgba(143, 195, 255, 0.12); border: 1px solid rgba(143, 195, 255, 0.35);
}

/* Certifications (home page, below Skills) */
.cert-card { display: flex; flex-direction: column; width: 100%; }
.cert-card h4 { text-transform: none; text-align: left; }
.cert-card .cert-meta { margin: 0 0 4px; opacity: .85; text-align: left; font-size: 15px; line-height: 1.5; }
.cert-link {
    margin-top: auto; align-self: flex-start; display: inline-block; padding: 7px 16px; position: relative; top: 0; border-radius: 999px; font-size: .9rem;
    color: #fff !important; text-decoration: none !important; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.25);
    transition: background .2s, border-color .2s, transform .2s;
}
.cert-card .cert-meta + .cert-link, .cert-card h4 + .cert-link { margin-top: 14px; }
.cert-link:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.5); transform: translateY(-1px); }

/* Scholastics: status tag + same-height cards */
.edu-card { width: 100%; }
.edu-card h4 { text-transform: none; text-align: left; }
.edu-card .edu-extra { margin-top: 10px; text-align: left; }
.card-tag.is-pursuing { color: #ffd37a; background: rgba(255, 211, 122, 0.12); border-color: rgba(255, 211, 122, 0.4); }
.card-tag.is-completed { color: #8ee3a8; background: rgba(142, 227, 168, 0.12); border-color: rgba(142, 227, 168, 0.4); }
.edu-card .edu-extra, .edu-card .edu-extra p { font-size: 15px; line-height: 1.5; margin-bottom: 0; opacity: .9; }

/* Certificate viewer (opens a certificate on the site instead of sending visitors elsewhere) */
.cert-viewer[hidden] { display: none; }
.cert-viewer { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 3vh 3vw;
               background: rgba(5, 9, 15, 0.82); backdrop-filter: blur(4px); }
.cert-viewer-box { width: min(1000px, 100%); max-height: 100%; display: flex; flex-direction: column; border-radius: 14px; overflow: hidden;
                   background: #121820; border: 1px solid rgba(255, 255, 255, 0.18); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); }
.cert-viewer-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.cert-viewer-title { flex: 1; min-width: 0; color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cert-viewer-dl { color: #8fc3ff !important; text-decoration: none !important; font-size: .9rem; white-space: nowrap; }
.cert-viewer-close { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.3); background: transparent; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.cert-viewer-close:hover { background: rgba(255, 255, 255, 0.15); }
.cert-viewer-body { flex: 1; min-height: 0; overflow: auto; display: flex; justify-content: center; background: #0b1017; }
.cert-viewer-body img { max-width: 100%; max-height: 80vh; width: auto; height: auto; object-fit: contain; align-self: center; border-radius: 0; }
.cert-viewer-body iframe { width: 100%; height: 80vh; border: 0; background: #fff; border-radius: 0; }
