* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Share Tech Mono', monospace;
}

html, body {
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  background: radial-gradient(circle at top, #0a0a2a 0%, #000022 70%);
  color: #fff;
  position: relative;
}

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

#particleCanvas, #cssParticleLines {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

.background-decoration {
  position: absolute;
  top: 50%;
  right: 30%;
  width: 400px;
  height: auto;
  background: url('assets/sfund-staking-stats.png') no-repeat center;
  background-size: contain;
  opacity: 0.7;
  z-index: 0;
  animation: floatDecoration 20s infinite ease-in-out;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  box-shadow:
    50px 100px 1px #fff,
    150px 200px 1px #ddd,
    300px 50px 1px #eee,
    400px 300px 1px #fff,
    600px 150px 1px #ccc,
    800px 250px 1px #fff,
    100px 400px 1px #eee,
    200px 600px 1px #ddd,
    500px 500px 1px #fff,
    700px 100px 1px #ccc,
    200px 300px 1px #aaa,
    350px 450px 1px #eee;
  animation: twinkle 2s infinite alternate;
  z-index: 1;
}

.particle1, .particle2, .particle3, .particle4 {
  position: absolute;
  border-radius: 50%;
  opacity: 0.8;
  animation: float linear infinite;
  z-index: 1;
}

.particle1 {
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, #66ccff 20%, #003366 80%);
  top: 10%;
  left: -20px;
  animation-duration: 15s;
  animation-name: float1;
}

.particle2 {
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, #ff99cc 20%, #660033 80%);
  top: 50%;
  right: -20px;
  animation-duration: 20s;
  animation-name: float2;
}

.particle3 {
  width: 12px;
  height: 12px;
  background: radial-gradient(circle, #33ff99 20%, #006633 80%);
  top: 30%;
  left: -20px;
  animation-duration: 18s;
  animation-name: float3;
}

.particle4 {
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, #00d4ff 20%, #003366 80%);
  top: 70%;
  right: -20px;
  animation-duration: 22s;
  animation-name: float4;
}

@keyframes twinkle {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

@keyframes float1 {
  0% { transform: translateX(0) translateY(0); }
  100% { transform: translateX(100vw) translateY(100px); }
}

@keyframes float2 {
  0% { transform: translateX(0) translateY(0); }
  100% { transform: translateX(-100vw) translateY(-150px); }
}

@keyframes float3 {
  0% { transform: translateX(0) translateY(0); }
  100% { transform: translateX(100vw) translateY(50px); }
}

@keyframes float4 {
  0% { transform: translateX(0) translateY(0); }
  100% { transform: translateX(-100vw) translateY(-200px); }
}

@keyframes floatDecoration {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, 20px) scale(1.1); }
  100% { transform: translate(0, 0) scale(1); }
}

.hero {
  text-align: center;
  padding: 60px 20px;
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 2px solid #00d4ff;
  animation: fadeIn 2s ease-in;
  position: relative;
  z-index: 3; /* Increased to ensure above particles */
}

.hero-title {
  font-size: 3em;
  background: linear-gradient(45deg, #00d4ff, #6e00ff);
  background-clip: text; /* Standard property for broader compatibility */
  -webkit-background-clip: text;
  color: #00d4ff; /* Fallback for non-WebKit browsers */
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
  animation: pulse 2s infinite alternate;
}

.hero-subtitle {
  font-size: 1.5em;
  color: #ccc;
  margin: 20px 0;
  font-family: 'Caveat', cursive;
}

.connect-wallet {
  padding: 12px 24px;
  font-size: 1.2em;
  background: linear-gradient(45deg, #00d4ff, #007bff);
  border: none;
  border-radius: 25px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.connect-wallet:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px #00d4ff;
}

.container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  grid-template-areas:
    ". about-me ."
    "currently-working . currently-learning"
    ". my-portfolio ."
    "services-offered another1 another2"
    ". sfund-staking-proof .";
  justify-content: center;
  align-items: center;
}

.about-me { grid-area: about-me; }
.currently-working { grid-area: currently-working; }
.currently-learning { grid-area: currently-learning; }
.services-offered { grid-area: services-offered; }
.my-portfolio { grid-area: my-portfolio; }
.another1 { grid-area: another1; }
.another2 { grid-area: another2; }
.sfund-staking-proof { grid-area: sfund-staking-proof; }

.my-portfolio .section-title {
  text-align: center;
}

.card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 30px;
  margin: 15px 0;
  backdrop-filter: blur(5px);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  transition: transform 0.3s;
  position: relative;
  z-index: 2;
}

.card:hover {
  transform: translateY(-5px);
}

h2 {
  font-size: 1.8em;
  color: #00d4ff;
  margin-bottom: 15px;
}

p, li {
  font-size: 1.1em;
  line-height: 1.6;
  color: #ddd;
  font-family: 'Roboto', sans-serif;
}

p strong {
  color: #00d4ff;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.portfolio-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s;
  margin: 10px 0;
}

.portfolio-item a {
  color: #00d4ff;
  text-decoration: none;
  font-family: 'Roboto', sans-serif;
}

.portfolio-item a:hover {
  text-decoration: underline;
}

.portfolio-item:hover {
  transform: scale(1.05);
}

.social-links {
  text-align: center;
}

.social-links .links {
  display: flex;
  gap: 25px;
  justify-content: center;
  flex-wrap: wrap;
}

.social-btn {
  padding: 12px 24px;
  text-decoration: none;
  font-size: 1.1em;
  border-radius: 25px;
  color: #fff;
  transition: transform 0.3s, box-shadow 0.3s;
  font-family: 'Roboto', sans-serif;
}

.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.twitter { background: #1DA1F2; }
.twitter:hover { background: #0d8bdc; }
.github { background: #333; }
.github:hover { background: #555; }
.telegram { background: #0088cc; }
.telegram:hover { background: #006699; }

footer {
  text-align: center;
  margin: 50px auto 0;
  color: #aaa;
  font-family: 'Roboto', sans-serif;
  position: relative;
  z-index: 2;
}

footer p {
  animation: footerGlow 3s ease-in-out infinite alternate;
}

@keyframes footerGlow {
  0% { color: #aaa; text-shadow: 0 0 5px #00d4ff; }
  100% { color: #fff; text-shadow: 0 0 15px #00d4ff; }
}

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes glow {
  0% { text-shadow: 0 0 10px #00d4ff; }
  100% { text-shadow: 0 0 20px #00d4ff; }
}

@keyframes pulse {
  0% { text-shadow: 0 0 10px rgba(0, 212, 255, 0.8); }
  100% { text-shadow: 0 0 20px rgba(0, 212, 255, 1); }
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: linear-gradient(135deg, #0a0a2a, #1a1a4a);
  padding: 20px 30px;
  border-radius: 15px;
  width: 400px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
  animation: slideIn 0.5s ease-out;
  position: relative;
  border: 2px solid #00d4ff;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  color: #fff;
  cursor: pointer;
  transition: color 0.3s;
}

.close-btn:hover {
  color: #00d4ff;
}

#modalTitle {
  color: #00d4ff;
  font-size: 1.8em;
  margin-bottom: 15px;
  text-shadow: 0 0 10px #00d4ff;
}

#modalMessage {
  color: #ddd;
  font-size: 1.1em;
  margin-bottom: 20px;
  font-family: 'Roboto', sans-serif;
}

.modal-input {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#ethAmount {
  padding: 10px;
  font-size: 1em;
  border: 1px solid #00d4ff;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  outline: none;
  transition: border-color 0.3s;
}

#ethAmount:focus {
  border-color: #00d4ff;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

#sendBtn {
  padding: 10px 20px;
  font-size: 1.1em;
  background: linear-gradient(45deg, #00d4ff, #007bff);
  border: none;
  border-radius: 25px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

#sendBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px #00d4ff;
}

.sfund-container {
  grid-area: sfund-staking-proof;
  cursor: pointer;
  transition: transform 0.3s;
}

.sfund-preview {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  color: #00d4ff;
  font-size: 1.2em;
  transition: background 0.3s, transform 0.3s;
}

.sfund-preview:hover {
  background: rgba(0, 212, 255, 0.2);
  transform: translateY(-5px);
}

#sfundModal .modal-content {
  width: 80%;
  max-width: 600px;
  padding: 20px;
  background: transparent;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

#sfundModal .modal-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

#sfundModal .close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  color: #fff;
  cursor: pointer;
  transition: color 0.3s;
}

#sfundModal .close-btn:hover {
  color: #00d4ff;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "about-me"
      "currently-working"
      "currently-learning"
      "my-portfolio"
      "services-offered"
      "another1"
      "another2"
      "sfund-staking-proof";
    gap: 25px;
  }

  .hero {
    padding: 40px 10px;
  }

  .hero-title {
    font-size: 3em;
    background: linear-gradient(45deg, #00d4ff, #6e00ff);
    background-clip: text;
    -webkit-background-clip: text;
    color: #00d4ff;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
    animation: pulse 2s infinite alternate;
  }

  .hero-subtitle {
    font-size: 1.2em;
  }

  .connect-wallet {
    padding: 10px 20px;
    font-size: 1em;
  }

  .container {
    margin: 20px 10px;
  }

  h2 {
    font-size: 1.5em;
  }

  .particle1, .particle2, .particle3, .particle4 {
    width: 6px;
    height: 6px;
  }

  .background-decoration {
    width: 250px;
    top: 50%;
    right: 30%;
  }

  .card {
    padding: 20px;
    margin: 10px 0;
  }

  .modal-content {
    width: 90%;
    padding: 15px;
  }

  #modalTitle {
    font-size: 1.5em;
  }

  #ethAmount, #sendBtn {
    font-size: 1em;
    padding: 8px;
  }
}
