:root {
    color-scheme: light;
    --portal-bg: #f8fafc;
    --portal-surface: #ffffff;
    --portal-surface-soft: #f1f5f9;
    --portal-ink: #0f172a;
    --portal-muted: #64748b;
    --portal-line: #e2e8f0;
    --portal-primary: #4f46e5;
    --portal-primary-soft: #eef2ff;
    --portal-secondary: #ec4899;
    --portal-danger: #ef4444;
    --portal-shadow: 0 20px 48px rgba(15, 23, 42, 0.10);
}

body.portal-body {
    min-height: 100vh;
    margin: 0;
    background: var(--portal-bg);
    color: var(--portal-ink);
    font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

.portal-app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 288px minmax(0, 1fr);
}

.portal-sidebar {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--portal-surface);
    border-right: 1px solid var(--portal-line);
    position: sticky;
    top: 0;
    z-index: 20;
    overflow-y: auto;
}

.portal-brand {
    height: 80px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 28px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--portal-ink);
    text-decoration: none;
}

.portal-logo-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--portal-primary), var(--portal-secondary));
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(79, 70, 229, 0.28);
    font-size: 16px;
    font-weight: 900;
}

.portal-brand-text {
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.portal-brand-text span {
    color: #94a3b8;
    font-weight: 650;
}

.portal-side-nav {
    padding: 24px 16px;
}

.portal-nav-label {
    margin: 18px 14px 12px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.portal-nav-link {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    padding: 0 14px;
    color: var(--portal-muted);
    font-size: 15px;
    font-weight: 750;
    text-decoration: none;
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.portal-nav-link:hover {
    background: #f8fafc;
    color: var(--portal-ink);
    transform: translateX(2px);
}

.portal-nav-link.is-active {
    background: var(--portal-primary-soft);
    color: var(--portal-primary);
}

.portal-nav-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: grid;
    place-items: center;
    color: currentColor;
}

.portal-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 12px;
}

.portal-tag {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
    transition: background 180ms ease, color 180ms ease;
}

.portal-tag span {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
}

.portal-tag:hover {
    background: #e2e8f0;
    color: var(--portal-ink);
}

.portal-side-profile {
    padding: 16px;
    border-top: 1px solid #f1f5f9;
}

.portal-profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 18px;
    padding: 12px;
    color: inherit;
    text-decoration: none;
    transition: background 180ms ease;
}

.portal-profile-card:hover {
    background: #f8fafc;
}

/* Base Avatar Component */
.portal-avatar {
    object-fit: cover;
    background-color: #f8fafc;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--portal-primary);
    flex-shrink: 0;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    /* Default size (Medium) */
    width: 40px;
    height: 40px;
}

/* Size Modifiers */
.portal-avatar-sm {
    width: 32px;
    height: 32px;
}

.portal-avatar-lg {
    width: 92px;
    height: 92px;
}

.portal-profile-meta {
    min-width: 0;
    flex: 1;
}

.portal-profile-meta strong,
.portal-profile-meta span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-profile-meta strong {
    font-size: 14px;
}

.portal-profile-meta span {
    margin-top: 3px;
    color: var(--portal-muted);
    font-size: 12px;
}

.portal-shell {
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.portal-topbar {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid var(--portal-line);
    padding: 0 32px;
    backdrop-filter: blur(18px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.portal-mobile-brand {
    display: none;
    align-items: center;
    gap: 10px;
    color: var(--portal-ink);
    text-decoration: none;
    font-weight: 900;
}

.portal-search {
    width: min(100%, 480px);
    position: relative;
}

.portal-search svg {
    width: 20px;
    height: 20px;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.portal-search input {
    width: 100%;
    height: 44px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--portal-ink);
    outline: none;
    padding: 0 18px 0 46px;
    font-size: 14px;
    font-weight: 650;
    transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.portal-search input:focus {
    background: #ffffff;
    border-color: rgba(79, 70, 229, 0.55);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.10);
}

.portal-top-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.portal-icon-button,
.portal-button {
    border: 0;
    cursor: pointer;
    text-decoration: none;
    transition: transform 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.portal-icon-button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: transparent;
    color: #94a3b8;
    position: relative;
}

.portal-icon-button:hover {
    background: #f1f5f9;
    color: #475569;
}

.portal-notification-dot {
    width: 9px;
    height: 9px;
    position: absolute;
    top: 9px;
    right: 10px;
    border-radius: 50%;
    background: var(--portal-danger);
    border: 2px solid #ffffff;
}

.portal-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 999px;
    padding: 0 18px;
    background: #0f172a;
    color: #ffffff;
    font-size: 14px;
    font-weight: 850;
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.13);
    white-space: nowrap;
}

.portal-button:hover {
    transform: translateY(-1px);
    background: #1e293b;
    color: #ffffff;
}

.portal-button-soft {
    background: #ffffff;
    color: #475569;
    border: 1px solid var(--portal-line);
    box-shadow: none;
}

.portal-button-soft:hover {
    background: #f8fafc;
    color: var(--portal-ink);
}

.portal-content {
    flex: 1;
    padding: 32px;
}

.portal-content::-webkit-scrollbar {
    width: 8px;
}
.portal-content::-webkit-scrollbar-track {
    background: transparent;
}
.portal-content::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 10px;
}
.portal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

