@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* BASE STYLES */
body {
  font-family: 'Inter', sans-serif;
  background-color: #001122;
  background-attachment: fixed;
  min-height: 100vh;
  color: #ffffff;
  overflow-x: hidden;
  position: relative;
}

/* Animated background stars */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
          radial-gradient(1px 1px at 180px 120px, rgba(255, 255, 255, 0.6), transparent),
          radial-gradient(1px 1px at 320px 280px, rgba(255, 255, 255, 0.4), transparent),
          radial-gradient(1px 1px at 580px 150px, rgba(255, 255, 255, 0.7), transparent),
          radial-gradient(1px 1px at 120px 350px, rgba(255, 255, 255, 0.5), transparent),
          radial-gradient(1px 1px at 750px 320px, rgba(255, 255, 255, 0.6), transparent),
          radial-gradient(1px 1px at 450px 80px, rgba(255, 255, 255, 0.5), transparent),
          radial-gradient(1px 1px at 680px 240px, rgba(255, 255, 255, 0.4), transparent),
          radial-gradient(1px 1px at 220px 180px, rgba(255, 255, 255, 0.6), transparent),
          radial-gradient(1px 1px at 820px 100px, rgba(255, 255, 255, 0.7), transparent),
          radial-gradient(1px 1px at 90px 250px, rgba(255, 255, 255, 0.5), transparent),
          radial-gradient(1px 1px at 520px 370px, rgba(255, 255, 255, 0.4), transparent),
          radial-gradient(1px 1px at 380px 200px, rgba(255, 255, 255, 0.6), transparent);
  background-repeat: repeat;
  background-size: 900px 400px;
  animation: starMove 12s infinite ease-in-out;
  z-index: -1;
}

@keyframes starMove {
  0%, 100% {
    opacity: 0.4;
    transform: translateY(0px) translateX(0px);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-10px) translateX(5px);
  }
}

/* NAVIGATION */
.nav-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
}

.nav {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-brand {
  font-weight: 600;
  font-size: 1.2rem;
  color: #ffffff;
  text-decoration: none;
}

.nav-brand h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  cursor: pointer;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* MAIN CONTENT */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
}

.hero {
  text-align: center;
  margin-bottom: 4rem;
}

.hero h2 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

.hero p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2rem;
}

/* BLOG GRID */
.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.blog-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.blog-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.blog-card h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #ffffff;
  line-height: 1.3;
}

.blog-card p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  font-weight: 400;
}

.blog-card .date {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* FOOTER */
.footer {
  padding: 4rem 2rem 3rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.newsletter {
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 2rem;
  text-align: left;
}

.newsletter h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.newsletter p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.email-form {
  display: flex;
  gap: 0.5rem;
  max-width: 400px;
}

.email-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
  outline: none;
}

.email-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.email-input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
}

.subscribe-btn {
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.subscribe-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.social-links {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.5rem;
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 2rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  color: #ffffff;
}

/* MODAL STYLES */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 10000;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Modal content with same styling as blog cards */
.modal .modal-content {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  position: relative;
  overflow: hidden;
  animation: slideIn 0.3s ease;
  color: #ffffff;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal .modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal .modal-close:hover {
  color: #ffffff;
}

.modal h3 {
  color: #ffffff;
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
  font-weight: 600;
}

.modal p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
  line-height: 1.5;
  font-size: 0.95rem;
}

.modal .modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal .name-fields {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.modal .name-fields input {
  flex: 1;
  min-width: 0;
}

.modal input {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  width: 100%;
  backdrop-filter: blur(10px);
}

.modal input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.modal input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
}

.modal .modal-subscribe-btn {
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.modal .modal-subscribe-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.modal .success-message {
  display: none;
  text-align: center;
  color: #4CAF50;
  font-weight: 500;
  padding: 1rem;
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.3);
  border-radius: 8px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }

  .nav-container {
    padding: 1rem;
  }

  .nav {
    padding: 0.8rem 1.5rem;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .nav-link {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .main-content {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 10rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .social-links {
    justify-content: center;
    padding: 1.5rem;
  }

  .email-form {
    max-width: 100%;
  }

  .modal .modal-content {
    margin: 1rem;
    max-width: calc(100% - 2rem);
  }

  .modal .name-fields {
    flex-direction: column;
    gap: 1rem;
  }
}

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

  .hero h2 {
    font-size: 1.8rem;
  }

  .email-form {
    flex-direction: column;
  }

  .subscribe-btn {
    width: 100%;
  }

  .modal .modal-content {
    padding: 1.5rem;
  }

  .modal h3 {
    font-size: 1.2rem;
  }
}