/* Base Setup */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 191, 255, 0.6) rgba(255, 255, 255, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Chrome/Safari scrollbar styling */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.35); }
::-webkit-scrollbar-thumb {
  background: rgba(0, 191, 255, 0.55);
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.55);
}
::-webkit-scrollbar-thumb:hover { background: rgba(0, 191, 255, 0.75); }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: black;
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
}

/* Canvas Background */
#networkCanvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Social Icons Hover */
a.text-white:hover i {
  color: #00bfff;
  transform: scale(1.1);
  transition: 0.3s ease;
}


#floatingDataContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* Floating Text Animations */
.floating-data {
  position: absolute;
  font-size: 0.5rem;
  color: #00bfff;
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: floatUp 4s forwards ease-out;
}

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -150%) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -250%) scale(1.4);
  }
}

/* Content Container Layer */
.content-overlay {
  position: relative;
  z-index: 2;
}

/* Hero Section */
.hero-scroll-area {
  min-height: 100vh;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.section {
  width: 100%;
  position: relative;
}

/* Avatar Image */
.avatar-img {
  width: 120%;
  max-width: 600px;
  height: auto;
  transition: transform 0.3s ease;
}

.avatar-img:hover {
  transform: scale(1.05);
}

/* Navbar */
.nav-link {
  color: #ccc;
  margin-left: 20px;
  transition: color 0.3s;
}

.nav-link:hover {
  color: #00bfff;
}

.navbar-brand {
  font-size: 1.5rem;
}

/* Typography Enhancements */
.text-light-emphasis {
  color: rgba(255, 255, 255, 0.7);
}

.subtitle {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

/* Buttons */
.btn-outline-info:hover {
  background-color: #00bfff;
  color: white;
}

/* Portfolio */
#portfolio { scroll-margin-top: 90px; }
.portfolio-section {
  background: #ffffff;
  color: #0f0f0f;
}
.portfolio-container {
  padding: 6rem 1.5rem;
}
.portfolio-heading {
  font-weight: 700;
  font-size: clamp(2.2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  margin: 0 0 3rem;
}
.portfolio-row + .portfolio-row { margin-top: 4.5rem; }
.portfolio-item-title {
  font-weight: 700;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}
.portfolio-item-desc {
  color: #444;
  line-height: 1.9;
  margin: 0 0 1.75rem;
  max-width: 46ch;
}
.portfolio-item-extra { margin: -0.85rem 0 1.75rem; }
.portfolio-doi {
  color: #007da6;
  font-weight: 600;
  text-decoration: none;
}
.portfolio-doi:hover { color: #00bfff; text-decoration: underline; }
.portfolio-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #000;
  color: #fff;
  text-decoration: none;
  padding: 0.9rem 1.25rem;
  border: 1px solid #000;
  border-radius: 0;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.portfolio-cta:hover {
  color: #fff;
  background: #111;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}
.portfolio-cta:focus-visible {
  outline: 3px solid rgba(0, 191, 255, 0.35);
  outline-offset: 3px;
}

.portfolio-preview {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.8rem;
  border: 1px solid rgba(15, 15, 15, 0.14);
  background: #f4f5f7;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
}

/* Experience */
#experience { scroll-margin-top: 90px; }
.experience-section {
  background: #ffffff;
  color: #0f0f0f;
  border-top: 1px solid rgba(15, 15, 15, 0.12);
}
.experience-container { padding: 6rem 1.5rem; }
.experience-heading {
  font-weight: 700;
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}
.experience-summary {
  color: #333;
  line-height: 1.9;
  margin: 0 0 2rem;
  max-width: 56ch;
}
.experience-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.experience-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  text-decoration: none;
}
.experience-btn:focus-visible {
  outline: 3px solid rgba(0, 191, 255, 0.35);
  outline-offset: 3px;
}
.experience-btn--primary {
  background: #000;
  color: #fff;
  padding: 0.9rem 1.25rem;
  border: 1px solid #000;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.experience-btn--primary:hover {
  color: #fff;
  background: #111;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}
.experience-btn--secondary {
  color: #0f0f0f;
  gap: 0.55rem;
  border-bottom: 1px solid rgba(15, 15, 15, 0.25);
  padding-bottom: 0.1rem;
}
.experience-btn--secondary:hover {
  color: #000;
  border-bottom-color: rgba(0, 0, 0, 0.65);
}

.experience-timeline {
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}
.experience-dates {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 0.5rem;
}
.experience-role {
  font-weight: 700;
  font-size: clamp(1.2rem, 2.1vw, 1.65rem);
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
}
.experience-org {
  color: #00bfff;
  font-weight: 600;
  margin: 0 0 0.9rem;
}
.experience-bullets {
  margin: 0;
  padding-left: 1.25rem;
  color: #444;
  line-height: 1.7;
  font-size: 0.98rem;
}
.experience-bullets li + li { margin-top: 0.55rem; }

/* Education */
#education { scroll-margin-top: 90px; }
.education-section {
  background: #ffffff;
  color: #0f0f0f;
  border-top: 1px solid rgba(15, 15, 15, 0.12);
}
.education-container { padding: 6rem 1.5rem; }
.education-heading {
  font-weight: 700;
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  letter-spacing: -0.02em;
  margin: 0 0 3rem;
}
.education-item {
  position: relative;
  padding: 1.25rem 1rem;
}
.education-item > * { position: relative; z-index: 1; }
.education-item::before {
  content: "";
  position: absolute;
  top: -0.25rem;
  width: clamp(90px, 18vw, 130px);
  height: clamp(170px, 22vw, 240px);
  background: rgba(3, 53, 70, 0.06);
  transform: skewX(-18deg);
  border-radius: 0.6rem;
  z-index: 0;
}
.education-item--left::before { left: 18%; }
.education-item--right::before { left: 58%; }
.education-dates {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 0.6rem;
}
.education-school {
  font-weight: 700;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  letter-spacing: -0.01em;
  margin: 0 0 0.35rem;
}
.education-degree {
  margin: 0;
  color: #333;
  line-height: 1.8;
}
.education-notes {
  margin: 0.85rem 0 0;
  color: #444;
  line-height: 1.8;
}

/* Footer */
.site-footer {
  background: #000;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.site-footer__container { padding: 3.5rem 1.5rem; }
.site-footer__brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.25rem;
  color: #00bfff;
  margin-bottom: 0.75rem;
}
.site-footer__built {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.8;
  max-width: 62ch;
}
.site-footer__tech {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}
.site-footer__title {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 0.9rem;
}
.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.site-footer__links a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}
.site-footer__links a:hover { color: #00bfff; }
.site-footer__social {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.site-footer__bottom {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 991.98px) {
  .portfolio-container { padding: 4rem 1.25rem; }
  .portfolio-heading { margin-bottom: 2.25rem; }
  .portfolio-row + .portfolio-row { margin-top: 3.5rem; }
  .portfolio-item-desc { max-width: none; line-height: 1.75; }
  .portfolio-preview { box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14); }

  .experience-container { padding: 4.5rem 1.25rem; }
  .experience-heading { margin-bottom: 1rem; }
  .experience-summary { margin-bottom: 1.5rem; }
  .experience-timeline { gap: 2.25rem; }

  .education-container { padding: 4.5rem 1.25rem; }
  .education-heading { margin-bottom: 2.25rem; }
  .education-item { padding: 0.75rem 0.25rem; }
  .education-item::before {
    opacity: 0.65;
    left: auto;
    right: 0.25rem;
    width: 110px;
    height: 200px;
  }

  .site-footer__container { padding: 3rem 1.25rem; }
  .site-footer__bottom { margin-top: 1.75rem; }
}

@media (min-width: 1200px) {
  .portfolio-container { padding: 7rem 2rem; }
  .experience-container { padding: 7rem 2rem; }
  .education-container { padding: 7rem 2rem; }
  .site-footer__container { padding: 4rem 2rem; }
}

/* Back to Top Button */
#backToTopBtn {
  background-color: #00bfff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  text-align: center;
  line-height: 50px;
  transition: background-color 0.3s;
  z-index: 100;
}

#backToTopBtn:hover {
  background-color: #0099cc;
}

/* Remove Scroll Arrow */
.scroll-down-arrow {
  display: none;
}

/* ------------------------------
   Data Stories (WrapKit Inspired)
---------------------------------- */
.blog-home3 {
  font-family: "Montserrat", sans-serif;
  color: #8d97ad;
  font-weight: 300;
}

.blog-home3 h1,
.blog-home3 h2,
.blog-home3 h3,
.blog-home3 h4,
.blog-home3 h5,
.blog-home3 h6 {
  color: #ffffff;
}

.blog-home3 h5,
.blog-home3 h6 {
  line-height: 22px;
  font-size: 18px;
}

.blog-home3 a.link {
  color: #ffffff;
}

.blog-home3 a.link:hover {
  color: #00bfff;
}

.blog-home3 .font-weight-medium {
  font-weight: 500;
}

.blog-home3 .subtitle {
  color: #aaaaaa;
  line-height: 24px;
}

.blog-home3 .card.border-0 {
  background-color: black;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease-in;
}

.blog-home3 .card.border-0:hover {
  transform: translateY(-5px);
}

.blog-home3 .bg-success-gradiant {
  background: linear-gradient(to right, #2cdd9b 0%, #1dc8cc 100%);
}

.blog-home3 .date-pos {
  font-size: 15px;
}

#tagline {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

/* Equal-height small blog cards only */
.blog-home3 .data-story-mini {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: black;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease-in;
}

.blog-home3 .data-story-mini:hover {
  transform: translateY(-5px);
}

.blog-home3 .data-story-mini .card-img-top {
  height: 180px;
  object-fit: cover;
}

.blog-home3 .data-story-mini .p-3 {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ---------------------
   Responsive Tweaks
---------------------- */
@media (max-width: 575px) {
  #hero h1 {
    font-size: 2.2rem;
    line-height: 1.2;
  }
  #hero p.lead {
    font-size: 1.1rem;
  }
  .hero-scroll-area {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  .avatar-img {
    max-width: 180px;
  }
}

@media (min-width: 576px) and (max-width: 767px) {
  #hero h1 {
    font-size: 2.8rem;
  }
  #hero p.lead {
    font-size: 1.3rem;
  }
  .avatar-img {
    max-width: 220px;
  }
}


/* Data Stories Dropdown */
.nav-details { position: relative; }
.nav-details__details { position: relative; }
.nav-details__details > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.nav-details__details > summary::-webkit-details-marker { display: none; }
.nav-details__details > summary::marker { content: ""; }
.nav-details__summary { gap: 0.25rem; }
.nav-details__caret {
  font-size: 0.85em;
  opacity: 0.75;
  margin-left: 0.5rem;
  transition: transform 0.15s ease;
}
.nav-details__details[open] .nav-details__caret { transform: rotate(180deg); }
.nav-details__details[open] > summary { color: #00bfff; }

.nav-details__menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  transform: translateX(8px);
  min-width: 14rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  z-index: 2000;
}
.nav-details__details[open] .nav-details__menu { display: block; }
.nav-details__item {
  display: block;
  padding: 0.5rem 1rem;
  color: #e6e6e6;
  text-decoration: none;
}
.nav-details__item:hover { background: rgba(0, 191, 255, 0.12); color: #00bfff; }

/* Mobile: keep the dropdown in-flow so it doesn't look like a floating empty box */
@media (max-width: 991.98px) {
  /* Align mobile nav items flush left; base indentation happens via padding in the collapse */
  .nav-link { margin-left: 0; }
  .nav-details__details > summary { display: flex; width: 100%; }
  .nav-details__menu {
    position: static;
    min-width: 0;
    margin-top: 0.25rem;
    /* Indent + subtle guide line so the submenu reads like a menu group */
    margin-left: 1.25rem;
    padding: 0.15rem 0 0.15rem 0.75rem;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
  }
  .nav-details__item {
    padding: 0.25rem 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
  }
  .nav-details__item:hover {
    background: transparent;
    color: #00bfff;
  }
}