.portal-page {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.portal-footer {
    margin-top: 32px;
    color: var(--portal-muted);
    font-size: 13px;
    font-weight: 650;
    text-align: center;
}

.portal-page-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.portal-page-kicker {
    margin: 0 0 8px;
    color: var(--portal-primary);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.portal-page-title {
    margin: 0;
    color: var(--portal-ink);
    font-size: clamp(30px, 4vw, 42px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.portal-page-lead {
    margin: 8px 0 0;
    color: var(--portal-muted);
    font-size: 16px;
    font-weight: 600;
}

.portal-hero-post {
    min-height: 392px;
    display: grid;
    align-items: end;
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    background: #0f172a;
    box-shadow: var(--portal-shadow);
    margin-bottom: 32px;
}

.portal-hero-post::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 20%, rgba(236, 72, 153, 0.32), transparent 32%),
        linear-gradient(135deg, rgba(79, 70, 229, 0.95), rgba(15, 23, 42, 0.92));
}

.portal-hero-post::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.78));
}

.portal-hero-content {
    width: min(760px, 100%);
    position: relative;
    z-index: 1;
    padding: 36px;
    color: #ffffff;
}

.portal-label-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.portal-chip {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0 11px;
    background: rgba(79, 70, 229, 0.92);
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.portal-chip-pink {
    background: rgba(236, 72, 153, 0.92);
}

.portal-chip-soft {
    background: var(--portal-primary-soft);
    color: var(--portal-primary);
}

.portal-hero-title {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: clamp(30px, 5vw, 48px);
    font-weight: 900;
    line-height: 1.03;
    letter-spacing: -0.04em;
}

.portal-hero-title a:hover {
    color: #c7d2fe;
}

.portal-hero-excerpt {
    max-width: 680px;
    margin: 0 0 18px;
    color: #dbeafe;
    font-size: 16px;
    line-height: 1.7;
}

.portal-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    color: var(--portal-muted);
    font-size: 14px;
    font-weight: 650;
}

.portal-hero-post .portal-meta {
    color: #cbd5e1;
}

.portal-section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 30px 0 18px;
}

