/* ============================================================
   CSL Blog v2.0 — Cybersecurity Investment Blog (Light Theme)
   Supplemental CSS (Tailwind CDN handles base utilities)
   ============================================================ */

/* === GLOBAL OVERRIDES === */
::selection {
    background: rgba(37, 99, 235, 0.25);
    color: #0f172a;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* === TICKER ANIMATION === */
.ticker-track {
    animation: ticker-scroll 30s linear infinite;
}

.ticker-track:hover {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: ticker-blink 1.5s ease-in-out infinite;
}

@keyframes ticker-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

/* === PULSING DOT (Subscribe button) === */
.btn-pulse {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

/* === HERO SLIDER === */
.hero-slide {
    animation: fadeSlideIn 0.6s ease-out;
}

.hero-slide.hidden {
    display: none;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-dot {
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot.active {
    background: #2563eb;
    width: 1.5rem;
}

/* === GHOST CONTENT (prose-light) === */
.prose-light {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #374151;
}

.prose-light > * + * {
    margin-top: 1.5em;
}

.prose-light h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2.5em;
    margin-bottom: 0.75em;
    color: #0f172a;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e5ea;
    scroll-margin-top: 5rem;
}

.prose-light h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.6em;
    color: #0f172a;
    scroll-margin-top: 5rem;
}

.prose-light h4 {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: #1e293b;
}

.prose-light a {
    color: #2563eb;
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, 0.35);
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

.prose-light a:hover {
    color: #1e40af;
    text-decoration-color: rgba(30, 64, 175, 0.5);
}

.prose-light strong {
    color: #0f172a;
    font-weight: 600;
}

.prose-light blockquote {
    border-left: 3px solid #2563eb;
    padding: 0.75rem 0 0.75rem 1.5rem;
    color: #64748b;
    font-style: italic;
    background: #f8fafc;
    border-radius: 0 4px 4px 0;
    margin: 2em 0;
}

.prose-light code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875em;
    background: #f1f5f9;
    color: #2563eb;
    padding: 0.15em 0.4em;
    border-radius: 3px;
    border: 1px solid #e2e8f0;
}

.prose-light pre {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #7c3aed;
    border-radius: 6px;
    padding: 1.5rem;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    margin: 2em 0;
}

.prose-light pre code {
    background: none;
    border: none;
    padding: 0;
    color: #334155;
    font-size: 1em;
}

.prose-light ul,
.prose-light ol {
    padding-left: 1.5rem;
}

.prose-light li + li {
    margin-top: 0.4em;
}

.prose-light li::marker {
    color: #94a3b8;
}

.prose-light hr {
    border: none;
    border-top: 1px solid #e2e5ea;
    margin: 2.5em 0;
}

.prose-light figure {
    margin: 2em 0;
}

.prose-light figure img {
    width: 100%;
    border-radius: 6px;
    border: 1px solid #e2e5ea;
}

.prose-light figcaption {
    text-align: center;
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
}

.prose-light table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    margin: 2em 0;
}

.prose-light thead th {
    background: #f8fafc;
    font-weight: 600;
    color: #0f172a;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 2px solid #e2e5ea;
    font-size: 0.8125rem;
    letter-spacing: 0.03em;
}

.prose-light tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
}

.prose-light tbody tr:hover {
    background: #f8fafc;
}

/* Ghost image card widths */
.prose-light .kg-width-wide {
    margin-left: -4rem;
    margin-right: -4rem;
    max-width: calc(100% + 8rem);
}

.prose-light .kg-width-full {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
}

/* === TOC SIDEBAR === */
#toc-nav a {
    display: block;
    padding: 4px 0;
    color: #64748b;
    font-size: 0.8125rem;
    line-height: 1.4;
    transition: color 0.15s ease;
    border-left: 2px solid transparent;
    padding-left: 10px;
}

#toc-nav a:hover {
    color: #0f172a;
}

#toc-nav a.active {
    color: #2563eb;
    border-left-color: #2563eb;
}

#toc-nav a.toc-h3 {
    padding-left: 22px;
    font-size: 0.75rem;
}

/* === SUBSCRIBE FORM STATES === */
.subscribe-form.loading .btn-text { display: none; }
.subscribe-form.loading .btn-loading { display: inline !important; }
.subscribe-form.success .btn-text { display: none; }
.subscribe-form.success .btn-success { display: inline !important; }
.subscribe-form.success button { background: #059669 !important; }

/* === SCROLL REVEAL === */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === LINE CLAMP === */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === GHOST CARD OVERRIDES === */
.kg-bookmark-card {
    background: #ffffff;
    border: 1px solid #e2e5ea;
    border-radius: 6px;
    overflow: hidden;
    margin: 2em 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.kg-bookmark-container {
    display: flex;
    text-decoration: none;
    color: inherit;
}

.kg-bookmark-content {
    flex: 1;
    padding: 1.25rem;
}

.kg-bookmark-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
}

.kg-bookmark-description {
    font-size: 0.8125rem;
    color: #64748b;
    margin-top: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kg-bookmark-metadata {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

.kg-bookmark-icon {
    width: 16px;
    height: 16px;
}

.kg-bookmark-thumbnail {
    width: 160px;
    flex-shrink: 0;
}

.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* === CALLOUT CARDS === */
.kg-callout-card {
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    margin: 2em 0;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.kg-callout-card-grey {
    background: #f8fafc;
    border: 1px solid #e2e5ea;
}

.kg-callout-card-blue {
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.kg-callout-card-red {
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.15);
}

.kg-callout-emoji {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* === RESPONSIVE === */
@media (max-width: 1280px) {
    .prose-light .kg-width-wide {
        margin-left: -2rem;
        margin-right: -2rem;
        max-width: calc(100% + 4rem);
    }
}

@media (max-width: 768px) {
    .prose-light .kg-width-wide {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }

    .kg-bookmark-container {
        flex-direction: column;
    }

    .kg-bookmark-thumbnail {
        width: 100%;
        height: 160px;
    }
}
