* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(50px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes glow {
  0% {
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
  }

  50% {
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.8);
  }

  100% {
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
  }
}

body {
  background-color: black;
  color: white;
  font-family: Arial, sans-serif;
  min-height: 100vh;
  position: relative;
}

#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

main {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  animation: fadeIn 1s ease-out;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  margin-top: 20px;
  position: relative;
  z-index: 1;
}

.profile-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
  animation: float 3s ease-in-out infinite, glow 4s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.profile-image:hover {
  transform: scale(1.1) rotate(5deg);
}

h1 {
  font-size: 36px;
  margin-top: 10px;
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
  animation: fadeIn 1s ease-out 0.3s both;
  position: relative;
  display: inline-block;
}

h1::after {
  content: "";
  position: absolute;
  width: 0;
  height: 3px;
  bottom: -5px;
  left: 50%;
  background: #3b82f6;
  transition: all 0.5s ease;
  transform: translateX(-50%);
}

h1:hover::after {
  width: 100%;
}

.subtitle {
  font-size: 18px;
  color: #ddd;
  animation: fadeIn 1s ease-out 0.6s both;
  position: relative;
  display: inline-block;
}

.subtitle::after {
  content: "|";
  animation: pulse 1s infinite;
  margin-left: 5px;
  color: #3b82f6;
}

.social-links {
  margin-top: 15px;
  animation: fadeIn 1s ease-out 0.9s both;
}

.social-links a {
  color: white;
  margin: 0 10px;
  font-size: 24px;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  animation: slideIn 0.5s ease-out forwards;
}

.social-links a:hover {
  transform: translateY(-5px) rotate(10deg);
  color: #60a5fa;
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

/* Special effect for each social icon */
.social-links a:nth-child(1) {
  animation-delay: 0.2s;
}

.social-links a:nth-child(2) {
  animation-delay: 0.4s;
}

.social-links a:nth-child(3) {
  animation-delay: 0.6s;
}

.social-links a:nth-child(4) {
  animation-delay: 0.8s;
}

.store-message {
  margin-top: 20px;
  font-size: 20px;
}

/* Projects Section Styles */
.projects-section {
  width: 100%;
  max-width: 2000px;
  margin: 0 auto;
  padding: 20px;
  animation: fadeIn 1s ease-out 1.2s both;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.projects-section h2 {
  text-align: center;
  margin-bottom: 50px;
  font-size: 32px;
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
  position: relative;
  display: inline-block;
  margin: 0 auto 50px;
  padding-bottom: 10px;
}

.projects-section h2::after {
  content: "";
  position: absolute;
  width: 50px;
  height: 3px;
  bottom: 0;
  left: 50%;
  background: #3b82f6;
  transform: translateX(-50%);
  animation: pulse 2s infinite;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
  margin: 0 auto;
  padding: 50px;
  width: 100%;
  max-width: 1600px;
  justify-content: center;
  align-items: center;
}

.project-card {
  background: rgba(26, 26, 26, 0.8);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(59, 130, 246, 0.2);
  animation: slideIn 0.5s ease-out forwards;
  animation-fill-mode: both;
  min-height: 400px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  margin: 0 auto;
  width: 100%;
  max-width: 400px;
}

.project-image {
  width: 100%;
  height: 200px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  margin: 15px 0;
  background-color: transparent;
  transition: all 0.5s ease;
  position: relative;
}

.project-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at center,
    rgba(96, 165, 250, 0.1) 0%,
    rgba(0, 0, 0, 0.5) 100%
  );
  z-index: 1;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 8px 30px rgba(96, 165, 250, 0.4);
  border-color: rgba(96, 165, 250, 0.6);
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.project-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
}

.project-title {
  font-size: 22px;
  margin-bottom: 10px;
  color: #60a5fa;
  text-shadow: 0 0 15px rgba(96, 165, 250, 0.5);
  transition: all 0.3s ease;
}