.portal-section-title {
    margin: 0;
    color: var(--portal-ink);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.portal-section-link {
    color: var(--portal-primary);
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
}

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

.portal-post-card {
    min-height: 348px;
    display: flex;
    flex-direction: column;
    border: 1px solid #f1f5f9;
    border-radius: 28px;
    background: #ffffff;
    padding: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.portal-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.portal-card-cover {
    height: 150px;
    border-radius: 22px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #4f46e5, #9333ea);
}

.portal-card-cover span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.portal-read-time {
    position: absolute;
    top: 12px;
    right: 12px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    padding: 0 9px;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.portal-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 10px 8px;
}

.portal-category {
    color: var(--portal-secondary);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-post-card h3 {
    margin: 9px 0 9px;
    color: var(--portal-ink);
    font-size: 19px;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.portal-post-card h3 a:hover {
    color: var(--portal-primary);
}

.portal-post-card p {
    flex: 1;
    margin: 0 0 18px;
    color: var(--portal-muted);
    font-size: 14px;
    line-height: 1.55;
}

.portal-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
}

.portal-inline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

.portal-inline-tag {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #f8fafc;
    color: var(--portal-primary);
    border: 1px solid #e0e7ff;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
}

.portal-inline-tag:hover {
    background: var(--portal-primary-soft);
}

.portal-results-count {
    margin: 12px 0 0;
    color: var(--portal-muted);
    font-size: 14px;
    font-weight: 800;
}

.portal-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: -18px 0 28px;
}

.portal-filter-chip,
.portal-filter-reset {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 850;
}

.portal-filter-chip {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
}

.portal-filter-reset {
    background: var(--portal-primary-soft);
    color: var(--portal-primary);
    text-decoration: none;
}

.portal-sort-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.portal-section-row .portal-sort-bar {
    margin-bottom: 0;
}

.portal-sort-link {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #ffffff;
    color: #475569;
    padding: 0 13px;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
}

.portal-sort-link:hover,
.portal-sort-link.is-active {
    border-color: #c7d2fe;
    background: var(--portal-primary-soft);
    color: var(--portal-primary);
}

.portal-comment-count {
    margin-left: auto;
    color: var(--portal-muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.portal-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 36px;
    border-top: 1px solid #f1f5f9;
    padding-top: 24px;
}

.portal-page-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.portal-page-link,
.portal-page-number {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
}

.portal-page-number {
    min-width: 38px;
    padding: 0 10px;
}

.portal-page-link:hover,
.portal-page-number:hover,
.portal-page-number.is-active {
    border-color: #c7d2fe;
    background: var(--portal-primary-soft);
    color: var(--portal-primary);
}

.portal-page-link.is-disabled {
    opacity: 0.45;
}

.portal-author {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #334155;
    font-size: 14px;
    font-weight: 850;
}

.portal-empty-state {
    border: 1px dashed #cbd5e1;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.75);
    padding: 44px 24px;
    text-align: center;
}

.portal-empty-state h2 {
    margin: 0 0 8px;
    color: var(--portal-ink);
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.portal-empty-state p {
    margin: 0;
    color: var(--portal-muted);
}

.portal-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.portal-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.portal-action-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.portal-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--portal-muted);
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
}

.portal-link:hover {
    color: var(--portal-primary);
}

.portal-button-danger {
    background: #fff1f2;
    color: #e11d48;
    border: 1px solid #ffe4e6;
    box-shadow: none;
}

.portal-button-danger:hover {
    background: #ffe4e6;
    color: #be123c;
}

.portal-article-card,
.portal-panel {
    border: 1px solid #f1f5f9;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.portal-article-card {
    overflow: hidden;
}

.portal-article-cover {
    min-height: 220px;
    display: flex;
    align-items: flex-end;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 78% 24%, rgba(236, 72, 153, 0.34), transparent 30%),
        linear-gradient(135deg, #4f46e5, #0f172a);
    padding: 28px;
}

.portal-article-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.52));
}

.portal-article-cover-content {
    position: relative;
    z-index: 1;
    color: #ffffff;
}

.portal-article-cover-content .portal-page-kicker {
    color: #c7d2fe;
}

.portal-article-title {
    max-width: 820px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 900;
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.portal-article-body {
    padding: clamp(24px, 5vw, 46px);
}

.portal-article-meta {
    margin-bottom: 26px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
}

.portal-article-tags {
    margin-bottom: 26px;
}

.portal-prose {
    color: #334155;
    font-size: 18px;
    line-height: 1.78;
}

.portal-prose p + p {
    margin-top: 20px;
}

.portal-panel {
    padding: 24px;
}

.portal-panel + .portal-panel {
    margin-top: 18px;
}

.portal-panel-title {
    margin: 0 0 16px;
    color: var(--portal-ink);
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.portal-author-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.portal-author-card strong {
    display: block;
    font-size: 15px;
}

.portal-author-card span {
    display: block;
    margin-top: 4px;
    color: var(--portal-muted);
    font-size: 13px;
    font-weight: 650;
}

.portal-author-card a,
.portal-article-meta a {
    color: inherit;
    text-decoration: none;
}

.portal-author-card a:hover,
.portal-article-meta a:hover {
    color: var(--portal-primary);
}

.portal-author-hero {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    border-bottom: 2px solid #f1f5f9;
    margin-bottom: 32px;
    padding-bottom: 28px;
}



.portal-author-hero-title {
    margin: 0;
    color: var(--portal-ink);
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 900;
    line-height: 1.05;
}

.portal-author-bio {
    max-width: 760px;
    margin: 10px 0 0;
    color: #475569;
    font-size: 17px;
    line-height: 1.6;
}

.portal-author-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.portal-author-stats span {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    padding: 0 11px;
    font-size: 13px;
    font-weight: 850;
}

.portal-author-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.portal-author-post-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #ffffff;
    padding: 22px;
}

.portal-author-post-title {
    margin-top: 8px;
    color: var(--portal-ink);
    font-size: 22px;
    font-weight: 900;
    line-height: 1.22;
    text-decoration: none;
}

.portal-author-post-title:hover {
    color: var(--portal-primary);
}

.portal-author-post-card p {
    margin: 12px 0 22px;
    color: #475569;
    line-height: 1.6;
}

.portal-author-post-card footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
    padding-top: 14px;
    color: var(--portal-muted);
    font-size: 12px;
    font-weight: 800;
}

