:root {
    color-scheme: dark;
    --g-bg: #05060a;
    --g-surface: #0c0f17;
    --g-line: rgba(255, 255, 255, .1);
    --g-text: #f8fafc;
    --g-muted: #94a3b8;
    --g-brand: #8b5cf6;
    --g-accent: #a5b4fc;
    --g-edge: clamp(1rem, 4.5vw, 4rem);
    --g-mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(139, 92, 246, .14), transparent 32rem),
        radial-gradient(circle at top right, rgba(91, 140, 255, .10), transparent 34rem),
        var(--g-bg);
    color: var(--g-text);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.55;
}

main { flex: 1; padding-bottom: clamp(2.5rem, 6vw, 5rem); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
:where(a, button, input, textarea):focus-visible { outline: 2px solid var(--g-accent); outline-offset: 3px; }
[hidden] { display: none !important; }

.g-wrap { width: min(calc(100% - var(--g-edge) * 2), 76rem); margin-inline: auto; }

.g-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.g-skip { position: absolute; top: .75rem; left: 1rem; z-index: 10; transform: translateY(-200%); padding: .65rem 1rem; color: var(--g-bg); background: var(--g-accent); }
.g-skip:focus { transform: none; }

/* Gaming navigation and site links */
.g-header { border-bottom: 1px solid var(--g-line); background: var(--g-surface); }
.g-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 1.25rem;
    min-height: 4.75rem;
}

.g-brand { display: inline-flex; align-items: center; justify-self: start; gap: .5rem; min-width: 0; max-width: 100%; }
.g-brand img { width: clamp(7.5rem, 13vw, 11.25rem); height: auto; min-width: 0; }
.g-brand-label {
    flex: none;
    padding-inline-start: .55rem;
    border-inline-start: 1px solid var(--g-line);
    color: var(--g-accent);
    font: 700 .72rem/1.4 var(--g-mono);
    letter-spacing: .09em;
    text-transform: uppercase;
}

.g-nav { display: flex; align-self: stretch; gap: clamp(1.2rem, 3.5vw, 2.8rem); }
.g-nav a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding-inline: .25rem;
    color: var(--g-muted);
    font-weight: 650;
    font-size: .92rem;
}
.g-nav a:hover, .g-nav a[aria-current="page"] { color: var(--g-accent); }
.g-nav a[aria-current="page"]::after { position: absolute; inset: auto 0 0; height: 2px; background: var(--g-accent); content: ""; }

.g-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: clamp(.6rem, 2vw, 1.4rem); white-space: nowrap; }
.g-account { color: var(--g-muted); font-size: .9rem; }
.g-account:hover { color: var(--g-text); }
.g-network-link { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .7rem; border: 1px solid var(--g-line); font-size: .82rem; font-weight: 650; }
.g-network-link span { color: var(--g-accent); }
.g-network-link:hover { border-color: var(--g-accent); }

.g-footer { background: var(--g-surface); border-top: 1px solid var(--g-line); }
.g-footer-main { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding-block: clamp(2rem, 5vw, 3.75rem); }
.g-footer-brand p { margin: .9rem 0 0; color: var(--g-muted); }
.g-footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.g-footer-links > div { display: grid; align-content: start; justify-items: start; gap: .5rem; }
.g-footer-links .g-kicker { margin-bottom: .35rem; }
.g-footer-links a, .g-footer-bottom a { color: var(--g-muted); }
.g-footer-links a:hover, .g-footer-bottom a:hover { color: var(--g-accent); }
.g-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .65rem 1.25rem; border-top: 1px solid var(--g-line); padding-block: 1rem; color: var(--g-muted); }
.g-footer-bottom nav { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .84rem; }

/* Homepage */
.g-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(1.5rem, 5vw, 4rem);
    padding-block: clamp(2.75rem, 7vw, 5.75rem) clamp(2.5rem, 6vw, 5rem);
}

