/* ============ THEME ============ */
:root{
  --bg:#05070f;
  --panel:rgba(255,255,255,0.045);
  --line:rgba(0,229,255,0.25);
  --cyan:#00e5ff;
  --purple:#a855f7;
  --pink:#ff3d9a;
  --text:#d6e2f0;
  --muted:#8b9bb0;
}
*{
  box-sizing:border-box; 
  margin:0;
  padding:0;
  -webkit-tap-highlight-color:transparent
}
html{
  scroll-behavior:smooth;
  scroll-padding-top:76px;
  -webkit-text-size-adjust:100%
}
body{
  background:var(--bg);
  color:var(--text);
  font-family:'Rajdhani',sans-serif;
  font-size:18px;
  line-height:1.6;
  overflow-x:hidden;
  width:100%;
}
img{
  max-width:100%;
  display:block
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-2;
  background-image:
    linear-gradient(rgba(0,229,255,0.06) 1px,transparent 1px),
    linear-gradient(90deg,rgba(0,229,255,0.06) 1px,transparent 1px);
  background-size:50px 50px;animation:gridMove 12s linear infinite;
}
body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  background:
    radial-gradient(circle at 15% 20%,rgba(168,85,247,0.22),transparent 40%),
    radial-gradient(circle at 85% 70%,rgba(0,229,255,0.18),transparent 40%);
}
@keyframes gridMove{from{background-position:0 0}to{background-position:50px 50px}}

a{
  color:var(--cyan);
  text-decoration:none
}
a:hover{
  color:var(--pink)
}
.wrap{
  max-width:1150px;
  margin:auto;
  padding:0 20px
}
h1,h2,h3,h4{
  font-family:'Orbitron',sans-serif;
  letter-spacing:1px;
  word-wrap:break-word
}

/* ============ NAVBAR ============ */
nav{
  position:sticky;
  top:0;
  z-index:100;
  background:rgba(5,7,15,0.9);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
}
.nav-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:68px
}
.logo{
  display:flex;
  align-items:center;
  gap:12px;
  color:var(--cyan)
}
.logo:hover{
  color:var(--cyan)
}
.logo-img{
  width:46px;
  height:46px;
  border-radius:50%;
  flex-shrink:0;
  overflow:hidden;
  border:2px solid var(--cyan);
  box-shadow:0 0 14px rgba(0,229,255,0.6);
  background:#0b1224;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:'Orbitron';
  font-weight:900;
  font-size:16px;color:var(--cyan);
}
.logo-img img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 20%
}
.logo-text{
  font-family:'Orbitron';
  font-weight:900;
  font-size:19px;
  line-height:1.1;
  text-shadow:0 0 10px var(--cyan)
}
.logo-text small{
  display:block;
  font-family:'Rajdhani';
  font-size:11px;
  color:var(--muted);
  font-weight:600;
  letter-spacing:1.5px;
  text-shadow:none;
  margin-top:3px
}
.menu{
  display:flex;
  gap:4px;
  list-style:none
}
.menu a{
  color:var(--text);
  padding:8px 11px;
  font-weight:600;
  font-size:16px;
  border-radius:6px;
  transition:.25s;
  display:block
}
.menu a:hover{
  color:var(--cyan);
  background:rgba(0,229,255,0.08)
}
.burger{
  display:none;
  background:none;
  border:1px solid var(--line);
  color:var(--cyan);
  font-size:26px;
  line-height:1;
  padding:6px 10px;
  border-radius:8px;
  cursor:pointer
}

/* ============ SECTIONS ============ */
section{
  padding:80px 0
}
.title{
  text-align:center;
  margin-bottom:44px
}
.title h2{
  font-size:34px;
  color:#fff
}
.title h2 span{
  color:var(--cyan);
  text-shadow:0 0 14px var(--cyan)
}
.title p{
  color:var(--muted);
  margin-top:8px
}
.title::after{
  content:"";
  display:block;
  width:90px;
  height:3px;
  margin:16px auto 0;
  background:linear-gradient(90deg,var(--cyan),var(--purple));
  border-radius:3px
}

