:root{
  /* VILRAM DIGITAL — PURPLE DOMINANT (Spain tools/blog) */
  --bg:#12061F;                 /* deep purple base */
  --fg:#F6F1FF;                 /* text */
  --muted:#C7B7EE;
  --link:#F6F1FF;

  /* separation */
  --glass:rgba(168,85,247,.16); /* violet glass */
  --glass2:rgba(168,85,247,.24);
  --stroke:rgba(246,241,255,.14);

  /* brand */
  --p:#A855F7;                  /* purple */
  --s:#7C3AED;                  /* violet */
  --t:#C084FC;                  /* soft lilac */

  --r:22px;
  --shadow:0 22px 70px -28px rgba(168,85,247,.40);
}

*{box-sizing:border-box}

body{
  margin:0; color:var(--fg);
  font-family:Manrope,system-ui,Segoe UI,Roboto,Arial,sans-serif;

  /* purple sweep + violet glow (NO WHITE) */
  background:
    radial-gradient(1100px 520px at 62% 14%, rgba(168,85,247,.42), transparent 62%),
    radial-gradient(900px 520px at 20% 30%, rgba(124,58,237,.36), transparent 62%),
    radial-gradient(700px 420px at 88% 72%, rgba(192,132,252,.22), transparent 60%),
    linear-gradient(135deg, #1A0830 0%, #12061F 55%, #0C0416 100%);
  background-attachment: scroll;
}

@media (prefers-reduced-motion: reduce){
  *{animation:none!important; transition:none!important}
}

a{color:var(--link); text-decoration:none}
.wrap{max-width:1260px; margin:0 auto; padding:0 22px}

/* NAV */
.nav{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter:saturate(120%) blur(10px);

  /* purple nav (not Niterria green) */
  background:linear-gradient(90deg,
    rgba(42,17,87,.92) 0%,
    rgba(30,12,61,.86) 55%,
    rgba(26,8,48,.82) 100%
  );

  border-bottom:1px solid var(--stroke);
  box-shadow:0 12px 34px rgba(0,0,0,.35);
}

.nav-in{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  color:var(--fg);
  text-decoration:none;
}

.bt small{
  display:block;
  letter-spacing:.18em;
  color:rgba(199,183,238,.82);
  text-transform:uppercase;
  font-size:11px;
}
.bt b{display:block; font-weight:800; color:var(--fg)}

.nav-links{display:flex; align-items:center; gap:18px}
.nav-links a{
  color:var(--fg);
  font-weight:700;
  font-size:15px;
  padding:8px 14px;
  border-radius:12px;
  transition:.25s;
}
.nav-links a:hover{
  background:rgba(168,85,247,.22);
  box-shadow:0 10px 24px rgba(168,85,247,.28);
}
.nav-links .ghost{
  border:1px solid rgba(246,241,255,.16);
  background:rgba(168,85,247,.14);
}



/* HEADER */
.header{padding:38px 0 12px}
.header h1{font-family:'Playfair Display', serif; font-size:34px; margin:0}
.header b{
  color:var(--t);
  background:none;
  -webkit-background-clip:initial;
  background-clip:initial;
}

/* GRID */
.grid{display:grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap:24px; padding: 10px 0 60px}
@media(max-width: 980px){ .grid{ grid-template-columns:1fr; } }

/* HERO POST */
.hero{padding:44px 0 18px}
.post-hero{display:grid; grid-template-columns:1fr; gap:16px}
.headline{font-family:'Playfair Display', serif; font-size:44px; line-height:1.08; margin:0}
.sub{color:var(--muted); font-size:18px}
.meta{color:rgba(199,183,238,.82); font-size:13px}

/* hero image panel */
.hero-img{
  border:1px solid var(--stroke);
  background:linear-gradient(180deg, rgba(42,17,87,.72), rgba(30,12,61,.52));
  border-radius:22px;
  overflow:hidden;
  box-shadow:0 26px 80px -56px rgba(168,85,247,.42);
}
.hero-img .img-wrap{position:relative}
.hero-img img{width:100%; display:block; object-fit:cover; transition:transform .6s ease}
.hero-img:hover img{transform:scale(1.02)}

/* ARTICLE */
.article{
  border:1px solid var(--stroke);
  background:linear-gradient(180deg, rgba(42,17,87,.62), rgba(30,12,61,.44));
  border-radius:22px;
  padding:22px;
  line-height:1.7;
  font-size:18px;
}
.disclosure{font-size:13px; color:rgba(199,183,238,.84); text-align:center; margin-bottom:10px}
.article h2, .article h3{font-family:'Playfair Display', serif}

/* LIKE */
.like-row{display:flex; align-items:center; gap:12px; margin:14px 0 6px}
.heart{
  display:inline-grid; place-items:center;
  width:44px; height:44px; border-radius:50%;
  border:1px solid var(--stroke);
  background:rgba(168,85,247,.12);
  transition:transform .15s ease, box-shadow .25s, border-color .25s, background .25s;
}
.heart:hover{
  transform:translateY(-2px);
  border-color:rgba(168,85,247,.35);
  box-shadow:0 14px 36px -20px rgba(168,85,247,.45);
}
.heart.liked{
  background:linear-gradient(135deg,#7C3AED,#C084FC);
  box-shadow:0 10px 30px -10px rgba(168,85,247,.65);
}
.heart svg{display:block}

/* COMMENTS */
.comments{margin-top:18px}
.c-form{
  border:1px solid var(--stroke);
  background:linear-gradient(180deg, rgba(42,17,87,.62), rgba(30,12,61,.44));
  border-radius:16px;
  padding:16px;
}

textarea{
  width:100%;
  border-radius:12px;
  padding:12px;
  background:rgba(30,12,61,.55);
  border:1px solid var(--stroke);
  color:var(--fg);
}

.c-list{display:grid; gap:12px; margin-top:16px}

.c-item{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:12px;
  border:1px solid var(--stroke);
  background:linear-gradient(180deg, rgba(42,17,87,.62), rgba(30,12,61,.44));
  border-radius:16px;
  padding:12px;
}

.avatar{width:52px; height:52px; border-radius:50%; object-fit:cover; border:1px solid var(--stroke)}
.c-head{display:flex; align-items:center; justify-content:space-between}
.c-name{font-weight:700}
.c-date{color:rgba(199,183,238,.72); font-size:12px}
.c-actions a{margin-left:10px}
.edit-inp{
  width:100%;
  border-radius:10px;
  padding:10px;
  background:rgba(30,12,61,.55);
  border:1px solid var(--stroke);
  color:var(--fg)
}

/* SIDEBAR (sticky) */
aside{position:sticky; top:92px; height:max-content}
.box{
  border:1px solid var(--stroke);
  background:linear-gradient(180deg, rgba(42,17,87,.82), rgba(30,12,61,.62));
  border-radius:22px;
  padding:16px;
  margin-bottom:16px;
  box-shadow:0 14px 44px -30px rgba(0,0,0,.52);
  content-visibility:auto;
  contain-intrinsic-size:260px 220px;
}
.box h4{
  margin:4px 0 10px;
  font-size:12px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:rgba(199,183,238,.82);
}

.search{display:flex; gap:8px}
.search input{
  flex:1;
  border-radius:14px;
  padding:12px 14px;
  background:rgba(30,12,61,.55);
  border:1px solid var(--stroke);
  color:var(--fg);
  outline:none;
}
.search input:focus{
  border-color:rgba(168,85,247,.50);
  box-shadow:0 0 0 4px rgba(168,85,247,.22);
}
.search button{
  border:1px solid rgba(246,241,255,.16);
  background:linear-gradient(135deg, #7C3AED, #C084FC);
  color:white;
  border-radius:14px;
  padding:12px 14px;
  cursor:pointer;
  font-weight:900;
  box-shadow:0 16px 46px -26px rgba(168,85,247,.65);
}
.search button:hover{transform:translateY(-1px)}

.chips{display:flex; flex-wrap:wrap; gap:8px}
.chip{
  border:1px solid rgba(246,241,255,.16);
  background:rgba(30,12,61,.45);
  padding:8px 12px;
  border-radius:999px;
  font-size:14px;
  color:rgba(246,241,255,.86);
  font-weight:800;
}
.chip:hover{background:rgba(42,17,87,.55)}

.popular{display:grid; gap:10px}
.popular a{display:flex; gap:10px; color:var(--fg)}
.popular img{
  width:110px; height:78px; object-fit:cover;
  border-radius:12px;
  border:1px solid var(--stroke);
  background:rgba(168,85,247,.12);
}

/* FOOTER */
footer{
  border-top:1px solid var(--stroke);
  background:linear-gradient(90deg, rgba(42,17,87,.72), rgba(26,8,48,.62));
}

.foot{display:grid; grid-template-columns:1fr auto; gap:12px; padding:22px 0}
@media(max-width:800px){.foot{grid-template-columns:1fr}}

.icons{display:flex; gap:12px}

.icon{
  width:42px;
  height:42px;
  border-radius:14px;
  background:rgba(30,12,61,.45);
  border:1px solid var(--stroke);
  display:grid;
  place-items:center
}

/* BACK TO TOP */
.to-top{
  position:fixed; right:18px; bottom:18px;
  width:48px; height:48px; display:grid; place-items:center;
  border-radius:50%;
  border:1px solid var(--stroke);
  background:linear-gradient(135deg,
    color-mix(in oklab, var(--p) 82%, #000),
    color-mix(in oklab, var(--s) 88%, #000)
  );
  color:white; box-shadow:var(--shadow);
  opacity:0; pointer-events:none; transform:translateY(10px);
  transition:.25s
}
.to-top.show{opacity:1; pointer-events:auto; transform:translateY(0)}

/* BUTTONS */
.btn-glass{
  padding:10px 18px;
  border:none;
  border-radius:14px;
  font-weight:600;
  font-family:Manrope,system-ui,Segoe UI,Roboto,Arial,sans-serif;
  cursor:pointer;
  color:var(--fg);
  background:linear-gradient(135deg, rgba(168,85,247,.18), rgba(124,58,237,.12));
  backdrop-filter:blur(10px) saturate(140%);
  transition:all .25s ease;
  box-shadow:0 0 0 1px rgba(246,241,255,.10) inset;
}

.btn-glass:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 25px -10px rgba(168,85,247,.28),0 0 0 1px rgba(168,85,247,.22) inset;
}

.btn-glass.cancel:hover{
  box-shadow:0 10px 25px -10px rgba(255,80,80,.35),0 0 0 1px #ff5050 inset;
}

.btn-glass.confirm{
  background:linear-gradient(135deg,
    color-mix(in oklab, var(--p) 82%, #000),
    color-mix(in oklab, var(--s) 88%, #000)
  );
  color:#fff;
}

.btn-glass.confirm:hover{
  box-shadow:0 12px 40px -18px rgba(168,85,247,.52);
  transform:translateY(-2px) scale(1.02);
}

/* burger hidden on desktop */
.menu-toggle{
  display:none;
  border:1px solid var(--stroke);
  background:rgba(30,12,61,.45);
  padding:10px 12px;
  border-radius:12px;
  color:var(--fg);
  cursor:pointer
}

/* mobile dropdown */
@media(max-width:900px){
  .menu-toggle{ display:inline-flex; align-items:center; justify-content:center; }
  .nav-links{
    display:none !important;
    position:absolute; left:0; right:0; top:100%;
    flex-direction:column; gap:10px; padding:14px 18px 18px;
    border-top:1px solid var(--stroke);
    background:linear-gradient(180deg, rgba(42,17,87,.88), rgba(26,8,48,.82));
    z-index: 50;
  }
  .nav-links.open{ display:flex !important; }
  .nav-links a{
    display:block; width:100%; padding:12px 10px;
    border:1px solid var(--stroke);
    border-radius:12px;
    background:rgba(30,12,61,.55);
  }
  body.menu-open{ overflow:hidden; }
}

/* ===== Mobile first polish ===== */
@media (max-width: 900px){
  .wrap{ padding:0 14px }
  .nav-in{ padding:10px 0 }
  .badge img{ height:36px }
  .bt small{ font-size:10px; letter-spacing:.16em }
  .bt b{ font-size:16px }

  .hero{ padding:44px 0 18px }
  .headline{ font-size:30px; line-height:1.12 }
  .sub{ font-size:16px }

  .grid{ grid-template-columns:1fr; gap:16px }
  aside{ position:static }

  .box{ padding:12px; border-radius:16px }
  .box h4{ font-size:11px; margin:0 0 8px }
  .search input, .search button{ padding:10px 12px; border-radius:12px }

  .foot{ grid-template-columns:1fr; padding:16px 0; gap:8px }
}

/* Ultra-small phones */
@media (max-width: 600px){
  .headline{ font-size:26px }
  .popular img{ width:96px; height:68px }
}

/* Better scroll perf + accessibility */
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important }
}

/* 1) Absolute stop: no image can exceed its box */
img, video, canvas, svg { max-width:100%; height:auto; display:block }

/* Links inside article/content */
.content a{ color: color-mix(in oklab, var(--t) 72%, #ffffff); text-decoration:none; text-underline-offset:3px; }
.content a:hover{ opacity:.9; }

/* TABLES — Vilram purple glass */
.article table{
  width:100%;
  max-width:100%;
  border-collapse:separate;
  border-spacing:0;
  margin:26px 0;
  border:1px solid var(--stroke);
  border-radius:18px;
  overflow:hidden;
  background:rgba(168,85,247,.10);
  box-shadow:0 20px 60px -26px rgba(168,85,247,.22);
  backdrop-filter:blur(14px);
  table-layout:fixed;
}

.article th, .article td{
  padding:14px 18px;
  text-align:left;
  border-bottom:1px solid var(--stroke);
  word-break:break-word;
}

.article th{
  background:linear-gradient(135deg,
    color-mix(in oklab, var(--p) 86%, #000),
    color-mix(in oklab, var(--t) 78%, #000)
  );
  color:#fff;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
  font-size:13px;
}

.article tr:last-child td{border-bottom:none;}

.article tr:hover td{
  background:rgba(168,85,247,.10);
  transition:.25s;
}

.article td{
  font-size:15px;
  color:var(--fg);
}

.article caption{
  caption-side:top;
  text-align:left;
  color:var(--muted);
  font-size:14px;
  margin-bottom:8px;
}

/* ===== MOBILE FIX ===== */
@media(max-width:700px){
  .article table{ width:100%; table-layout:fixed; word-wrap:break-word; }
  .article th, .article td{ white-space:normal !important; word-break:break-word; padding:10px 8px; }
  .article th{ font-size:12px; }
  .article td{ font-size:14px; }
  .article{ overflow-x:hidden; }
}

/* Read meta pill — Vilram violet */
.readmeta{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(30,12,61,.55);
  border:1px solid var(--stroke);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color:color-mix(in oklab, var(--fg) 86%, var(--muted));
  font:600 13px/1.1 system-ui,-apple-system,Segoe UI,Roboto,Arial;
  letter-spacing:.2px;
  margin:10px 0 14px;
}

.readmeta__dot{
  width:8px;height:8px;border-radius:50%;
  background: linear-gradient(90deg,var(--p),var(--t));
  box-shadow:0 0 14px rgba(168,85,247,.28);
}

.readmeta__sep{ opacity:.5; padding:0 6px; }

.kicker{font-size:12px; color:rgba(199,183,238,.80)}