.g-kicker { margin: 0; color: var(--g-accent); font: 700 .76rem/1.3 var(--g-mono); letter-spacing: .13em; text-transform: uppercase; }
.g-signal { display: inline-block; width: .55rem; height: .55rem; margin-inline-end: .35rem; background: var(--g-accent); transform: rotate(45deg); }
.g-hero h1 {
    margin: .65rem 0 1.1rem;
    font-size: clamp(3.1rem, 7.2vw, 7.3rem);
    font-weight: 900;
    line-height: .92;
    letter-spacing: -.067em;
}
.g-hero h1 span { display: block; color: var(--g-brand); }
.g-hero-intro { max-width: 28rem; margin: 0; color: var(--g-muted); font-size: clamp(1rem, 1.7vw, 1.2rem); }
.g-hero-copy .g-button { margin-top: 1.5rem; }

.g-hero-art {
    position: relative;
    display: grid;
    aspect-ratio: 8 / 5;
    overflow: hidden;
    background: var(--g-surface);
    border: 1px solid var(--g-line);
}
.g-hero-art img { width: 100%; height: 100%; object-fit: cover; }
.g-hero-index, .g-hero-status, .g-feature-tag {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .35rem .55rem;
    border: 1px solid var(--g-line);
    background: var(--g-bg);
    color: var(--g-accent);
    font: 700 .68rem/1.3 var(--g-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
}
.g-hero-index, .g-feature-tag { top: .85rem; left: .85rem; }
.g-hero-status { right: .85rem; bottom: .85rem; }
.g-hero-status .g-signal, .g-feature-tag .g-signal { width: .4rem; height: .4rem; }

.g-button, .g-comments .button {
    display: inline-flex;
    min-height: 2.65rem;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .6rem 1rem;
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--g-brand), #5b8cff);
    color: var(--g-bg);
    font-weight: 750;
    font-size: .9rem;
}
.g-button:hover, .g-comments .button:hover { background: linear-gradient(135deg, #a78bfa, #5b8cff); }
.g-button--quiet, .g-comments .button-ghost { color: var(--g-text); background: transparent; border-color: var(--g-line); }
.g-button--quiet:hover, .g-comments .button-ghost:hover { color: var(--g-accent); background: var(--g-surface); border-color: var(--g-accent); }
.g-link { color: var(--g-accent); font-weight: 650; text-underline-offset: .22em; }
.g-link:hover { text-decoration: underline; }

.g-back-to-top {
    position: fixed;
    right: calc(1rem + env(safe-area-inset-right, 0px));
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    z-index: 5;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

/* Card grids and secondary pages */
.g-section { padding-block: 1.5rem 2rem; border-top: 1px solid var(--g-line); }
.g-section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1rem; margin-bottom: 1.15rem; }
.g-section-head h2, .g-comments h2 { margin: 0; font-size: clamp(1.45rem, 3.4vw, 2.35rem); line-height: 1.12; letter-spacing: -.04em; }
.g-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.85rem, 2.3vw, 1.5rem); }
.g-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--g-line); background: var(--g-surface); transition: border-color .18s ease; }
.g-card:hover, .g-card:focus-visible { border-color: var(--g-accent); }
.g-card-media { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--g-bg); border-bottom: 1px solid var(--g-line); }
.g-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.g-card:hover img { transform: scale(1.035); }
.g-card-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; flex: 1; gap: .8rem; padding: clamp(.85rem, 2vw, 1.35rem); overflow-wrap: anywhere; }
.g-card-body .g-kicker { color: var(--g-muted); font-size: .69rem; }
.g-card-body h2, .g-card-body h3 { margin: .38rem 0 0; font-size: clamp(1.08rem, 2vw, 1.42rem); line-height: 1.17; letter-spacing: -.025em; }
.g-card-body p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin: .55rem 0 0;
    color: var(--g-muted);
    font-size: .9rem;
}
.g-card-arrow { justify-self: end; color: var(--g-accent); font-size: 1.15rem; }
.g-card--featured .g-card-body h2 { font-size: clamp(1.35rem, 2.8vw, 2.1rem); }

