* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0f1117;
  --bg2: #161b27;
  --bg3: #1e2537;
  --border: #2a3350;
  --cyan: #00d4d8;
  --cyan2: #00a8ac;
  --text: #e2e8f0;
  --muted: #8892a4;
  --tag-bg: #0d2a2b;
  --font-mono: 'Courier New', Courier, monospace;
  --font-sans: 'Segoe UI', system-ui, sans-serif;
}
body { background: var(--bg); color: var(--text); font-family: var(--font-sans); min-height: 100vh; }

/* NAV */
nav {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky; top: 0; z-index: 100;
}
.logo { font-family: var(--font-mono); font-size: 1.4rem; color: var(--cyan); letter-spacing: -1px; }
.logo span { color: var(--text); }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; cursor: pointer; }
.nav-links a:hover, .nav-links a.active { color: var(--cyan); }

/* HERO */
.hero {
  background: linear-gradient(135deg, var(--bg2) 0%, #0d1a2e 100%);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 2rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,212,216,0.08) 0%, transparent 65%);
}
.hero-tag { font-family: var(--font-mono); font-size: 0.75rem; color: var(--cyan); letter-spacing: 3px; text-transform: uppercase; margin-bottom: 1rem; }
.hero h1 { font-size: 2.8rem; font-weight: 700; margin-bottom: 0.75rem; }
.hero h1 span { color: var(--cyan); }
.hero p { color: var(--muted); font-size: 1.05rem; max-width: 520px; margin: 0 auto 1.5rem; line-height: 1.6; }
.hero-badges { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.badge { background: var(--tag-bg); border: 1px solid var(--border); color: var(--cyan); font-family: var(--font-mono); font-size: 0.72rem; padding: 4px 10px; border-radius: 4px; }

/* SEARCH */
.search-bar { background: var(--bg2); border-bottom: 1px solid var(--border); padding: 0.85rem 2rem; display: flex; justify-content: center; }
.search-wrap { position: relative; width: 100%; max-width: 560px; }
.search-wrap input {
  width: 100%; background: var(--bg3); border: 1px solid var(--border); color: var(--text);
  font-family: var(--font-mono); font-size: 0.85rem; padding: 0.55rem 1rem 0.55rem 2.5rem;
  border-radius: 6px; outline: none; transition: border-color 0.2s;
}
.search-wrap input::placeholder { color: var(--muted); }
.search-wrap input:focus { border-color: var(--cyan); }
.search-icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 0.85rem; pointer-events: none; }
.search-clear { position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1rem; display: none; line-height: 1; }
.search-clear:hover { color: var(--cyan); }
.search-results-label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); margin-bottom: 1rem; }
.search-results-label span { color: var(--cyan); }
.no-results { color: var(--muted); font-family: var(--font-mono); font-size: 0.85rem; padding: 2rem 0; }

/* LAYOUT */
.main-view { max-width: 1200px; margin: 0 auto; padding: 2rem; display: grid; grid-template-columns: 1fr 260px; gap: 2rem; }
.main-view.hidden { display: none; }

/* FEATURED */
.featured-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--cyan); letter-spacing: 3px; text-transform: uppercase; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.featured-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.featured-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 2rem;
  margin-bottom: 2rem; cursor: pointer; transition: border-color 0.2s, transform 0.2s;
  position: relative; overflow: hidden;
}
.featured-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}
.featured-card:hover { border-color: var(--cyan); transform: translateY(-2px); }
.featured-card .cat-tag { display: inline-block; background: var(--tag-bg); border: 1px solid var(--cyan2); color: var(--cyan); font-family: var(--font-mono); font-size: 0.7rem; padding: 3px 10px; border-radius: 4px; margin-bottom: 1rem; }
.featured-card h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.75rem; line-height: 1.3; }
.featured-card p { color: var(--muted); line-height: 1.65; margin-bottom: 1.25rem; font-size: 0.95rem; }
.post-meta { display: flex; align-items: center; gap: 1.25rem; font-size: 0.8rem; color: var(--muted); font-family: var(--font-mono); }
.post-meta .read-time { color: var(--cyan); }
.read-more { color: var(--cyan); font-size: 0.85rem; font-family: var(--font-mono); text-decoration: none; }
.read-more:hover { text-decoration: underline; }

