* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background-color: #050505;

  overflow-x: hidden;
  font-family: "Poppins", "Helvetica Neue", sans-serif;
  scroll-behavior: smooth;
}

.gradient-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.gradient-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
}

.sphere-1 {
  width: 40vw;
  height: 40vw;
  background: linear-gradient(
    40deg,
    rgba(255, 0, 128, 0.8),
    rgba(255, 102, 0, 0.4)
  );
  top: -10%;
  left: -10%;
  animation: float-1 15s ease-in-out infinite alternate;
}

.sphere-2 {
  width: 45vw;
  height: 45vw;
  background: linear-gradient(
    240deg,
    rgba(72, 0, 255, 0.8),
    rgba(0, 183, 255, 0.4)
  );
  bottom: -20%;
  right: -10%;
  animation: float-2 18s ease-in-out infinite alternate;
}

.sphere-3 {
  width: 30vw;
  height: 30vw;
  background: linear-gradient(
    120deg,
    rgba(133, 89, 255, 0.5),
    rgba(98, 216, 249, 0.3)
  );
  top: 60%;
  left: 20%;
  animation: float-3 20s ease-in-out infinite alternate;
}

.noise-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.02;
  z-index: 5;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

@keyframes float-1 {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(10%, 10%) scale(1.1);
  }
}

@keyframes float-2 {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-10%, -5%) scale(1.15);
  }
}

@keyframes float-3 {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
  100% {
    transform: translate(-5%, 10%) scale(1.05);
    opacity: 0.6;
  }
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 40px 40px;
  background-image: linear-gradient(
      to right,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  z-index: 2;
  animation: gridSlide 6s linear infinite;
}
@keyframes gridSlide {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 40px 0; /* Move one grid unit to the right */
  }
}
.glow {
  position: absolute;
  width: 40vw;
  height: 40vh;
  background: radial-gradient(circle, rgba(72, 0, 255, 0.15), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  animation: pulse 8s infinite alternate;
  filter: blur(30px);
}

@keyframes pulse {
  0% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(0.9);
  }
  100% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

/* navigation bar styling*/
.navi {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 20;
  padding: 1.5rem 2rem;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navi h1 {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

/* nav button */
#menu-toggle {
  background: linear-gradient(90deg, #ff3a82, #5233ff);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 20px rgba(255, 58, 130, 0.3);
}

#menu-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 58, 130, 0.4);
}
/* Content Section styles */
.content-section {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  margin-bottom: 15rem;
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: #ffffff;

  text-align: center;
  margin-bottom: 4rem;
  letter-spacing: 0.1em;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 4px;
  background: linear-gradient(90deg, #ff3a82, #5233ff);
  border-radius: 2px;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 10;
  padding: 0 2rem;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 8rem);
  font-weight: 900;
  color: #ffffff;
  font-family: "Space Mono", monospace;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
  cursor: default;
  transition: all 0.3s ease;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: #b0b0b0;
  font-weight: 300;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
}

/* About Section */

.about-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;
  min-height: 500px;
}

.about-item {
  background: rgba(15, 15, 15, 0.95); /* More opaque background */
  border-radius: 16px;
  padding: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px); /* Added backdrop filter */
}

.about-education {
  grid-row: span 2;
  background: linear-gradient(
    135deg,
    rgba(15, 15, 15, 0.95),
    rgba(255, 58, 130, 0.08)
  );
}

.about-personal {
  background: linear-gradient(
    135deg,
    rgba(15, 15, 15, 0.95),
    rgba(82, 51, 255, 0.08)
  );
}

.about-skills-preview {
  background: linear-gradient(
    135deg,
    rgba(15, 15, 15, 0.95),
    rgba(102, 126, 234, 0.08)
  );
}

.about-header {
  font-size: 1.5rem;
  color: #667eea;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #e0e0e0; /* Explicit white text color */
  margin-bottom: 1.5rem;
}