.g-page { padding-top: clamp(2rem, 6vw, 5rem); }
.g-page-title { margin: .4rem 0 .6rem; font-size: clamp(2.55rem, 7vw, 5.1rem); font-weight: 900; line-height: 1; letter-spacing: -.055em; overflow-wrap: anywhere; }
.g-page-intro { max-width: 38rem; margin: 0 0 1.25rem; color: var(--g-muted); font-size: clamp(1rem, 2vw, 1.18rem); }
.g-page .g-card-grid, .g-page .g-empty { margin-top: 1.5rem; }
.g-actions, .g-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.g-pagination { margin-block: 1.5rem .5rem; }
.g-pagination-status, .g-result-note { color: var(--g-muted); font: 500 .87rem/1.5 var(--g-mono); overflow-wrap: anywhere; }

.g-search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem; max-width: 37rem; padding: .35rem; background: var(--g-surface); border: 1px solid var(--g-line); }
.g-search-form:focus-within { border-color: var(--g-accent); }
.g-search-form input { width: 100%; min-width: 0; padding: .5rem .75rem; color: var(--g-text); border: 0; background: transparent; }
.g-search-form input::placeholder, .g-comments textarea::placeholder { color: var(--g-muted); }
.g-search-form input:focus-visible { outline-offset: 0; }
.g-empty { padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--g-line); border-left: 2px solid var(--g-accent); background: var(--g-surface); overflow-wrap: anywhere; }
.g-empty h2, .g-empty h3 { margin: 0; font-size: 1.17rem; }
.g-empty p { margin: .35rem 0 0; color: var(--g-muted); }
.g-empty .g-button { margin-top: 1rem; }

