/**
 * DECYON Components
 * =================
 * Reusable UI component styles.
 */

/* =============================================
   HEADER
   ============================================= */

.site-header {
    position: sticky;
    top: 0;
    background: rgba(250, 250, 250, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    z-index: var(--z-header);
}

.header-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: flex;
    align-items: center;
}

.site-logo img {
    height: 40px;
    width: auto;
    display: block;
    margin-top: 5px;
}

/* Navigation */
.main-nav {
    display: flex;
    gap: var(--space-1);
}

.main-nav a {
    color: var(--color-text-secondary);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    padding: var(--space-4) var(--space-7);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.main-nav a svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.main-nav a:hover svg,
.main-nav a.active svg {
    opacity: 1;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-text);
    background: var(--color-surface);
}

/* =============================================
   FOOTER
   ============================================= */

.site-footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: var(--space-18) var(--container-padding);
}

.footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-17);
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-6);
}

.footer-logo img {
    height: 32px;
    width: auto;
}

.footer-desc {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: var(--leading-loose);
}

.footer-col h4 {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-8);
}

.footer-links li {
    margin-bottom: var(--space-5);
}

.footer-links a {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-text);
}

.footer-bottom {
    max-width: var(--container-max);
    margin: var(--space-14) auto 0;
    padding-top: var(--space-12);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.footer-social {
    display: flex;
    gap: var(--space-7);
}

.footer-social a {
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    color: var(--color-accent);
    transform: translateY(-2px);
}

.footer-social svg {
    width: 20px;
    height: 20px;
}

/* =============================================
   BADGES
   ============================================= */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--color-accent-light);
    color: var(--color-accent);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-9);
}

.badge svg {
    width: 14px;
    height: 14px;
}

.badge-featured {
    background: var(--color-featured-light);
    color: var(--color-featured);
}

/* =============================================
   BUTTONS
   ============================================= */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-4);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    padding: var(--space-6) var(--space-11);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}

.btn-primary {
    background: var(--color-text);
    color: white;
}

.btn-primary:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    color: white;
}

.btn-primary svg {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-base);
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

.btn-secondary {
    color: var(--color-text-secondary);
    padding: var(--space-7) var(--space-3);
}

.btn-secondary:hover {
    color: var(--color-text);
}

.btn-group {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    flex-wrap: wrap;
}

/* =============================================
   CARDS
   ============================================= */

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-slow);
}

.card:hover {
    border-color: #d0d0d0;
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

/* Post Card */
.post-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.post-card:hover .post-thumb {
    transform: scale(1.03);
}

.post-thumb-wrapper {
    overflow: hidden;
    position: relative;
}

.post-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--gradient-hero-bg);
    transition: transform var(--transition-slower);
}

.post-category {
    position: absolute;
    top: var(--space-5);
    left: var(--space-5);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    padding: 5px 10px;
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
}

.post-body {
    padding: var(--space-10);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    letter-spacing: -0.015em;
    margin-bottom: var(--space-4);
    line-height: var(--leading-snug);
}

.post-excerpt {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-8);
    flex: 1;
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.post-date,
.post-read-time {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-date svg,
.post-read-time svg {
    width: 14px;
    height: 14px;
}

/* Featured Card */
.featured-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
}

.featured-card:hover .featured-image {
    transform: scale(1.02);
}

.featured-image-wrapper {
    overflow: hidden;
}

.featured-image {
    height: 340px;
    width: 100%;
    object-fit: cover;
    background: var(--gradient-hero-bg);
    transition: transform var(--transition-slower);
}

