
:root {
  --bg: #020617;
  --panel: rgba(255,255,255,0.035);
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.18);
  --text: #e6edf3;
  --muted: #94a3b8;
  --accent: #3cf2c6;
  --accent2: #22d3ee;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 20% -10%, rgba(60,242,198,.12), transparent 60%),
    radial-gradient(800px 500px at 90% 10%, rgba(34,211,238,.08), transparent 60%),
    #020617;
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
a:visited { color: inherit; }

/* Header */
header {
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

nav {
  max-width: 1100px;
  margin: auto;
  padding: .9rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo { display: flex; gap: .7rem; align-items: center; }
.logo-img { height: 36px; border-radius: 6px; box-shadow: 0 0 12px rgba(60,242,198,.25); }

.logo-text-main { font-weight: 600; font-size: .95rem; }
.logo-text-sub { font-size: .65rem; color: var(--muted); letter-spacing: .12em; }

.nav-links { display: flex; gap: 1.4rem; }
.nav-links a { color: var(--muted); font-size: .85rem; }
.nav-links a:hover { color: var(--text); }

.btn-mini-jsi {
  background: linear-gradient(135deg, #3cf2c6, #22d3ee);
  color: #001;
  padding: .45rem .75rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  font-size: 1.3rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--accent);
  padding: .3rem .55rem;
  border-radius: 10px;
  cursor: pointer;
}

/* Mobile dropdown */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: rgba(2,6,23,.95);
  border-bottom: 1px solid var(--border);
}

.mobile-menu a {
  padding: .9rem 1.2rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.mobile-menu a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.02);
}

/* Layout */
.page {
  max-width: 1100px;
  margin: auto;
  padding: 2rem 1.2rem 4rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.blog-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.6rem;
  min-height: 210px;
  backdrop-filter: blur(6px);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  color: var(--text);
}

.blog-card * { color: inherit; }

.blog-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
}

.blog-date { font-size: .75rem; color: var(--muted); }
.blog-title { font-size: 1.4rem; font-weight: 600; margin: .6rem 0; }
.blog-desc { color: var(--muted); line-height: 1.5; font-size: .92rem; }

/* Article */
.article {
  max-width: 880px;
  margin: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 2.5rem;
  line-height: 1.65;
}

.article h1 { font-size: 2.2rem; margin-top: 0; }
.article p { color: var(--text); }
.article .muted { color: var(--muted); }

/* Responsive */
@media (max-width: 820px) {
  .nav-links { display: none; }
  .btn-mini-jsi { display: none; }
  .mobile-menu-btn { display: block; }
  .mobile-menu.show { display: flex; }
}

/* -------------------------------
   Article readability upgrades
-------------------------------- */

.article {
  max-width: 720px;              /* Better reading width */
  margin: 2rem auto;
  padding: 2rem 1.8rem;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.035),
    rgba(255,255,255,0.02)
  );
}

/* Improve vertical rhythm */
.article p {
  margin: 1.1rem 0;
  line-height: 1.65;
}

/* Title spacing refinement */
.article h1 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

/* Meta line styling */
.article .muted {
  font-size: 0.9rem;
  opacity: 0.75;
  margin-bottom: 1.6rem;
}

/* Link styling inside article */
.article a {
  color: var(--accent2);
  text-decoration: none;
  border-bottom: 1px solid rgba(34,211,238,0.25);
}

.article a:hover {
  border-bottom-color: rgba(34,211,238,0.6);
}

/* Better mobile behavior */
@media (max-width: 600px) {
  .article {
    padding: 1.5rem 1.2rem;
    border-radius: 16px;
  }

  .article h1 {
    font-size: 1.7rem;
  }

  .article p {
    font-size: 0.97rem;
  }
}

/* ================================
   Research-style article layout
================================ */

.article {
  max-width: 720px;
  margin: 2.5rem auto;
  padding: 2.2rem 2rem;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.035),
    rgba(255,255,255,0.02)
  );
  border: 1px solid var(--border);
  border-radius: 22px;
}

/* Header */
.article-header {
  margin-bottom: 1.6rem;
}

.article-header h1 {
  font-size: 2.1rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 .6rem;
}

.article-meta {
  font-size: .9rem;
  color: var(--muted);
  display: flex;
  gap: .4rem;
}

/* Body */
.article-body p {
  margin: 1.15rem 0;
  line-height: 1.65;
  font-size: 1rem;
}

/* Inline code */
.article-body code {
  background: rgba(255,255,255,0.04);
  padding: .15rem .35rem;
  border-radius: 6px;
  font-size: .92em;
}

/* Tool box */
.article-tool {
  margin: 1.8rem 0 1.2rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
}

.tool-label {
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: .3rem;
}

.article-tool a {
  color: var(--accent2);
  border-bottom: 1px solid rgba(34,211,238,.25);
}

.article-tool a:hover {
  border-bottom-color: rgba(34,211,238,.6);
}

/* Footer */
.article-footer {
  margin-top: 2rem;
  font-size: .85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 1.2rem;
}

/* Mobile tuning */
@media (max-width: 600px) {
  .article {
    padding: 1.6rem 1.3rem;
    border-radius: 18px;
  }

  .article-header h1 {
    font-size: 1.7rem;
  }

  .article-body p {
    font-size: .97rem;
  }
}

/* ================================
   Research metadata styling
================================ */

.research-label {
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: .6rem;
}

.research-meta {
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  font-size: .9rem;
  color: var(--muted);
  display: grid;
  gap: .4rem;
}

.research-meta strong {
  color: var(--text);
  font-weight: 500;
}

/* Mobile */
@media (max-width: 600px) {
  .research-meta {
    font-size: .88rem;
  }
}

/* ===========================
   Post hero banner (refined)
=========================== */

.post-hero {
  max-width: 1100px;
  margin: 1.5rem auto 1.2rem auto;
  padding: 0 1.5rem;
}

.post-hero img {
  width: 100%;
  height: auto;
  max-height: 260px;           /* <<< THIS keeps it slim on desktop */
  object-fit: cover;           /* Crops instead of stretching */
  object-position: center;     /* Keep center visible */

  display: block;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #020617;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
}

/* Mobile tuning */
@media (max-width: 600px) {
  .post-hero {
    margin-top: 1rem;
    padding: 0 1rem;
  }

  .post-hero img {
    max-height: 180px;   /* Slimmer still on mobile */
    border-radius: 14px;
  }
}

.blog-title {
  color: var(--accent);
}

.blog-card .blog-title,
.blog-card a .blog-title {
  color: var(--accent);
}

.blog-card:hover .blog-title {
  text-decoration: underline;
  text-decoration-color: rgba(60, 242, 198, 0.4);
}