.about-text strong {
  color: #ffffff;
  font-weight: 600;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.skill-tag {
  background: rgba(102, 126, 234, 0.15);
  color: #667eea;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid rgba(102, 126, 234, 0.3);
}

/* Experience Section */
.experience-content {
  display: flex;
  flex-direction: column;
  max-width: 800px;
  gap: 1rem;
  margin: 0 auto;
}

.experience-item {
  border-radius: 16px;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.experience-header {
  width: 100%;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #0f0f0f;
  border: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 0.3s ease;
}

.experience-header:hover {
  background: #1f1f1f;
}

.experience-header-content h3 {
  font-size: 1.4rem;
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.experience-header-content p {
  font-size: 1rem;
  color: #667eea;
  font-weight: 500;
}

.accordion-toggle {
  font-size: 1.4rem;
  color: #667eea;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.experience-item.active .accordion-toggle {
  transform: rotate(180deg);
}

.experience-details {
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  max-height: 0;
  padding: 0 2rem;
  opacity: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.064);
  background: linear-gradient(
    135deg,
    rgba(15, 15, 15, 0.95),
    rgba(82, 51, 255, 0.08)
  );
}

.experience-item.active .experience-details {
  max-height: 300px; /* More precise height */
  padding: 1.5rem 2rem 2rem;
  opacity: 1;
}

.experience-details ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.experience-details li {
  font-size: 1.1rem;
  color: #e0e0e0;
  line-height: 1.7;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  position: relative;
}

.experience-details li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: #667eea;
  font-weight: bold;
}

/* Skills Section */

.skills-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}
.skills-container .frontend {
  grid-column: 1;
  grid-row: span 2;
}
.skills-container .backend {
  grid-column: 2;
  grid-row: 1;
}

.skills-container .database {
  grid-column: 2;
  grid-row: span 2;
}

.skills-container .tools {
  grid-column: 1;
  grid-row: 3;
}
.skills-card {
  background: linear-gradient(
    135deg,
    rgba(15, 15, 15, 0.95),
    rgba(82, 51, 255, 0.08)
  );

  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skills-card h3 {
  font-size: 1.4rem;
  color: #ffffff;
  margin-bottom: 1.5rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.05em;
}

.skills-icons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  justify-items: center;
}

.skill-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 1rem;
  border-radius: 12px;
}

.skill-icon img {
  width: 60px;
  height: 60px;
  margin-bottom: 0.8rem;
}

.skill-icon span {
  color: #e0e0e0;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
}

.skill-icon:hover {
  transform: translateY(-6px) scale(1.05);
}

/* Projects Section */

.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 2rem;
}

.project-card {
  background: #141414;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.project-preview {
  height: 350px;
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}
.project-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: brightness(0.9) contrast(1.1);
}