.reveal{
  opacity:0;
  transform:translateY(26px);
  transition:opacity .8s,transform .8s
}
.reveal.show{
  opacity:1;
  transform:none
}

.card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:16px;
  padding:24px;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  transition:.3s;
  min-width:0;
}
.card:hover{
  border-color:var(--cyan);
  box-shadow:0 0 25px rgba(0,229,255,0.2)
}

/* ============ HERO ============ */
#home{
  padding-top:60px
}
.hero{
  display:grid;
  grid-template-columns:1.2fr 1fr;
  gap:40px;
  align-items:center
}
.hero h1{
  font-size:60px;
  line-height:1.08;
  color:#fff;
  margin-bottom:14px
}
.hero h1 span{
  background:linear-gradient(90deg,var(--cyan),var(--purple),var(--pink));-webkit-background-clip:text;
  background-clip:text;
  color:transparent
}
.typing{
  font-family:'Orbitron';
  font-size:20px;
  color:var(--cyan);
  min-height:32px;
  margin-bottom:16px
}
.typing::after{
  content:"|";
  animation:blink 1s infinite
}
@keyframes blink{50%{opacity:0}}
.hero p{
  color:var(--muted);
  max-width:540px;
  margin-bottom:26px
}
.btns{
  display:flex;
  gap:12px;
  flex-wrap:wrap
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:11px 22px;
  border-radius:8px;
  font-weight:700;
  font-size:16px;
  border:2px solid var(--cyan);
  cursor:pointer;
  transition:.3s;
  font-family:'Rajdhani';
}
.btn.fill{
  background:var(--cyan);
  color:#001018
}
.btn.fill:hover{
  background:transparent;
  color:var(--cyan);
  box-shadow:0 0 20px var(--cyan)
}
.btn.line{
  background:transparent;
  color:var(--cyan)
}
.btn.line:hover{
  background:var(--cyan);
  color:#001018;
  box-shadow:0 0 20px var(--cyan)
}
.btn.off{
  opacity:.5;
  pointer-events:none;
  border-style:dashed
}

.photo-box{
  position:relative;
  width:min(340px,80vw);
  aspect-ratio:1/1;
  margin:auto
}
.photo-box::before{
  content:"";
  position:absolute;
  inset:-10px;
  border-radius:50%;
  background:conic-gradient(var(--cyan),var(--purple),var(--pink),var(--cyan));
  animation:spin 6s linear infinite;
  filter:blur(2px);
}
.photo-box::after{
  content:"";
  position:absolute;
  inset:-3px;
  border-radius:50%;
  background:var(--bg)
}
@keyframes spin{
  to{
    transform:rotate(360deg)
  }
}
.photo-box .frame{
  position:absolute;
  inset:5px;
  z-index:2;
  border-radius:50%;
  overflow:hidden;
  background:#0b1224;
  display:flex;
  align-items:center;
  justify-content:center;
}
.photo-box img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 20%
}
.photo-box .initials{
  display:none;
  font-family:'Orbitron';
  font-size:80px;
  font-weight:900;
  color:var(--cyan)
}

/* ============ STATS ============ */
.stats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
  margin-top:64px
}
.stat{
  text-align:center;
  padding:22px 12px
}
.stat b{
  display:block;
  font-family:'Orbitron';
  font-size:34px;
  color:var(--cyan);
  text-shadow:0 0 12px var(--cyan)
}
.stat span{
  color:var(--muted);
  font-size:16px
}

/* ============ ABOUT ============ */
.about-grid{
  display:grid;
  grid-template-columns:1.4fr 1fr;
  gap:22px
}
.info-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px dashed var(--line);
  padding:9px 0
}
.info-row:last-child{
  border:none
}
.info-row span:first-child{
  color:var(--muted)
}
.info-row span:last-child{
  text-align:right;
  word-break:break-word
}

