/* Phase 2: reactions, comments, homepage blog slider & resources */
.be { border-top: 1px solid var(--line-strong); margin-top: 2.5rem; padding-top: 1.5rem; }
.be-react { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: 1.75rem; }
.be-q { font-weight: 600; margin-right: .3rem; }
.be-btn { border: 1px solid var(--line-strong); background: #fff; border-radius: 999px; padding: .45rem 1rem; font: inherit; cursor: pointer; min-height: 44px; }
.be-btn:hover { border-color: var(--brand-primary-dark); }
.be-btn.on { background: var(--brand-primary); border-color: var(--brand-primary-dark); color: var(--brand-ink); font-weight: 700; }
.be-btn:disabled { opacity: .6; cursor: wait; }
.be-title { font-size: 1.25rem; margin-bottom: 1rem; }
.be-list { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; gap: .8rem; }
.be-comment { background: var(--brand-paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; }
.be-comment p { margin: .35rem 0 0; overflow-wrap: anywhere; }
.be-comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.be-time { color: var(--ink-soft); font-size: .8rem; }
.be-staff { background: var(--brand-primary); color: var(--brand-ink); font-size: .68rem; font-weight: 700; text-transform: uppercase; border-radius: 999px; padding: .1rem .5rem; }
.be-del { margin-left: auto; background: none; border: 0; color: var(--mark); cursor: pointer; font: inherit; font-size: .82rem; text-decoration: underline; }
.be-form { position: relative; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 1rem 1.2rem; }
.be-form h3 { margin: 0 0 .75rem; font-size: 1.05rem; }

.blog-card-meta { font-size: .8rem; color: var(--ink-soft); margin: 0 0 .6rem; }

/* homepage: blog slider */
.hb-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.25rem; }
.hb-head h2 { margin: 0; }
.hb-nav { display: flex; gap: .5rem; }
.hb-nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: #fff; font-size: 1.2rem; cursor: pointer; }
.hb-nav button:hover { background: var(--brand-primary); border-color: var(--brand-primary-dark); }
.hb-track { display: flex; gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: .75rem; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.hb-track > .blog-card { flex: 0 0 min(320px, 82%); scroll-snap-align: start; }
@media (prefers-reduced-motion: reduce) { .hb-track { scroll-behavior: auto; } }
.hb-more { margin-top: 1rem; }
.hb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.hb-cats { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
html[data-theme="dark"] .be-btn, html[data-theme="dark"] .be-form { background: #161f22; color: #e4eeeb; }

/* Proof-of-work cards reuse the blog card + slider. Screenshots are documents, so show the top of the page, not a centred crop. */
.pf-card .bc-media img { object-position: top center; }
.pf-card .bc-cat { text-decoration: none; cursor: default; }
.portfolio-panel .hb-head h3 { margin: 0; }
.portfolio-panel .hb-more { margin-top: .5rem; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.pf-card[hidden] { display: none; }
.pf-cats { margin: 1rem 0 0; }
.pf-cats button { flex-direction: row; }
.pf-cats button small { opacity: .75; margin-left: .35rem; font-size: .78rem; }

/* Proof-of-work chips (links) + category detail page */
.portfolio-cats a.pf-chip { display: inline-flex; align-items: center; gap: .55rem; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: .5rem 1.1rem; color: inherit; text-decoration: none; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.portfolio-cats a.pf-chip:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(22,37,42,.12); border-color: var(--brand-primary-dark); }
.pf-chip small { opacity: .75; font-size: .78rem; }
.pw-list { display: grid; gap: 2.5rem; }
.pw-item { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 1.75rem; align-items: start; scroll-margin-top: 5rem; }
.pw-shot { position: relative; display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--bh-line, var(--line)); background: var(--bh-surface, #fff); }
.pw-shot img { display: block; width: 100%; height: auto; }
.pw-shot span { position: absolute; left: .6rem; bottom: .6rem; padding: .2rem .6rem; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: .75rem; }
.pw-body h2 { margin: 0 0 .4rem; font-size: 1.45rem; line-height: 1.3; }
.pw-sum { margin: 0 0 1rem; color: var(--bh-soft, var(--ink-soft)); }
.pw-details.is-cut { -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent); padding-bottom: 1.5rem; }
.pw-lock { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; margin-top: .75rem; padding: 1rem 1.15rem; border: 1px dashed var(--a, var(--line-strong)); border-radius: 14px; }
@media (max-width: 720px) { .pw-item { grid-template-columns: 1fr; } }

/* Custom HTML + CSS posts: the post's own rules are prefixed with .blog-design by the server */
.blog-design { overflow-wrap: anywhere; }
.blog-design img { max-width: 100%; height: auto; }
.blog-design table { max-width: 100%; }

/* Step 4 — anonymous names, replies, comment likes */
.be-anon { background: var(--warn-tint, #fff4d6); color: var(--warn, #7a5a00); font-size: .68rem; font-weight: 700; text-transform: uppercase; border-radius: 999px; padding: .1rem .5rem; }
.be-real { font-size: .75rem; color: var(--mark); }
.be-cactions { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; margin-top: .35rem; }
.be-like, .be-rep, .be-cancel { border: 0; background: none; padding: .35rem .1rem; min-height: 36px; font: inherit; font-size: .85rem; color: var(--ink-soft); cursor: pointer; text-decoration: underline; }
.be-like.on { color: var(--brand-ink); font-weight: 700; text-decoration: none; }
.be-like:disabled { opacity: .6; cursor: default; }
.be-replies { list-style: none; margin: .7rem 0 0; padding: 0 0 0 .9rem; border-left: 2px solid var(--line); display: grid; gap: .6rem; }
.be-replies:empty { display: none; }
.be-reply { background: #fff; }
.be-rform { margin-top: .7rem; }
.be-check { display: inline-flex; gap: .45rem; align-items: center; cursor: pointer; margin-bottom: .3rem; }
html[data-theme="dark"] .be-reply { background: #161f22; }


/* Step 7: hashtags under a student article */
.post-content .sa-tags { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .4rem .6rem; font-size: .95rem; }
.post-content .sa-tag { display: inline-block; padding: .15rem .6rem; border-radius: 999px; background: rgba(0, 120, 160, .1); color: inherit; text-decoration: none; }
.post-content .sa-tag:hover, .post-content .sa-tag:focus-visible { text-decoration: underline; }

/* Step 3d: hashtags of an article (links to the hashtag feed), shown under the article text */
.bh-tags { display: flex; flex-wrap: wrap; gap: .35rem .5rem; margin: 1.5rem 0 0; font-size: .95rem; }
.bh-tags a.nf-tag { display: inline-block; padding: .15rem .6rem; border-radius: 999px; background: rgba(0, 120, 160, .1); color: inherit; font-weight: 600; text-decoration: none; }
.bh-tags a.nf-tag:hover, .bh-tags a.nf-tag:focus-visible { text-decoration: underline; }