.project-title a {
  color: #60a5fa;
  text-decoration: none;
  transition: all 0.3s ease;
}

.project-title a:hover {
  color: #93c5fd;
  text-shadow: 0 0 20px rgba(147, 197, 253, 0.7);
}

.project-description {
  font-size: 16px;
  color: #e5e7eb;
  margin: 15px 0;
  line-height: 1.5;
}

.language-tag {
  background: rgba(96, 165, 250, 0.2);
  color: #60a5fa;
  padding: 8px 15px;
  border-radius: 25px;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.2);
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.language-tag:hover {
  transform: scale(1.05);
  background: rgba(96, 165, 250, 0.3);
}

.project-stats {
  display: flex;
  justify-content: space-around;
  color: #888;
  font-size: 14px;
  margin-top: auto;
  flex-wrap: wrap;
  gap: 10px;
}

.project-stats span {
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.project-card:hover .project-stats span {
  color: #bbb;
}

.github-button {
  background: rgba(96, 165, 250, 0.2);
  color: #60a5fa;
  padding: 12px 25px;
  border-radius: 25px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  margin-top: 20px;
  font-size: 16px;
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.2);
  position: relative;
  overflow: hidden;
}

.github-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(96, 165, 250, 0.2),
    transparent
  );
  transition: all 0.5s ease;
}

.github-button:hover::before {
  left: 100%;
}

.github-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(96, 165, 250, 0.4);
}

.new-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: linear-gradient(45deg, #3b82f6, #60a5fa);
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 18px;
  font-weight: bold;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
  animation: pulse 2s infinite ease-in-out;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transform: rotate(15deg);
  transition: all 0.3s ease;
}

.new-badge::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #3b82f6, #60a5fa);
  border-radius: 25px;
  z-index: -1;
  filter: blur(5px);
  opacity: 0.5;
}

.project-card:hover .new-badge {
  animation: pulse 1s infinite ease-in-out;
  transform: rotate(15deg) scale(1.1);
}

.loading {
  font-size: 20px;
  color: #3b82f6;
  margin: 40px 0;
  position: relative;
  animation: pulse 1.5s infinite ease-in-out;
}

.loading::after {
  content: "...";
  position: absolute;
  animation: dots 1.5s infinite;
}

@keyframes dots {
  0%,
  20% {
    content: ".";
  }

  40% {
    content: "..";
  }

  60%,
  100% {
    content: "...";
  }
}

.error-message {
  color: #ff4444;
  margin: 40px 0;
  animation: fadeIn 0.5s ease-out;
  text-align: center;
}