/* ============ SKILLS ============ */
.skill-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px
}
.skill-grid h4{
  color:var(--cyan);
  margin-bottom:12px;
  font-size:16px
}
.tag{
  display:inline-block;
  margin:4px 4px 4px 0;
  padding:5px 13px;
  border:1px solid var(--line);
  border-radius:20px;
  font-size:15px;
  font-weight:600;
  transition:.25s;
}
.tag:hover{
  background:var(--cyan);
  color:#001018;
  box-shadow:0 0 14px var(--cyan)
}

/* ============ PROJECTS ============ */
.project{
  margin-bottom:28px
}

/* website projects: preview on the left, details on the right */
.project.web{
  display:grid;
  grid-template-columns:380px 1fr;
  gap:28px;
  align-items:center
}
.mock{
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
  background:#0b1224;
  min-width:0;
}
.mock-bar{
  display:flex;
  align-items:center;
  gap:6px;
  padding:9px 12px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,0.03)
}
.mock-bar i{
  width:10px;
  height:10px;
  border-radius:50%;
  background:var(--pink);
  flex-shrink:0
}
.mock-bar i:nth-child(2){
  background:#ffd000
}

.mock-bar i:nth-child(3){
  background:#22ff88
}
.mock-bar span{
  margin-left:8px;
  font-size:13px;
  color:var(--muted);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.mock-body{
  height:190px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:12px;
  font-family:'Orbitron';
  font-size:26px;
  font-weight:900;
  color:#fff;
  line-height:1.2;
  background:linear-gradient(135deg,rgba(0,229,255,0.2),rgba(168,85,247,0.25));
}
.mock-body.b2{
  background:linear-gradient(135deg,rgba(255,61,154,0.25),rgba(168,85,247,0.25))
}
.mock-body.b3{
  background:linear-gradient(135deg,rgba(34,255,136,0.2),rgba(0,229,255,0.25))}
.new-tag{
  display:inline-block;
  background:var(--pink);
  color:#fff;
  font-size:12px;
  font-weight:700;
  padding:2px 10px;
  border-radius:12px;
  margin-left:8px;
  vertical-align:middle;
  font-family:'Rajdhani'
}

.project-head{
  display:flex;
  gap:16px;
  align-items:flex-start
}
.project-head i.big{
  font-size:36px;
  color:var(--cyan);
  text-shadow:0 0 14px var(--cyan);
  flex-shrink:0
}
.project-body{
  min-width:0;
  flex:1
}
.project h3{
  font-size:21px;
  color:#fff;
  margin-bottom:6px
}
.stack{
  color:var(--purple);
  font-weight:700;
  margin-bottom:8px
}
.project ul{
  margin:12px 0 18px 20px;
  color:var(--muted)
}
.project ul b{
  color:var(--text)
}

/* every project button: same size, same baseline */
.project .btns{
  align-items:center
}
.project .btns .btn{
  min-width:160px;
  height:46px;
  padding:0 22px
}

/* ---------- demo panels (shared) ---------- */
.demo{
  display:none;
  margin-top:22px;
  padding:20px;
  border:1px dashed var(--cyan);
  border-radius:12px;
  background:rgba(0,229,255,0.04);
}
.demo.open{
  display:block;
  animation:fade .4s
}
@keyframes fade{
  from{
    opacity:0;
    transform:translateY(8px)
  }to{
    opacity:1;
    transform:none
  }
}
.demo h4{
  color:var(--cyan);
  margin-bottom:6px;
  font-size:16px
}
.demo .note{
  color:var(--muted);
  font-size:15px;
  margin-bottom:14px
}
.row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:10px
}
.demo input,.demo select{
  background:#0b1224;
  border:1px solid var(--line);
  color:#fff;
  padding:0 12px;
  height:46px;
  border-radius:8px;
  font-size:16px;
  font-family:'Rajdhani';
  outline:none;
  flex:1 1 150px;
  min-width:0;
  width:100%;
}
.demo input:focus,.demo select:focus{
  border-color:var(--cyan)
}
.demo button{
  background:var(--cyan);
  color:#001018;
  border:none;
  font-weight:700;
  padding:0 18px;
  height:46px;
  border-radius:8px;
  cursor:pointer;
  font-size:16px;
  font-family:'Rajdhani';
  flex:1 1 130px;
}
.demo button:hover{
  box-shadow:0 0 14px var(--cyan)
}
.demo button.alt{
  background:transparent;
  border:1px solid var(--pink);
  color:var(--pink)
}
.msg{
  margin:12px 0;
  font-weight:600;
  min-height:26px;
  word-break:break-word
}
.msg.ok{
  color:#22ff88
}
.msg.err{
  color:var(--pink)
}

