/* =========================================================
   Theme
   =========================================================
*/

:root {
  --accent: #1677ff;
  --accent-hover: #0967e8;
  --text: #14213d;
  --muted: #61708a;
  --background: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f5f8fc;
  --border: #e7edf5;
}

[data-bs-theme="dark"] {
  --text: #eef4ff;
  --muted: #9aa9c0;
  --background: #0a101c;
  --surface: #101827;
  --surface-soft: #0d1523;
  --border: #202d40;
}


/* =========================================================
   Base
   =========================================================
*/

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  user-select: none;
  -webkit-user-select: none;
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background: var(--background);
  transition: background-color 0.25s, color 0.25s;
}

a {
  text-decoration: none;
}


/* =========================================================
   Navbar
   =========================================================
*/

.glass-nav {
  background: color-mix(
    in srgb,
    var(--background) 84%,
    transparent
  );
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border);

  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.glass-nav.show {
  opacity: 1;
  transform: translateY(0);
}

.navbar-brand {
  color: var(--text) !important;
  right: 1rem;
}

.navbar-brand span {
  color: var(--accent);
}

.navbar .nav-link {
  color: var(--text);
  font-weight: 600;
  padding: 0.7rem 0.8rem !important;
}

.navbar .nav-link.active {
  color: var(--accent-hover);
  animation: navlink-gradient 2s ease-in-out infinite;
}

@keyframes navlink-gradient {
  0%,
  100% {
    color: var(--accent-hover);
  }

  50% {
    color: rgb(2, 65, 202);
  }
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}

.theme-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

#themeToggle {
  margin-left: 5px;
}

/* =========================================================
   Hero
   =========================================================
*/

.hero-section {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 8rem 0 5rem;
  overflow: hidden;

  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.hero-section h1 {
  white-space: nowrap;
}

.hero-section h1 span {
  display: inline-block;
  opacity: 0;
  animation: text-reveal 0.08s ease forwards;
}

@keyframes text-reveal {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.hero-section.show {
  opacity: 1;
  transform: translateY(0);
}

.hero-section::before {
  position: absolute;
  top: 120px;
  right: -180px;
  width: 480px;
  height: 480px;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--accent) 18%, transparent),
    transparent 68%
  );
  content: "";
  pointer-events: none;
}

.eyebrow {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 999px;
  color: var(--accent);
  animation: eyebrow-gradient 3s ease-in-out infinite;
  font-size: 0.8rem;
  font-weight: 700;
}

@keyframes eyebrow-gradient {
  0%,
  100% {
    color: var(--accent-hover);
  }

  50% {
    color: rgb(2, 65, 202);
  }
}

.hero-role {
  color: var(--accent);
  animation: hero-role-gradient 3s ease-in-out infinite;
}

@keyframes hero-role-gradient {
  0%,
  100% {
    color: var(--accent-hover);
  }

  50% {
    color: rgb(2, 65, 202);
  }
}

.hero-copy {
  max-width: 620px;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}


/* =========================================================
   Buttons
   =========================================================
*/

.btn-primary {
  border-color: transparent;
  background: linear-gradient(
    90deg,
    rgba(9, 103, 232, 1) 0%,
    rgba(11, 0, 117, 1) 100%
  );
  background-size: 200% 100%;
  animation: btn-gradient 6s ease infinite;
}

.btn-primary:hover,
.btn-primary:active {
  border-color: transparent;
  animation-play-state: paused;
}

@keyframes btn-gradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 99% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}


/* =========================================================
   Socials
   =========================================================
*/

.socials {
  display: flex;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.socials a {
  color: var(--muted);
  font-size: 1rem;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.socials a:hover,
.socials a:active {
  color: var(--accent-hover);
  text-decoration: underline;
}


/* =========================================================
   Hero Card
   =========================================================
*/

.hero-card {
  position: relative;
  display: grid;
  height: 470px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--accent) 12%, var(--surface)),
    var(--surface),
    color-mix(in srgb, var(--accent) 6%, var(--surface))
  );
  background-size: 200% 200%;
  animation: heroGradient 10s ease-in-out infinite;
}

