/* ==========================================================================
   Research Subdomain Styles — research.shambhavithakur.com
   All selectors scoped to body.research-body — zero bleed to main site.
   Research is always dark. Toggle hidden. No light mode.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tokens — scoped to body.research-body, never :root
   -------------------------------------------------------------------------- */
body.research-body {
    --r-bg:         #0D0D0D;
    --r-bg-card:    #151515;
    --r-bg-alt:     #1a1a1a;
    --r-text:       #F0EDE4;
    --r-text-sec:   #b0a99e;
    --r-text-muted: #888888;
    --r-accent:     #C0392B;
    --r-accent-hov: #a93226;
    --r-yellow:     #F9E04B;
    --r-border:     #2a2a2a;
    background: var(--r-bg) !important;
    color: var(--r-text) !important;
}

/* --------------------------------------------------------------------------
   Chrome — nav, mobile nav, footer
   Always dark. !important overrides dark-mode.css which fires on html.dark.
   -------------------------------------------------------------------------- */
body.research-body .dark-mode-toggle      { display: none !important; }

body.research-body .header                { background: var(--r-bg) !important; border-bottom: 1px solid var(--r-border) !important; }
body.research-body .nav__brand            { color: var(--r-text) !important; }
body.research-body .nav__brand:hover      { background: var(--r-bg-alt) !important; }
body.research-body .nav-link              { color: var(--r-text-sec) !important; }
body.research-body .nav-link:hover,
body.research-body .nav-link--active      { color: var(--r-yellow) !important; background: transparent !important; }
body.research-body .nav-link--highlight   { background: var(--r-accent) !important; color: #fff !important; padding: 0.35rem 0.85rem; border-radius: 4px; font-weight: 600; }
body.research-body .nav-link--highlight:hover { background: var(--r-accent-hov) !important; }

body.research-body .mobile-menu-btn       { border-color: var(--r-border) !important; color: var(--r-text-sec) !important; }
body.research-body .mobile-menu-btn:hover { background: var(--r-bg-alt) !important; }
body.research-body .mobile-nav            { background: #111 !important; border-color: var(--r-border) !important; box-shadow: 0 10px 40px rgba(0,0,0,0.6) !important; }
body.research-body .mobile-nav-links .nav-link          { color: var(--r-text-sec) !important; border-bottom: 1px solid var(--r-border) !important; }
body.research-body .mobile-nav-links .nav-link:hover    { color: var(--r-yellow) !important; background: transparent !important; }
body.research-body .mobile-nav-links .nav-link--highlight { color: #fff !important; }

body.research-body .footer                { background: var(--r-bg) !important; border-top: 1px solid var(--r-border) !important; color: var(--r-text-muted) !important; }
body.research-body .footer__link          { color: var(--r-text-muted) !important; }
body.research-body .footer__link:hover    { color: var(--r-yellow) !important; }

/* --------------------------------------------------------------------------
   Research Header (listing page)
   -------------------------------------------------------------------------- */
.research-header {
    padding: 4rem 0 2rem;
    text-align: center;
    border-bottom: 1px solid var(--r-border);
    background: var(--r-bg);
}

.research-header__eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--r-accent);
    margin-bottom: 1rem;
}

.research-header__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--r-text);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.research-header__subtitle {
    color: var(--r-text-sec);
    font-size: 1.125rem;
    max-width: 560px;
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Research Grid
   -------------------------------------------------------------------------- */
.research-listing {
    padding: 2.5rem 0 5rem;
    background: var(--r-bg);
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
}

.research-grid--small {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* --------------------------------------------------------------------------
   Research Card
   -------------------------------------------------------------------------- */
.research-card {
    background: var(--r-bg-card);
    border: 1px solid var(--r-border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.research-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(192, 57, 43, 0.15);
    border-color: var(--r-accent);
}

.research-card__image-wrapper {
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
}

.research-card__image-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(13,13,13,0.7), transparent);
}

.research-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.research-card:hover .research-card__image { transform: scale(1.04); }

.research-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.research-card__content  { padding: 1.25rem 1.5rem 1.5rem; }

.research-card__category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--r-accent);
    background: rgba(192, 57, 43, 0.12);
    padding: 0.2em 0.6em;
    border-radius: 3px;
    margin-bottom: 0.5rem;
}

.research-card__title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--r-text);
    margin-bottom: 0.6rem;
}

.research-card__title a          { color: inherit; text-decoration: none; }
.research-card__title a:hover    { color: var(--r-yellow); }

.research-card__excerpt {
    color: var(--r-text-sec);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.research-card__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--r-text-muted);
}

.research-card__read-time::before { content: "•"; margin-right: 1rem; }

.research-card--small .research-card__content { padding: 0.875rem 1rem; }
.research-card--small .research-card__title   { font-size: 0.95rem; margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */
.research-empty {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--r-text-muted);
}

.research-empty a { color: var(--r-accent); }

/* --------------------------------------------------------------------------
   Research CTA (listing page)
   -------------------------------------------------------------------------- */
.research-cta {
    padding: 4rem 0;
    background: var(--r-bg-alt);
    border-top: 1px solid var(--r-border);
}

