:root{
  --bg:#0f1420;
  --panel:#171e2e;
  --panel-2:#1b2336;
  --line:#26304a;
  --txt:#e6ebf5;
  --mut:#8a97b3;
  --accent:#5b8cff;
  --accent-2:#7fb0ff;
  --n-bg:#1f3a36;
  --n-fg:#8ef0d4;
  --shadow:0 16px 40px rgba(0,0,0,0.28);
  --radius:14px;
}

*{box-sizing:border-box}

html,body{
  margin:0;
  min-height:100%;
  background:
    radial-gradient(circle at top left, rgba(91,140,255,0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(127,176,255,0.1), transparent 24%),
    linear-gradient(180deg, #0b1019 0%, #101827 52%, #0d1522 100%);
  color:var(--txt);
  font:15px/1.6 -apple-system,"Segoe UI",Roboto,"Inter","PingFang SC","Noto Sans SC","Microsoft YaHei",sans-serif;
}

body{ padding:18px; }

.top-stripe{
  height:3px;
  border-radius:999px;
  background:linear-gradient(90deg,var(--accent),var(--n-fg));
  max-width:1120px;
  margin:0 auto 14px;
  opacity:.8;
}

.page-shell{ width:min(100%,1120px); margin:0 auto; }

/* header */
.site-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
  background:rgba(23,30,46,0.92);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  border-radius:var(--radius);
  padding:14px 20px;
}
.brand{ display:flex; align-items:center; gap:11px; text-decoration:none; }
.brand-mark{
  width:26px;height:26px;border-radius:8px;flex:none;
  background:linear-gradient(135deg,var(--accent),var(--n-fg));
}
.brand-stack{ display:flex; flex-direction:column; }
.brand-text{ color:var(--txt); font-weight:600; font-size:15px; }
.brand-subtext{ color:var(--mut); font-size:12px; }
.header-actions{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.nav{ display:flex; gap:16px; }
.nav a{ color:var(--mut); text-decoration:none; font-size:14px; }
.nav a:hover{ color:var(--accent-2); }
.lang-select{
  background:#0f1420; color:var(--txt); border:1px solid var(--line);
  border-radius:8px; padding:6px 8px; font:inherit; font-size:13px; cursor:pointer;
}
.lang-select:focus{ outline:none; border-color:var(--accent); }

main{ margin-top:16px; display:flex; flex-direction:column; gap:16px; }

/* hero */
.hero{
  display:block;
  align-items:stretch;
}
.hero-copy{
  background:rgba(23,30,46,0.92);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  border-radius:var(--radius);
  padding:34px 34px 30px;
  display:flex; flex-direction:column; justify-content:center;
  max-width:860px;
}
.eyebrow{
  margin:0 0 10px; color:var(--accent-2);
  font-size:12px; font-weight:600; letter-spacing:.14em; text-transform:uppercase;
}
.hero-copy h1{ margin:0; font-size:34px; line-height:1.18; color:var(--txt); max-width:14ch; }
.hero-desc{ margin:16px 0 0; color:#cbd6eb; max-width:58ch; font-size:15.5px; line-height:1.8; }
.hero-actions{ margin-top:28px; display:flex; gap:10px; flex-wrap:wrap; }
.button{
  display:inline-flex; align-items:center; gap:6px;
  border-radius:10px; padding:9px 16px; font-size:14px; font-weight:500;
  text-decoration:none; border:1px solid var(--line); cursor:pointer;
}
.button.primary{ background:var(--accent); color:#0b1019; border-color:var(--accent); }
.button.primary:hover{ background:var(--accent-2); }
.button.ghost{ background:transparent; color:var(--txt); }
.button.ghost:hover{ border-color:var(--accent); }

/* panels */
.panel{
  background:rgba(23,30,46,0.92);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  border-radius:var(--radius);
  padding:24px 26px;
}
.panel h2{ margin:0 0 10px; font-size:20px; color:var(--txt); }
.panel .lead{ margin:0; color:#cbd6eb; max-width:74ch; }

/* blocks: focus / stack / projects / contact */
.block{
  background:rgba(23,30,46,0.92);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  border-radius:var(--radius);
  padding:26px 30px;
}
.block h2{ margin:0 0 16px; font-size:20px; color:var(--txt); }
.block .lead{ margin:0; color:#cbd6eb; max-width:74ch; }

.block-evidence{ max-width:940px; }
.block-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:10px;
}
.evidence-count{ display:flex; align-items:baseline; gap:8px; color:var(--mut); }
.evidence-count strong{ font-size:40px; line-height:1; color:var(--txt); }
.evidence-meta{ display:flex; gap:8px; flex-wrap:wrap; margin-top:16px; }
.meta-chip{
  display:inline-flex; align-items:center;
  border-radius:999px; padding:4px 10px; font-size:12px; font-weight:600;
}
.meta-chip.self{ background:var(--n-bg); color:var(--n-fg); }
.meta-chip.pub{ background:#1c2a47; color:var(--accent-2); }
.evidence-actions{ margin-top:18px; }

.card-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.card{
  background:var(--panel-2);
  border:1px solid var(--line);
  border-radius:12px;
  padding:15px 16px;
}
.card h3{ margin:0 0 7px; font-size:15px; font-weight:600; color:var(--accent-2); }
.card p{ margin:0; color:#c2cde3; font-size:13.5px; line-height:1.6; }

.tag-cloud{ display:flex; flex-wrap:wrap; gap:8px; }
.tag{
  background:#22304d; color:#cfe0ff;
  border:1px solid #33456e; border-radius:999px;
  padding:4px 11px; font-size:13px; white-space:nowrap;
}

.project-links{ display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }
.more-link{ margin:12px 0 0; }
.more-link a{ color:var(--accent-2); text-decoration:none; font-size:13.5px; }
.more-link a::after{ content:" ↗"; }

.contact-links{ display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }

/* footer */
.site-footer{
  margin-top:8px;
  display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap;
  color:var(--mut); font-size:12px; padding:6px 4px;
}
.site-footer a{ color:var(--accent-2); text-decoration:none; }

/* rtl */
html[dir="rtl"] .hero-actions,
html[dir="rtl"] .header-actions,
html[dir="rtl"] .project-links,
html[dir="rtl"] .contact-links,
html[dir="rtl"] .evidence-meta{ flex-direction:row-reverse; }
html[dir="rtl"] .block-head{ flex-direction:row-reverse; align-items:flex-start; }
html[dir="rtl"] .eyebrow{ letter-spacing:0; }

@media(max-width:820px){
  .hero-copy{ padding:26px 24px 24px; }
  .hero-copy h1{ font-size:27px; }
  .block{ padding:22px 24px; }
  .block-head{ flex-direction:column; align-items:flex-start; }
  .card-grid{ grid-template-columns:1fr; }
}
