/* ========================================
   FYZ.AI v3 — Tech-Dark Editorial
   Design Contract: /tmp/fyz-v3-contract.md
   ======================================== */

/* ---------- Tokens ---------- */
:root {
  /* Background */
  --bg-primary:    #0b0b0a;
  --bg-secondary:  #141412;
  --bg-tertiary:   #1c1c19;
  --bg-elevated:   #24241f;
  --surface-glow:  rgba(245, 165, 36, .08);

  /* Border */
  --border-subtle:  rgba(255, 255, 255, .06);
  --border-default: rgba(255, 255, 255, .10);
  --border-strong:  rgba(255, 255, 255, .18);

  /* Text */
  --text-primary:   #f4f3ef;
  --text-secondary: rgba(244, 243, 239, .68);
  --text-tertiary:  rgba(244, 243, 239, .42);
  --text-muted:     rgba(244, 243, 239, .25);

  /* Accent */
  --accent:        #f5a524;
  --accent-hover:  #ffb84a;
  --accent-dim:    rgba(245, 165, 36, .18);

  /* Status */
  --success:       #30a46c;
  --danger:        #e5484d;

  /* Radius */
  --radius-sm:     4px;
  --radius-md:     8px;
  --radius-lg:     12px;
  --radius-pill:   999px;

  /* Shadow */
  --shadow-sm:     0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md:     0 4px 12px rgba(0, 0, 0, .5);
  --shadow-lg:     0 12px 40px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .04);

  /* Layout */
  --container-max:  1240px;
  --sidebar-w:      200px;
  --topbar-h:       56px;

  /* Typography */
  --font-display:   "Inter Tight", "PingFang SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-body:      "Inter", "PingFang SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-mono:      "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
}

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

html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
  /* 背景纹理 */
  position: relative;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(245,165,36,.06), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(120,90,40,.04), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

/* ---------- Layout ---------- */
.layout {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* 桌面：sidebar 固定左侧，主内容给 margin 让空间 */
@media (min-width: 901px) {
  .main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
  }
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 48px;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: rgba(20, 20, 18, .6);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  z-index: 50;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 28px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}
.sidebar-brand-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--accent);
  color: #1a1200;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}
.sidebar-brand-text strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -.02em;
}
.sidebar-brand-text span {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-tertiary);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: 1px;
}

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: color 160ms, background-color 160ms;
}
.sidebar-nav a svg { width: 18px; height: 18px; stroke-width: 1.75; }
.sidebar-nav a:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.sidebar-nav a.active {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}
.sidebar-nav a.active::before {
  content: '';
  width: 3px; height: 16px;
  background: var(--accent);
  border-radius: 2px;
  margin-right: -6px;
}

.sidebar-bottom {
  padding: 16px 12px 4px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-status {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-tertiary); letter-spacing: .04em;
}
.sidebar-status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

/* ---------- Main Content ---------- */
.main {
  margin-left: var(--sidebar-w);
  position: relative;
  z-index: 1;
}

/* ---------- Top Bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: rgba(11, 11, 10, .75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 40;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-breadcrumb {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-mobile-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all 200ms cubic-bezier(.2, .8, .2, 1);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; stroke-width: 1.75; }
.btn-primary {
  background: var(--accent);
  color: #1a1200;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}
.btn-ghost:hover { background: var(--bg-tertiary); border-color: var(--border-strong); }

.btn-text {
  background: transparent;
  color: var(--accent);
  padding: 6px 12px;
  font-size: 13px;
}
.btn-text:hover { color: var(--accent-hover); }
.btn-text svg { width: 14px; height: 14px; }

.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all 160ms;
}
.icon-btn svg { width: 18px; height: 18px; stroke-width: 1.75; }
.icon-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }

/* ---------- Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  border-radius: var(--radius-pill);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  text-transform: uppercase;
}
.tag-accent { background: var(--accent-dim); color: var(--accent); border-color: transparent; }
.tag-success { background: rgba(48,164,108,.15); color: var(--success); border-color: transparent; }

/* ---------- Hero (Home) ---------- */
.hero {
  padding: 96px 48px 64px;
  border-bottom: 1px solid var(--border-subtle);
}
.hero-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--text-tertiary);
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.hero-label::before {
  content: ''; width: 24px; height: 1px;
  background: var(--border-default);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1.02;
  letter-spacing: -.05em;
  margin-bottom: 24px;
  max-width: 900px;
}
.hero h1 span { color: var(--accent); font-style: italic; font-weight: 400; }
.hero-copy {
  max-width: 560px;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 32px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-meta {
  display: flex; gap: 40px; margin-top: 56px;
  padding-top: 20px; border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-tertiary); letter-spacing: .08em; text-transform: uppercase;
}
.hero-meta span { display: flex; align-items: center; gap: 8px; }