.bar-row{
  margin:8px 0
}
.bar-row .lbl{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:15px
}
.bar{
  height:10px;
  background:#0b1224;
  border-radius:6px;
  overflow:hidden
}
.bar div{
  height:100%;
  width:0;
  background:linear-gradient(90deg,var(--cyan),var(--purple));
  transition:.6s
}
.table-scroll{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch
}
table{
  width:100%;
  border-collapse:collapse;
  margin-top:10px;
  font-size:16px
}
th,td{
  border:1px solid var(--line);
  padding:8px 10px;
  text-align:left;
  white-space:nowrap
}
th{
  color:var(--cyan);
  background:rgba(0,229,255,0.07)
}
code.sql{
  display:block;
  background:#0b1224;
  border-left:3px solid var(--purple);
  padding:10px 14px;
  margin:10px 0;
  color:#c4b5fd;
  font-size:14px;
  overflow-x:auto;
  white-space:pre
}

/* =====================================================
   LIBRARY DEMO (demo2) - aligned layout
===================================================== */
/* field on the left, button in a fixed 160px column on the right */
#demo2 .row{
  display:grid;
  grid-template-columns:1fr 160px;
  gap:12px;
  margin-bottom:12px;
}
/* search row has no button, so it takes the full width */
#demo2 .row.full{
  grid-template-columns:1fr
}

#demo2 input,
#demo2 select,
#demo2 button{
  width:100%;
  height:46px;
  padding:0 14px;
  flex:none;
}
#demo2 select{
  text-overflow:ellipsis
}

#demo2 .msg{
  min-height:26px;
  margin:6px 0 14px
}

/* table scrolls inside a fixed box, header stays visible */
#demo2 .table-scroll{
  max-height:380px;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:10px;
}
#demo2 table{
  width:100%;
  min-width:640px;
  margin-top:0;
  table-layout:fixed;
  font-size:16px;
}
#demo2 th,
#demo2 td{
  padding:10px 14px;
  border:none;
  border-bottom:1px solid rgba(255,255,255,0.08);
  white-space:normal;
  word-break:break-word;
  vertical-align:middle;
}
#demo2 thead th{
  position:sticky;
  top:0;
  z-index:1;
  background:#0b1224;
}
#demo2 th:nth-child(1){
  width:38%
}
#demo2 th:nth-child(2){
  width:27%
}
#demo2 th:nth-child(3){
  width:18%
}
#demo2 th:nth-child(4){
  width:17%
}
#demo2 tbody tr:hover{
  background:rgba(0,229,255,0.07)
}

/* ============ TIMELINE ============ */
.timeline{
  border-left:2px solid var(--line);
  padding-left:22px;
  margin-left:8px
}
.t-item{
  position:relative;
  margin-bottom:22px
}
.t-item::before{
  content:"";
  position:absolute;
  left:-31px;
  top:26px;
  width:14px;
  height:14px;
  border-radius:50%;
  background:var(--cyan);
  box-shadow:0 0 14px var(--cyan);
}
.t-item h4{
  color:#fff;
  font-size:17px
}
.t-item .sub{
  color:var(--purple);
  font-weight:700
}
.t-item p{
  color:var(--muted);
  margin-top:6px
}
.exp-points{
  margin:12px 0 0 20px;
  color:var(--muted)
}