.featured-body {
    padding: var(--space-16);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-title {
    font-size: var(--text-6xl);
    font-weight: var(--font-bold);
    letter-spacing: -0.025em;
    margin-bottom: var(--space-6);
    line-height: 1.2;
}

.featured-excerpt {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    line-height: var(--leading-loose);
    margin-bottom: var(--space-11);
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: var(--space-9);
    font-size: var(--text-base);
    color: var(--color-text-muted);
}

.featured-meta span {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.featured-meta svg {
    width: 16px;
    height: 16px;
}

.featured-meta .tag {
    background: var(--color-bg);
    padding: var(--space-1) var(--space-4);
    border-radius: var(--radius-full);
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
}

/* Topic Card */
.topic-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: var(--space-11) var(--space-7);
    text-align: center;
    transition: all var(--transition-base);
}

.topic-card:hover {
    border-color: var(--color-accent);
    background: var(--color-accent-light);
    transform: translateY(-2px);
}

.topic-card:hover .topic-icon {
    transform: scale(1.1);
}

.topic-icon {
    width: 28px;
    height: 28px;
    color: var(--color-accent);
    margin: 0 auto var(--space-5);
    transition: transform var(--transition-base);
}

.topic-name {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
}

.topic-count {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}

/* =============================================
   NEWSLETTER
   ============================================= */

.newsletter {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding) var(--space-20);
}

.newsletter-card {
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-18);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-17);
    align-items: center;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-glow-accent), 0 20px 60px rgba(0, 0, 0, 0.15);
}

.newsletter-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.3) 0%, transparent 60%);
    animation: newsletter-glow 8s ease-in-out infinite;
    pointer-events: none;
}

.newsletter-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -30%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.25) 0%, transparent 50%);
    animation: newsletter-glow 8s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes newsletter-glow {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    50% { transform: translate(20px, -20px) scale(1.1); opacity: 0.8; }
}

.newsletter-content,
.newsletter-form {
    position: relative;
    z-index: 1;
}

.newsletter-content h3 {
    font-size: var(--text-5xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-6);
    letter-spacing: -0.02em;
}

.newsletter-content p {
    font-size: var(--text-lg);
    opacity: 0.92;
    line-height: var(--leading-loose);
}

.newsletter-form {
    display: flex;
    gap: var(--space-5);
}

.newsletter-input {
    flex: 1;
    padding: var(--space-7) var(--space-9);
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--text-md);
    font-family: inherit;
    background: rgba(255, 255, 255, 0.95);
}

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

.newsletter-btn {
    padding: var(--space-7) var(--space-12);
    background: var(--color-text);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--text-md);
    font-weight: var(--font-semibold);
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.newsletter-btn:hover {
    background: #333;
    transform: translateY(-2px);
}

/* =============================================
   POSTS GRID
   ============================================= */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-11);
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-6);
}

/* =============================================
   HERO VISUAL / ORBITAL SYSTEM
   ============================================= */

.visual-header {
    text-align: center;
    margin-bottom: 0;
    position: relative;
    z-index: 5;
}

.visual-header-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-accent);
    font-size: 10px;
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
}

.visual-header-tag svg {
    width: 12px;
    height: 12px;
}

.visual-footer {
    text-align: center;
    margin-top: -30px;
    position: relative;
    z-index: 5;
    max-width: 320px;
}

.visual-footer-text {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    line-height: var(--leading-relaxed);
}

.visual-footer-text strong {
    color: var(--color-text-secondary);
    font-weight: var(--font-semibold);
}

.orbital-system {
    position: relative;
    width: 380px;
    height: 380px;
}

/* Central Core */
.core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient-primary);
    box-shadow:
        0 0 60px rgba(168, 85, 247, 0.4),
        0 0 100px rgba(168, 85, 247, 0.2),
        inset 0 0 30px rgba(255, 255, 255, 0.1);
    animation: pulse-core 3s ease-in-out infinite;
    z-index: 10;
}

.core::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(168, 85, 247, 0.3);
    animation: pulse-ring 3s ease-in-out infinite;
}

.core-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

@keyframes pulse-core {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes pulse-ring {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 0.2; }
}

/* Orbital Rings */
.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px dashed rgba(168, 85, 247, 0.25);
}

.orbit-1 {
    width: 180px;
    height: 180px;
    margin: -90px 0 0 -90px;
    animation: rotate 20s linear infinite;
}

.orbit-2 {
    width: 260px;
    height: 260px;
    margin: -130px 0 0 -130px;
    animation: rotate 30s linear infinite reverse;
    border-color: rgba(14, 165, 233, 0.25);
}