/* ---------- Section ---------- */
.section {
  padding: 72px 48px;
  border-bottom: 1px solid var(--border-subtle);
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.section-head > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.1;
  letter-spacing: -.04em;
}
.section-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: .1em;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

/* ---------- Project Cards ---------- */
.projects { display: flex; flex-direction: column; }
.project {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  gap: 28px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 160ms;
}
.project:hover { background: var(--bg-secondary); margin: 0 -48px; padding: 32px 48px; }
.project-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
  padding-top: 6px;
}
.project-body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.3;
  letter-spacing: -.03em;
  margin-bottom: 10px;
}
.project-body p {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.85;
  max-width: 680px;
}
.project-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 16px;
}
.project-go {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: .04em;
  padding-top: 6px;
  transition: color 160ms;
}
.project-go svg { width: 14px; height: 14px; }
.project:hover .project-go { color: var(--accent); }

/* ---------- About (Home) ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: 64px;
}
.about-copy p {
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.9;
  margin-bottom: 18px;
}
.about-facts { display: grid; }
.about-fact {
  display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--border-subtle);
}
.about-fact:first-child { border-top: none; }
.about-fact dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--text-tertiary);
  text-transform: uppercase;
}
.about-fact dd {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- Contact ---------- */
.contact-card {
  max-width: 520px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.contact-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 24px;
}
.contact-email {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  padding: 14px 22px;
  background: var(--accent-dim);
  border-radius: var(--radius-md);
  border: 1px solid rgba(245,165,36,.25);
  transition: all 200ms;
}
.contact-email:hover { background: rgba(245,165,36,.28); transform: translateY(-1px); }
.contact-email svg { width: 16px; height: 16px; }

/* ---------- Footer ---------- */
.footer {
  padding: 40px 48px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-tertiary); letter-spacing: .06em;
}
.footer-disclaimer {
  padding-top: 16px;
  font-size: 9px;
  color: var(--text-muted);
  max-width: 780px;
  line-height: 1.6;
}
.footer-link { color: var(--text-tertiary); border-bottom: 1px solid var(--border-default); }
.footer-link:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- News Page ---------- */
.news-header {
  padding: 40px 48px 32px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
}
.news-header h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -.03em;
}
.news-header-actions { display: flex; gap: 10px; }

/* News Toolbar */
.news-toolbar {
  padding: 16px 48px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.region-tabs { display: flex; gap: 4px; background: var(--bg-secondary); padding: 4px; border-radius: var(--radius-md); }
.region-tab {
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-tertiary);
  border-radius: 6px;
  transition: all 160ms;
}
.region-tab:hover { color: var(--text-secondary); }
.region-tab.active {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.search-box {
  flex: 1; max-width: 320px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: border-color 160ms, box-shadow 160ms;
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.search-box svg { width: 16px; height: 16px; color: var(--text-tertiary); stroke-width: 1.75; }
.search-box input {
  flex: 1; background: transparent; border: none; outline: none;
  font-size: 13.5px; color: var(--text-primary);
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-tertiary);
}

.sort-select {
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}
.sort-select:focus { border-color: var(--accent); outline: none; }

/* Category Chips */
.category-row {
  padding: 14px 48px;
  display: flex; gap: 8px; overflow-x: auto;
  border-bottom: 1px solid var(--border-subtle);
}
.category-row::-webkit-scrollbar { display: none; }
.category-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  background: transparent;
  transition: all 160ms;
}
.category-chip:hover { color: var(--text-secondary); border-color: var(--border-default); }
.category-chip.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: transparent;
}
.category-chip span {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  opacity: .7;
}

/* News Content Layout */
.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 0;
}
.news-feed { padding: 24px 48px 80px; border-right: 1px solid var(--border-subtle); }
.news-side { padding: 24px 20px; }

.feed-caption {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-tertiary); letter-spacing: .04em;
  padding: 4px 0 16px;
}

/* News Item */
.news-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 160ms;
}
.news-item:hover { background: var(--bg-secondary); margin: 0 -48px; padding: 28px 48px; }
.news-item.no-thumb { grid-template-columns: minmax(0, 1fr); }

