:root {
    --bg-color: #1a1622;
    --surface-color: #272236;
    --surface-hover: #322b46;
    --text-main: #f4f1f8;
    --text-muted: #a39bb3;
    --accent: #9d4edd;
    --accent-glow: rgba(157, 78, 221, 0.6);
    --glass-border: rgba(157, 78, 221, 0.3);
    --nav-height: 70px;

    --accent-warn: #ff5c6c;
    --accent-soft: #c299f0;

    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --container: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, .display {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 0.95;
}

::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; }

.bg-pattern {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.5;
    background-image:
        linear-gradient(var(--glass-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--glass-border) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 10%, transparent 70%);
            mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 10%, transparent 70%);
}

.panel {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.btn {
    padding: 13px 26px;
    font-weight: 600;
    font-size: 0.94rem;
    border-radius: var(--radius-sm);
    transition: box-shadow 0.25s ease, transform 0.15s ease, background 0.2s ease;
    display: inline-block;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { box-shadow: 0 0 26px var(--accent-glow); transform: translateY(-2px); }
.btn-ghost { background: transparent; border: 1px solid var(--glass-border); color: var(--text-main); }
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--accent); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

nav {
    position: fixed;
    top: 0; width: 100%; height: var(--nav-height);
    padding: 0 40px;
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(26, 22, 34, 0.9);
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.logo-container { height: 40px; }
.logo-img { height: 100%; width: auto; object-fit: contain; }

.nav-links { display: flex; gap: 30px; }
.nav-links a {
    color: var(--text-main); text-decoration: none; font-weight: 800;
    font-size: 0.85rem; letter-spacing: 2px; text-transform: uppercase;
    position: relative; padding: 5px 0; transition: color 0.3s;
}
.nav-links a:hover { color: var(--accent); text-shadow: 0 0 10px var(--accent-glow); }

.nav-links a.active { color: var(--accent); text-shadow: 0 0 10px var(--accent-glow); }
#logo-text { display: none; font-family: 'Bebas Neue', sans-serif; font-size: 1.4rem; letter-spacing: 0.06em; color: var(--text-main); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text-main); display: block; }

@media (max-width: 700px) {
    .nav-links { display: none; }
    .nav-links.open {
        display: flex; position: fixed; top: var(--nav-height); left: 0; right: 0; bottom: 0;
        background: var(--bg-color); flex-direction: column; align-items: flex-start;
        padding: 2.5rem 24px; gap: 1.6rem; z-index: 999;
    }
    .nav-links.open a { font-size: 1.3rem; }
    .nav-toggle { display: flex; }
}

main { position: relative; z-index: 1; padding-top: var(--nav-height); }

.hub-hero { padding: 5rem 0 3rem; }
.hub-hero .hero-tag {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--accent-soft); font-size: 0.92rem; font-weight: 500; margin-bottom: 1rem;
}
.hub-hero .hero-tag::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); display: inline-block;
}
.hub-hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); text-transform: uppercase; }
.hub-hero .lead { color: var(--text-muted); max-width: 62ch; margin-top: 1rem; font-size: 1.05rem; }

.about-note {
    margin-top: 2rem;
    padding: 1.4rem 1.6rem;
    max-width: 70ch;
}
.about-note p { color: var(--text-muted); font-size: 0.92rem; }
.about-note p + p { margin-top: 0.6rem; }
.about-note b { color: var(--text-main); }

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 2.6rem 0 2.2rem; }
.filter-chip {
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}
.filter-chip:hover { color: var(--text-main); border-color: var(--accent); }
.filter-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.4rem;
    padding-bottom: 6rem;
}

.article-card {
    display: block;
    padding: 1.7rem;
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.article-card:hover { transform: translateY(-4px); border-color: var(--accent); background: var(--surface-hover); }

.article-card-img {
    width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
    border-radius: var(--radius-md); margin-bottom: 1.2rem;
}

.article-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 0.9rem; }
.article-tag {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--accent-soft); background: rgba(157, 78, 221, 0.14);
    padding: 4px 10px; border-radius: 999px;
}
.article-date { font-size: 0.8rem; color: var(--text-muted); }

.article-card h2 { font-size: 1.55rem; text-transform: none; letter-spacing: 0; margin-bottom: 0.6rem; }
.article-excerpt {
    color: var(--text-muted); font-size: 0.92rem;
    display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.article-more { display: inline-block; margin-top: 1rem; color: var(--accent-soft); font-size: 0.86rem; font-weight: 600; }

.empty-state { color: var(--text-muted); padding: 3rem 0; text-align: center; }

#articleView { display: none; padding-bottom: 6rem; }
.article-back {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--accent-soft); font-size: 0.9rem; font-weight: 600; margin-bottom: 2rem;
}
.article-back:hover { color: var(--accent); }

#detailImageWrap img {
    width: 100%; max-height: 420px; object-fit: cover;
    border-radius: var(--radius-lg); margin-bottom: 2rem;
}

.article-header { max-width: 70ch; margin-bottom: 2.2rem; }
.article-header h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); text-transform: none; letter-spacing: 0; margin-top: 0.8rem; }

.article-body { max-width: 68ch; }
.article-body p { color: var(--text-muted); margin-bottom: 1.2rem; font-size: 1.02rem; }
.article-body p:first-of-type { color: var(--text-main); font-size: 1.1rem; }

#detailGalleryWrap { margin: 2rem 0; max-width: 68ch; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gallery-grid a { border-radius: var(--radius-md); overflow: hidden; }
.gallery-grid img { aspect-ratio: 4/3; object-fit: cover; transition: transform 0.2s ease; }
.gallery-grid a:hover img { transform: scale(1.05); }

#detailVideoWrap { margin: 2rem 0; max-width: 68ch; }
.video-embed { position: relative; width: 100%; padding-top: 56.25%; border-radius: var(--radius-lg); overflow: hidden; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

#detailLinkWrap { margin-top: 1.6rem; }

@media (max-width: 640px) {
    .articles-grid { grid-template-columns: 1fr; }
}

footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 50px;
    background: #0f0d14;
    border-top: 1px solid var(--glass-border);
    color: #4b4263;
    font-size: 0.9rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 800;
}

.footer-container { display: flex; flex-direction: column; }
.footer-contact { margin: 10px 0 30px 0; }
.footer-contact a { text-decoration: none; transition: .3s; color: var(--text-muted); }
.footer-contact a:hover { text-shadow: 0 0 10px var(--accent-glow); color: var(--accent); }