/* ============ CERTS ============ */
.cert-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px
}
.cert i{
  font-size:30px;
  color:var(--cyan)
}
.cert h4{
  font-size:15px;
  color:#fff;
  margin:10px 0 4px
}
.cert p{
  color:var(--muted);
  font-size:15px;
  margin-bottom:8px
}

/* ============ CONTACT ============ */
.contact-grid{
  display:grid;
  grid-template-columns:1fr 1.2fr;
  gap:22px
}
.c-item{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:16px;
  font-size:18px;
  min-width:0
}
.c-item i{
  font-size:22px;
  color:var(--cyan);
  width:28px;
  flex-shrink:0
}
.c-item a,.c-item span{
  word-break:break-word;
  min-width:0
}
.form input,.form textarea{
  width:100%;
  background:#0b1224;
  border:1px solid var(--line);
  color:#fff;
  padding:13px;
  border-radius:8px;
  margin-bottom:14px;
  font-size:17px;
  font-family:'Rajdhani';
  outline:none;
}
.form input:focus,.form textarea:focus{
  border-color:var(--cyan);
  box-shadow:0 0 12px rgba(0,229,255,0.25)
}
.form textarea{
  height:140px;
  resize:vertical
}
.form .btn{
  width:100%
}

footer{
  border-top:1px solid var(--line);
  text-align:center;
  padding:24px 16px;
  color:var(--muted)
}
footer span{
  color:var(--cyan)
}

#topBtn{
  position:fixed;
  right:18px;
  bottom:18px;
  width:46px;
  height:46px;
  border-radius:50%;
  background:var(--cyan);
  color:#001018;
  border:none;
  font-size:20px;
  cursor:pointer;
  display:none;
  box-shadow:0 0 18px var(--cyan);
  z-index:90;
}

/* ============ TABLET ============ */
@media(max-width:991px){
  .hero,.about-grid,.contact-grid{
    grid-template-columns:1fr
  }
  .hero{
    gap:34px;
    text-align:center
  }
  .hero p{
    margin-left:auto;
    margin-right:auto
  }
  .btns{
    justify-content:center
  }
  .hero h1{
    font-size:46px
  }
  .photo-box{
    order:-1
  }
  .stats,.skill-grid{
    grid-template-columns:repeat(2,1fr)
  }
  .cert-grid{
    grid-template-columns:repeat(2,1fr)
  }
  .project.web{
    grid-template-columns:1fr;
    gap:18px
  }
  .mock-body{
    height:160px
  }
  .burger{
    display:block
  }
  .menu{
    display:none;
    position:absolute;
    top:68px;
    left:0;
    right:0;
    background:#070b16;
    flex-direction:column;
    padding:10px 20px 16px;
    border-bottom:1px solid var(--line);
  }
  .menu.open{
    display:flex
  }
  .menu a{
    padding:12px 10px;
    border-bottom:1px solid rgba(0,229,255,0.1)
  }
}

/* ============ PHONE ============ */
@media(max-width:576px){
  body{
    font-size:17px
  }
  section{
    padding:56px 0
  }
  .wrap{
    padding:0 16px
  }
  .logo-text{
    font-size:16px
  }
  .logo-text small{
    font-size:10px;
    letter-spacing:1px
  }
  .logo-img{
    width:42px;
    height:42px
  }
  .hero h1{
    font-size:36px
  }
  .typing{
    font-size:16px
  }
  .title h2{
    font-size:26px
  }
  .stats{
    gap:12px;
    margin-top:44px
  }
  .stat b{
    font-size:28px
  }
  .skill-grid,.cert-grid{
    grid-template-columns:1fr
  }
  .card{
    padding:18px
  }
  .project-head{
    flex-direction:column;
    gap:8px
  }
  .mock-body{
    height:120px;
    font-size:20px
  }
  .btns .btn{
    flex:1 1 100%
  }
  .demo{
    padding:14px
  }
  #demo2 .row{
    grid-template-columns:1fr
  }
  .t-item::before{
    top:22px
  }
  .info-row{
    flex-direction:column;
    gap:0
  }
  .info-row span:last-child{
    text-align:left
  }
}