@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Bricolage+Grotesque:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #ffffff;
    --bg-soft: #f7f7f5;
    --bg-card: #ffffff;
    --text: #0d0d0c;
    --text-muted: #6a6a66;
    --text-faint: #a5a5a0;
    --text-hero: rgba(255, 255, 255, 0.65);
    --accent: #22c55e;
    --border: #e6e6e2;
    --border-strong: #ccccc8;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --max: 1160px;
    --font-display: 'Bricolage Grotesque', sans-serif;
    --font: 'Inter', sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --t-fast: 0.18s;
    --t-mid: 0.32s;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--accent);
    color: #fff;
    padding: .75rem 1rem;
    z-index: 999;
    border-radius: 8px;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

.wrap {
    width: min(100% - 2.5rem, var(--max));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 8, 8, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .9rem 0;
}

.header-end {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-left: auto;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -.02em;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.logo-mark img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    display: block;
}

.logo-text {
    color: rgba(255, 255, 255, .92);
    letter-spacing: -.03em;
}

.nav {
    position: relative;
}

.nav-toggle {
    display: none;
    border: 1px solid rgba(255, 255, 255, .13);
    background: transparent;
    color: #fff;
    border-radius: 8px;
    padding: .58rem .88rem;
    font: inherit;
    font-size: .84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t-fast) ease;
}

.nav-toggle:hover {
    border-color: rgba(34, 197, 94, .35);
    background: rgba(34, 197, 94, .08);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: .1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list>li>a {
    text-decoration: none;
    color: rgba(255, 255, 255, .52);
    font-size: .87rem;
    font-weight: 500;
    padding: .44rem .75rem;
    border-radius: 6px;
    transition: color var(--t-fast) ease, background var(--t-fast) ease;
    letter-spacing: -.01em;
}

.nav-list>li>a:hover,
.nav-list>li>a:focus-visible {
    color: #fff;
    background: rgba(34, 197, 94, .12);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, .52);
    font: inherit;
    font-size: .87rem;
    font-weight: 500;
    padding: .44rem .75rem;
    border-radius: 6px;
    transition: color var(--t-fast) ease, background var(--t-fast) ease;
}

.nav-dropdown-trigger:hover,
.nav-dropdown-trigger:focus-visible {
    color: #fff;
    background: rgba(34, 197, 94, .12);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + .8rem);
    left: 0;
    width: 260px;
    padding: .4rem;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    background: rgba(17, 17, 16, .96);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .03);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity var(--t-fast) ease, transform var(--t-fast) ease, visibility var(--t-fast) ease;
    z-index: 50;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: #22c55e;
    transition: color var(--t-fast) ease;
}

.resources-dropdown .nav-dropdown-menu {
    width: 260px;
    padding: .4rem;
    gap: .15rem;
}

.resources-dropdown .nav-dropdown-menu a {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    gap: .9rem;
    padding: .85rem .9rem;
    border-radius: 10px;
    text-decoration: none;
    transition: background var(--t-fast) ease;
    transform: none;
}

.resources-dropdown .nav-dropdown-menu a:hover {
    background: rgba(34, 197, 94, .08);
    transform: none;
}

.resources-dropdown .nav-dropdown-menu a:hover .menu-icon {
    background: none;
    color: #4ade80;
}

.resources-dropdown .menu-content {
    display: flex;
    flex-direction: column;
    gap: .18rem;
    flex: 1;
    min-width: 0;
}

.resources-dropdown .menu-icon {
    align-self: center;
    flex-shrink: 0;
    margin-top: 0;
    color: #22c55e !important;
}

.resources-dropdown .menu-content strong {
    display: block;
    color: #fff;
    font-size: .88rem;
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.3;
}

.resources-dropdown .menu-content .menu-description {
    color: rgba(255, 255, 255, .45);
    font-size: .78rem;
    line-height: 1.45;
    font-weight: 400;
}

.lang-dropdown {
    position: relative;
}

.dropdown-trigger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: .2rem;
}

.lang-btn {
    border: 1px solid rgba(255, 255, 255, .13);
    background: transparent;
    color: rgba(255, 255, 255, .52);
    border-radius: 999px;
    min-height: 2.25rem;
    padding: .42rem .82rem;
    font: inherit;
    font-size: .76rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t-fast) ease;
    letter-spacing: .02em;
}

