:root{
  /* Brand core */
  --x-black:#05070b;
  --x-panel:#0b1017;
  --x-card:#101620;
  --x-white:#e7ecef;
  --x-muted:#9aa6ac;
  --line:#18212c;

  /* QRX domain colors */
  --qrx-blue:#1a6bff;       /* Xbitium / global */
  --qrx-cyan:#00e0b5;       /* shared accent */
  --qrx-violet:#8a2be2;     /* cyber violet */
  --qrx-magenta:#ff3fb3;    /* cyber magenta */
  --qrx-orange:#ffa826;     /* crypto orange */
  --qrx-gold:#ffcc66;       /* crypto gold */
  --qrx-research:#76e2f4;   /* research cyan/blue */
  --qrx-eng:#9b4dff;        /* engineering purple */

  /* Brand gradients */
  --grad-qrx-core: linear-gradient(120deg,#1a6bff 0%,#00e0b5 35%,#76e2f4 65%,#9b4dff 100%);
  --grad-qrx-research: linear-gradient(135deg,#00e0b5 0%,#76e2f4 45%,#9b4dff 100%);
  --grad-qrx-cyber: linear-gradient(135deg,#8a2be2 0%,#ff3fb3 45%,#1a6bff 100%);
  --grad-qrx-crypto: linear-gradient(135deg,#ffa826 0%,#ffcc66 40%,#00e0b5 100%);
  --grad-qrx-eng: linear-gradient(135deg,#9b4dff 0%,#1a6bff 40%,#00e0b5 100%);

  /* Aurora bar */
  --aurora-cyan:#1dfffb;
  --aurora-magenta:#cf1bb1;

  /* Cards + glow */
  --card-bg:rgba(8,12,18,0.96);
  --card-bd:rgba(255,255,255,0.06);
  --glow-soft:0 0 18px rgba(0,224,181,.25);
  --glow-strong:0 0 28px rgba(0,224,181,.45);
}

/* Base reset */
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  margin:0;
  background:
    radial-gradient(1200px 800px at 10% -10%, rgba(0,224,181,.10), transparent 60%),
    radial-gradient(1000px 600px at 120% 10%, rgba(159,77,255,.10), transparent 60%),
    linear-gradient(180deg,#05070b,#05070b 35%,#05070b);
  color:var(--x-white);
  font:15.5px/1.65 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}

/* === GLOBAL HEADER / NAV === */

.site-header{
  position:sticky; top:0; z-index:50;
  background:rgba(5,7,11,0.92);
  backdrop-filter:blur(16px);
  border-bottom:1px solid rgba(255,255,255,0.08);
}
.nav{
  max-width:1180px; margin:0 auto;
  padding:10px 20px 8px;
  display:flex; align-items:center; justify-content:space-between;
  gap:16px;
}
.brand{
  display:flex; align-items:center; gap:12px;
}
.brand-dot{
  width:14px; height:14px; border-radius:999px;
  background:var(--grad-qrx-core);
  box-shadow:0 0 14px rgba(0,224,181,0.7);
}
.brand-text{
  display:flex; flex-direction:column;
}
.brand-text-main{
  font-size:1.15rem;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  background:var(--grad-qrx-core);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.brand-text-sub{
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.18em;
  color:var(--x-muted);
}

/* main nav */
.nav-links{
  display:flex; flex-wrap:wrap; gap:8px;
}
.nav-links a{
  color:var(--x-white);
  text-decoration:none;
  padding:6px 12px;
  border-radius:999px;
  font-size:.82rem;
  border:1px solid transparent;
  opacity:.9;
  transition:background .18s ease,border-color .18s ease,transform .18s ease,box-shadow .18s ease;
}
.nav-links a:hover{
  border-color:rgba(255,255,255,0.16);
  background:rgba(255,255,255,0.06);
  transform:translateY(-1px);
}
.nav-links a.active{
  border-color:rgba(0,224,181,0.5);
  background:linear-gradient(135deg,rgba(26,107,255,0.18),rgba(0,224,181,0.12));
  box-shadow:var(--glow-soft);
}

/* === AURORA LED BAR UNDER HEADER === */
.aurora{
  height:10px;
  width:100%;
  position:relative;
  overflow:hidden;
}
.aurora::before{
  content:"";
  position:absolute;
  inset:-40px -25%;
  background:
    conic-gradient(
      from 0deg,
      rgba(29,255,251,0.0),
      rgba(29,255,251,0.6),
      rgba(207,27,177,0.7),
      rgba(29,255,251,0.6),
      rgba(207,27,177,0.4),
      rgba(29,255,251,0.0)
    );
  filter:blur(18px);
  opacity:.75;
  animation:auroraPulse 16s ease-in-out infinite;
}
@keyframes auroraPulse{
  0%{transform:translateX(-5%) scaleY(1);}
  30%{transform:translateX(3%) scaleY(1.4);}
  60%{transform:translateX(-3%) scaleY(1.1);}
  100%{transform:translateX(5%) scaleY(1.4);}
}

/* === SUBNAV (DOMAIN-LEVEL TABS) === */

.subnav-wrap{
  background:linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0));
  border-bottom:1px solid rgba(255,255,255,0.08);
}
.subnav{
  max-width:1180px; margin:0 auto;
  padding:10px 20px 8px;
  display:flex; flex-wrap:wrap; align-items:center; gap:12px;
}
.subnav-label{
  font-size:.8rem;
  text-transform:uppercase;
  letter-spacing:.16em;
  color:var(--x-muted);
  white-space:nowrap;
}
.subnav-links{
  display:flex; flex-wrap:wrap; gap:6px;
}
.subnav-links a{
  text-decoration:none;
  font-size:.8rem;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(3,6,12,0.8);
  color:var(--x-muted);
  transition:background .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.subnav-links a:hover{
  color:var(--x-white);
  border-color:rgba(255,255,255,0.18);
  background:rgba(15,24,40,0.96);
  transform:translateY(-1px);
}
.subnav-links a.active{
  color:#fff;
  border-color:rgba(0,224,181,0.6);
  background:rgba(11,35,63,0.95);
  box-shadow:var(--glow-soft);
}

/* domain-specific accent borders */
.subnav--cyber .subnav-links a.active{
  border-color:rgba(255,63,179,0.7);
  box-shadow:0 0 18px rgba(255,63,179,0.5);
}
.subnav--crypto .subnav-links a.active{
  border-color:rgba(255,168,38,0.7);
  box-shadow:0 0 18px rgba(255,168,38,0.5);
}
.subnav--research .subnav-links a.active{
  border-color:rgba(118,226,244,0.7);
  box-shadow:0 0 18px rgba(118,226,244,0.5);
}
.subnav--eng .subnav-links a.active{
  border-color:rgba(155,77,255,0.7);
  box-shadow:0 0 18px rgba(155,77,255,0.5);
}

/* === HERO (HOME) === */

.hero{
  max-width:1180px;
  margin:52px auto 16px;
  padding:0 20px;
  text-align:center;
}
.hero-title{
  font-size:clamp(40px,6vw,70px);
  font-weight:900;
  letter-spacing:.18em;
  text-transform:uppercase;
  margin-bottom:.15em;
  background:var(--grad-qrx-core);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  text-shadow:0 0 30px rgba(0,224,181,0.25);
}
.hero-subtitle{
  font-size:1.08rem;
  font-weight:600;
  margin-bottom:.35em;
  color:var(--x-white);
}
.hero-subline{
  max-width:760px;
  margin:0 auto;
  color:var(--x-muted);
}
.hero-subline b{color:var(--x-white);}

/* === HERO DOMAIN GRID === */

.grid{
  max-width:1180px;
  margin:32px auto 70px;
  padding:0 20px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:18px;
}

/* snake-border cards */
.card{
  position:relative;
  border-radius:18px;
  padding:18px 18px 20px;
  background:var(--card-bg);
  border:1px solid var(--card-bd);
  overflow:hidden;
  text-decoration:none;
  color:var(--x-white);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.card::before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius:inherit;
  background:
    conic-gradient(from 0deg,
      rgba(0,224,181,0) 0deg,
      rgba(0,224,181,0.9) 80deg,
      rgba(155,77,255,0.9) 140deg,
      rgba(207,27,177,0.9) 210deg,
      rgba(0,224,181,0.9) 280deg,
      rgba(0,224,181,0) 360deg
    );
  opacity:0;
  transform:scale(1.03);
  filter:blur(4px);
  transition:opacity .2s ease;
  z-index:-1;
}
.card-inner{
  position:relative;
  border-radius:14px;
  padding:12px 12px 14px;
  background:radial-gradient(circle at top left, rgba(255,255,255,0.08), transparent 55%),
             radial-gradient(circle at bottom right, rgba(0,0,0,0.6), transparent 55%);
}

/* card hover snake effect */
.card:hover{
  transform:translateY(-3px);
  border-color:rgba(255,255,255,0.18);
  box-shadow:0 14px 40px rgba(0,0,0,0.65);
}
.card:hover::before{
  opacity:1;
  animation:snakeBorder 2.1s linear infinite;
}
@keyframes snakeBorder{
  0%{transform:scale(1.03) rotate(0deg);}
  100%{transform:scale(1.03) rotate(360deg);}
}

.card .tag{
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.14em;
  margin-bottom:.35em;
  opacity:.9;
}
.card h3{
  margin:.15em 0;
  font-size:1.15rem;
}
.card p{
  margin:.25em 0 0;
  color:var(--x-muted);
}

/* domain color accents (hero cards & sections) */
.card.research .card-inner{
  border:1px solid rgba(118,226,244,0.32);
  background:radial-gradient(circle at top left, rgba(118,226,244,0.16), transparent 55%),
             radial-gradient(circle at bottom right, rgba(4,12,24,0.9), transparent 55%);
}
.card.research h3{
  background:var(--grad-qrx-research);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.card.research .tag{
  color:var(--qrx-research);
}

.card.cyber .card-inner{
  border:1px solid rgba(255,63,179,0.35);
  background:radial-gradient(circle at top left, rgba(255,63,179,0.18), transparent 55%),
             radial-gradient(circle at bottom right, rgba(8,4,22,0.9), transparent 55%);
}
.card.cyber h3{
  background:var(--grad-qrx-cyber);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.card.cyber .tag{
  color:var(--qrx-magenta);
}

.card.crypto .card-inner{
  border:1px solid rgba(255,168,38,0.4);
  background:radial-gradient(circle at top left, rgba(255,168,38,0.22), transparent 55%),
             radial-gradient(circle at bottom right, rgba(18,10,0,0.9), transparent 55%);
}
.card.crypto h3{
  background:var(--grad-qrx-crypto);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.card.crypto .tag{
  color:var(--qrx-orange);
}

.card.eng .card-inner{
  border:1px solid rgba(155,77,255,0.4);
  background:radial-gradient(circle at top left, rgba(155,77,255,0.20), transparent 55%),
             radial-gradient(circle at bottom right, rgba(9,6,20,0.9), transparent 55%);
}
.card.eng h3{
  background:var(--grad-qrx-eng);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.card.eng .tag{
  color:var(--qrx-eng);
}

/* generic card (portfolio, resume) */
.card.generic .card-inner{
  border:1px solid rgba(255,255,255,0.24);
}

/* === PAGE HEADERS (DOMAIN PAGES) === */

.page-header{
  max-width:1180px;
  margin:40px auto 10px;
  padding:0 20px;
}
.page-header h2{
  margin:0 0 6px;
  font-size:clamp(28px,4vw,42px);
  font-weight:800;
}
.page-header p{
  max-width:900px;
  color:var(--x-muted);
}
.page-header.research h2{
  background:var(--grad-qrx-research);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.page-header.cyber h2{
  background:var(--grad-qrx-cyber);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.page-header.crypto h2{
  background:var(--grad-qrx-crypto);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.page-header.eng h2{
  background:var(--grad-qrx-eng);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

/* === DOMAIN SECTIONS === */

.domain-sections{
  max-width:1180px;
  margin:18px auto 70px;
  padding:0 20px 20px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:18px;
}
.domain-section{
  background:var(--card-bg);
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.06);
  padding:16px 16px 18px;
}
.domain-section h3{
  margin-bottom:4px;
  font-size:1.1rem;
}
.domain-section p{
  margin-bottom:8px;
  color:var(--x-muted);
}
.domain-section .meta{
  font-size:.8rem;
  text-transform:uppercase;
  letter-spacing:.14em;
  color:var(--x-muted);
}

/* === ISLAND PLACEHOLDERS === */

.island{
  max-width:1180px;
  margin:18px auto 70px;
  padding:0 20px 18px;
}
.island-inner{
  border-radius:14px;
  border:1px dashed rgba(255,255,255,0.24);
  background:rgba(255,255,255,0.02);
  padding:10px 14px 14px;
}
.island-label{
  display:inline-block;
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.16em;
  background:linear-gradient(135deg,var(--qrx-blue),var(--qrx-cyan));
  color:#061019;
  padding:6px 12px;
  border-radius:999px;
  margin-bottom:8px;
}

/* === FOOTER === */

.site-footer{
  border-top:1px solid rgba(255,255,255,0.12);
  opacity:.88;
  padding:18px 20px 20px;
  text-align:center;
  color:var(--x-muted);
  font-size:.85rem;
}

/* === PORTFOLIO-SPECIFIC === */

.portfolio-grid{
  max-width:1180px;
  margin:24px auto 60px;
  padding:0 20px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:18px;
}
.skills-matrix{
  max-width:1180px;
  margin:10px auto 60px;
  padding:0 20px;
}
.skills-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:14px;
}
.skill-cat{
  background:var(--card-bg);
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.08);
  padding:10px 12px 12px;
}
.skill-cat h3{
  margin-bottom:4px;
  font-size:.95rem;
}
.skill-cat ul{
  list-style:none;
  font-size:.82rem;
  color:var(--x-muted);
}
.skill-cat li{
  margin:1px 0;
}

/* exhibit media */
.exhibits-grid{
  max-width:1180px;
  margin:10px auto 60px;
  padding:0 20px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:18px;
}
.exhibit{
  background:var(--card-bg);
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.08);
  padding:10px 10px 12px;
}
.exhibit img{
  width:100%;
  height:auto;
  display:block;
  border-radius:10px;
}
.exhibit h3{
  margin:6px 4px 2px;
  font-size:.95rem;
}
.exhibit p{
  margin:0 4px 4px;
  font-size:.8rem;
  color:var(--x-muted);
}

/* === MEDIA QUERIES === */

@media (max-width:768px){
  .nav{
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
  }
  .hero{
    margin-top:32px;
  }
  .subnav{
    flex-direction:column;
    align-items:flex-start;
  }
}
