/* ===== CSS Variables ===== */
:root {
    --void: #0A0A0F;
    --surface: #14141E;
    --surface-elevated: #1E1E2D;
    --text-primary: #F0EDE8;
    --text-secondary: #8A8A9A;
    --accent: #FF6B2B;
    --accent-muted: #CC5520;
    --border-subtle: rgba(240, 237, 232, 0.08);
    --font-heading: "Space Grotesk", sans-serif;
    --font-body: "Inter", sans-serif;
    --font-caption: "JetBrains Mono", monospace;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
    background: var(--void);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(255,107,43,0.3); color: var(--text-primary); }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: var(--surface-elevated); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== Utilities ===== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.font-heading { font-family: var(--font-heading); }
.font-caption { font-family: var(--font-caption); }
.accent { color: var(--accent); }
/* Navbar: two separate layouts */
.nav-mobile { display: flex !important; }
.nav-desktop { display: none !important; }
@media (min-width: 1024px) {
    .nav-mobile { display: none !important; }
    .nav-desktop { display: flex !important; }
}
.section-label { font-family: var(--font-caption); font-size: 12px; text-transform: uppercase; letter-spacing: 4px; color: var(--accent); display: block; margin-bottom: 16px; }
.section-label.center { text-align: center; }
.section-title { font-family: var(--font-heading); font-size: clamp(32px, 5vw, 48px); font-weight: 700; color: var(--text-primary); margin-bottom: 48px; }
.section-title.center { text-align: center; }
.reveal, .reveal-left, .reveal-right, .reveal-fade { opacity: 0; }

/* ===== Buttons ===== */
.btn-accent {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    padding: 14px 32px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: filter 0.2s;
}
.btn-accent:hover { filter: brightness(1.15); }
.btn-outline {
    display: inline-block;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    padding: 14px 32px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: background 0.2s;
}
.btn-outline:hover { background: rgba(255,255,255,0.05); }
.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s;
}
.btn-icon:hover { background: rgba(255,255,255,0.05); }

/* ===== Navbar ===== */
#navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 72px;
    background: rgba(10,10,15,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    z-index: 50;
    transition: border-color 0.3s;
}
#navbar.scrolled { border-bottom-color: var(--border-subtle); }
/* Mobile navbar: logo + search + hamburger */
.nav-mobile {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    align-items: center;
    justify-content: space-between;
}
.nav-mobile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
/* Desktop navbar: logo + links + actions */
.nav-desktop {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    align-items: center;
    justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { width: 36px; height: 36px; }
.logo-text { font-family: var(--font-heading); font-size: 20px; font-weight: 700; color: var(--text-primary); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-link {
    font-family: var(--font-caption);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    position: relative;
    padding: 4px 0;
    transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--accent); }
.nav-link::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}
.nav-link.active::after, .nav-link:hover::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 60;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s ease;
}
.hamburger.open span:first-child { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:last-child { transform: rotate(-45deg) translate(5px, -5px); }
.mobile-menu {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    background: rgba(10,10,15,0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 24px;
    z-index: 49;
}
.mobile-menu.open { max-height: 400px; opacity: 1; padding: 16px 24px; }
.mobile-menu .nav-link { display: block; padding: 12px 0; font-size: 13px; letter-spacing: 3px; }

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
#particleCanvas { position: absolute; inset: 0; z-index: 1; }
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    padding: 0 24px;
}
.eyebrow {
    font-family: var(--font-caption);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--accent);
    display: block;
    margin-bottom: 24px;
}
.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(28px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-primary);
    min-height: 1.2em;
}
.hero-sub {
    font-size: clamp(14px, 2vw, 18px);
    color: var(--text-secondary);
    max-width: 560px;
    margin: 24px auto 0;
}
.hero-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
}
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}
.scroll-line {
    width: 1px;
    height: 40px;
    background: var(--text-secondary);
    position: relative;
    overflow: hidden;
}
.scroll-dot {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 12px;
    background: var(--accent);
    border-radius: 1px;
    animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(28px); opacity: 0.3; }
}