.modern-empty {
    text-align: center;
    grid-column: 1 / -1;
    border: 2px dashed #cbd5e1;
    border-radius: 24px;
    background: #f8fafc;
    color: #64748b;
    padding: 70px 20px;
}

.modern-empty h2 {
    margin: 0 0 12px;
    color: var(--portal-ink);
    font-size: 24px;
    font-weight: 900;
}

.modern-empty p {
    margin: 0;
}

.portal-related-list {
    display: grid;
    gap: 14px;
}

.portal-related-item {
    display: grid;
    gap: 6px;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
}

.portal-related-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.portal-related-kicker {
    color: var(--portal-muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.portal-related-item a {
    color: var(--portal-ink);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.35;
    text-decoration: none;
}

.portal-related-item a:hover {
    color: var(--portal-primary);
}

.portal-related-item time {
    color: var(--portal-muted);
    font-size: 12px;
    font-weight: 700;
}

.portal-comments-panel {
    margin-top: 24px;
    border: 1px solid #f1f5f9;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.portal-comments-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid #f1f5f9;
    padding: 22px 24px;
}

.portal-comments-head h2 {
    margin: 0;
    color: var(--portal-ink);
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.portal-comments-body {
    padding: 24px;
}

.portal-comments-list {
    display: grid;
    gap: 18px;
    margin-bottom: 24px;
}

.portal-comment {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    border-top: 1px solid #f1f5f9;
    padding-top: 18px;
}

.portal-comment:first-child {
    border-top: 0;
    padding-top: 0;
}

.portal-comment-main {
    min-width: 0;
}

.portal-comment-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.portal-comment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}

.portal-comment-meta strong {
    color: var(--portal-ink);
    font-size: 14px;
    font-weight: 900;
}

.portal-comment-meta time,
.portal-comment-meta span {
    color: var(--portal-muted);
    font-size: 12px;
    font-weight: 650;
}

.portal-comment-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.portal-text-button {
    border: 0;
    background: transparent;
    color: var(--portal-primary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 850;
}

.portal-text-button:hover {
    color: #3730a3;
}

.portal-text-button-danger {
    color: #e11d48;
}

.portal-text-button-danger:hover {
    color: #be123c;
}

.portal-comment-text {
    color: #475569;
    font-size: 14px;
    line-height: 1.62;
    overflow-wrap: anywhere;
}

.portal-comment-form {
    border-top: 1px solid #f1f5f9;
    padding-top: 22px;
}

.portal-field label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 900;
}

.portal-input,
.portal-textarea,
.portal-select {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
    color: var(--portal-ink);
    outline: none;
    padding: 13px 14px;
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.portal-textarea {
    min-height: 112px;
    resize: vertical;
    line-height: 1.55;
}

.portal-textarea[data-autoresize] {
    resize: none;
}

.portal-input:focus,
.portal-textarea:focus,
.portal-select:focus {
    border-color: rgba(79, 70, 229, 0.6);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.10);
}

.portal-select {
    min-height: 48px;
    appearance: none;
}

.portal-file-input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
    color: var(--portal-ink);
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
}

.portal-file-input::file-selector-button {
    border: 0;
    border-radius: 999px;
    background: var(--portal-primary);
    color: #ffffff;
    cursor: pointer;
    font-weight: 850;
    margin-right: 12px;
    padding: 8px 12px;
}

/* New Pill-Style Tags */
.portal-check-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.portal-check-list div,
.portal-check-list li {
    display: inline-flex;
    margin: 0;
}

.portal-check-list label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 100px;
    background: #ffffff;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    margin: 0;
}

.portal-check-list label:hover {
    border-color: #cbd5e1;
    color: var(--portal-ink);
    background: #f8fafc;
}

.portal-check-list input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.portal-check-list label:has(input[type="checkbox"]:checked) {
    background: var(--portal-ink);
    border-color: var(--portal-ink);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}

.portal-post-body-textarea {
    min-height: 280px;
}

