:root {
  --primary-color: #22d3ee;
  --heading-color: #e5e7eb;
  --text-color: #9ca3b0;
  --bg-color: #111827;
  --bg-secondary-color: #1f2937;
  --border-color: rgba(255, 255, 255, 0.1);
  --header-height: 70px;
  --card-bg: #1f2937;
  --shadow-color: rgba(0, 0, 0, 0.5);
  --glow-color: var(--primary-color);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  line-height: 1.7;
  background-color: var(--bg-color);
  color: var(--text-color);
  padding-top: var(--header-height);
  cursor: none;
}

h1,
h2,
h3 {
  margin-bottom: 1rem;
  color: var(--heading-color);
  font-weight: 600;
  line-height: 1.3;
}

h2 {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 3rem;
}

section {
  padding: 4rem 1rem;
  overflow: hidden;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  cursor: none;
}

img {
  max-width: 100%;
  height: auto;
}

.cursor {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transition: transform 0.2s ease, opacity 0.3s ease;
}
#cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary-color);
}
#cursor-outline {
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary-color);
  opacity: 0.5;
  transition: transform 0.2s ease, opacity 0.3s ease, background-color 0.2s;
}
.cursor-interactive {
  transform: scale(1.5);
  background-color: rgba(34, 211, 238, 0.3);
  opacity: 1;
}

header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  background-color: rgba(31, 41, 55, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  height: var(--header-height);
}

.logo a {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--heading-color);
  letter-spacing: 1px;
}

.nav-links {
  display: none;
}

.hamburger-menu {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 28px;
  height: 22px;
  cursor: pointer;
  z-index: 1002;
}

.hamburger-menu .bar {
  width: 100%;
  height: 3px;
  background-color: var(--heading-color);
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}
.mobile-nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background-color: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  z-index: 999;
}

.mobile-nav.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-nav-links {
  list-style: none;
  text-align: center;
}
.mobile-nav-links li {
  margin: 2.5rem 0;
}
.mobile-nav-links a {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--heading-color);
  transition: color 0.3s ease;
}
.mobile-nav-links a:hover {
  color: var(--primary-color);
}

.cta-button {
  display: inline-block;
  background-color: var(--primary-color);
  color: #111827;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid transparent;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(34, 211, 238, 0.2);
}

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-up:nth-child(2) {
  transition-delay: 0.1s;
}
.fade-up:nth-child(3) {
  transition-delay: 0.2s;
}
.fade-up:nthchild(4) {
  transition-delay: 0.3s;
}

.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: calc(90vh - var(--header-height));
  padding: 0 1rem;
  position: relative;
  overflow: hidden;

  background-image: linear-gradient(
      rgba(17, 24, 39, 0.7),
      rgba(17, 24, 39, 0.7)
    ),
    url("cover-photo.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.hero-content h1 {
  font-size: 2.5rem;
  color: var(--heading-color);
  font-weight: 700;
  animation: fadeIn 1s ease-out 0.2s forwards;
  opacity: 0;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  color: var(--text-color);
  min-height: 2.2rem;
  animation: fadeIn 1s ease-out 0.4s forwards;
  opacity: 0;
}

.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1.2rem;
  background-color: var(--primary-color);
  animation: blink 0.7s infinite;
  margin-left: 5px;
  vertical-align: middle;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.hero-content .cta-button {
  animation: fadeIn 1s ease-out 0.6s forwards;
  opacity: 0;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* --- About Section --- */
#about {
  background-color: var(--bg-secondary-color);
}
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.about-content img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.5rem auto;
  border: 4px solid var(--primary-color);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.3);
}
.about-content p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
}

/* --- Experience & Education Section --- */
.experience-column h3 {
  font-size: 1.8rem;
  color: var(--heading-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
}
.experience-item {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--primary-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.experience-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--shadow-color);
}
.experience-item h4 {
  font-size: 1.2rem;
  color: var(--heading-color);
  margin-bottom: 0.25rem;
}
.experience-item h5 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}
.experience-item p {
  color: var(--text-color);
}
.experience-item ul {
  list-style-type: none;
  padding-left: 0;
  margin-top: 1rem;
}
.experience-item li {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
}
.experience-item li::before {
  content: "▹";
  position: absolute;
  left: 0;
  top: -1px;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.4rem;
}
.experience-item li span {
  display: block;
  font-size: 0.9rem;
  color: #777;
  font-weight: 400;
  margin-top: 0.25rem;
}
.achievements-list li::before {
  content: "🏆";
  font-size: 1rem;
  top: 2px;
}

/* --- Skills Section --- */
#skills {
  background-color: var(--bg-secondary-color);
}
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.skill-card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
}
/* NEW: Glowing Border Effect */
.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  border: 2px solid transparent;
  background: linear-gradient(to right, var(--glow-color), var(--primary-color))
    border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.skill-card:hover {
  transform: translateY(-8px);
}
.skill-card:hover::before {
  opacity: 1;
}
.skill-card i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}
.skill-card:hover i {
  transform: scale(1.1);
}
.skill-card h3 {
  font-size: 1.5rem;
  color: var(--heading-color);
}