.orbit-3 {
    width: 340px;
    height: 340px;
    margin: -170px 0 0 -170px;
    animation: rotate 40s linear infinite;
    border-style: dotted;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Satellites */
.satellite {
    position: absolute;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.satellite-lg {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--color-accent-cyan) 0%, #0284c7 100%);
    box-shadow: var(--shadow-glow-cyan);
}

.satellite-md {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.4);
}

.satellite-sm {
    width: 20px;
    height: 20px;
    background: var(--color-surface);
    border: 2px solid var(--color-accent);
    box-shadow: var(--shadow-sm);
}

.satellite svg {
    width: 50%;
    height: 50%;
    color: white;
}

.satellite-sm svg {
    color: var(--color-accent);
}

/* Satellite positions */
.sat-1 { top: -22px; left: 50%; margin-left: -22px; }
.sat-2 { top: 50%; right: -16px; margin-top: -16px; }
.sat-3 { bottom: -10px; left: 50%; margin-left: -10px; }
.sat-4 { top: 50%; left: -22px; margin-top: -22px; }
.sat-5 { top: 15%; right: 10%; }
.sat-6 { bottom: 20%; left: 5%; }

/* Floating Labels */
.float-label {
    position: absolute;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-text-secondary);
    box-shadow: var(--shadow-md);
    animation: float-label 4s ease-in-out infinite;
    white-space: nowrap;
}

.label-1 { top: 5%; left: 0; animation-delay: 0s; }
.label-2 { top: 25%; right: -10px; animation-delay: -1s; }
.label-3 { bottom: 15%; right: 5%; animation-delay: -2s; }
.label-4 { bottom: 30%; left: -5%; animation-delay: -1.5s; }

@keyframes float-label {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Glow effects */
.glow-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    margin: -100px 0 0 -100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, transparent 70%);
    animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.3); opacity: 0.8; }
}

/* Data streams */
.stream {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-accent);
    border-radius: 50%;
    opacity: 0;
}

.stream-1 { animation: stream-in 3s ease-in-out infinite; top: 0; left: 20%; }
.stream-2 { animation: stream-in 3s ease-in-out infinite 0.5s; top: 10%; right: 10%; }
.stream-3 { animation: stream-in 3s ease-in-out infinite 1s; bottom: 5%; left: 30%; }
.stream-4 { animation: stream-in 3s ease-in-out infinite 1.5s; top: 40%; left: 0; }

@keyframes stream-in {
    0% { opacity: 0; transform: translate(0, 0) scale(0.5); }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% {
        opacity: 0;
        transform: translate(calc(190px - 100%), calc(190px - 100%)) scale(1.5);
    }
}

/* =============================================
   ARTICLE HERO (Single Post)
   ============================================= */

.article-hero {
    background: var(--gradient-hero-bg);
    border-bottom: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.article-hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    top: -250px;
    right: -100px;
}

.article-hero-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-17) var(--container-padding);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-17);
    align-items: center;
    position: relative;
    z-index: 1;
}

.article-hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-7);
}

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

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    transition: color var(--transition-fast);
    width: fit-content;
}

.back-link:hover {
    color: var(--color-text);
}

.back-link svg {
    width: 16px;
    height: 16px;
}

/* Back Link Pill (demo1 style) */
.back-link-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    padding: var(--space-3) var(--space-6);
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    width: fit-content;
}

.back-link-pill:hover {
    color: var(--color-text);
    border-color: var(--color-accent);
    transform: translateX(-4px);
}

.back-link-pill svg {
    width: 16px;
    height: 16px;
}

.article-category {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: white;
    border: 1px solid var(--color-border);
    color: var(--color-accent);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-full);
    width: fit-content;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.article-category svg {
    width: 14px;
    height: 14px;
}

/* Page Badge */
.page-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    background: white;
    border: 1px solid var(--color-border);
    color: var(--color-accent);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-9);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.page-badge svg {
    width: 14px;
    height: 14px;
}

.article-title {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.12;
    margin-bottom: 20px;
    max-width: 720px;
}

.article-excerpt {
    font-size: 19px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 640px;
}