.research-cta__content {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.research-cta__content h2 { font-size: 1.5rem; color: var(--r-text); margin-bottom: 0.5rem; }
.research-cta__content p  { color: var(--r-text-sec); margin-bottom: 1.5rem; }

.research-cta__button {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--r-accent);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    border-radius: 6px;
    letter-spacing: 0.02em;
    transition: background 0.2s ease;
}

.research-cta__button:hover { background: var(--r-accent-hov); }

/* --------------------------------------------------------------------------
   Research Post
   -------------------------------------------------------------------------- */
.research-post          { background: var(--r-bg); }

.research-post__header {
    padding: 3rem 0 2rem;
    background: var(--r-bg);
    border-bottom: 1px solid var(--r-border);
}

.research-post__back {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--r-text-muted);
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: color 0.2s;
}

.research-post__back:hover { color: var(--r-yellow); }

.research-post__category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--r-accent);
    background: rgba(192, 57, 43, 0.12);
    padding: 0.2em 0.7em;
    border-radius: 3px;
    margin-bottom: 1rem;
}

.research-post__title {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--r-text);
    margin-bottom: 1rem;
}

.research-post__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--r-text-muted);
}

.research-post__hero              { margin-bottom: 0; }
.research-post__hero-image        { width: 100%; max-height: 500px; object-fit: cover; display: block; }
.research-post__hero::after       { content: ''; display: block; height: 4px; background: var(--r-accent); }

.research-post__body              { padding: 2.5rem 0; background: var(--r-bg); }

.research-post__body h2 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--r-text);
    margin: 2.5rem 0 1rem;
    border-left: 4px solid var(--r-accent);
    padding-left: 0.875rem;
}

.research-post__body h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--r-text);
    margin: 2rem 0 0.75rem;
}

.research-post__body p {
    font-size: 1.0625rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--r-text-sec);
}

.research-post__body ul,
.research-post__body ol  { margin-bottom: 1.5rem; padding-left: 1.5rem; }

.research-post__body li {
    font-size: 1.0625rem;
    line-height: 1.75;
    margin-bottom: 0.5rem;
    color: var(--r-text-sec);
}

.research-post__body blockquote {
    border-left: 4px solid var(--r-yellow);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: rgba(249, 224, 75, 0.05);
    border-radius: 0 6px 6px 0;
}

.research-post__body blockquote p { font-style: italic; color: var(--r-text); margin: 0; }
.research-post__body strong        { color: var(--r-text); font-weight: 700; }

.research-post__body a {
    color: var(--r-yellow);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.research-post__body a:hover { color: var(--r-accent); }

.research-post__body code {
    background: var(--r-bg-alt);
    color: var(--r-yellow);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}

.research-post__body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1.5rem 0;
    border: 1px solid var(--r-border);
}

/* Stat callout */
.research-stat {
    background: var(--r-bg-alt);
    border: 1px solid var(--r-border);
    border-left: 4px solid var(--r-accent);
    border-radius: 6px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.research-stat__number { font-size: 2.5rem; font-weight: 900; color: var(--r-yellow); display: block; }
.research-stat__label  { font-size: 0.9rem; color: var(--r-text-muted); margin-top: 0.25rem; }

/* In-post CTA box */
.research-post__cta     { padding: 2rem 0; background: var(--r-bg); }

.research-post__cta-box {
    background: var(--r-bg-alt);
    border: 1px solid var(--r-accent);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
}

.research-post__cta-box h3    { font-size: 1.2rem; color: var(--r-text); margin-bottom: 1rem; }

.research-post__cta-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--r-accent);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.research-post__cta-button:hover { background: var(--r-accent-hov); }

/* Author footer */
.research-post__footer { padding: 2.5rem 0; border-top: 1px solid var(--r-border); background: var(--r-bg); }

.research-post__author-info strong { display: block; font-size: 1.1rem; color: var(--r-text); margin-bottom: 0.4rem; }
.research-post__author-info p      { color: var(--r-text-muted); font-size: 0.9rem; line-height: 1.6; margin: 0; }

/* --------------------------------------------------------------------------
   Related Posts
   -------------------------------------------------------------------------- */
.research-related        { padding: 3rem 0 4rem; background: var(--r-bg-alt); border-top: 1px solid var(--r-border); }
.research-related__title { font-size: 1.4rem; font-weight: 700; color: var(--r-text); margin-bottom: 1.5rem; }

/* --------------------------------------------------------------------------
   Figure captions
   -------------------------------------------------------------------------- */
.research-post__body figure     { margin: 0 0 2rem 0; }
.research-post__body figure img { width: 100%; border-radius: 4px; display: block; }

.research-post__body figcaption,
.research-figure figcaption {
    margin-top: 0.6rem;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--r-text-muted);
    font-style: italic;
    border-left: 3px solid var(--r-accent);
    padding-left: 0.75rem;
}

.research-figure--hero            { margin: 0 0 2rem 0; }
.research-figure--hero figcaption { font-size: 0.85rem; color: var(--r-text-sec); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .research-header__title    { font-size: 1.9rem; }
    .research-post__title      { font-size: 1.75rem; }
    .research-grid             { grid-template-columns: 1fr; }
    .research-post__hero-image { border-radius: 0; }
    .research-stat__number     { font-size: 2rem; }
}
