/* =========================================================
   MOBILE PINCH-TO-ZOOM STABILITY & TEXT-SHIFT LOCK
   - Stops mobile browser font auto-inflation / jitter
   - Locks text flow and word positions on zoom
   ========================================================= */

html, body {
    /* Mobile browsers ko text auto-resize karne se rokta hai */
    -webkit-text-size-adjust: 100% !important;
    -moz-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;

    /* Subpixel text rendering ko sharp aur stable rakhta hai */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;

    /* Horizontal layout shaking rokne ke liye */
    overflow-x: hidden;
    width: 100%;
}

/* Article ke content text ko rigid aur stationary lock karna */
.article-content,
.article-content p,
.article-content li,
.article-content h1,
.article-content h2,
.article-content h3,
.article-lead {
    /* Words ko zoom ke dauraan reflow / line jump karne se rokega */
    overflow-wrap: break-word;
    word-break: normal;
    text-align: left !important; /* Agar justify laga ho to use hata dein, justify hi shifting ka main reason hota hai */
    
    /* Hardware acceleration layer lock taaki rendering vibrate na kare */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Images & Media ko zoom ke waqt reflow hone se rokna */
img, figure, video, iframe {
    max-width: 100%;
    height: auto;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* =========================================================
   THE TEJBLOGS 2.0 — GLOBAL CORE STYLESHEET
   Contains: Global Tokens, Fixed Background Engine,
   Base Resets, Global Header & Footer (Desktop + Mobile)
========================================================= */

/* =========================================================
   01. GLOBAL VARIABLES & DESIGN TOKENS
========================================================= */
:root {
    --global-bg: #071014;
    --global-text: #f1f0e9;
    --global-muted: rgba(241, 240, 233, 0.58);
    --global-faint: rgba(241, 240, 233, 0.34);
    --global-line: rgba(255, 255, 255, 0.11);
    --global-soft: rgba(255, 255, 255, 0.045);
    --global-accent: #b9d6c7;
    --global-max-width: 1380px;

    /* Shared Aliases for Page Components */
    --background: var(--global-bg);
    --text: var(--global-text);
    --muted: rgba(241, 240, 233, 0.62);
    --faint: var(--global-faint);
    --line: var(--global-line);
    --soft: var(--global-soft);
    --accent: var(--global-accent);
    --max-width: var(--global-max-width);

    --global-display: "Manrope", sans-serif;
    --global-body: "DM Sans", sans-serif;
}

/* =========================================================
   02. BASE RESETS & SCROLL
========================================================= */
html {
    scroll-behavior: smooth;
    background: var(--global-bg);
}

body {
    margin: 0;
    background: var(--global-bg);
    color: var(--global-text);
    font-family: var(--global-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

main {
    position: relative;
    z-index: 1;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.site-header,
.site-footer,
.site-header *,
.site-footer * {
    box-sizing: border-box;
}

.site-header button {
    font: inherit;
}

/* =========================================================
   03. FIXED 2.0 BACKGROUND ENGINE (PURE FIX)
========================================================= */
body {
    background-color: transparent !important;
}

.site-background {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; /* -20 ko -1 kiya gaya taaki body ke piche na dabe */
    overflow: hidden;
    pointer-events: none;
    transform: translateZ(0);
}

.background-image {
    position: absolute;
    inset: 0;
    background-image: url("https://res.cloudinary.com/wag9ttac/image/upload/v1788846875/thetejblogs2.0.png");
    
    /* Yahan se image ko upar ya neeche khiskaya jata hai */
    background-position: center 50%; /* Default 50% hota hai, 20% ya 10% karne se image UPAR chali jayegi */
    
    background-size: cover;
    background-repeat: no-repeat;
    transform: scale(1.02);
    will-change: transform;
}

.background-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(7, 16, 20, 0.40) 0%,
        rgba(7, 16, 20, 0.60) 45%,
        rgba(7, 16, 20, 0.82) 100%
    );
}

.background-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at center,
        transparent 35%,
        rgba(0, 0, 0, 0.5) 100%
    );
}

.background-noise {
    position: absolute;
    inset: 0;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}
/* =========================================================
   04. HEADER
========================================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 78px;
    z-index: 1000;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease, -webkit-backdrop-filter 0.35s ease;
}

.site-header.is-scrolled {
    background: rgba(5, 12, 15, 0.72);
    border-bottom-color: var(--global-line);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.header-inner {
    width: min(calc(100% - 48px), var(--global-max-width));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
    border: 1px solid rgba(185, 214, 199, 0.45);
    background: rgba(255, 255, 255, 0.035);
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transform: scale(1.20);
    border-radius: 50%;
}

.site-brand:hover .brand-mark {
    background: rgba(185, 214, 199, 0.08);
    border-color: var(--global-accent);
    transform: translateY(-1px);
}

.brand-name {
    color: var(--global-text);
    font-family: var(--global-display);
    font-size: 15px;
    font-weight: 750;
    letter-spacing: -0.025em;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-left: auto;
}

.main-nav a {
    position: relative;
    color: var(--global-muted);
    font-family: var(--global-body);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 0.25s ease;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -7px;
    width: 100%;
    height: 1px;
    background: var(--global-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.main-nav a:hover {
    color: var(--global-text);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.main-nav a.active {
    color: var(--global-text);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
}

.trending-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--global-muted);
    font-family: var(--global-body);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.25s ease;
}

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

.live-dot {
    width: 6px;
    height: 6px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--global-accent);
    box-shadow: 0 0 0 4px rgba(185, 214, 199, 0.07);
    animation: globalPulse 2.5s ease-in-out infinite;
}

@keyframes globalPulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

.menu-button {
    width: 38px;
    height: 38px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    border: 1px solid var(--global-line);
    background: rgba(255, 255, 255, 0.025);
    color: var(--global-text);
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.menu-button:hover {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.20);
}

.menu-button span {
    display: block;
    width: 15px;
    height: 1px;
    background: currentColor;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-button.is-open span:first-child {
    transform: translateY(3px) rotate(45deg);
}

.menu-button.is-open span:last-child {
    transform: translateY(-3px) rotate(-45deg);
}

.mobile-nav {
    display: none;
}

/* =========================================================
   05. FOOTER
========================================================= */
.site-footer {
    position: relative;
    width: 100%;
    margin-top: 0;
    border-top: 1px solid var(--global-line);
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.018),
        rgba(255, 255, 255, 0.008)
    );
}

