/* ===== BLOG ARTICLE STYLES ===== */
/* Extends common.css - only article-specific styles here */

/* Override body for article readability */
body {
    line-height: 1.8;
    font-size: 17px;
}

/* ===== ARTICLE LAYOUT ===== */
article {
    max-width: 900px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.article-header {
    opacity: 0;
    animation: header-reveal 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.2s;
}

@keyframes header-reveal {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.article-meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-accent);
    margin-bottom: 1.25rem;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: meta-fade 0.6s ease forwards;
}

.article-meta span:nth-child(1) { animation-delay: 0.4s; }
.article-meta span:nth-child(2) { animation-delay: 0.5s; }
.article-meta span::before { content: '//'; color: var(--color-text-muted); }

@keyframes meta-fade {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== HEADINGS ===== */
h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.75rem;
    letter-spacing: -0.03em;
    opacity: 0;
    animation: title-reveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.3s;
}

@keyframes title-reveal {
    from { opacity: 0; transform: translateY(30px); filter: blur(10px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

h1 .accent {
    color: var(--color-accent);
    position: relative;
    display: inline-block;
}

h1 .accent::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--color-accent);
    transform: scaleX(0);
    animation: underline-grow 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 1s;
}

@keyframes underline-grow { to { transform: scaleX(1); } }

.article-intro {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    margin-bottom: 3.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--color-border);
    line-height: 1.9;
    opacity: 0;
    animation: intro-reveal 0.8s ease forwards;
    animation-delay: 0.6s;
}

@keyframes intro-reveal {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.content-section {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.content-section.visible { opacity: 1; transform: translateY(0); }

h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    margin: 4rem 0 1.5rem;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

h2::before {
    content: '##';
    color: var(--color-accent);
    font-family: var(--font-mono);
    font-size: 1rem;
    opacity: 0.7;
}

h3 { font-size: 1.2rem; font-weight: 600; margin: 2.5rem 0 1rem; color: var(--color-text); }
p { color: var(--color-text-secondary); margin-bottom: 1.5rem; }
strong { color: var(--color-text); font-weight: 600; }

/* ===== LISTS (article content only) ===== */
article ul, article ol { margin: 1.5rem 0; padding-left: 0; list-style: none; }

article li {
    color: var(--color-text-secondary);
    padding: 0.6rem 0;
    padding-left: 2rem;
    position: relative;
    transition: all 0.3s ease;
}

article li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-family: var(--font-mono);
    font-weight: 600;
    transition: transform 0.3s ease;
}

article li:hover { color: var(--color-text); }
article li:hover::before { transform: translateX(4px); }

article ol { counter-reset: item; }
article ol li::before { content: counter(item) '.'; counter-increment: item; font-weight: 500; }

/* ===== CODE BLOCKS ===== */
pre {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin: 2rem 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.code-dots { display: flex; gap: 6px; }
.code-dots span { width: 10px; height: 10px; border-radius: 50%; }
.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:nth-child(3) { background: #28c840; }

.code-filename { font-family: var(--font-mono); font-size: 0.75rem; color: var(--color-text-muted); }

pre code {
    display: block;
    padding: 0.5rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
    overflow-x: auto;
    color: var(--color-text-secondary);
}

/* ===== SYNTAX HIGHLIGHTING ===== */
.comment { color: var(--color-text-muted); }
.keyword { color: var(--color-accent); }
.string { color: #fbbf24; }
.function { color: #60a5fa; }
.variable { color: #f472b6; }
.type, .class { color: #c084fc; }
.method { color: var(--color-accent); }
.attribute { color: #c084fc; }

/* ===== INLINE CODE ===== */
code:not(pre code) {
    background: var(--color-surface);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85em;
    color: var(--color-accent);
}

/* ===== CONCEPT CARD ===== */
.concept-card {
    background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-elevated) 100%);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 2rem;
    margin: 2.5rem 0;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.concept-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent), transparent);
}

.concept-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, var(--color-accent-subtle), transparent 50%);
    pointer-events: none;
}

.concept-card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px var(--shadow-color), 0 0 40px var(--color-accent-subtle);
}

.concept-card h3 {
    margin-top: 0;
    color: var(--color-accent);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.concept-card p:last-child { margin-bottom: 0; }

/* ===== WARNING BOX ===== */
.warning-box {
    background: rgba(255, 107, 53, 0.08);
    border: 1px solid rgba(255, 107, 53, 0.25);
    border-radius: 12px;
    padding: 1.75rem;
    margin: 2.5rem 0;
    position: relative;
    overflow: hidden;
}

.warning-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(-45deg, transparent, transparent 10px, rgba(255, 107, 53, 0.03) 10px, rgba(255, 107, 53, 0.03) 20px);
    pointer-events: none;
}

.warning-box h4 {
    color: #ff6b35;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.warning-box h4::before { content: '[!]'; font-weight: 700; }
.warning-box p { margin: 0; position: relative; z-index: 1; }

/* ===== INFO BOX ===== */
.info-box {
    background: rgba(0, 180, 216, 0.08);
    border: 1px solid rgba(0, 180, 216, 0.25);
    border-radius: 12px;
    padding: 1.75rem;
    margin: 2.5rem 0;
}

.info-box h4 {
    color: #00b4d8;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-box h4::before { content: '[i]'; font-weight: 700; }
.info-box p { margin: 0; }

/* ===== HIGHLIGHT BOX ===== */
.highlight-box {
    background: var(--color-accent-subtle);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    padding: 2rem;
    margin: 3rem 0;
    position: relative;
}

.highlight-box::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 13px;
    padding: 1px;
    background: linear-gradient(135deg, var(--color-accent), transparent 50%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.highlight-box p { color: var(--color-text); margin: 0; font-size: 1.05rem; line-height: 1.8; }

/* ===== ARTICLE CTA ===== */
.cta-section.content-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
    background: transparent;
    border: none;
}

.cta-section.content-section::before {
    display: none;
}

.cta-content {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 0 2rem 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

.cta-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 200px;
    background: radial-gradient(ellipse, var(--color-accent-glow), transparent 70%);
    pointer-events: none;
}

.cta-content h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    display: block;
    text-align: center;
}

.cta-content h2::before { display: none; }

.cta-content p {
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    font-size: 1.05rem;
    position: relative;
    z-index: 1;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--color-accent);
    color: var(--color-bg);
    position: relative;
    z-index: 1;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px var(--color-accent-glow);
}

.btn svg { transition: transform 0.3s ease; }
.btn:hover svg { transform: translateX(4px); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    article { padding: 3rem 1.5rem; }
    .concept-card { padding: 1.5rem; }
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.35rem; }
    pre code { font-size: 0.75rem; padding: 1rem; }
    .cta-content { padding: 0 1.5rem 2rem 1.5rem; }
}

/* ===== SELECTION & SCROLLBAR ===== */
::selection { background: var(--color-accent); color: var(--color-bg); }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-border-hover); }