/* POSTS GRID */
.posts-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--cyan); letter-spacing: 3px; text-transform: uppercase; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.posts-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.posts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2rem; }
.post-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem;
  cursor: pointer; transition: border-color 0.2s, transform 0.2s;
}
.post-card:hover { border-color: var(--cyan); transform: translateY(-2px); }
.post-card .cat-tag { display: inline-block; font-family: var(--font-mono); font-size: 0.65rem; padding: 2px 8px; border-radius: 3px; margin-bottom: 0.6rem; border: 1px solid; }
.cat-tag { display: inline-block; font-family: var(--font-mono); font-size: 0.65rem; padding: 2px 8px; border-radius: 3px; border: 1px solid var(--border); background: var(--tag-bg); color: var(--cyan); }
.tag-m365 { background: #0d1f3c; border-color: #1e4fd8 !important; color: #6e9ef5; }
.tag-ps  { background: #0d2a1a; border-color: #1a6636 !important; color: #4ade80; }
.tag-sec { background: #2a0d0d; border-color: #8b2020 !important; color: #f87171; }
.tag-ai  { background: #1e0d2a; border-color: #6b21a8 !important; color: #c084fc; }
.tag-bdr { background: #1a1a0d; border-color: #7c6e0d !important; color: #fbbf24; }
.post-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.5rem; line-height: 1.35; }
.post-card p { color: var(--muted); font-size: 0.8rem; line-height: 1.55; margin-bottom: 0.75rem; }
.post-card .post-meta { font-size: 0.72rem; }

/* SIDEBAR */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-widget { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem; }
.widget-title { font-family: var(--font-mono); font-size: 0.7rem; color: var(--cyan); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.cat-list { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.cat-list li { display: flex; justify-content: space-between; align-items: center; }
.cat-list a { color: var(--muted); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; cursor: pointer; }
.cat-list a:hover { color: var(--cyan); }
.cat-count { background: var(--bg3); color: var(--muted); font-family: var(--font-mono); font-size: 0.7rem; padding: 1px 7px; border-radius: 10px; }
.about-widget p { color: var(--muted); font-size: 0.83rem; line-height: 1.6; }
.about-widget strong { color: var(--text); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag-cloud span { background: var(--bg3); border: 1px solid var(--border); color: var(--muted); font-family: var(--font-mono); font-size: 0.68rem; padding: 3px 8px; border-radius: 4px; cursor: pointer; transition: all 0.2s; }
.tag-cloud span:hover { border-color: var(--cyan); color: var(--cyan); }

/* ABOUT SECTION */
.about-section { background: var(--bg2); border-top: 1px solid var(--border); padding: 3rem 2rem; text-align: center; }
.about-section h2 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.about-section h2 span { color: var(--cyan); font-family: var(--font-mono); }
.about-section p { color: var(--muted); max-width: 580px; margin: 0 auto 1.25rem; line-height: 1.65; font-size: 0.93rem; }
.about-pills { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.about-pills span { background: var(--bg3); border: 1px solid var(--border); color: var(--text); font-size: 0.78rem; padding: 4px 12px; border-radius: 20px; }

/* FOOTER */
footer { background: var(--bg); border-top: 1px solid var(--border); padding: 1.5rem 2rem; text-align: center; }
footer p { color: var(--muted); font-family: var(--font-mono); font-size: 0.75rem; }
footer span { color: var(--cyan); }

/* ARTICLE VIEW */
.article-view { display: none; max-width: 780px; margin: 0 auto; padding: 2rem; }
.article-view.active { display: block; }
.back-btn { background: none; border: 1px solid var(--border); color: var(--muted); font-family: var(--font-mono); font-size: 0.78rem; padding: 6px 14px; border-radius: 4px; cursor: pointer; margin-bottom: 1.5rem; transition: all 0.2s; }
.back-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.article-header { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.article-header h1 { font-size: 2rem; line-height: 1.3; margin: 0.75rem 0; }
.article-body { color: var(--muted); line-height: 1.8; font-size: 0.95rem; }
.article-body h2 { color: var(--text); font-size: 1.2rem; margin: 2rem 0 0.75rem; }
.article-body p { margin-bottom: 1.25rem; }
.article-body code { background: var(--bg3); color: var(--cyan); font-family: var(--font-mono); font-size: 0.85rem; padding: 2px 6px; border-radius: 3px; }
.article-body pre { background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; padding: 1.25rem; margin: 1.25rem 0; overflow-x: auto; }
.article-body pre code { background: none; padding: 0; color: #a8e6cf; }
.article-body ul { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.article-body ul li { margin-bottom: 0.4rem; }
