/* SIGNALS Blog System - TUKU Group Cultural Intelligence */

/* === SIGNALS PAGE LAYOUT === */
.signals-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* === HEADER SPACING === */
.block p + .signals-title-row {
    margin-top: 40px;
}

.signals-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* === TUKU LINK === */
.tuku-link {
    color: var(--color-black);
    text-decoration: none;
    border-bottom: none;
    padding-bottom: 0;
    transition: color 0.2s ease;
    font-weight: 500;
}

.tuku-link:hover {
    color: #666;
}

/* === SIGNALS HEADER === */
.signals-header {
    margin-bottom: 80px;
}


.signals-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-description {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-black);
    opacity: 0.7;
    white-space: nowrap;
}

/* === PULSING GREEN LIGHT === */
.status-light {
    width: 12px;
    height: 12px;
    background-color: #00ff00;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* === SEARCH BUTTON === */
.search-trigger {
    display: flex;
    align-items: center;
}

.search-btn {
    background: none;
    border: 1px solid var(--color-black);
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    color: var(--color-black);
    cursor: pointer;
    padding: 12px 16px;
    transition: all 0.2s ease;
    min-width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: var(--color-gold);
    border-color: var(--color-gold);
    opacity: 1;
}

.search-btn:focus {
    outline: 1px solid var(--color-gold);
    outline-offset: 2px;
}

/* === ARTICLES GRID === */
.articles-grid {
    display: flex;
    flex-direction: column;
    gap: 80px;
    margin-bottom: 80px;
}

/* === UNIFIED CONTENT PACKAGES === */
.content-package {
    border: none;
    border-left: 3px solid rgba(193, 154, 75, 0.2);
    padding: 32px 0 32px 24px;
    margin-bottom: 64px;
    background: none;
    position: relative;
    transition: border-color 0.3s ease;
}

.content-package:hover {
    border-left-color: rgba(193, 154, 75, 0.4);
}

.package-header {
    margin-bottom: 24px;
    padding-bottom: 0;
    border-bottom: none;
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.package-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-gold);
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

/* Remove unused package styling */
.package-pieces {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.article-preview {
    cursor: pointer;
    transition: opacity 0.2s ease;
    margin-bottom: 24px;
}

.article-preview:last-child {
    margin-bottom: 0;
}

/* Individual article type indicators */
.article-preview .piece-type-indicator {
    margin-bottom: 8px;
}

.article-preview:hover {
    transform: translateX(4px);
    transition: transform 0.2s ease;
}

.article-preview:hover .article-title {
    color: var(--color-gold);
}

/* === UNIFIED PIECE TYPE SYSTEM === */
.piece-type-indicator {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    color: var(--color-gold);
    opacity: 0.7;
    display: inline-block;
    position: relative;
    margin-bottom: 12px;
}

.piece-type-indicator::after {
    content: '';
    display: block;
    width: 20px;
    height: 1px;
    background: rgba(193, 154, 75, 0.3);
    margin-top: 4px;
}

/* Unified color treatment */
.piece-research,
.piece-reflection,
.piece-linkedin,
.piece-distilled {
    color: var(--color-gold);
}

.article-meta {
    font-size: 0.75rem;
    color: var(--color-black);
    margin-bottom: 20px;
    opacity: 0.5;
    display: flex;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.02em;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    line-height: 1.6;
}

.article-category {
    color: var(--color-gold);
    font-weight: 500;
    opacity: 1;
}

.meta-separator {
    color: var(--color-black);
}

.article-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: -0.005em;
    color: var(--color-black);
    transition: color 0.2s ease;
}

.article-excerpt {
    font-family: 'Lekton', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.55;
    color: var(--color-black);
    opacity: 0.75;
    margin-top: 8px;
    letter-spacing: 0.01em;
}

/* === FOUNDER'S NOTE OVERLAY === */
.founders-note-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(4px) saturate(1.05);
    -webkit-backdrop-filter: blur(4px) saturate(1.05);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.founders-note-overlay.active {
    opacity: 1;
    visibility: visible;
}

.founders-note-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: min(600px, calc(100vw - 40px));
    max-height: calc(100vh - 80px);
    background: var(--color-white);
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.founders-note-overlay.active .founders-note-modal {
    transform: translate(-50%, -50%) scale(1);
}

.founders-note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px 20px 28px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.founders-note-header h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0;
    color: var(--color-black);
    letter-spacing: -0.01em;
}

.founders-note-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-black);
    cursor: pointer;
    padding: 4px 8px;
    margin: -4px -8px -4px 0;
    transition: color 0.2s ease;
    line-height: 1;
}

.founders-note-close:hover {
    color: var(--color-gold);
}

.founders-note-content {
    padding: 28px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: calc(100vh - 200px);
}

.founders-note-content p {
    font-family: 'Lekton', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-black);
    margin-bottom: 24px;
    letter-spacing: 0.01em;
}

.founders-note-content p:last-child {
    margin-bottom: 0;
}

