*{margin:0;padding:0;box-sizing:border-box}

:root{
  --bg:#0b0f14;
  --text:rgba(255,255,255,0.92);
  --muted:rgba(255,255,255,0.72);
  --muted2:rgba(255,255,255,0.58);

  --link:rgba(170,220,255,0.90);
  --link2:rgba(255,255,255,0.86);
}

html,body{
  height:100%;
  font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
}

.page{
  position:relative;
  min-height:100vh;
  overflow:hidden;
}

.stamp{
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.70);
    /* border: 1px solid rgba(255, 255, 255, 0.16); */
    padding: 7px 10px;
    /* border-radius: 999px; */
    background: rgba(0, 0, 0, 0.18);
    /* margin-bottom: 14px; */
}

/* background image (uses existing .bg div) */
.bg{
  position:absolute;
  inset:0;
  background:url("bg.jpg") 62% center/cover no-repeat;
  transform:scale(1.03);
  filter:saturate(0.95) contrast(1.02);
}

/* scientific grid + quantum threads WITHOUT changing HTML: use pseudo-elements */
.page::before{
  content:"";
  position:absolute; inset:0;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.028) 0 1px, transparent 1px 90px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.020) 0 1px, transparent 1px 90px);
  opacity:0.35;
  mix-blend-mode: overlay;
  pointer-events:none;
  z-index:1;
}

.page::after{
  content:"";
  position:absolute; inset:0;
  background:url("threads.svg") center/cover no-repeat;
  opacity:0.55;
  mix-blend-mode: screen;
  pointer-events:none;
  z-index:1;
}

/* overlay layer (uses existing .overlay div) */
.overlay{
  position:absolute; inset:0;
  background:
    radial-gradient(circle at 70% 35%, rgba(255,255,255,0.10), transparent 55%),
    radial-gradient(circle at 85% 55%, rgba(120,190,255,0.10), transparent 55%),
    linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.88));
  z-index:2;
}

/* grain (uses existing .grain div) - tiling 256x256 */
.grain{
  position:absolute; inset:-20px;
  background:url("grain.png") 0 0 / 256px 256px repeat;
  mix-blend-mode: overlay;
  opacity:0.48;
  pointer-events:none;
  z-index:3;
}

/* ===== Topbar ===== */
.topbar{
  position:relative;
  z-index:4;
  display:flex;
  gap:18px;
  align-items:center;
  justify-content:space-between;
  padding:22px 22px;
}

.brand{text-decoration:none;color:var(--link2);}
.brand__name{
  font-weight:700;
  letter-spacing:0.10em;
  text-transform:uppercase;
  font-size:14px;
  opacity:0.9;
}
.brand__x{font-weight:300;opacity:0.95;}

.topnav{display:flex;gap:14px;flex-wrap:wrap;justify-content:flex-end;}
.topnav a{
  text-decoration:none;
  color:var(--muted2);
  font-size:13px;
  letter-spacing:0.08em;
  text-transform:uppercase;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.0);
  transition:0.2s ease;
}
.topnav a:hover{
  color:var(--link2);
  border-color:rgba(255,255,255,0.10);
  background:rgba(0,0,0,0.18);
}
.topnav a[aria-current="page"]{
  color:var(--link2);
  border-color:rgba(255,255,255,0.14);
  background:rgba(0,0,0,0.22);
}

/* ===== Layout ===== */
.shell{
  position:relative;
  z-index:4;
  width:min(980px,100%);
  margin:0 auto;
  padding:24px 18px 56px;
}

/* Entry card matches about v3 */
.entry{
  background: linear-gradient(180deg, rgba(10,14,22,0.68), rgba(6,10,16,0.58));
  border:1px solid rgba(255,255,255,0.12);
  border-radius:20px;
  padding:30px 28px;
  backdrop-filter: blur(10px);
  box-shadow: 0 22px 70px rgba(0,0,0,0.42);
  position:relative;
  overflow:hidden;
}
.entry:before{
  content:"";
  position:absolute; inset:-1px;
  background:
    radial-gradient(circle at 85% 40%, rgba(140,200,255,0.10), transparent 55%),
    radial-gradient(circle at 15% 10%, rgba(255,255,255,0.06), transparent 55%);
  pointer-events:none;
}
.entry:after{
  content:"";
  position:absolute; inset:0;
  border-radius:20px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
  pointer-events:none;
}

/* Header typography */
.entry__header{
  position:relative;
  margin-bottom:18px;
  border-bottom:1px solid rgba(255,255,255,0.10);
  padding-bottom:18px;
}

.entry__kicker{
  font-size:18px;
  font-weight:600;
  letter-spacing:0.02em;
  margin-bottom:10px;
  color:rgba(255,255,255,0.88);
}

.entry__meta{
  color:var(--muted);
  font-size:14px;
  line-height:1.55;
  margin-bottom:16px;
}

.entry__title{
  font-size:clamp(26px,3.8vw,40px);
  line-height:1.12;
  letter-spacing:0.02em;
  font-weight:700;
}

/* Content: justify + NO hyphenation + first-line indent */
.entry__content{
  color:rgba(255,255,255,0.86);
  font-size:16.5px;
  line-height:1.85;

  text-align: justify;
  text-justify: inter-word;

  hyphens: none;
  -webkit-hyphens: none;
  -ms-hyphens: none;
}
.entry__content p{
  text-indent: 1.5em;
}
.entry__content p + p{
  margin-top: 12px;
}

/* Footer links */
.entry__footer{
  margin-top:22px;
  padding-top:18px;
  border-top:1px solid rgba(255,255,255,0.10);
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  color:var(--muted2);
  font-size:14px;
  position:relative;
  z-index:1;
}

.entry__footer a{
  color:var(--link);
  text-decoration:none;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(0,0,0,0.18);
  transition:0.2s ease;
}
.entry__footer a:hover{
  border-color:rgba(170,220,255,0.35);
  box-shadow:0 0 18px rgba(140,200,255,0.18);
}
.dot{opacity:0.45;}

/* Optional: subtle section stamp for explore entries */
.entry__header .stamp{
  display:inline-block;
  font-size:11px;
  letter-spacing:0.18em;
  text-transform:uppercase;
  color:rgba(255,255,255,0.70);
  border:1px solid rgba(255,255,255,0.16);
  padding:7px 10px;
  border-radius:999px;
  background: rgba(0,0,0,0.18);
  margin-bottom:14px;
}

/* Mobile */
@media (max-width:520px){
  .topbar{padding:18px 14px}
  .shell{padding:18px 14px 44px}
  .entry{padding:22px 18px}
  .bg{background-position:62% center}
}

@media (prefers-reduced-motion: reduce){
  .topnav a, .entry__footer a{transition:none}
}
