@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --bg-color: #0B1121;
  --bg-card: #111827;
  --accent-color: #75baff;
  --text-main: #ffffff;
  --text-muted: #cbd5e1;
}

body {
  background-color: var(--bg-color);
  color: var(--text-muted);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  scroll-behavior: smooth;
}

nav {
  position: fixed;
  width: 100%;
  padding: 20px 0;
  z-index: 998;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

nav.sticky {
  background: rgba(11, 17, 33, 0.9);
  backdrop-filter: blur(10px);
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav .navbar {
  width: 90%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: auto;
}

nav .navbar .logo a {
  font-weight: 600;
  font-size: 25px;
  color: var(--text-main);
}

nav.sticky .navbar .logo a {
  color: var(--text-main);
}

nav .navbar .menu {
  display: flex;
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 24px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

nav .navbar .menu li {
  list-style: none;
  margin: 0 12px;
}

.navbar .menu a {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 0;
  transition: all 0.3s ease;
}

.navbar .menu a:hover {
  color: var(--accent-color);
}

nav.sticky .menu a {
  color: var(--text-muted);
}

nav.sticky .menu a:hover {
  color: var(--accent-color);
}

.navbar .media-icons a {
  color: var(--text-muted);
  font-size: 18px;
  margin: 0 6px;
  transition: color 0.3s;
}

.navbar .media-icons a:hover {
  color: var(--accent-color);
}

nav.sticky .media-icons a {
  color: var(--text-muted);
}

nav .menu-btn,
.navbar .menu .cancel-btn {
  position: absolute;
  color: var(--text-main);
  right: 30px;
  top: 20px;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: none;
}

nav .menu-btn {
  color: var(--text-main);
}

nav.sticky .menu-btn {
  color: var(--text-main);
}

.navbar .menu .menu-btn {
  color: #fff;
}

#starsCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: radial-gradient(ellipse at bottom, #111827 0%, #0B1121 100%);
  pointer-events: none;
}

.home {
  height: 100vh;
  width: 100%;
  font-family: 'Poppins', sans-serif;
  position: relative;
  z-index: 1;
}

.home .home-content {
  width: 90%;
  height: 100%;
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding-top: 60px;
}

.home .text-one {
  font-size: 25px;
  color: var(--text-main);
  font-weight: 600;
}

.home .text-two {
  color: var(--text-main);
  font-size: 55px;
  font-weight: 700;
  margin-left: -3px;
}

.home .text-three {
  font-size: 35px;
  margin: 5px 0;
  color: var(--accent-color);
  font-weight: 600;
}

.home .left-text {
  flex: 1 1 420px;
}

.home .right-image {
  flex: 1 1 420px;
  display: flex;
  justify-content: center;
}

.home .right-image img {
  width: 100%;
  max-width: 350px;
  border-radius: 20px;
  height: auto;
}

.home .button {
  margin: 14px 0;
}

.btn-primary,
.btn-secondary {
  outline: none;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--accent-color);
  color: #fff;
  border: 2px solid var(--accent-color);
  box-shadow: 0 4px 15px rgba(117, 186, 255, 0.4);
}

.btn-primary:hover {
  background: #4da0eb;
  border-color: #4da0eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(117, 186, 255, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
  background: rgba(117, 186, 255, 0.1);
  transform: translateY(-2px);
}

.btn-primary:active,
.btn-secondary:active {
  transform: scale(0.96);
}

section {
  padding-top: 40px;
  position: relative;
  z-index: 1;
}

section .content {
  width: 80%;
  margin: 40px auto;
  font-family: 'Poppins', sans-serif;
  color: var(--text-muted);
}

.about .about-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

section .title {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

section .title span {
  color: var(--text-main);
  font-size: 30px;
  font-weight: 600;
  position: relative;
  padding-bottom: 8px;
}

section .title span::before,
section .title span::after {
  content: '';
  position: absolute;
  height: 3px;
  width: 100%;
  background: var(--accent-color);
  left: 0;
  bottom: 0;
}

section .title span::after {
  bottom: -7px;
  width: 70%;
  left: 50%;
  transform: translateX(-50%);
}

.about .about-details .left {
  width: 45%;
}

.about .left img {
  max-width: 100%;
  width: 380px;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
}

.about-details .right {
  width: 55%;
}

section .topic {
  color: #0E2431;
  font-size: 25px;
  font-weight: 500;
  margin-bottom: 10px;
}

.about-details .right p {
  text-align: justify;
  color: #0E2431;
}

section .button {
  margin: 16px 0;
}

/* Generic button replacement applied above */

.skills {
  background: transparent;
}

.skills .content {
  padding: 40px 0;
}

.skills .skills-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  align-items: start;
}

.skill-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  flex: 1 1 200px;
  max-width: 300px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s, border-color 0.3s;
}

.skill-card:hover {
  transform: translateY(-5px);
  border-color: rgba(117, 186, 255, 0.4);
}

.skills-details .text {
  width: 50%;
}

.skills-details p {
  color: #0E2431;
  text-align: justify;
}

.skills .skills-details .experience {
  display: flex;
  align-items: center;
  margin: 0 10px;
}

.skills-details .experience .num {
  color: #0E2431;
  font-size: 80px;
}

