:root {
  --bg: #0a0a0f;
  --bg-soft: #121218;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-strong: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.12);
  --text: #eef0f7;
  --text-muted: #a2a2b8;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --accent-gradient: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  --shadow-glow: 0 10px 35px rgba(139, 92, 246, 0.28);
  --radius-lg: 1.6rem;
  --radius-md: 1rem;
  --radius-sm: 0.6rem;
  --font-heading: "Poppins", sans-serif;
  --font-body: "Nunito", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  transition: color 0.2s ease, background-color 0.2s ease,
    border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease,
    opacity 0.2s ease;
}
:focus {
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
html {
  font-size: 62.5%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}
img {
  max-width: 100%;
  height: auto;
}
*::selection {
  background: var(--accent);
  color: #fff;
}
html::-webkit-scrollbar {
  width: 0.8rem;
}
html::-webkit-scrollbar-track {
  background: var(--bg-soft);
}
html::-webkit-scrollbar-thumb {
  background: var(--accent-gradient);
  border-radius: 1rem;
}

section {
  min-height: 100vh;
  padding: 8rem 9% 4rem;
}
.heading {
  font-family: var(--font-heading);
  font-size: 3.6rem;
  font-weight: 800;
  text-align: center;
  color: var(--text);
  margin-bottom: 3rem;
}
.heading h1,
.heading h2 {
  font-size: inherit;
  font-weight: inherit;
}
.heading span,
h1 span,
h2 span,
h3 span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* shared button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.4rem 3rem;
  border-radius: 4em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.05rem;
  color: #fff;
  background: var(--accent-gradient);
  box-shadow: var(--shadow-glow);
  cursor: pointer;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(139, 92, 246, 0.4);
}
.btn i {
  transition: transform 0.3s ease;
}
.btn:hover i {
  transform: translateX(4px);
}

/* shared glass card */
.card-surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card-surface:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

/* disabled/placeholder links */
.is-placeholder {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

/* header / navbar */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.6rem 9%;
  background: rgba(10, 10, 15, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}
header.scrolled {
  background: rgba(10, 10, 15, 0.85);
  border-bottom-color: var(--border);
}
header .logo {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
header .logo i {
  color: var(--accent);
}
header .logo:hover {
  color: var(--accent);
}
#menu {
  font-size: 2.8rem;
  cursor: pointer;
  color: var(--text);
  display: none;
}
header .navbar ul {
  list-style: none;
  display: flex;
  gap: 2.4rem;
}
header .navbar ul li a {
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.03rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid transparent;
}
header .navbar ul li a.active,
header .navbar ul li a:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

@media (max-width: 768px) {
  #menu {
    display: block;
  }
  header .navbar {
    position: fixed;
    top: 6.5rem;
    right: -120%;
    width: 75%;
    height: 100vh;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(20px);
    transition: right 0.4s ease;
  }
  header .navbar ul {
    flex-direction: column;
    padding: 2rem;
  }
  header .navbar ul li {
    width: 100%;
    margin: 0.8rem 0;
  }
  header .navbar ul li a {
    display: block;
    padding: 1.2rem;
    font-size: 1.8rem;
  }
  header .navbar.nav-toggle {
    right: 0;
  }
  .fa-times {
    transform: rotate(180deg);
  }
}

