/* ========== Base / Theme ========== */
:root{
  --bg: #0b1020;
  --panel: rgba(255,255,255,0.06);
  --panel2: rgba(255,255,255,0.09);
  --text: #eaf0ff;
  --muted: rgba(234,240,255,0.72);
  --border: rgba(255,255,255,0.12);
  --shadow: 0 18px 60px rgba(0,0,0,0.35);

  --accent: #7c5cff;      /* purple */
  --accent2: #00d1ff;     /* cyan */
  --success: #2de38a;

  --radius: 18px;
  --radius2: 26px;

  --max: 1100px;
}

:root[data-theme="light"]{
  --bg: #f6f7fb;
  --panel: rgba(10,15,30,0.05);
  --panel2: rgba(10,15,30,0.07);
  --text: #10162a;
  --muted: rgba(16,22,42,0.70);
  --border: rgba(10,15,30,0.12);
  --shadow: 0 18px 60px rgba(10,15,30,0.12);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background:
    radial-gradient(1000px 500px at 20% 0%, rgba(124,92,255,0.25), transparent 55%),
    radial-gradient(800px 500px at 90% 10%, rgba(0,209,255,0.20), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }

.container{
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

/* ========== Progress Bar ========== */
.progress{
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
}
.progress__bar{
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  box-shadow: 0 0 20px rgba(124,92,255,0.45);
}

/* ========== Header/Nav ========== */
.header{
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(0,0,0,0.22), rgba(0,0,0,0.06));
  border-bottom: 1px solid var(--border);
}
:root[data-theme="light"] .header{
  background: linear-gradient(to bottom, rgba(255,255,255,0.85), rgba(255,255,255,0.55));
}

.header__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1rem;
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
}
.brand__dot{
  width: 12px; height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 18px rgba(124,92,255,0.55);
}
.brand__text{ letter-spacing: 0.2px; }

.nav__toggle{
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.55rem 0.6rem;
}
.nav__toggleLine{
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  opacity: 0.85;
}

.nav__list{
  display: flex;
  align-items: center;
  gap: 0.95rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav__list a{
  color: var(--muted);
  font-weight: 600;
  padding: 0.55rem 0.6rem;
  border-radius: 12px;
}
.nav__list a:hover{
  background: var(--panel);
  color: var(--text);
}

/* ========== Buttons/Badges ========== */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1rem;
  border-radius: 14px;
  font-weight: 700;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  box-shadow: 0 12px 30px rgba(124,92,255,0.25);
  cursor: pointer;
}
.btn:hover{ filter: brightness(1.02); transform: translateY(-1px); }
.btn:active{ transform: translateY(0px); }

.btn--ghost{
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn--ghost:hover{ background: var(--panel); }

.btn--soft{
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
}

.badge{
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(45,227,138,0.30);
  color: var(--success);
  background: rgba(45,227,138,0.08);
}

.pill{
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
  width: fit-content;
}

/* ========== Layout sections ========== */
.section{
  padding: 4.5rem 0;
}
.section__head{
  margin-bottom: 1.25rem;
}
.section__head h2{
  margin: 0 0 0.25rem 0;
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem);
}
.section__head p{
  margin: 0;
  color: var(--muted);
}

.card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
}

.grid2{
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}

/* ========== Hero ========== */
.hero{
  padding: 4.5rem 0 3.5rem;
  position: relative;
  overflow: clip;
}
.hero__grid{
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.2rem;
  align-items: start;
}
.hero__title{
  margin: 0.8rem 0 0.6rem;
  font-size: clamp(2rem, 1.4rem + 2vw, 3.2rem);
  line-height: 1.1;
}
.accent{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__subtitle{
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero__cta{
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 1.2rem;
}

.hero__stats{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}
.stat{
  padding: 0.85rem;
  border-radius: 16px;
  background: var(--panel2);
  border: 1px solid var(--border);
}
.stat__num{
  font-weight: 900;
  font-size: 1.4rem;
}
.stat__label{
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}

.hero__media{
  display: grid;
  gap: 0.8rem;
}
.avatarCard{
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.05));
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.avatarCard__img{
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: contrast(1.02) saturate(1.05);
}
.avatarCard__meta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1rem;
}
.avatarCard__name{ font-weight: 900; }
.avatarCard__uin{ color: var(--muted); font-weight: 700; font-size: 0.92rem; }

.glassNote{
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
}

.scrollHint{
  position: absolute;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
}
.scrollHint:hover{ color: var(--text); background: var(--panel); }
.scrollHint__mouse{
  width: 14px; height: 22px;
  border-radius: 999px;
  border: 2px solid currentColor;
  position: relative;
  opacity: 0.8;
}
.scrollHint__mouse::after{
  content: "";
  position: absolute;
  left: 50%;
  top: 4px;
  transform: translateX(-50%);
  width: 3px;
  height: 5px;
  border-radius: 2px;
  background: currentColor;
  animation: wheel 1.2s infinite ease-in-out;
}
@keyframes wheel{
  0%{ transform: translate(-50%, 0); opacity: 0.8; }
  50%{ transform: translate(-50%, 6px); opacity: 0.35; }
  100%{ transform: translate(-50%, 0); opacity: 0.8; }
}