.article-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 700;
    border: 2px solid white;
    box-shadow: 0 4px 12px rgba(80, 70, 229, 0.25);
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--color-text);
}

.author-title {
    font-size: 13px;
    color: var(--color-text-muted);
}

.meta-divider {
    width: 1px;
    height: 32px;
    background: var(--color-border);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--color-text-secondary);
}

.meta-item svg {
    width: 18px;
    height: 18px;
    color: var(--color-text-muted);
}

.article-hero-image {
    position: relative;
}

.article-hero-image img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

/* Article Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    padding-top: var(--space-11);
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-11);
}

.article-tags .tag {
    background: var(--color-bg);
    color: var(--color-text-secondary);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    transition: all var(--transition-fast);
}

.article-tags .tag:hover {
    background: var(--color-accent-light);
    color: var(--color-accent);
}

/* Article Sidebar */
.sidebar-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-11);
    margin-bottom: var(--space-7);
}

.sidebar-title {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: var(--color-text-muted);
    margin-bottom: var(--space-7);
}

.toc {
    display: flex;
    flex-direction: column;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.toc-item {
    margin: 0;
}

.toc-subitem {
    padding-left: var(--space-6);
}

.toc-link {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    padding: var(--space-3) 0;
    padding-left: var(--space-5);
    border-left: 2px solid transparent;
    transition: all var(--transition-fast);
    line-height: 1.4;
}

.toc-link:hover {
    color: var(--color-text);
}

.toc-link.active {
    color: var(--color-accent);
    border-left-color: var(--color-accent);
    font-weight: var(--font-medium);
}

.share-buttons {
    display: flex;
    gap: var(--space-4);
}

.share-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-5);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    transition: all var(--transition-fast);
}

.share-btn:hover {
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.share-btn svg {
    width: 16px;
    height: 16px;
}

/* Related Section */
.related-section {
    margin-top: var(--space-13);
}

/* =============================================
   ARTICLE CONTENT TYPOGRAPHY
   ============================================= */

.article-content p {
    font-size: 17px;
    line-height: 1.85;
    color: var(--color-text);
    margin-bottom: 24px;
}

.article-content p:empty {
    display: none;
}

.article-content p:first-of-type::first-letter {
    font-size: 56px;
    font-weight: var(--font-bold);
    float: left;
    line-height: 1;
    margin-right: var(--space-5);
    margin-top: 4px;
    color: var(--color-accent);
}

.article-content h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-top: 48px;
    margin-bottom: 20px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.article-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 36px;
    margin-bottom: 16px;
    color: var(--color-text);
}

.article-content ul,
.article-content ol {
    margin-bottom: 24px;
    padding-left: 0;
    list-style: none;
}

.article-content li {
    font-size: 17px;
    line-height: 1.85;
    margin-bottom: 12px;
    color: var(--color-text);
    padding-left: 28px;
    position: relative;
}

.article-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: 50%;
}

.article-content ol {
    counter-reset: list-counter;
}

.article-content ol li {
    counter-increment: list-counter;
}

.article-content ol li::before {
    content: counter(list-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 22px;
    height: 22px;
    background: var(--color-accent-light);
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-content blockquote {
    border-left: 4px solid var(--color-accent);
    background: var(--color-accent-light);
    padding: 24px 28px;
    margin: 36px 0;
    border-radius: 0 8px 8px 0;
}

.article-content blockquote p {
    font-size: 18px;
    font-style: italic;
    color: var(--color-accent-dark);
    margin-bottom: 0;
}

.article-content blockquote p::first-letter {
    font-size: inherit;
    float: none;
    margin: 0;
    color: inherit;
}

.article-content code {
    background: var(--color-bg);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: var(--text-md);
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    color: var(--color-accent-dark);
}

.article-content pre {
    background: #1a1a1a;
    color: #e5e5e5;
    padding: var(--space-11);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: var(--space-13) 0;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: var(--text-sm);
}

/* Sidebar Author Card */
.author-card {
    text-align: center;
}

.author-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: var(--font-bold);
    font-size: var(--text-3xl);
    margin: 0 auto var(--space-7);
}

.author-card-name {
    font-weight: var(--font-semibold);
    font-size: var(--text-lg);
    margin-bottom: var(--space-1);
}

.author-card-bio {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-7);
}