/* Article reading and the shared comment controls */
.g-article { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3rem); }
.g-crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .6rem; margin-bottom: 1.5rem; color: var(--g-muted); font-size: .85rem; overflow-wrap: anywhere; }
.g-crumbs a, .g-prose a { color: var(--g-accent); }
.g-crumbs a:hover { text-decoration: underline; }
.g-crumbs [aria-current] { min-width: 0; }
.g-article-head, .g-prose { width: min(100%, 45rem); margin-inline: auto; }
.g-article-title { margin: 0; font-size: clamp(2.35rem, 6vw, 4.85rem); font-weight: 850; line-height: 1.02; letter-spacing: -.052em; overflow-wrap: anywhere; }
.g-article-intro { margin: .9rem 0 0; color: var(--g-muted); font-size: clamp(1.05rem, 2.3vw, 1.3rem); overflow-wrap: anywhere; }
.g-article-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .6rem; margin-top: .8rem; color: var(--g-accent); font: 700 .8rem/1.4 var(--g-mono); text-transform: uppercase; letter-spacing: .08em; }
.g-article-views { color: var(--g-muted); }
.g-article-cover { margin-top: 1.75rem; border: 1px solid var(--g-line); background: var(--g-surface); width: 800px; margin: 20px auto;}
.g-article-cover img { width: 800px; height: auto; object-fit: cover; }
.g-prose { margin-top: clamp(1.35rem, 4vw, 2.75rem); color: #cbd5e1; font-size: clamp(1rem, 1.6vw, 1.11rem); line-height: 1.75; overflow-wrap: anywhere; }
.g-prose :is(h2, h3, h4) { margin: 1.5em 0 .55em; color: var(--g-text); line-height: 1.2; }
.g-prose a { text-decoration: underline; text-underline-offset: .2em; }
.g-prose :is(img, video, iframe) { max-width: 100%; }
.g-prose img { height: auto; }
.g-prose figure { margin-inline: 0; }
.g-prose figcaption { color: var(--g-muted); font-size: .85em; }
.g-prose blockquote { margin: 1.2em 0; padding-inline-start: 1em; border-inline-start: 2px solid var(--g-accent); }
.g-prose :is(pre, code) { background: var(--g-surface); }
.g-prose code { padding: .1em .3em; }
.g-prose pre { padding: .9em; overflow: auto; }
.g-prose table { display: block; overflow-x: auto; border-collapse: collapse; }
.g-prose :is(td, th) { border: 1px solid var(--g-line); padding: .4em .65em; }
.g-prose .wp-inline-card { display: flex; flex-wrap: wrap; gap: 1rem; padding: .8rem; background: var(--g-surface); border: 1px solid var(--g-line); }
.g-prose .wp-inline-card img { width: min(100%, 12rem); object-fit: contain; }
.g-prose .wp-inline-card-body { display: grid; gap: .25rem; }

.g-comments { --brand-2: var(--g-accent); }
.g-comments .comments-section { padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--g-line); background: var(--g-surface); }
.g-comments .eyebrow { margin: 0 0 .45rem; color: var(--g-accent); font: 700 .75rem/1.35 var(--g-mono); letter-spacing: .1em; text-transform: uppercase; }
.g-comments .muted, .g-comments time { color: var(--g-muted); }
.g-comments .muted a { text-decoration: underline; text-underline-offset: .2em; }
.g-comments .alert { color: #ffc0b6; }
.g-comments time { font-size: .82rem; }
.g-comments textarea { display: block; width: 100%; min-height: 5.5rem; margin-bottom: .55rem; resize: vertical; color: var(--g-text); background: var(--g-bg); border: 1px solid var(--g-line); padding: .65rem .8rem; }
.g-comments :is(.comment-form, .comment-reply-form, .comment-edit-form) { margin: .8rem 0; }
.g-comments .comment { display: grid; grid-template-columns: 2.15rem minmax(0, 1fr); gap: .7rem; padding-top: .95rem; margin-top: .95rem; border-top: 1px solid var(--g-line); }
.g-comments .comment-body { min-width: 0; overflow-wrap: anywhere; }
.g-comments .comment-text { margin: .5rem 0; white-space: pre-wrap; }
.g-comments .comment-avatar { display: grid; place-items: center; width: 2.15rem; height: 2.15rem; border: 1px solid var(--g-line); background: var(--g-bg); overflow: hidden; }
.g-comments .comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.g-comments :is(.comment-head, .comment-tools, .comment-actions, .comment-edit-actions) { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .65rem; }
.g-comments :is(.comment-like-btn, .comment-reply-btn, .comment-edit-btn, .comment-delete-btn) { display: inline-block; padding: .25rem .5rem; border: 1px solid var(--g-line); background: var(--g-bg); color: var(--g-muted); font-size: .82rem; }
.g-comments .comment-delete-btn { color: #ffc0b6; }
.g-comments :is(.comment-like-btn.is-liked, button:hover) { border-color: var(--g-accent); }

@media (max-width: 840px) {
    .g-hero { grid-template-columns: minmax(0, 1fr); }
    .g-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .g-article-cover {width: auto;}
    .g-article-cover img { width: auto; height: auto;}
}

@media (max-width: 680px) {
    .g-header-inner { grid-template-columns: minmax(0, 1fr) auto; gap: .3rem .65rem; padding-top: .65rem; }
    .g-nav { grid-area: 2 / 1 / 3 / -1; }
    .g-header-actions { grid-area: 1 / 2; }
    .g-footer-main { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 510px) {
    .g-card-grid { grid-template-columns: minmax(0, 1fr); }
    .g-account { display: none; }
    .g-header .g-brand img { width: 100px; }
    .g-hero-index, .g-feature-tag { top: .55rem; left: .55rem; }
    .g-hero-status { bottom: .55rem; right: .55rem; }
}

@media (prefers-reduced-motion: reduce) {
    .g-card, .g-card-media img { transition: none; }
    .g-card:hover img { transform: none; }
}