.skills-details .experience .exp {
  color: #0E2431;
  margin-left: 20px;
  font-size: 18px;
  font-weight: 500;
  margin: 0 6px;
}

.skills-details .boxes {
  width: 45%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.skills-details .box {
  width: calc(100% / 2 - 20px);
  margin: 20px 0;
}

.skills-details .boxes .topic {
  font-size: 20px;
  color: #0d1b2aff;
}

.skills-details .boxes .per {
  font-size: 60px;
  color: #0d1b2aff;
}

.Projects .boxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  justify-items: center;
}

.project-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 350px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(117, 186, 255, 0.4);
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0;
}

.tech-pill {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact {
  background: transparent;
}

.contact .content {
  margin: 0 auto;
  padding: 30px 0;
}

.contact .text {
  width: 80%;
  text-align: center;
  margin: auto;
}

.scroll-button a {
  position: fixed;
  bottom: 20px;
  right: 20px;
  color: #fff;
  background: #0d1b2aff;
  padding: 7px 12px;
  ;
  font-size: 18px;
  border-radius: 6px;
  box-shadow: rgba(0, 0, 0, 0.15);
  display: none;
}

@media (max-width: 1190px) {
  section .content {
    width: 85%;
  }
}

/* Larger screens: make home content row layout */
@media (min-width: 900px) {
  .home .home-content {
    flex-direction: row;
    align-items: center;
    padding-top: 100px;
  }
}

@media (max-width: 1000px) {
  .about .about-details {
    justify-content: center;
    flex-direction: column;
  }

  .about .about-details .left {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .about-details .right {
    width: 90%;
    margin: 40px 0;
  }

  .Projects .boxes .box {
    margin: 20px 0;
    width: calc(100% / 2 - 20px);
  }
}

@media (max-width: 900px) {
  .about .left img {
    height: 350px;
    width: 350px;
  }
}

@media (max-width: 750px) {
  nav .navbar {
    width: 90%;
  }

  nav .navbar .menu {
    position: fixed;
    left: -100%;
    top: 0;
    background: #0E2431;
    height: 100vh;
    max-width: 400px;
    width: 100%;
    padding-top: 60px;
    flex-direction: column;
    align-items: center;
    transition: all 0.5s ease;
  }

  .navbar.active .menu {
    left: 0;
  }

  nav .navbar .menu a {
    font-size: 23px;
    display: block;
    color: #fff;
    margin: 10px 0;
  }

  nav.sticky .menu a:hover {
    color: #0d1b2aff;
  }

  nav .navbar .media-icons {
    display: none;
  }

  nav .menu-btn,
  .navbar .menu .cancel-btn {
    display: block;
  }

  .home .text-two {
    font-size: 65px;
  }

  .home .text-three {
    font-size: 35px;
  }

  .skills .skills-details {
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }

  .skills-details .text {
    width: 100%;
    margin-bottom: 50px;
  }

  .skills-details .boxes {
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  .services .boxes .box {
    margin: 20px 0;
    width: 100%;
  }

  .contact .text {
    width: 100%;
  }
}

@media (max-width: 500px) {
  .home .text-two {
    font-size: 55px;
  }

  .home .text-three {
    font-size: 33px;
  }

  .skills-details .boxes .per {
    font-size: 50px;
    color: #0d1b2aff;
  }
}

@media (max-width: 480px) {
  nav {
    padding: 12px 0;
  }

  nav .navbar {
    width: 95%;
  }

  .home {
    min-height: calc(100vh - 80px);
  }

  .home .home-content {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    gap: 18px;
  }

  .home .text-one {
    font-size: 20px;
  }

  .home .text-two {
    font-size: 30px;
  }

  .home .text-three {
    font-size: 20px;
  }

  .home .button {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 260px;
    padding: 10px 16px;
  }

  .about .about-details {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .about .about-details .left,
  .about .about-details .right {
    width: 100%;
    margin: 0;
  }

  .about .left img {
    width: 220px;
    height: 220px;
  }

  .skills .skills-details,
  .Projects .boxes,
  .about .about-details {
    flex-direction: column;
  }

  .skills-details .text,
  .skills-details .boxes,
  .skills-details .experience,
  .Projects .project-card {
    width: 100%;
  }

  .skills-details .boxes .box,
  .Projects .boxes .box {
    width: 100%;
    margin: 12px 0;
  }

  .contact .text {
    width: 100%;
  }

  .contact .contact-details {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
  }

  .contact .contact-details .right,
  .contact .contact-details .left {
    width: 100% !important;
  }

  .contact .content {
    max-width: 95% !important;
    padding: 20px !important;
  }

  .scroll-button a {
    right: 12px;
    bottom: 12px;
    padding: 8px 10px;
    font-size: 16px;
  }

  .navbar .menu {
    padding-top: 70px;
  }

  .navbar .menu a {
    font-size: 20px;
  }

  .navbar .media-icons a {
    font-size: 16px;
  }
}

/* color variables moved into :root for correctness */
:root {
  --rich-black: #0d1b2aff;
  --oxford-blue: #1b263bff;
  --yinmn-blue: #415a77ff;
  --silver-lake-blue: #778da9ff;
  --platinum: #e0e1ddff;
}