.retry-button {
  background: rgba(59, 130, 246, 0.8);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  margin-top: 15px;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.retry-button:hover {
  background: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.retry-button i {
  animation: rotate 1.5s infinite linear;
}

/* Project count style */
.project-count {
  width: 100%;
  text-align: center;
  margin: 20px 0;
  color: #3b82f6;
  font-size: 16px;
  font-weight: bold;
  animation: fadeIn 0.5s ease-out;
}

.project-count span {
  background: rgba(59, 130, 246, 0.1);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: inline-block;
}

/* API Notification styles */
.api-notification {
  width: 100%;
  text-align: center;
  margin: 10px 0 20px;
  color: #ff9800;
  font-size: 14px;
  animation: fadeIn 0.5s ease-out;
  background: rgba(255, 152, 0, 0.1);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 152, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.api-notification i {
  font-size: 16px;
  color: #ff9800;
}

.retry-button.small {
  padding: 4px 8px;
  font-size: 12px;
  margin-top: 0;
  margin-left: 10px;
}

/* Responsive Design */
@media screen and (max-width: 1400px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 1000px;
  }
}

@media screen and (max-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
    padding: 30px;
  }

  .project-card {
    max-width: 500px;
  }

  .hero-content {
    padding: 20px;
  }

  h1 {
    font-size: 32px;
  }

  .subtitle {
    font-size: 16px;
  }
}

@media screen and (max-width: 600px) {
  .projects-grid {
    padding: 20px;
    gap: 30px;
  }

  .project-card {
    max-width: 100%;
    min-height: 350px;
  }

  .project-image {
    height: 150px;
  }

  .project-title {
    font-size: 20px;
  }

  .project-description {
    font-size: 14px;
  }

  .language-tag {
    font-size: 14px;
    padding: 6px 12px;
  }

  .github-button {
    padding: 10px 20px;
    font-size: 14px;
  }

  .new-badge {
    font-size: 14px;
    padding: 8px 15px;
  }

  .hero {
    padding: 15px;
  }

  .profile-image {
    width: 120px;
    height: 120px;
  }

  h1 {
    font-size: 28px;
  }

  .social-links a {
    font-size: 20px;
    margin: 0 8px;
  }
}

@media screen and (max-width: 400px) {
  .projects-grid {
    padding: 15px;
    gap: 20px;
  }

  .project-card {
    min-height: 300px;
  }

  .project-image {
    height: 120px;
  }

  .project-content {
    padding: 15px;
  }

  .project-title {
    font-size: 18px;
  }

  .project-description {
    font-size: 13px;
  }

  .language-tag {
    font-size: 13px;
  }

  .github-button {
    padding: 8px 15px;
    font-size: 13px;
  }

  .new-badge {
    font-size: 12px;
    padding: 6px 12px;
  }

  .hero {
    padding: 10px;
  }

  .profile-image {
    width: 100px;
    height: 100px;
  }

  h1 {
    font-size: 24px;
  }

  .social-links a {
    font-size: 18px;
    margin: 0 6px;
  }
}

.name-container {
  position: relative;
  height: 60px;
  overflow: hidden;
}

.name-text {
  position: absolute;
  width: 100%;
  text-align: center;
  transition: all 0.5s ease;
  opacity: 0;
  transform: translateY(-20px);
}

.name-text:first-child {
  opacity: 1;
  transform: translateY(0);
}

.name-text.korean {
  font-family: "Noto Sans KR", sans-serif;
}

@keyframes nameChange {
  0% {
    opacity: 1;
    transform: translateY(0);
  }

  45% {
    opacity: 0;
    transform: translateY(20px);
  }

  55% {
    opacity: 0;
    transform: translateY(-20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.name-text.active {
  animation: nameChange 10s infinite;
}

.name-text.korean.active {
  animation-delay: 5s;
}

.copyright {
  text-align: center;
  padding: 20px;
  color: #e5e7eb;
  font-size: 14px;
  position: relative;
  z-index: 2;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  margin-top: 50px;
  border-top: 1px solid rgba(96, 165, 250, 0.2);
  animation: fadeIn 1s ease-out;
}

.copyright p {
  margin: 0;
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
}

@media screen and (max-width: 600px) {
  .copyright {
    font-size: 12px;
    padding: 15px;
  }
}

/* Blocked Countries Warning */
.blocked-warning {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.5s ease-out;
}

.warning-content {
  background: rgba(26, 26, 26, 0.95);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.3);
  border: 1px solid rgba(255, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  animation: pulse 2s infinite;
}

.warning-content i {
  font-size: 50px;
  color: #ff4444;
  margin-bottom: 20px;
  animation: rotate 3s infinite linear;
}

.warning-content h2 {
  color: #ff4444;
  font-size: 28px;
  margin-bottom: 15px;
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.warning-content p {
  color: #e5e7eb;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 10px;
}

.warning-content .warning-details {
  font-size: 14px;
  color: #888;
  margin-top: 20px;
}

@media screen and (max-width: 600px) {
  .warning-content {
    padding: 30px 20px;
  }

  .warning-content i {
    font-size: 40px;
  }

  .warning-content h2 {
    font-size: 24px;
  }

  .warning-content p {
    font-size: 14px;
  }
}