@keyframes heroGradient {
  0% {
    background-position: 0% 0%;
  }

  50% {
    background-position: 100% 100%;
  }

  100% {
    background-position: 0% 0%;
  }
}

.avatar-placeholder {
  position: relative;
  z-index: 2;
  display: grid;
  width: 250px;
  height: 310px;
  place-items: center;
  border-radius: 125px 125px 20px 20px;
  background: linear-gradient(145deg, #17233a, #050912);
  color: #8bbcff;
  font-size: 8rem;
  box-shadow: 0 30px 70px #0003;
}

.avatar-placeholder img {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  width: 105%;
  height: 120%;
  object-fit: cover;
  display: block;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.orb-one {
  bottom: -30px;
  left: -40px;
  width: 180px;
  height: 180px;
  background: #6db0ff66;
  animation: float 6s ease-in-out infinite;
}

.orb-two {
  top: -20px;
  right: -30px;
  width: 150px;
  height: 150px;
  background: #1677ff33;
  animation: float 8s ease-in-out infinite;
  animation-delay: -2s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}


/* =========================================================
   Sections
   =========================================================
*/

.section,
.section-muted {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.section.show,
.section-muted.show {
  opacity: 1;
  transform: translateY(0);
}

.section-muted {
  background: var(--surface-soft);
}

.section-heading {
  margin-bottom: 2.5rem;
}

.section-heading > span {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
}

.section-heading h2 {
  margin: 0.25rem 0 0;
  font-size: 2rem;
  font-weight: 800;
}


/* =========================================================
   About
   =========================================================
*/

.about-copy {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.85;
}

.stat-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.stat-card i {
  color: var(--accent);
  font-size: 1.5rem;
}

.stat-card strong {
  font-size: 1.7rem;
}

.stat-card small {
  color: var(--muted);
}

#about {
  padding-top: 3rem;
  padding-bottom: 3rem;
}


/* =========================================================
   Skills
   =========================================================
*/

.skill-card {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.skill-title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.7rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.skill-title b {
  color: var(--muted);
  font-size: 0.8rem;
}

.progress {
  height: 6px;
  background: var(--border);
}

.progress-bar {
  background: var(--accent);
  width: 0;
  transition: width 1.2s ease;
}

#skills {
  padding-top: 3rem;
  padding-bottom: 3rem;
}


/* =========================================================
   Interests
   =========================================================
*/

.interests-card {
  height: 100%;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    background-color 0.3s ease;
}

.interests-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent);
  font-size: 1.25rem;
}

.interests-card h3 {
  margin-bottom: 0.6rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.interests-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

#interests {
  padding-top: 3rem;
  padding-bottom: 3rem;
}


/* =========================================================
   Projects
   =========================================================
*/

.project-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  transition: transform 0.25s, box-shadow 0.25s;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 45px #0d1b3a12;
}

.project-preview {
  display: grid;
  height: 190px;
  place-items: center;
  font-size: 3rem;
}

.project-preview-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.project-preview-content img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.preview-dark {
  background: #0d1523;
  color: #fff;
  font-size: 2.2rem;
  font-weight: 800;
}

.preview-dark span span {
  color: var(--muted);
}

.preview-light {
  background: #edf4ff;
  color: var(--accent);
}

.preview-blue {
  background: linear-gradient(135deg, #1677ff, #74b4ff);
  color: #fff;
}

.project-type {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-status {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
}

.project-card h3 {
  margin: 0.4rem 0;
  font-size: 1.2rem;
}

.project-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.project-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.75rem;
  transition: all 0.2s;
}

.project-footer span {
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  background: var(--surface);
}

.project-footer a:active {
  transition: all 0.2s;
  color: var(--muted);
  text-decoration: underline;
}

.project-footer a {
  margin-left: auto;
  color: var(--accent);
  font-weight: 700;
}

#projects {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.github-stars {
  display: inline-flex;
  align-items: center;
  /* gap: 0.1rem; */
}