/* === SEARCH OVERLAY === */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(4px) saturate(1.05);
    -webkit-backdrop-filter: blur(4px) saturate(1.05);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: min(500px, calc(100vw - 40px));
    max-height: calc(100vh - 80px);
    background: var(--color-white);
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.search-overlay.active .search-container {
    transform: translate(-50%, -50%) scale(1);
}

.search-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.search-input {
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    padding: 12px 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--color-black);
}

.search-input::placeholder {
    color: var(--color-black);
    opacity: 0.5;
}

.search-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-black);
    cursor: pointer;
    padding: 4px 8px;
    margin-left: 16px;
    transition: color 0.2s ease;
}

.search-close:hover {
    color: var(--color-gold);
}

.search-results {
    padding: 20px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.search-result {
    padding: 16px 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.search-result:hover {
    opacity: 0.7;
}

.search-result:last-child {
    border-bottom: none;
}

.search-result-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.search-result-meta {
    font-size: 0.7rem;
    color: var(--color-black);
    opacity: 0.6;
    margin-bottom: 8px;
}

.search-result-excerpt {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--color-black);
    opacity: 0.8;
}

/* === READING PROGRESS === */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--color-gold);
    z-index: 1001;
    transition: width 0.1s ease;
}

/* === ARTICLE MODAL === */
.article-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(4px) saturate(1.05);
    -webkit-backdrop-filter: blur(4px) saturate(1.05);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.article-overlay.active {
    opacity: 1;
    visibility: visible;
}

.article-modal {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    width: min(700px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    background: var(--color-white);
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.article-overlay.active .article-modal {
    transform: translateX(-50%) scale(1);
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.article-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Text Size Controls */
.text-size-controls {
    display: flex;
    gap: 4px;
    align-items: center;
}

.text-size-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    color: var(--color-black);
    transition: all 0.2s ease;
}

.text-size-btn[data-size="small"] {
    font-size: 0.8rem;
}

.text-size-btn[data-size="large"] {
    font-size: 1.1rem;
}

.text-size-btn:hover,
.text-size-btn.active {
    border-color: var(--color-gold);
    background: var(--color-gold);
    color: var(--color-black);
}

.text-size-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #ddd;
    background: none;
    color: var(--color-black);
}

.article-nav {
    display: flex;
    gap: 16px;
}

.article-prev,
.article-next {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--color-black);
    transition: all 0.2s ease;
}

.article-prev:hover,
.article-next:hover {
    border-color: var(--color-gold);
    background: var(--color-gold);
    color: var(--color-black);
}

.article-prev:disabled,
.article-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #ddd;
    background: none;
    color: var(--color-black);
}

.article-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-black);
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s ease;
}

.article-close:hover {
    color: var(--color-gold);
}

.article-content {
    flex: 1;
    padding: 60px 40px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 600px;
    margin: 0 auto;
}

.article-content-header {
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.article-content-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--color-black);
    opacity: 0.6;
    margin-bottom: 32px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-content-category {
    color: var(--color-gold);
    font-weight: 500;
    opacity: 0.8;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    display: block;
}

.article-content-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.01em;
    font-synthesis: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.article-content-body {
    font-family: 'Lekton', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-black);
    letter-spacing: 0.01em;
    transition: font-size 0.2s ease;
    font-synthesis: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Keep original fonts for preview sections */
.article-preview .article-excerpt {
    font-family: 'Lekton', sans-serif;
}

.package-title {
    font-family: 'JetBrains Mono', monospace;
}

.article-preview .article-title,
.article-preview .article-excerpt {
    font-family: 'Lekton', sans-serif;
}

/* Header typography in modal content */
.article-content-body h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.3;
    margin: 32px 0 16px 0;
    color: var(--color-black);
}

.article-content-body h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.3;
    margin: 24px 0 12px 0;
    color: var(--color-black);
}

/* External link styling - thin underlines */
.article-content-body a {
    color: var(--color-gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(193, 154, 75, 0.4);
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.article-content-body a:hover {
    opacity: 0.8;
    border-bottom-color: var(--color-gold);
}

.article-content-body p {
    margin-bottom: 24px;
}

.article-content-body p:last-child {
    margin-bottom: 0;
}

/* Text Size Variations - Base Desktop - Target ALL content including links */
#articleContent.text-size-small .article-content-body,
#articleContent.text-size-small .article-content-body p,
#articleContent.text-size-small .article-content-body h2,
#articleContent.text-size-small .article-content-body h3,
#articleContent.text-size-small .article-content-body li,
#articleContent.text-size-small .article-content-body a {
    font-size: 0.9rem;
    line-height: 1.5;
}

#articleContent.text-size-large .article-content-body,
#articleContent.text-size-large .article-content-body p,
#articleContent.text-size-large .article-content-body h2,
#articleContent.text-size-large .article-content-body h3,
#articleContent.text-size-large .article-content-body li,
#articleContent.text-size-large .article-content-body a {
    font-size: 1.3rem;
    line-height: 1.8;
}