.news-thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
}
.news-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.85) brightness(.92);
  transition: transform 400ms cubic-bezier(.2,.8,.2,1);
}
.news-item:hover .news-thumb img { transform: scale(1.04); }

.news-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-tertiary); letter-spacing: .04em;
  margin-bottom: 10px;
}
.news-meta .dot { color: var(--text-muted); }
.region-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-tertiary);
}
.region-dot.global { background: var(--accent); }

.news-item h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.4;
  letter-spacing: -.02em;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-item:hover h3 { color: var(--accent); }

.news-summary {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.news-time {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
}

/* Load More */
.load-more {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 16px;
  margin-top: 24px;
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: all 160ms;
}
.load-more:hover { background: var(--bg-tertiary); color: var(--text-primary); border-color: var(--border-strong); }
.load-more span { font-family: var(--font-mono); font-size: 11px; color: var(--accent); }

/* Sidebar Panels */
.side-panel {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.side-panel:last-child { border-bottom: none; }
.side-panel h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -.02em;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.side-panel h3::before {
  content: ''; width: 3px; height: 14px;
  background: var(--accent); border-radius: 2px;
}
.side-panel p, .side-panel li { font-size: 12.5px; color: var(--text-secondary); line-height: 1.75; }

.trend-list { display: flex; flex-wrap: wrap; gap: 6px; }
.source-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.source-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 10px;
  background: var(--bg-secondary);
  border-radius: 6px;
  font-size: 12px;
}
.source-item .name { color: var(--text-secondary); }
.source-item .count { font-family: var(--font-mono); font-size: 10px; color: var(--text-tertiary); }
.source-item.error .name { color: var(--danger); }

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-elevated) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s infinite;
  border-radius: 4px;
}
@keyframes skeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-row { padding: 28px 0; border-bottom: 1px solid var(--border-subtle); }
.skeleton-line { height: 14px; margin-bottom: 10px; width: 100%; }
.skeleton-line.short { width: 30%; height: 10px; }
.skeleton-line.medium { width: 60%; }

/* Empty State */
.empty-state { padding: 48px 0; text-align: center; }
.empty-state strong { display: block; font-size: 16px; margin-bottom: 8px; }
.empty-state p { color: var(--text-tertiary); font-size: 13px; margin-bottom: 20px; }

/* Toast */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(20px);
  padding: 10px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: 13px; color: var(--text-primary);
  opacity: 0; pointer-events: none;
  transition: all 200ms;
  z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Mobile Drawer ---------- */
.mobile-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  z-index: 55;
}
.mobile-overlay.show { display: block; }

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { animation: fadeUp 500ms cubic-bezier(.2,.8,.2,1) both; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 300ms cubic-bezier(.2,.8,.2,1);
  }
  .sidebar.show { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar-mobile-toggle { display: grid; }
  .container, .hero, .section, .footer, .news-header, .news-toolbar, .category-row, .news-feed, .news-item { padding-left: 24px; padding-right: 24px; }
  .news-item:hover { margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
  .hero { padding-top: 48px; }
  .hero-meta { gap: 20px; flex-wrap: wrap; }
  .about-grid, .projects { grid-template-columns: 1fr; gap: 32px; }
  .project { grid-template-columns: 1fr auto; }
  .project-index { display: none; }
  .news-layout { grid-template-columns: 1fr; }
  .news-feed { border-right: none; border-bottom: 1px solid var(--border-subtle); }
  .news-side { padding: 24px; }
  .news-item { grid-template-columns: minmax(0, 1fr) 100px; gap: 14px; }
  .news-thumb { aspect-ratio: 1/1; }
}

@media (max-width: 560px) {
  .container, .hero, .section, .footer, .news-header, .news-toolbar, .category-row, .news-feed, .news-item { padding-left: 18px; padding-right: 18px; }
  .news-item:hover { margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
  .hero h1 { font-size: clamp(34px, 11vw, 52px); }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .section { padding: 48px 18px; }
  .project:hover { margin: 0 -18px; padding: 24px 18px; }
  .news-item { grid-template-columns: 1fr 82px; }
  .news-summary { display: none; }
  .news-toolbar { padding: 12px 18px; gap: 10px; }
  .search-box { max-width: none; }
  .region-tabs { order: -1; }
}

/* ---------- Scrollbar (WebKit) ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ---------- Selection ---------- */
::selection { background: var(--accent); color: #1a1200; }