.author-card-link {
    font-size: var(--text-sm);
    color: var(--color-accent);
    font-weight: var(--font-medium);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.author-card-link:hover {
    text-decoration: underline;
}

.author-card-link svg {
    width: 14px;
    height: 14px;
}

/* Page Stats (Archive/Category pages) */
.page-stats {
    margin-top: var(--space-7);
}

.page-stat {
    display: flex;
    align-items: center;
    gap: var(--space-5);
}

.page-stat-icon {
    width: 44px;
    height: 44px;
    background: var(--color-accent-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
}

.page-stat-value {
    font-weight: var(--font-bold);
    font-size: var(--text-2xl);
}

.page-stat-label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    padding-top: var(--space-13);
}

.pagination-list {
    display: flex;
    gap: var(--space-3);
}

.pagination-item a,
.pagination-item span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--space-5);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.pagination-item a:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.pagination-item .current {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

/* =============================================
   READING PROGRESS BAR
   ============================================= */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-dark));
    z-index: 200;
    transition: width 0.1s ease;
}

/* =============================================
   RESPONSIVE COMPONENTS
   ============================================= */

@media (max-width: 1024px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-14);
    }

    .featured-card {
        grid-template-columns: 1fr;
    }

    .featured-image {
        height: 260px;
    }

    .newsletter-card {
        grid-template-columns: 1fr;
        gap: var(--space-12);
        padding: var(--space-15);
    }

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

    /* Orbital System - Tablet */
    .visual-header {
        margin-bottom: -20px;
    }

    .visual-header-title {
        font-size: var(--text-lg);
    }

    .visual-footer {
        margin-top: -20px;
        max-width: 280px;
    }

    .visual-footer-text {
        font-size: var(--text-xs);
    }

    .orbital-system {
        width: 320px;
        height: 320px;
    }

    .core {
        width: 80px;
        height: 80px;
    }

    .core-inner {
        font-size: 10px;
    }

    .orbit-1 {
        width: 150px;
        height: 150px;
        margin: -75px 0 0 -75px;
    }

    .orbit-2 {
        width: 220px;
        height: 220px;
        margin: -110px 0 0 -110px;
    }

    .orbit-3 {
        width: 290px;
        height: 290px;
        margin: -145px 0 0 -145px;
    }

    .satellite-lg {
        width: 36px;
        height: 36px;
    }

    .satellite-md {
        width: 28px;
        height: 28px;
    }

    .float-label {
        font-size: 10px;
        padding: var(--space-2) var(--space-5);
    }

    /* Article Hero - Tablet */
    .article-hero-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .article-hero-content {
        max-width: 100%;
    }

    .article-hero-image img {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        height: var(--header-height-mobile);
    }

    .site-logo img {
        height: 32px;
    }

    .main-nav a {
        padding: var(--space-3) var(--space-5);
        font-size: var(--text-sm);
    }

    .main-nav a svg {
        width: 14px;
        height: 14px;
    }

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

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

    .newsletter {
        padding: 0 var(--container-padding) var(--space-17);
    }

    .newsletter-card {
        padding: var(--space-13) var(--space-9);
    }

    .newsletter-content h3 {
        font-size: var(--text-3xl);
    }

    .newsletter-form {
        flex-direction: column;
    }

    .footer {
        padding: var(--space-13) var(--container-padding);
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: var(--space-12);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-7);
        text-align: center;
    }

    /* Orbital System - Mobile */
    .visual-header {
        display: none;
    }

    .visual-footer {
        display: none;
    }

    .orbital-system {
        width: 280px;
        height: 280px;
    }

    .core {
        width: 70px;
        height: 70px;
    }

    .core-inner {
        font-size: 9px;
    }

    .orbit-1 {
        width: 130px;
        height: 130px;
        margin: -65px 0 0 -65px;
    }

    .orbit-2 {
        width: 195px;
        height: 195px;
        margin: -97px 0 0 -97px;
    }

    .orbit-3 {
        width: 260px;
        height: 260px;
        margin: -130px 0 0 -130px;
    }

    .satellite-lg {
        width: 30px;
        height: 30px;
    }

    .satellite-md {
        width: 24px;
        height: 24px;
    }

    .satellite-sm {
        width: 16px;
        height: 16px;
    }

    .float-label {
        display: none;
    }

    /* Article Hero - Mobile */
    .article-hero-inner {
        padding: 32px 16px 40px;
    }

    .article-title {
        font-size: 28px;
    }

    .article-excerpt {
        font-size: 16px;
    }

    .article-hero-image img {
        height: 220px;
    }

    .article-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .meta-divider {
        display: none;
    }

    .article-content p,
    .article-content li {
        font-size: 16px;
        line-height: 1.75;
    }

    .article-content h2 {
        font-size: 20px;
        margin-top: 36px;
    }

    .article-content h3 {
        font-size: 18px;
    }

    .article-content blockquote {
        padding: 20px;
        margin: 28px 0;
    }

    .article-content blockquote p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .main-nav a span {
        font-size: 0;
    }

    .main-nav a svg {
        width: 18px;
        height: 18px;
        margin: 0;
    }

    .main-nav a {
        padding: var(--space-4);
    }

    .badge {
        font-size: 10px;
        padding: var(--space-2) var(--space-4);
    }

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

    .post-title {
        font-size: var(--text-lg);
    }

    .featured-title {
        font-size: var(--text-3xl);
    }

    /* Orbital System - Small Mobile */
    .orbital-system {
        width: 200px;
        height: 200px;
    }

    .core {
        width: 52px;
        height: 52px;
    }

    .core-inner {
        font-size: 8px;
    }

    .orbit-1 {
        width: 95px;
        height: 95px;
        margin: -47px 0 0 -47px;
    }

    .orbit-2 {
        width: 140px;
        height: 140px;
        margin: -70px 0 0 -70px;
    }

    .orbit-3 {
        width: 185px;
        height: 185px;
        margin: -92px 0 0 -92px;
    }

    .satellite-lg {
        width: 24px;
        height: 24px;
    }

    .satellite-md {
        width: 20px;
        height: 20px;
    }

    .satellite-sm {
        width: 14px;
        height: 14px;
    }

    .stream {
        display: none;
    }

    /* Article Hero - Small Mobile */
    .article-title {
        font-size: 24px;
    }

    .article-category {
        font-size: 10px;
        padding: 6px 10px;
    }

    .back-link-pill {
        font-size: 13px;
        padding: 6px 12px;
    }

    .author-avatar {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .article-content p:first-of-type::first-letter {
        font-size: 44px;
    }
}