.lang-btn:hover,
.lang-btn:focus-visible {
    color: #fff;
    border-color: rgba(34, 197, 94, .35);
    background: rgba(34, 197, 94, .08);
}

.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + .65rem);
    right: 0;
    width: 178px;
    background: #111110;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 14px;
    padding: .38rem;
    display: none;
    flex-direction: column;
    gap: .2rem;
    box-shadow: 0 24px 72px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .03);
}

.lang-dropdown.is-open .lang-dropdown-menu {
    display: flex;
}

.lang-dropdown-menu .lang-btn {
    width: 100%;
    justify-content: flex-start;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, .52);
    padding: .6rem .88rem;
    font-size: .82rem;
    letter-spacing: 0;
    text-align: left;
}

.lang-dropdown-menu .lang-btn:hover {
    background: rgba(34, 197, 94, .1);
    color: #fff;
}

.login-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    color: rgba(255, 255, 255, .45);
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    text-decoration: none;
    transition: color var(--t-fast) ease, border-color var(--t-fast) ease, background var(--t-fast) ease;
}

.login-link:hover,
.login-link:focus-visible {
    color: var(--accent);
    border-color: rgba(34, 197, 94, .4);
    background: rgba(34, 197, 94, .08);
}

.article-hero {
    background: #080808;
    padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem);
    position: relative;
    overflow: hidden;
}

.article-hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 0%, transparent 70%);
    pointer-events: none;
}

.article-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.article-hero-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    top: 50%;
    right: -150px;
    transform: translateY(-50%);
    background: radial-gradient(circle, rgba(34, 197, 94, .08) 0%, transparent 60%);
    pointer-events: none;
}

.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.5rem;
    font-size: .8rem;
    color: rgba(255, 255, 255, .4);
}

.article-breadcrumb a {
    color: rgba(255, 255, 255, .4);
    text-decoration: none;
    transition: color var(--t-fast) ease;
}

.article-breadcrumb a:hover {
    color: var(--accent);
}

.article-breadcrumb span {
    color: rgba(255, 255, 255, .2);
}

.article-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .7rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    width: fit-content;
    margin-bottom: 1rem;
}

.badge-security {
    background: rgba(34, 197, 94, .1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, .25);
}

.badge-privacy {
    background: rgba(168, 85, 247, .1);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, .25);
}

.badge-guide {
    background: rgba(59, 130, 246, .1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, .25);
}

.badge-news {
    background: rgba(245, 158, 11, .1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, .25);
}

.badge-tech {
    background: rgba(20, 184, 166, .1);
    color: #2dd4bf;
    border: 1px solid rgba(20, 184, 166, .25);
}

.article-hero-title {
    margin: 0 0 1.2rem;
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.05;
    letter-spacing: -.04em;
    font-weight: 800;
    color: #fff;
}

.article-hero-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: rgba(255, 255, 255, .4);
    font-size: .83rem;
    flex-wrap: wrap;
}

.article-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.article-section {
    padding: clamp(3rem, 6vw, 5rem) 0;
}

.article-layout {
    display: grid;
    gap: 2.5rem;
}

@media(min-width:900px) {
    .article-layout {
        grid-template-columns: 1fr 300px;
        gap: 3.5rem;
    }
}

.article-body {
    min-width: 0;
}

.article-cover {
    width: 100%;
    aspect-ratio: 16/7;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 2.5rem;
}

.article-cover .cover-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(34, 197, 94, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 197, 94, .06) 1px, transparent 1px);
    background-size: 28px 28px;
}

.article-cover .cover-icon {
    position: relative;
    z-index: 1;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
}

.article-content h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.15;
    margin: 2.5rem 0 1rem;
    color: var(--text);
}

.article-content h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 2rem 0 .75rem;
    color: var(--text);
}

.article-content p {
    margin: 0 0 1.4rem;
}

.article-content ul,
.article-content ol {
    margin: 0 0 1.4rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: .5rem;
}

.article-content strong {
    font-weight: 700;
    color: var(--text);
}

