/* ===================== Base ===================== */
:root {
  --bg: #0c1324;
  --surface: #191f31;
  --primary: #d2bbff;
  --primary-dark: #7c3aed;
  --secondary: #4cd7f6;
  --secondary-dark: #03b5d3;
  --accent: #ffc93c;
  --on-muted: #9aa4c0;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: #f1f3fb;
  font-family: 'Geist', system-ui, sans-serif;
  overflow-x: hidden;
}

.mono { font-family: 'JetBrains Mono', monospace; }

.grad-text {
  background: linear-gradient(90deg, var(--accent), var(--primary) 60%, var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===================== Loader ===================== */
#loader {
  position: fixed; inset: 0; z-index: 999;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity .5s ease, visibility .5s ease;
}
#loader.hide { opacity: 0; visibility: hidden; }
.loader-name { font-size: 28px; font-weight: 700; margin-bottom: 18px; }
.loader-bar { width: 220px; height: 3px; background: #232a42; border-radius: 4px; overflow: hidden; }
.loader-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--secondary)); animation: fillbar 1.2s ease forwards; }
@keyframes fillbar { to { width: 100%; } }
.loader-text { margin-top: 12px; font-size: 12px; color: var(--on-muted); }

/* ===================== Nav ===================== */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 6%;
  background: rgba(12,19,36,0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-logo { font-size: 22px; font-weight: 800; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: #cfd4e6; text-decoration: none; font-size: 14px; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--accent); }
.nav-cta {
  border: 1px solid var(--accent); color: var(--accent);
  padding: 8px 18px; border-radius: 8px; text-decoration: none; font-size: 13px; font-weight: 600;
  transition: all .2s;
}
.nav-cta:hover { background: var(--accent); color: #0c1324; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.hamburger span { width: 22px; height: 2px; background: #fff; }

.mobile-menu {
  position: fixed; inset: 0; background: var(--bg); z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  transform: translateX(100%); transition: transform .3s ease;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a { color: #fff; font-size: 20px; text-decoration: none; }
.mobile-close { position: absolute; top: 24px; right: 24px; background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; }

@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
}

/* ===================== Section shell ===================== */
section { padding: 110px 6% 60px; position: relative; }
.section-inner { max-width: 1180px; margin: 0 auto; }
.section-label { color: var(--secondary); font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.section-title { font-size: clamp(28px, 4vw, 42px); font-weight: 800; margin-top: 10px; }
.section-divider { width: 60px; height: 3px; background: linear-gradient(90deg, var(--accent), var(--secondary)); border-radius: 4px; }

/* ===================== Hero ===================== */
#hero { padding-top: 150px; min-height: 100vh; display: flex; align-items: center; }
.hero-bg-orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35; z-index: 0; }
.orb1 { width: 380px; height: 380px; background: var(--primary-dark); top: -80px; left: -80px; }
.orb2 { width: 300px; height: 300px; background: var(--secondary-dark); bottom: -60px; right: 10%; }
.orb3 { width: 220px; height: 220px; background: var(--accent); top: 40%; right: -60px; opacity: .18; }

.hero-inner { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr .8fr; gap: 50px; align-items: center; }
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; } }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255,201,60,0.4); color: var(--accent);
  padding: 6px 14px; border-radius: 20px; font-size: 12.5px; font-weight: 600; margin-bottom: 22px;
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.hero-title { font-size: clamp(42px, 6vw, 68px); font-weight: 800; line-height: 1.05; margin-bottom: 18px; }
.hero-roles { font-size: 17px; margin-bottom: 18px; color: var(--secondary); }
.hero-desc { color: var(--on-muted); font-size: 16px; line-height: 1.8; max-width: 520px; margin-bottom: 30px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

.btn-grad {
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  color: #0c1324; font-weight: 700; padding: 12px 22px; border-radius: 10px;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px; font-size: 14px;
  border: none; cursor: pointer; transition: transform .2s;
}
.btn-grad:hover { transform: translateY(-2px); }
.btn-outline {
  border: 1px solid rgba(255,255,255,0.18); color: #fff; padding: 12px 22px; border-radius: 10px;
  text-decoration: none; font-size: 14px; font-weight: 600; transition: all .2s;
}
.btn-outline:hover { border-color: var(--secondary); color: var(--secondary); }

.glass { background: rgba(25,31,49,0.6); border: 1px solid rgba(255,255,255,0.08); backdrop-filter: blur(14px); border-radius: 20px; }
.glow-primary { box-shadow: 0 0 60px rgba(124,58,237,0.25); }

.hero-card { padding: 30px; text-align: center; }
.profile-img-wrap {
  width: 190px; height: 190px; border-radius: 50%; margin: 0 auto 18px;
  padding: 6px; background: conic-gradient(var(--accent), var(--secondary), var(--primary), var(--accent));
}
.profile-img-wrap img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid var(--bg); }

/* ===================== Skills ===================== */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; margin-top: 40px; }
.skill-cat { padding: 26px; }
.skill-cat h3 { color: var(--accent); font-size: 15px; font-weight: 700; margin-bottom: 18px; letter-spacing: .5px; text-transform: uppercase; }
.skill-badge-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.skill-icon {
  width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #ffb347);
  display: flex; align-items: center; justify-content: center; color: #0c1324; font-weight: 800; font-size: 13px; flex-shrink: 0;
}
.skill-badge-row span.name { font-size: 14.5px; color: #e6e9f5; }

/* ===================== Projects ===================== */
.project-block { padding: 34px; margin-bottom: 30px; }
.project-num { font-size: 46px; font-weight: 800; color: transparent; -webkit-text-stroke: 1.5px var(--accent); line-height: 1; }
.project-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 30px; align-items: center; margin-top: 18px; }
@media (max-width: 900px) { .project-grid { grid-template-columns: 1fr; } }
.project-img-wrap { border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,0.08); }
.project-img-wrap img { width: 100%; display: block; }
.project-title { font-size: 24px; font-weight: 800; margin-bottom: 10px; }
.project-desc { color: var(--on-muted); font-size: 14.5px; line-height: 1.8; margin-bottom: 16px; }
.project-desc strong { color: #fff; }
.tool-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tool-tag { font-size: 12px; padding: 5px 12px; border-radius: 20px; background: rgba(76,215,246,0.1); border: 1px solid rgba(76,215,246,0.3); color: var(--secondary); }
.project-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.project-btn {
  font-size: 13px; font-weight: 600; padding: 9px 16px; border-radius: 8px;
  border: 1px solid var(--accent); color: var(--accent); text-decoration: none; transition: all .2s;
}
.project-btn:hover { background: var(--accent); color: #0c1324; }

/* ===================== Experience ===================== */
.exp-item { padding: 26px 30px; margin-bottom: 20px; }
.exp-item h3 { font-size: 18px; font-weight: 700; }
.exp-item .exp-meta { color: var(--secondary); font-size: 13px; margin-bottom: 12px; }
.exp-item ul { color: var(--on-muted); font-size: 14px; line-height: 1.9; padding-left: 18px; }

/* ===================== Contact ===================== */
.contact-wrap { padding: 46px; position: relative; overflow: hidden; }
.contact-glow1 { position: absolute; width: 260px; height: 260px; background: var(--primary-dark); border-radius: 50%; filter: blur(90px); opacity: .3; top: -60px; left: -60px; }
.contact-glow2 { position: absolute; width: 220px; height: 220px; background: var(--accent); border-radius: 50%; filter: blur(90px); opacity: .18; bottom: -60px; right: -40px; }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 20px; position: relative; z-index: 1; max-width: 480px; margin: 34px auto 0; }
.contact-item { display: flex; align-items: center; gap: 16px; text-decoration: none; color: #fff; padding: 14px; border-radius: 12px; transition: background .2s; }
.contact-item:hover { background: rgba(255,255,255,0.05); }
.contact-icon { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,201,60,0.12); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.contact-item-label { font-size: 12px; color: var(--on-muted); }
.contact-item-val { font-size: 15px; font-weight: 600; }
.social-links { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; justify-content: center; }
.social-btn {
  display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15); color: #fff; text-decoration: none; font-size: 13px; transition: all .2s;
}
.social-btn:hover { border-color: var(--secondary); color: var(--secondary); }

/* ===================== Footer ===================== */
footer { padding: 40px 6%; border-top: 1px solid rgba(255,255,255,0.06); text-align: center; }
.footer-logo { font-size: 20px; font-weight: 800; margin-bottom: 14px; }
.footer-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.footer-links a { color: var(--on-muted); text-decoration: none; font-size: 13px; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { color: #666f8c; font-size: 12.5px; }

/* ===================== Scroll top ===================== */
#scroll-top {
  position: fixed; bottom: 26px; right: 26px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #0c1324; border: none; font-size: 18px; cursor: pointer;
  opacity: 0; visibility: hidden; transition: all .3s; z-index: 90;
}
#scroll-top.show { opacity: 1; visibility: visible; }

/* ===================== Reveal ===================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
