/* ============================================================
   TriHard Gaming Tech — Site Styles
   ============================================================ */

:root {
    --bg: #0d1117;
    --bg-card: #161b22;
    --bg-hover: #1c2128;
    --border: #30363d;
    --text: #c9d1d9;
    --text-muted: #8b949e;
    --accent: #1f6feb;
    --accent-hover: #388bfd;
    --tag-ai: #a371f7;
    --tag-gaming: #3fb950;
    --tag-tech: #f0883e;
    --tag-business: #f778ba;
    --radius: 8px;
    --max-width: 960px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ---- NAV ---- */
.site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem 2rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: padding 0.2s ease, box-shadow 0.2s ease;
}

.site-nav.scrolled {
    padding: 0.45rem 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff !important;
    text-decoration: none !important;
    transition: font-size 0.2s ease;
    white-space: nowrap;
}

.site-nav.scrolled .logo {
    font-size: 1.05rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    flex: 1;
    align-items: center;
    justify-content: flex-end;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.15s;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    text-decoration: none;
}

/* Hamburger button — always visible */
.hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    margin-left: auto;
    transition: border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}

.hamburger:hover {
    border-color: var(--accent);
    color: #fff;
}

.hamburger .bar {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    margin: 2px auto;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Hamburger open state — X */
.hamburger.is-open .bar:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.hamburger.is-open .bar:nth-child(2) { opacity: 0; }
.hamburger.is-open .bar:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* Nav links hidden by default, revealed by hamburger */
.nav-links {
    display: none;
}

.nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    right: 2rem;
    z-index: 9999;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 0.75rem 1rem;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 180px;
}

/* ---- HERO ---- */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    border-bottom: 1px solid var(--border);
}

.hero h1 { font-size: 2.5rem; color: #fff; margin-bottom: 0.5rem; }
.hero p  { color: var(--text-muted); font-size: 1.125rem; max-width: 600px; margin: 0 auto 1.5rem; }

.hero-cta {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: #fff !important;
    border-radius: var(--radius);
    font-weight: 600;
    transition: background 0.15s;
}
.hero-cta:hover { background: var(--accent-hover); text-decoration: none; }

/* ---- ARTICLES GRID ---- */
.articles-grid {
    max-width: var(--max-width);
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color 0.15s, transform 0.15s;
}

.article-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.article-card.featured {
    grid-column: 1 / -1;
    border-left: 4px solid var(--accent);
}

.article-card h2,
.article-card h3 {
    font-size: 1.125rem;
    color: #fff;
    margin: 0.5rem 0;
}

.card-content p { color: var(--text-muted); font-size: 0.9rem; }

.card-meta {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
}

/* Category tags */
.category-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--tag-ai);
    color: #fff;
}

/* View all card */
.view-all-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px dashed var(--border);
    min-height: 120px;
}

.view-all-card:hover {
    border-color: var(--accent);
    transform: none;
}

.view-all-link {
    font-size: 1.125rem;
    font-weight: 600;
}

/* ---- ARTICLE LIST PAGE ---- */
.content-wrapper {
    max-width: var(--max-width);
    margin: 2rem auto;
    padding: 0 1rem;
}

.content-wrapper h1 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.section-intro {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.articles-list {
    margin-bottom: 3rem;
}

.articles-list h2 {
    font-size: 1.375rem;
    color: #fff;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.section-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--tag-ai);
    color: #fff;
    margin-right: 0.5rem;
}
.section-badge.gaming { background: var(--tag-gaming); }
.section-badge.tech  { background: var(--tag-tech); }

.article-list-card .card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.article-list-card .card-link:hover {
    text-decoration: none;
}

/* ---- SINGLE ARTICLE PAGE ---- */
.article-header {
    margin-bottom: 2rem;
}

.article-header h1 {
    font-size: 2rem;
    color: #fff;
    margin: 0.5rem 0;
}

.article-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.article-body h2 {
    font-size: 1.5rem;
    color: #fff;
    margin: 2rem 0 1rem;
}

.article-body p,
.article-body ul,
.article-body blockquote {
    margin-bottom: 1rem;
}

.article-body ul { padding-left: 1.5rem; }

.article-body blockquote {
    border-left: 4px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--bg-card);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-muted);
}

.read-time {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.related-articles {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.related-articles h3 {
    font-size: 1.125rem;
    color: #fff;
    margin-bottom: 0.75rem;
}

/* ---- CONTACT FORM ---- */
.contact-form {
    max-width: 600px;
    margin: 2rem 0;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #fff;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.2);
}

.submit-btn {
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.submit-btn:hover { background: var(--accent-hover); }

.contact-info {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.contact-info ul {
    list-style: none;
    margin-top: 1rem;
}
.contact-info li { margin-bottom: 0.5rem; }

/* ---- FOOTER ---- */
.site-footer {
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ---- ORIGINAL ARTICLE STYLING ---- */
.original-article {
    max-width: 740px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.original-article header {
    margin-bottom: 2.5rem;
}

.article-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--accent);
    color: #fff;
    margin-bottom: 0.5rem;
}

.article-category {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--tag-ai);
    color: #fff;
    margin-left: 0.5rem;
}

.original-article h1 {
    font-size: 2rem;
    color: #fff;
    margin: 0.75rem 0;
    line-height: 1.2;
}

.original-article .article-meta {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.article-content {
    line-height: 1.8;
}

.article-content .lead {
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 2rem;
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
}

.article-content h2 {
    font-size: 1.4rem;
    color: #fff;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border);
}

.article-content p {
    margin-bottom: 1.25rem;
    color: var(--text);
}

.article-content ul,
.article-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    color: var(--text);
}

.article-content strong {
    color: #fff;
}

.analysis-box {
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 2rem 0;
}

.analysis-box h3 {
    font-size: 1rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.analysis-box p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.specs-table th {
    text-align: left;
    padding: 0.6rem 1rem;
    background: var(--bg-card);
    color: #fff;
    border-bottom: 2px solid var(--accent);
}

.specs-table td {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.article-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.article-footer p {
    margin-bottom: 0.5rem;
}

.back-link {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
}

/* ---- INLINE CITATION LINKS ---- */
.cite-link {
    display: inline;
    vertical-align: super;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    line-height: 0;
    margin-left: 1px;
    transition: color 0.15s;
}
.cite-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.references-section {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.references-section h3 {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 0.75rem;
}
.references-section ol {
    padding-left: 1.5rem;
}
.references-section li {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.references-section li a {
    color: var(--accent);
    text-decoration: underline;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .articles-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.75rem; }
    .site-nav { padding: 0.75rem 1rem; gap: 1rem; }
    .site-nav.scrolled { padding: 0.35rem 1rem; }

    .nav-links.open {
        flex-direction: column;
        gap: 0.5rem;
        position: absolute;
        top: 100%;
        right: 1rem;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 0 0 var(--radius) var(--radius);
        padding: 0.75rem 1rem;
        min-width: 180px;
    }
}
