* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: linear-gradient(
    135deg,
    #1e293b 0%,
    #334155 25%,
    #475569 50%,
    #64748b 100%
  );
  color: #f8fafc;
  overflow-x: hidden;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Floating particles */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(226, 232, 240, 0.3);
  border-radius: 50%;
  animation: float 8s infinite linear;
}

@keyframes float {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-10vh) rotate(360deg);
    opacity: 0;
  }
}

/* Header */
header {
  text-align: center;
  padding: 80px 0;
  position: relative;
  z-index: 10;
}

.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  margin: 0 auto 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  animation: pulse 3s infinite;
  cursor: pointer;
  transition: transform 0.3s ease;
  border: 3px solid rgba(59, 130, 246, 0.3);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.profile-img:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.3);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(59, 130, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

h1 {
  font-size: 3em;
  margin-bottom: 10px;
  animation: fadeInUp 1s ease;
  font-weight: 600;
  color: #f1f5f9;
}

.subtitle {
  font-size: 1.2em;
  opacity: 0.85;
  animation: fadeInUp 1s ease 0.5s both;
  color: #cbd5e1;
  font-weight: 400;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navigation */
nav {
  display: flex;
  justify-content: center;
  margin: 50px 0;
  position: relative;
  z-index: 10;
}

.nav-item {
  padding: 15px 30px;
  margin: 0 10px;
  background: rgba(241, 245, 249, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.1);
  font-weight: 500;
  color: #e2e8f0;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: #f1f5f9;
}

/* Content sections */
.section {
  display: none;
  animation: fadeIn 0.5s ease;
  position: relative;
  z-index: 10;
}

.section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section headings */
h2 {
  color: #f1f5f9;
  font-weight: 600;
}

/* Skills section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.skill-card {
  background: rgba(248, 250, 252, 0.05);
  padding: 30px;
  border-radius: 16px;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.skill-card:hover {
  transform: translateY(-8px);
  background: rgba(248, 250, 252, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.1);
}

.skill-icon {
  font-size: 2.5em;
  margin-bottom: 15px;
  display: block;
}

.skill-card h3 {
  color: #f1f5f9;
  font-weight: 600;
  margin-bottom: 12px;
}

.skill-card p {
  color: #cbd5e1;
  font-size: 0.9em;
  line-height: 1.5;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(226, 232, 240, 0.15);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 15px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  border-radius: 3px;
  width: 0%;
  transition: width 2s ease;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

/* Projects section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.project-card {
  background: rgba(248, 250, 252, 0.05);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}

.project-header {
  height: 200px;
  background: linear-gradient(135deg, #475569, #334155);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3em;
  position: relative;
  overflow: hidden;
}

.project-header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(59, 130, 246, 0.1),
    transparent
  );
  animation: shine 4s infinite;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.project-content {
  padding: 25px;
}

.project-title {
  font-size: 1.5em;
  margin-bottom: 12px;
  color: #f1f5f9;
  font-weight: 600;
}

.project-description {
  opacity: 0.8;
  margin-bottom: 20px;
  line-height: 1.6;
  color: #cbd5e1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.tech-tag {
  padding: 6px 14px;
  background: rgba(59, 130, 246, 0.15);
  border-radius: 20px;
  font-size: 0.8em;
  color: #bfdbfe;
  border: 1px solid rgba(59, 130, 246, 0.2);
  font-weight: 500;
}

.project-link {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 8px;
  text-decoration: none;
  color: white;
  transition: all 0.3s ease;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.project-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #2563eb, #1e40af);
}

/* Contact section */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.contact-item {
  background: rgba(248, 250, 252, 0.05);
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.contact-item:hover {
  transform: translateY(-8px);
  background: rgba(248, 250, 252, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.1);
}

.contact-icon {
  font-size: 2.5em;
  margin-bottom: 15px;
  display: block;
}

.contact-item h3 {
  color: #f1f5f9;
  font-weight: 600;
  margin-bottom: 8px;
}

.contact-item p {
  color: #cbd5e1;
  font-weight: 500;
}

.contact-item small {
  display: block;
  margin-top: 8px;
  opacity: 0.7;
  font-size: 0.8em;
  color: #94a3b8;
}

/* Typing animation */
.typing {
  border-right: 2px solid #cbd5e1;
  animation: blink 1s infinite;
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

/* Fade out animation for mouse trail */
@keyframes fadeOut {
  to {
    opacity: 0;
    transform: scale(0);
  }
}

/* Responsive design */
@media (max-width: 1200px) {
  .container {
    padding: 15px;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 992px) {
  header {
    padding: 60px 0;
  }

  h1 {
    font-size: 2.5em;
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
  }

  .contact-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  header {
    padding: 40px 0;
  }

  h1 {
    font-size: 2em;
    margin-bottom: 15px;
  }

  .subtitle {
    font-size: 1em;
  }

  .profile-img {
    width: 120px;
    height: 120px;
    font-size: 50px;
    margin-bottom: 20px;
  }

  nav {
    flex-direction: column;
    align-items: center;
    margin: 30px 0;
  }

  .nav-item {
    margin: 5px 0;
    padding: 12px 25px;
    font-size: 0.9em;
    width: 200px;
    text-align: center;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .skill-card {
    padding: 20px;
    text-align: center;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .project-header {
    height: 150px;
    font-size: 2.5em;
  }

  .project-content {
    padding: 20px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .contact-item {
    padding: 20px;
  }

  h2 {
    font-size: 2em !important;
    margin-bottom: 20px !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px;
  }

  header {
    padding: 30px 0;
  }

  h1 {
    font-size: 1.8em;
  }

  .profile-img {
    width: 100px;
    height: 100px;
    font-size: 40px;
  }

  .nav-item {
    width: 180px;
    padding: 10px 20px;
    font-size: 0.8em;
  }

  .skill-card,
  .project-content,
  .contact-item {
    padding: 15px;
  }

  .project-header {
    height: 120px;
    font-size: 2em;
  }

  .project-title {
    font-size: 1.3em;
  }

  .tech-tag {
    padding: 4px 10px;
    font-size: 0.7em;
  }

  .project-link {
    padding: 8px 16px;
    font-size: 0.9em;
  }

  h2 {
    font-size: 1.8em !important;
  }

  .contact-icon,
  .skill-icon {
    font-size: 2em;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 1.6em;
  }

  .nav-item {
    width: 160px;
    padding: 8px 15px;
  }

  .profile-img {
    width: 90px;
    height: 90px;
    font-size: 35px;
  }

  .project-header {
    height: 100px;
    font-size: 1.8em;
  }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
  .skill-card:active,
  .project-card:active,
  .contact-item:active {
    transform: scale(0.98);
  }

  .nav-item:active {
    transform: translateY(-2px);
  }

  .project-link:active {
    transform: scale(1.02);
  }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
  header {
    padding: 20px 0;
  }

  .profile-img {
    width: 80px;
    height: 80px;
    font-size: 30px;
    margin-bottom: 15px;
  }

  h1 {
    font-size: 1.5em;
    margin-bottom: 10px;
  }

  nav {
    margin: 20px 0;
  }

  .nav-item {
    padding: 8px 20px;
  }
}