.portal-field-errors {
    margin-top: 8px;
    color: #e11d48;
    font-size: 13px;
    font-weight: 750;
    list-style: none;
}

.portal-field-help {
    margin: 8px 0 0;
    color: var(--portal-muted);
    font-size: 13px;
    line-height: 1.5;
}

.portal-alert {
    border: 1px solid #fecdd3;
    border-radius: 18px;
    background: #fff1f2;
    color: #be123c;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.5;
}

.portal-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.portal-form-card {
    border: 1px solid #f1f5f9;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    padding: 24px;
}

.portal-form-grid {
    display: grid;
    gap: 18px;
}

.portal-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.portal-form-card .portal-form-actions {
    border-top: 1px solid #f1f5f9;
    margin-top: 24px;
    padding-top: 20px;
}

.portal-compose-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 40px;
    align-items: start;
    margin-top: 24px;
}

.portal-compose-main {
    min-width: 0;
    background: transparent;
}

.portal-compose-card {
    overflow: hidden;
    border: 1px solid #f1f5f9;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.portal-compose-card-head {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #f1f5f9;
    padding: 18px 22px;
    background: rgba(248, 250, 252, 0.74);
}

.portal-compose-muted {
    color: var(--portal-muted);
    font-size: 13px;
    font-weight: 800;
}

.portal-compose-fields {
    display: grid;
    gap: 24px;
    padding: 24px;
}

.portal-editor-heading {
    margin-bottom: 24px;
}

.portal-editor-title {
    margin: 4px 0 0;
    color: var(--portal-ink);
    font-size: 32px;
    font-weight: 900;
    line-height: 1.12;
}

.portal-editor-fields {
    display: grid;
    gap: 24px;
}

.portal-editor-label,
.portal-field-label {
    display: block;
    margin-bottom: 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 800;
}

.portal-compose-title-input,
.portal-compose-body-textarea {
    width: 100%;
    border: 2px solid #cbd5e1;
    background: #f8fafc;
    color: var(--portal-ink);
    outline: none;
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.portal-compose-title-input {
    min-height: 72px;
    overflow: hidden;
    border-radius: 16px;
    padding: 16px 20px;
    font-size: 36px;
    font-weight: 900;
    line-height: 1.12;
    resize: none;
}

.portal-compose-body-textarea {
    min-height: 50vh;
    border-radius: 16px;
    padding: 20px;
    color: #334155;
    font-size: 18px;
    line-height: 1.8;
    resize: vertical;
}

.portal-compose-title-input:focus,
.portal-compose-body-textarea:focus {
    border-color: rgba(79, 70, 229, 0.52);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.10);
}

.portal-compose-sidebar {
    display: grid;
    gap: 20px;
    position: sticky;
    top: 100px;
}

.portal-publish-panel {
    display: grid;
    gap: 10px;
}

.portal-publish-button {
    width: 100%;
    justify-content: center;
}

.portal-editor-card {
    display: grid;
    gap: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #ffffff;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.03);
}