/* hero */
.home {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
  min-height: 100vh;
  padding-top: 10rem;
}
.home #particles-js {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.home .content {
  flex: 1 1 44rem;
  z-index: 1;
}
.home .content h2 {
  font-family: var(--font-heading);
  font-size: 5.2rem;
  font-weight: 800;
  color: var(--text);
}
.home .content p {
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 1.2rem 0 2rem;
}
.home .content p .typing-text {
  color: var(--accent-2);
}
.home .btn {
  position: relative;
  margin-top: 1rem;
}
.socials {
  margin-top: 6rem;
}
.socials .social-icons {
  list-style: none;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.social-icons a {
  width: 4.6rem;
  height: 4.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.9rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}
.social-icons a:hover {
  background: var(--accent-gradient);
  color: #fff;
  transform: translateY(-4px);
}
.home .image {
  flex: 1 1 34rem;
  z-index: 1;
  display: flex;
  justify-content: center;
}
.home .image img {
  width: 80%;
  max-width: 38rem;
  border-radius: 50%;
  border: 3px solid var(--border);
  box-shadow: var(--shadow-glow);
}

@media (max-width: 450px) {
  .home {
    padding-top: 8rem;
  }
  .home .content h2 {
    font-size: 3.6rem;
  }
  .home .content p {
    font-size: 1.9rem;
  }
}

/* about */
.about {
  background: var(--bg-soft);
}
.about .row {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: center;
  padding: 4rem 0;
}
.about .row .image {
  flex: 1 1 30rem;
  text-align: center;
}
.about .row .image img {
  width: 80%;
  max-width: 36rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.about .row .content {
  flex: 1 1 44rem;
}
.about .row .content h3 {
  font-family: var(--font-heading);
  font-size: 3.6rem;
  color: var(--text);
}
.about .row .content .tag {
  display: inline-block;
  margin: 1rem 0;
  padding: 0.5rem 1.4rem;
  border-radius: 2em;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 1.4rem;
  color: var(--accent-2);
}
.about .row .content p {
  font-size: 1.6rem;
  color: var(--text-muted);
  line-height: 1.8;
  text-align: left;
}
.about .row .content .box-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
}
.about .row .content .box-container .box {
  padding: 1.6rem 2rem;
  font-size: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.about .row .content .box-container .box p span {
  color: var(--accent-2);
  font-weight: 700;
}
.resumebtn {
  margin-top: 3rem;
}

@media (max-width: 600px) {
  .about .row {
    flex-direction: column;
    padding: 2rem 0;
  }
}

/* education */
.education {
  background: var(--bg);
}
.education .box-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 2rem 0;
}
.education .box-container .box {
  display: flex;
  width: 85%;
  max-width: 90rem;
  overflow: hidden;
}
.education .box-container .box .image {
  flex: 0 0 20rem;
}
.education .box-container .box .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.education .box-container .box .content {
  padding: 2rem;
}
.education .box-container .box .content h3 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--text);
}
.education .box-container .box .content p {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}
.education .box-container .box .content h4 {
  font-size: 1.5rem;
  color: var(--accent-2);
  margin-top: 0.6rem;
}

@media (max-width: 600px) {
  .education .box-container .box {
    flex-direction: column;
    width: 100%;
  }
  .education .box-container .box .image {
    flex-basis: 20rem;
  }
}

/* work: shared by #projects and #blogs (certifications) */
.work {
  background: var(--bg-soft);
}
.work .box-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}
.work .box-container .box {
  flex: 1 1 30rem;
  max-width: 34rem;
  overflow: hidden;
  padding: 0;
  display: block;
}
.work .box-container .box img {
  width: 100%;
  height: 20rem;
  object-fit: cover;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}
.work .box-container .box .content {
  padding: 1.6rem;
}
.work .box-container .box .content .tag h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--text);
}
.work .box-container .box .btns {
  display: flex;
  gap: 1rem;
  margin-top: 1.2rem;
}
.work .box-container .box .btns a {
  flex: 1;
  text-align: center;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.work .box-container .box .btns a:hover {
  background: var(--accent-gradient);
  color: #fff;
}
.work .viewall {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

@media (max-width: 600px) {
  .work .box-container .box {
    max-width: 100%;
  }
}

/* skills */
.skills {
  background: var(--bg);
}
.skills .container {
  max-width: 110rem;
  margin: 0 auto;
}
.skills .skills-group {
  margin-bottom: 3rem;
}
.skills .skills-group h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--accent-2);
  margin-bottom: 1.4rem;
  text-align: left;
}
.skills .row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}
.skills .bar {
  padding: 1rem 1.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2em;
}
.skills .bar:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: var(--accent-gradient);
}
.skills .bar .info span {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}
.skills .bar:hover .info span {
  color: #fff;
}

