@import url('https://fonts.googleapis.com/css2?family=Exo:ital,wght@0,100..900;1,100..900&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --background: hsl(0, 0%, 3%);
  --foreground: hsl(0, 0%, 95%);
  --card: hsl(0, 0%, 6%);
  --muted: hsl(0, 0%, 12%);
  --muted-foreground: hsl(0, 0%, 55%);
  --border: hsl(0, 0%, 15%);
  --neon-green: hsl(160, 100%, 50%);
  --neon-cyan: hsl(185, 100%, 50%);
  --font-sans: "Exo", sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Utility Classes */
.font-mono {
  font-family: var(--font-mono);
}

.text-neon-green {
  color: var(--neon-green);
}

.text-neon-cyan {
  color: var(--neon-cyan);
}

.text-muted {
  color: var(--muted-foreground);
}

.text-glow-cyan {
  text-shadow: 0 0 20px hsla(185, 100%, 50%, 0.5);
}

/* Grid Background */
.grid-bg {
  background-image: 
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Scanline Effect */
.scanline::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    transparent 50%,
    hsla(160, 100%, 50%, 0.02) 50%
  );
  background-size: 100% 4px;
  pointer-events: none;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fade-up {
  animation: fadeUp 0.8s ease-out forwards;
}

.animate-fade-in {
  animation: fadeIn 1s ease-out forwards;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }

.opacity-0 { opacity: 0; }

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero .grid-bg {
  position: absolute;
  inset: 0;
  opacity: 0.3;
}

.hero .gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, hsla(0, 0%, 3%, 0.5), var(--background));
}

.hero-content {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1200px;
  width: 100%;
}

@media (min-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.hero-text {
  text-align: center;
  order: 2;
}

@media (min-width: 1024px) {
  .hero-text {
    text-align: left;
    order: 1;
  }
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--neon-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 32rem;
  margin: 0 auto 2rem;
}

@media (min-width: 1024px) {
  .hero-description {
    margin: 0 0 2rem;
  }
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
  }
}

@media (min-width: 1024px) {
  .hero-buttons {
    justify-content: flex-start;
  }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  background-color: var(--neon-cyan);
  color: var(--background);
  font-weight: 500;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  box-shadow: 0 0 30px hsla(160, 100%, 50%, 0.3), 0 0 60px hsla(160, 100%, 50%, 0.1);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  background: transparent;
  color: var(--foreground);
  font-weight: 500;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid var(--border);
  transition: border-color 0.3s ease, color 0.3s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

.hero-book {
  order: 1;
  display: flex;
  justify-content: center;
}

@media (min-width: 1024px) {
  .hero-book {
    order: 2;
  }
}

.book-wrapper {
  position: relative;
}

.book-glow {
  position: absolute;
  inset: -2rem;
  background: hsla(160, 100%, 50%, 0.1);
  border-radius: 50%;
  filter: blur(40px);
  animation: pulseGlow 2s ease-in-out infinite;
}

.book-image {
  position: relative;
  width: 16rem;
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.5));
}

@media (min-width: 640px) {
  .book-image {
    width: 18rem;
  }
}

@media (min-width: 1024px) {
  .book-image {
    width: 40rem;
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted-foreground);
}

@media (min-width: 1024px) {
  .scroll-indicator {
    display: flex;
  }
}

.scroll-indicator span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.scroll-line {
  width: 1px;
  height: 2rem;
  background: linear-gradient(to bottom, var(--muted-foreground), transparent);
}

/* Newsletter Section */
.newsletter {
  padding: 6rem 0;
  background-color: var(--card);
  position: relative;
  overflow: hidden;
}

.newsletter .corner-accent {
  position: absolute;
}

.newsletter .corner-tl {
  top: 0;
  left: 0;
  width: 8rem;
  height: 1px;
  background: linear-gradient(to right, var(--neon-cyan), transparent);
}

.newsletter .corner-tl-v {
  top: 0;
  left: 0;
  width: 1px;
  height: 8rem;
  background: linear-gradient(to bottom, var(--neon-cyan), transparent);
}

.newsletter .corner-br {
  bottom: 0;
  right: 0;
  width: 8rem;
  height: 1px;
  background: linear-gradient(to left, var(--neon-cyan), transparent);
}

.newsletter .corner-br-v {
  bottom: 0;
  right: 0;
  width: 1px;
  height: 8rem;
  background: linear-gradient(to top, var(--neon-cyan), transparent);
}

.newsletter-content {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 10;
}