.article-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-content blockquote {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    border-left: 3px solid var(--accent);
    background: rgba(34, 197, 94, .05);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    color: var(--text-muted);
    font-style: italic;
}

.article-content blockquote p {
    margin: 0;
}

.article-content .callout {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.article-content .callout-icon {
    color: var(--accent);
    flex-shrink: 0;
    margin-top: .1rem;
}

.article-content .callout p {
    margin: 0;
    font-size: .95rem;
    color: var(--text-muted);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.article-tag {
    padding: .3rem .75rem;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--t-fast) ease;
}

.article-tag:hover {
    border-color: rgba(34, 197, 94, .35);
    color: var(--accent);
    background: rgba(34, 197, 94, .06);
}

.related-section {
    padding: 0 0 clamp(3rem, 6vw, 5rem);
}

.related-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -.03em;
    margin: 0 0 1.5rem;
}

.related-grid {
    display: grid;
    gap: 1.25rem;
}

@media(min-width:600px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(min-width:900px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.related-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: box-shadow var(--t-mid) var(--ease), transform var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease);
    position: relative;
}

.related-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 2rem;
    right: 2rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, #22c55e, transparent);
    opacity: 0;
    transition: opacity .25s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .07);
    border-color: rgba(34, 197, 94, .22);
}

.related-card:hover::before {
    opacity: 1;
}

.related-card-img {
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.related-card-img .img-pattern {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
    background-size: 22px 22px;
}

.related-card-img-icon {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-card-body {
    padding: 1.1rem 1.25rem 1.3rem;
    flex: 1;
}

.related-card-badge {
    display: inline-flex;
    align-items: center;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .6rem;
}

.related-card-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.02em;
    color: var(--text);
}

.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.sidebar-card-title {
    margin: 0 0 1.1rem;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--text);
}

.popular-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.popular-item {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: .9rem 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: color var(--t-fast) ease;
}

.popular-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-item:hover .popular-title {
    color: var(--accent);
}

.popular-num {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--border-strong);
    line-height: 1;
    flex-shrink: 0;
    min-width: 28px;
}

.popular-title {
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text);
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.tag-pill {
    padding: .3rem .75rem;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text-muted);
    transition: all var(--t-fast) ease;
    text-decoration: none;
}

.tag-pill:hover {
    border-color: rgba(34, 197, 94, .35);
    color: var(--accent);
    background: rgba(34, 197, 94, .06);
}

.toc {
    position: sticky;
    top: calc(61px + 1.5rem);
}

.toc-title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-faint);
    margin: 0 0 .85rem;
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.toc-link {
    display: block;
    padding: .4rem .75rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: .83rem;
    color: var(--text-muted);
    line-height: 1.35;
    border-left: 2px solid transparent;
    transition: color var(--t-fast) ease, border-color var(--t-fast) ease, background var(--t-fast) ease;
}

.toc-link:hover {
    color: var(--accent);
    background: rgba(34, 197, 94, .06);
    border-left-color: var(--accent);
}

.toc-link.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: rgba(34, 197, 94, .06);
}

.site-footer {
    padding: 2.75rem 0;
    border-top: 1px solid rgba(255, 255, 255, .1);
    background: #080808;
    text-align: center;
}

.footer-inner {
    display: flex;
    flex-direction: column;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem 2.5rem;
}

.footer-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, .6);
    font-size: .85rem;
    font-weight: 500;
    transition: color var(--t-fast) ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-link {
    color: rgba(255, 255, 255, .6);
    transition: color var(--t-fast) ease, transform var(--t-fast) ease;
}

.social-link:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
}

.footer-inner p {
    margin: 0;
    color: rgba(255, 255, 255, .4);
    font-size: .84rem;
}

@media(max-width:640px) {
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-list {
        display: none;
        position: absolute;
        top: calc(100% + .5rem);
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        min-width: 180px;
        padding: .4rem;
        border-radius: 14px;
        background: #111110;
        border: 1px solid rgba(255, 255, 255, .09);
        box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
    }

    .nav-list.is-open {
        display: flex;
    }

    .nav-list a {
        display: flex;
        align-items: center;
        min-height: 2.6rem;
        padding: .65rem .9rem;
        border-radius: 8px;
    }
}