/* =============================================
   POST TEMPLATE VARIATIONS
   ============================================= */

/* Template Badge */
.template-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-full);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.template-badge svg {
    width: 14px;
    height: 14px;
}

.template-badge--blueprint {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
}

.template-badge--case-study {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
}

/* =============================================
   FULL-WIDTH TEMPLATE
   ============================================= */

.article-hero--full-width {
    text-align: center;
}

.article-hero-inner--centered {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
}

.article-hero-content--centered {
    align-items: center;
}

.article-top-row--centered {
    justify-content: center;
}

.article-title--centered {
    text-align: center;
    max-width: 100%;
}

.article-excerpt--centered {
    text-align: center;
    max-width: 100%;
}

.article-meta-row--centered {
    justify-content: center;
}

/* Full-width Featured Image */
.article-featured-image {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.article-featured-image-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

/* Full-width Article Container */
.article-container--full-width {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
}

.article-content--full-width {
    max-width: 100%;
}

/* Inline Share Section */
.article-share-inline {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    padding-top: var(--space-13);
    margin-top: var(--space-13);
    border-top: 1px solid var(--color-border);
}

.share-label {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

/* Author Bio Section (Full-width template) */
.author-bio-section {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-15) var(--container-padding);
}

.author-bio-inner {
    display: flex;
    align-items: center;
    gap: var(--space-10);
    padding: var(--space-13);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.author-bio-avatar {
    width: 80px;
    height: 80px;
    min-width: 80px;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(80, 70, 229, 0.25);
}

.author-bio-content {
    flex: 1;
}

.author-bio-name {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-3);
}

.author-bio-text {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-5);
}