.newsletter-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--neon-green);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.newsletter-title {
  font-size: clamp(1.875rem, 5vw, 3rem);
  font-weight: 500;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.newsletter-description {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 36rem;
  margin: 0 auto 2.5rem;
}


/* MailerLite Embedded Form Overrides */
.ml-embedded {
  max-width: 32rem;
  margin: 0 auto 2rem;
}

/* Override MailerLite form container */
.ml-embedded .ml-form-embedContainer {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Override form wrapper */
.ml-embedded .ml-form-embedWrapper {
  background: transparent !important;
  padding: 0 !important;
}

/* Override form body */
.ml-embedded .ml-form-embedBody {
  padding: 0 !important;
  background: transparent !important;
}

/* Style the input field */
.ml-embedded .ml-form-formContent input[type="email"],
.ml-embedded .ml-form-embedBody input[type="email"] {
  background-color: var(--muted) !important;
  border: 1px solid var(--border) !important;
  color: var(--foreground) !important;
  font-family: var(--font-mono) !important;
  font-size: 0.875rem !important;
  padding: 0.58rem 1rem !important;
  border-radius: 0 !important;
  transition: border-color 0.3s ease !important;
}

.ml-embedded .ml-form-formContent input[type="email"]:focus,
.ml-embedded .ml-form-embedBody input[type="email"]:focus {
  outline: none !important;
  border-color: var(--neon-cyan) !important;
  box-shadow: none !important;
}

.ml-embedded .ml-form-formContent input[type="email"]::placeholder,
.ml-embedded .ml-form-embedBody input[type="email"]::placeholder {
  color: var(--muted-foreground) !important;
}

/* Style the submit button */
.ml-embedded .ml-form-formContent button[type="submit"],
.ml-embedded .ml-form-embedBody button[type="submit"],
.ml-embedded .ml-form-embedSubmit button {
  background-color: var(--neon-cyan) !important;
  color: var(--background) !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  padding: 1rem 2rem !important;
  border: none !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  transition: box-shadow 0.3s ease !important;
}

.ml-embedded .ml-form-formContent button[type="submit"]:hover,
.ml-embedded .ml-form-embedBody button[type="submit"]:hover,
.ml-embedded .ml-form-embedSubmit button:hover {
  box-shadow: 0 0 30px hsla(160, 100%, 50%, 0.3), 0 0 60px hsla(160, 100%, 50%, 0.1) !important;
}

/* Style the success message */
.ml-embedded .ml-form-successBody {
  background: transparent !important;
  padding: 2rem !important;
}

.ml-embedded .ml-form-successBody .ml-form-successContent {
  color: var(--neon-green) !important;
  font-family: var(--font-mono) !important;
}

/* Hide MailerLite branding */
.ml-embedded .ml-form-embedWrapper .ml-form-embedBody .ml-form-formContent .ml-form-checkboxRow,
.ml-embedded .ml-form-align-center {
  text-align: center;
}

/* Style any labels */
.ml-embedded label {
  color: var(--foreground) !important;
  font-family: var(--font-mono) !important;
  font-size: 0.875rem !important;
}

/* Error messages */
.ml-embedded .ml-error {
  color: #ff6b6b !important;
  font-family: var(--font-mono) !important;
  font-size: 0.75rem !important;
}

/* Loading state */
.ml-embedded .ml-form-embedSubmit.loading button {
  opacity: 0.7 !important;
}

.newsletter-form {
  max-width: 32rem;
  margin: 0 auto;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .form-row {
    flex-direction: row;
  }
}

.newsletter-input {
  flex: 1;
  padding: 1rem 1.25rem;
  background-color: var(--muted);
  border: 1px solid var(--border);
  color: var(--foreground);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  transition: border-color 0.3s ease;
}

.newsletter-input::placeholder {
  color: var(--muted-foreground);
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--neon-cyan);
}

.newsletter-disclaimer {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 1rem;
}

.newsletter-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  margin-top: 4rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.stat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stat-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  animation: pulseGlow 2s ease-in-out infinite;
}

.stat-dot.green {
  background-color: var(--neon-green);
}

.stat-dot.cyan {
  background-color: var(--neon-cyan);
}

/* Author Section */
.author {
  padding: 6rem 0;
  background-color: var(--background);
  position: relative;
}

.author .grid-bg {
  position: absolute;
  inset: 0;
  opacity: 0.2;
}

.author-content {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .author-content {
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
  }
}

.author-image-wrapper {
  display: flex;
  justify-content: center;
}

@media (min-width: 1024px) {
  .author-image-wrapper {
    justify-content: flex-start;
  }
}

.author-image-container {
  position: relative;
}

.author-image-border {
  position: absolute;
  inset: -4px;
  background: linear-gradient(135deg, var(--neon-green), transparent, var(--neon-cyan));
  opacity: 0.5;
}

.author-image-inner {
  position: relative;
  width: 16rem;
  aspect-ratio: 1;
  overflow: hidden;
  background-color: var(--card);
}

@media (min-width: 640px) {
  .author-image-inner {
    width: 20rem;
  }
}

.author-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.7s ease;
}

.author-photo:hover {
  filter: grayscale(0%);
}

.author-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--background), transparent);
}

.author-text {
  text-align: center;
}

@media (min-width: 1024px) {
  .author-text {
    text-align: left;
  }
}

.author-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--neon-green);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.author-name {
  font-size: clamp(1.875rem, 5vw, 3rem);
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.author-role {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--neon-cyan);
  margin-bottom: 2rem;
}

.author-bio {
  color: var(--muted-foreground);
  line-height: 1.8;
}

.author-bio p {
  margin-bottom: 1rem;
}

.author-bio em {
  color: var(--foreground);
  font-style: normal;
}

.author-social {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
  justify-content: center;
}

@media (min-width: 1024px) {
  .author-social {
    justify-content: flex-start;
  }
}

.social-link {
  color: var(--muted-foreground);
  transition: color 0.3s ease;
}

.social-link:hover {
  color: var(--neon-green);
}

.social-link svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

/* Footer */
.footer {
  padding: 3rem 0;
  background-color: var(--card);
  border-top: 1px solid var(--border);
  position: relative;
}

.footer-accent {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 8rem;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--neon-green), transparent);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-brand {
  text-align: center;
}

@media (min-width: 768px) {
  .footer-brand {
    text-align: left;
  }
}

.footer-name {
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.footer-links a:hover {
  color: var(--neon-green);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-copyright {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--card);
  border: 1px solid var(--neon-green);
  padding: 1rem 1.5rem;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.toast-message {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