/* ===== Featured ===== */
.featured { padding: 80px 0 120px; }
.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 640px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (min-width: 1024px) {
    .bento-grid { grid-template-columns: repeat(4, 1fr); grid-template-rows: 400px 280px; gap: 24px; }
    .hero-card { grid-column: span 2; grid-row: span 2; }
}
.bento-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    min-height: 260px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}
.bento-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(255,107,43,0.15);
    transform: translateY(-4px);
}
.bento-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.bento-card:hover img { transform: scale(1.05); }
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,10,15,0.95) 0%, rgba(10,10,15,0.5) 50%, rgba(10,10,15,0.2) 100%);
    z-index: 1;
}
.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 2;
    transition: transform 0.3s;
}
.bento-card:hover .card-content { transform: translateY(-4px); }
.card-cat {
    font-family: var(--font-caption);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
}
.card-title {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 8px;
    line-height: 1.25;
    font-size: 16px;
}
.card-title.large { font-size: clamp(18px, 2.5vw, 28px); }
.card-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Categories ===== */
.categories {
    position: relative;
    padding: 80px 0 120px;
    background: #08080D;
    overflow: hidden;
}
.scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px);
    pointer-events: none;
    z-index: 0;
}
.relative { position: relative; z-index: 1; }
.cat-row {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.cat-row::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) {
    .cat-row { justify-content: center; }
}
.cat-card {
    flex: 0 0 240px;
    min-height: 300px;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
}
.cat-card:hover {
    background: var(--surface-elevated);
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.cat-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
    border-radius: 1px;
}
.cat-card:hover .cat-line { width: 60%; }
.cat-icon { margin-bottom: 20px; opacity: 0.85; transition: opacity 0.3s; width: 48px; height: 48px; }
.cat-icon img { width: 100%; height: 100%; object-fit: contain; }
.cat-card:hover .cat-icon { opacity: 1; }
.cat-name { font-family: var(--font-heading); font-size: 20px; font-weight: 700; color: var(--text-primary); }
.cat-sub { font-family: var(--font-caption); font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-secondary); margin-top: 4px; }
.cat-count {
    font-family: var(--font-caption);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    background: rgba(255,107,43,0.1);
    padding: 4px 10px;
    border-radius: 4px;
    margin-top: 12px;
}
.cat-desc { font-size: 14px; color: var(--text-secondary); margin-top: 16px; line-height: 1.5; }

/* ===== Latest Posts ===== */
.latest { padding: 80px 0 120px; }
/* Posts: mobile shows single column, desktop shows 3-column grid */
.posts-grid { display: none; }
.posts-mobile { display: flex; flex-direction: column; gap: 20px; }
.posts-col { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 1024px) {
    .posts-grid { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 24px; }
    .posts-mobile { display: none !important; }
}
.post-card {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    height: 380px;
    display: flex;
    flex-direction: column;
}
.post-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(255,107,43,0.15);
    transform: translateY(-4px);
}
.post-card.tall { height: 480px; }
.post-img { height: 55%; overflow: hidden; flex-shrink: 0; }
.post-card.tall .post-img { height: 55%; }
.post-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.post-card:hover .post-img img { transform: scale(1.05); }
.post-body { padding: 20px; flex: 1; }
.post-cat { font-family: var(--font-caption); font-size: 10px; text-transform: uppercase; letter-spacing: 3px; color: var(--accent); }
.post-title { font-family: var(--font-heading); font-size: 16px; font-weight: 700; color: var(--text-primary); margin-top: 8px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color 0.2s; }
.post-card:hover .post-title { color: var(--accent); }
.post-date { font-family: var(--font-caption); font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-secondary); margin-top: 12px; display: block; }

/* ===== About ===== */
.about { padding: 80px 0 120px; }
.about-grid {
    display: grid;
    gap: 48px;
}
@media (min-width: 1024px) {
    .about-grid { grid-template-columns: 55% 45%; align-items: center; gap: 64px; }
}
.about-body { font-size: clamp(14px, 2vw, 18px); color: var(--text-secondary); line-height: 1.7; margin-top: 24px; }
.socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-secondary);
    transition: all 0.2s;
}
.social-link:hover { background: var(--surface-elevated); color: var(--accent); }
.about-logo { display: flex; align-items: center; justify-content: center; }
.logo-card {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--accent);
    border-radius: 16px;
    padding: 48px 64px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-card img { width: 180px; height: 180px; object-fit: contain; filter: drop-shadow(0 0 30px rgba(255,107,43,0.2)); }
@media (min-width: 640px) { .logo-card { padding: 64px 80px; } .logo-card img { width: 200px; height: 200px; } }

/* ===== Footer ===== */
.footer { background: #08080D; border-top: 1px solid var(--border-subtle); padding: 80px 0 40px; }
.footer-top { display: flex; flex-direction: column; gap: 40px; }
@media (min-width: 1024px) { .footer-top { flex-direction: row; justify-content: space-between; } }
.footer-brand { max-width: 400px; }
.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.footer-brand p { font-size: 14px; color: var(--text-secondary); }
.footer-nav { display: flex; flex-direction: column; gap: 12px; }
.footer-nav a { font-size: 14px; color: var(--text-secondary); transition: color 0.2s; }
.footer-nav a:hover { color: var(--text-primary); }
.footer-bottom {
    margin-top: 64px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; justify-content: space-between; } }
.footer-bottom span { font-family: var(--font-caption); font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-secondary); }