.author-bio-link {
    font-size: var(--text-sm);
    color: var(--color-accent);
    font-weight: var(--font-medium);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.author-bio-link:hover {
    text-decoration: underline;
}

.author-bio-link svg {
    width: 14px;
    height: 14px;
}

/* =============================================
   BLUEPRINT TEMPLATE
   ============================================= */

.article-hero--blueprint {
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.03) 0%, transparent 100%);
}

/* Blueprint Progress Bar */
.blueprint-progress {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: 4px;
    background: var(--color-border);
    z-index: 99;
}

.blueprint-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    width: 0%;
    transition: width 0.1s ease-out;
}

/* Blueprint TOC - simple bullet list */
.toc--blueprint .toc-item {
    position: relative;
    padding-left: var(--space-6);
}

.toc--blueprint .toc-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    width: 6px;
    height: 6px;
    background: var(--color-border);
    border-radius: 50%;
}

.toc--blueprint .toc-link {
    border-left: none;
    padding-left: 0;
}

.toc--blueprint .toc-link.active {
    color: #10b981;
    font-weight: var(--font-medium);
}

.toc--blueprint .toc-item:has(.toc-link.active)::before {
    background: #10b981;
}

/* Blueprint subitem */
.toc--blueprint .toc-subitem {
    padding-left: calc(var(--space-6) + var(--space-5));
}

.toc--blueprint .toc-subitem::before {
    width: 4px;
    height: 4px;
    left: var(--space-5);
}

/* Blueprint Content Styling */
.article-content--blueprint h2 {
    counter-increment: blueprint-step;
    display: flex;
    align-items: center;
    gap: var(--space-5);
}

.article-content--blueprint h2::before {
    content: 'Step ' counter(blueprint-step);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

/* Blueprint Completion */
.blueprint-completion {
    text-align: center;
    padding: var(--space-17);
    margin-top: var(--space-15);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(5, 150, 105, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-lg);
}

.blueprint-completion-icon {
    color: #10b981;
    margin-bottom: var(--space-7);
}

.blueprint-completion-icon svg {
    width: 48px;
    height: 48px;
}

.blueprint-completion-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-4);
}

.blueprint-completion-text {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
}

/* =============================================
   CASE STUDY TEMPLATE
   ============================================= */

.article-hero--case-study {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.03) 0%, transparent 100%);
}

.article-container--case-study {
    gap: var(--space-15);
}

/* Case Study Metrics */
.case-study-metrics {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(29, 78, 216, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-9);
}

.case-study-metrics .sidebar-title {
    color: #3b82f6;
}

.metrics-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-7);
}

.metric-item {
    text-align: center;
    padding: var(--space-6);
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.metric-value {
    display: block;
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: #3b82f6;
    line-height: 1.2;
    margin-bottom: var(--space-2);
}

.metric-label {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

/* Case Study Highlights */
.case-study-highlights {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-9);
}

.highlights-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.highlights-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.highlights-list li::before {
    content: '→';
    color: #3b82f6;
    font-weight: var(--font-bold);
    flex-shrink: 0;
}

/* =============================================
   TEMPLATE RESPONSIVE STYLES
   ============================================= */

@media (max-width: 768px) {
    /* Full-width Template Mobile */
    .author-bio-inner {
        flex-direction: column;
        text-align: center;
        padding: var(--space-10);
    }

    .author-bio-avatar {
        width: 64px;
        height: 64px;
        min-width: 64px;
        font-size: 22px;
    }

    .article-share-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-5);
    }

    .article-share-inline .share-buttons {
        width: 100%;
    }

    /* Blueprint Mobile */
    .article-content--blueprint h2::before {
        display: none;
    }

    .blueprint-completion {
        padding: var(--space-11);
    }

    /* Case Study Mobile */
    .metrics-grid {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .metric-item {
        flex: 1;
        min-width: 80px;
    }

    .metric-value {
        font-size: var(--text-lg);
    }
}