.footer-inner {
    width: min(calc(100% - 48px), var(--global-max-width));
    margin: 0 auto;
    padding: 72px 0 30px;
}

.footer-top {
    display: grid;
    grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(130px, 0.7fr));
    gap: 60px;
    padding-bottom: 64px;
    border-bottom: 1px solid var(--global-line);
}

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

.footer-brand-name {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.footer-brand-name .brand-mark {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
}

.footer-brand-name .brand-mark img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transform: scale(1.20);
    border-radius: 50%;
}

.footer-brand-name span:last-child {
    color: var(--global-text);
    font-family: var(--global-display);
    font-size: 16px;
    font-weight: 750;
}

.footer-description {
    max-width: 360px;
    margin: 0;
    color: var(--global-muted);
    font-family: var(--global-body);
    font-size: 13px;
    line-height: 1.8;
}

.footer-column h3 {
    margin: 0 0 20px;
    color: var(--global-text);
    font-family: var(--global-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.footer-column ul {
    display: flex;
    flex-direction: column;
    gap: 11px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-column a {
    color: var(--global-muted);
    font-family: var(--global-body);
    font-size: 13px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-column a:hover {
    color: var(--global-text);
    transform: translateX(3px);
}

.footer-bottom {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-copy {
    margin: 0;
    color: var(--global-faint);
    font-family: var(--global-body);
    font-size: 11px;
    line-height: 1.6;
}

.footer-meta {
    display: flex;
    align-items: center;
    gap: 22px;
}

.footer-meta a {
    color: var(--global-faint);
    font-family: var(--global-body);
    font-size: 11px;
    transition: color 0.2s ease;
}

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

/* =========================================================
   06. GLOBAL RESPONSIVE RULES
========================================================= */
@media (max-width: 950px) {
    .header-inner,
    .footer-inner {
        width: min(calc(100% - 36px), var(--global-max-width));
    }

    .main-nav {
        gap: 20px;
    }

    .trending-link {
        display: none;
    }

    .footer-top {
        grid-template-columns: 1.3fr repeat(2, 1fr);
        gap: 45px;
    }
}

@media (max-width: 700px) {
    .site-header {
        height: 68px;
    }

    .header-inner {
        width: calc(100% - 28px);
    }

    .brand-name {
        font-size: 14px;
    }

    .brand-mark {
        width: 32px;
        height: 32px;
    }

    .main-nav {
        display: none;
    }

    .header-right {
        margin-left: auto;
    }

    .menu-button {
        display: flex;
    }

    .mobile-nav {
        position: absolute;
        top: 68px;
        left: 14px;
        right: 14px;
        display: flex;
        flex-direction: column;
        padding: 10px;
        background: rgba(7, 16, 20, 0.96);
        border: 1px solid var(--global-line);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    }

    .mobile-nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .mobile-nav a {
        padding: 15px 14px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        color: var(--global-muted);
        font-family: var(--global-body);
        font-size: 13px;
        transition: color 0.2s ease, background 0.2s ease;
    }

    .mobile-nav a:last-child {
        border-bottom: 0;
    }

    .mobile-nav a:hover {
        color: var(--global-text);
        background: rgba(255, 255, 255, 0.025);
    }

    .footer-inner {
        width: calc(100% - 28px);
        padding: 55px 0 20px;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 42px 28px;
        padding-bottom: 45px;
    }

    .footer-brand {
        grid-column: 1 / -1;
        max-width: none;
    }

    .footer-description {
        max-width: 100%;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        padding: 24px 0;
    }

    .footer-meta {
        gap: 18px;
    }
}

@media (max-width: 430px) {
    .footer-top {
        grid-template-columns: 1fr;
    }

    .footer-column {
        padding-top: 4px;
    }

    .footer-meta {
        flex-wrap: wrap;
        row-gap: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header,
    .main-nav a::after,
    .menu-button,
    .menu-button span,
    .mobile-nav,
    .footer-column a,
    .mobile-nav a {
        transition: none !important;
    }

    .live-dot {
        animation: none !important;
    }
}