/* === MOBILE RESPONSIVENESS === */
@media (max-width: 768px) {
    .signals-page {
        padding: 30px 16px;
    }
    
    /* Enhanced mobile modal reading */
    .article-modal {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        padding: 0;
    }
    
    .article-content {
        padding: 24px 20px;
        max-height: calc(100vh - 80px);
    }
    
    .article-content-body {
        font-size: 1.05rem;
        line-height: 1.65;
        letter-spacing: 0.01em;
    }
    
    .article-content-meta {
        font-size: 0.65rem;
        margin-bottom: 24px;
        gap: 6px;
    }
    
    .article-content-body p {
        margin-bottom: 28px;
    }
    
    .article-content-body h2 {
        font-size: 1.3rem;
        margin: 56px 0 28px 0;
        line-height: 1.4;
        padding-top: 8px;
    }
    
    .article-content-body h3 {
        font-size: 1.15rem;
        margin: 44px 0 24px 0;
        padding-top: 4px;
    }
    
    /* Better mobile header spacing */
    .article-content-header {
        margin-bottom: 32px;
    }
    
    .article-content-title {
        font-size: 1.3rem;
        line-height: 1.25;
        margin-bottom: 24px;
    }
    
    /* Mobile links with thin underlines */
    .article-content-body a {
        color: var(--color-gold);
        text-decoration: none;
        border-bottom: 1px solid rgba(193, 154, 75, 0.4);
        padding: 1px 0;
        font-weight: 400;
        font-synthesis: none;
        -webkit-font-smoothing: antialiased;
        transition: opacity 0.2s ease, border-color 0.2s ease;
    }
    
    .article-content-body a:hover {
        opacity: 0.85;
        border-bottom-color: var(--color-gold);
    }
    
    /* Add visual breaks for long paragraphs */
    .article-content-body p:nth-child(6n) {
        margin-bottom: 44px;
        position: relative;
    }
    
    /* Subtle section dividers */
    .article-content-body h2::before {
        content: "";
        display: block;
        width: 32px;
        height: 1px;
        background: #e0e0e0;
        margin: 0 auto 20px auto;
        position: relative;
        top: -28px;
    }
    
    /* Better paragraph rhythm */
    .article-content-body p {
        max-width: none;
    }
    
    /* Improved first paragraph after headers */
    .article-content-body h2 + p,
    .article-content-body h3 + p {
        margin-top: 0;
    }
    
    /* Mobile text size controls - placed AFTER base mobile styles for proper cascade */
    #articleContent.text-size-small .article-content-body,
    #articleContent.text-size-small .article-content-body p,
    #articleContent.text-size-small .article-content-body h2,
    #articleContent.text-size-small .article-content-body h3,
    #articleContent.text-size-small .article-content-body li,
    #articleContent.text-size-small .article-content-body a {
        font-size: 0.95rem;
        line-height: 1.55;
    }
    
    #articleContent.text-size-large .article-content-body,
    #articleContent.text-size-large .article-content-body p,
    #articleContent.text-size-large .article-content-body h2,
    #articleContent.text-size-large .article-content-body h3,
    #articleContent.text-size-large .article-content-body li,
    #articleContent.text-size-large .article-content-body a {
        font-size: 1.35rem;
        line-height: 1.85;
    }

    .signals-header {
        margin-bottom: 60px;
    }

    .signals-nav {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .signals-name {
        font-size: 0.9rem;
    }

    .breadcrumb-link {
        font-size: 0.9rem;
    }

    .breadcrumb-separator {
        font-size: 0.9rem;
    }
    
    /* Keep status description on one line */
    .status-description {
        font-size: 0.85rem;
    }

    .search-btn {
        font-size: 1.2rem;
        padding: 10px 14px;
        min-width: 44px;
        height: 44px;
    }

    .articles-grid {
        gap: 60px;
        margin-bottom: 60px;
    }

    .article-meta {
        font-size: 0.7rem;
        gap: 6px;
    }

    .article-title {
        font-size: 1.25rem;
        margin-bottom: 12px;
    }

    .article-excerpt {
        font-size: 0.9rem;
    }

    /* Mobile search overlay */
    .search-container {
        width: calc(100vw - 30px);
        top: 40px;
        transform: translateX(-50%) scale(0.9);
    }

    .search-overlay.active .search-container {
        transform: translateX(-50%) scale(1);
    }

    .search-input {
        font-size: 0.9rem;
    }

    /* Mobile article modal */
    .article-modal {
        top: 15px;
        width: calc(100vw - 30px);
        max-height: calc(100vh - 30px);
    }

    .article-header {
        padding: 16px 20px;
    }

    .article-prev,
    .article-next {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .article-content {
        padding: 24px 20px;
    }

    .article-content-title {
        font-size: 1.5rem;
    }

    .article-content-body {
        font-size: 0.9rem;
    }

    /* Mobile founder's note */
    .founders-note-modal {
        width: calc(100vw - 30px);
        max-height: calc(100vh - 60px);
    }

    .founders-note-header {
        padding: 20px 24px 18px 24px;
    }

    .founders-note-header h2 {
        font-size: 1.1rem;
    }

    .founders-note-content {
        padding: 24px;
    }

    .founders-note-content p {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 20px;
    }

}

/* === LOADING STATES === */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--color-black);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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