:root {
    --bg: #080811;
    --bg-soft: #11111f;
    --surface: rgba(255,255,255,.055);
    --surface-strong: rgba(255,255,255,.075);
    --border: rgba(255,255,255,.10);
    --text: #ffffff;
    --muted: #a8a8bd;
    --muted-2: #77778f;
    --accent: #756cff;
    --accent-2: #4c45d8;
    --accent-3: #a9a5ff;
    --shadow: 0 24px 80px rgba(0,0,0,.32);
    --radius: 18px;
    --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 50% -10%, #24244a 0%, #11111f 32%, #080811 70%);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .18;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, black, transparent 75%);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; }

.container {
    width: min(calc(100% - 40px), var(--container));
    margin-inline: auto;
}

.site-glow {
    position: fixed;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    filter: blur(130px);
    pointer-events: none;
    opacity: .13;
    z-index: -1;
}
.site-glow--one { top: -240px; left: 18%; background: #5c54ff; }
.site-glow--two { top: 42%; right: -280px; background: #4c45d8; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(8,8,17,.78);
    border-bottom: 1px solid rgba(255,255,255,.06);
    backdrop-filter: blur(18px);
}
.nav-wrap {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
}
.brand-mark, .error-logo {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 13px;
    background: linear-gradient(145deg, var(--accent), var(--accent-2));
    box-shadow: 0 12px 34px rgba(80,70,255,.30), inset 0 1px 1px rgba(255,255,255,.25);
    font-size: 20px;
    font-weight: 800;
}
.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.brand-text strong { font-size: 18px; letter-spacing: -.02em; }
.brand-text small { margin-top: 4px; color: var(--muted-2); font-size: 10px; white-space: nowrap; }

.main-nav { display: flex; align-items: center; gap: 25px; }
.main-nav a {
    color: #c9c9d8;
    font-size: 14px;
    font-weight: 600;
    transition: color .2s ease;
}
.main-nav a:hover { color: #fff; }

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: #fff;
    padding: 8px;
}
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px 0;
    background: #fff;
    border-radius: 10px;
}

.hero {
    padding: 105px 0 90px;
    position: relative;
}
.hero-inner { max-width: 940px; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 13px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.045);
    border-radius: 999px;
    color: #c9c9d8;
    font-size: 12px;
    font-weight: 600;
}
.pulse-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #8e88ff;
    box-shadow: 0 0 0 5px rgba(117,108,255,.12), 0 0 20px #756cff;
}
.hero h1 {
    max-width: 900px;
    margin: 22px 0 20px;
    font-size: clamp(48px, 8vw, 92px);
    line-height: .98;
    letter-spacing: -.055em;
    font-weight: 800;
}
.hero h1 span {
    background: linear-gradient(135deg, #fff 10%, #a9a5ff 50%, #6861ff 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: clamp(17px, 2vw, 20px);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
    background: linear-gradient(135deg, #6d65ff, #5048df);
    box-shadow: 0 12px 32px rgba(80,70,255,.30);
}
.btn-primary:hover { box-shadow: 0 17px 42px rgba(80,70,255,.42); }
.btn-secondary {
    color: #c9c9d8;
    background: rgba(255,255,255,.055);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: rgba(255,255,255,.09); }

.content-section { padding: 30px 0 90px; }
.section-heading {
    display: flex;
    align-items: end;
    gap: 25px;
    margin-bottom: 28px;
}
.eyebrow {
    display: block;
    color: #8e88ff;
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: 11px;
    font-weight: 800;
}
.section-heading h2, .about-grid h2 {
    margin: 4px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -.04em;
}
.section-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); margin-bottom: 9px; }

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.post-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,.028));
    box-shadow: 0 14px 50px rgba(0,0,0,.18);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.post-card:hover {
    transform: translateY(-5px);
    border-color: rgba(117,108,255,.40);
    box-shadow: 0 24px 70px rgba(0,0,0,.28), 0 0 0 1px rgba(117,108,255,.08);
}
.post-card__image { display: block; aspect-ratio: 16/9; overflow: hidden; background: #11111f; }
.post-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card__image img { transform: scale(1.035); }
.post-card__body { padding: 23px; }
.post-card__meta {
    display: flex; flex-wrap: wrap; gap: 8px;
    color: var(--muted-2);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
}
.meta-dot { color: #6861ff; }
.post-card__title {
    margin: 10px 0 10px;
    font-size: 21px;
    line-height: 1.25;
    letter-spacing: -.025em;
}
.post-card__title a:hover { color: #aaa6ff; }
.post-card__excerpt { color: var(--muted); margin: 0; font-size: 14px; line-height: 1.65; }
.post-card__footer {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.read-more { color: #9d98ff; font-size: 13px; font-weight: 800; }
.read-more span { transition: transform .2s ease; display: inline-block; }
.read-more:hover span { transform: translateX(3px); }
.tag-list { display: flex; gap: 7px; flex-wrap: wrap; justify-content: end; }
.tag-list a, .tag-list span {
    color: #77778f;
    font-size: 10px;
}
.tag-list a:hover { color: #a9a5ff; }

.about-strip {
    padding: 72px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: linear-gradient(90deg, rgba(117,108,255,.08), transparent 50%, rgba(117,108,255,.05));
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.about-grid p { margin: 0; color: var(--muted); font-size: 16px; }

.article-wrap { padding: 50px 0 90px; }
.article-container { max-width: 980px; }
.back-link { display: inline-block; margin-bottom: 25px; color: #9d98ff; font-size: 13px; font-weight: 700; }
.article {
    padding: clamp(24px, 5vw, 52px);
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(255,255,255,.035);
    box-shadow: var(--shadow);
}
.article-cover {
    margin: -52px -52px 38px;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
    max-height: 480px;
}
.article-cover img { width: 100%; max-height: 480px; object-fit: cover; }
.article-header h1 {
    margin: 13px 0 16px;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.03;
    letter-spacing: -.05em;
}
.article-lead { margin: 0; color: var(--muted); font-size: 18px; max-width: 760px; }
.article-content { margin-top: 42px; color: #d7d7e4; font-size: 17px; line-height: 1.82; }
.article-content > *:first-child { margin-top: 0; }
.article-content h2, .article-content h3, .article-content h4 {
    color: #fff;
    line-height: 1.2;
    letter-spacing: -.025em;
    margin: 42px 0 15px;
}
.article-content h2 { font-size: 32px; }
.article-content h3 { font-size: 24px; }
.article-content p { margin: 0 0 22px; }
.article-content a { color: #a9a5ff; text-decoration: underline; text-decoration-color: rgba(169,165,255,.35); text-underline-offset: 3px; }
.article-content a:hover { color: #fff; }
.article-content ul, .article-content ol { padding-left: 25px; }
.article-content li { margin: 7px 0; }
.article-content blockquote {
    margin: 28px 0;
    padding: 18px 22px;
    border-left: 3px solid var(--accent);
    background: rgba(117,108,255,.07);
    color: #c7c5db;
    border-radius: 0 12px 12px 0;
}
.article-content pre {
    overflow-x: auto;
    margin: 28px 0;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #06060d;
    color: #d8d7ff;
    font-size: 14px;
    line-height: 1.6;
}
.article-content code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: .9em;
}
.article-content :not(pre) > code {
    padding: 3px 7px;
    border-radius: 6px;
    background: rgba(117,108,255,.10);
    color: #b8b4ff;
}
.article-content img { border-radius: 14px; margin: 28px auto; }
.article-content table { width: 100%; border-collapse: collapse; margin: 28px 0; overflow: hidden; }
.article-content th, .article-content td { padding: 12px; border: 1px solid var(--border); text-align: left; }
.article-content th { background: rgba(255,255,255,.05); color: #fff; }
.article-tags {
    display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
    margin-top: 42px; padding-top: 25px; border-top: 1px solid var(--border);
}
.article-tags > span:first-child { color: var(--muted-2); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; margin-right: 4px; }
.article-tags a, .article-tags span {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #aaa6c5;
    font-size: 12px;
    background: rgba(255,255,255,.035);
}
.article-tags a:hover { border-color: rgba(117,108,255,.45); color: #c0bcff; }

.listing-header {
    padding: 80px 0 50px;
    border-bottom: 1px solid var(--border);
    background: radial-gradient(circle at 50% 0, rgba(117,108,255,.10), transparent 55%);
}
.listing-header h1 {
    margin: 7px 0 10px;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1;
    letter-spacing: -.05em;
}
.listing-header p { margin: 0; max-width: 700px; color: var(--muted); }

.pagination { display: flex; justify-content: center; margin-top: 35px; }
.pagination a, .pagination span {
    display: inline-flex;
    min-width: 42px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    margin: 0 3px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255,255,255,.035);
    color: #aaa6c5;
    font-size: 13px;
}
.pagination a:hover { border-color: rgba(117,108,255,.4); color: #fff; }

.empty-state {
    padding: 50px;
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: 18px;
    color: var(--muted);
}

.error-page { min-height: calc(100vh - 160px); display: grid; place-items: center; text-align: center; padding: 70px 0; }
.error-inner { max-width: 700px; }
.error-logo { width: 64px; height: 64px; margin: 0 auto 28px; font-size: 30px; border-radius: 18px; animation: float 4s ease-in-out infinite; }
.error-code {
    font-size: clamp(110px, 22vw, 190px);
    line-height: .85;
    font-weight: 800;
    letter-spacing: -12px;
    background: linear-gradient(135deg, #fff 10%, #a9a5ff 50%, #6861ff 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.error-inner h1 { margin: 30px 0 10px; font-size: clamp(28px, 5vw, 42px); }
.error-inner p { margin: 0 auto; max-width: 560px; color: var(--muted); font-size: 17px; }

.site-footer {
    padding: 34px 0;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,.16);
}
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand--footer { min-width: 0; }
.footer-copy { display: flex; flex-wrap: wrap; gap: 9px; color: #55556b; font-size: 12px; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@media (max-width: 900px) {
    .main-nav { display: none; }
    .menu-toggle { display: block; }
    .nav-wrap.nav-open .main-nav {
        display: flex;
        position: absolute;
        left: 20px; right: 20px; top: 70px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: rgba(10,10,20,.96);
        box-shadow: var(--shadow);
    }
    .nav-wrap.nav-open .main-nav a { padding: 12px 14px; }
    .post-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .about-grid { grid-template-columns: 1fr; gap: 25px; }
}

@media (max-width: 620px) {
    .container { width: min(calc(100% - 28px), var(--container)); }
    .brand-text small { display: none; }
    .brand { min-width: 0; }
    .hero { padding: 72px 0 55px; }
    .hero h1 { font-size: clamp(46px, 15vw, 70px); }
    .hero-actions .btn { width: 100%; }
    .post-grid { grid-template-columns: 1fr; }
    .post-card__body { padding: 19px; }
    .section-heading { display: block; }
    .section-line { display: block; margin-top: 18px; }
    .article-wrap { padding-top: 28px; }
    .article { padding: 24px 18px; border-radius: 18px; }
    .article-cover { margin: -24px -18px 28px; border-radius: 18px 18px 0 0; }
    .article-header h1 { font-size: 38px; }
    .article-content { font-size: 16px; }
    .error-code { letter-spacing: -8px; }
    .footer-grid { align-items: flex-start; flex-direction: column; }
}