.portal-editor-card-title {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.portal-editor-tip {
    background: #f8fafc;
}

.portal-editor-tip p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

.portal-auth-callout {
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #f8fafc;
    padding: 18px;
}

.portal-auth-callout p {
    margin: 0;
    color: var(--portal-muted);
    line-height: 1.6;
}

.portal-auth-callout a {
    color: var(--portal-primary);
    font-weight: 850;
}

@media (max-width: 1100px) {
    body.portal-body {
    min-height: 100vh;
    margin: 0;
    background: var(--portal-bg);
    color: var(--portal-ink);
    font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

    .portal-app {
        display: block;
    }

    .portal-sidebar {
        display: none;
    }

    .portal-shell {
        min-height: 100vh;
        overflow: visible;
    }

    .portal-mobile-brand {
        display: flex;
    }

    .portal-topbar {
        position: static;
    }

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

    .portal-detail-layout {
        grid-template-columns: 1fr;
    }

    .portal-form-layout {
        grid-template-columns: 1fr;
    }

    .portal-compose-layout {
        grid-template-columns: 1fr;
    }

    .portal-compose-sidebar {
        position: static;
    }
}

@media (max-width: 720px) {
    .portal-topbar {
        align-items: stretch;
        flex-direction: column;
        padding: 16px;
    }

    .portal-search {
        width: 100%;
    }

    .portal-top-actions {
        justify-content: space-between;
    }

    .portal-content {
        overflow: visible;
        padding: 18px;
    }

    .portal-button-text {
        display: none;
    }

    .portal-top-actions .portal-button {
        width: 44px;
        padding: 0;
    }

    .portal-page-head,
    .portal-section-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-hero-post {
        min-height: 430px;
        border-radius: 26px;
    }

    .portal-hero-content {
        padding: 24px;
    }

    .portal-post-grid {
        grid-template-columns: 1fr;
    }

    .portal-action-bar,
    .portal-comment-head,
    .portal-form-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-action-group {
        width: 100%;
    }

    .portal-action-group .portal-button,
    .portal-form-actions .portal-button {
        width: 100%;
    }

    .portal-article-cover,
    .portal-article-body,
    .portal-comments-body,
    .portal-panel {
        padding: 20px;
    }

    .portal-comments-head {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px;
    }

    .portal-compose-card-head,
    .portal-compose-fields {
        padding: 18px;
    }

    .portal-compose-title-input {
        min-height: 58px;
    }

    .portal-compose-body-textarea {
        min-height: 320px;
    }
}

.portal-compose-title-input:hover,
.portal-compose-body-textarea:hover {
    border-color: #94a3b8;
    background: #ffffff;
}

/* UNIFIED COMPONENTS (Refactored) */
.portal-feed-header {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.portal-feed-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 900;
    color: var(--portal-ink);
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    margin-top: 0;
}
.portal-feed-subtitle {
    font-size: 18px;
    color: #64748b;
    max-width: 600px;
    line-height: 1.5;
    margin-top: 0;
}

.portal-empty-card {
    text-align: center;
    padding: 80px 20px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 24px;
    color: #64748b;
}

.portal-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 40px;
    align-items: start;
    margin-top: 24px;
}
@media (max-width: 900px) {
    .portal-editor-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .portal-editor-sidebar {
        position: static !important;
    }
}
.portal-editor-main {
    background: transparent;
}
.portal-editor-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.portal-feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}
.portal-feed-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.portal-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    position: relative;
}
.portal-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 12px 24px rgba(0,0,0,0.03);
    transform: translateY(-4px);
}

/* Auth Forms Inputs */
input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 15px;
    color: var(--portal-ink);
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    border-color: #6366f1;
}

/* Recovered Components */