/* --- Project & Certificate Slider Styles --- */
#projects,
#certificates {
  background-color: var(--bg-color);
}
#certificates {
  background-color: var(--bg-secondary-color);
}

.swiper {
  width: 100%;
  padding: 1rem 3.5rem;
}
.swiper-slide {
  display: flex;
  justify-content: center;
  align-items: stretch;
  height: auto;
}
.swiper-button-next,
.swiper-button-prev {
  color: var(--primary-color);
  transition: transform 0.2s ease;
}
.swiper-button-next:hover,
.swiper-button-prev:hover {
  transform: scale(1.2);
}

.project-card {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  position: relative;
}
.project-card:hover {
  transform: translateY(-8px);
}
.project-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background-color: var(--card-bg);
  filter: brightness(0.9);
  transition: filter 0.3s ease;
}
.project-card:hover img {
  filter: brightness(1);
}
.project-card h3 {
  padding: 1.5rem 1.5rem 0.5rem 1.5rem;
}
.project-card p {
  padding: 0 1.5rem;
  flex-grow: 1;
}
.tech-stack {
  padding: 0 1.5rem;
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tech-tag {
  background-color: rgba(34, 211, 238, 0.1);
  color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
}
.project-link {
  display: inline-block;
  margin: 1.5rem;
  font-weight: 600;
}

.certificate-link {
  display: block;
  text-decoration: none;
  height: 100%;
}

.certificate-card {
  background: var(--card-bg);
  border-radius: 8px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.certificate-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px var(--shadow-color);
}

.certificate-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background-color: var(--card-bg);
}

.certificate-content {
  padding: 1.5rem;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.certificate-content h4 {
  color: var(--heading-color);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.certificate-content p {
  color: var(--text-color);
  font-size: 1rem;
  margin-bottom: 0;
}

/* --- Contact Section --- */
#contact {
  text-align: center;
}
#contact p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2.5rem auto;
}
.contact-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 2rem 1rem;
  background-color: var(--bg-secondary-color);
  color: var(--text-color);
  border-top: 1px solid var(--border-color);
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--primary-color);
  color: var(--bg-color);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: none;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 10px rgba(34, 211, 238, 0.2);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 900;
  font-family: sans-serif;
}
.back-to-top:hover {
  transform: translateY(-5px);
}
.back-to-top.show {
  display: flex;
}
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 1rem;
}
.modal-overlay.show {
  display: flex;
}

.modal-content {
  position: relative;
  background: var(--bg-secondary-color);
  border-radius: 8px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 1rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px var(--shadow-color);
}

.modal-content h3 {
  text-align: center;
  color: var(--heading-color);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: -1rem;
  background: var(--bg-secondary-color);
  z-index: 10;
  padding-top: 1rem;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2.5rem;
  color: var(--text-color);
  cursor: none;
  line-height: 1;
  z-index: 2001;
  transition: color 0.3s ease, transform 0.3s ease;
}
.close-modal:hover {
  color: var(--primary-color);
  transform: rotate(90deg);
}
#resume-viewer {
  margin-top: 1rem;
}

#resume-viewer img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.download-btn {
  display: block;
  width: fit-content;
  margin: 1.5rem auto 0.5rem auto;
}

/* --- DESKTOP STYLES (Tablet & Up) --- */
@media (min-width: 769px) {
  body {
    padding-top: var(--header-height);
  }
  section {
    padding: 6rem 2rem;
  }
  nav {
    padding: 0 2rem;
  }
  h2 {
    font-size: 2.8rem;
  }
  .hamburger-menu {
    display: none;
  }
  .nav-links {
    display: flex;
    list-style: none;
    align-items: center;
  }
  .nav-links li {
    margin-left: 1.5rem;
  }
  .nav-links a {
    font-weight: 500;
    color: var(--text-color);
    padding: 0.5rem 0.25rem;
    position: relative;
    transition: color 0.3s ease;
  }
  .nav-links a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
  }
  .nav-links a:hover,
  .nav-links a.active {
    color: var(--heading-color);
  }
  .nav-links a:hover::after,
  .nav-links a.active::after {
    width: 100%;
  }
  .nav-links .resume-trigger {
    margin-left: 2rem;
    padding: 0.5rem 1.2rem;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
  }
  .nav-links .resume-trigger:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
  }
  .nav-links .resume-trigger::after {
    display: none;
  }
  .hero-content h1 {
    font-size: 3.5rem;
  }
  .hero-content p {
    font-size: 1.25rem;
    min-height: 2.5rem;
  }
  .experience-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
  }
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 1200px;
    margin: 0 auto;
  }
  .contact-links {
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
  }
  .modal-content {
    padding: 2rem;
  }
}

/* --- Larger Desktop Styles --- */
@media (min-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