.project-icon {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  font-style: italic;
  font-weight: 600;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.project-card-content {
  padding: 2rem;
  text-align: center;
}

.project-card-title {
  font-size: 1.5rem;
  color: #ffffff;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.05em;
}

.project-click-hint {
  position: absolute;
  top: 10px;
  right: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: #667eea;
  padding: 0.3rem 0.6rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-click-hint {
  opacity: 1;
}

/* Dialog Styles */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.dialog-overlay.active {
  opacity: 1;
  visibility: visible;
}

.dialog {
  background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.8);
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
}

.dialog-overlay.active .dialog {
  transform: scale(1) translateY(0);
}

.dialog-close {
  position: absolute;
  top: 20px;
  right: 25px;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 10;
}

.dialog-close:hover {
  color: #ff3a82;
}

.dialog-image {
  width: 100%;
  height: 500px;
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden; /* Prevent overflow */
}

.dialog-image img {
  width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
}

.dialog-content {
  padding: 3rem;
}

.dialog-title {
  font-size: 2.5rem;
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
}

.dialog-description {
  font-size: 1.2rem;
  color: #e0e0e0;
  line-height: 1.8;
  margin-bottom: 3rem;
  text-align: center;
}

.dialog-tech-section {
  margin-bottom: 3rem;
}

.dialog-tech-title {
  font-size: 1.4rem;
  color: #667eea;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
}

.dialog-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.dialog-tech-badge {
  background: rgba(102, 126, 234, 0.15);
  color: #667eea;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

.dialog-tech-badge:hover {
  background: rgba(102, 126, 234, 0.25);
  transform: translateY(-2px);
}

.dialog-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2rem;
}

.dialog-link {
  display: inline-block;
  padding: 1.2rem 2.5rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  text-decoration: none;
  border-radius: 15px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 2px solid transparent;
}

.dialog-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

.dialog-link.secondary {
  background: transparent;
  border: 2px solid #667eea;
  color: #667eea;
}

.dialog-link.secondary:hover {
  background: #667eea;
  color: white;
}
/* Footer */
footer {
  background: #0f0f0f;
  padding: 4rem 2rem;
  text-align: center;

  margin-top: 4rem;
  position: relative;
  z-index: 10;
}

footer h2 {
  font-size: 2rem;
  color: #ffffff;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

footer p {
  font-size: 1.1rem;
  color: #b0b0b0;
  margin-bottom: 1rem;
}

footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #764ba2;
}

/* Responsive Design */
@media (max-width: 768px) {
  .navi {
    padding: 1rem;
  }

  .navi h1 {
    font-size: 1rem;
  }

  #menu-toggle {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }

  .content-section {
    padding: 4rem 1rem;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .about-education {
    grid-row: span 1;
  }

  .skills-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    max-width: 100%;
    padding: 0 1rem;
    gap: 1.5rem;
  }

  .skills-container .frontend,
  .skills-container .backend,
  .skills-container .database,
  .skills-container .tools {
    grid-column: 1;
    grid-row: auto;
  }

  .skills-card {
    padding: 1.5rem;
  }

  .skills-icons {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .skill-icon {
    padding: 0.8rem;
  }

  .skill-icon img {
    width: 50px;
    height: 50px;
  }

  .skill-icon span {
    font-size: 0.85rem;
  }

  .projects-container {
    grid-template-columns: 1fr;
  }

  .dialog {
    width: 95%;
    max-width: none;
    margin: 1rem;
    max-height: 85vh;
  }

  .dialog-image {
    height: 250px; /* Consolidated final value */
  }

  .dialog-content {
    padding: 1.5rem;
  }

  .dialog-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }

  .dialog-description {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .dialog-tech-stack {
    gap: 0.8rem;
  }

  .dialog-tech-badge {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .dialog-links {
    flex-direction: column;
    gap: 1rem;
  }

  .dialog-link {
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
  }

  /* More height for experience details on smaller screens */
  .experience-item.active .experience-details {
    max-height: 500px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 0 1rem;
  }

  .section-title {
    margin-bottom: 2rem;
  }

  .about-item,
  .skills-card {
    padding: 1.5rem;
  }

  .skills-container {
    padding: 0 0.5rem;
    gap: 1rem;
  }

  .skills-card {
    padding: 1rem;
  }

  .skills-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  .skills-icons {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .skill-icon {
    padding: 0.5rem;
  }

  .skill-icon img {
    width: 40px;
    height: 40px;
    margin-bottom: 0.5rem;
  }

  .skill-icon span {
    font-size: 0.8rem;
  }

  /* Dialog fixes for very small screens */
  .dialog {
    width: 98%;
    margin: 0.5rem;
    max-height: 90vh;
  }

  .dialog-close {
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
  }

  .dialog-image {
    height: 200px; /* Consolidated final value */
  }

  .dialog-content {
    padding: 1rem;
  }

  .dialog-title {
    font-size: 1.5rem;
  }

  .dialog-description {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .dialog-tech-title {
    font-size: 1.2rem;
  }

  .dialog-tech-stack {
    gap: 0.5rem;
  }

  .dialog-tech-badge {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }

  .dialog-link {
    padding: 0.8rem 1.2rem;
    font-size: 0.85rem;
  }

  /* More height for experience details */
  .experience-item.active .experience-details {
    max-height: 600px;
  }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
  .dialog {
    max-height: 95vh;
  }

  .dialog-image {
    height: 120px;
  }

  .dialog-content {
    padding: 1rem;
  }

  /* More height for experience details in landscape */
  .experience-item.active .experience-details {
    max-height: 550px;
  }
}