/* ========== Skills ========== */
.skills{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1rem;
}

.bar{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 0.8rem;
  align-items: center;
  margin-top: 0.75rem;
  font-weight: 800;
}
.bar span{ color: var(--muted); }
.bar__val{ color: var(--text); }
.bar__track{
  grid-column: 1 / -1;
  height: 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
  overflow: hidden;
}
.bar__fill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 900ms ease;
}

.checkList{
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0;
}
.checkList li{
  padding-left: 1.6rem;
  margin: 0.5rem 0;
  position: relative;
  color: var(--muted);
  font-weight: 700;
}
.checkList li::before{
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--success);
  font-weight: 900;
}

/* ========== Projects ========== */
.projects{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1rem;
}
.project h3{ margin: 0; }
.project p{ color: var(--muted); margin: 0.6rem 0; }
.project__top{
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.8rem;
}
.tag{
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  white-space: nowrap;
}
.miniList{
  margin: 0.6rem 0 0.2rem;
  padding-left: 1.05rem;
  color: var(--muted);
  font-weight: 650;
}
.project__links{
  display: flex;
  gap: 0.8rem;
  margin-top: 0.85rem;
}
.link{
  font-weight: 900;
  color: var(--text);
  opacity: 0.9;
  border-bottom: 1px solid rgba(255,255,255,0.25);
}
:root[data-theme="light"] .link{
  border-bottom: 1px solid rgba(10,15,30,0.25);
}
.link:hover{ opacity: 1; }

/* ========== About/Contact Helpers ========== */
.infoList{
  list-style: none;
  padding: 0;
  margin: 0;
}
.infoList li{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px dashed var(--border);
  gap: 0.8rem;
}
.infoList li:last-child{ border-bottom: 0; }
.infoList span{ color: var(--muted); font-weight: 800; }

.chipRow{
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}
.chip{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-weight: 900;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
}

.form{
  display: grid;
  gap: 0.85rem;
}
label span{
  display: block;
  font-weight: 900;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
input, textarea{
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.18);
  color: var(--text);
  outline: none;
}
:root[data-theme="light"] input,
:root[data-theme="light"] textarea{
  background: rgba(255,255,255,0.75);
}
input:focus, textarea:focus{
  border-color: rgba(124,92,255,0.55);
  box-shadow: 0 0 0 4px rgba(124,92,255,0.18);
}

.contactGrid{
  display: grid;
  gap: 0.85rem;
  margin-top: 0.6rem;
}
.contactRow{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
}
.contactRow__right{
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.iconBtn{
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-weight: 900;
  padding: 0.35rem 0.55rem;
  border-radius: 12px;
  cursor: pointer;
}
.iconBtn:hover{ background: var(--panel); }

.toast{
  margin-top: 0.9rem;
  min-height: 1.25rem;
  color: var(--muted);
  font-weight: 800;
}
.small{ font-size: 0.9rem; }

.footNote{
  margin-top: 1rem;
  color: var(--muted);
  font-weight: 700;
}

/* ========== Timeline ========== */
.timeline{
  padding: 0.6rem 1.15rem 0.9rem;
}
.timeline__item{
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 0.9rem;
  padding: 1rem 0;
  border-bottom: 1px dashed var(--border);
}
.timeline__item:last-child{ border-bottom: 0; }
.timeline__dot{
  width: 12px; height: 12px;
  border-radius: 999px;
  margin-top: 0.35rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 18px rgba(124,92,255,0.45);
}
.timeline__content h3{ margin: 0; }
.timeline__content p{ margin: 0.35rem 0 0; }
.muted{ color: var(--muted); }

/* ========== Footer ========== */
.footer{
  border-top: 1px solid var(--border);
  padding: 1.35rem 0;
  background: rgba(0,0,0,0.10);
}
:root[data-theme="light"] .footer{
  background: rgba(255,255,255,0.55);
}
.footer__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  color: var(--muted);
  font-weight: 800;
}

/* ========== Responsive ========== */
@media (max-width: 950px){
  .hero__grid{ grid-template-columns: 1fr; }
  .grid2{ grid-template-columns: 1fr; }
  .skills{ grid-template-columns: 1fr; }
  .projects{ grid-template-columns: 1fr; }
  .scrollHint{ display: none; }
}

@media (max-width: 780px){
  .nav__toggle{ display: inline-flex; }
  .nav__list{
    position: absolute;
    right: 1rem;
    top: 64px;
    width: min(340px, calc(100% - 2rem));
    flex-direction: column;
    align-items: stretch;
    padding: 0.7rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    display: none;
  }
  :root[data-theme="light"] .nav__list{ background: rgba(255,255,255,0.85); }
  .nav__list.is-open{ display: flex; }
  .nav__list a{ width: 100%; }
}