/* =========================================================
   Experience
   =========================================================
*/

#education.h4 {
  margin: 0 0 0.4rem;
  font-size: 0.5rem;
}

#education {
  padding-top: 3rem;
  padding-bottom: 3rem;
}


/* =========================================================
   Experience
   =========================================================
*/

.timeline {
  margin-left: 7px;
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1.5rem;
  padding: 0 0 3rem 2rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  top: 5px;
  left: -7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--surface-soft);
}

.timeline-date {
  color: var(--muted);
  font-size: 0.9rem;
}

.timeline-item h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.timeline-item h4 {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

#experience {
  padding-top: 3rem;
  padding-bottom: 3rem;
}


/* =========================================================
   Contact
   =========================================================
*/

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 3rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(
    120deg,
    var(--surface),
    color-mix(in srgb, var(--accent) 10%, var(--surface)),
    color-mix(in srgb, var(--accent) 3%, var(--surface)),
    color-mix(in srgb, var(--accent) 10%, var(--surface)),
    var(--surface)
  );
  background-size: 300% 300%;
  animation: contactGradient 8s ease infinite;
}

@keyframes contactGradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.contact-card p {
  margin-top: 1rem;
  color: var(--muted);
}

#contact {
  padding-top: 3rem;
  padding-bottom: 3rem;
}


/* =========================================================
   Back to Top
   =========================================================
*/

.top-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: transparent;
  border-radius: 12px;

  background: rgba(9, 103, 232, 1);
  animation: top-btn-gradient 2s ease-in-out infinite;

  color: #fff;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    color 0.3s ease,
    visibility 0.3s ease;
}

.top-btn.show {
  opacity: 1;
  visibility: visible;
}

.top-btn:active {
  animation-play-state: paused;
}

.top-btn:hover {
  animation-play-state: paused;
}

@keyframes top-btn-gradient {
  0%,
  100% {
    background-color: var(--accent);
  }

  50% {
    background-color: var(--accent-hover);
  }
}


/* =========================================================
   404
   =========================================================
*/

.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 1rem 6rem;
}

.error-content {
  max-width: 600px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.error-content.show {
  opacity: 1;
  transform: translateY(0);
}

.error-code {
  display: block;
  color: var(--accent);
  font-size: clamp(7rem, 20vw, 12rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.error-page h1 {
  margin-top: 1.5rem;
  color: var(--text);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
}

.error-page p {
  max-width: 480px;
  margin: 1rem auto 2rem;
  color: var(--muted);
  line-height: 1.7;
}

.error-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
}


/* =========================================================
   Footer
   =========================================================
*/

footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}


/* =========================================================
   Responsive
   =========================================================
*/

@media (max-width: 1199.98px) {
  .navbar-collapse {
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }

  .theme-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: flex-end;
  }

  .theme-btn {
    position: static;
    transform: none;
    margin-left: 0;
  }

  #themeToggle {
    margin-left: 5px;
  }

  .hero-section {
    padding-top: 7rem;
  }

  .hero-card {
    height: 380px;
  }
}

@media (max-width: 991px) {
  .navbar-collapse {
    padding: 1rem 0;
  }

  .theme-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: flex-end;
  }

  .theme-btn {
    position: static;
    transform: none;
    margin-left: 0;
  }

  #themeToggle {
    margin-left: 5px;
  }

  .hero-section h1 {
    margin-inline: auto;
  }

  .hero-section {
    padding-top: 7rem;
  }

  .hero-card {
    height: 380px;
  }
}

@media (max-width: 767px) {
  .hero-section {
    text-align: center;
  }

  .hero-copy {
    margin-right: auto;
    margin-left: auto;
  }

  .hero-card {
    height: 330px;
  }

  .avatar-placeholder {
    width: 180px;
    height: 230px;
    font-size: 6rem;
  }

  .section {
    padding: 4.5rem 0;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .contact-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem;
  }
}