@media (max-width: 600px) {
  .skills .row {
    gap: 0.8rem;
  }
  .skills .bar {
    padding: 0.8rem 1.4rem;
  }
}

/* experience */
.experience {
  background: var(--bg-soft);
}
.experience .timeline {
  position: relative;
  max-width: 110rem;
  margin: 4rem auto 0;
  padding-top: 2rem;
}
.experience .timeline::after {
  content: "";
  position: absolute;
  width: 0.3rem;
  background: var(--border);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -0.15rem;
}
.experience .container {
  padding: 1rem 4rem;
  position: relative;
  width: 50%;
}
.experience .container::after {
  content: "";
  position: absolute;
  width: 1.6rem;
  height: 1.6rem;
  top: 2rem;
  background: var(--accent-gradient);
  border-radius: 50%;
  z-index: 1;
}
.experience .left {
  left: 0;
}
.experience .right {
  left: 50%;
}
.experience .left::after {
  right: -0.8rem;
}
.experience .right::after {
  left: -0.8rem;
}
.experience .content {
  padding: 2rem;
}
.experience .content .tag h2 {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  color: var(--text);
}
.experience .content .desc h3 {
  font-size: 1.5rem;
  color: var(--accent-2);
  margin-top: 0.6rem;
}
.experience .content .desc p {
  font-size: 1.4rem;
  color: var(--text-muted);
  margin-top: 0.8rem;
  line-height: 1.7;
}
.morebtn {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

@media (max-width: 600px) {
  .experience .timeline::after {
    left: 2.4rem;
  }
  .experience .container,
  .experience .right {
    width: 100%;
    left: 0;
    padding-left: 5.5rem;
    padding-right: 1rem;
  }
  .experience .left::after,
  .experience .right::after {
    left: 1.6rem;
  }
}

/* contact */
.contact {
  background: var(--bg);
}
.contact .container {
  max-width: 70rem;
  margin: 0 auto;
  padding: 3rem;
}
.contact form {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}
.contact .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.contact label {
  font-size: 1.4rem;
  color: var(--text-muted);
}
.contact input,
.contact textarea {
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.5rem;
}
.contact input:focus,
.contact textarea:focus {
  border-color: var(--accent);
}
.contact textarea {
  min-height: 14rem;
  resize: vertical;
}
.contact button.btn {
  align-self: flex-start;
  border: none;
}
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* footer */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  min-height: auto;
}
.footer .box-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  padding: 4rem 0 2rem;
}
.footer .box-container .box {
  flex: 1 1 26rem;
}
.footer .box-container .box h3 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 1rem;
  font-weight: 700;
}
.footer .box-container .box p,
.footer .box-container .box a {
  font-size: 1.5rem;
  color: var(--text-muted);
  display: block;
  padding: 0.3rem 0;
}
.footer .box-container .box p i {
  color: var(--accent);
  margin-right: 0.8rem;
}
.footer .box-container .box a:hover {
  color: var(--accent-2);
}
.footer .share {
  margin-top: 1.2rem;
}
.footer .share ul {
  display: flex;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer .share a {
  width: 3.8rem;
  height: 3.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.footer .share a:hover {
  background: var(--accent-gradient);
  color: #fff;
}
.footer .credit {
  text-align: center;
  padding: 2rem 0;
  font-size: 1.3rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
.footer .credit a {
  color: var(--accent-2);
}

/* scroll top */
#scroll-top {
  position: fixed;
  bottom: -10rem;
  right: 2rem;
  width: 4.6rem;
  height: 4.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gradient);
  color: #fff;
  border-radius: 50%;
  font-size: 1.8rem;
  box-shadow: var(--shadow-glow);
  z-index: 1000;
  transition: bottom 0.4s ease;
}
#scroll-top.active {
  bottom: 2rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* common breakpoints */
@media (max-width: 450px) {
  html {
    font-size: 55%;
  }
  section {
    padding: 6rem 5% 3rem;
  }
}