/* Featured Post (post_list.html) */
.portal-featured {
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 48px;
    transition: border-color 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 300px;
}
.portal-featured:hover { border-color: #6366f1; }
.portal-featured-badge {
    display: inline-block;
    background: #6366f1;
    color: white;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 12px;
    border-radius: 100px;
    margin-bottom: 20px;
    align-self: flex-start;
}
.portal-featured-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 900;
    color: var(--portal-ink);
    line-height: 1.1;
    margin-bottom: 16px;
    text-decoration: none;
}
.portal-featured-title:hover { color: #6366f1; }
.portal-featured-excerpt {
    font-size: 18px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 800px;
}
.portal-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 2px solid #f1f5f9;
    padding-top: 16px;
    margin-top: auto;
}
.portal-author-info { display: flex; flex-direction: column; }
.portal-author-name { font-size: 14px; font-weight: 700; color: var(--portal-ink); text-decoration: none; }
.portal-author-name:hover { color: #6366f1; }
.portal-date { font-size: 12px; color: #94a3b8; }

/* My Posts Specifics */
.portal-mypost-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 16px;
}
.portal-mypost-title {
    font-size: clamp(20px, 3vw, 26px);
    font-weight: 900;
    color: var(--portal-ink);
    line-height: 1.2;
    text-decoration: none;
}
.portal-mypost-title:hover { color: #6366f1; }
.portal-status-badge {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 12px;
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
}
.status-published { background: #ecfdf5; color: #059669; border: 1px solid #d1fae5; }
.status-draft { background: #fffbeb; color: #d97706; border: 1px solid #fef3c7; }
.portal-mypost-excerpt { font-size: 16px; color: #475569; line-height: 1.6; margin-bottom: 24px; max-width: 800px; }
.portal-mypost-meta { display: flex; align-items: center; gap: 16px; font-size: 13px; font-weight: 700; color: #94a3b8; }
.portal-mypost-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 2px solid #f1f5f9;
    padding-top: 20px;
    margin-top: auto;
}
.portal-action-btn { font-size: 14px; font-weight: 800; padding: 8px 16px; border-radius: 12px; text-decoration: none; transition: all 0.2s; }
.action-edit { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }
.action-edit:hover { background: #eff6ff; color: #3b82f6; border-color: #bfdbfe; }
.action-delete { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }
.action-delete:hover { background: #fef2f2; color: #ef4444; border-color: #fecaca; }

/* Editor Forms */
.portal-input-title {
    width: 100%; border: 2px solid #cbd5e1; background: #f8fafc; border-radius: 16px;
    font-size: clamp(24px, 4vw, 36px); font-weight: 900; color: var(--portal-ink);
    padding: 16px 20px; margin-bottom: 24px; outline: none; resize: none; overflow: hidden; transition: border-color 0.2s, background 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}
.portal-input-title:focus { border-color: #6366f1; background: #ffffff; }
.portal-input-body {
    width: 100%; border: 2px solid #cbd5e1; background: #f8fafc; border-radius: 16px;
    font-size: 18px; line-height: 1.8; color: #334155; padding: 20px; outline: none;
    min-height: 50vh; resize: none; overflow: hidden; transition: border-color 0.2s, background 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}
.portal-input-body:focus { border-color: #6366f1; background: #ffffff; }
.portal-sidebar-card { background: #ffffff; border: 2px solid #e2e8f0; border-radius: 20px; padding: 28px; }
.portal-sidebar-title { font-size: 13px; text-transform: uppercase; font-weight: 800; color: #94a3b8; margin-bottom: 16px; letter-spacing: 0.05em; }
.portal-sidebar-label { display: block; font-size: 14px; font-weight: 800; color: var(--portal-ink); margin-bottom: 10px; }
.portal-sidebar-field { margin-bottom: 24px; }
.portal-sidebar-field:last-child { margin-bottom: 0; }


/* Dark Mode Overrides */
[data-theme="dark"] {
    color-scheme: dark;
    --portal-bg: #0f172a;
    --portal-surface: #1e293b;
    --portal-surface-soft: #334155;
    --portal-ink: #f8fafc;
    --portal-muted: #94a3b8;
    --portal-line: #334155;
    --portal-primary: #818cf8;
    --portal-primary-soft: #312e81;
    --portal-shadow: 0 20px 48px rgba(0, 0, 0, 0.40);
}

[data-theme="dark"] .portal-card,
[data-theme="dark"] .portal-sidebar-card,
[data-theme="dark"] .portal-featured,
[data-theme="dark"] .portal-post-card,
[data-theme="dark"] .portal-article-card,
[data-theme="dark"] .portal-panel,
[data-theme="dark"] .portal-comments-panel,
[data-theme="dark"] .portal-author-post-card {
    background: var(--portal-surface);
    border-color: var(--portal-line);
}

[data-theme="dark"] .portal-brand,
[data-theme="dark"] .portal-side-profile,
[data-theme="dark"] .portal-card-footer,
[data-theme="dark"] .portal-article-meta,
[data-theme="dark"] .portal-comments-head,
[data-theme="dark"] .portal-comment-form,
[data-theme="dark"] .portal-author-post-card footer,
[data-theme="dark"] .portal-related-item {
    border-color: var(--portal-line);
}

[data-theme="dark"] .portal-topbar {
    background: rgba(30, 41, 59, 0.82);
}

[data-theme="dark"] .portal-nav-link:hover,
[data-theme="dark"] .portal-profile-card:hover,
[data-theme="dark"] .portal-icon-button:hover,
[data-theme="dark"] .portal-button-soft:hover {
    background: var(--portal-surface-soft);
    color: var(--portal-ink);
}

[data-theme="dark"] .portal-tag,
[data-theme="dark"] .portal-inline-tag,
[data-theme="dark"] .portal-filter-chip,
[data-theme="dark"] .portal-sort-link,
[data-theme="dark"] .portal-auth-callout,
[data-theme="dark"] .modern-empty {
    background: var(--portal-bg);
    border-color: var(--portal-line);
    color: var(--portal-muted);
}

[data-theme="dark"] .portal-search input,
[data-theme="dark"] .portal-button-soft,
[data-theme="dark"] .portal-input,
[data-theme="dark"] .portal-textarea,
[data-theme="dark"] .portal-select,
[data-theme="dark"] .portal-file-input {
    background: var(--portal-bg);
    border-color: var(--portal-line);
    color: var(--portal-ink);
}

[data-theme="dark"] .portal-search input:focus,
[data-theme="dark"] .portal-input:focus,
[data-theme="dark"] .portal-textarea:focus,
[data-theme="dark"] .portal-select:focus {
    background: var(--portal-surface);
}

[data-theme="dark"] .portal-prose,
[data-theme="dark"] .portal-author-post-card p,
[data-theme="dark"] .portal-field label {
    color: var(--portal-muted);
}

[data-theme="dark"] .portal-notification-dot {
    border-color: var(--portal-surface);
}

[data-theme="dark"] .portal-input-title,
[data-theme="dark"] .portal-input-body,
[data-theme="dark"] .portal-input {
    background: var(--portal-bg);
    border-color: var(--portal-line);
    color: var(--portal-ink);
}

[data-theme="dark"] .portal-check-list label {
    background: var(--portal-surface);
    border-color: var(--portal-line);
    color: var(--portal-muted);
}

[data-theme="dark"] .portal-check-list label:has(input[type="checkbox"]:checked) {
    background: var(--portal-primary);
    border-color: var(--portal-primary);
    color: #ffffff;
}

[data-theme="dark"] .portal-empty-card {
    background: var(--portal-bg);
    border-color: var(--portal-line);
}

[data-theme="dark"] .portal-action-btn {
    background: var(--portal-bg);
    border-color: var(--portal-line);
    color: var(--portal-ink);
}

/* Post Cover Image */
.portal-post-cover {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 32px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.portal-card-cover-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 16px;
}

/* Like Button */
.portal-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--portal-muted);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 100px;
    transition: all 0.2s;
}

.portal-like-btn:hover {
    background: var(--portal-surface-soft);
    color: var(--portal-secondary);
}

.portal-like-btn.is-liked {
    color: var(--portal-secondary);
}

.portal-like-btn svg {
    transition: transform 0.2s;
}
.portal-like-btn:active svg {
    transform: scale(1.2);
}

/* Theme Toggle Button */
.portal-theme-toggle {
    background: transparent;
    border: none;
    color: var(--portal-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.2s;
}

.portal-theme-toggle:hover {
    background: var(--portal-surface-soft);
    color: var(--portal-ink);
}

/* Markdown Content Styling */
.markdown-content h1, .markdown-content h2, .markdown-content h3 {
    color: var(--portal-ink);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 800;
}
.markdown-content p {
    margin-bottom: 1.2em;
    line-height: 1.8;
}
.markdown-content code {
    background: var(--portal-surface-soft);
    padding: 2px 6px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9em;
}
.markdown-content pre {
    background: #1e293b !important;
    padding: 16px;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 1.5em;
}
.markdown-content pre code {
    background: transparent;
    color: #f8fafc;
    padding: 0;
}
.markdown-content blockquote {
    border-left: 4px solid var(--portal-primary);
    padding-left: 16px;
    color: var(--portal-muted);
    font-style: italic;
    margin: 1.5em 0;
}
.markdown-content ul, .markdown-content ol {
    margin-bottom: 1.5em;
    padding-left: 24px;
}
.markdown-content ul {
    list-style: disc;
}
.markdown-content ol {
    list-style: decimal;
}
.markdown-content li {
    margin-bottom: 8px;
}
.markdown-content table {
    width: 100%;
    border: 1px solid var(--portal-line);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    margin: 24px 0;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.5;
}
.markdown-content th,
.markdown-content td {
    border-bottom: 1px solid var(--portal-line);
    border-right: 1px solid var(--portal-line);
    padding: 12px 16px;
    text-align: left;
    vertical-align: top;
}
.markdown-content th {
    background: var(--portal-surface-soft);
    color: var(--portal-ink);
    font-weight: 800;
}
.markdown-content td {
    color: var(--portal-ink);
}
.markdown-content tr:last-child td {
    border-bottom: none;
}
.markdown-content th:last-child,
.markdown-content td:last-child {
    border-right: none;
}
.markdown-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 1em 0;
}

.markdown-content a {
    color: var(--portal-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.markdown-content a:hover {
    color: var(--portal-secondary);
}
.markdown-content figure {
    margin: 2.5em 0;
}
.markdown-content figcaption {
    font-size: 14px;
    color: var(--portal-muted);
    text-align: center;
    margin-top: 12px;
    font-style: italic;
}
.markdown-content iframe {
    max-width: 100%;
    border-radius: 12px;
    margin: 2em 0;
    box-shadow: var(--portal-shadow);
}
.markdown-content strong, .markdown-content b {
    font-weight: 800;
    color: var(--portal-ink);
}
